hello,
here is a starting point to use opencv with Lazarus.
Not sure that works with all the functions of Opencv, but works with the lkdemo ( video motion tracking)
OpenCV.pas needs to be checked because it is a version for 2.1 version of Opencv and i use it with version 3.0 of Opencv ( I have done some changes for that works).
OpenCV.pas needs some changes to work with Linux.
Lkdemo Lazarus project :
In attachment lkdemo project for Lazarus
Download opencv 3.0 for windows from here (http://opencv.org/downloads.html)
Extract the dlls \opencv-3.0.0.exe\opencv\build\x86\vc12\bin\*.dll (choose the right folder for your O.S ex : x86 -> 32 bits , vc12 -> visual c++ dlls version 12) from opencv-3.0.0.exe with 7z in your project folder.
you must change this line in unit1.pas -> choose a video file or capture from CAM
// capture := cvCaptureFromCAM(0); capture := cvCaptureFromFile(PChar('f:\temp\videos\test.mp4'));
tested with Lazarus 1.6 Windows 32 bits and Opencv 3.0.
Thanks to Giandomenico (http://gidesa.altervista.org/camshiftdemo.php)
Enjoy !
but Lazarus reads wrong number of rows (just toooo big value). Cols number is OK:
var img:PCvMat; ... img:=cv_imread(pchar('/home/pi/MyPrograms/cxx/Where.png'),CV_LOAD_IMAGE_UNCHANGED);
what is the reason??
I run code on Raspbery pi with the attached interface header.