Skip to content
Projets

Laex/Delphi-OpenCV

Voir sur GitHub

À propos

Projet Delphi-OpenCV. Traduction des fichiers d’en-tête de la bibliothèque OpenCV en Delphi

Design et médias

Comment ces chiffres sont mesurés

What you can do

  • Direct OpenCV Bindings: Direct access to OpenCV C/C++ APIs (v2.4.13) from Delphi code.
  • FFMPEG Integration: IP camera / RTSP streaming via Delphi-FFMPEG (rtpFFMPEG, TocvFFMpegIPCamSource) on Win32 and Win64.
  • Cross-Framework UI: Components and views ready for both VCL and FireMonkey (FMX) platforms.
  • Rich Samples Collection: Ready-to-run examples demonstrating object tracking, camera captures, face detection (Haar cascades), motion detection, and OpenGL overlays.

Progression mesurée des étoiles

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

Delphi-OpenCV

Delphi Support OpenCV Version FPC Support License

A comprehensive port of the OpenCV (Open Source Computer Vision Library) v2.4.13 to Delphi and FreePascal (FPC). This library enables object pascal developers to leverage computer vision algorithms, image/video processing tools, and FFMPEG integration directly in their applications.


🌟 Key Features

  • Direct OpenCV Bindings: Direct access to OpenCV C/C++ APIs (v2.4.13) from Delphi code.
  • FFMPEG Integration: IP camera / RTSP streaming via Delphi-FFMPEG (rtpFFMPEG, TocvFFMpegIPCamSource) on Win32 and Win64.
  • Cross-Framework UI: Components and views ready for both VCL and FireMonkey (FMX) platforms.
  • Rich Samples Collection: Ready-to-run examples demonstrating object tracking, camera captures, face detection (Haar cascades), motion detection, and OpenGL overlays.

📋 Prerequisites & Requirements

Dependency Version Description Download
OpenCV DLLs 2.4.13.6 opencv_*2413.dll / *2413d.dll (Win32) OpenCV 2.4.13.6 release
VC++ Redistributable 2015 (VC14) msvcp140.dll, vcruntime140.dll, … Microsoft VC++ 2015 Redistributable
FFmpeg DLLs see Delphi-FFMPEG Shared libs for rtpFFMPEG / IP camera (Win32 & Win64) Delphi-FFMPEG script, BtbN Win64, defisym Win32
SDL 1.2 & 2.0 SDL.dll, SDL2.dll for some video examples SDL 1.2, SDL2 releases
JEDI submodule jedi.inc required by source/OpenCV.inc project-jedi/jedi
Delphi-FFMPEG submodule / junction Pascal FFmpeg bindings (libav*.pas) Laex/Delphi-FFMPEG — see setup below

Note: The redist/ folder contains only readme.md stubs (ffmpeg, SDL, VC14) with download links. Runtime DLLs are not included in the repository.


🔗 Delphi-FFMPEG: submodule or development junction

All projects reference Delphi-FFMPEG/source inside this repository (<PROJECT_ROOT>/Delphi-FFMPEG/).

Standard setup (GitHub clone)

git clone --recurse-submodules https://github.com/Laex/Delphi-OpenCV.git
cd Delphi-OpenCV

or after a plain clone:

InitDelphiFFMPEG.cmd

This initializes jedi and Delphi-FFMPEG git submodules.

Development setup (local Delphi-FFMPEG repo)

If you maintain FFmpeg bindings in a separate clone (e.g. D:\Work\Delphi\Delphi-FFMPEG), place it as a sibling of this repo or set a custom path:

Delphi/
├── Delphi-FFMPEG/          ← your working clone
└── OpenCV/
    └── Delphi-OpenCV/      ← this repository

Run from <PROJECT_ROOT>:

InitDelphiFFMPEG.cmd

The script creates a directory junction Delphi-FFMPEG → ..\..\Delphi-FFMPEG when that folder contains source/. Projects keep using Delphi-FFMPEG/source — no path changes needed.

Custom path: copy InitDelphiFFMPEG.local.cmd.example to InitDelphiFFMPEG.local.cmd and set FFMPEG_DEV_PATH.

Manual junction:

mklink /J Delphi-FFMPEG D:\Work\Delphi\Delphi-FFMPEG

🛠️ Installation Guide

Step 1: Clone and run setup

git clone https://github.com/Laex/Delphi-OpenCV.git
cd Delphi-OpenCV
InitDelphiFFMPEG.cmd

Step 2: Configure Delphi Library Paths

Add in Tools → Options → Language → Delphi → Library → Library path:

<PROJECT_ROOT>/source
<PROJECT_ROOT>/source/opengl
<PROJECT_ROOT>/source/sdl
<PROJECT_ROOT>/source/sdl2
<PROJECT_ROOT>/packages
<PROJECT_ROOT>/resource
<PROJECT_ROOT>/resource/facedetectxml
<PROJECT_ROOT>/jedi
<PROJECT_ROOT>/Delphi-FFMPEG/source

Note: opencv_cpp_classes is archival only. For OpenCV C++ / 5.x use Delphi-OpenCV5.

Step 3: Set up runtime DLLs

DLL group Source
OpenCV 2.4.13 OpenCV 2.4.13.6
VC++ 2015 VC++ 2015
FFmpeg Delphi-FFMPEG download script
SDL SDL 1.2, SDL2

Copy DLLs next to your .exe or onto PATH.

Step 4: Verify configuration

Build and run <PROJECT_ROOT>/CheckCVDep/CheckCVDep.dproj.

Step 5: Install Delphi packages

Open packages/<your Delphi version>/ and install in order:

  1. rtpFFMPEG.dpk
  2. rclVCLOpenCV.dpk
  3. rclFMXOpenCV.dpk
  4. dclVCLOpenCV.dpk
  5. dclFMXOpenCV.dpk

📂 Directory Structure

<PROJECT_ROOT>
 ├── Delphi-FFMPEG       # Submodule, or junction to your dev clone
 ├── jedi                # JEDI submodule
 ├── packages            # Delphi IDE packages (D2010–D13)
 ├── samples             # Demo projects
 ├── source              # OpenCV 2.4 C API bindings
 └── opencv_cpp_classes  # Archival C++ experiment (see folder README.md)

🚀 Examples & Demos

  • samples/LibDemo/LibDemo.groupproj — basic OpenCV functions and bindings
  • samples/MultiDemo/MultiDemo.groupproj — video processing, motion detection
  • samples/VCLDemo/VCLDemo.groupproj — VCL visual wrappers
  • samples/Components/ComponentsDemo.groupproj — IDE components
  • Delphi-FFMPEG/examples/Examples.groupproj — low-level FFmpeg API samples

For OpenCV C++ / 5.x see Delphi-OpenCV5.


👥 Contributors


📄 License

This project is licensed under the Mozilla Public License Version 1.1 (MPL 1.1). See Mozilla MPL 1.1.

Explorer des projets similaires

Chargement…