Re: New to Mathematica, need help for Image Processing.

• To: mathgroup at smc.vnet.net
• Subject: [mg115128] Re: New to Mathematica, need help for Image Processing.
• From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
• Date: Sat, 1 Jan 2011 04:25:17 -0500 (EST)

```Hi,

your message is too unclear and a bit confusing. Maybe you can try to
use less of these ... and write short and clear sentences. Ok, you want
to create an image from values. Do you have your values already in a
matrix like this 4x3 pixelmatrix:

{{29, 29, 160, 183},
{124, 99, 59, 253},
{14, 192, 56, 30}}

or do you have it in a linear list like this

{29, 29, 160, 183, 124, 99, 59, 253, 14, 192, 56, 30}

If you have it in a matrix, then you can just wrap Image around it:

pixelmatrix = {{29, 29, 160, 183},
{124, 99, 59, 253}, {14, 192, 56, 30}};
Image[pixelmatrix, "Byte"]

If not, then you need to create a matrix from your linear list. If you
know the width of your image (and you know it), just use Partition to
create a matrix:

pixelmatrix = Partition[
{29, 29, 160, 183, 124, 99, 59, 253, 14, 192, 56, 30}, 4];
Image[pixelmatrix, "Byte"]

Please note the 4 at the end of Partition which is the width of your
image.

I hope this helps you with your problem.

Cheers
Patrick

On Fri, 2010-12-31 at 05:00 -0500, Nimo wrote:
> Hi..,
>
> Well, actually I'm not from programming background.
> Just for some analysis stuff,  I'm using mathematica.
>
> I tried to read mathematica documentation..its very huge and takes lot
> of time..
>
>
> so, here is my need.. pls, you people can help me..here..
>
> ____
>
>
> I have some pixel values[ image Resl:- is 565 x 327],
> all are Byte[0-255] values, total number of values =184755
>
>
>  which I want to insert them in any mathematica function and
>   want to see how the image is going to be..
>
>
> I tried function
>
> Image [ { } {} {} ]
>
> but it is saying something like rank should be less than 3 or 2.
>
>
> Can you people give me any solution, so that I'll just copy and paste
> all the pixel values
> so that i will automatically adjust width & height of image.. and get
> displayed in the window.
>
>
> Thank you.
>    greetings
>     nimo.
>
>

```

• Prev by Date: Re: Style Sheet Font Family Not Applied to Standard Form Input Cell
• Next by Date: Re: Manually culling a list
• Previous by thread: Re: New to Mathematica, need help for Image Processing.
• Next by thread: Re: New to Mathematica, need help for Image Processing.