2014-10-18 01:12:32 +02:00
|
|
|
(*
|
|
|
|
**************************************************************************************************
|
|
|
|
Project Delphi-OpenCV
|
|
|
|
**************************************************************************************************
|
|
|
|
Contributor:
|
|
|
|
Laentir Valetov
|
|
|
|
email:laex@bk.ru
|
|
|
|
Mikhail Grigorev
|
2018-08-16 20:29:02 +02:00
|
|
|
email:sleuthhound@gmail.com
|
2014-10-18 01:12:32 +02:00
|
|
|
**************************************************************************************************
|
|
|
|
You may retrieve the latest version of this file at the GitHub,
|
|
|
|
located at git://github.com/Laex/Delphi-OpenCV.git
|
|
|
|
**************************************************************************************************
|
|
|
|
License:
|
|
|
|
The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
|
|
|
|
you may not use this file except in compliance with the License. You may obtain a copy of the
|
|
|
|
License at http://www.mozilla.org/MPL/
|
2013-09-25 21:18:23 +02:00
|
|
|
|
2014-10-18 01:12:32 +02:00
|
|
|
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
|
|
|
ANY KIND, either express or implied. See the License for the specific language governing rights
|
|
|
|
and limitations under the License.
|
|
|
|
|
|
|
|
Alternatively, the contents of this file may be used under the terms of the
|
|
|
|
GNU Lesser General Public License (the "LGPL License"), in which case the
|
|
|
|
provisions of the LGPL License are applicable instead of those above.
|
|
|
|
If you wish to allow use of your version of this file only under the terms
|
|
|
|
of the LGPL License and not to allow others to use your version of this file
|
|
|
|
under the MPL, indicate your decision by deleting the provisions above and
|
|
|
|
replace them with the notice and other provisions required by the LGPL
|
|
|
|
License. If you do not delete the provisions above, a recipient may use
|
|
|
|
your version of this file under either the MPL or the LGPL License.
|
|
|
|
|
|
|
|
For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html
|
|
|
|
**************************************************************************************************
|
2015-04-02 21:51:56 +02:00
|
|
|
|
2014-10-18 01:12:32 +02:00
|
|
|
*)
|
2015-04-07 01:39:39 +02:00
|
|
|
|
2015-10-05 18:46:36 +02:00
|
|
|
unit ocv.lib;
|
|
|
|
|
2016-08-05 12:41:08 +02:00
|
|
|
{$I OpenCV.inc}
|
|
|
|
|
2013-03-27 23:20:08 +01:00
|
|
|
interface
|
|
|
|
|
|
|
|
const
|
2022-03-16 20:15:42 +01:00
|
|
|
// {$IFDEF DelphiOCVVersion_29}
|
|
|
|
CV_VERSION_EPOCH = '2';
|
|
|
|
CV_VERSION_MAJOR = '4';
|
|
|
|
CV_VERSION_MINOR = '13';
|
|
|
|
CV_VERSION_REVISION = '6';
|
|
|
|
// {$ELSE}
|
|
|
|
// {$IFDEF DelphiOCVVersion_30}
|
|
|
|
// CV_VERSION_EPOCH = '3';
|
|
|
|
// CV_VERSION_MAJOR = '0';
|
|
|
|
// CV_VERSION_MINOR = '0';
|
|
|
|
// CV_VERSION_REVISION = '0';
|
|
|
|
// {$ENDIF}
|
|
|
|
// {$ENDIF}
|
2013-09-25 21:18:23 +02:00
|
|
|
CV_VERSION = CV_VERSION_EPOCH + '.' + CV_VERSION_MAJOR + '.' + CV_VERSION_MINOR + '.' + CV_VERSION_REVISION;
|
|
|
|
|
|
|
|
// * old style version constants*/
|
2022-03-16 20:15:42 +01:00
|
|
|
CV_MAJOR_VERSION = CV_VERSION_EPOCH;
|
|
|
|
CV_MINOR_VERSION = CV_VERSION_MAJOR;
|
2013-09-25 21:18:23 +02:00
|
|
|
CV_SUBMINOR_VERSION = CV_VERSION_MINOR;
|
|
|
|
|
|
|
|
CV_VERSION_DLL = CV_VERSION_EPOCH + CV_VERSION_MAJOR + CV_VERSION_MINOR;
|
2013-03-27 23:20:08 +01:00
|
|
|
|
2014-10-18 01:12:32 +02:00
|
|
|
{$IFDEF MSWINDOWS}
|
|
|
|
{$IFDEF CPUX86}
|
|
|
|
CV_DLL_DIR = ''; // 'Win32\';
|
|
|
|
{$ELSE}
|
|
|
|
CV_DLL_DIR = ''; // 'Win64\';
|
|
|
|
{$ENDIF}
|
|
|
|
{$ELSE}
|
|
|
|
{$ENDIF}
|
2016-07-21 16:04:43 +02:00
|
|
|
// -------------------------------
|
2015-04-07 01:39:39 +02:00
|
|
|
core_lib =
|
|
|
|
{$IFDEF MSWINDOWS}
|
|
|
|
CV_DLL_DIR + 'opencv_' +
|
2022-03-16 20:15:42 +01:00
|
|
|
{$IF DEFINED(DelphiOCVVersion_29)}
|
2015-04-07 01:39:39 +02:00
|
|
|
'core' +
|
2022-03-16 20:15:42 +01:00
|
|
|
{$ELSEIF DEFINED(DelphiOCVVersion_30)}
|
2015-04-07 01:39:39 +02:00
|
|
|
'world' +
|
2022-03-16 20:15:42 +01:00
|
|
|
{$ENDIF}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_VERSION_DLL {$IFDEF DEBUG} + 'd'{$ENDIF} + '.dll';
|
2014-10-18 01:12:32 +02:00
|
|
|
{$ELSE}
|
2022-03-16 20:15:42 +01:00
|
|
|
{$IFDEF MACOS}
|
2014-10-18 01:12:32 +02:00
|
|
|
'opencv_core.dylib';
|
2022-03-16 20:15:42 +01:00
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF ANDROID}
|
2014-10-18 01:12:32 +02:00
|
|
|
'libopencv_core.so';
|
2022-03-16 20:15:42 +01:00
|
|
|
{$ELSE}
|
2014-10-18 01:12:32 +02:00
|
|
|
'libopencv_core.so';
|
2022-03-16 20:15:42 +01:00
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
2014-10-18 01:12:32 +02:00
|
|
|
{$ENDIF}
|
2016-07-21 16:04:43 +02:00
|
|
|
// -------------------------------
|
2014-10-18 01:12:32 +02:00
|
|
|
highgui_lib = {$IFDEF MSWINDOWS}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_DLL_DIR + 'opencv_' +
|
2019-09-16 13:29:05 +02:00
|
|
|
{$IF DEFINED(DelphiOCVVersion_29)}
|
2015-04-07 01:39:39 +02:00
|
|
|
'highgui' +
|
|
|
|
{$ELSEIF DEFINED( DelphiOCVVersion_30)}
|
|
|
|
'world' +
|
2017-10-23 01:37:17 +02:00
|
|
|
{$IFEND}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_VERSION_DLL {$IFDEF DEBUG} + 'd'{$ENDIF} + '.dll';
|
2014-10-18 01:12:32 +02:00
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF MACOS}
|
|
|
|
'opencv_highgui.dylib';
|
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF ANDROID}
|
|
|
|
'libopencv_highgui.so';
|
|
|
|
{$ELSE}
|
|
|
|
'libopencv_highgui.so';
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
2016-07-21 16:04:43 +02:00
|
|
|
// -------------------------------
|
2016-10-25 10:06:22 +02:00
|
|
|
features2d_lib = {$IFDEF MSWINDOWS}
|
|
|
|
CV_DLL_DIR + 'opencv_' +
|
2019-09-16 13:29:05 +02:00
|
|
|
{$IF DEFINED(DelphiOCVVersion_29)}
|
2016-10-25 10:06:22 +02:00
|
|
|
'features2d' +
|
|
|
|
{$ELSEIF DEFINED( DelphiOCVVersion_30)}
|
|
|
|
'world' +
|
2017-10-23 01:37:17 +02:00
|
|
|
{$IFEND}
|
2016-10-25 10:06:22 +02:00
|
|
|
CV_VERSION_DLL {$IFDEF DEBUG} + 'd'{$ENDIF} + '.dll';
|
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF MACOS}
|
|
|
|
'opencv_features2d.dylib';
|
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF ANDROID}
|
|
|
|
'libopencv_features2d.so';
|
|
|
|
{$ELSE}
|
|
|
|
'libopencv_features2d.so';
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
|
|
|
// -------------------------------
|
2014-10-18 01:12:32 +02:00
|
|
|
imgproc_lib = {$IFDEF MSWINDOWS}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_DLL_DIR + 'opencv_' +
|
2019-09-16 13:29:05 +02:00
|
|
|
{$IF DEFINED(DelphiOCVVersion_29)}
|
2015-04-07 01:39:39 +02:00
|
|
|
'imgproc' +
|
|
|
|
{$ELSEIF DEFINED( DelphiOCVVersion_30)}
|
|
|
|
'world' +
|
2017-10-23 01:37:17 +02:00
|
|
|
{$IFEND}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_VERSION_DLL {$IFDEF DEBUG} + 'd'{$ENDIF} + '.dll';
|
2014-10-18 01:12:32 +02:00
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF MACOS}
|
|
|
|
'opencv_imgproc.dylib';
|
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF ANDROID}
|
|
|
|
'libopencv_imgproc.so';
|
|
|
|
{$ELSE}
|
|
|
|
'libopencv_imgproc.so';
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
2016-07-21 16:04:43 +02:00
|
|
|
// -------------------------------
|
2014-10-18 01:12:32 +02:00
|
|
|
objdetect_lib = {$IFDEF MSWINDOWS}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_DLL_DIR + 'opencv_' +
|
2019-09-16 13:29:05 +02:00
|
|
|
{$IF DEFINED(DelphiOCVVersion_29)}
|
2015-04-07 01:39:39 +02:00
|
|
|
'objdetect' +
|
|
|
|
{$ELSEIF DEFINED( DelphiOCVVersion_30)}
|
|
|
|
'world' +
|
2017-10-23 01:37:17 +02:00
|
|
|
{$IFEND}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_VERSION_DLL {$IFDEF DEBUG} + 'd'{$ENDIF} + '.dll';
|
2014-10-18 01:12:32 +02:00
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF MACOS}
|
|
|
|
'opencv_objdetect.dylib';
|
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF ANDROID}
|
|
|
|
'libopencv_objdetect.so';
|
|
|
|
{$ELSE}
|
|
|
|
'libopencv_objdetect.so';
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
2016-07-21 16:04:43 +02:00
|
|
|
// -------------------------------
|
2014-10-18 01:12:32 +02:00
|
|
|
legacy_lib = {$IFDEF MSWINDOWS}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_DLL_DIR + 'opencv_' +
|
2019-09-16 13:29:05 +02:00
|
|
|
{$IF DEFINED(DelphiOCVVersion_29)}
|
2015-04-07 01:39:39 +02:00
|
|
|
'legacy' +
|
2019-09-16 13:29:05 +02:00
|
|
|
{$ELSEIF DEFINED(DelphiOCVVersion_30)}
|
2015-04-07 01:39:39 +02:00
|
|
|
'world' +
|
2017-10-23 01:37:17 +02:00
|
|
|
{$IFEND}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_VERSION_DLL {$IFDEF DEBUG} + 'd'{$ENDIF} + '.dll';
|
2014-10-18 01:12:32 +02:00
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF MACOS}
|
|
|
|
'opencv_legacy.dylib';
|
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF ANDROID}
|
|
|
|
'libopencv_legacy.so';
|
|
|
|
{$ELSE}
|
|
|
|
'libopencv_legacy.so';
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
2016-07-21 16:04:43 +02:00
|
|
|
// -------------------------------
|
2014-10-18 01:12:32 +02:00
|
|
|
calib3d_lib = {$IFDEF MSWINDOWS}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_DLL_DIR + 'opencv_' +
|
2019-09-16 13:29:05 +02:00
|
|
|
{$IF DEFINED(DelphiOCVVersion_29)}
|
2015-04-07 01:39:39 +02:00
|
|
|
'calib3d' +
|
|
|
|
{$ELSEIF DEFINED( DelphiOCVVersion_30)}
|
|
|
|
'world' +
|
2017-10-23 01:37:17 +02:00
|
|
|
{$IFEND}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_VERSION_DLL {$IFDEF DEBUG} + 'd'{$ENDIF} + '.dll';
|
2014-10-18 01:12:32 +02:00
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF MACOS}
|
|
|
|
'opencv_calib3d.dylib';
|
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF ANDROID}
|
|
|
|
'libopencv_calib3d.so';
|
|
|
|
{$ELSE}
|
|
|
|
'libopencv_calib3d.so';
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
2016-07-21 16:04:43 +02:00
|
|
|
// -------------------------------
|
2014-10-18 01:12:32 +02:00
|
|
|
tracking_lib = {$IFDEF MSWINDOWS}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_DLL_DIR + 'opencv_' +
|
2019-09-16 13:29:05 +02:00
|
|
|
{$IF DEFINED(DelphiOCVVersion_29)}
|
2015-04-07 01:39:39 +02:00
|
|
|
'video' +
|
2019-09-16 13:29:05 +02:00
|
|
|
{$ELSEIF DEFINED(DelphiOCVVersion_30)}
|
2015-04-07 01:39:39 +02:00
|
|
|
'world' +
|
2017-10-23 01:37:17 +02:00
|
|
|
{$IFEND}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_VERSION_DLL {$IFDEF DEBUG} + 'd'{$ENDIF} + '.dll';
|
2014-10-18 01:12:32 +02:00
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF MACOS}
|
|
|
|
'opencv_video.dylib';
|
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF ANDROID}
|
|
|
|
'libopencv_video.so';
|
|
|
|
{$ELSE}
|
|
|
|
'libopencv_video.so';
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
2016-07-21 16:04:43 +02:00
|
|
|
// -------------------------------
|
2014-10-18 01:12:32 +02:00
|
|
|
nonfree_lib = {$IFDEF MSWINDOWS}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_DLL_DIR + 'opencv_' +
|
2019-09-16 13:29:05 +02:00
|
|
|
{$IF DEFINED(DelphiOCVVersion_29)}
|
2015-04-07 01:39:39 +02:00
|
|
|
'nonfree' +
|
|
|
|
{$ELSEIF DEFINED( DelphiOCVVersion_30)}
|
|
|
|
'world' +
|
2017-10-23 01:37:17 +02:00
|
|
|
{$IFEND}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_VERSION_DLL {$IFDEF DEBUG} + 'd'{$ENDIF} + '.dll';
|
2014-10-18 01:12:32 +02:00
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF MACOS}
|
|
|
|
'opencv_nonfree.dylib';
|
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF ANDROID}
|
|
|
|
'libopencv_nonfree.so';
|
|
|
|
{$ELSE}
|
|
|
|
'libopencv_nonfree.so';
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
2016-07-21 16:04:43 +02:00
|
|
|
// -------------------------------
|
2014-10-18 01:12:32 +02:00
|
|
|
opencv_classes_lib = {$IFDEF MSWINDOWS}
|
|
|
|
CV_DLL_DIR + 'opencv_classes' + CV_VERSION_DLL {$IFDEF DEBUG} + 'd'{$ENDIF} + '.dll';
|
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF MACOS}
|
|
|
|
'opencv_classes.dylib';
|
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF ANDROID}
|
|
|
|
'libopencv_classes.so';
|
|
|
|
{$ELSE}
|
|
|
|
'libopencv_classes.so';
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
2016-07-21 16:04:43 +02:00
|
|
|
// -------------------------------
|
2014-10-18 01:12:32 +02:00
|
|
|
opencv_photo_lib = {$IFDEF MSWINDOWS}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_DLL_DIR + 'opencv_' +
|
2019-09-16 13:29:05 +02:00
|
|
|
{$IF DEFINED(DelphiOCVVersion_29)}
|
2015-04-07 01:39:39 +02:00
|
|
|
'photo' +
|
|
|
|
{$ELSEIF DEFINED( DelphiOCVVersion_30)}
|
|
|
|
'world' +
|
2017-10-23 01:37:17 +02:00
|
|
|
{$IFEND}
|
2015-04-07 01:39:39 +02:00
|
|
|
CV_VERSION_DLL {$IFDEF DEBUG} + 'd'{$ENDIF} + '.dll';
|
2014-10-18 01:12:32 +02:00
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF MACOS}
|
|
|
|
'opencv_photo.dylib';
|
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF ANDROID}
|
|
|
|
'libopencv_photo.so';
|
|
|
|
{$ELSE}
|
|
|
|
'libopencv_photo.so';
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
2015-10-05 18:46:36 +02:00
|
|
|
{$ENDIF}
|
2016-07-21 16:04:43 +02:00
|
|
|
// -------------------------------
|
|
|
|
opencv_contrib_lib = {$IFDEF MSWINDOWS}
|
|
|
|
CV_DLL_DIR + 'opencv_' +
|
2019-09-16 13:29:05 +02:00
|
|
|
{$IF DEFINED(DelphiOCVVersion_29)}
|
2016-07-21 16:04:43 +02:00
|
|
|
'contrib' +
|
|
|
|
{$ELSEIF DEFINED( DelphiOCVVersion_30)}
|
|
|
|
'world' +
|
2017-10-23 01:37:17 +02:00
|
|
|
{$IFEND}
|
2016-07-21 16:04:43 +02:00
|
|
|
CV_VERSION_DLL {$IFDEF DEBUG} + 'd'{$ENDIF} + '.dll';
|
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF MACOS}
|
|
|
|
'opencv_contrib.dylib';
|
|
|
|
{$ELSE}
|
|
|
|
{$IFDEF ANDROID}
|
|
|
|
'libopencv_contrib.so';
|
|
|
|
{$ELSE}
|
|
|
|
'libopencv_contrib.so';
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
|
|
|
// -------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// -------------------------------
|
|
|
|
//
|
2013-03-27 23:20:08 +01:00
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
end.
|