am I calculate the gradients in point (i,j) correctly? Core point detection angorithm
1 view (last 30 days)
Show older comments
Hello:)
I'm writing code of algorithm included in PDF i foune here: http://www.google.pl/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCMQFjAA&url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.106.6655%26rep%3Drep1%26type%3Dpdf&ei=OX2KUJDcC-3P4QSl-ICQAQ&usg=AFQjCNFW9awru-5mL6Mz0IqYgvGiullxJQ&sig2=AODiEjZR3CkR-6WMsoryLA
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:)
1 Comment
Sean de Wolski
on 26 Oct 2012
Perhaps you could post the data and a relevant line of code, i.e. call to interp2?
Answers (0)
See Also
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!