Programming => General => Topic started by: luis.j.gutierrez@inn2.cl on August 30, 2017, 05:51:12 pm
Title: RaspBerry PI3 - Jessie - OpenCV 3 demo
Post by: luis.j.gutierrez@inn2.cl on August 30, 2017, 05:51:12 pm
Lazarus 1.7, FPC 3, OpenCV 3 I took a demo from the network that uses OpenCV to process images. But after fix some problems and pass the compilation, the linker send me this errors:
Title: Re: RaspBerry PI3 - Jessie - OpenCV 3 demo
Post by: avra on August 31, 2017, 09:33:19 am
Maybe this might bring more light to the topic: http://forum.lazarus.freepascal.org/index.php/topic,31851.msg204649.html#msg204649
In case of likely further problems with OpenCV3 you can switch to OpenCV2.
Title: Re: RaspBerry PI3 - Jessie - OpenCV 3 demo
Post by: Thaddy on August 31, 2017, 11:49:05 am
Debian Jessie has correct versions. Raspbian has too.... There should not be any problems on a Raspbian Jessie install but you have to install at least the -dev package manually. (I use it myself). Note un-installing wolfram-engine and purge it can cause this problem. If that's the case just re-install opencv as per my suggestion.
Title: Re: RaspBerry PI3 - Jessie - OpenCV 3 demo
Post by: kiyo on November 21, 2017, 05:51:38 pm
I wrote opencv demo program for Raspbian STRETCH. Program version are follows: FPC :3.0.0 Lazarus :1.6.2 OpenCV :3.1.1 Raspbian :September 2017 STRETCH
You have to build and install OpenCV 3.1.1 from source file. https://sourceforge.net/projects/opencvlibrary/files/opencv-unix/
Please read attached readme.txt file for the other informations. - unit1.lfm demo program - unit1.pas demo program - raspiopencv.pas opencv interface - raspiopencv.jpg demo picture - readme.txt explanation file Regards,
Title: Re: RaspBerry PI3 - Jessie - OpenCV 3 demo
Post by: dimonsky on July 01, 2018, 02:32:24 am
I took the source code from this example and try to run it on RaspberryPI3B, Jessie. Compiles fine, but by running I got a problem:
The line with cvLoad(Pchar(xmlpath)) triggers an error "Project project1 raises exception class 'External SIGABIT' in file '../sysdeps/unix/sysv/linux/raise.c' at line 51"
WHy could this happen and how to fix this?
UPD: fixed by replacing a path to /home/pi/Downloads/opencv-master/data/haarcascades_cuda/haarcascade_frontalface_default.xml'; (I have no idea what is the difference between those two files). Now everything is fine, thank you!
Title: Re: RaspBerry PI3 - Jessie - OpenCV 3 demo
Post by: kiyo on July 02, 2018, 10:59:43 pm
The error occurs because the file structure of opencv3.4.1.zip was changed. Please change a appropriate pathname which haarcascades file is located.
Title: Re: RaspBerry PI3 - Jessie - OpenCV 3 demo
Post by: Bernt on March 16, 2019, 12:30:55 pm
I have exactly the same issue on "CameraCapture" button ... The problem seams to be here :
My configuration : RPIB3, Stretch, Lazarus 1.6.2, OpenCV 3.4.1, correct path to xml files...
Title: Re: RaspBerry PI3 - Jessie - OpenCV 3 demo
Post by: kiyo on March 17, 2019, 08:25:24 am
Please give me some more information. What is your camera? USB webcam? Or RaspberryPi CSI camera? Did you confirm that the camera works with the other application software?
Title: Re: RaspBerry PI3 - Jessie - OpenCV 3 demo
Post by: Bernt on March 26, 2019, 07:28:10 pm
Hi, I confirm that i use the Raspi camera v2 on CSI port. The camera work with other app software. Thanks for reply
Regards
Title: Re: RaspBerry PI3 - Jessie - OpenCV 3 demo
Post by: kiyo on March 29, 2019, 02:50:37 pm
In case of RaspberryPi camera , you need to add V4L2 driver.
Title: Re: RaspBerry PI3 - Jessie - OpenCV 3 demo
Post by: PeterBalch on June 12, 2019, 06:24:28 pm
Thanks. Unfortunately, that didn't fix the errors.
The command line you suggested didn't work. The "sudo su" part made me into a super-user but the subsequent commands didn't execute. So I did them individually:
I presume that's right. I also tried it as a super-user. I don't understand why that's different from what I did before but I'm new to all this Linux magic incantation stuff.
I'd have expected the apt-get to install files called cv.o and highgui.o - isn't that what the linker is wanting? But searching the filing system found several copies of cv.h, cv.hpp, highgui.h and highgui.hpp. No .o files.
What could I try next?
Thank you for your help.
Peter
(Sorry for the slow reply. I'd expected the forum to email me when there was a post waiting for me. Perhaps I have my preferences set up wrongly.)
Title: Re: RaspBerry PI3 - Jessie - OpenCV 3 demo
Post by: Thaddy on June 12, 2019, 08:26:40 pm
I have no clue, because that works here... (written from a Raspberry Pi 3 O:-) ) We have to do this probably step by step. I have a lot of Pi's and this should work... :'( :(
Title: Re: RaspBerry PI3 - Jessie - OpenCV 3 demo
Post by: PeterBalch on June 14, 2019, 12:07:05 am
Linux assures me that I already have the latest versions of all the dev packages I try to install.
I presume that the install should have given me copies of highgui.so cv.so or perhaps it's libhighgui.so libcv.so
Looking at the code in OpenCV.pas (line 125 approx), prehaps it should be libhighgui.so.2.1 libcv.so.2.1
I don't have any of those files on my drive. Can I download them from somewhere?
I do have a copy of libopencv_highgui.so
Is this a problem of clashing version numbers?
Thank you.
Peter
(I have Raspberry Pi 3B+, Lazarus 2.0.0, OpenCV 3.4.0, Raspbian 9.9, Pi Camera)
Title: Re: RaspBerry PI3 - Jessie - OpenCV 3 demo
Post by: PeterBalch on June 17, 2019, 01:08:13 pm
I finally worked out the answer. It was indeed to do with clashing versions. I'd had trouble finding an OpenCV.pas wrapper that worked with Pi rather than Windows or Mac.