Recently I purchased an OpenMV and just getting around to using it now. Been experimenting with various options, examples etc… just to get a better idea.
I have noticed that my M7 was running really slow at 3.4 FPS when running the Find_Line_Segments function, if I disabled the video buffer it would only go upto 3.6 FPS. Setting the frame_size to QQQVGA upped the FPS to around 6.7, and QQQQVGA had it upto 22 FPS (but the image had no detail)
I also copied the code from the following video at 3:14:
The camera in the video was running at around 15 FPS with QQVGA size, I was getting 3.4 FPS with the same code. Just updated the firmware to latest as well, any ideas?
Hi, we switched algorithms to using the same one OpenCV uses. It’s called the LSD line segment detection algorithm. There are papers on it along with C code that I ported. To the camera. It’s slow but very accurate. My custom algorithm which you saw on the video is a lot faster but the lines are more jittery.
I think I can make my own algorithm more stable in the future by improving how lines are merged by I’m not focusing on this right now.
If you want the faster algorithm I left the code in the C firmware. Enabling it will require a recompile but otherwise not much work.
Note that the two functions don’t exactly accept the same arguments so you’ll need to determine what you want to pass and what’s hardcoded. If you look at the git history for v2.5 you’ll find the old py_image method that called the original function which you can just copy: