[Top][All Lists]

[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: Rik
Subject: [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot
Date: Tue, 20 Sep 2016 04:51:12 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #6, bug #49130 (project octave):

According to Matlab's documentation at

index = fix((C-cmin)/(cmax-cmin)*m)+1;
%Clamp values outside the range [1 m]
index(index<1) = 1;
index(index>m) = m;

So it would appear that they use N rather than N-1.

It seems like the last bit, clamping, is an additional requirement for the
mapcdata function.  Otherwise, you can easily get negative values when cmin is
greater than C.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]