Metadata-Version: 2.1
Name: machinevision-toolbox-python.phone-sensor
Version: 0.2.4
Summary: PhoneSensor for machinevisiontoolbox. Get camera and IMU data from a camera remotely with Python
Home-page: https://github.com/callumjhays/mvt-phonesensor-app
Author: Callum Hays
Author-email: callumjhays@gmail.com
License: MIT
Project-URL: Documentation, https://github.com/callumjhays/mvt-phonesensor-app
Project-URL: Source, https://github.com/callumjhays/mvt-phonesensor-app
Project-URL: Tracker, https://github.com/callumjhays/mvt-phonesensor-app/issues
Description: # machinevision-toolbox-python.phone-sensor
        
        ## Quickstart
        
        Install with `pip`:
        
        ```bash
        pip install -U machinevision-toolbox-python.phone-sensor
        # or
        pip install git+https://github.com/CallumJHays/mvt-phonesensor-app
        ```
        
        Example Code:
        
        ```python
        from phone_sensor import PhoneSensor
        from matplotlib import pyplot as plt
        
        # Hosts a webserver in a background thread.
        # Display a QR code link to the app
        phone = PhoneSensor(qrcode=True)
        
        # wait for button press to snap a photo
        img = phone.grab(button=True)
        # get device orientation as a Quaternion
        quaternion = phone.imu().quaternion
        
        plt.subplot(1, 2, 1)
        plt.imshow(img)
        plt.subplot(1, 2, 2)
        plt.bar(['x', 'y', 'z', 'w'], quaternion)
        plt.show()
        ```
        
        Will create an ASCII QRcode in your terminal. Scanning it with a smartphone will take you to a webapp hosted by the `PhoneSensor`, which looks like:
        
        ## Contributing
        
        PRs welcome! The stack is Python3.6 and Typescript4.1 & CreateReactApp4.0
        
        ### Development Install
        
        First, clone this repo and install dependencies
        
        ```bash
        npm install
        pip install -e .
        ```
        
        ### Running in Development Mode
        
        1. Run the dev-server (and keep it running):
        
        ```bash
        npm start
        ```
        
        2. Create a PhoneSensor in proxy mode:
        
        ```python
        >>> from phone_sensor import PhoneSensor
        >>> phone = PhoneSensor(qrcode=True, \
                proxy_client_from="localhost:3000")
        >>> phone.grab(button=True)
        ```
        
        or just run the `python examples/devmode.py`
        
        Then click the link in terminal to test the app
        
Keywords: python webapp imu motion camera machinevision computervision opencv
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.6
Description-Content-Type: text/markdown
