Metadata-Version: 2.1
Name: concurrent-videocapture
Version: 0.0.1
Summary: Read opencv cameras concurrently
Home-page: https://github.com/charlielito/concurrent-videocapture
Author: Carlos Alvarez
Author-email: candres.alv@gmail.com
License: GNU
Description: # concurrent-videocapture
        Cv2 VideoCapture that runs concurrently in a thread for faster processing
        
        ## Installation
        
        You can install `concurrent_videocapture` from pip using
        
        ```
        pip install concurrent_videocapture
        ```
        
        or using
        
        ```
        pip install git+https://github.com/charlielito/concurrent-videocapture
        ```
        
        ## Usage
        
        
        ```python
        import cv2
        import time
        
        from concurrent_videocapture import ConcurrentVideoCapture
        
        # Use it a the standard cv2.VideoCapture Class
        cap = ConcurrentVideoCapture(0)
        
        while True:
            init = time.time()
            grabbed, frame = cap.read()
        
            # Simulate heavy image processing function
            time.sleep(0.3)
        
            if not grabbed:
                break
        
            cv2.imshow("video", frame)
            key = cv2.waitKey(1)
        
            if key == 27:  # ESC
                break
        
            fps = 1/(time.time() - init)
            print('Fps: {}'.format(fps))
        
        cap.release()
        ```
Keywords: opencv,concurrent video
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Description-Content-Type: text/markdown
