OPENCV Error in I.MX8MMini

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OPENCV Error in I.MX8MMini

1,853 Views
santhosh2
Contributor IV

I am getting the below error when i try to run a simple opencv code


terminate called after throwing a[24778.491458] audit: type=1701 audit(1579182772.146:15): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=4288 comm="motiondetection" exe="/home/root/motiondetection" sig=6 res=1
n instance of 'cv::Exception'
  what():  OpenCV(3.4.2) /usr/src/debug/opencv/3.4.2+gitAUTOINC+9e1b1e5389_d4e0286945_a62e20676a_34e4206aef_fccf7cd6a4-r0/git/modules/highgui/src/window.cpp:615: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon 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'

I have added below package in local.conf

#opencv - for image processing
CORE_IMAGE_EXTRA_INSTALL += "opencv opencv-samples libopencv-core libopencv-imgproc"
CORE_IMAGE_EXTRA_INSTALL += "libopencv-core-dev libopencv-highgui-dev libopencv-imgproc-dev libopencv-objdetect-dev libopencv-ml-dev"

How to resolve it, I have attached the local.conf let me know if i had missed any package

0 Kudos
6 Replies

1,624 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Santhosh,

Apparently you have to add libgtk2-0-dev to the CORE_IMAGE_INSTALL

Regards

0 Kudos

1,624 Views
santhosh2
Contributor IV

Hi,

The basic Opencv code gets compiled successfully but when i run it i am getting below error

terminate called after throwing a[   96.614857] audit: type=1701 audit(1579245461.465:4): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=3760 comm="motiondetection" exe="/home/root/motiondetection" sig=6 res=1
n instance of 'cv::Exception'
  what():  OpenCV(3.4.2) /usr/src/debug/opencv/3.4.2+gitAUTOINC+9e1b1e5389_d4e0286945_a62e20676a_34e4206aef_fccf7cd6a4-r0/git/modules/highgui/src/window.cpp:615: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon 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 (core dumped)o

Let me know how to resolve

0 Kudos

1,624 Views
fjpmbb
Contributor II

Hi Santhosh

    I encounter this issue too.  Did you solve this already.

    I would appreciate it if you share it to me.

    Thanks.

0 Kudos

1,624 Views
santhosh2
Contributor IV

As per NXP, OpenCV library doesnt support on IMX8MMini

ref the below link

https://www.nxp.com/docs/en/application-note/AN12296.pdf 

OPencv.png

1,624 Views
santhosh2
Contributor IV

Hi,

No errors for Yocto compilation Without  line below line in local.conf file

CORE_IMAGE_EXTRA_INSTALL += "libgtk2-0-dev "

yocto.png

0 Kudos

1,624 Views
santhosh2
Contributor IV

Hi,

I have tried already adding to CORE_IMAGE and compiling, I am getting below error message.

OPenCv_yocto_local_config.png

Yocto Compilation Error

libgtk_bitbake_error.png

It Says no un build-able dependency

Let me know any other issue it might have

Regards

0 Kudos