Open Exauce-belayi opened 3 years ago
This repo is all about implementation in the c-language. python is not addressed. Have a look here if you want to use this lib in a python environment. https://github.com/melexis-fir/mlx90640-driver-devicetree-py Importing it into opencv is possible, but I didn't figure out how get the stream with only 'import cv2' The example is a bit out of sync with the driver above, however it can inspire you on how to do it. https://github.com/melexis-fir/mlx9064x-blob-detection-py/blob/master/examples/mlx90640_opencv_blob_detection.py#L171
Hello,
I would like to annotate over frames coming out of mlx90640 thermal camera using OpenCV. It is connected to the GPIO of the raspberry pi using I2C interface protocol. Seems like Opencv can recognize USB cams out of box but not i2c is it so? When I run my python code(with only import of cv2 ) to get annotated video output , I get an index error when using 1 or 0. This is maybe because in the code the object, source expects the camera to be connected serially through USB and not connected directly onto the raspberry pi module via i2c. Any thoughts on how to achieve this? If there is any code statements or component part that may be of use to solve this problem that will help a lot. Here is the python code for this using opencv on raspberry pi:
import cv2
Use source = 0 to specify the web cam as the video source, OR
specify the pathname to a video file to read.
source = 1
Create a video capture object from the VideoCapture Class.
video_cap = cv2.VideoCapture(source)
Create a named window for the video display.
win_name = 'Video Preview' cv2.namedWindow(win_name)
Enter a while loop to read and display the video frames one at a time.
while True:
Read one frame at a time using the video capture object.
video_cap.release() cv2.destroyWindow(win_name)
Thanks.