Hi All,
I am trying to run Lucas kanade algorithm on DM6446 based board. To begin with the algorithm, I have chosen two simple images. The image contains square as an object, so practically it can have 4 feature points only. (4 corners of a square).
I have few questions regarding this.
1. How can I find number of feature points in my image? (because I have to give nFeatures parameter as an input of lucas - kanade algorithm), which algorithm I should apply to get this?
2. How can I find X & Y coordinates of feature points in my image? (This is also input to the lucas-kanade API)
3. I read on the forum, that I have to implement the sequence of algorithms before running lucas-kanade algorithm,
- VLIB_xyGradients
- VLIB_harrisScore_7x7
- VLIB_nonMaxSuppress_U16
- VLIB_trackFeaturesLucasKanade_7x7
But, I am not able to understand how I can interconnect these functions? Meaning giving output of previous function to the next one.
Currently I am getting outX & outY values as -1 (0xFFFF) from VLIB_trackFeaturesLucasKanade_7x7 algorithm.
I am using input parameters as below,
VLIB_trackFeaturesLucasKanade_7x7(im1, im2, gradX, gradY, width, height, nfeatures, x, y, outx, outy, error, max_iters, earlyExitTh, scratch);
im1 = "Luma buffer" pointer to input frame 1
im2 = "Luma buffer" pointer to input frame 2
gradX = NULL
gradY = NULL
width = 640
height = 480
nfeatures = 4 (as object is a square only)
x = x[0]...x[3]-> X position of feature point 0.....X position of feature point 3
y = y[0]...y[3]-> Y position of feature point 0.....Y position of feature point 3
outx = output
outy = output
error = NULL
max_iters = 10
earlyExitTh = 0
scratch = 893 bytes long buffer allocated with VLIB_memalign
Please suggest me the working flow, of algorithms needs to be implemented before, to implement lucas-kanade algorithm successfully.
Kindly help, those who have worked on this before and correct me, where I am wrong.
Thanks,
Krinali Shah