Re: Beginner : how to convert .bmp or .jpeg for digital processing
- To: mathgroup at smc.vnet.net
- Subject: [mg57157] Re: [mg57129] Beginner : how to convert .bmp or .jpeg for digital processing
- From: Clifford Martin <camartin at snet.net>
- Date: Thu, 19 May 2005 03:08:35 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Peter, I hope this is what you want. Here is an example of a digital picture(jpeg) converted to be able to manipulate the data. gig = Import["E:\\pup\\data\\41205data375midata\\D056_\ 41105_P_8mmfromEnd1a.jpg", "JPEG"]; Dimensions[gig] step = gig[[1,1]]; rat = step[[Range[512],Range[512],1]]; Dimensions[rat] first I import the file. JPEG is set up to have 3 different colors so you have to get down to manipulate it to one. So step and rat takes the first color. The dimensions of rat are 512 by 512. Now I can manipulate the file doing edge enhancement, etc. Hope this helps. Cliff --- Peter van Daalen <vandaalen at chello.nl> wrote: > I want a simple way of processing grayscale and .bmp > and .jpeg bytes ( > for improving my digitized X-ray pics ). > No advanced processing as per application " Digital > Image Processing " > is needed for me. > > Being a Mathematica beginner, I failed in finding > the way to convert > ..jpeg and .bmp formats into 2D and 3D numerical ( > 0-255) arrays. > > Thanks for any help. > >