⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cvcam.pas

📁 Delphi版本的OpenCV头文件库(以及诸多实例)
💻 PAS
字号:
///////////////////////////////////////////////////////////////////////////////////////
//
//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
//  By downloading, copying, installing or using the software you agree to this license.
//  If you do not agree to this license, do not download, install,
//  copy or use the software.
//
//
//                        Intel License Agreement
//                For Open Source Computer Vision Library
//
// Copyright (C) 2000, Intel Corporation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
//   * Redistribution's of source code must retain the above copyright notice,
//     this list of conditions and the following disclaimer.
//
//   * Redistribution's in binary form must reproduce the above copyright notice,
//     this list of conditions and the following disclaimer in the documentation
//     and/or other materials provided with the distribution.
//
//   * The name of Intel Corporation may not be used to endorse or promote products
//     derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/

unit cvCAm;


{$A+,Z+}
{$ASSERTIONS on}

interface

uses
  Windows,Sysutils,Math,Graphics, IPL,Types , OpenCv;

const
 cvCamDLL = '..\OpenCV\cvcam100.dll';
 CVCAM_PROP_ENABLE = 'enable';
 CVCAMTRUE = 1;
 CVCAMFALSE = 0;

 CVCAM_PROP_RENDER  = 'render';
 CVCAM_PROP_WINDOW  = 'window';
 CVCAM_PROP_CALLBACK  = 'callback';
 CVCAM_DESCRIPTION  = 'description';
 CVCAM_VIDEOFORMAT  = 'video_pp';
 CVCAM_CAMERAPROPS  = 'camera_pp';
 CVCAM_RNDWIDTH  = 'rendering_width';
 CVCAM_RNDHEIGHT  = 'rendering_height';
 CVCAM_SRCWIDTH  = 'source_width';
 CVCAM_SRCHEIGHT  = 'source_height';
 CVCAM_STEREO_CALLBACK  = 'stereo_callback';
 CVCAM_STEREO3_CALLBACK  = 'stereo3_callback';
 CVCAM_STEREO4_CALLBACK  = 'stereo4_callback';
 CVCAM_PROP_SETFORMAT  = 'set_video_format';
 CVCAM_PROP_RAW  = 'raw_image';
 CVCAM_PROP_TIME_FORMAT  = 'time_format';
 CVCAM_PROP_DURATION  = 'duration';
 CVCAM_PROP_POSITION  = 'current_position';


 function cvcamInit() : integer;cdecl;
 function  cvcamGetCamerasCount() : integer; cdecl;
 function  cvcamSetProperty(camera : integer ; property_ :pChar ; value : pointer)  :integer;cdecl;
 function  cvcamgetProperty(camera : integer ; property_ :pChar ; value : pointer)  :integer;cdecl;


 function cvCreateCameraCapture(index : integer) : pcvCapture; cdecl;
 function cvCaptureFromCAM(index : integer) : pcvCapture; cdecl;
 function cvcamStart() : integer; cdecl;
 function cvcamStop() : integer; cdecl;
 function cvcamPause() : integer; cdecl;
 function cvcamResume() : integer; cdecl;
 function cvcamExit() : integer; cdecl;

implementation


 function cvcamInit()  : integer;                          external cvCamDLL name 'cvcamInit';
 function cvcamGetCamerasCount;                  external cvCamDLL name 'cvcamGetCamerasCount';
 function cvcamSetProperty ;                    external cvCamDLL name 'cvcamSetProperty';
 function cvcamgetProperty ;                    external cvCamDLL name 'cvcamgetProperty';
 function cvCaptureFromCAM ;                    external HighGUI_DLL name 'cvCreateCameraCapture';
 function cvCreateCameraCapture ;                external HighGUI_DLL name 'cvCreateCameraCapture';
 function cvcamStop():integer ;                            external cvCamDLL name 'cvcamStop';
 function cvcamPause() :integer;                         external cvCamDLL name 'cvcamPause';
 function cvcamStart():integer ;                          external cvCamDLL name 'cvcamStart';
 function cvcamResume() :integer;                        external cvCamDLL name 'cvcamResume';
 function cvcamExit():integer;                           external cvCamDLL name 'cvcamExit';
end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -