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:
Map an image using a lookup table

Subject: Map an image using a lookup table

From: Bluebird

Date: 23 Sep, 2010 18:20:24

Message: 1 of 5

Hello,
I have an image where its pixels ranges from 0:255, and i have lookup table that maps each pixel value to some other number. I want to change each pixel value to the look up table value.

The dirty way that i am doing it is using for loop and find command. Is there any other way?

Thank you in advance

Subject: Map an image using a lookup table

From: Walter Roberson

Date: 23 Sep, 2010 18:46:05

Message: 2 of 5

On 10-09-23 01:20 PM, Bluebird wrote:

> I have an image where its pixels ranges from 0:255, and i have lookup
> table that maps each pixel value to some other number. I want to change
> each pixel value to the look up table value.
>
> The dirty way that i am doing it is using for loop and find command. Is
> there any other way?

If the pixel values are constrained to be integral, then

NewImage = LookUpTable(1 + OldImage)

provided the LookUpTable is an array 1 to 256.

Subject: Map an image using a lookup table

From: Bluebird

Date: 23 Sep, 2010 18:55:26

Message: 3 of 5

Walter Roberson <roberson@hushmail.com> wrote in message <i7g7e4$oiv$2@canopus.cc.umanitoba.ca>...
> On 10-09-23 01:20 PM, Bluebird wrote:
>
> > I have an image where its pixels ranges from 0:255, and i have lookup
> > table that maps each pixel value to some other number. I want to change
> > each pixel value to the look up table value.
> >
> > The dirty way that i am doing it is using for loop and find command. Is
> > there any other way?
>
> If the pixel values are constrained to be integral, then
>
> NewImage = LookUpTable(1 + OldImage)
>
> provided the LookUpTable is an array 1 to 256.

Sweet. Many thanks Walter..

Subject: Map an image using a lookup table

From: ImageAnalyst

Date: 23 Sep, 2010 19:40:52

Message: 4 of 5

You could also use the "intlut()" function in the Image Processing
Toolbox.

Subject: Map an image using a lookup table

From: Bluebird

Date: 24 Sep, 2010 12:12:05

Message: 5 of 5

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <6a83e702-2d15-4983-91c6-00616e9eac48@y31g2000vbt.googlegroups.com>...
> You could also use the "intlut()" function in the Image Processing
> Toolbox.

Thank you sir...

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