Hi,
I have a code running on Raspberry Pi device. I want to run this code NVIDIA-Jetson. The camera method I use;
def gstreamer_pipeline(
capture_width=1280,
capture_height=720,
display_width=320,
display_height=240,
framerate=32,
flip_method=0,
):
return (
"nvarguscamerasrc ! "
"video/x-raw(memory:NVMM), "
"width=(int)%d, height=(int)%d, "
"format=(string)NV12, framerate=(fraction)%d/1 ! "
"nvvidconv flip-method=%d ! "
"video/x-raw, width=(int)%d, height=(int)%d, format=(string)BGRx ! "
"videoconvert ! "
"video/x-raw, format=(string)BGR ! appsink"
% (
capture_width,
capture_height,
framerate,
flip_method,
display_width,
display_height,
)
)
cap = cv2.VideoCapture(gstreamer_pipeline(flip_method=0), cv2.CAP_GSTREAMER)
But on the this line for frame in cap.capture_continuous
I am getting the error i mentioned in the title. What can i use instead of this code in NVIDIA Jetson?
Working on raspberry pi code;
camera = PiCamera() camera.resolution = (320,240) camera.framerate = 32 rawCapture = PiRGBArray(camera,size=(320,240)) ... for frame in camera.capture_continuous(rawCapture,format="bgr",use_video_port=True): frame = frame.array frame_img = np.copy(frame) ...