Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

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

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.

Contact us