tomasz-lewicki / ai-thermometer

Fever screening with IR & RGB cameras and Deep CNNs
148 stars 39 forks source link

Waiting for RGB frames #34

Closed rtime2awaken closed 3 years ago

rtime2awaken commented 3 years ago

I'm getting a message Waiting for RGB frames any idea what I am missing?

Estimated / selected altsetting bandwith : 18 / 642. INFO: Using $DISPLAY from environment, not from config Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/home/nano-termo/ai-thermometer/rgb/rgb_thread.py", line 38, in run frame_small = cv2.resize(self._frame, (400, 300)) cv2.error: OpenCV(4.4.0) /tmp/build_opencv/opencv/modules/imgproc/src/resize.cpp:3929: error: (-215:Assertion failed) !ssize.empty() in function 'resize'

tomasz-lewicki commented 3 years ago

Hi @rtime2awaken !

This looks like the RGB frame didn't get grabbed correctly. Could you confirm that you're able to see camera output by doing either:

gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! 'video/x-raw(memory:NVMM),width=3264, height=2464, framerate=21/1, format=NV12' ! nvvidconv flip-method=2 ! 'video/x-raw,width=960, height=720' ! nvvidconv ! nvegltransform ! nveglglessink -e

or

gst-launch-1.0 nvarguscamerasrc sensor_id=1 ! 'video/x-raw(memory:NVMM),width=3264, height=2464, framerate=21/1, format=NV12' ! nvvidconv flip-method=2 ! 'video/x-raw,width=960, height=720' ! nvvidconv ! nvegltransform ! nveglglessink -e

Let me know if you can see anything on the screen.

rtime2awaken commented 3 years ago

Hi @rtime2awaken !

This looks like the RGB frame didn't get grabbed correctly. Could you confirm that you're able to see camera output by doing either:

gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! 'video/x-raw(memory:NVMM),width=3264, height=2464, framerate=21/1, format=NV12' ! nvvidconv flip-method=2 ! 'video/x-raw,width=960, height=720' ! nvvidconv ! nvegltransform ! nveglglessink -e

or

gst-launch-1.0 nvarguscamerasrc sensor_id=1 ! 'video/x-raw(memory:NVMM),width=3264, height=2464, framerate=21/1, format=NV12' ! nvvidconv flip-method=2 ! 'video/x-raw,width=960, height=720' ! nvvidconv ! nvegltransform ! nveglglessink -e

Let me know if you can see anything on the screen.

It has been fixed! I was using the v1 Pi camera that was causing the problem. Thank you for getting back with me. This is a great project.