bugs with opencv addon w/ of 0.03+ , readme !!

hi all,

cj and stefan helped diagnose and fix a bug with OF cv addon… the changes are here:

http://openframeworks.cc/versions/addon-…-ode-02.zip

you should swap this code with the code in the addon / computerVision folder.

the problem was pass by copy as opposed to pass by reference. because we added destructors and better memory management to everything in OF, all pass by copy type code will fail because the copy of the object gets cleaned up, and some information or links to information gets lost. the most obvious of this is the “id” of the texture in the opencv images - that’s why they appear white.

we are fixing everything as quickly as we can, in the meantime this code should fix any issues…

thanks!
zach

I think I may be running up against this in an app I’m working on.

in the openCV example (but using ofMoviePlayer instead of ofVidgrabber) when I take the image data and move it into a color image, then a grey, then a threshold, i get errors.

The first one works (ie. if I only do the color image, it works okay, commenting out the subsequent functions)… but then when I apply the second (grey) processing, the color image only shows white, while the grey now shows.

Sounds like a similar copy vs. ptr error no?

I’ve downloaded the new computerVision code from above… maybe I didn’t install it correctly though?

so what I’m asking is: is there an incompatibility between ofMoviePlayer and the OpenCV addon that anyone is aware of?

If not, I’ll post a better description of whats happening with some code.

Thanks in advance,

-C

*edit* PS. I had the problem in OFW 0.02, but have just downloaded 0.04… seems like the same problem.

can you post a zip of the libs and the app?
I think you may have not updated the code properly.

take care!!
zach

I managed to fix it.

As you suspected, I had botched the CV update somehow.

Note to self: fix only one thing at a time 8)

Thanks!

-C

I had a few references to the ofPoint2f struct in my code that needed to be replaced with ofCvPoint2f when I replaced the computerVision code. It wasn’t in the OF distribution, but some code that i stole from Chris Sugrue, but in case this is troubling anyone else…

IMHO you should post/mention that on the opencv-addon-page, or just update it.

thx + keep up the good work!

thanks for the opinion - we’ve been pretty lax on the website, while super active on the forum. it’s hard to find a right balanace, and we really need someone else who can do web stuff better then us, since most of our time is spent either teaching, giving workshops, helping people make projects, making our own projects, giving talks, traveling, (answering forum posts!) and so on. it’s not an excuse, just to say that we’ve prioritized the forum over the website for the moment, but are looking to shift.

the future website will allow people to maintain their own addons, and alot easier for us and others to update. the current focus is on 0.05 and we’ve just been polishing it the last few days. hang tight and as always thanks for the feedback!!

zach

yeah sure, i can imagine that you are pretty busy. wasn’t a bad critic anyway. just wanted to remember you. so as i said previously - keep up the good work! can’t wait for 0.05 …

no it was a good point, and good to be reminded that there is a life outside the forums :slight_smile: I’ve added a note for the moment on the addons page…

thanks!!
zach

is that bug still relevant? otherwise, I’ll unsticky the topic…