[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52959] [Image Package] histeq is not compatib
From: |
Avinoam Kalma |
Subject: |
[Octave-bug-tracker] [bug #52959] [Image Package] histeq is not compatible with Matlab |
Date: |
Sun, 28 Jan 2018 16:21:21 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 |
Update of bug #52959 (project octave):
Status: Duplicate => Confirmed
Open/Closed: Closed => Open
Release: 4.2.1 => other
Summary: [Image Package] histeq not returning results. =>
[Image Package] histeq is not compatible with Matlab
_______________________________________________________
Follow-up Comment #4:
Checking again this bug report, indeed there is a problem of Matlab
compatibility of histeq.
Thanks for reporting this.
Actually, there are few problems:
* The output J should be in the same type as the input I. Now, even if I is
uint8, J is double
* Hist eq should support input image in types uint8, uint16, int16, single, or
double.
* There is an undocumented feature in Matlab: if histeq is called without
argout, it displays (imshow) the output
* Histeq can be called in matlab with J = histeq (I, hist) when is hist is a
given histogram (input)
* Histeq can be called in matlab with [J,T] = histeq (I) when is T is the
calculated graylevel transformation (output)
* Histeq can be called in matlab with map = histeq (I, oldmap) to support an
indexed image (I,oldmap)
Regarding the original report, a workaround can be:
J = histeq(grayimage16);
imshow(J);
A quick fix for first 2 items, is to add the line
J = imcast(J, class(I))
Before endfunction.
A quick fix for item 3, is to add the lines
If (nargout == 0)
imshow(J)
end
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52959>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/