Fiber orientation - atan2 problem
이전 댓글 표시
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?
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!