I just got started with of and want to do poin tracking. (It seems like a daunting task…)
I’m trying to use the opencv library available through ofxOpencv. The question I have is, to what extent does that limit the opencv library. I find some of the opencv functions are not supported. I am wondering if I should use the actual opencv library, or if the ofxOpenCv already has all the functions, and I just can’t figure out how to call them?
ok, that was just sillyness
turns out it is there, I just didn’t get the code completion on it in codeblocks.
but since I got your attention I was wonderinmg if you could tell me what the best way to go is in terms of feature tracking. I’m geting all googled out, and keep hopping between different attempts. Is there any simple algorythm that I could undestand without any need to get into complex calculus?
I decided to redo the camshiftdemo (and stick to it - kind of) to get the basics, but I’m not sure it will do what I want it to yet. is there any other resources you know of could suggest?
Opencv is compiled as a library in any flavor of the 3 main operating systems. You are welcomed to use is separate from open frameworks. oF just make it easier to use the IplImage type to do many things with minimal effort. And if I understood you questions right:
No ofxVectorMath has nothing to do with OpenCv. Look at the code.
Yes you can use ofxVectorMath and OpenCv calls together.
Also along with those 2 you should also add cvCalcOpticalFlowLK to the mix.
[edit] What you might want to do is start by sending points you waant to track to goodpointstotrack then send those output points from that to findcornersubpix along with the original point coordinates you specified to track. This should refine the track points a bit more. finally do an opticalflowlk to give you the final good tracking points.
As part of a few computer Vision techniques I showed towards the end of my Flash on the Beach presentation a few days ago, it’s not very OF’ified yet though, it uses OpenCV types mostly, so I was hoping to get some time to sort that out before putting them out there (again).
There are Visual Studio 2005 and Xcode projects in there.
Nice! It’s more OF’ified than the code I just posted above yours. Thanks great resource. I know the ofxOpenCv is trying to keep it simple but I think this kind of stuff should be formatted as an addon along with the haar stuff and the opticalflow stuff and should be name ofxOpenCvAdvanced or something similar.
thanks for all the replies…
I’ve been playing around with the source, and most of the time has been battling with the compiler and linkages. but I finaly got some code to work, and I’m quite aexcited about it
okay… I think I need to know more about the theory behind this.
the cvFindTrackPointExample from JGL is quite helpful, and it does the
cvGoodFeaturesToTrack and cvFindCornerSubPix without the optical flow
though I can see how oflow would be helpful in determining how reliable the tracked points are, I find it strange that most examples rely on the optical flow.
oFlow seems a bit crude or inprecise for my liking and with unreliable light or self calibrating cameras (which most are) the flow seems to be off quite often, as its picking up changes in luminosity as movement.
Masking the frames with a previous frame helps a lot though.
I was wondering if anyone though of running a high pass filter on the image before doing the optical flow or tracking.
to be honest, I haven’t thought out completely how exactly this would be beneficial but I think it could exclude areas that have no detectable corners and strengthen areas that do.