opencv 4 for tracker (ubuntu)

50 views
Skip to first unread message

Alexey Sokirko

unread,
Apr 4, 2021, 9:28:46 AM4/4/21
to psmove
Hi, thank you for this software. I have recently bought Sony eye tracker and Sony move  controller. Now I try to make it work under Ubuntu 20. I compiled this software without MOVE_BUILD_TRACKER, and it works. So the controller is paired and there is a reaction to buttons. Now I want to connect to the camera.  As far as I understand I need opencv. I compiled opencv from sources, but the problem is that the version of opencv is 4.x, not 3.x,    I see that psmove CMakelists.txt demands version 3:     FIND_PACKAGE(OpenCV 3 QUIET),

and it would not compile with 4.x  . May be somebody knows how to compile it  with opencv 4? Or I must somehow downgrade my opencv installation?


Scanning dependencies of target psmoveapi_tracker
[ 21%] Building CXX object CMakeFiles/psmoveapi_tracker.dir/src/tracker/camera_control.cpp.o
/home/sokirko/vanya/python/sony_test/psmoveapi/src/tracker/camera_control.cpp: In function ‘void camera_control_read_calibration(CameraControl*, char*, char*)’:
/home/sokirko/vanya/python/sony_test/psmoveapi/src/tracker/camera_control.cpp:149:33: error: ‘cvLoad’ was not declared in this scope; did you mean ‘cvLog’?
  149 |     CvMat *intrinsic = (CvMat*) cvLoad(intrinsicsFile, 0, 0, 0);
      |                                 ^~~~~~
      |                                 cvLog
/home/sokirko/vanya/python/sony_test/psmoveapi/src/tracker/camera_control.cpp:168:9: error: ‘cvInitUndistortMap’ was not declared in this scope
  168 |         cvInitUndistortMap(intrinsic, distortion, cc->mapx, cc->mapy);
      |         ^~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/psmoveapi_tracker.dir/build.make:63: CMakeFiles/psmoveapi_tracker.dir/src/tracker/camera_control.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:319: CMakeFiles/psmoveapi_tracker.dir/all] Error 


Alexander Nitsch

unread,
Apr 6, 2021, 5:44:26 PM4/6/21
to psm...@googlegroups.com
> May be somebody knows how to compile
> it with opencv 4? Or I must somehow downgrade my opencv installation?

If you want/need to use OpenCV 4, you could try fixing the issues.
OpenCV has a habit of shuffling stuff around between major releases, so
maybe it is just a matter of locating the correct header files for the
missing functions.

On the other hand, psmoveapi's tracker uses OpenCV's C interface which
was deprecated in OpenCV 3 already. It is not actively maintained
anymore in later versions. So there is no guarantee these things still
work in OpenCV 4 at all.

If you don't really care about the actual version of OpenCV, simply
switch the branch in the OpenCV Git repository you cloned for building
from source. Branch 3.4 should work just fine.
Reply all
Reply to author
Forward
0 new messages