Hi,
I have some code to test …
This new version of the computerVision addon is sort of the result from a previous discussion. The idea was to create a common base class for the image types (ofGrayscaleImage, ofColorImage, ofFloatImage) and put all the overlaping functionality in there.
I also tried to get functionality in that was posted on the forum and things that were obviously missing. I was also working on a multitouch surface and thought it might be nice to have the blob tracker from the surface software as part of this addon. I tried to add this feature without a lot of bloat. Here is an example that uses the blob tracker:
The main purpose of the blob tracker is that blobs have a persistent id and also fire events when they appear, move, or diappear. There is also a way to query the order in which the blobs appeared.
I haven’t entirely tested all the code but it should not be too bad with the bugs (I hope).
This is a complete list of changes:
* image types now share common base class ofCvImage
* image destructor deallocates dynamic memory
* assignment and copy constructor do proper deep copy
* complete set of operator overloads to go between image types
* added image transformations (translate, rotate, scale)
* added image undistortion method
* texture can be toggled with setUseTexture() like in videoGrabber
* use of stl data types and pure c++ where possible
* setFromPixels now only copies to cvImage not to pixels
* ofCvContourFinder slightly adapted
* a blob tracker added
** ofCvBlobTracker
** operates on proximity and best fit
** compensates for ghost frames
** optional callbacks in main app for blob events
** blobOn(…), blobMoved(…), blobOff(…)
** unique ids and order of appearance
* and more
Let me know if anything breaks,
Any feedback appreciated,