Tiny Core Extensions > TCE Talk

Using Tiny Core on the RoBoard, openCV not working

(1/2) > >>

jwoodman:
Hello,

I'm running Tiny Core on my RoBoard RB-100. Everything works exceptionally well, but I would really like to use the openCV library. I installed it from the app manager, compiled some programs with it, and they all return "illegal instruction" and exit when I run them. I believe that the issue lies in my processor not supporting SSE/SSE2 and the openCV library must have been compiled without disabling SSE.
Is there any simple way of recompiling openCV for TC without SSE/SSE2?

Thank you,
Justin Woodman

roboard:
Since RoBoard's CPU doesn't support MMX, SSE, and SSE2 instructions, you need to disable the option in OpenCV's source code. To do this, find the following code segment in cxtypes.h of OpenCV 1.1pre1 or 2.0:


--- Code: --- #if ((defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64) && \
      (_MSC_VER >= 1400 || defined CV_ICC)) \
      || (defined __SSE2__ && defined __GNUC__ && __GNUC__ >= 4)
    #include <emmintrin.h>
    #define CV_SSE2 1
  #else
    #define CV_SSE2 0
  #endif

--- End code ---


change to


--- Code: ---#if ((defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64) && \
      (_MSC_VER >= 1400 || defined CV_ICC)) \
      || (defined __SSE2__ && defined __GNUC__ && __GNUC__ >= 4)
    //#include <emmintrin.h>
    #define CV_SSE2 0
  #else
    #define CV_SSE2 0
  #endif

  #undef __MMX__
  #undef __SSE__
--- End code ---

jwoodman:
Thank you for the help,

I will try this when I get home. Does this only work on 1.1pre1 and 2.0? The cxtypes.h file doesn't even seem to exist in version 2.1 or 2.2. Additionally there do not appear to be any SSE parameters shown in ccmake.

Arslan S.:
i will rebuild soon opencv disabling some flags like sse sse2 sse3 ssse3

btw you don't need to patch the source you can use cmake flags to disable them

--- Code: ---cmake -DCMAKE_BUILD_TYPE=Release \
     -DENABLE_SSE=OFF \
     -DENABLE_SSE2=OFF \
     -DENABLE_SSE3=OFF \
     -DENABLE_SSSE3=OFF .
--- End code ---

jwoodman:
Thank you,
I will attempt to build openCV 2.0 with those flags disabled when/if I have a few minutes tonight. Unfortunately, this might take hours because the only linux system I have is actually my roboard.

Navigation

[0] Message Index

[#] Next page

Go to full version