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

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

Oh yeah, thanks for the reminder.  I had the funny feeling I checked all that
scaling formula stuff but couldn't think why it's the way it is.  I will put
that formula back.

The clamping is taken care of after each call to mapcdata().  I had checked
that.  I suppose the thinking is that there is the possibility of non-mapped
data and that should be range-limited as well.  But, now that I think about
this and that three-color plane example:

y = repmat (x, 1, 1, 3);
imshow (y)

not looking correct, this could be where some confusion is.  For example,

      if (strcmp (obj.cdatamapping, "direct"))
        r = round (ccol);
        r = mapcdata (ccol, clim, cmap_sz);
      r = max (1, min (r, cmap_sz));
      color = cmap(r, :);

maybe shouldn't be passing 'direct' data through the cmap()--it's supposed to
be direct 8-bit color component.  If the direct data in this imshow(y) example
is 8-bit, passed through a 64-level LUT, it's going to saturate just as in the
failed example.

So, perhaps that clamping line of code can be moved inside mapcdata() in all
cases.  Let me think this over for a day.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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