[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54614] [octave forge] (image) wrong results o
From: |
Avinoam Kalma |
Subject: |
[Octave-bug-tracker] [bug #54614] [octave forge] (image) wrong results of entropyfilt |
Date: |
Sat, 8 Sep 2018 17:03:17 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36 |
Follow-up Comment #2, bug #54614 (project octave):
Thanks for pointing me related bugs, however, I found some other problems:
Checking entropyfilt, there are two problems in __spatial_filtering__.cc
The normalization of the histogram is wrong. Instead of
for (octave_idx_type i = 0; i < len; i++)
hist (vals (i) + add) /= (double)len;
the loop should be
for (octave_idx_type i = 0; i < nbins; i++)
hist (i) /= (double)len;
Another problem is in the transfer of data from the matrix:
It seems that the line
values_fvec[se_ind] = in(in_sub) + heights_fvec[se_ind];
is wrong, and should be replaced by
values_fvec[se_ind] = in(in_sub) ;
(Can someone confirm this?)
This change affects also stdfilt, rangefilt, and ordfiltn.
Changeset attached, including relevant tests in entropyfilt.m
Please review.
(file #44959)
_______________________________________________________
Additional Item Attachment:
File name: bug_54614_V1.cs Size:1 KB
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?54614>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/