Recent

Author Topic: How to use Opencv with Lazarus Free Pascal  (Read 3376 times)

dyfroedd

  • Newbie
  • Posts: 2
How to use Opencv with Lazarus Free Pascal
« on: November 20, 2020, 10:54:11 am »
HI - Lazarus Free Pascal is an amazing tool that I recently discovered where I can do almost everything except for using OpenCV for image processing.

Can anyone tell me how I can use the OpenCV library with FreePascal + LAzarus on a Mac - this is a questions that I ahve not ahd any answers to yet.

Alternatively, I could write my own image processing subroutines for doing these after accessing the webcam video stream but it would save a lot of time using OpenCV.

Regards

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: How to use Opencv with Lazarus Free Pascal
« Reply #1 on: November 20, 2020, 11:47:38 am »
opencv is C++ so you need to flatten it to C to be callable.

This has been partially done with a windows DLL for Delphi, but afaik some lazarusers also use it, e.g.

https://github.com/Laex/Delphi-OpenCV

So you would have to do something similar on Mac.

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: How to use Opencv with Lazarus Free Pascal
« Reply #2 on: November 20, 2020, 04:48:23 pm »
I've ported many of https://github.com/Laex/Delphi-OpenCV to Lazarus in: https://github.com/t-edson/LazarusOpenCV.

I tested it in only for Windows and Linux. I don't know about Mac. Maybe it can help you.
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

af0815

  • Hero Member
  • *****
  • Posts: 1289
Re: How to use Opencv with Lazarus Free Pascal
« Reply #3 on: May 05, 2021, 04:15:21 pm »
I know this thread is a litte older :-)

Are there any updates about OpenCV for Lazarus ?

the link  http://blog.pucp.edu.pe/blog/tito/2018/07/28/opencv-con-lazarus-instalacion-en-linux/ on t-edson github is not working anymore - maybe shifted.

regards
Andreas

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: How to use Opencv with Lazarus Free Pascal
« Reply #4 on: May 05, 2021, 05:35:27 pm »
the link  http://blog.pucp.edu.pe/blog/tito/2018/07/28/opencv-con-lazarus-instalacion-en-linux/ on t-edson github is not working anymore - maybe shifted.

My blog has changed. That article is now in: http://blogdetito.com/2018/07/28/opencv-con-lazarus-instalacion-en-linux/

I'm not working in OpenCV by now. People only pay me for Web development. nowadays.  :(
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

 

TinyPortal © 2005-2018