Fiber orientation - atan2 problem
Show older comments
Hello,
I am writing a program allowing me to plot angular orientations of fibers from microscope images.
I am processing the images with the blocproc function. The angles are calculated from the structure tensor:
ang=.5*atan2(2*Ixx*Iyy,Iyy*Iyy-Ixx*Ixx)*180/pi;
where Ixx and Iyy are the structure tensor components.
In the resulting plot however, I notice a peak at 45°, i.e. for arctan(..)=90°. Every other angle seems fine, I am wondering whether I am dealing with a problem for the atan2 function. I understand that tan is undefined for 90°. I know for certain that there must be a problem somewhere, as when I rotate the source image by 90°, I again get a peak at 45°.
Could it be a numerical calculation problem?
Answers (0)
Categories
Find more on Read, Write, and Modify Image 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!