Linux miniPC haar cascade freeze !

asked 2016-12-17 04:03:13 -0500

updated 2016-12-17 05:02:17 -0500

LBerger gravatar image

Hi all ! I have two mini PC: (1)Orange PI PC with arm cortex a7 and (2)Orange PI PC 2 with ARM64 cortex a53 I try to instal some version of linux (debian,armbian , ubuntu) at both devices, and install OpenCV two ways- install from compilied OPenCv from Repo and Build OPencv with Cmake .. and OPencv work fine - capture and show webcam, work all function and classes But then i try to detect Face with Haar cascades, device freeze wildly!!!!! 1 - FPS no more and LBP cascades - 3 FPS, but its soo slow!!! I do not understand what I'm doing wrong.. My Orange PI device faster than Rasberry 3, on which haar cascades work fine..

help me please !

General configuration for OpenCV =====================================
  Version control:               unknown

    Host:                        Linux 3.16.0-4-arm64 aarch64
    CMake:                       3.0.2
    CMake generator:             Unix Makefiles
    CMake build tool:            /usr/bin/make
    Configuration:               Release

    Linker flags (Release):      -Wl,-z,relro -Wl,-z,now -Wl,-z,relro -Wl,-z,now
    Linker flags (Debug):        -Wl,-z,relro -Wl,-z,now
    Precompiled headers:         YES

  OpenCV modules:
    To be built:                 core flann imgproc highgui features2d calib3d ml objdetect video contrib legacy photo gpu java ocl python stitching superres ts videostab
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 androidcamera dynamicuda viz

    QT:                          NO
    GTK+ 2.x:                    YES (ver 2.24.25)
    GThread :                    YES (ver 2.42.1)
    GtkGlExt:                    YES (ver 1.2.0)
    OpenGL support:              YES (/usr/lib/aarch64-linux-gnu/ /usr/lib/aarch64-linux-gnu/ /usr/lib/aarch64-linux-gnu/ /usr/lib/aarch64-linux-gnu/ /usr/lib/aarch64-linux-gnu/ /usr/lib/aarch64-linux-gnu/
    VTK support:                 NO

  Media I/O: 
    ZLib:                        /usr/lib/aarch64-linux-gnu/ (ver 1.2.8)
    JPEG:                        /usr/lib/aarch64-linux-gnu/ (ver )
    PNG:                         /usr/lib/aarch64-linux-gnu/ (ver 1.2.50)
    TIFF:                        /usr/lib/aarch64-linux-gnu/ (ver 42 - 4.0.3)
    JPEG 2000:                   /usr/lib/aarch64-linux-gnu/ (ver 1.900.1)
    OpenEXR:                     /usr/lib/aarch64-linux-gnu/ /usr/lib/aarch64-linux-gnu/ /usr/lib/aarch64-linux-gnu/ /usr/lib/aarch64-linux-gnu/ /usr/lib/aarch64-linux-gnu/ (ver 1.6.1)

  Video I/O:
    DC1394 1.x:                  NO
    DC1394 2.x:                  YES (ver 2.2.3)
    FFMPEG:                      YES
      codec:                     YES (ver 56.1.0)
      format:                    YES (ver 56.1.0)
      util:                      YES (ver 54.3.0)
      swscale:                   YES (ver 3.0.0)
      gentoo-style:              YES
    GStreamer:                   NO
    OpenNI:                      NO
    OpenNI PrimeSensor Modules:  NO
    PvAPI:                       NO
    GigEVisionSDK:               NO
    UniCap:                      NO
    UniCap ucil:                 NO
    V4L/V4L2:                    Using libv4l (ver 1.6.0)
    XIMEA:                       NO
    Xine:                        NO

  Other third-party libraries:
    Use IPP:                     NO
    Use Eigen:                   YES (ver 3.2.2)
    Use TBB:                     NO
    Use OpenMP:                  NO
    Use GCD                      NO
    Use Concurrency              NO
    Use C=:                      NO
    Use Cuda:                    NO
    Use OpenCL:                  YES

    Version:                     dynamic
    Use AMD FFT:                 NO
    Use AMD BLAS:                NO

    Interpreter:                 /usr/bin/python2 (ver 2.7.9)
    Libraries:                   /usr/lib/aarch64-linux-gnu/ (ver 2.7.9)
    numpy:                       /usr/lib/python2.7/dist-packages/numpy ...
edit retag flag offensive close merge delete


I have never work on these system. But you can write a liitle program on both platform and call function getBuildInformation and compare results

LBerger gravatar imageLBerger ( 2016-12-17 04:19:44 -0500 )edit

I cant paste long info

stanislav_labs gravatar imagestanislav_labs ( 2016-12-17 04:46:55 -0500 )edit

insert your result in your question (use edit icon)

LBerger gravatar imageLBerger ( 2016-12-17 04:54:38 -0500 )edit

Thank. paste in question

stanislav_labs gravatar imagestanislav_labs ( 2016-12-17 04:59:51 -0500 )edit

You post only one config. Is it exactly same for both platform? Have you got realtime display on both platform using opencv ? Is ambiant light are equal? ( that's only idea..)

LBerger gravatar imageLBerger ( 2016-12-17 05:05:37 -0500 )edit

On my PC (intell CoreI5) - haar cadcades partial loads all cores (4). But on ARMr4 - haar loads only 1 core fully.. May be , something wrong with TBB ?

stanislav_labs gravatar imagestanislav_labs ( 2016-12-17 05:06:44 -0500 )edit

Yes. I have connected HDMI display and can see , what work my Opencv script on Python..

stanislav_labs gravatar imagestanislav_labs ( 2016-12-17 05:10:02 -0500 )edit

In post all thread libs are disable:

Use TBB:                     NO
Use OpenMP:                  NO
Use GCD                      NO
Use Concurrency              NO
LBerger gravatar imageLBerger ( 2016-12-17 05:11:10 -0500 )edit

ok. I try to enable thread libs and post result later

stanislav_labs gravatar imagestanislav_labs ( 2016-12-17 05:14:47 -0500 )edit

take a look at this post. maybe it is related to a bug. try to disable OpenCL.

sturkmen gravatar imagesturkmen ( 2016-12-17 06:01:08 -0500 )edit