Remie9 Posted November 16, 2019 Share Posted November 16, 2019 Hi, Is this compatible with the new 4.1.2 OpenCV? Thanks Link to comment Share on other sites More sharing options...
mLipok Posted September 3, 2020 Share Posted September 3, 2020 (edited) On 11/16/2019 at 8:12 AM, Remie9 said: Hi, Is this compatible with the new 4.1.2 OpenCV? Thanks Did you try ? btw. Current version is OpenCV – 4.4.0 : https://opencv.org/releases/ EDIT: related topic: Edited September 3, 2020 by mLipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
mLipok Posted September 3, 2020 Share Posted September 3, 2020 Thanks to @water this UDF was added to AutoIt UDF list on Wiki Page https://www.autoitscript.com/wiki/User_Defined_Functions#Graphics_and_image Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
Lion66 Posted September 14, 2020 Share Posted September 14, 2020 I'm looking for a solution to find a picture in the picture, but with a different size. I haven't found a suitable example, and I'm not sure if this is implemented in this library. Can anyone help me figure it out? Thank. Link to comment Share on other sites More sharing options...
queensoft Posted November 9, 2020 Share Posted November 9, 2020 (edited) opencv_world450.dll On 11/16/2019 at 9:12 AM, Remie9 said: Hi, Is this compatible with the new 4.1.2 OpenCV? Thanks On 9/3/2020 at 8:27 AM, mLipok said: Did you try ? In the latest version (actually, starting with version 3) there is only one single DLL file: opencv_world450.dll And only 64 bits, but I assume that is not a problem. So, how would the UDF work ?! Old / original code: $_opencv_core = DllOpen("opencv_core249.dll") $_opencv_highgui = DllOpen("opencv_highgui249.dll") $_opencv_imgproc = DllOpen("opencv_imgproc249.dll") $_opencv_calib3d = DllOpen("opencv_calib3d249.dll") $_opencv_features2d = DllOpen("opencv_features2d249.dll") New code - variant 1: $_opencv_core = DllOpen("opencv_world450.dll") $_opencv_highgui = DllOpen("opencv_world450.dll") $_opencv_imgproc = DllOpen("opencv_world450.dll") $_opencv_calib3d = DllOpen("opencv_world450.dll") $_opencv_features2d = DllOpen("opencv_world450.dll") New code - variant 2: $_opencv_core = DllOpen("opencv_world450.dll") $_opencv_highgui = $_opencv_core $_opencv_imgproc = $_opencv_core $_opencv_calib3d = $_opencv_core $_opencv_features2d = $_opencv_core To be honest, I haven't had the time to test either variant. Well, tested both variants, none of them is working. Edited November 9, 2020 by queensoft Link to comment Share on other sites More sharing options...
BoJack Posted January 17, 2021 Share Posted January 17, 2021 To get the "older" shared library structure of OpenCV, you have to compile the source with the build option "BUILD_opencv_world" off. Then you have mutliple dll files instead of the big one. I just tested it with the latest OpenCV Version 4.5.1 x86 and the example "OpenCV contour_example.au3" from the first post and it worked! Link to comment Share on other sites More sharing options...
junkew Posted January 18, 2021 Share Posted January 18, 2021 As this open CV library is very powerfull also in dealing with hard to get screen controls would be nice to get latest version running. Trying to get all function declarations from the open world dll latest version 4.5.1 most likely 64 bits opencv_world451.dll First attempt: see attached au3 file review comments are welcome region used to indicate which .h headerfile is used search for TODO: these parts are not working and commented out TODO: Other dll TODO: Fix function declaration only function declarations no structures defined, reuse the ones in this thread No clue how to fix and rewrite some C constructions. C call is in comment given Issue 1 Unclear how to map this construct /************************************* CvSlice ******************************************/ #define CV_WHOLE_SEQ_END_INDEX 0x3fffffff #define CV_WHOLE_SEQ cvSlice(0, CV_WHOLE_SEQ_END_INDEX) Func _cvCvtSeqToArray($cvseq,$cvelements,$cvslice=$CV_WHOLE_SEQ) /* CVAPI(void*) cvCvtSeqToArray( const CvSeq* seq, void* elements, CvSlice slice CV_DEFAULT(CV_WHOLE_SEQ) );*/ local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCvtSeqToArray","struct*",$cvseq,"struct*",$cvelements,"struct",$cvslice) If @error Then ConsoleWrite( "error in cvCvtSeqToArray") Return $_aResult[0] EndFunc ;==>cvCvtSeqToArray Issue 2 Mapping points array Func _cvBoxPoints($cvbox,$cvpt[4]) /* CVAPI(void) cvBoxPoints( CvBox2D box, CvPoint2D32f pt[4] ); */ local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvBoxPoints","struct",$cvbox,"struct",$cvpt[4]) If @error Then ConsoleWrite( "error in cvBoxPoints") Return $_aResult[0] EndFunc ;==>cvBoxPoints Issue 3 Not allways clear how to map to Autoit --> review needed, below list has C and Autoit call for easy compare expandcollapse popup#region core_c.h ; CVAPI(void*) cvAlloc( size_t size ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvAlloc","ulong_ptr",$cvsize) ; CVAPI(void) cvFree_( void* ptr ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvFree_","struct*",$cvptr) ; CVAPI(IplImage*) cvCreateImageHeader( CvSize size, int depth, int channels ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateImageHeader","struct",$cvsize,"int",$cvdepth,"int",$cvchannels) ; CVAPI(IplImage*) cvInitImageHeader( IplImage* image, CvSize size, int depth, int channels, int origin CV_DEFAULT(0), int align CV_DEFAULT(4)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvInitImageHeader","struct*",$cvimage,"struct",$cvsize,"int",$cvdepth,"int",$cvchannels,"int",$cvorigin,"int",$cvalign) ; CVAPI(IplImage*) cvCreateImage( CvSize size, int depth, int channels ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateImage","struct",$cvsize,"int",$cvdepth,"int",$cvchannels) ; CVAPI(void) cvReleaseImageHeader( IplImage** image ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvReleaseImageHeader","struct*",$cvimage) ; CVAPI(void) cvReleaseImage( IplImage** image ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvReleaseImage","struct*",$cvimage) ; CVAPI(IplImage*) cvCloneImage( const IplImage* image ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCloneImage","struct*",$cvimage) ; CVAPI(void) cvSetImageCOI( IplImage* image, int coi ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetImageCOI","struct*",$cvimage,"int",$cvcoi) ; CVAPI(int) cvGetImageCOI( const IplImage* image ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGetImageCOI","struct*",$cvimage) ; CVAPI(void) cvSetImageROI( IplImage* image, CvRect rect ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetImageROI","struct*",$cvimage,"struct",$cvrect) ; CVAPI(void) cvResetImageROI( IplImage* image ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvResetImageROI","struct*",$cvimage) ; CVAPI(CvRect) cvGetImageROI( const IplImage* image ); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvGetImageROI","struct*",$cvimage) ; CVAPI(CvMat*) cvCreateMatHeader( int rows, int cols, int type ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateMatHeader","int",$cvrows,"int",$cvcols,"int",$cvtype) ; CVAPI(CvMat*) cvInitMatHeader( CvMat* mat, int rows, int cols, int type, void* data CV_DEFAULT(NULL), int step CV_DEFAULT(CV_AUTOSTEP) ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvInitMatHeader","struct*",$cvmat,"int",$cvrows,"int",$cvcols,"int",$cvtype,"struct*",$cvdata,"int",$cvstep) ; CVAPI(CvMat*) cvCreateMat( int rows, int cols, int type ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateMat","int",$cvrows,"int",$cvcols,"int",$cvtype) ; CVAPI(void) cvReleaseMat( CvMat** mat ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvReleaseMat","struct*",$cvmat) ; CVAPI(CvMat*) cvCloneMat( const CvMat* mat ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCloneMat","struct*",$cvmat) ; CVAPI(CvMat*) cvGetSubRect( const CvArr* arr, CvMat* submat, CvRect rect ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvGetSubRect","struct*",$cvarr,"struct*",$cvsubmat,"struct",$cvrect) ; CVAPI(CvMat*) cvGetRows( const CvArr* arr, CvMat* submat, int start_row, int end_row, int delta_row CV_DEFAULT(1)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvGetRows","struct*",$cvarr,"struct*",$cvsubmat,"int",$cvstart_row,"int",$cvend_row,"int",$cvdelta_row) ; CVAPI(CvMat*) cvGetCols( const CvArr* arr, CvMat* submat, int start_col, int end_col ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvGetCols","struct*",$cvarr,"struct*",$cvsubmat,"int",$cvstart_col,"int",$cvend_col) ; CVAPI(CvMat*) cvGetDiag( const CvArr* arr, CvMat* submat, int diag CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvGetDiag","struct*",$cvarr,"struct*",$cvsubmat,"int",$cvdiag) ; CVAPI(void) cvScalarToRawData( const CvScalar* scalar, void* data, int type, int extend_to_12 CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvScalarToRawData","struct*",$cvscalar,"struct*",$cvdata,"int",$cvtype,"int",$cvextend_to_12) ; CVAPI(void) cvRawDataToScalar( const void* data, int type, CvScalar* scalar ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvRawDataToScalar","struct*",$cvdata,"int",$cvtype,"struct*",$cvscalar) ; CVAPI(CvMatND*) cvCreateMatNDHeader( int dims, const int* sizes, int type ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateMatNDHeader","int",$cvdims,"struct*",$cvsizes,"int",$cvtype) ; CVAPI(CvMatND*) cvCreateMatND( int dims, const int* sizes, int type ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateMatND","int",$cvdims,"struct*",$cvsizes,"int",$cvtype) ; CVAPI(CvMatND*) cvInitMatNDHeader( CvMatND* mat, int dims, const int* sizes, int type, void* data CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvInitMatNDHeader","struct*",$cvmat,"int",$cvdims,"struct*",$cvsizes,"int",$cvtype,"struct*",$cvdata) ; CVAPI(CvMatND*) cvCloneMatND( const CvMatND* mat ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCloneMatND","struct*",$cvmat) ; CVAPI(CvSparseMat*) cvCreateSparseMat( int dims, const int* sizes, int type ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateSparseMat","int",$cvdims,"struct*",$cvsizes,"int",$cvtype) ; CVAPI(void) cvReleaseSparseMat( CvSparseMat** mat ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvReleaseSparseMat","struct*",$cvmat) ; CVAPI(CvSparseMat*) cvCloneSparseMat( const CvSparseMat* mat ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCloneSparseMat","struct*",$cvmat) ; CVAPI(CvSparseNode*) cvInitSparseMatIterator( const CvSparseMat* mat, CvSparseMatIterator* mat_iterator ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvInitSparseMatIterator","struct*",$cvmat,"struct*",$cvmat_iterator) ; CVAPI(int) cvInitNArrayIterator( int count, CvArr** arrs, const CvArr* mask, CvMatND* stubs, CvNArrayIterator* array_iterator, int flags CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvInitNArrayIterator","int",$cvcount,"struct*",$cvarrs,"struct*",$cvmask,"struct*",$cvstubs,"struct*",$cvarray_iterator,"int",$cvflags) ; CVAPI(int) cvNextNArraySlice( CvNArrayIterator* array_iterator ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvNextNArraySlice","struct*",$cvarray_iterator) ; CVAPI(int) cvGetElemType( const CvArr* arr ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGetElemType","struct*",$cvarr) ; CVAPI(int) cvGetDims( const CvArr* arr, int* sizes CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGetDims","struct*",$cvarr,"struct*",$cvsizes) ; CVAPI(int) cvGetDimSize( const CvArr* arr, int index ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGetDimSize","struct*",$cvarr,"int",$cvindex) ; CVAPI(uchar*) cvPtr1D( const CvArr* arr, int idx0, int* type CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvPtr1D","struct*",$cvarr,"int",$cvidx0,"struct*",$cvtype) ; CVAPI(uchar*) cvPtr2D( const CvArr* arr, int idx0, int idx1, int* type CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvPtr2D","struct*",$cvarr,"int",$cvidx0,"int",$cvidx1,"struct*",$cvtype) ; CVAPI(uchar*) cvPtr3D( const CvArr* arr, int idx0, int idx1, int idx2, int* type CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvPtr3D","struct*",$cvarr,"int",$cvidx0,"int",$cvidx1,"int",$cvidx2,"struct*",$cvtype) ; CVAPI(uchar*) cvPtrND( const CvArr* arr, const int* idx, int* type CV_DEFAULT(NULL), int create_node CV_DEFAULT(1), unsigned* precalc_hashval CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvPtrND","struct*",$cvarr,"struct*",$cvidx,"struct*",$cvtype,"int",$cvcreate_node,"struct*",$cvprecalc_hashval) ; CVAPI(CvScalar) cvGet1D( const CvArr* arr, int idx0 ); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvGet1D","struct*",$cvarr,"int",$cvidx0) ; CVAPI(CvScalar) cvGet2D( const CvArr* arr, int idx0, int idx1 ); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvGet2D","struct*",$cvarr,"int",$cvidx0,"int",$cvidx1) ; CVAPI(CvScalar) cvGet3D( const CvArr* arr, int idx0, int idx1, int idx2 ); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvGet3D","struct*",$cvarr,"int",$cvidx0,"int",$cvidx1,"int",$cvidx2) ; CVAPI(CvScalar) cvGetND( const CvArr* arr, const int* idx ); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvGetND","struct*",$cvarr,"struct*",$cvidx) ; CVAPI(double) cvGetReal1D( const CvArr* arr, int idx0 ); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvGetReal1D","struct*",$cvarr,"int",$cvidx0) ; CVAPI(double) cvGetReal2D( const CvArr* arr, int idx0, int idx1 ); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvGetReal2D","struct*",$cvarr,"int",$cvidx0,"int",$cvidx1) ; CVAPI(double) cvGetReal3D( const CvArr* arr, int idx0, int idx1, int idx2 ); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvGetReal3D","struct*",$cvarr,"int",$cvidx0,"int",$cvidx1,"int",$cvidx2) ; CVAPI(double) cvGetRealND( const CvArr* arr, const int* idx ); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvGetRealND","struct*",$cvarr,"struct*",$cvidx) ; CVAPI(void) cvSet1D( CvArr* arr, int idx0, CvScalar value ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSet1D","struct*",$cvarr,"int",$cvidx0,"struct",$cvvalue) ; CVAPI(void) cvSet2D( CvArr* arr, int idx0, int idx1, CvScalar value ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSet2D","struct*",$cvarr,"int",$cvidx0,"int",$cvidx1,"struct",$cvvalue) ; CVAPI(void) cvSet3D( CvArr* arr, int idx0, int idx1, int idx2, CvScalar value ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSet3D","struct*",$cvarr,"int",$cvidx0,"int",$cvidx1,"int",$cvidx2,"struct",$cvvalue) ; CVAPI(void) cvSetND( CvArr* arr, const int* idx, CvScalar value ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetND","struct*",$cvarr,"struct*",$cvidx,"struct",$cvvalue) ; CVAPI(void) cvSetReal1D( CvArr* arr, int idx0, double value ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetReal1D","struct*",$cvarr,"int",$cvidx0,"double",$cvvalue) ; CVAPI(void) cvSetReal2D( CvArr* arr, int idx0, int idx1, double value ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetReal2D","struct*",$cvarr,"int",$cvidx0,"int",$cvidx1,"double",$cvvalue) ; CVAPI(void) cvSetReal3D( CvArr* arr, int idx0, int idx1, int idx2, double value ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetReal3D","struct*",$cvarr,"int",$cvidx0,"int",$cvidx1,"int",$cvidx2,"double",$cvvalue) ; CVAPI(void) cvSetRealND( CvArr* arr, const int* idx, double value ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetRealND","struct*",$cvarr,"struct*",$cvidx,"double",$cvvalue) ; CVAPI(void) cvClearND( CvArr* arr, const int* idx ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvClearND","struct*",$cvarr,"struct*",$cvidx) ; CVAPI(CvMat*) cvGetMat( const CvArr* arr, CvMat* header, int* coi CV_DEFAULT(NULL), int allowND CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvGetMat","struct*",$cvarr,"struct*",$cvheader,"struct*",$cvcoi,"int",$cvallowND) ; CVAPI(IplImage*) cvGetImage( const CvArr* arr, IplImage* image_header ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvGetImage","struct*",$cvarr,"struct*",$cvimage_header) ; CVAPI(CvArr*) cvReshapeMatND( const CvArr* arr, int sizeof_header, CvArr* header, int new_cn, int new_dims, int* new_sizes ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvReshapeMatND","struct*",$cvarr,"int",$cvsizeof_header,"struct*",$cvheader,"int",$cvnew_cn,"int",$cvnew_dims,"struct*",$cvnew_sizes) ; CVAPI(CvMat*) cvReshape( const CvArr* arr, CvMat* header, int new_cn, int new_rows CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvReshape","struct*",$cvarr,"struct*",$cvheader,"int",$cvnew_cn,"int",$cvnew_rows) ; CVAPI(void) cvRepeat( const CvArr* src, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvRepeat","struct*",$cvsrc,"struct*",$cvdst) ; CVAPI(void) cvCreateData( CvArr* arr ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCreateData","struct*",$cvarr) ; CVAPI(void) cvReleaseData( CvArr* arr ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvReleaseData","struct*",$cvarr) ; CVAPI(void) cvSetData( CvArr* arr, void* data, int step ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetData","struct*",$cvarr,"struct*",$cvdata,"int",$cvstep) ; CVAPI(void) cvGetRawData( const CvArr* arr, uchar** data, int* step CV_DEFAULT(NULL), CvSize* roi_size CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvGetRawData","struct*",$cvarr,"struct*",$cvdata,"struct*",$cvstep,"struct*",$cvroi_size) ; CVAPI(CvSize) cvGetSize( const CvArr* arr ); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvGetSize","struct*",$cvarr) ; CVAPI(void) cvCopy( const CvArr* src, CvArr* dst, const CvArr* mask CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCopy","struct*",$cvsrc,"struct*",$cvdst,"struct*",$cvmask) ; CVAPI(void) cvSet( CvArr* arr, CvScalar value, const CvArr* mask CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSet","struct*",$cvarr,"struct",$cvvalue,"struct*",$cvmask) ; CVAPI(void) cvSetZero( CvArr* arr ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetZero","struct*",$cvarr) ; CVAPI(void) cvSplit( const CvArr* src, CvArr* dst0, CvArr* dst1, CvArr* dst2, CvArr* dst3 ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSplit","struct*",$cvsrc,"struct*",$cvdst0,"struct*",$cvdst1,"struct*",$cvdst2,"struct*",$cvdst3) ; CVAPI(void) cvMerge( const CvArr* src0, const CvArr* src1, const CvArr* src2, const CvArr* src3, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvMerge","struct*",$cvsrc0,"struct*",$cvsrc1,"struct*",$cvsrc2,"struct*",$cvsrc3,"struct*",$cvdst) ; CVAPI(void) cvMixChannels( const CvArr** src, int src_count, CvArr** dst, int dst_count, const int* from_to, int pair_count ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvMixChannels","struct*",$cvsrc,"int",$cvsrc_count,"struct*",$cvdst,"int",$cvdst_count,"struct*",$cvfrom_to,"int",$cvpair_count) ; CVAPI(void) cvConvertScale( const CvArr* src, CvArr* dst, double scale CV_DEFAULT(1), double shift CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvConvertScale","struct*",$cvsrc,"struct*",$cvdst,"double",$cvscale,"double",$cvshift) ; CVAPI(void) cvConvertScaleAbs( const CvArr* src, CvArr* dst, double scale CV_DEFAULT(1), double shift CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvConvertScaleAbs","struct*",$cvsrc,"struct*",$cvdst,"double",$cvscale,"double",$cvshift) ; CVAPI(CvTermCriteria) cvCheckTermCriteria( CvTermCriteria criteria, double default_eps, int default_max_iters ); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvCheckTermCriteria","struct",$cvcriteria,"double",$cvdefault_eps,"int",$cvdefault_max_iters) ; CVAPI(void) cvAdd( const CvArr* src1, const CvArr* src2, CvArr* dst, const CvArr* mask CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvAdd","struct*",$cvsrc1,"struct*",$cvsrc2,"struct*",$cvdst,"struct*",$cvmask) ; CVAPI(void) cvAddS( const CvArr* src, CvScalar value, CvArr* dst, const CvArr* mask CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvAddS","struct*",$cvsrc,"struct",$cvvalue,"struct*",$cvdst,"struct*",$cvmask) ; CVAPI(void) cvSub( const CvArr* src1, const CvArr* src2, CvArr* dst, const CvArr* mask CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSub","struct*",$cvsrc1,"struct*",$cvsrc2,"struct*",$cvdst,"struct*",$cvmask) ; CVAPI(void) cvSubRS( const CvArr* src, CvScalar value, CvArr* dst, const CvArr* mask CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSubRS","struct*",$cvsrc,"struct",$cvvalue,"struct*",$cvdst,"struct*",$cvmask) ; CVAPI(void) cvMul( const CvArr* src1, const CvArr* src2, CvArr* dst, double scale CV_DEFAULT(1) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvMul","struct*",$cvsrc1,"struct*",$cvsrc2,"struct*",$cvdst,"double",$cvscale) ; CVAPI(void) cvDiv( const CvArr* src1, const CvArr* src2, CvArr* dst, double scale CV_DEFAULT(1)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvDiv","struct*",$cvsrc1,"struct*",$cvsrc2,"struct*",$cvdst,"double",$cvscale) ; CVAPI(void) cvScaleAdd( const CvArr* src1, CvScalar scale, const CvArr* src2, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvScaleAdd","struct*",$cvsrc1,"struct",$cvscale,"struct*",$cvsrc2,"struct*",$cvdst) ; CVAPI(void) cvAddWeighted( const CvArr* src1, double alpha, const CvArr* src2, double beta, double gamma, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvAddWeighted","struct*",$cvsrc1,"double",$cvalpha,"struct*",$cvsrc2,"double",$cvbeta,"double",$cvgamma,"struct*",$cvdst) ; CVAPI(double) cvDotProduct( const CvArr* src1, const CvArr* src2 ); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvDotProduct","struct*",$cvsrc1,"struct*",$cvsrc2) ; CVAPI(void) cvAnd( const CvArr* src1, const CvArr* src2, CvArr* dst, const CvArr* mask CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvAnd","struct*",$cvsrc1,"struct*",$cvsrc2,"struct*",$cvdst,"struct*",$cvmask) ; CVAPI(void) cvAndS( const CvArr* src, CvScalar value, CvArr* dst, const CvArr* mask CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvAndS","struct*",$cvsrc,"struct",$cvvalue,"struct*",$cvdst,"struct*",$cvmask) ; CVAPI(void) cvOr( const CvArr* src1, const CvArr* src2, CvArr* dst, const CvArr* mask CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvOr","struct*",$cvsrc1,"struct*",$cvsrc2,"struct*",$cvdst,"struct*",$cvmask) ; CVAPI(void) cvOrS( const CvArr* src, CvScalar value, CvArr* dst, const CvArr* mask CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvOrS","struct*",$cvsrc,"struct",$cvvalue,"struct*",$cvdst,"struct*",$cvmask) ; CVAPI(void) cvXor( const CvArr* src1, const CvArr* src2, CvArr* dst, const CvArr* mask CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvXor","struct*",$cvsrc1,"struct*",$cvsrc2,"struct*",$cvdst,"struct*",$cvmask) ; CVAPI(void) cvXorS( const CvArr* src, CvScalar value, CvArr* dst, const CvArr* mask CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvXorS","struct*",$cvsrc,"struct",$cvvalue,"struct*",$cvdst,"struct*",$cvmask) ; CVAPI(void) cvNot( const CvArr* src, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvNot","struct*",$cvsrc,"struct*",$cvdst) ; CVAPI(void) cvInRange( const CvArr* src, const CvArr* lower, const CvArr* upper, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvInRange","struct*",$cvsrc,"struct*",$cvlower,"struct*",$cvupper,"struct*",$cvdst) ; CVAPI(void) cvInRangeS( const CvArr* src, CvScalar lower, CvScalar upper, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvInRangeS","struct*",$cvsrc,"struct",$cvlower,"struct",$cvupper,"struct*",$cvdst) ; CVAPI(void) cvCmp( const CvArr* src1, const CvArr* src2, CvArr* dst, int cmp_op ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCmp","struct*",$cvsrc1,"struct*",$cvsrc2,"struct*",$cvdst,"int",$cvcmp_op) ; CVAPI(void) cvCmpS( const CvArr* src, double value, CvArr* dst, int cmp_op ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCmpS","struct*",$cvsrc,"double",$cvvalue,"struct*",$cvdst,"int",$cvcmp_op) ; CVAPI(void) cvMin( const CvArr* src1, const CvArr* src2, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvMin","struct*",$cvsrc1,"struct*",$cvsrc2,"struct*",$cvdst) ; CVAPI(void) cvMax( const CvArr* src1, const CvArr* src2, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvMax","struct*",$cvsrc1,"struct*",$cvsrc2,"struct*",$cvdst) ; CVAPI(void) cvMinS( const CvArr* src, double value, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvMinS","struct*",$cvsrc,"double",$cvvalue,"struct*",$cvdst) ; CVAPI(void) cvMaxS( const CvArr* src, double value, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvMaxS","struct*",$cvsrc,"double",$cvvalue,"struct*",$cvdst) ; CVAPI(void) cvAbsDiff( const CvArr* src1, const CvArr* src2, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvAbsDiff","struct*",$cvsrc1,"struct*",$cvsrc2,"struct*",$cvdst) ; CVAPI(void) cvAbsDiffS( const CvArr* src, CvArr* dst, CvScalar value ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvAbsDiffS","struct*",$cvsrc,"struct*",$cvdst,"struct",$cvvalue) ; CVAPI(void) cvCartToPolar( const CvArr* x, const CvArr* y, CvArr* magnitude, CvArr* angle CV_DEFAULT(NULL), int angle_in_degrees CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCartToPolar","struct*",$cvx,"struct*",$cvy,"struct*",$cvmagnitude,"struct*",$cvangle,"int",$cvangle_in_degrees) ; CVAPI(void) cvPolarToCart( const CvArr* magnitude, const CvArr* angle, CvArr* x, CvArr* y, int angle_in_degrees CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvPolarToCart","struct*",$cvmagnitude,"struct*",$cvangle,"struct*",$cvx,"struct*",$cvy,"int",$cvangle_in_degrees) ; CVAPI(void) cvPow( const CvArr* src, CvArr* dst, double power ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvPow","struct*",$cvsrc,"struct*",$cvdst,"double",$cvpower) ; CVAPI(void) cvExp( const CvArr* src, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvExp","struct*",$cvsrc,"struct*",$cvdst) ; CVAPI(void) cvLog( const CvArr* src, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvLog","struct*",$cvsrc,"struct*",$cvdst) ; CVAPI(float) cvFastArctan( float y, float x ); ; local $_aResult = DllCall($_opencv_worldDLL,"float:cdecl","cvFastArctan","struct",$cvy,"struct",$cvx) ; CVAPI(float) cvCbrt( float value ); ; local $_aResult = DllCall($_opencv_worldDLL,"float:cdecl","cvCbrt","struct",$cvvalue) ; CVAPI(int) cvCheckArr( const CvArr* arr, int flags CV_DEFAULT(0), double min_val CV_DEFAULT(0), double max_val CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvCheckArr","struct*",$cvarr,"int",$cvflags,"double",$cvmin_val,"double",$cvmax_val) ; CVAPI(void) cvRandArr( CvRNG* rng, CvArr* arr, int dist_type, CvScalar param1, CvScalar param2 ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvRandArr","struct*",$cvrng,"struct*",$cvarr,"int",$cvdist_type,"struct",$cvparam1,"struct",$cvparam2) ; CVAPI(void) cvRandShuffle( CvArr* mat, CvRNG* rng, double iter_factor CV_DEFAULT(1.)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvRandShuffle","struct*",$cvmat,"struct*",$cvrng,"double",$cviter_factor) ; CVAPI(void) cvSort( const CvArr* src, CvArr* dst CV_DEFAULT(NULL), CvArr* idxmat CV_DEFAULT(NULL), int flags CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSort","struct*",$cvsrc,"struct*",$cvdst,"struct*",$cvidxmat,"int",$cvflags) ; CVAPI(int) cvSolveCubic( const CvMat* coeffs, CvMat* roots ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvSolveCubic","struct*",$cvcoeffs,"struct*",$cvroots) ; CVAPI(void) cvSolvePoly(const CvMat* coeffs, CvMat* roots2, int maxiter CV_DEFAULT(20), int fig CV_DEFAULT(100)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSolvePoly","struct*",$cvcoeffs,"struct*",$cvroots2,"int",$cvmaxiter,"int",$cvfig) ; CVAPI(void) cvCrossProduct( const CvArr* src1, const CvArr* src2, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCrossProduct","struct*",$cvsrc1,"struct*",$cvsrc2,"struct*",$cvdst) ; CVAPI(void) cvGEMM( const CvArr* src1, const CvArr* src2, double alpha, const CvArr* src3, double beta, CvArr* dst, int tABC CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvGEMM","struct*",$cvsrc1,"struct*",$cvsrc2,"double",$cvalpha,"struct*",$cvsrc3,"double",$cvbeta,"struct*",$cvdst,"int",$cvtABC) ; CVAPI(void) cvTransform( const CvArr* src, CvArr* dst, const CvMat* transmat, const CvMat* shiftvec CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvTransform","struct*",$cvsrc,"struct*",$cvdst,"struct*",$cvtransmat,"struct*",$cvshiftvec) ; CVAPI(void) cvPerspectiveTransform( const CvArr* src, CvArr* dst, const CvMat* mat ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvPerspectiveTransform","struct*",$cvsrc,"struct*",$cvdst,"struct*",$cvmat) ; CVAPI(void) cvMulTransposed( const CvArr* src, CvArr* dst, int order, const CvArr* delta CV_DEFAULT(NULL), double scale CV_DEFAULT(1.) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvMulTransposed","struct*",$cvsrc,"struct*",$cvdst,"int",$cvorder,"struct*",$cvdelta,"double",$cvscale) ; CVAPI(void) cvTranspose( const CvArr* src, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvTranspose","struct*",$cvsrc,"struct*",$cvdst) ; CVAPI(void) cvCompleteSymm( CvMat* matrix, int LtoR CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCompleteSymm","struct*",$cvmatrix,"int",$cvLtoR) ; CVAPI(void) cvFlip( const CvArr* src, CvArr* dst CV_DEFAULT(NULL), int flip_mode CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvFlip","struct*",$cvsrc,"struct*",$cvdst,"int",$cvflip_mode) ; CVAPI(void) cvSVD( CvArr* A, CvArr* W, CvArr* U CV_DEFAULT(NULL), CvArr* V CV_DEFAULT(NULL), int flags CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSVD","struct*",$cvA,"struct*",$cvW,"struct*",$cvU,"struct*",$cvV,"int",$cvflags) ; CVAPI(void) cvSVBkSb( const CvArr* W, const CvArr* U, const CvArr* V, const CvArr* B, CvArr* X, int flags ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSVBkSb","struct*",$cvW,"struct*",$cvU,"struct*",$cvV,"struct*",$cvB,"struct*",$cvX,"int",$cvflags) ; CVAPI(double) cvInvert( const CvArr* src, CvArr* dst, int method CV_DEFAULT(CV_LU)); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvInvert","struct*",$cvsrc,"struct*",$cvdst,"int",$cvmethod) ; CVAPI(int) cvSolve( const CvArr* src1, const CvArr* src2, CvArr* dst, int method CV_DEFAULT(CV_LU)); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvSolve","struct*",$cvsrc1,"struct*",$cvsrc2,"struct*",$cvdst,"int",$cvmethod) ; CVAPI(double) cvDet( const CvArr* mat ); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvDet","struct*",$cvmat) ; CVAPI(CvScalar) cvTrace( const CvArr* mat ); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvTrace","struct*",$cvmat) ; CVAPI(void) cvEigenVV( CvArr* mat, CvArr* evects, CvArr* evals, double eps CV_DEFAULT(0), int lowindex CV_DEFAULT(-1), int highindex CV_DEFAULT(-1)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvEigenVV","struct*",$cvmat,"struct*",$cvevects,"struct*",$cvevals,"double",$cveps,"int",$cvlowindex,"int",$cvhighindex) ; CVAPI(void) cvSetIdentity( CvArr* mat, CvScalar value CV_DEFAULT(cvRealScalar(1)) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetIdentity","struct*",$cvmat,"struct",$cvvalue,"struct",$cv,"struct",$cv) ; CVAPI(CvArr*) cvRange( CvArr* mat, double start, double end ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvRange","struct*",$cvmat,"double",$cvstart,"double",$cvend) ; CVAPI(void) cvCalcCovarMatrix( const CvArr** vects, int count, CvArr* cov_mat, CvArr* avg, int flags ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCalcCovarMatrix","struct*",$cvvects,"int",$cvcount,"struct*",$cvcov_mat,"struct*",$cvavg,"int",$cvflags) ; CVAPI(void) cvCalcPCA( const CvArr* data, CvArr* mean, CvArr* eigenvals, CvArr* eigenvects, int flags ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCalcPCA","struct*",$cvdata,"struct*",$cvmean,"struct*",$cveigenvals,"struct*",$cveigenvects,"int",$cvflags) ; CVAPI(void) cvProjectPCA( const CvArr* data, const CvArr* mean, const CvArr* eigenvects, CvArr* result ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvProjectPCA","struct*",$cvdata,"struct*",$cvmean,"struct*",$cveigenvects,"struct*",$cvresult) ; CVAPI(void) cvBackProjectPCA( const CvArr* proj, const CvArr* mean, const CvArr* eigenvects, CvArr* result ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvBackProjectPCA","struct*",$cvproj,"struct*",$cvmean,"struct*",$cveigenvects,"struct*",$cvresult) ; CVAPI(double) cvMahalanobis( const CvArr* vec1, const CvArr* vec2, const CvArr* mat ); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvMahalanobis","struct*",$cvvec1,"struct*",$cvvec2,"struct*",$cvmat) ; CVAPI(CvScalar) cvSum( const CvArr* arr ); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvSum","struct*",$cvarr) ; CVAPI(int) cvCountNonZero( const CvArr* arr ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvCountNonZero","struct*",$cvarr) ; CVAPI(CvScalar) cvAvg( const CvArr* arr, const CvArr* mask CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvAvg","struct*",$cvarr,"struct*",$cvmask) ; CVAPI(void) cvAvgSdv( const CvArr* arr, CvScalar* mean, CvScalar* std_dev, const CvArr* mask CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvAvgSdv","struct*",$cvarr,"struct*",$cvmean,"struct*",$cvstd_dev,"struct*",$cvmask) ; CVAPI(void) cvMinMaxLoc( const CvArr* arr, double* min_val, double* max_val, CvPoint* min_loc CV_DEFAULT(NULL), CvPoint* max_loc CV_DEFAULT(NULL), const CvArr* mask CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvMinMaxLoc","struct*",$cvarr,"struct*",$cvmin_val,"struct*",$cvmax_val,"struct*",$cvmin_loc,"struct*",$cvmax_loc,"struct*",$cvmask) ; CVAPI(double) cvNorm( const CvArr* arr1, const CvArr* arr2 CV_DEFAULT(NULL), int norm_type CV_DEFAULT(CV_L2), const CvArr* mask CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvNorm","struct*",$cvarr1,"struct*",$cvarr2,"int",$cvnorm_type,"struct*",$cvmask) ; CVAPI(void) cvNormalize( const CvArr* src, CvArr* dst, double a CV_DEFAULT(1.), double b CV_DEFAULT(0.), int norm_type CV_DEFAULT(CV_L2), const CvArr* mask CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvNormalize","struct*",$cvsrc,"struct*",$cvdst,"double",$cva,"double",$cvb,"int",$cvnorm_type,"struct*",$cvmask) ; CVAPI(void) cvReduce( const CvArr* src, CvArr* dst, int dim CV_DEFAULT(-1), int op CV_DEFAULT(CV_REDUCE_SUM) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvReduce","struct*",$cvsrc,"struct*",$cvdst,"int",$cvdim,"int",$cvop) ; CVAPI(void) cvDFT( const CvArr* src, CvArr* dst, int flags, int nonzero_rows CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvDFT","struct*",$cvsrc,"struct*",$cvdst,"int",$cvflags,"int",$cvnonzero_rows) ; CVAPI(void) cvMulSpectrums( const CvArr* src1, const CvArr* src2, CvArr* dst, int flags ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvMulSpectrums","struct*",$cvsrc1,"struct*",$cvsrc2,"struct*",$cvdst,"int",$cvflags) ; CVAPI(int) cvGetOptimalDFTSize( int size0 ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGetOptimalDFTSize","int",$cvsize0) ; CVAPI(void) cvDCT( const CvArr* src, CvArr* dst, int flags ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvDCT","struct*",$cvsrc,"struct*",$cvdst,"int",$cvflags) ; CVAPI(int) cvSliceLength( CvSlice slice, const CvSeq* seq ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvSliceLength","struct",$cvslice,"struct*",$cvseq) ; CVAPI(CvMemStorage*) cvCreateMemStorage( int block_size CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateMemStorage","int",$cvblock_size) ; CVAPI(CvMemStorage*) cvCreateChildMemStorage( CvMemStorage* parent ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateChildMemStorage","struct*",$cvparent) ; CVAPI(void) cvReleaseMemStorage( CvMemStorage** storage ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvReleaseMemStorage","struct*",$cvstorage) ; CVAPI(void) cvClearMemStorage( CvMemStorage* storage ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvClearMemStorage","struct*",$cvstorage) ; CVAPI(void) cvSaveMemStoragePos( const CvMemStorage* storage, CvMemStoragePos* pos ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSaveMemStoragePos","struct*",$cvstorage,"struct*",$cvpos) ; CVAPI(void) cvRestoreMemStoragePos( CvMemStorage* storage, CvMemStoragePos* pos ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvRestoreMemStoragePos","struct*",$cvstorage,"struct*",$cvpos) ; CVAPI(void*) cvMemStorageAlloc( CvMemStorage* storage, size_t size ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvMemStorageAlloc","struct*",$cvstorage,"ulong_ptr",$cvsize) ; CVAPI(CvSeq*) cvCreateSeq( int seq_flags, size_t header_size, size_t elem_size, CvMemStorage* storage ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateSeq","int",$cvseq_flags,"ulong_ptr",$cvheader_size,"ulong_ptr",$cvelem_size,"struct*",$cvstorage) ; CVAPI(void) cvSetSeqBlockSize( CvSeq* seq, int delta_elems ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetSeqBlockSize","struct*",$cvseq,"int",$cvdelta_elems) ; CVAPI(schar*) cvSeqPush( CvSeq* seq, const void* element CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvSeqPush","struct*",$cvseq,"struct*",$cvelement) ; CVAPI(schar*) cvSeqPushFront( CvSeq* seq, const void* element CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvSeqPushFront","struct*",$cvseq,"struct*",$cvelement) ; CVAPI(void) cvSeqPop( CvSeq* seq, void* element CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSeqPop","struct*",$cvseq,"struct*",$cvelement) ; CVAPI(void) cvSeqPopFront( CvSeq* seq, void* element CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSeqPopFront","struct*",$cvseq,"struct*",$cvelement) ; CVAPI(void) cvSeqPushMulti( CvSeq* seq, const void* elements, int count, int in_front CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSeqPushMulti","struct*",$cvseq,"struct*",$cvelements,"int",$cvcount,"int",$cvin_front) ; CVAPI(void) cvSeqPopMulti( CvSeq* seq, void* elements, int count, int in_front CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSeqPopMulti","struct*",$cvseq,"struct*",$cvelements,"int",$cvcount,"int",$cvin_front) ; CVAPI(schar*) cvSeqInsert( CvSeq* seq, int before_index, const void* element CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvSeqInsert","struct*",$cvseq,"int",$cvbefore_index,"struct*",$cvelement) ; CVAPI(void) cvSeqRemove( CvSeq* seq, int index ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSeqRemove","struct*",$cvseq,"int",$cvindex) ; CVAPI(void) cvClearSeq( CvSeq* seq ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvClearSeq","struct*",$cvseq) ; CVAPI(schar*) cvGetSeqElem( const CvSeq* seq, int index ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvGetSeqElem","struct*",$cvseq,"int",$cvindex) ; CVAPI(int) cvSeqElemIdx( const CvSeq* seq, const void* element, CvSeqBlock** block CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvSeqElemIdx","struct*",$cvseq,"struct*",$cvelement,"struct*",$cvblock) ; CVAPI(void) cvStartAppendToSeq( CvSeq* seq, CvSeqWriter* writer ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvStartAppendToSeq","struct*",$cvseq,"struct*",$cvwriter) ; CVAPI(void) cvStartWriteSeq( int seq_flags, int header_size, int elem_size, CvMemStorage* storage, CvSeqWriter* writer ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvStartWriteSeq","int",$cvseq_flags,"int",$cvheader_size,"int",$cvelem_size,"struct*",$cvstorage,"struct*",$cvwriter) ; CVAPI(CvSeq*) cvEndWriteSeq( CvSeqWriter* writer ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvEndWriteSeq","struct*",$cvwriter) ; CVAPI(void) cvFlushSeqWriter( CvSeqWriter* writer ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvFlushSeqWriter","struct*",$cvwriter) ; CVAPI(void) cvStartReadSeq( const CvSeq* seq, CvSeqReader* reader, int reverse CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvStartReadSeq","struct*",$cvseq,"struct*",$cvreader,"int",$cvreverse) ; CVAPI(int) cvGetSeqReaderPos( CvSeqReader* reader ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGetSeqReaderPos","struct*",$cvreader) ; CVAPI(void) cvSetSeqReaderPos( CvSeqReader* reader, int index, int is_relative CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetSeqReaderPos","struct*",$cvreader,"int",$cvindex,"int",$cvis_relative) ; CVAPI(void*) cvCvtSeqToArray( const CvSeq* seq, void* elements, CvSlice slice CV_DEFAULT(CV_WHOLE_SEQ) ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCvtSeqToArray","struct*",$cvseq,"struct*",$cvelements,"struct",$cvslice) ; CVAPI(CvSeq*) cvMakeSeqHeaderForArray( int seq_type, int header_size, int elem_size, void* elements, int total, CvSeq* seq, CvSeqBlock* block ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvMakeSeqHeaderForArray","int",$cvseq_type,"int",$cvheader_size,"int",$cvelem_size,"struct*",$cvelements,"int",$cvtotal,"struct*",$cvseq,"struct*",$cvblock) ; CVAPI(CvSeq*) cvSeqSlice( const CvSeq* seq, CvSlice slice, CvMemStorage* storage CV_DEFAULT(NULL), int copy_data CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvSeqSlice","struct*",$cvseq,"struct",$cvslice,"struct*",$cvstorage,"int",$cvcopy_data) ; CVAPI(void) cvSeqRemoveSlice( CvSeq* seq, CvSlice slice ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSeqRemoveSlice","struct*",$cvseq,"struct",$cvslice) ; CVAPI(void) cvSeqInsertSlice( CvSeq* seq, int before_index, const CvArr* from_arr ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSeqInsertSlice","struct*",$cvseq,"int",$cvbefore_index,"struct*",$cvfrom_arr) ; CVAPI(void) cvSeqSort( CvSeq* seq, CvCmpFunc func, void* userdata CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSeqSort","struct*",$cvseq,"struct",$cvfunc,"struct*",$cvuserdata) ; CVAPI(schar*) cvSeqSearch( CvSeq* seq, const void* elem, CvCmpFunc func, int is_sorted, int* elem_idx, void* userdata CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvSeqSearch","struct*",$cvseq,"struct*",$cvelem,"struct",$cvfunc,"int",$cvis_sorted,"struct*",$cvelem_idx,"struct*",$cvuserdata) ; CVAPI(void) cvSeqInvert( CvSeq* seq ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSeqInvert","struct*",$cvseq) ; CVAPI(int) cvSeqPartition( const CvSeq* seq, CvMemStorage* storage, CvSeq** labels, CvCmpFunc is_equal, void* userdata ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvSeqPartition","struct*",$cvseq,"struct*",$cvstorage,"struct*",$cvlabels,"struct",$cvis_equal,"struct*",$cvuserdata) ; CVAPI(void) cvChangeSeqBlock( void* reader, int direction ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvChangeSeqBlock","struct*",$cvreader,"int",$cvdirection) ; CVAPI(void) cvCreateSeqBlock( CvSeqWriter* writer ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCreateSeqBlock","struct*",$cvwriter) ; CVAPI(CvSet*) cvCreateSet( int set_flags, int header_size, int elem_size, CvMemStorage* storage ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateSet","int",$cvset_flags,"int",$cvheader_size,"int",$cvelem_size,"struct*",$cvstorage) ; CVAPI(int) cvSetAdd( CvSet* set_header, CvSetElem* elem CV_DEFAULT(NULL), CvSetElem** inserted_elem CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvSetAdd","struct*",$cvset_header,"struct*",$cvelem,"struct*",$cvinserted_elem) ; CVAPI(void) cvSetRemove( CvSet* set_header, int index ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetRemove","struct*",$cvset_header,"int",$cvindex) ; CVAPI(void) cvClearSet( CvSet* set_header ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvClearSet","struct*",$cvset_header) ; CVAPI(CvGraph*) cvCreateGraph( int graph_flags, int header_size, int vtx_size, int edge_size, CvMemStorage* storage ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateGraph","int",$cvgraph_flags,"int",$cvheader_size,"int",$cvvtx_size,"int",$cvedge_size,"struct*",$cvstorage) ; CVAPI(int) cvGraphAddVtx( CvGraph* graph, const CvGraphVtx* vtx CV_DEFAULT(NULL), CvGraphVtx** inserted_vtx CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGraphAddVtx","struct*",$cvgraph,"struct*",$cvvtx,"struct*",$cvinserted_vtx) ; CVAPI(int) cvGraphRemoveVtx( CvGraph* graph, int index ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGraphRemoveVtx","struct*",$cvgraph,"int",$cvindex) ; CVAPI(int) cvGraphRemoveVtxByPtr( CvGraph* graph, CvGraphVtx* vtx ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGraphRemoveVtxByPtr","struct*",$cvgraph,"struct*",$cvvtx) ; CVAPI(int) cvGraphAddEdge( CvGraph* graph, int start_idx, int end_idx, const CvGraphEdge* edge CV_DEFAULT(NULL), CvGraphEdge** inserted_edge CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGraphAddEdge","struct*",$cvgraph,"int",$cvstart_idx,"int",$cvend_idx,"struct*",$cvedge,"struct*",$cvinserted_edge) ; CVAPI(int) cvGraphAddEdgeByPtr( CvGraph* graph, CvGraphVtx* start_vtx, CvGraphVtx* end_vtx, const CvGraphEdge* edge CV_DEFAULT(NULL), CvGraphEdge** inserted_edge CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGraphAddEdgeByPtr","struct*",$cvgraph,"struct*",$cvstart_vtx,"struct*",$cvend_vtx,"struct*",$cvedge,"struct*",$cvinserted_edge) ; CVAPI(void) cvGraphRemoveEdge( CvGraph* graph, int start_idx, int end_idx ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvGraphRemoveEdge","struct*",$cvgraph,"int",$cvstart_idx,"int",$cvend_idx) ; CVAPI(void) cvGraphRemoveEdgeByPtr( CvGraph* graph, CvGraphVtx* start_vtx, CvGraphVtx* end_vtx ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvGraphRemoveEdgeByPtr","struct*",$cvgraph,"struct*",$cvstart_vtx,"struct*",$cvend_vtx) ; CVAPI(CvGraphEdge*) cvFindGraphEdge( const CvGraph* graph, int start_idx, int end_idx ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvFindGraphEdge","struct*",$cvgraph,"int",$cvstart_idx,"int",$cvend_idx) ; CVAPI(CvGraphEdge*) cvFindGraphEdgeByPtr( const CvGraph* graph, const CvGraphVtx* start_vtx, const CvGraphVtx* end_vtx ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvFindGraphEdgeByPtr","struct*",$cvgraph,"struct*",$cvstart_vtx,"struct*",$cvend_vtx) ; CVAPI(void) cvClearGraph( CvGraph* graph ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvClearGraph","struct*",$cvgraph) ; CVAPI(int) cvGraphVtxDegree( const CvGraph* graph, int vtx_idx ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGraphVtxDegree","struct*",$cvgraph,"int",$cvvtx_idx) ; CVAPI(int) cvGraphVtxDegreeByPtr( const CvGraph* graph, const CvGraphVtx* vtx ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGraphVtxDegreeByPtr","struct*",$cvgraph,"struct*",$cvvtx) ; CVAPI(CvGraphScanner*) cvCreateGraphScanner( CvGraph* graph, CvGraphVtx* vtx CV_DEFAULT(NULL), int mask CV_DEFAULT(CV_GRAPH_ALL_ITEMS)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateGraphScanner","struct*",$cvgraph,"struct*",$cvvtx,"int",$cvmask) ; CVAPI(void) cvReleaseGraphScanner( CvGraphScanner** scanner ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvReleaseGraphScanner","struct*",$cvscanner) ; CVAPI(int) cvNextGraphItem( CvGraphScanner* scanner ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvNextGraphItem","struct*",$cvscanner) ; CVAPI(CvGraph*) cvCloneGraph( const CvGraph* graph, CvMemStorage* storage ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCloneGraph","struct*",$cvgraph,"struct*",$cvstorage) ; CVAPI(void) cvLUT( const CvArr* src, CvArr* dst, const CvArr* lut ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvLUT","struct*",$cvsrc,"struct*",$cvdst,"struct*",$cvlut) ; CVAPI(void) cvInitTreeNodeIterator( CvTreeNodeIterator* tree_iterator, const void* first, int max_level ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvInitTreeNodeIterator","struct*",$cvtree_iterator,"struct*",$cvfirst,"int",$cvmax_level) ; CVAPI(void*) cvNextTreeNode( CvTreeNodeIterator* tree_iterator ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvNextTreeNode","struct*",$cvtree_iterator) ; CVAPI(void*) cvPrevTreeNode( CvTreeNodeIterator* tree_iterator ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvPrevTreeNode","struct*",$cvtree_iterator) ; CVAPI(void) cvInsertNodeIntoTree( void* node, void* parent, void* frame ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvInsertNodeIntoTree","struct*",$cvnode,"struct*",$cvparent,"struct*",$cvframe) ; CVAPI(void) cvRemoveNodeFromTree( void* node, void* frame ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvRemoveNodeFromTree","struct*",$cvnode,"struct*",$cvframe) ; CVAPI(CvSeq*) cvTreeToNodeSeq( const void* first, int header_size, CvMemStorage* storage ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvTreeToNodeSeq","struct*",$cvfirst,"int",$cvheader_size,"struct*",$cvstorage) ; CVAPI(int) cvKMeans2( const CvArr* samples, int cluster_count, CvArr* labels, CvTermCriteria termcrit, int attempts CV_DEFAULT(1), CvRNG* rng CV_DEFAULT(0), int flags CV_DEFAULT(0), CvArr* _centers CV_DEFAULT(0), double* compactness CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvKMeans2","struct*",$cvsamples,"int",$cvcluster_count,"struct*",$cvlabels,"struct",$cvtermcrit,"int",$cvattempts,"struct*",$cvrng,"int",$cvflags,"struct*",$cv_centers,"struct*",$cvcompactness) ; CVAPI(int) cvUseOptimized( int on_off ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvUseOptimized","int",$cvon_off) ; CVAPI(void) cvSetIPLAllocators( Cv_iplCreateImageHeader create_header, Cv_iplAllocateImageData allocate_data, Cv_iplDeallocate deallocate, Cv_iplCreateROI create_roi, Cv_iplCloneImage clone_image ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetIPLAllocators","struct",$cvcreate_header,"struct",$cvallocate_data,"struct",$cvdeallocate,"struct",$cvcreate_roi,"struct",$cvclone_image) ; CVAPI(CvFileStorage*) cvOpenFileStorage( const char* filename, CvMemStorage* memstorage, int flags, const char* encoding CV_DEFAULT(NULL) ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvOpenFileStorage","struct*",$cvfilename,"struct*",$cvmemstorage,"int",$cvflags,"struct*",$cvencoding) ; CVAPI(void) cvReleaseFileStorage( CvFileStorage** fs ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvReleaseFileStorage","struct*",$cvfs) ; CVAPI(const char*) cvAttrValue( const CvAttrList* attr, const char* attr_name ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvAttrValue","struct*",$cvattr,"struct*",$cvattr_name) ; CVAPI(void) cvStartWriteStruct( CvFileStorage* fs, const char* name, int struct_flags, const char* type_name CV_DEFAULT(NULL), CvAttrList attributes CV_DEFAULT(cvAttrList())); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvStartWriteStruct","struct*",$cvfs,"struct*",$cvname,"int",$cvstruct_flags,"struct*",$cvtype_name,"struct",$cvattributes,"struct",$cv,"struct",$cv) ; CVAPI(void) cvEndWriteStruct( CvFileStorage* fs ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvEndWriteStruct","struct*",$cvfs) ; CVAPI(void) cvWriteInt( CvFileStorage* fs, const char* name, int value ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvWriteInt","struct*",$cvfs,"struct*",$cvname,"int",$cvvalue) ; CVAPI(void) cvWriteReal( CvFileStorage* fs, const char* name, double value ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvWriteReal","struct*",$cvfs,"struct*",$cvname,"double",$cvvalue) ; CVAPI(void) cvWriteString( CvFileStorage* fs, const char* name, const char* str, int quote CV_DEFAULT(0) ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvWriteString","struct*",$cvfs,"struct*",$cvname,"struct*",$cvstr,"int",$cvquote) ; CVAPI(void) cvWriteComment( CvFileStorage* fs, const char* comment, int eol_comment ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvWriteComment","struct*",$cvfs,"struct*",$cvcomment,"int",$cveol_comment) ; CVAPI(void) cvWrite( CvFileStorage* fs, const char* name, const void* ptr, CvAttrList attributes CV_DEFAULT(cvAttrList())); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvWrite","struct*",$cvfs,"struct*",$cvname,"struct*",$cvptr,"struct",$cvattributes,"struct",$cv,"struct",$cv) ; CVAPI(void) cvStartNextStream( CvFileStorage* fs ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvStartNextStream","struct*",$cvfs) ; CVAPI(void) cvWriteRawData( CvFileStorage* fs, const void* src, int len, const char* dt ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvWriteRawData","struct*",$cvfs,"struct*",$cvsrc,"int",$cvlen,"struct*",$cvdt) ; CVAPI(void) cvWriteRawDataBase64( CvFileStorage* fs, const void* src, int len, const char* dt ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvWriteRawDataBase64","struct*",$cvfs,"struct*",$cvsrc,"int",$cvlen,"struct*",$cvdt) ; CVAPI(CvStringHashNode*) cvGetHashedKey( CvFileStorage* fs, const char* name, int len CV_DEFAULT(-1), int create_missing CV_DEFAULT(0)); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvGetHashedKey","struct*",$cvfs,"struct*",$cvname,"int",$cvlen,"int",$cvcreate_missing) ; CVAPI(CvFileNode*) cvGetRootFileNode( const CvFileStorage* fs, int stream_index CV_DEFAULT(0) ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvGetRootFileNode","struct*",$cvfs,"int",$cvstream_index) ; CVAPI(CvFileNode*) cvGetFileNode( CvFileStorage* fs, CvFileNode* map, const CvStringHashNode* key, int create_missing CV_DEFAULT(0) ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvGetFileNode","struct*",$cvfs,"struct*",$cvmap,"struct*",$cvkey,"int",$cvcreate_missing) ; CVAPI(CvFileNode*) cvGetFileNodeByName( const CvFileStorage* fs, const CvFileNode* map, const char* name ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvGetFileNodeByName","struct*",$cvfs,"struct*",$cvmap,"struct*",$cvname) ; CVAPI(void*) cvRead( CvFileStorage* fs, CvFileNode* node, CvAttrList* attributes CV_DEFAULT(NULL)); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvRead","struct*",$cvfs,"struct*",$cvnode,"struct*",$cvattributes) ; CVAPI(void) cvStartReadRawData( const CvFileStorage* fs, const CvFileNode* src, CvSeqReader* reader ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvStartReadRawData","struct*",$cvfs,"struct*",$cvsrc,"struct*",$cvreader) ; CVAPI(void) cvReadRawDataSlice( const CvFileStorage* fs, CvSeqReader* reader, int count, void* dst, const char* dt ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvReadRawDataSlice","struct*",$cvfs,"struct*",$cvreader,"int",$cvcount,"struct*",$cvdst,"struct*",$cvdt) ; CVAPI(void) cvReadRawData( const CvFileStorage* fs, const CvFileNode* src, void* dst, const char* dt ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvReadRawData","struct*",$cvfs,"struct*",$cvsrc,"struct*",$cvdst,"struct*",$cvdt) ; CVAPI(void) cvWriteFileNode( CvFileStorage* fs, const char* new_node_name, const CvFileNode* node, int embed ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvWriteFileNode","struct*",$cvfs,"struct*",$cvnew_node_name,"struct*",$cvnode,"int",$cvembed) ; CVAPI(const char*) cvGetFileNodeName( const CvFileNode* node ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvGetFileNodeName","struct*",$cvnode) ; CVAPI(void) cvRegisterType( const CvTypeInfo* info ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvRegisterType","struct*",$cvinfo) ; CVAPI(void) cvUnregisterType( const char* type_name ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvUnregisterType","struct*",$cvtype_name) ; CVAPI(CvTypeInfo*) cvFirstType(void); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvFirstType","struct",$cv) ; CVAPI(CvTypeInfo*) cvFindType( const char* type_name ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvFindType","struct*",$cvtype_name) ; CVAPI(CvTypeInfo*) cvTypeOf( const void* struct_ptr ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvTypeOf","struct*",$cvstruct_ptr) ; CVAPI(void) cvRelease( void** struct_ptr ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvRelease","struct*",$cvstruct_ptr) ; CVAPI(void*) cvClone( const void* struct_ptr ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvClone","struct*",$cvstruct_ptr) ; CVAPI(int64) cvGetTickCount( void ); ; local $_aResult = DllCall($_opencv_worldDLL,"int64:cdecl","cvGetTickCount","struct",$cv) ; CVAPI(double) cvGetTickFrequency( void ); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvGetTickFrequency","struct",$cv) ; CVAPI(int) cvCheckHardwareSupport(int feature); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvCheckHardwareSupport","int",$cvfeature) ; CVAPI(int) cvGetNumThreads( void ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGetNumThreads","struct",$cv) ; CVAPI(void) cvSetNumThreads( int threads CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetNumThreads","int",$cvthreads) ; CVAPI(int) cvGetThreadNum( void ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGetThreadNum","struct",$cv) ; CVAPI(int) cvGetErrStatus( void ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGetErrStatus","struct",$cv) ; CVAPI(void) cvSetErrStatus( int status ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetErrStatus","int",$cvstatus) ; CVAPI(int) cvGetErrMode( void ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGetErrMode","struct",$cv) ; CVAPI(int) cvSetErrMode( int mode ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvSetErrMode","int",$cvmode) ; CVAPI(void) cvError( int status, const char* func_name, const char* err_msg, const char* file_name, int line ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvError","int",$cvstatus,"struct*",$cvfunc_name,"struct*",$cverr_msg,"struct*",$cvfile_name,"int",$cvline) ; CVAPI(const char*) cvErrorStr( int status ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvErrorStr","int",$cvstatus) ; CVAPI(int) cvGetErrInfo( const char** errcode_desc, const char** description, const char** filename, int* line ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGetErrInfo","struct*",$cverrcode_desc,"struct*",$cvdescription,"struct*",$cvfilename,"struct*",$cvline) ; CVAPI(int) cvErrorFromIppStatus( int ipp_status ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvErrorFromIppStatus","int",$cvipp_status) ; CVAPI(CvErrorCallback) cvRedirectError( CvErrorCallback error_handler, void* userdata CV_DEFAULT(NULL), void** prev_userdata CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvRedirectError","struct",$cverror_handler,"struct*",$cvuserdata,"struct*",$cvprev_userdata) ; CVAPI(int) cvNulDevReport( int status, const char* func_name, const char* err_msg, const char* file_name, int line, void* userdata ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvNulDevReport","int",$cvstatus,"struct*",$cvfunc_name,"struct*",$cverr_msg,"struct*",$cvfile_name,"int",$cvline,"struct*",$cvuserdata) ; CVAPI(int) cvStdErrReport( int status, const char* func_name, const char* err_msg, const char* file_name, int line, void* userdata ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvStdErrReport","int",$cvstatus,"struct*",$cvfunc_name,"struct*",$cverr_msg,"struct*",$cvfile_name,"int",$cvline,"struct*",$cvuserdata) ; CVAPI(int) cvGuiBoxReport( int status, const char* func_name, const char* err_msg, const char* file_name, int line, void* userdata ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGuiBoxReport","int",$cvstatus,"struct*",$cvfunc_name,"struct*",$cverr_msg,"struct*",$cvfile_name,"int",$cvline,"struct*",$cvuserdata) #endregion core_c.h #region highgui_c.h ; CVAPI(CvFont) cvFontQt(const char* nameFont, int pointSize CV_DEFAULT(-1), CvScalar color CV_DEFAULT(cvScalarAll(0)), int weight CV_DEFAULT(CV_FONT_NORMAL), int style CV_DEFAULT(CV_STYLE_NORMAL), int spacing CV_DEFAULT(0)); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvFontQt","struct*",$cvnameFont,"int",$cvpointSize,"struct",$cvcolor,"struct",$cv,"struct",$cv,"int",$cvweight,"int",$cvstyle,"int",$cvspacing) ; CVAPI(void) cvAddText(const CvArr* img, const char* text, CvPoint org, CvFont* arg2); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvAddText","struct*",$cvimg,"struct*",$cvtext,"struct",$cvorg,"struct*",$cvarg2) ; CVAPI(void) cvDisplayOverlay(const char* name, const char* text, int delayms CV_DEFAULT(0)); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvDisplayOverlay","struct*",$cvname,"struct*",$cvtext,"int",$cvdelayms) ; CVAPI(void) cvDisplayStatusBar(const char* name, const char* text, int delayms CV_DEFAULT(0)); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvDisplayStatusBar","struct*",$cvname,"struct*",$cvtext,"int",$cvdelayms) ; CVAPI(void) cvSaveWindowParameters(const char* name); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSaveWindowParameters","struct*",$cvname) ; CVAPI(void) cvLoadWindowParameters(const char* name); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvLoadWindowParameters","struct*",$cvname) ; CVAPI(int) cvStartLoop(int (*pt2Func)(int argc, char* argv[]), int argc, char* argv[]); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvStartLoop","int",$cv,"struct",$cv,"struct",$cv,"int",$cvargc,"struct*",$cvargv[],"struct",$cv,"int",$cvargc,"struct*",$cvargv[]) ; CVAPI(void) cvStopLoop( void ); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvStopLoop","struct",$cv) ; CVAPI(int) cvCreateButton( const char* button_name CV_DEFAULT(NULL),CvButtonCallback on_change CV_DEFAULT(NULL), void* userdata CV_DEFAULT(NULL) , int button_type CV_DEFAULT(CV_PUSH_BUTTON), int initial_button_state CV_DEFAULT(0)); ; ;TODO: Other dll local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvCreateButton","struct*",$cvbutton_name,"struct",$cvon_change,"struct*",$cvuserdata,"int",$cvbutton_type,"int",$cvinitial_button_state) ; CVAPI(int) cvInitSystem( int argc, char** argv ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvInitSystem","int",$cvargc,"struct*",$cvargv) ; CVAPI(int) cvStartWindowThread( void ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvStartWindowThread","struct",$cv) ; CVAPI(int) cvNamedWindow( const char* name, int flags CV_DEFAULT(CV_WINDOW_AUTOSIZE) ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvNamedWindow","struct*",$cvname,"int",$cvflags) ; CVAPI(void) cvSetWindowProperty(const char* name, int prop_id, double prop_value); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetWindowProperty","struct*",$cvname,"int",$cvprop_id,"double",$cvprop_value) ; CVAPI(double) cvGetWindowProperty(const char* name, int prop_id); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvGetWindowProperty","struct*",$cvname,"int",$cvprop_id) ; CVAPI(cv::Rect)cvGetWindowImageRect(const char* name); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvGetWindowImageRect","struct*",$cvname) ; CVAPI(void) cvShowImage( const char* name, const CvArr* image ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvShowImage","struct*",$cvname,"struct*",$cvimage) ; CVAPI(void) cvResizeWindow( const char* name, int width, int height ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvResizeWindow","struct*",$cvname,"int",$cvwidth,"int",$cvheight) ; CVAPI(void) cvMoveWindow( const char* name, int x, int y ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvMoveWindow","struct*",$cvname,"int",$cvx,"int",$cvy) ; CVAPI(void) cvDestroyWindow( const char* name ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvDestroyWindow","struct*",$cvname) ; CVAPI(void) cvDestroyAllWindows(void); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvDestroyAllWindows","struct",$cv) ; CVAPI(void*) cvGetWindowHandle( const char* name ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvGetWindowHandle","struct*",$cvname) ; CVAPI(const char*) cvGetWindowName( void* window_handle ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvGetWindowName","struct*",$cvwindow_handle) ; CVAPI(int) cvCreateTrackbar( const char* trackbar_name, const char* window_name, int* value, int count, CvTrackbarCallback on_change CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvCreateTrackbar","struct*",$cvtrackbar_name,"struct*",$cvwindow_name,"struct*",$cvvalue,"int",$cvcount,"struct",$cvon_change) ; CVAPI(int) cvCreateTrackbar2( const char* trackbar_name, const char* window_name, int* value, int count, CvTrackbarCallback2 on_change, void* userdata CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvCreateTrackbar2","struct*",$cvtrackbar_name,"struct*",$cvwindow_name,"struct*",$cvvalue,"int",$cvcount,"struct",$cvon_change,"struct*",$cvuserdata) ; CVAPI(int) cvGetTrackbarPos( const char* trackbar_name, const char* window_name ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGetTrackbarPos","struct*",$cvtrackbar_name,"struct*",$cvwindow_name) ; CVAPI(void) cvSetTrackbarPos( const char* trackbar_name, const char* window_name, int pos ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetTrackbarPos","struct*",$cvtrackbar_name,"struct*",$cvwindow_name,"int",$cvpos) ; CVAPI(void) cvSetTrackbarMax(const char* trackbar_name, const char* window_name, int maxval); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetTrackbarMax","struct*",$cvtrackbar_name,"struct*",$cvwindow_name,"int",$cvmaxval) ; CVAPI(void) cvSetTrackbarMin(const char* trackbar_name, const char* window_name, int minval); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetTrackbarMin","struct*",$cvtrackbar_name,"struct*",$cvwindow_name,"int",$cvminval) ; CVAPI(void) cvSetMouseCallback( const char* window_name, CvMouseCallback on_mouse, void* param CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetMouseCallback","struct*",$cvwindow_name,"struct",$cvon_mouse,"struct*",$cvparam) ; CVAPI(int) cvWaitKey(int delay CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvWaitKey","int",$cvdelay) ; CVAPI(void) cvSetOpenGlDrawCallback(const char* window_name, CvOpenGlDrawCallback callback, void* userdata CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetOpenGlDrawCallback","struct*",$cvwindow_name,"struct",$cvcallback,"struct*",$cvuserdata) ; CVAPI(void) cvSetOpenGlContext(const char* window_name); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetOpenGlContext","struct*",$cvwindow_name) ; CVAPI(void) cvUpdateWindow(const char* window_name); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvUpdateWindow","struct*",$cvwindow_name) ; CVAPI(void) cvSetPreprocessFuncWin32_(const void* callback); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetPreprocessFuncWin32_","struct*",$cvcallback) ; CVAPI(void) cvSetPostprocessFuncWin32_(const void* callback); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetPostprocessFuncWin32_","struct*",$cvcallback) #endregion highgui_c.h #region imgproc_c.h ; CVAPI(void) cvAcc( const CvArr* image, CvArr* sum, const CvArr* mask CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvAcc","struct*",$cvimage,"struct*",$cvsum,"struct*",$cvmask) ; CVAPI(void) cvSquareAcc( const CvArr* image, CvArr* sqsum, const CvArr* mask CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSquareAcc","struct*",$cvimage,"struct*",$cvsqsum,"struct*",$cvmask) ; CVAPI(void) cvMultiplyAcc( const CvArr* image1, const CvArr* image2, CvArr* acc, const CvArr* mask CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvMultiplyAcc","struct*",$cvimage1,"struct*",$cvimage2,"struct*",$cvacc,"struct*",$cvmask) ; CVAPI(void) cvRunningAvg( const CvArr* image, CvArr* acc, double alpha, const CvArr* mask CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvRunningAvg","struct*",$cvimage,"struct*",$cvacc,"double",$cvalpha,"struct*",$cvmask) ; CVAPI(void) cvCopyMakeBorder( const CvArr* src, CvArr* dst, CvPoint offset, int bordertype, CvScalar value CV_DEFAULT(cvScalarAll(0))); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCopyMakeBorder","struct*",$cvsrc,"struct*",$cvdst,"struct",$cvoffset,"int",$cvbordertype,"struct",$cvvalue,"struct",$cv,"struct",$cv) ; CVAPI(void) cvSmooth( const CvArr* src, CvArr* dst, int smoothtype CV_DEFAULT(CV_GAUSSIAN), int size1 CV_DEFAULT(3), int size2 CV_DEFAULT(0), double sigma1 CV_DEFAULT(0), double sigma2 CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSmooth","struct*",$cvsrc,"struct*",$cvdst,"int",$cvsmoothtype,"int",$cvsize1,"int",$cvsize2,"double",$cvsigma1,"double",$cvsigma2) ; CVAPI(void) cvFilter2D( const CvArr* src, CvArr* dst, const CvMat* kernel, CvPoint anchor CV_DEFAULT(cvPoint(-1,-1))); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvFilter2D","struct*",$cvsrc,"struct*",$cvdst,"struct*",$cvkernel,"struct",$cvanchor,"struct",$cv,"struct",$cv,"struct",$cv) ; CVAPI(void) cvIntegral( const CvArr* image, CvArr* sum, CvArr* sqsum CV_DEFAULT(NULL), CvArr* tilted_sum CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvIntegral","struct*",$cvimage,"struct*",$cvsum,"struct*",$cvsqsum,"struct*",$cvtilted_sum) ; CVAPI(void) cvPyrDown( const CvArr* src, CvArr* dst, int filter CV_DEFAULT(CV_GAUSSIAN_5x5) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvPyrDown","struct*",$cvsrc,"struct*",$cvdst,"int",$cvfilter) ; CVAPI(void) cvPyrUp( const CvArr* src, CvArr* dst, int filter CV_DEFAULT(CV_GAUSSIAN_5x5) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvPyrUp","struct*",$cvsrc,"struct*",$cvdst,"int",$cvfilter) ; CVAPI(CvMat**) cvCreatePyramid( const CvArr* img, int extra_layers, double rate, const CvSize* layer_sizes CV_DEFAULT(0), CvArr* bufarr CV_DEFAULT(0), int calc CV_DEFAULT(1), int filter CV_DEFAULT(CV_GAUSSIAN_5x5) ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreatePyramid","struct*",$cvimg,"int",$cvextra_layers,"double",$cvrate,"struct*",$cvlayer_sizes,"struct*",$cvbufarr,"int",$cvcalc,"int",$cvfilter) ; CVAPI(void) cvReleasePyramid( CvMat*** pyramid, int extra_layers ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvReleasePyramid","struct*",$cvpyramid,"int",$cvextra_layers) ; CVAPI(void) cvPyrMeanShiftFiltering( const CvArr* src, CvArr* dst, double sp, double sr, int max_level CV_DEFAULT(1), CvTermCriteria termcrit CV_DEFAULT(cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,5,1))); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvPyrMeanShiftFiltering","struct*",$cvsrc,"struct*",$cvdst,"double",$cvsp,"double",$cvsr,"int",$cvmax_level,"struct",$cvtermcrit,"struct",$cv,"struct",$cv,"struct",$cv,"struct",$cv) ; CVAPI(void) cvWatershed( const CvArr* image, CvArr* markers ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvWatershed","struct*",$cvimage,"struct*",$cvmarkers) ; CVAPI(void) cvSobel( const CvArr* src, CvArr* dst, int xorder, int yorder, int aperture_size CV_DEFAULT(3)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSobel","struct*",$cvsrc,"struct*",$cvdst,"int",$cvxorder,"int",$cvyorder,"int",$cvaperture_size) ; CVAPI(void) cvLaplace( const CvArr* src, CvArr* dst, int aperture_size CV_DEFAULT(3) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvLaplace","struct*",$cvsrc,"struct*",$cvdst,"int",$cvaperture_size) ; CVAPI(void) cvCvtColor( const CvArr* src, CvArr* dst, int code ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCvtColor","struct*",$cvsrc,"struct*",$cvdst,"int",$cvcode) ; CVAPI(void) cvResize( const CvArr* src, CvArr* dst, int interpolation CV_DEFAULT( CV_INTER_LINEAR )); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvResize","struct*",$cvsrc,"struct*",$cvdst,"int",$cvinterpolation) ; CVAPI(void) cvWarpAffine( const CvArr* src, CvArr* dst, const CvMat* map_matrix, int flags CV_DEFAULT(CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS), CvScalar fillval CV_DEFAULT(cvScalarAll(0)) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvWarpAffine","struct*",$cvsrc,"struct*",$cvdst,"struct*",$cvmap_matrix,"int",$cvflags,"struct",$cvfillval,"struct",$cv,"struct",$cv) ; CVAPI(CvMat*) cvGetAffineTransform( const CvPoint2D32f* src, const CvPoint2D32f* dst, CvMat* map_matrix ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvGetAffineTransform","struct*",$cv,"struct*",$cv,"struct*",$cv) ; CVAPI(CvMat*) cv2DRotationMatrix( CvPoint2D32f center, double angle, double scale, CvMat* map_matrix ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cv2DRotationMatrix","struct",$cvcenter,"double",$cvangle,"double",$cvscale,"struct*",$cvmap_matrix) ; CVAPI(void) cvWarpPerspective( const CvArr* src, CvArr* dst, const CvMat* map_matrix, int flags CV_DEFAULT(CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS), CvScalar fillval CV_DEFAULT(cvScalarAll(0)) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvWarpPerspective","struct*",$cvsrc,"struct*",$cvdst,"struct*",$cvmap_matrix,"int",$cvflags,"struct",$cvfillval,"struct",$cv,"struct",$cv) ; CVAPI(CvMat*) cvGetPerspectiveTransform( const CvPoint2D32f* src, const CvPoint2D32f* dst, CvMat* map_matrix ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvGetPerspectiveTransform","struct*",$cvsrc,"struct*",$cvdst,"struct*",$cvmap_matrix) ; CVAPI(void) cvRemap( const CvArr* src, CvArr* dst, const CvArr* mapx, const CvArr* mapy, int flags CV_DEFAULT(CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS), CvScalar fillval CV_DEFAULT(cvScalarAll(0)) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvRemap","struct*",$cvsrc,"struct*",$cvdst,"struct*",$cvmapx,"struct*",$cvmapy,"int",$cvflags,"struct",$cvfillval,"struct",$cv,"struct",$cv) ; CVAPI(void) cvConvertMaps( const CvArr* mapx, const CvArr* mapy, CvArr* mapxy, CvArr* mapalpha ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvConvertMaps","struct*",$cvmapx,"struct*",$cvmapy,"struct*",$cvmapxy,"struct*",$cvmapalpha) ; CVAPI(void) cvLogPolar( const CvArr* src, CvArr* dst, CvPoint2D32f center, double M, int flags CV_DEFAULT(CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvLogPolar","struct*",$cvsrc,"struct*",$cvdst,"struct",$cvcenter,"double",$cvM,"int",$cvflags) ; CVAPI(void) cvLinearPolar( const CvArr* src, CvArr* dst, CvPoint2D32f center, double maxRadius, int flags CV_DEFAULT(CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvLinearPolar","struct*",$cvsrc,"struct*",$cvdst,"struct",$cvcenter,"double",$cvmaxRadius,"int",$cvflags) ; CVAPI(void) cvReleaseStructuringElement( IplConvKernel** element ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvReleaseStructuringElement","struct*",$cvelement) ; CVAPI(void) cvErode( const CvArr* src, CvArr* dst, IplConvKernel* element CV_DEFAULT(NULL), int iterations CV_DEFAULT(1) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvErode","struct*",$cvsrc,"struct*",$cvdst,"struct*",$cvelement,"int",$cviterations) ; CVAPI(void) cvDilate( const CvArr* src, CvArr* dst, IplConvKernel* element CV_DEFAULT(NULL), int iterations CV_DEFAULT(1) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvDilate","struct*",$cvsrc,"struct*",$cvdst,"struct*",$cvelement,"int",$cviterations) ; CVAPI(void) cvMorphologyEx( const CvArr* src, CvArr* dst, CvArr* temp, IplConvKernel* element, int operation, int iterations CV_DEFAULT(1) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvMorphologyEx","struct*",$cvsrc,"struct*",$cvdst,"struct*",$cvtemp,"struct*",$cvelement,"int",$cvoperation,"int",$cviterations) ; CVAPI(void) cvMoments( const CvArr* arr, CvMoments* moments, int binary CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvMoments","struct*",$cvarr,"struct*",$cvmoments,"int",$cvbinary) ; CVAPI(double) cvGetSpatialMoment( CvMoments* moments, int x_order, int y_order ); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvGetSpatialMoment","struct*",$cvmoments,"int",$cvx_order,"int",$cvy_order) ; CVAPI(double) cvGetCentralMoment( CvMoments* moments, int x_order, int y_order ); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvGetCentralMoment","struct*",$cvmoments,"int",$cvx_order,"int",$cvy_order) ; CVAPI(double) cvGetNormalizedCentralMoment( CvMoments* moments, int x_order, int y_order ); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvGetNormalizedCentralMoment","struct*",$cvmoments,"int",$cvx_order,"int",$cvy_order) ; CVAPI(void) cvGetHuMoments( CvMoments* moments, CvHuMoments* hu_moments ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvGetHuMoments","struct*",$cvmoments,"struct*",$cvhu_moments) ; CVAPI(int) cvSampleLine( const CvArr* image, CvPoint pt1, CvPoint pt2, void* buffer, int connectivity CV_DEFAULT(8)); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvSampleLine","struct*",$cvimage,"struct",$cvpt1,"struct",$cvpt2,"struct*",$cvbuffer,"int",$cvconnectivity) ; CVAPI(void) cvGetRectSubPix( const CvArr* src, CvArr* dst, CvPoint2D32f center ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvGetRectSubPix","struct*",$cvsrc,"struct*",$cvdst,"struct",$cvcenter) ; CVAPI(void) cvGetQuadrangleSubPix( const CvArr* src, CvArr* dst, const CvMat* map_matrix ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvGetQuadrangleSubPix","struct*",$cvsrc,"struct*",$cvdst,"struct*",$cvmap_matrix) ; CVAPI(void) cvMatchTemplate( const CvArr* image, const CvArr* templ, CvArr* result, int method ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvMatchTemplate","struct*",$cvimage,"struct*",$cvtempl,"struct*",$cvresult,"int",$cvmethod) ; CVAPI(float) cvCalcEMD2( const CvArr* signature1, const CvArr* signature2, int distance_type, CvDistanceFunction distance_func CV_DEFAULT(NULL), const CvArr* cost_matrix CV_DEFAULT(NULL), CvArr* flow CV_DEFAULT(NULL), float* lower_bound CV_DEFAULT(NULL), void* userdata CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"float:cdecl","cvCalcEMD2","struct*",$cvsignature1,"struct*",$cvsignature2,"int",$cvdistance_type,"struct",$cvdistance_func,"struct*",$cvcost_matrix,"struct*",$cvflow,"struct*",$cvlower_bound,"struct*",$cvuserdata) ; CVAPI(int) cvFindContours( CvArr* image, CvMemStorage* storage, CvSeq** first_contour, int header_size CV_DEFAULT(sizeof(CvContour)), int mode CV_DEFAULT(CV_RETR_LIST), int method CV_DEFAULT(CV_CHAIN_APPROX_SIMPLE), CvPoint offset CV_DEFAULT(cvPoint(0,0))); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvFindContours","struct*",$cvimage,"struct*",$cvstorage,"struct*",$cvfirst_contour,"int",$cvheader_size,"struct",$cv,"struct",$cv,"int",$cvmode,"int",$cvmethod,"struct",$cvoffset,"struct",$cv,"struct",$cv,"struct",$cv) ; CVAPI(CvContourScanner) cvStartFindContours( CvArr* image, CvMemStorage* storage, int header_size CV_DEFAULT(sizeof(CvContour)), int mode CV_DEFAULT(CV_RETR_LIST), int method CV_DEFAULT(CV_CHAIN_APPROX_SIMPLE), CvPoint offset CV_DEFAULT(cvPoint(0,0))); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvStartFindContours","struct*",$cvimage,"struct*",$cvstorage,"int",$cvheader_size,"struct",$cv,"struct",$cv,"int",$cvmode,"int",$cvmethod,"struct",$cvoffset,"struct",$cv,"struct",$cv,"struct",$cv) ; CVAPI(CvSeq*) cvFindNextContour( CvContourScanner scanner ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvFindNextContour","struct",$cvscanner) ; CVAPI(void) cvSubstituteContour( CvContourScanner scanner, CvSeq* new_contour ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSubstituteContour","struct",$cvscanner,"struct*",$cvnew_contour) ; CVAPI(CvSeq*) cvEndFindContours( CvContourScanner* scanner ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvEndFindContours","struct*",$cvscanner) ; CVAPI(CvSeq*) cvApproxChains( CvSeq* src_seq, CvMemStorage* storage, int method CV_DEFAULT(CV_CHAIN_APPROX_SIMPLE), double parameter CV_DEFAULT(0), int minimal_perimeter CV_DEFAULT(0), int recursive CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvApproxChains","struct*",$cvsrc_seq,"struct*",$cvstorage,"int",$cvmethod,"double",$cvparameter,"int",$cvminimal_perimeter,"int",$cvrecursive) ; CVAPI(void) cvStartReadChainPoints( CvChain* chain, CvChainPtReader* reader ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvStartReadChainPoints","struct*",$cvchain,"struct*",$cvreader) ; CVAPI(CvPoint) cvReadChainPoint( CvChainPtReader* reader ); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvReadChainPoint","struct*",$cvreader) ; CVAPI(CvSeq*) cvApproxPoly( const void* src_seq, int header_size, CvMemStorage* storage, int method, double eps, int recursive CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvApproxPoly","struct*",$cvsrc_seq,"int",$cvheader_size,"struct*",$cvstorage,"int",$cvmethod,"double",$cveps,"int",$cvrecursive) ; CVAPI(double) cvArcLength( const void* curve, CvSlice slice CV_DEFAULT(CV_WHOLE_SEQ), int is_closed CV_DEFAULT(-1)); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvArcLength","struct*",$cvcurve,"struct",$cvslice,"int",$cvis_closed) ; CVAPI(CvRect) cvBoundingRect( CvArr* points, int update CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvBoundingRect","struct*",$cvpoints,"int",$cvupdate) ; CVAPI(double) cvContourArea( const CvArr* contour, CvSlice slice CV_DEFAULT(CV_WHOLE_SEQ), int oriented CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvContourArea","struct*",$cvcontour,"struct",$cvslice,"int",$cvoriented) ; CVAPI(CvBox2D) cvMinAreaRect2( const CvArr* points, CvMemStorage* storage CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvMinAreaRect2","struct*",$cvpoints,"struct*",$cvstorage) ; CVAPI(int) cvMinEnclosingCircle( const CvArr* points, CvPoint2D32f* center, float* radius ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvMinEnclosingCircle","struct*",$cvpoints,"struct*",$cvcenter,"struct*",$cvradius) ; CVAPI(double) cvMatchShapes( const void* object1, const void* object2, int method, double parameter CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvMatchShapes","struct*",$cvobject1,"struct*",$cvobject2,"int",$cvmethod,"double",$cvparameter) ; CVAPI(CvSeq*) cvConvexHull2( const CvArr* input, void* hull_storage CV_DEFAULT(NULL), int orientation CV_DEFAULT(CV_CLOCKWISE), int return_points CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvConvexHull2","struct*",$cvinput,"struct*",$cvhull_storage,"int",$cvorientation,"int",$cvreturn_points) ; CVAPI(int) cvCheckContourConvexity( const CvArr* contour ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvCheckContourConvexity","struct*",$cvcontour) ; CVAPI(CvSeq*) cvConvexityDefects( const CvArr* contour, const CvArr* convexhull, CvMemStorage* storage CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvConvexityDefects","struct*",$cvcontour,"struct*",$cvconvexhull,"struct*",$cvstorage) ; CVAPI(CvBox2D) cvFitEllipse2( const CvArr* points ); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvFitEllipse2","struct*",$cvpoints) ; CVAPI(CvRect) cvMaxRect( const CvRect* rect1, const CvRect* rect2 ); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvMaxRect","struct*",$cvrect1,"struct*",$cvrect2) ; CVAPI(void) cvBoxPoints( CvBox2D box, CvPoint2D32f pt[4] ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvBoxPoints","struct",$cvbox,"struct",$cvpt[4]) ; CVAPI(CvSeq*) cvPointSeqFromMat( int seq_kind, const CvArr* mat, CvContour* contour_header, CvSeqBlock* block ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvPointSeqFromMat","int",$cvseq_kind,"struct*",$cvmat,"struct*",$cvcontour_header,"struct*",$cvblock) ; CVAPI(double) cvPointPolygonTest( const CvArr* contour, CvPoint2D32f pt, int measure_dist ); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvPointPolygonTest","struct*",$cvcontour,"struct",$cvpt,"int",$cvmeasure_dist) ; CVAPI(CvHistogram*) cvCreateHist( int dims, int* sizes, int type, float** ranges CV_DEFAULT(NULL), int uniform CV_DEFAULT(1)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateHist","int",$cvdims,"struct*",$cvsizes,"int",$cvtype,"struct*",$cvranges,"int",$cvuniform) ; CVAPI(void) cvSetHistBinRanges( CvHistogram* hist, float** ranges, int uniform CV_DEFAULT(1)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvSetHistBinRanges","struct*",$cvhist,"struct*",$cvranges,"int",$cvuniform) ; CVAPI(CvHistogram*) cvMakeHistHeaderForArray( int dims, int* sizes, CvHistogram* hist, float* data, float** ranges CV_DEFAULT(NULL), int uniform CV_DEFAULT(1)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvMakeHistHeaderForArray","int",$cvdims,"struct*",$cvsizes,"struct*",$cvhist,"struct*",$cvdata,"struct*",$cvranges,"int",$cvuniform) ; CVAPI(void) cvReleaseHist( CvHistogram** hist ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvReleaseHist","struct*",$cvhist) ; CVAPI(void) cvClearHist( CvHistogram* hist ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvClearHist","struct*",$cvhist) ; CVAPI(void) cvGetMinMaxHistValue( const CvHistogram* hist, float* min_value, float* max_value, int* min_idx CV_DEFAULT(NULL), int* max_idx CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvGetMinMaxHistValue","struct*",$cvhist,"struct*",$cvmin_value,"struct*",$cvmax_value,"struct*",$cvmin_idx,"struct*",$cvmax_idx) ; CVAPI(void) cvNormalizeHist( CvHistogram* hist, double factor ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvNormalizeHist","struct*",$cvhist,"double",$cvfactor) ; CVAPI(void) cvThreshHist( CvHistogram* hist, double threshold ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvThreshHist","struct*",$cvhist,"double",$cvthreshold) ; CVAPI(double) cvCompareHist( const CvHistogram* hist1, const CvHistogram* hist2, int method); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvCompareHist","struct*",$cvhist1,"struct*",$cvhist2,"int",$cvmethod) ; CVAPI(void) cvCopyHist( const CvHistogram* src, CvHistogram** dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCopyHist","struct*",$cvsrc,"struct*",$cvdst) ; CVAPI(void) cvCalcBayesianProb( CvHistogram** src, int number, CvHistogram** dst); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCalcBayesianProb","struct*",$cvsrc,"int",$cvnumber,"struct*",$cvdst) ; CVAPI(void) cvCalcArrHist( CvArr** arr, CvHistogram* hist, int accumulate CV_DEFAULT(0), const CvArr* mask CV_DEFAULT(NULL) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCalcArrHist","struct*",$cvarr,"struct*",$cvhist,"int",$cvaccumulate,"struct*",$cvmask) ; CVAPI(void) cvCalcArrBackProject( CvArr** image, CvArr* dst, const CvHistogram* hist ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCalcArrBackProject","struct*",$cvimage,"struct*",$cvdst,"struct*",$cvhist) ; CVAPI(void) cvCalcArrBackProjectPatch( CvArr** image, CvArr* dst, CvSize range, CvHistogram* hist, int method, double factor ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCalcArrBackProjectPatch","struct*",$cvimage,"struct*",$cvdst,"struct",$cvrange,"struct*",$cvhist,"int",$cvmethod,"double",$cvfactor) ; CVAPI(void) cvCalcProbDensity( const CvHistogram* hist1, const CvHistogram* hist2, CvHistogram* dst_hist, double scale CV_DEFAULT(255) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCalcProbDensity","struct*",$cvhist1,"struct*",$cvhist2,"struct*",$cvdst_hist,"double",$cvscale) ; CVAPI(void) cvEqualizeHist( const CvArr* src, CvArr* dst ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvEqualizeHist","struct*",$cvsrc,"struct*",$cvdst) ; CVAPI(void) cvDistTransform( const CvArr* src, CvArr* dst, int distance_type CV_DEFAULT(CV_DIST_L2), int mask_size CV_DEFAULT(3), const float* mask CV_DEFAULT(NULL), CvArr* labels CV_DEFAULT(NULL), int labelType CV_DEFAULT(CV_DIST_LABEL_CCOMP)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvDistTransform","struct*",$cvsrc,"struct*",$cvdst,"int",$cvdistance_type,"int",$cvmask_size,"struct*",$cvmask,"struct*",$cvlabels,"int",$cvlabelType) ; CVAPI(double) cvThreshold( const CvArr* src, CvArr* dst, double threshold, double max_value, int threshold_type ); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvThreshold","struct*",$cvsrc,"struct*",$cvdst,"double",$cvthreshold,"double",$cvmax_value,"int",$cvthreshold_type) ; CVAPI(void) cvAdaptiveThreshold( const CvArr* src, CvArr* dst, double max_value, int adaptive_method CV_DEFAULT(CV_ADAPTIVE_THRESH_MEAN_C), int threshold_type CV_DEFAULT(CV_THRESH_BINARY), int block_size CV_DEFAULT(3), double param1 CV_DEFAULT(5)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvAdaptiveThreshold","struct*",$cvsrc,"struct*",$cvdst,"double",$cvmax_value,"int",$cvadaptive_method,"int",$cvthreshold_type,"int",$cvblock_size,"double",$cvparam1) ; CVAPI(void) cvFloodFill( CvArr* image, CvPoint seed_point, CvScalar new_val, CvScalar lo_diff CV_DEFAULT(cvScalarAll(0)), CvScalar up_diff CV_DEFAULT(cvScalarAll(0)), CvConnectedComp* comp CV_DEFAULT(NULL), int flags CV_DEFAULT(4), CvArr* mask CV_DEFAULT(NULL)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvFloodFill","struct*",$cvimage,"struct",$cvseed_point,"struct",$cvnew_val,"struct",$cvlo_diff,"struct",$cv,"struct",$cv,"struct",$cvup_diff,"struct",$cv,"struct",$cv,"struct*",$cvcomp,"int",$cvflags,"struct*",$cvmask) ; CVAPI(void) cvCanny( const CvArr* image, CvArr* edges, double threshold1, double threshold2, int aperture_size CV_DEFAULT(3) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCanny","struct*",$cvimage,"struct*",$cvedges,"double",$cvthreshold1,"double",$cvthreshold2,"int",$cvaperture_size) ; CVAPI(void) cvPreCornerDetect( const CvArr* image, CvArr* corners, int aperture_size CV_DEFAULT(3) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvPreCornerDetect","struct*",$cvimage,"struct*",$cvcorners,"int",$cvaperture_size) ; CVAPI(void) cvCornerEigenValsAndVecs( const CvArr* image, CvArr* eigenvv, int block_size, int aperture_size CV_DEFAULT(3) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCornerEigenValsAndVecs","struct*",$cvimage,"struct*",$cveigenvv,"int",$cvblock_size,"int",$cvaperture_size) ; CVAPI(void) cvCornerMinEigenVal( const CvArr* image, CvArr* eigenval, int block_size, int aperture_size CV_DEFAULT(3) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCornerMinEigenVal","struct*",$cvimage,"struct*",$cveigenval,"int",$cvblock_size,"int",$cvaperture_size) ; CVAPI(void) cvCornerHarris( const CvArr* image, CvArr* harris_response, int block_size, int aperture_size CV_DEFAULT(3), double k CV_DEFAULT(0.04) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCornerHarris","struct*",$cvimage,"struct*",$cvharris_response,"int",$cvblock_size,"int",$cvaperture_size,"double",$cvk) ; CVAPI(void) cvFindCornerSubPix( const CvArr* image, CvPoint2D32f* corners, int count, CvSize win, CvSize zero_zone, CvTermCriteria criteria ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvFindCornerSubPix","struct*",$cvimage,"struct*",$cvcorners,"int",$cvcount,"struct",$cvwin,"struct",$cvzero_zone,"struct",$cvcriteria) ; CVAPI(void) cvGoodFeaturesToTrack( const CvArr* image, CvArr* eig_image, CvArr* temp_image, CvPoint2D32f* corners, int* corner_count, double quality_level, double min_distance, const CvArr* mask CV_DEFAULT(NULL), int block_size CV_DEFAULT(3), int use_harris CV_DEFAULT(0), double k CV_DEFAULT(0.04) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvGoodFeaturesToTrack","struct*",$cvimage,"struct*",$cveig_image,"struct*",$cvtemp_image,"struct*",$cvcorners,"struct*",$cvcorner_count,"double",$cvquality_level,"double",$cvmin_distance,"struct*",$cvmask,"int",$cvblock_size,"int",$cvuse_harris,"double",$cvk) ; CVAPI(CvSeq*) cvHoughLines2( CvArr* image, void* line_storage, int method, double rho, double theta, int threshold, double param1 CV_DEFAULT(0), double param2 CV_DEFAULT(0), double min_theta CV_DEFAULT(0), double max_theta CV_DEFAULT(CV_PI)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvHoughLines2","struct*",$cvimage,"struct*",$cvline_storage,"int",$cvmethod,"double",$cvrho,"double",$cvtheta,"int",$cvthreshold,"double",$cvparam1,"double",$cvparam2,"double",$cvmin_theta,"double",$cvmax_theta) ; CVAPI(CvSeq*) cvHoughCircles( CvArr* image, void* circle_storage, int method, double dp, double min_dist, double param1 CV_DEFAULT(100), double param2 CV_DEFAULT(100), int min_radius CV_DEFAULT(0), int max_radius CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvHoughCircles","struct*",$cvimage,"struct*",$cvcircle_storage,"int",$cvmethod,"double",$cvdp,"double",$cvmin_dist,"double",$cvparam1,"double",$cvparam2,"int",$cvmin_radius,"int",$cvmax_radius) ; CVAPI(void) cvFitLine( const CvArr* points, int dist_type, double param, double reps, double aeps, float* line ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvFitLine","struct*",$cvpoints,"int",$cvdist_type,"double",$cvparam,"double",$cvreps,"double",$cvaeps,"struct*",$cvline) ; CVAPI(void) cvLine( CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness CV_DEFAULT(1), int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvLine","struct*",$cvimg,"struct",$cvpt1,"struct",$cvpt2,"struct",$cvcolor,"int",$cvthickness,"int",$cvline_type,"int",$cvshift) ; CVAPI(void) cvRectangle( CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness CV_DEFAULT(1), int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvRectangle","struct*",$cvimg,"struct",$cvpt1,"struct",$cvpt2,"struct",$cvcolor,"int",$cvthickness,"int",$cvline_type,"int",$cvshift) ; CVAPI(void) cvRectangleR( CvArr* img, CvRect r, CvScalar color, int thickness CV_DEFAULT(1), int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvRectangleR","struct*",$cvimg,"struct",$cvr,"struct",$cvcolor,"int",$cvthickness,"int",$cvline_type,"int",$cvshift) ; CVAPI(void) cvCircle( CvArr* img, CvPoint center, int radius, CvScalar color, int thickness CV_DEFAULT(1), int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvCircle","struct*",$cvimg,"struct",$cvcenter,"int",$cvradius,"struct",$cvcolor,"int",$cvthickness,"int",$cvline_type,"int",$cvshift) ; CVAPI(void) cvEllipse( CvArr* img, CvPoint center, CvSize axes, double angle, double start_angle, double end_angle, CvScalar color, int thickness CV_DEFAULT(1), int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvEllipse","struct*",$cvimg,"struct",$cvcenter,"struct",$cvaxes,"double",$cvangle,"double",$cvstart_angle,"double",$cvend_angle,"struct",$cvcolor,"int",$cvthickness,"int",$cvline_type,"int",$cvshift) ; CVAPI(void) cvFillConvexPoly( CvArr* img, const CvPoint* pts, int npts, CvScalar color, int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvFillConvexPoly","struct*",$cvimg,"struct*",$cvpts,"int",$cvnpts,"struct",$cvcolor,"int",$cvline_type,"int",$cvshift) ; CVAPI(void) cvFillPoly( CvArr* img, CvPoint** pts, const int* npts, int contours, CvScalar color, int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvFillPoly","struct*",$cvimg,"struct*",$cvpts,"struct*",$cvnpts,"int",$cvcontours,"struct",$cvcolor,"int",$cvline_type,"int",$cvshift) ; CVAPI(void) cvPolyLine( CvArr* img, CvPoint** pts, const int* npts, int contours, int is_closed, CvScalar color, int thickness CV_DEFAULT(1), int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvPolyLine","struct*",$cvimg,"struct*",$cvpts,"struct*",$cvnpts,"int",$cvcontours,"int",$cvis_closed,"struct",$cvcolor,"int",$cvthickness,"int",$cvline_type,"int",$cvshift) ; CVAPI(int) cvClipLine( CvSize img_size, CvPoint* pt1, CvPoint* pt2 ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvClipLine","struct",$cvimg_size,"struct*",$cvpt1,"struct*",$cvpt2) ; CVAPI(int) cvInitLineIterator( const CvArr* image, CvPoint pt1, CvPoint pt2, CvLineIterator* line_iterator, int connectivity CV_DEFAULT(8), int left_to_right CV_DEFAULT(0)); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvInitLineIterator","struct*",$cvimage,"struct",$cvpt1,"struct",$cvpt2,"struct*",$cvline_iterator,"int",$cvconnectivity,"int",$cvleft_to_right) ; CVAPI(void) cvInitFont( CvFont* font, int font_face, double hscale, double vscale, double shear CV_DEFAULT(0), int thickness CV_DEFAULT(1), int line_type CV_DEFAULT(8)); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvInitFont","struct*",$cvfont,"int",$cvfont_face,"double",$cvhscale,"double",$cvvscale,"double",$cvshear,"int",$cvthickness,"int",$cvline_type) ; CVAPI(void) cvPutText( CvArr* img, const char* text, CvPoint org, const CvFont* font, CvScalar color ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvPutText","struct*",$cvimg,"struct*",$cvtext,"struct",$cvorg,"struct*",$cvfont,"struct",$cvcolor) ; CVAPI(void) cvGetTextSize( const char* text_string, const CvFont* font, CvSize* text_size, int* baseline ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvGetTextSize","struct*",$cvtext_string,"struct*",$cvfont,"struct*",$cvtext_size,"struct*",$cvbaseline) ; CVAPI(CvScalar) cvColorToScalar( double packed_color, int arrtype ); ; local $_aResult = DllCall($_opencv_worldDLL,"none:cdecl","cvColorToScalar","double",$cvpacked_color,"int",$cvarrtype) ; CVAPI(int) cvEllipse2Poly( CvPoint center, CvSize axes, int angle, int arc_start, int arc_end, CvPoint* pts, int delta ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvEllipse2Poly","struct",$cvcenter,"struct",$cvaxes,"int",$cvangle,"int",$cvarc_start,"int",$cvarc_end,"struct*",$cv,"int",$cvdelta) ; CVAPI(void) cvDrawContours( CvArr* img, CvSeq* contour, CvScalar external_color, CvScalar hole_color, int max_level, int thickness CV_DEFAULT(1), int line_type CV_DEFAULT(8), CvPoint offset CV_DEFAULT(cvPoint(0,0))); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvDrawContours","struct*",$cvimg,"struct*",$cvcontour,"struct",$cvexternal_color,"struct",$cvhole_color,"int",$cvmax_level,"int",$cvthickness,"int",$cvline_type,"struct",$cvoffset,"struct",$cv,"struct",$cv,"struct",$cv) #endregion imgproc_c.h #region videoio_c.h ; CVAPI(CvCapture*) cvCreateFileCapture( const char* filename ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateFileCapture","struct*",$cvfilename) ; CVAPI(CvCapture*) cvCreateFileCaptureWithPreference( const char* filename , int apiPreference); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateFileCaptureWithPreference","struct*",$cvfilename,"int",$cvapiPreference) ; CVAPI(CvCapture*) cvCreateCameraCapture( int index ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateCameraCapture","int",$cvindex) ; CVAPI(int) cvGrabFrame( CvCapture* capture ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGrabFrame","struct*",$cvcapture) ; CVAPI(IplImage*) cvRetrieveFrame( CvCapture* capture, int streamIdx CV_DEFAULT(0) ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvRetrieveFrame","struct*",$cvcapture,"int",$cvstreamIdx) ; CVAPI(IplImage*) cvQueryFrame( CvCapture* capture ); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvQueryFrame","struct*",$cvcapture) ; CVAPI(void) cvReleaseCapture( CvCapture** capture ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvReleaseCapture","struct*",$cvcapture) ; CVAPI(double) cvGetCaptureProperty( CvCapture* capture, int property_id ); ; local $_aResult = DllCall($_opencv_worldDLL,"double:cdecl","cvGetCaptureProperty","struct*",$cvcapture,"int",$cvproperty_id) ; CVAPI(int) cvSetCaptureProperty( CvCapture* capture, int property_id, double value ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvSetCaptureProperty","struct*",$cvcapture,"int",$cvproperty_id,"double",$cvvalue) ; CVAPI(int) cvGetCaptureDomain( CvCapture* capture); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvGetCaptureDomain","struct*",$cvcapture) ; CVAPI(CvVideoWriter*) cvCreateVideoWriter( const char* filename, int fourcc, double fps, CvSize frame_size, int is_color CV_DEFAULT(1)); ; local $_aResult = DllCall($_opencv_worldDLL,"ptr:cdecl","cvCreateVideoWriter","struct*",$cvfilename,"int",$cvfourcc,"double",$cvfps,"struct",$cvframe_size,"int",$cvis_color) ; CVAPI(int) cvWriteFrame( CvVideoWriter* writer, const IplImage* image ); ; local $_aResult = DllCall($_opencv_worldDLL,"int:cdecl","cvWriteFrame","struct*",$cvwriter,"struct*",$cvimage) ; CVAPI(void) cvReleaseVideoWriter( CvVideoWriter** writer ); ; local $_aResult = DllCall($_opencv_worldDLL,"void:cdecl","cvReleaseVideoWriter","struct*",$cvwriter) #endregion videoio_c.h opencv_world.au3 mLipok and Earthshine 1 1 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
junkew Posted January 18, 2021 Share Posted January 18, 2021 Started with errors as Geir1983 reported on first page of thread: "When trying your examples i get error messages. Using Autoit v3.3.10.2, Windows 7 32 bit, OpenCV 2.4.5" Partly working with original contours example code and opencv_world451.dll. Starting AutoIt3Wrapper v.14.801.2025.0 SciTE v.3.4.4.0 Keyboard:00020409 OS:WIN_81/ CPU:X64 OS:X64 Environment(Language:0413) >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "F:\download\OpenCV contour_example.au3" Shows 3 windows but then dies after a while most likely all kinds of definitions for 32/64 bits are incorrect. dies on line Local $pcontours = _cvCreateSeq(0, 64, DllStructGetSize(DllStructCreate($tagCvPoint)), $pstorage); Changes done on original files from post 1 moved global variables to top of file OpenCVFcns.au3 removed $hwnd in function. Unclear where this should have come from changed _OpenCV_Startup() with world dll replace ghGDIPDll with __g_hGDIPDll expandcollapse popup;OpenCVFcns.au3 ;=============== ;Moved to top of file Global $_opencv_core, $_opencv_highgui, $_opencv_imgproc, $_opencv_calib3d, $_opencv_features2d ;Openfiledialog remove $hwnd Func _cvLoadImage(ByRef $filename , $iscolor = $CV_LOAD_IMAGE_COLOR ) ; If $filename = "" Then $filename = FileOpenDialog( "Select graphic file", @ScriptDir & "\", "Images (*.jpg;*.bmp;*.png)", 3,"",$hwnd ) If $filename = "" Then $filename = FileOpenDialog( "Select graphic file", @ScriptDir & "\", "Images (*.jpg;*.bmp;*.png)", 3,"" ) ;ConsoleWrite("error2" & $filename ) $_aResult = DllCall($_opencv_highgui, "int:cdecl", "cvLoadImage", "str", $filename, "int", $iscolor ) If @error Then ConsoleWrite("File not loading") Return $_aResult[0] EndFunc ;==>_cvLoadImage Func _OpenCV_Startup() ; $_opencv_core = DllOpen("opencv_core245.dll") ; $_opencv_highgui = DllOpen("opencv_highgui245.dll") ; $_opencv_imgproc = DllOpen("opencv_imgproc245.dll") ; $_opencv_calib3d = DllOpen("opencv_calib3d245.dll") ; $_opencv_features2d = DllOpen("opencv_features2d245.dll") $_opencv_core = DllOpen("F:\download\opencv\build\x64\vc15\bin\opencv_world451.dll") $_opencv_highgui = DllOpen("F:\download\opencv\build\x64\vc15\bin\opencv_world451.dll") $_opencv_imgproc = DllOpen("F:\download\opencv\build\x64\vc15\bin\opencv_world451.dll") $_opencv_calib3d = DllOpen("F:\download\opencv\build\x64\vc15\bin\opencv_world451.dll") $_opencv_features2d = DllOpen("F:\download\opencv\build\x64\vc15\bin\opencv_world451.dll") EndFunc ;==>_OpenCV_Startup ;OpenCV contour_example.au3 ;========================== ;replace ghGDIPDll with __g_hGDIPDll Local $aResult = DllCall($ghGDIPDll, "int", "GdipDrawLines", "handle", $hGraphics, "handle", $hPen, "struct*", $tPoints, "int", $iCount) Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawLines", "handle", $hGraphics, "handle", $hPen, "struct*", $tPoints, "int", $iCount) mLipok 1 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
junkew Posted January 18, 2021 Share Posted January 18, 2021 Example OpenCV contour_example.au3 works with opencv_world451.dll Not sure why but had to change in example this to probably have more room to store it on 64 bits platform Local $pcontours = _cvCreateSeq(0, 64, DllStructGetSize(DllStructCreate($tagCvPoint)), $pstorage); Local $pcontours = _cvCreateSeq(0, 64*64, DllStructGetSize(DllStructCreate($tagCvPoint)), $pstorage); and this function definition changed to below returnvalue CvSeq* just to ptr or to a ptr*? int stays int CvMemStorage* just to struct* or should it be ptr? ;------------------------------------------------ ;/* ;CVAPI(CvSeq*) cvCreateSeq( int seq_flags, size_t header_size, size_t elem_size, CvMemStorage* storage ); ; ; Func _cvCreateSeq( $cvseq_flags , $cvheader_size , $cvelem_size , $cvstorage ) local $_aResult = DllCall($_opencv_core , "ptr:cdecl" , "cvCreateSeq" , "int" , $cvseq_flags , "ulong_ptr" , $cvheader_size , "ulong_ptr" , $cvelem_size , "struct*" , $cvstorage ) If @error Then ConsoleWrite( "error in cvCreateSeq") Return $_aResult[0] EndFunc ;==>_cvCreateSeq In overall udf many things to change like size_t is ulong_ptr FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
Lion66 Posted January 19, 2021 Share Posted January 19, 2021 Are there any plans to update the _MatchPicture function? It seems to me that it does not work correctly. Link to comment Share on other sites More sharing options...
junkew Posted January 19, 2021 Share Posted January 19, 2021 @lion66 did you try with above 2 posts as these changes most likely fixes it. I assume you referred to FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
Lion66 Posted January 20, 2021 Share Posted January 20, 2021 That's cool! Example OpenCV contour_example.au3 is works. Thank you for bringing this interesting topic back to life. Now I am trying to run the "Where Wally" example from this topic. I cant run it with original function _cvLoadImage, but this also didnt work with older versions OpenCV. Func _cvLoadImage(ByRef $filename , $iscolor = $CV_LOAD_IMAGE_COLOR ) ; If $filename = "" Then $filename = FileOpenDialog( "Select graphic file", @ScriptDir & "\", "Images (*.jpg;*.bmp;*.png)", 3,"",$hwnd ) If $filename = "" Then $filename = FileOpenDialog( "Select graphic file", @ScriptDir & "\", "Images (*.jpg;*.bmp;*.png)", 3,"" ) ;ConsoleWrite("error2" & $filename ) $_aResult = DllCall($_opencv_highgui, "int:cdecl", "cvLoadImage", "str", $filename, "int", $iscolor ) If @error Then ConsoleWrite("File not loading") Return $_aResult[0] EndFunc ;==>_cvLoadImage And I got the error message "Failed loading DLLs ", if I work with a modified version OpenCVFcns.au3 . It worked with version 2xx (OpenCV). Func _cvLoadImage($filename, $iscolor = 1) If $filename = "" Then Return SetError(1) $_aResult = DllCall($_opencv_highgui, "int:cdecl", "cvLoadImage", "str", $filename, "int", $iscolor) If @error Then ConsoleWrite("File not loading") If Not IsArray($_aResult) Then MsgBox(16, "Error", "Failed loading DLLs.") _OpenCV_Shutdown() Exit EndIf Return $_aResult[0] EndFunc ;==>_cvLoadImage I don't remember where I got it from. I'll reattach it here along with an example. It would be great to try running this example with a new version OpenCV. Thank you. OpenCVFcns.au3 WhereIsWally_example.au3 Link to comment Share on other sites More sharing options...
Lion66 Posted January 21, 2021 Share Posted January 21, 2021 Processing image from file also doesn't work in example OpenCV contour_example.au3. Link to comment Share on other sites More sharing options...
Lion66 Posted June 2, 2021 Share Posted June 2, 2021 I'll try to ask my old question again: how to make the function _cvLoadImage work? @junkew. Are there any new examples with version 4.xx? Maybe now you will have an answer to my problem? On 1/17/2021 at 8:32 PM, BoJack said: To get the "older" shared library structure of OpenCV, you have to compile the source with the build option "BUILD_opencv_world" off. Then you have mutliple dll files instead of the big one. I just tested it with the latest OpenCV Version 4.5.1 x86 and the example "OpenCV contour_example.au3" from the first post and it worked! Can someone post such files 32/64 bit? Does anyone else use ver 4.xx, or have everyone switched to Python? 🙂 Thank you. Link to comment Share on other sites More sharing options...
smbape Posted July 11, 2021 Share Posted July 11, 2021 Hello, I may be too late for the answer. Using opencv dll directly seems impossible. There are missing pieces. Fortunately there is a project, emgucv, that made the binding easier. I generate files that bind Emgu.CV.Extern dll functions. I only test it for my use cases. Download the libemgucv-windesktop-4.5.1.4349, and you are ready to go. There are some example files below. Change the path to cvextern.dll according to where you downloaded it. expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <emgucv-autoit-bindings\cve_extra.au3> ;~ Sources: ;~ https://docs.opencv.org/4.5.1/d8/dc8/tutorial_histogram_comparison.html ConsoleWrite("Start" & @CRLF) _OpenCV_DLLOpen("libemgucv-windesktop-4.5.1.4349\libs\x64\cvextern.dll") Local $matEmpty = _cveMatCreate() Local $matSrcBase = _cveImread("Histogram_Comparison_Source_0.jpg") Local $matSrcTest1 = _cveImread("Histogram_Comparison_Source_1.jpg") Local $matSrcTest2 = _cveImread("Histogram_Comparison_Source_2.jpg") Local $matHsvBase = _cveMatCreate() _cveCvtColorMat($matSrcBase, $matHsvBase, $CV_COLOR_BGR2HSV, 0) Local $matHsvTest1 = _cveMatCreate() _cveCvtColorMat($matSrcTest1, $matHsvTest1, $CV_COLOR_BGR2HSV, 0) Local $matHsvTest2 = _cveMatCreate() _cveCvtColorMat($matSrcTest2, $matHsvTest2, $CV_COLOR_BGR2HSV, 0) Local $tHsvBaseSize = _cvSize(0, 0) _cveMatGetSize($matHsvBase, $tHsvBaseSize) Local $iRows = $tHsvBaseSize.height Local $iCols = $tHsvBaseSize.width $tHsvBaseSize = 0 Local $tHalfDownRect = _cvRect(0, $iCols / 2, $iRows, $iCols / 2) Local $matHsvHalfDown = _cveMatCreateFromRect($matHsvBase, $tHalfDownRect) $tHalfDownRect = 0 ; Quantize the hue to 50 levels and the saturation to 60 levels Local $aHistSize[2] = [50, 60] ; hue varies from 0 to 179 and saturation from 0 (black-gray-white) to 255 (pure spectrum color) Local $aRanges[4] = [0.0, 180.0, 0.0, 256.0] ; we compute the histogram from the 0-th and 1-st channels Local $aChannels[2] = [0, 1] Local $matHistBase = _cveMatCreate() Local $aMatHsvBase[1] = [$matHsvBase] _cveCalcHistMat($aMatHsvBase, $aChannels, $matEmpty, $matHistBase, $aHistSize, $aRanges, False) _cveNormalizeMat($matHistBase, $matHistBase, 0, 1, $CV_NORM_MINMAX, -1, $matEmpty) Local $matHistHalfDown = _cveMatCreate() Local $aMatHsvHalfDown[1] = [$matHsvHalfDown] _cveCalcHistMat($aMatHsvHalfDown, $aChannels, $matEmpty, $matHistHalfDown, $aHistSize, $aRanges, False) _cveNormalizeMat($matHistHalfDown, $matHistHalfDown, 0, 1, $CV_NORM_MINMAX, -1, $matEmpty) Local $matHistTest1 = _cveMatCreate() Local $aMatHsvTest1[1] = [$matHsvTest1] _cveCalcHistMat($aMatHsvTest1, $aChannels, $matEmpty, $matHistTest1, $aHistSize, $aRanges, False) _cveNormalizeMat($matHistTest1, $matHistTest1, 0, 1, $CV_NORM_MINMAX, -1, $matEmpty) Local $matHistTest2 = _cveMatCreate() Local $aMatHsvTest2[1] = [$matHsvTest2] _cveCalcHistMat($aMatHsvTest2, $aChannels, $matEmpty, $matHistTest2, $aHistSize, $aRanges, False) _cveNormalizeMat($matHistTest2, $matHistTest2, 0, 1, $CV_NORM_MINMAX, -1, $matEmpty) For $iCompareMethod = 0 To 3 Step 1 Local $dBaseBase = _cveCompareHistMat($matHistBase, $matHistBase, $iCompareMethod) Local $dBaseBalf = _cveCompareHistMat($matHistBase, $matHistHalfDown, $iCompareMethod) Local $dBaseBest1 = _cveCompareHistMat($matHistBase, $matHistTest1, $iCompareMethod) Local $dBaseBest2 = _cveCompareHistMat($matHistBase, $matHistTest2, $iCompareMethod) ConsoleWrite("Method " & $iCompareMethod & " Perfect, Base-Half, Base-Test(1), Base-Test(2) : " & $dBaseBase & " / " & $dBaseBalf & " / " & $dBaseBest1 & " / " & $dBaseBest2 & @CRLF) Next _cveMatRelease($matHistTest2) _cveMatRelease($matHistTest1) _cveMatRelease($matHistHalfDown) _cveMatRelease($matHistBase) _cveMatRelease($matHsvHalfDown) _cveMatRelease($matHsvTest2) _cveMatRelease($matHsvTest1) _cveMatRelease($matHsvBase) _cveMatRelease($matEmpty) _Opencv_DLLClose() ConsoleWrite("Done" & @CRLF) emgucv-autoit-bindings.zip MatchTemplate_Demo.au3 tutorial_histogram_comparison.au3 Link to comment Share on other sites More sharing options...
Lion66 Posted July 11, 2021 Share Posted July 11, 2021 Hi @smbape I am glad that someone is engaged in this topic in Autoit and share its experience. I probably, because of limited knowledge, I can not appreciate the entire fullness of your version. When searching for a picture, be sure to use the mask? Can you show an example of searching for a piece of pictures in a large picture and print $tMaxVal? Thank you. Link to comment Share on other sites More sharing options...
smbape Posted July 11, 2021 Share Posted July 11, 2021 The mask is not mandantory. It is purely a translation of the c++ code example on opencv website. Look at the MatchTemplate_Demo.au3 Here is an example based on your Where is wally example, which was an inspiration for this work. Keep in mind that cv::matchTemplate is reliable only if you know that the template is present in the bigger image. If not, it has to be combined with something that tells you how good the match is, for example cv::compareHist Look at _cveFindTemplate in cve_extra.au3 for a "work in progress" way to reliably find a template in a bigger image. expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Math.au3> #include <MsgBoxConstants.au3> #include <emgucv-autoit-bindings\cve_extra.au3> ;~ Sources: ;~ https://docs.opencv.org/4.5.1/df/dfb/group__imgproc__object.html#ga586ebfb0a7fb604b35a23d85391329be ;~ https://docs.opencv.org/4.5.1/d8/ded/samples_2cpp_2tutorial_code_2Histograms_Matching_2MatchTemplate_Demo_8cpp-example.html#a16 ;~ https://www.autoitscript.com/forum/topic/160732-opencv-udf/?do=findComment&comment=1280955 ;~ https://github.com/emgucv/emgucv/tree/4.5.1/Emgu.CV.Extern ;~ https://stackoverflow.com/a/28647930 ;~ https://samwize.com/2013/06/09/using-opencv-to-match-template-multiple-times/ ;~ https://docs.opencv.org/master/d4/dc6/tutorial_py_template_matching.html ;~ https://docs.opencv.org/4.5.1/d8/dc8/tutorial_histogram_comparison.html ;~ https://learncodebygaming.com/blog/real-time-object-detection ;~ https://docs.microsoft.com/en-us/windows/uwp/audio-video-camera/process-software-bitmaps-with-opencv ;~ https://vovkos.github.io/doxyrest-showcase/opencv/sphinx_rtd_theme/page_tutorial_histogram_calculation.html $_cve_debug = 0 _OpenCV_DLLOpen("libemgucv-windesktop-4.5.1.4349\libs\x64\cvextern.dll") ;~ _cveNamedWindow("Where's Wally") Local $matImg = _cveImread("whereWally3.jpg") ; Local $matImg = _cveImread("lena_tmpl.jpg", $CV_IMREAD_COLOR) ;~ _cveImshowMat("Where's Wally", $matImg) ;~ _cveWaitKey(0) Local $matTmp = _cveImread("wally3.jpg") ; Local $matTmp = _cveImread("tmpl.png", $CV_IMREAD_COLOR) ;~ _cveImshowMat("Where's Wally", $matTmp) ;~ _cveWaitKey(0) Local $width = _cveMatGetWidth($matImg) Local $height = _cveMatGetHeight($matImg) ConsoleWrite("image width " & $width & @CRLF) ConsoleWrite("image height " & $height & @CRLF) Local $w = _cveMatGetWidth($matTmp) Local $h = _cveMatGetHeight($matTmp) ConsoleWrite("temlpate width " & $w & @CRLF) ConsoleWrite("temlpate height " & $h & @CRLF) Local $rw = $width - $w + 1 Local $rh = $height - $h + 1 ConsoleWrite("result width " & $rw & @CRLF) ConsoleWrite("result height " & $rh & @CRLF) Local $matEmpty = _cveMatCreate() Local $matResult = _cveMatCreate() _cveMatCreateData($matResult, $rw, $rh, $CV_32FC1) ; In the way it is used by this code, ; $CV_TM_SQDIFF_NORMED is only valid for the first match Local $matchMethod = $CV_TM_CCOEFF_NORMED ; $CV_TM_SQDIFF_NORMED ; $CV_TM_CCOEFF_NORMED Local $methodAcceptsMask = $matchMethod == $CV_TM_SQDIFF Or $matchMethod == $CV_TM_CCORR_NORMED If $methodAcceptsMask Then Local $matTmpMask = _cveImread("mask.png", $CV_IMREAD_GRAYSCALE) _cveMatchTemplateMat($matImg, $matTmp, $matResult, $matchMethod, $matTmpMask) _cveMatRelease($matTmpMask) Else _cveMatchTemplateMat($matImg, $matTmp, $matResult, $matchMethod, $matEmpty) EndIf _cveNormalizeMat($matResult, $matResult, 0, 1, $CV_NORM_MINMAX, -1, $matEmpty) Local $tRedColor = _cvRGB(255, 0, 0) Local $tGreenColor = _cvRGB(0, 255, 0) Local $tBlackColor = _cvScalar(0) Local $threshold = 0.95 Local $score = 0 Local $tMinVal = DllStructCreate("double min;") Local $tMaxVal = DllStructCreate("double max;") Local $tMinLoc = DllStructCreate($tagCvPoint) Local $tMaxLoc = DllStructCreate($tagCvPoint) Local $tMatchLoc Local $tMatchRect = _cvRect(0, 0, $w, $h) Local $matMask = _cveMatCreate() Local $limit = 5 While 1 ;use infinite loop since ExitLoop will get called If $limit == 0 Then MsgBox($MB_SYSTEMMODAL, "", "There are too much matches") ExitLoop EndIf $limit = $limit - 1 _cveMinMaxLocMat($matResult, $tMinVal, $tMaxVal, $tMinLoc, $tMaxLoc, $matEmpty) ; Local $tPoint = DllStructCreate($tagCvPoint) ; $rw = _cveMatGetWidth($matResult) ; $rh = _cveMatGetHeight($matResult) ; ; Extremely slow, unreliable and causes crash. ; ; May be there is an OutOfBound error ; For $i = 1 To $rw Step 1 ; $tPoint.y = $i - 1 ; For $j = 1 To $rh Step 1 ; $tPoint.x = $j - 1 ; Local $_score = _cveMatGetAt("float", $matResult, $tPoint) ; If ($matchMethod == $CV_TM_SQDIFF Or $matchMethod == $CV_TM_SQDIFF_NORMED) Then ; $_score = 1 - $_score ; EndIf ; If $_score >= $threshold Then ; ConsoleWrite("find match at (" & $j - 1 & ", " & $i - 1 & ")" & @CRLF) ; EndIf ; Next ; Next ; $tPoint = 0 ; For SQDIFF and SQDIFF_NORMED, the best matches are lower values. For all the other methods, the higher the better If ($matchMethod == $CV_TM_SQDIFF Or $matchMethod == $CV_TM_SQDIFF_NORMED) Then $tMatchLoc = $tMinLoc $score = 1 - DllStructGetData($tMinVal, 1) _cveMatSetAt("float", $matResult, $tMinLoc, 1.0) _cveMatSetAt("float", $matResult, $tMaxLoc, 1.0) Else $tMatchLoc = $tMaxLoc $score = DllStructGetData($tMaxVal, 1) _cveMatSetAt("float", $matResult, $tMinLoc, 0.0) _cveMatSetAt("float", $matResult, $tMaxLoc, 0.0) EndIf ConsoleWrite("score " & $score & @CRLF) If $score < $threshold Then MsgBox($MB_SYSTEMMODAL, "", "There are no more suitable matches") ExitLoop EndIf $tMatchRect.x = $tMatchLoc.x $tMatchRect.y = $tMatchLoc.y ConsoleWrite("found a match at (" & $tMatchLoc.x & ", " & $tMatchLoc.y & ")" & @CRLF) ; Draw a red rectangle around the matched position _cveRectangleMat($matImg, $tMatchRect, $tRedColor, 2, $CV_LINE_8, 0) _cveImshowMat("Where's Wally", $matImg) _cveWaitKey(0) ; Make the current match location to be ignored by the next processing _cveRectangleMat($matResult, $tMatchRect, $tBlackColor, 2, $CV_LINE_8, 0) WEnd ;~ There is no garbage collector, ;~ therefore resources must be released manually ;~ to avoid memory leaks on a long running process $tMinVal = 0 $tMaxVal = 0 $tMinLoc = 0 $tMaxLoc = 0 $tMatchRect = 0 $tMatchLoc = 0 $tBlackColor = 0 $tGreenColor = 0 $tRedColor = 0 _cveMatRelease($matMask) _cveMatRelease($matResult) _cveMatRelease($matEmpty) _cveMatRelease($matTmp) _cveMatRelease($matImg) _cveDestroyWindow("Where's Wally") _Opencv_DLLClose() Lion66 1 Link to comment Share on other sites More sharing options...
Lion66 Posted July 12, 2021 Share Posted July 12, 2021 (edited) The example works! It's impressive. Big like. It seems that $tMaxVal return a constant value. It inspires me that my idea will come true. I want to repeat this example. The problem was that in the OPENCV-2 version, the $tMaxVal values were different in different starts. Now it has to work. It will take me a long time to remember and change the my code to your functions. And it probably won't work. I am afraid of losing the relevance of the moment and will ask you to edit my old code.😉 Thank in advance! The point is to change in loop the size of the large image from consciously larger to consciously smaller, passing through the actual size of the desired part to obtain at that moment the highest $tMaxVal, and then, using the scale, show the frame in right place. The picture "bridge200p.jpg" was increased by 200% after its part was created as "Template.png". Finally, my code: expandcollapse popup#include <GDIplus.au3> #include <Memory.au3> #include <GUIConstantsEx.au3> #include <OpenCVFcns.au3> #include <Array.au3> ;start dll opencv _GDIPlus_Startup() _OpenCV_Startup() #Region Template ;Load template Local $ptemp = _cvLoadImage("Template.png") ;Opencv function to load image ;// Create a destination image to hold output ;//smooth and converting the original image into grayscale Local $TemplateGray = _cvCreateImage(_cvGetSize($ptemp), 8, 1) ; ;_cvSmooth($ptemp, $ptemp, $CV_GAUSSIAN, 3, 3) ; _cvCvtColor($ptemp, $TemplateGray, $CV_BGR2GRAY) ; _cvCanny($TemplateGray, $TemplateGray, 50, 200) ; kontyre #EndRegion Template #Region Image ;Load image from file Local $pimg = _cvLoadImage("bridge200p.jpg") ;Opencv function to load image ;// Create a destination image to hold output ;//smooth and converting the original image into grayscale Local $pimgGrayScale = _cvCreateImage(_cvGetSize($pimg), 8, 1) ; ;_cvSmooth($pimg, $pimg, $CV_GAUSSIAN, 3, 3) ; _cvCvtColor($pimg, $pimgGrayScale, $CV_BGR2GRAY) ; ;_cvCanny($pimgGrayScale, $pimgGrayScale, 50, 200) ; kontyre ;_cvEqualizeHist( $pimgGrayScale, $pimgGrayScale ) ; osvetlit' #EndRegion Image ;// Create some CV and Autoit windows to show the input ;_cvNamedWindow("Example-$ptemp") ;// show input image ;_cvShowImage("Example-$ptemp", $ptemp) ; Local $width2 = DllStructGetData(_cvGetSize($TemplateGray), "width") Local $height2 = DllStructGetData(_cvGetSize($TemplateGray), "height") Local $pimgResized, $scale, $hMatch_Size2, $width, $height, $width2, $height2, $rw, $rh, $presult Local $CurMaxVal = 0, $CurLocX = 0, $CurLocY = 0 For $i = 1.5 To 2.5 Step 0.25 ;//Resize image $scale = $i $pimgResized = _cvCreateImage(_cvSize(Round(DllStructGetData(_cvGetSize($pimgGrayScale), "width") / $scale, 0), Round(DllStructGetData(_cvGetSize($pimgGrayScale), "height") / $scale, 0)), 8, 1) ; _cvResize($pimgGrayScale, $pimgResized, $CV_INTER_LINEAR) _cvCanny($pimgResized, $pimgResized, 50, 200) ; kontyre $width = DllStructGetData(_cvGetSize($pimgResized), "width") $height = DllStructGetData(_cvGetSize($pimgResized), "height") If ($width < $width2) Or ($height < $height2) Then MsgBox(0, "", "end") ExitLoop Else $rw = $width - $width2 + 1 $rh = $height - $height2 + 1 ;// Create Opencv matrix object 32 bit floating $presult = _cvCreateMat($rh, $rw, $CV_32FC1) ;// Template matching _cvMatchTemplate($pimgResized, $TemplateGray, $presult, 5) _cvNormalize($presult, $presult, 0, 1, $CV_MINMAX, Null) _cvThreshold($presult, $presult, 0.90, 1, $CV_THRESH_BINARY) ;// Create minmax variables to pass to opencv Local $tmaxloc = DllStructCreate($tagCvPoint) Local $tminloc = DllStructCreate($tagCvPoint) Local $tmaxval = DllStructCreate("double max;") Local $tminval = DllStructCreate("double min;") Local $pmaxloc = DllStructGetPtr($tmaxloc) Local $pminloc = DllStructGetPtr($tminloc) Local $pmaxval = DllStructGetPtr($tmaxval) Local $pminval = DllStructGetPtr($tminval) ;// create mask to find multiple matches Local $pmask = _cvCreateImage(_cvSize($rw, $rh), 8, 1) _cvSet($pmask, _cvScalar(1)) ;// Find location of maximum _cvMinMaxLoc($presult, $pminval, $pmaxval, $pminloc, $pmaxloc, $pmask) ;// Mask it to find others if exists and draw red rectangle on input image _cvRectangle($pmask, _cvPoint(DllStructGetData($tmaxloc, "x") - 5, DllStructGetData($tmaxloc, "y") - 5), _cvPoint(DllStructGetData($tmaxloc, "x") + $width2, DllStructGetData($tmaxloc, "y") + $height2), _cvScalar(0), -1, 8, 0) _cvRectangle($pimgResized, _cvPoint(DllStructGetData($tmaxloc, "x") - 5, DllStructGetData($tmaxloc, "y") - 5), _cvPoint(DllStructGetData($tmaxloc, "x") + $width2 + 10, DllStructGetData($tmaxloc, "y") + $height2 + 10), _CV_RGB(0, 255, 0), 2, 8, 0) ;// Update input image _cvShowImage("Where's Wally", $pimgResized) Sleep(100) If $CurMaxVal < $pmaxval Then $CurMaxVal = $pmaxval $CurScale = $scale $CurLocX = DllStructGetData($tmaxloc, "x") * $scale $CurLocY = DllStructGetData($tmaxloc, "y") * $scale ;MsgBox(0, "", "Changed: " & $CurMaxVal[2] & ":" & $CurMaxVal[3]) EndIf ; If DllStructGetData($tmaxval, "max") < .99 Then ExitLoop ; MsgBox(0, "", Number($CurMaxVal) / 10000 & @CRLF & Number($pmaxval)/10000) EndIf Next ;MsgBox(0, "", "Finish: " & $CurLocX & ":" & $CurLocY & @CRLF & "$CurMaxVal: " & Number($CurMaxVal) / 10000) ;// Mask it to find others if exists and draw red rectangle on input image ;_cvRectangle($pmask, _cvPoint($CurLocX - 5, $CurLocY - 5), _cvPoint($CurLocX + $width2, $CurLocY + $height2), _cvScalar(0), -1, 8, 0) _cvRectangle($pimg, _cvPoint($CurLocX - 5, $CurLocY - 5), _cvPoint($CurLocX + $width2 + 10, $CurLocY + $height2 + 10), _CV_RGB(0, 255, 0), 2, 8, 0) ;// Update input image ;_cvShowImage("Example-Resize", $pimgResized) _cvShowImage("Where's Wally", $pimg) _cvWaitKey() _cvReleaseImage($ptemp) _cvReleaseImage($TemplateGray) _cvReleaseImage($pimg) ; _cvReleaseImage($pimgResized) ; _cvReleaseImage($pimgGrayScale) ; _cvDestroyAllWindows() _Opencv_CloseDLL() _GDIPlus_Shutdown() Exit Edited July 12, 2021 by Lion66 Link to comment Share on other sites More sharing options...
smbape Posted July 12, 2021 Share Posted July 12, 2021 Unfortunally at the present time I am upgrading emgucv to 4.5.2 I will try when I can. In the mean time, you can try making it works. You will be probably be luckier than you think. The transformation is usually direct: ; $img = _cvLoadImage(...) $img = _cveImread(...) ; Local $TemplateGray = _cvCreateImage(_cvGetSize($ptemp), 8, 1) ; Local $TemplateGray = _cveMatCreate() _cveMatCreateData($TemplateGray, _cveMatGetWidth($ptemp), _cveMatGetHeight($ptemp), $CV_8UC1) ; _cvReleaseImage _cveMatRelease ; Every other _cv* functions become: ; - _cve*Mat if it uses a matrix (coming from _cveImread of _cveMatCreate) ; - _cve* if it doesn't (coming from _cveImread of _cveMatCreate) ; Example ; _cvCvtColor($pimg, $pimgGrayScale, $CV_BGR2GRAY) _cveCvtColorMat($pimg, $pimgGrayScale, $CV_BGR2GRAY) ; _cvWaitKey() _cveWaitKey() Give it a try. Link to comment Share on other sites More sharing options...
smbape Posted July 13, 2021 Share Posted July 13, 2021 Update emgucv dll to 4.5.2 There transformation is not as easy as I tough it would have been. But I managed to get something that shows images. Not sure if it is the expected result. With the way you are doing the Multi-scale Template Matching, I think you will have wrong results. First: cv::matchTemplate+cv::normalize will always give you a maxval of 1, therefore, you cannot distinguish matches of different scale. Second: The $pmask is always fill with "1", making it useless Thrid: $pimgGrayScale is a gray matrix, therefore you cannot draw a red rectangle on it. Only back or white rectangles Try to look for Multi-scale Template Matching on a search engine and see if you get examples with opencv 4 expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GDIplus.au3> #include <Memory.au3> #include <GUIConstantsEx.au3> #include <Array.au3> #include <emgucv-autoit-bindings\cve_extra.au3> ;start dll opencv _GDIPlus_Startup() _OpenCV_DLLOpen("libemgucv-windesktop-4.5.2.4673\libs\x64\cvextern.dll") Local $matEmpty = _cveMatCreate() #Region Template ;Load template Local $ptemp = _cveImreadAndCheck("Template.png") ;Opencv function to load image ;// Create a destination image to hold output ;//smooth and converting the original image into grayscale Local $TemplateGray = _cveMatCreate() ;_cveSmoothMat($ptemp, $ptemp, $CV_GAUSSIAN, 3, 3) ; _cveCvtColorMat($ptemp, $TemplateGray, $CV_BGR2GRAY) ; _cveCannyMat($TemplateGray, $TemplateGray, 50, 200) ; kontyre #EndRegion Template #Region Image ;Load image from file Local $pimg = _cveImreadAndCheck("bridge200p.jpg") ;Opencv function to load image ;// Create a destination image to hold output ;//smooth and converting the original image into grayscale Local $pimgGrayScale = _cveMatCreate() ;_cveSmoothMat($pimg, $pimg, $CV_GAUSSIAN, 3, 3) ; _cveCvtColorMat($pimg, $pimgGrayScale, $CV_BGR2GRAY) ; ;_cveCannyMat($pimgGrayScale, $pimgGrayScale, 50, 200) ; kontyre ;_cvEqualizeHistMat( $pimgGrayScale, $pimgGrayScale ) ; osvetlit' #EndRegion Image ;// Create some CV and Autoit windows to show the input ;_cveNamedWindow("Example-$ptemp") ;// show input image ;_cveImshowMat("Example-$ptemp", $ptemp) ; Local $width2 = _cveMatGetWidth($TemplateGray) Local $height2 = _cveMatGetHeight($TemplateGray) Local $pimgResized, $scale, $hMatch_Size2, $width, $height, $width2, $height2, $rw, $rh, $presult Local $CurMaxVal = 0, $CurLocX = 0, $CurLocY = 0 Local $tBlackColor = _cvScalar(0) Local $tRedColor = _cvRGB(255, 0, 0) Local $tWhiteColor = _cvRGB(255, 255, 255) Local $tDsize = _cvSize(0, 0) For $i = 1.5 To 2.5 Step 0.25 ;//Resize image $scale = $i $pimgResized = _cveMatCreate() $tDsize.width = _cveMatGetWidth($pimgGrayScale) / $scale $tDsize.height = _cveMatGetHeight($pimgGrayScale) / $scale _cveResizeMat($pimgGrayScale, $pimgResized, $tDsize, 0, 0, $CV_INTER_LINEAR) _cveCannyMat($pimgResized, $pimgResized, 50, 200) ; kontyre $width = _cveMatGetWidth($pimgResized) $height = _cveMatGetHeight($pimgResized) If ($width < $width2) Or ($height < $height2) Then MsgBox(0, "", "end") ExitLoop EndIf $rw = $width - $width2 + 1 $rh = $height - $height2 + 1 ;// Create Opencv matrix object 32 bit floating $presult = _cveMatCreate() _cveMatCreateData($presult, $rh, $rw, $CV_32FC1) ;// Template matching _cveMatchTemplateMat($pimgResized, $TemplateGray, $presult, 5, $matEmpty) _cveNormalizeMat($presult, $presult, 0, 1, $CV_MINMAX, -1, $matEmpty) _cveThresholdMat($presult, $presult, 0.90, 1, $CV_THRESH_BINARY) ;// Create minmax variables to pass to opencv Local $tmaxloc = DllStructCreate($tagCvPoint) Local $tminloc = DllStructCreate($tagCvPoint) Local $tmaxval = DllStructCreate("double max;") Local $tminval = DllStructCreate("double min;") ;// create mask to find multiple matches Local $pmask = _cveMatCreate() _cveMatOnes($rh, $rw, $CV_8UC1, $pmask) ;// Find location of maximum _cveMinMaxLocMat($presult, $tminval, $tmaxval, $tminloc, $tmaxloc, $pmask) ;// Mask it to find others if exists and draw red rectangle on input image Local $tMaskRect = _cvRect($tmaxloc.x - 5, $tmaxloc.y - 5, $width2 + 5, $height2 + 5) _cveRectangleMat($pmask, $tMaskRect, $tBlackColor, -1, $CV_LINE_8, 0) $tMaskRect = 0 ; Local $tImgRect = _cvRect($tmaxloc.x - 5, $tmaxloc.y - 5, $width2 + 15, $height2 + 15) Local $tImgRect = _cvRect($tmaxloc.x, $tmaxloc.y, $width2, $height2) _cveRectangleMat($pimgResized, $tImgRect, $tWhiteColor, -1, $CV_LINE_8, 0) $tImgRect = 0 ;// Update input image _cveImshowMat("Where's Wally", $pimgResized) Sleep(100) If $CurMaxVal < $tmaxval.max Then ; MsgBox(0, "", "Changed: " & $CurMaxVal & ":" & $tmaxval.max) $CurMaxVal = $tmaxval.max $CurScale = $scale $CurLocX = $tmaxloc.x * $scale $CurLocY = $tmaxloc.y * $scale EndIf ; If DllStructGetData($tmaxval, "max") < .99 Then ExitLoop ; MsgBox(0, "", Number($CurMaxVal) / 10000 & @CRLF & Number($pmaxval)/10000) Next ; MsgBox(0, "", "Finish: " & $CurLocX & ":" & $CurLocY & @CRLF & "$CurMaxVal: " & Number($CurMaxVal) / 10000) ;// Mask it to find others if exists and draw red rectangle on input image ;_cveRectangle($pmask, _cvPoint($CurLocX - 5, $CurLocY - 5), _cvPoint($CurLocX + $width2, $CurLocY + $height2), $tBlackColor, -1, 8, 0) Local $tImgRect = _cvRect($CurLocX - 5, $CurLocY - 5, $width2 + 15, $height2 + 15) _cveRectangleMat($pimg, $tImgRect, $tRedColor, 1, 8, 0) $tImgRect = 0 ;// Update input image ;_cveImshowMat("Example-Resize", $pimgResized) _cveImshowMat("Where's Wally", $pimg) _cveWaitKey() $tDsize = 0 $tWhiteColor = 0 $tRedColor = 0 $tBlackColor = 0 _cveMatRelease($ptemp) _cveMatRelease($TemplateGray) _cveMatRelease($pimg) ; _cveMatRelease($pimgResized) ; _cveMatRelease($pimgGrayScale) ; _cveMatRelease($matEmpty) ; _cveDestroyAllWindows() _Opencv_DLLClose() _GDIPlus_Shutdown() Exit emgucv-autoit-bindings.zip Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now