bugGNU Octave - Bugs: bug #53808, [octave forge] (image) entropy...


bug #53808: [octave forge] (image) entropy fails because of change in hist in Octave 4.4

Submitter:  None
Submitted:  Wed 02 May 2018 12:58:07 PM UTC
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  carandraug
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * other
Operating System:  * Any
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Sun 13 May 2018 01:33:26 PM UTC, comment #2: 

I think this is bug on the image package entropy and not a regression on Octave's core hist, because the norm argument to hist is the value to normalize the sum, and not a flag whether to normalize to sum 1.

I pushed http://hg.code.sf.net/p/octave/image/rev/952d7928776a Since the OP left no email or name, I signed it as Avinoam who prepare the patch.

Carnë Draug <carandraug>
Project Member
Fri 11 May 2018 04:13:48 PM UTC, comment #1: 

Attached a patch with OP's fix suggestion (B)

(file #44141)

Avinoam Kalma <avinoam>
Project Member
Wed 02 May 2018 12:58:07 PM UTC, original submission:  


entropy([1 0])

leads to following error:

error: hist: NORM must be a numeric constant > 0
error: called from
    hist at line 151 column 7
    entropy at line 61 column 5

The error was introduced in changeset 24793:1fa1869650cc.

Proposals for solution:
A) allow logical arguments as 3rd parameter of hist
B) replace

P = hist (I (:), nbins, true);


P = hist (I (:), nbins, 1);

in entropy.m.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #44141:  entropy.diff added by avinoam (345B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by avinoam (Updated the item)
  • -email is unavailable- added by avinoam
  • -email is unavailable- added by avinoam

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.





    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-05-13 carandraug Open/ClosedOpen Closed
    2018-05-13 carandraug StatusPatch Submitted Fixed
    2018-05-11 avinoam Attached File- Added entropy.diff, #44141
        StatusConfirmed Patch Submitted
        Assigned toNone carandraug
        Carbon-Copy- Added carandraug
        Carbon-Copy- Added hardy
    2018-05-02 mtmiller Carbon-CopyRemoved 80942 -
    2018-05-02 mtmiller StatusNone Confirmed
        Release4.2.2 other
        Summaryimage package: entropy fails because of change in hist [octave forge] (image) entropy fails because of change in hist in Octave 4.4

    Back to the top

    Powered by Savane 3.9