Thread Subject: Replacing all values in a matrix with values from a lookup table

Subject: Replacing all values in a matrix with values from a lookup table

From: Denton

Date: 9 Nov, 2009 21:56:01

Message: 1 of 2

I need to replace all the values within a 401x410 matrix with values from a lookup table, the lookup table contains normalized values for more than 16,000 gray-scale luminance levels from a previous monitor calibration. I'm currently using a loop going through each cell one at a time but it is horrendously slow and was curious if there are any faster ways to perform this task.

Subject: Replacing all values in a matrix with values from a lookup table

From: Jan Simon

Date: 10 Nov, 2009 09:32:04

Message: 2 of 2

Dear Denton!

> I need to replace all the values within a 401x410 matrix with values from a lookup table, the lookup table contains normalized values for more than 16,000 gray-scale luminance levels from a previous monitor calibration. I'm currently using a loop going through each cell one at a time but it is horrendously slow and was curious if there are any faster ways to perform this task.

Can you please show some example values, e.g. a 3x3 matrix and a corresponding lookup table? If you have integer values (or can convert them to integers), the lookup-table can be applied straight forward, e.g. as in IND2RGB.

Jan

Tags for this Thread

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.

rssFeed for this Thread

Contact us at files@mathworks.com