Jump to content

ManyanJin10

Members
  • Content Count

    4
  • Joined

  • Last visited

Posts posted by ManyanJin10


  1. 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

     

×
×
  • Create New...