am I calculate the gradients in point (i,j) correctly? Core point detection angorithm

1 view (last 30 days)
Hello:)
I'm in point 2.2 and i have problem that my program returnd me NaN when calculating gradient in specified point (i,j). Am I doing it right?
  • [FX1, FY1]=gradient(O); %O is loaded image converted to double
  • delta_x=interp2(FX1,u,v); %u,v are indexes like in eqations (4) and (5)
  • delta_y=interp2(FY1,u,v);
I don't know why but whed indexes are inside matrix FX/Y1 interp2 returns me NaN like indexes would be out of range...
My program works from eq (11) to (4). Simple: 1. divide image in blocks 2. find center of block - (i,j) 3. calculate (11) of i,j 4. need to calculate (10) and (9) so calculate it for i and j and so on
I could add a zip file with my code but i don't know if you don't have problems with understanding polish names of variables.
I hope You can help me with my problem.
P.S. I search forum and find some topics about Core point detection but it didnt helped me. I found cool working program too but i'd rather write my own than buy it.
Cheers:)

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!