初心者です。
NVIDIAのJetson nanoを使用して、カメラを動かし、デスクトップ上に取得した画像を表示させたいのですが上手く表示できません。
python3
1GST_STR = 'nvarguscamerasrc \ 2 ! video/x-raw(memory:NVMM), width=3280, height=2464, format=(string)NV12, framerate=(fraction)30/1 \ 3 ! nvvidconv ! video/x-raw, width=(int)1920, height=(int)1080, format=(string)BGRx \ 4 ! videoconvert \ 5 ! appsink' 6WINDOW_NAME = 'Camera Test' 7 8def main(): 9 cap = cv2.VideoCapture(GST_STR, cv2.CAP_GSTREAMER) 10 11 while True: 12 ret, img = cap.read() 13 if ret != True: 14 break 15 16 cv2.imshow(WINDOW_NAME, img) 17 18 key = cv2.waitKey(10) 19 if key == 27: # ESC 20 break 21 22if __name__ == "__main__": 23 main()
を実行したところ下記のエラー文が出てきました。
python3 nano_cam.py GST_ARGUS: Creating output stream CONSUMER: Waiting until producer is connected... GST_ARGUS: Available Sensor modes : GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000; GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000; GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000; GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000; GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000; Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:243 Stream failed to connect. Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:177 (propagating) Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:654 Frame Rate specified is greater than supported (Argus) Error InvalidState: (propagating from src/eglstream/FrameConsumerImpl.cpp, function streamEventThread(), line 135) (Argus) Error InvalidState: (propagating from src/eglstream/FrameConsumerImpl.cpp, function streamEventThreadStatic(), line 177) [ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (933) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1 Segmentation fault (core dumped)
どこの部分をどうなおしたらいいのかわからなかったので質問させていただきました。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。