ManyanJin10 0 Posted June 22, 2022 (edited) Hi I've just start Tinker 2S (Debian ver) user. It's very cool small computer and enjoy to connect camera. I'm using MIPI cam(IMX219) . GStreamer pipeline command line is no problem showing video. But try to integrate python code, no response from camera. I want to ask you guys how should I do. below is test python code. Quote import cv2 #import time #import tkinter as tk #from PIL import Image, ImageTk src = "gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! videoconvert ! autovideosink" #,cv2.CAP_GSTREAMER appsink drop=true sync=false cap=cv2.VideoCapture(src, cv2.CAP_GSTREAMER) #time.sleep(3) while cap.isOpened(): ret, frame_read = cap.read() cv2.imshow('Read',frame_read) cv2.waitKey(30) cap.release() python 3.7.3 Opencv version =opencv-python 4.6.0.66 numpy 1.21.6 pip 22.1.2 Edited June 22, 2022 by ManyanJin10 module version added Share this post Link to post Share on other sites
tooz 52 Posted June 23, 2022 hello @ManyanJin10, which debian os are you using? if you're using one of the official releases from tinker-board.asus.com may i know the version? thank you. Share this post Link to post Share on other sites
ManyanJin10 0 Posted June 23, 2022 Hello @tooz, I downloaded TinkerOS image, Tinker Board 2 Debian 10 V2.0.4 from tinker-board.asus.com . If execute pipeline "gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! videoconvert ! autovideosink" in the termial, capture process is no problem. . Share this post Link to post Share on other sites
tooz 52 Posted June 23, 2022 hello @ManyanJin10, you can try to modify this line to: src = "gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! videoconvert ! appsink" Share this post Link to post Share on other sites
ManyanJin10 0 Posted June 23, 2022 Good morning! Tooz. I changed parameter according to your advice, but no response from command line of python "python xxx(above code).py" To confirm video capture process is started or not, I inserted "cap.isOpened "status. As a result of check, cap.isOpened is failed. video stream doesn't overlay via gstreamer and show in the Opencv. Share this post Link to post Share on other sites
ManyanJin10 0 Posted June 27, 2022 Hi tooz. Regarding this issue, I resolved myself with your advice. I found my Opencv set GStreamer "No". That's why I uninstalled opencv and build source after working well. Thank you for your supporting! Share this post Link to post Share on other sites
tooz 52 Posted June 27, 2022 hello @ManyanJin10, that's great to know, thanks for the update. Share this post Link to post Share on other sites