Main Page | Report this Page
 
   
Science Forum Index  »  Image Processing Forum  »  store infor as a image?
Page 1 of 1    
Author Message
shufei.fan
Posted: Fri Dec 22, 2006 4:14 pm
Guest
My question is: does anyone know how to store information of a image
into a image?
To be specific, I segmented my grey(or color) image into a collection
of non-overlapping small regions, each given a unique label. I want to
store the label of each pixel, into a suitable file. And I assume image
file should be a good option. My question comes from here. in image,
each pixel is 0-255, but for the value of labels, I have to allow
larger range ( a pixel should be assigned value 543 if it belongs to
label No. 543).

Thanks!
Shufei
Martin Leese
Posted: Sat Dec 23, 2006 12:12 am
Guest
shufei.fan wrote:
Quote:
My question is: does anyone know how to store information of a image
into a image?
To be specific, I segmented my grey(or color) image into a collection
of non-overlapping small regions, each given a unique label. I want to
store the label of each pixel, into a suitable file. And I assume image
file should be a good option. My question comes from here. in image,
each pixel is 0-255, but for the value of labels, I have to allow
larger range ( a pixel should be assigned value 543 if it belongs to
label No. 543).

If I have understood your problem, your labels
are just integer numbers (as opposed to, say,
text strings). So use an image file where each
pixel is longer than 8 bits (so can store a
larger range than 0-255).

--
Regards,
Martin Leese
E-mail: please@see.Web.for.e-mail.INVALID
Web: http://members.tripod.com/martin_leese/
shufei.fan
Posted: Fri Dec 29, 2006 5:58 pm
Guest
Yes, TIFF is what I found. But at coding level, 'save as' and 'load'
the TIFF file hasnot been as easy as I thought(or I haven't found a
efficient library yet). Instead, I used CImg library and stored them as
".raw" file. It works fine by now.
Thanks!

Martin Leese wrote:
Quote:
shufei.fan wrote:
You are right, that's what I need. But,, what image files have pixel
longer than 8 bits? thank you for answering this BASIC question.

When I needed this I invented my own format.
30 seconds with Google would have told you that
TIFF and PNG can store 16-bit image data.

Martin Leese wrote:
If I have understood your problem, your labels
are just integer numbers (as opposed to, say,
text strings). So use an image file where each
pixel is longer than 8 bits (so can store a
larger range than 0-255).

--
Regards,
Martin Leese
E-mail: please@see.Web.for.e-mail.INVALID
Web: http://members.tripod.com/martin_leese/
 
Page 1 of 1       All times are GMT - 5 Hours
The time now is Fri Nov 21, 2008 7:28 pm