Skip to content

Laex/Delphi-OpenCV-Class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Delphi binding for OpenCV

Repo Size GitHub Contributors Issues GitHub pull requests commit activity LICENSE

  • Experimental Delphi binding for OpenCV 4.10.0
  • Development environment - Delphi 10.4, 11, 12
  • x64 platform only
Contributors:

What is completed (approximately)


Usage:


  1. Download the current state of the project in zip format or via git
  2. Download OpenCV 4.10.0, run and unpack to the selected directory (for example in <opencv>).

The following DLLs are required to work properly

  • from <opencv>\build\x64\vc16\bin\ or from <delphi-opencv>\redist\opencv_delphi4100.zip

    • opencv_videoio_ffmpeg4100_64.dll - release/debug
    • opencv_videoio_msmf4100_64.dll - release
    • opencv_videoio_msmf4100_64d.dll - debug
    • opencv_world4100.dll - release
    • opencv_world4100d.dll - debug
  • from redist\opencv_delphi4100.zip**

    • opencv_delphi4100.dll - release
    • opencv_delphi4100d.dll - debug

For the library to work properly, you need

  • place next to the executable file of your program (examples of usage from <delphi-opencv>\samples are compiled into <delphi-opencv>\bin)
    or
  • to use in any projects for the x64 platform, you need to copy the dll files to C:\Windows\System32\.

Warning

You may not have the Microsoft runtime libraries installed on your computer, which are required for OpenCV to work. Take advantage of the advice (source):

"The lack of these DLLs can be fixed by installing "Microsoft Visual C++ 2015 - 2022 Redistributable". Probably the application that is showing this error depends on it installed. Download and install both the x86 and x64 versions"

Important

You can check the availability of the required libraries (dll) for running projects using the CheckCVDep.exe utility (<delphi-opencv>\cvCheckDep)

  1. Set Delphi environment setting

Add the Library path for the modules of the project in Delphi IDE:
Tools-Options -> Language-Delphi-Library-"Windows 64-bit"-Library path add path <delphi-opencv>\source\ and <delphi-opencv>\packages

To run demo examples


  1. Change the path in the OpenCVRootPath variable in the <delphi-opencv>\source\CVResource.pas module to the path to the unpacked OpenCV 4.10.0 library. This is only needed to run examples from samples.
  2. Open <delphi-opencv>\samples\Samples.groupproj

To install components


  1. For components, install the packages from <delphi-opencv>\packages\<Delphi Version>\CVClassGroup.groupproj
  2. Run demo from <delphi-opencv>\samples\Samples.groupproj

Questions / Ideas / Help


Go to the discussions tab to ask and find this kind of things.

Contributing


Feel free to contribute

You can create an issue to report a bug, suggest an improvement for this plugin, ask a question, etc.

You can make a pull request to contribute to this plugin development.


Support

If you want to support me and my work, you can: