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

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

[Octave-bug-tracker] [bug #39701] regionprops centroid property swaps co


From: Cristian
Subject: [Octave-bug-tracker] [bug #39701] regionprops centroid property swaps coordinates sometimes
Date: Mon, 05 Aug 2013 14:18:40 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20100101 Firefox/10.0.12 Iceweasel/10.0.12

URL:
  <http://savannah.gnu.org/bugs/?39701>

                 Summary: regionprops centroid property swaps coordinates
sometimes
                 Project: GNU Octave
            Submitted by: r41nm4n
            Submitted on: Mon 05 Aug 2013 02:18:39 PM GMT
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

With octave 3.7.5, package image 2.0.0, built on Debian testing, the function
regionprops gives unexpected results with the property centroid. Four cases
follow: the first and the third are correct, the second and the fourth seem
not:


    a = [0 0 1];
    c = regionprops(a, 'centroid')
    %        c =
    %          scalar structure containing the fields:
    %            Centroid =
    %               3   1
    % Correct.
     
    a = [0 1 1];
    c = regionprops(a, 'centroid')
    %        c =
    %          scalar structure containing the fields:
    %            Centroid =
    %               1   1   2   3
    %
    % Expected result: 2.5    1
     
    a = [0 0 1; 0 0 0];
    c = regionprops(a, 'centroid')
    %        c =
    %          scalar structure containing the fields:
    %            Centroid =
    %               3   1
    % Correct.
     
    a = [0 1 1; 0 0 0];
    c = regionprops(a, 'centroid')
    %        c =
    %          scalar structure containing the fields:
    %            Centroid =
    %               1.00000   2.50000
    %
    % Expected result: 2.5    1








    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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