Skip to content
/ vidgear Public
forked from abhiTronix/vidgear

Most Powerful multi-threaded Video Processing Python framework powerpacked with unique trailblazing features.

License

Notifications You must be signed in to change notification settings

aqreed/vidgear

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VidGear

VidGear is a small python wrapper around OpenCV Video I/O module that contains powerful multi-thread modules(gears) to enable high-speed video frames read functionality across various devices and platforms. It is a reworked implementation of imutils library's video modules with all major bugs fixed and comes with addition features like source parameters manipulation in OpenCV on the go. This library also well compatible with Raspberry Pi Camera module's Picamera library and provides us the ability exploit its various features like brightness, saturation, sensor_mode etc. easily. This library is compatible with both Python 2.7 and Python 3.

Installation

VidGear requires OpenCV and Picamera library installation prior to its installation(Latest versions recommended). Must install them.

Download from Release Page(Stable):

vidgear could be easily be downloaded from release page(not available on pip yet) and then can be installed as follows:

sudo pip install vidgear-0.1.0-py2.py3-none-any.whl

Clone This Repo(Latest but experimental):

Or you can clone this repository and install using pip as follows:

git clone https://github.com/abhiTronix/vidgear.git
cd vidgear
sudo pip install .

Usage

Basic example:

# import required libraries
from vidgear.gears import VideoGear
import cv2

stream = VideoGear(enablePiCamera = False, source=0).start() 
# define various attributes and start the stream

# infinite loop
while True:
	
	frame = stream.read()
	# read frames

	# check if frame is None
	if frame is None:
		#if True break the infinite loop
		break
	
	# do something with frame here
	
	cv2.imshow("Output Frame", frame)
	# Show output window

	key = cv2.waitKey(1) & 0xFF
	# check for 'q' key-press
	if key == ord("q"):
		if 'q' key-pressed break out
		break

cv2.destroyAllWindows()
# close output window

stream.stop()
# safely close video stream.

Checkout wiki for extensive usage documentation and examples.


Salient Features:

  • Multi-Threaded high-speed OpenCV video-frame capturing(resulting in High FPS)
  • Built-in Robust Error and frame synchronization Handling
  • Multi-Platform compatibility
  • Flexible control over the output stream
  • Small Size

Contributing and licenses:

This Project is licensed under the MIT license. You are welcome to contribute with suggestions, feature requests and pull requests.

About

Most Powerful multi-threaded Video Processing Python framework powerpacked with unique trailblazing features.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 96.5%
  • Shell 3.5%