imx8: resize.cpp:3784: error: (-215:Assertion failed) !ssize.empty() in function 'resize'

asked 2020-05-28 12:07:47 -0500

updated 2020-05-28 12:41:00 -0500

berak gravatar image

I am building eIQ example OpenCV object detection CPP codebase on imx8mqevk. Facing below error:

(ObjectRecognitionCPP:4394): GStreamer-CRITICAL : 09:55:24.973: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed
Video fps: 1.00777
terminate called after throwing a[  369.881174] audit: type=1701 audit(1583488526.012:5): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=System pid=4394 comm="ObjectRecogniti" exe="/home/test/eiq_sample_apps/examples-opencv/obj_recognition_cpp/src/ObjectRecognitionCPP" sig=6 res=1
n instance of 'cv::Exception'
  what():  OpenCV(4.0.1) /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/opencv/4.0.1.imx+gitAUTOINC+c3d56b9aea_2522124473_32e315a5b1_34e4206aef_fccf7cd6a4_d29d003e00-r0/git/modules/imgproc/src/resize.cpp:3784: error: (-215:Assertion failed) !ssize.empty() in function 'resize'
Aborted (co**re dumped)

looks like some dimension issue. what could be the reason for this issue?

edit retag flag offensive close merge delete



Hmmm maybe something is empty. If you would by cynical i would say its someones brain but most likely its the image you are trying to resize. Opencv will not throw an exception if an image can not be loaded but you get an empty mat back. Just check the image path and also add some error handling code.

holger gravatar imageholger ( 2020-05-28 13:48:06 -0500 )edit

I forget to mention I am trying with live camera. Using NXP MINISASTOCSI camera on imx8mqevk.

vipul kumar gravatar imagevipul kumar ( 2020-05-28 23:41:20 -0500 )edit

we cannot help without seing your code

berak gravatar imageberak ( 2020-05-29 02:01:44 -0500 )edit

The NXP MINISASTOCSI camera is not usb.

supra56 gravatar imagesupra56 ( 2020-05-29 03:50:28 -0500 )edit