[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly b
From: |
Dan Sebald |
Subject: |
[Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot |
Date: |
Tue, 20 Sep 2016 00:46:10 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0 |
Follow-up Comment #5, bug #49130 (project octave):
Give the attached patch a try. It uses a function for the color scaling and
within that function first changes the class to double so that uint8 doesn't
call math overflows.
I also made a subtle change of using multiplier N-1 rather than N. It seems
that is the more proper thing to do, e.g., if
clim(1) = min
clim(2) = max
then
1 + (N-1)*(max - min)/(max - min) = N
This appears to work hear with the two examples of comment #2. Example
x = uint8 ((1:128)' + (1:128));
y = repmat (x, 1, 1, 3);
imshow (x)
looks good, but not
imshow (y)
Let me know what was intended.
The only thing I'll add is that a month I recall some discussion about whether
figures should autoscale (like surfaces and so on), but that is not
necessarily the case because images often use a LUT in concept. The point
being that 'clim' of the axes and/or image make not be 100% correct yet.
(file #38561)
_______________________________________________________
Additional Item Attachment:
File name: octave-gnuplot_color_scale_bug49130-djs2016sep19.patch Size:4 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49130>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, anonymous, 2016/09/19
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Mike Miller, 2016/09/19
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Mike Miller, 2016/09/19
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/19
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Dan Sebald, 2016/09/19
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/19
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot,
Dan Sebald <=
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/20
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Dan Sebald, 2016/09/20
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/20
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/23
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Dan Sebald, 2016/09/27
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/27
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Dan Sebald, 2016/09/27
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/27
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Dan Sebald, 2016/09/28
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/30