octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #56175] Image "cdata" property should be docum


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #56175] Image "cdata" property should be documented
Date: Sat, 20 Apr 2019 05:09:36 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

Update of bug #56175 (project octave):

                Category:                    None => Plotting               
                Severity:              3 - Normal => 2 - Minor              
              Item Group:                    None => Documentation          
                  Status:                    None => Confirmed              
        Operating System:       Microsoft Windows => Any                    
                 Summary: imshow doesn't show proper colours => Image "cdata"
property should be documented

    _______________________________________________________

Follow-up Comment #1:

I don't know if it is properly documented somewhere in Octave's manual, but
what you observe is expected, at least if your "rgb_img" is of type "double":
in this case the range of useful values for rgb channels is [0 1] and thus
"RGBdouble = [255 1 0]" is equivalent to "RGBdouble = [1 1 0]".

If the image was of type uint8, then 255 (intmax("uint8")) would be the
saturation value and so on. Here is a script that demonstrates how color
matrices are handled:


RGBdouble = zeros (4,4,3);
RGBdouble(:,:,1) = 1;
RGBdouble(:,:,2) = 1;

subplot (3,2,1)
imshow (RGBdouble)
title "Double type: R and G saturated"

subplot (3,2,2)
RGBdouble(:,:,1) = 255;
imshow (RGBdouble)

subplot (3,2,3)
RGBdouble(:,:,1) = 255;
imshow (uint8(RGBdouble))
title "Double type: R saturated"

subplot (3,2,4)
RGBdouble(:,:,1) = 1000;
imshow (uint8(RGBdouble))

subplot (3,2,5)
RGBdouble(:,:,1) = intmax ("uint16");
imshow (uint16(RGBdouble))
title "Double type: R saturated"

subplot (3,2,6)
RGBdouble(:,:,1) = 1e5;
imshow (uint16(RGBdouble))


I'll turn this report into a request for documentation, at least image's
"cdata" property should be documented:
https://octave.org/doc/interpreter/Image-Properties.html#XREFimagecdata

Changing title and other items accordingly.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56175>

_______________________________________________
  Message posté via Savannah
  https://savannah.gnu.org/




reply via email to

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