Hello,
I have the following error when using the examples from the SDK binaries and the i.mx8MQ EVK:
root@imx8mqevk:/usr/share/OpenCV/samples/bin# ./example_dnn_object_detection -width=1024 -height=1024 -scale=0.00392 -input=dog416.png -rgb -zoo=models.yml yolo
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.0.1) /usr/src/debug/opencv/4.0.1.imx-r0/git/modules/highgui/src/window.cpp:610: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvNamedWindow'
Aborted
I flashed the full image "imx-image-full-imx8mqevk.sdcard".
It's a build error, I believe the sample was built without windowing system support. Am I right?
See:
https://source.codeaurora.org/external/imx/opencv-imx/tree/modules/highgui/src/window.cpp?h=4.0.1_im... @line 610 we are really falling in the “#else // No windowing system present at compile time ;-(
How shall I fix it?
Thanks, best regards
Massimo
Hi massimomartelli,
It's a build error, I believe the sample was built without windowing system support. Am I right?
I guess that's indeed the issue. Can I suggest you to rebuild your image with OpenCV Qt support?
Add to local.conf:
PACKAGECONFIG_append_pn-opencv_mx8 = " dnn python2 qt5 jasper openmp test neon"
Let me know how this works.
Vanessa
I have a similar issue when running the demo on i.MX8M Mini EVK with L4.19.35_1.1.0.
Below is the error message when I run "Image classification" demo.
"root@imx8mmevk:/usr/share/OpenCV/samples/bin# ./example_dnn_classification --input=dog416.png --zoo=models.yml squeezenet
terminate called after throwing a[ 125.249087] audit: type=1701 audit(1584460803.812:3): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=4031 comm="example_dnn_cla" exe="/usr/share/OpenCV/samples/bin/example_dnn_classification" sig=6 res=1
n instance of 'cv::Exception'
what(): OpenCV(4.0.1) /usr/src/debug/opencv/4.0.1.imx-r0/git/modules/highgui/src/window.cpp:610: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvNamedWindow'
Aborted
root@imx8mmevk:/usr/share/OpenCV/samples/bin#
"
I did modify local.conf
PACKAGECONFIG_append_pn-opencv_mx8 = " dnn python3 qt5 jasper test"
Do I miss anything?
Hi Meng,
Could you please share the complete local.conf file?
Thanks,
Vanessa
Hi Meng,
Could you please replace the opencv append line with this one and rebuild your image?
PACKAGECONFIG_append_pn-opencv_mx8 = " gtk jasper test"
To clean the opencv package and rebuild the image:
bitbake -c cleanall opencv
bitbake imx-image-full
It seems like Qt5 windowing system was not enabled correctly so let's try GTK.
Let me know how it goes.
Thanks,
Vanessa
Hi Meng,
Great to hear that GTK works. Thanks for letting me know.
I will do it in the next couple of days.
Can you please confirm if this is the expected behavior with the NXP prebuilt binaries?
I used imx-image-full-imx8mqevk.sdcard from "L4.19.35_1.1.0_images_MX8MQEVK.zip".
Thanks, best regards
Massimo
This is not expected in prebuilt binaries however Qt5 support might be missing in OpenCV in our image. I'll try to check that on my side as well.