Thread Subject: Displaying 3 channel data of values larger than 1

Subject: Displaying 3 channel data of values larger than 1

From: kees de Kapper

Date: 8 Oct, 2009 08:10:05

Message: 1 of 3

Hi all,

I've got 3 channel data (call it pseudo RGB, e.g. 100x100x3) with values larger than 1.
When I push this image to imshow or imagesc it complains that it cannot be displayed since values are <0 or >1 (no true color data).

How can I solve this problem, in other words, how can I display the image scaled between min and max values without affecting the original data.

thanx in advance,
Kees

Subject: Displaying 3 channel data of values larger than 1

From: Darren Rowland

Date: 8 Oct, 2009 09:40:05

Message: 2 of 3



If you don't want the scaling to effect the original you can either make a copy of the array or apply the scaling inline to the call to imagesc e.g.

imagesc((A-min(A(:)))/(max(A(:))-min(A(:))))

Subject: Displaying 3 channel data of values larger than 1

From: kees de Kapper

Date: 8 Oct, 2009 10:03:05

Message: 3 of 3

> "Darren Rowland" <darrenjremovethisrowland@hotmail.com> wrote in message

Thanx for reply.

In the solution you mentioned, there is still an affection of the CData stored by the image-handle.
Isn't there a solution using colormaps?

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
imshow kees de Kapper 8 Oct, 2009 04:14:03
imagesc kees de Kapper 8 Oct, 2009 04:14:03
rgb kees de Kapper 8 Oct, 2009 04:14:03
multi channel data kees de Kapper 8 Oct, 2009 04:14:03
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com