Hello.
Currently, I develop a computer vision algorithm using VLIB of TI on visual studio 2010 on PC.
The problem is the bad result of optical flow function.
To perform optical flow, I input two successive image frames. and 1) Smooth filtering, 2) Find gradient, 3) Find Harris corner (VLIB_harrisScore_7x7, VLIB_nonMaxSuppress_7x7_S16).
And then, I check the output data of VLIB_nonMaxSuppress_7x7_S16. If this value is non-zero, it means it is the Harris corner, right ?
Below is the source of find feature point list for optical flow.
After find the feature point list, I call the optical flow function like as below.
// *************** Optical Flow *********************
VLIB_trackFeaturesLucasKanade_7x7(IMG1, IMG2, GradX, GradY, Width, Height, FeatureCount, X_Coord, Y_Coord, X_Out, Y_Out, 10, BUFFER2);
It can be run very fast. but the result is not right. Maybe some part is wrong.
I draw several lines on image using IMG1 & IMG2's feature cordinate pairs.
for (i=0; i<FeatureCount; i++) {
if ((X_Coord[i] != X_Out[i]) && (X_Out[i]>0) && (Y_Out[i]>0)) { // Check the feature point is changed or not.
DrawLine(ImgD, Width, Height, X_Coord[i], Y_Coord[i], X_Out[i], Y_Out[i]); // This fuction is drawing a linear line on input image.
}
The final result can be shown at below link. (small cross mark represents the coordinate point of IMG1)
https://docs.google.com/presentation/d/1pM6_zvxDQY4LKCMsZ7rHjsE8qXecqp9X_n-PQMu3S0Q/edit
And this is the source code's link.
https://docs.google.com/a/imagenext.co.kr/file/d/0Bz585VYgO0D6YTFjTEQ0UVR5Sms/edit