octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #49613] image package - regionprops.m majoraxi


From: Avinoam Kalma
Subject: [Octave-bug-tracker] [bug #49613] image package - regionprops.m majoraxislength broken
Date: Mon, 5 Dec 2016 21:12:45 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36

Follow-up Comment #14, bug #49613 (project octave):

Current implementation of orientation


    orientation(idx) = -(180/pi) .* atan (major_vec(2) ./ major_vec(1));


gives:


orientation =

  -35.96725
   82.06034
  -56.90598
  -86.07882
  -62.03271
   42.99091
   69.42293
   37.99984
   84.71827
  -90.00000
   31.92248
   -0.00000
  -31.02163
   14.03068
   34.96791
   64.73045
  -13.02547
   23.02190
   12.62266
  -77.01055
  -20.73767


Changing to:


    if (major_vec(1) == 0 || major_vec(2) == 0)
      orientation(idx) = 0;
    else
      orientation(idx) = -(180/pi) .* atan (major_vec(1) ./ major_vec(2));
    end

 
gives a Matlab compatible results. What do you think?



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49613>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]