gradient image of multi -spectral image

1 次查看(过去 30 天)
preet
preet 2013-8-29
when i tried this code for color gradient in RGB ,i faced a problem.
atan() function gives us range from(-pi,pi).
if(teta<0.0)
teta=teta+2*pi;
and to convert (0,360) degree i do
teta=teta*180/pi;
but this does not give me satisfactory result.
i want a angle matrix mean 'teta' has value (0,360) degree

回答(1 个)

Walter Roberson
Walter Roberson 2013-8-29
Have you considered using atan2() ?
  2 个评论
Walter Roberson
Walter Roberson 2013-9-1
I am aware of that. But if the information is available then atan2() is more appropriate.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by