Recent

Author Topic: How to use Opencv with Lazarus Free Pascal  (Read 275 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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8901
  • 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: 1114
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.0.10 - FPC 3.2.0 - x86_64-win64 on Windows 8

 

TinyPortal © 2005-2018