My pet project from this weekend: findContours (openCV) added to cv.jit
Dec 19 2016 | 12:38 am
I am not sure why the amazing cv.jit package does not include support for findContours - but when I found myself having a need for it, I spent the weekend getting it to work...
I am pretty happy with the results - especially after running the cvFindContours() results through cvApproxPoly() to reduce the point count (which is super important for my project).
I am currently working on some better control over the coloring - right now it simply uses a matrix of color choices in the right inlet and iterates over these colors for each path - which looks ok for static images, but for movies / animations - it results in a the same path being colored different each frame - which looks kinda bad. I am going to add the option of coloring all enclosing contours the same color - and also add the option to color based on contour area size - which should improve the results for movies / animations.
I also discovered by accident that jit.movie allows you to drop image files as well as movie files - so I simply use a dropfile->read->jit.movie path - and then do rgb2luma->cv.jit.canny->cv.jit.findContours.
Thanks to C74 for updating the cv.jit package to 64bit and moving the build files to Xcode! That was super helpful when it came time to debug the crazy CvSeq structure that findContours uses.