bugGNU Octave - Bugs: bug #50471, imshow(I,[]) or imshow(I,[a b])...

 
 

bug #50471: imshow(I,[]) or imshow(I,[a b]) fail to scale intensities with RGB images

Submitter:  None
Submitted:  Mon 06 Mar 2017 07:43:58 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  R.S.Carmenes Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * 4.2.1
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 11 Mar 2017 07:11:37 PM UTC, comment #1: 

When I read the Matlab help on "imshow", then I think this is INTENTIONAL behavior.

The Matlab help https://de.mathworks.com/help/matlab/ref/imshow.html#inputarg_DisplayRange
reads like this:

'DisplayRange' — Grayscale image display range
two-element vector
Display range of a grayscale image, specified as a two-element vector of the form [low high]. The imshow function displays the value low (and any value less than low) as black, and it displays the value high (and any value greater than high) as white.


So the display range can only be adjusted for GRAYSCALE images, not for COLOR images. (I don't know of a unique and easy way to define a "minimum" or a "maximum" value of an rgb-color image either.)

Maybe we could state this fact more clearly in the Octave help string of imshow.m as well. It currently reads:

Display the image IM, where IM can be a 2-dimensional (grayscale image) or a 3-dimensional (RGB image) matrix.

If LIMITS is a 2-element vector '[LOW, HIGH]', the image is shown using a display range between LOW and HIGH.  If an empty matrix is passed for LIMITS, the display range is computed as the range between the minimal and the maximal value in the image.


We might add the following sentence at the end of this part of the help text: "(The LIMITS option only has an effect on the display of grayscale images, it will be ignored for color images.)"

Hartmut <hardy>
Mon 06 Mar 2017 07:43:58 PM UTC, original submission:  

Hi,

imshow(I, []) and imshow(I, [a b]) fail to rescale display intensities (= has no effect whatsoever on display) when I is a color image of any type (uint8, uint16, single or double).

It works as expected with gray images though.

The problem appears at least with octave-4.0.3 and octave-4.2.1 and with or without image package loaded, and with at least the gnuplot and fltk graphics_toolkit (did not try the qt).

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code