SRL Archive - Research & Development Lounge

OpenCV Bindings for Simba


slushpuppy

2013-05-26 10:44:12




Started off with the most basic threshold/findcontours functions.Will be creating bindings for other complex shape/obj recognition functions

Feel free to suggest potential functions combinations that you feel could be used for creating random event handlers..


http://docs.opencv.org/modules/refman.html

Olly

2013-05-26 12:13:05

Great start :p look forward to em complex shape/obj recognition functions more though since we can do most what you did above already :)

rj

2013-05-26 13:25:18

This looks nice good luck, could you possibly show a vid of it in action?(like finding a circle)

CynicRus

2013-05-26 13:34:27

Cool. I had the idea to do the same, but I was too lazy to learn as much OpenCV code:)

revon

2013-05-27 06:57:05

I was thinking about trying this exact same thing. OpenCV would be a great addition.

slacky

2013-06-14 10:09:52

Been using OpenCV for quite some time now (Python binds), and to see that someone have take there time to unleash some of the possibilities to Simba is wonderful! :)

@Officer barbrady: That is actually quite simple with the use of cvHoughCircles(), cvCanny, and cvSmooth, http://docs.opencv.org/doc/tutorials/imgproc/imgtrans/hough_circle/hough_circle.html

@Ollybest, Finding contours with SplitTPA is much slower than using OpenCVs findContours, you'd also have to do a ton of other words to get teh same effect as "findContors". From the quick peak in Simba's source, I would say that SplitTPA performs in O(n^2)-time, which is useless for large amount of data, the speed would go to hell; but findContours will work quite fast - I use it a bit, and could for many cases server for the same purpose, and more stuff as well. The point is that you can't match the speed of OpenCV, and speed is important when trying to do some sort of object recognition, and findContours+feature comparisons will most always be used in such a case.

Olly

2013-06-14 12:01:10

Not saying the speed isn't impressive, it will just be way more impressive to see some sort of object detection :p

Brandon

2013-06-14 13:14:09

From: warpie
The point is that you can't match the speed of OpenCV, and speed is important when trying to do some sort of object recognition, and findContours+feature detection will most always be used in such a case.



Yes you can. If the speed increase is that much greater then post a benchmark comparison. I've also used OpenCV as well as other algo's with embedded ASM and those were a ton faster. Yeah Simba's algo's could use some optimizing but how much would that really increase speed? A couple milliseconds? I could say the same for OpenCV.. it'd be nice if they templated the code and take advantage of inlining and cut down on the massive amount of branching but that's not the case. This goes for Simba as well..

Also, shape comparison isn't the only important thing. Colour is as well so take that into consideration. Matching shapes and features are one thing, but matching shapes, features and colours are another.

As much as I hate Simba's limitations and restrictions, I must say it does a fairly good job at finding things.. I'd like to compare it to OpenCV if this project gets finished.

I have no doubt OpenCV will open a new window but let's not give it an over-hype until a comparison, benchmark, or an example is shown. Olly is right. An example is needed.


Good work Slushpuppy. I'm actually looking forward to this. :)

slacky

2013-10-24 09:10:22

@Olly: Object detection is a pretty "wide word".. OpenCV implements features to allow you to simpler do object detection/recognition. You still need to do a hell lot of work to get something working really well. Note: cvFindContours does not only find the contours, it also can return the contours in a hierarchy structure, which might just be very helpful when working with objects.

@Brandon: If you are willing to involve asm to get it going faster, then sure you can.. The thing is that teh implementation (the algorithms used) are often the best known one (considering time complexity). Take OpenCVs MatchTemplate, sure it might be doable to (micro?) optimize. Yet it's still extremely fast. It uses Fast Feature Transform (FFT) to get it going almost as fast as possible (reduces algorithms time-complexity a lot), that is without involving any asm, or computing it on the GPU (which I think they have implemented as an alternative), now the FFT might use SSE instructions. For really small templates it might not be the fastest solution, FFT will result in a little warmup-time before it starts processing the signals.
I have looked at tens of other implementations, many who also use FFT to convert the images to signals… but none of am beats the fastest method in cvMatchTemplate.
Edit: Don't confuse this with Simbas bitmap finding. Simba does nothing close to a full cross correlation, as it will search only those pixels that start with the same color as the template, this will result badly if the bitmaps are not that similar, or hack even if just a small portion of it is distorted. CrossCorr is much less sensitive than that, not at all comparable.


Anyhow… Try to keep up the work man! :)

slushpuppy

2013-10-25 00:41:06

From: Brandon
Yes you can. If the speed increase is that much greater then post a benchmark comparison. I've also used OpenCV as well as other algo's with embedded ASM and those were a ton faster. Yeah Simba's algo's could use some optimizing but how much would that really increase speed? A couple milliseconds? I could say the same for OpenCV.. it'd be nice if they templated the code and take advantage of inlining and cut down on the massive amount of branching but that's not the case. This goes for Simba as well..

Also, shape comparison isn't the only important thing. Colour is as well so take that into consideration. Matching shapes and features are one thing, but matching shapes, features and colours are another.

As much as I hate Simba's limitations and restrictions, I must say it does a fairly good job at finding things.. I'd like to compare it to OpenCV if this project gets finished.

I have no doubt OpenCV will open a new window but let's not give it an over-hype until a comparison, benchmark, or an example is shown. Olly is right. An example is needed.


Good work Slushpuppy. I'm actually looking forward to this. :)


It will be done.

As fare as I can tell, considering that I only spent about 2-3 months with Opencv, it has color finding which disregards hue levels( although this is fairly easily implemented in Simba).

@warpie It would be great to have someone as experienced as you to come onboard. Once I finish the basic framework, the plugin will be uploaded to github where you can help out to add more functionalities to the plugin ;)

Wizzup?

2013-12-22 08:19:41

This is pretty awesome! :)