[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #42115] image package: imadjust output differs
From: |
Hartmut |
Subject: |
[Octave-bug-tracker] [bug #42115] image package: imadjust output differs from Matlab |
Date: |
Sun, 01 Nov 2015 20:26:45 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0 |
Follow-up Comment #5, bug #42115 (project octave):
How about this alternative approach to deal with integer inputs to imadjust?
* First, create a lookup table (LUT) where you specify the intended (integer)
output value for every possible (integer) input value (there might be for
example 256 possibilities, or 65536 ones, depending on the input type). For
this creation of a LUT, one could use a conversion to double and then back to
integers, because this wouldn't significantly increase the memory consumption.
(There are much less possible integer values than pixels in a typical image.)
* Second, use the existing function intlut.m to convert the integer input
image into the integer output image. Since intlut (assumingly) works without
an intermediate conversion to double, we wouldn't need significantly more
memory for this step either.
Sorry, I've just realised that intlut.m DOES convert the input image to double
in an intermediate step. So this approach would also consume much much more
memory :(
We could fix this by
* fixing intlut to NOT convert to double as an intermediate step. (But I am
not sure why intlut does this conversion anyways, so I've probably missed
something there.)
* doing something similar to intlut, but as own code inside of the function
imadjust itself. Just WITHOUT the step of intermediate conversion to double
type.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?42115>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #42115] image package: imadjust output differs from Matlab,
Hartmut <=