Using OpenCV in Delphi

    It so happened that I actively use Delphi in my work (programming for work, my own open and closed projects) and now I needed to write a program using the OpenCV open computer vision library. What to do, because officially it is impossible to use OpenCV in Delphi, and it’s too long to move to C for one program.

    But nothing is impossible ...


    Having searched a bit on the Internet, I found several projects on using OpenCV in Delphi.
    The first , second , third and most recent and successful - the fourth , which I took as a basis.

    The github project seemed interesting to me, many OpenCV functions were implemented, there are many examples on Delphi, but the project was abandoned by the author and I had to take on my own.

    All the current developments I posted on code.google.com/p/opencv-delphi-new

    Currently done:
    1. Support for RAD Studio XE3.
    2. New functions have been added: cvFlip, cvClearMemStorage, cvCreateChildMemStorage, cvRectangle, cvRetrieveFrame, cvIntegral, cvGetPerspectiveTransform, cvWarpPerspective, cvCreateMat, cv2DRotationMatrix, cvVAFairFind
    3. Added 6 new examples:
    FaceDetect - An example of detecting faces in a video stream using the Hough transform.
    FindContours - Find the contours of the image.
    Integral - Integral image.
    WarpAffine - Image Transformation - affine transformations (Rotate the image at an arbitrary angle).
    WrapPrespective - Image Transformation - Homography (Perspective Transformation).
    MatchShapes - Search for an object in the image by template (Comparison of objects by the moments of their contours).

    In the added examples, I tried to paint all the manipulations in detail to get the desired result.

    If someone is interested in the topic of using OpenCV in Delphi, then write me an email or leave comments.
    If the topic of using OpenCV is interesting in principle, then I can write several articles, just write down which area of ​​use of OpenCV you are interested in.

    Also popular now: