[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PATCH: octave-image, regionprops "WeightedCentroid" fails with 1 ele
From: |
Carnë Draug |
Subject: |
Re: PATCH: octave-image, regionprops "WeightedCentroid" fails with 1 element regions |
Date: |
Sat, 28 Sep 2013 16:19:44 +0100 |
On 13 September 2013 08:36, Andreas Weber <address@hidden> wrote:
> WeightedCentroid fails with regions which has only 1 element.
>
> [...]
>
> diff -r ff3db65873b9 inst/regionprops.m
> --- a/inst/regionprops.m Fri Sep 13 08:30:30 2013 +0200
> +++ b/inst/regionprops.m Fri Sep 13 09:32:41 2013 +0200
> @@ -276,7 +276,7 @@
> C = all_coords (L == k, true, true);
> vals = I (L == k) (:);
> vals /= sum (vals);
> - retval (k).WeightedCentroid = [dot(C, repmat(vals, 1,
> columns(C)))];
> + retval (k).WeightedCentroid = [dot(C, repmat(vals, 1,
> columns(C)), 1)];
> endfor
>
> case "meanintensity"
>
>
> I'll push it tomorrow if there is no veto.
Just a remind that you never got to push this change yet.
Carnë