Thread Subject: creating an image

Subject: creating an image

From: Dominic

Date: 22 May, 2009 17:52:02

Message: 1 of 2

Hi,

I have a struct with struct.x, struct.y and struct.value and want to create an image, where (struct.x,struct.y) represent the pixel and the value is interpreted as color or intensity in grey scale.

Is it better to have an 3D Array or doesn't it matter. The size of the picture is usually 512x512.

cheers,
Dominic

Subject: creating an image

From: Sadik

Date: 22 May, 2009 18:45:04

Message: 2 of 2

If the values are intensities, you need a 2D matrix

im2D

which will satisfy:

im2D(x,y) = value;

But if you are going to use color, then you could have a 3D matrix satisfying:

im3D(x,y,1) = redValue;
im3D(x,y,2) = greenValue;
im3D(x,y,3) = blueValue;

where value = [redValue,greenValue,blueValue];


"Dominic " <dom_awf@hotmail.com> wrote in message <gv6oo2$6t$1@fred.mathworks.com>...
> Hi,
>
> I have a struct with struct.x, struct.y and struct.value and want to create an image, where (struct.x,struct.y) represent the pixel and the value is interpreted as color or intensity in grey scale.
>
> Is it better to have an 3D Array or doesn't it matter. The size of the picture is usually 512x512.
>
> cheers,
> Dominic

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
 

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