OpenCV Library

Is it possible to import the cv2 Python extension from OpenCV so that we can access the library in OpenMV? For instance, we would like to implement the cv2.HoughCircles function to do circle detection.

Or is it possible to convert the OpenCV source code from C++ to Python?

Yes, I am also interested in this functionality. I want to use lucas-kanade algorithm in OpenCV on the OpenMV camera.

Hi, we already have circle detection on the OpenMV Cam. There’s a method called find_circles(). It implements circle detection using the Hough Transform.

As for optical flow… we have that using phase correlation which is better than the lucas-kanade algorithm. There are examples for these things in the IDE examples folder.

But there is no way for using OpenCV with OpenMV? I am interested in using some other OpenCV functions (like estimating geometric transforms) as well…

Please see the rotation correction method. It can do perspective transformation in the x/y/z direction.

As for a more general approach. I plan to add the ability for it to take a list of 4 points and it will do a homography transform.

But, anyway, no, all the vision stuff is running on a microcontroller with has a very limited amount of heap space. When me and Ibrahim started working on this project we were developing with the M4 processor which was very limited. Only on the M7 has it been possible to run desktop libraries like AprilTags/Libdmtx/ZBar etc. Even then, to use these libraries we had to port the code by redoing memory allocations. We’ve been feature creeping with the platform to make it more useful… but, in general the design goal was to just make a sure easy to get started color tracking system like a Pixy Cam but more flexible and able to do everything itself.

Anyway, it’s quite possible to run desktop code on the camera if you use the C programming interface: Home · openmv/openmv Wiki · GitHub. You can really extend the system to do what you want. Note that the AprilTag code brings in a full matrix library with SVD support: https://github.com/openmv/openmv/blob/master/src/omv/img/apriltag.c#L1027

Do you have plans to implement contrast and brightness correction functions (α, β, G) in openMV?

https://docs.opencv.org/3.4.1/d3/dc1/tutorial_basic_linear_transform.html

Brightness correction is available already by using morph() http://docs.openmv.io/library/omv.image.html?highlight=morph#image.image.morph

Um, but, yes, I can add a method for brightness, contrast, and gamma correction. What would you like? Like, what kind of API for it?