reading pixel data

WB
Posted By
Willis_Bowman
Dec 8, 2006
Views
793
Replies
8
Status
Closed
Hello,

How do I go about reading the data that defines each pixel? We all look at the pixels on our monitors but I need to view the data pertaining to each pixel – color and brightness – in numbers.

I know that there are many types of picture format – RAW, jpg, gif, tiff, etc; what would be the best format to extract this data? Do I need additional software to read this data? I’m most concerned about the brightness values and not so much about the colors. I could transfer my image into the grayscale mode. I’m using PS CS2.

Thanks

Willis

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

CC
Chris_Cox
Dec 8, 2006
The info palette is one way, or saving to Photoshop RAW or PBM/PGM/PNM/PFM (all the Portable Bitmap formats).

TIFF, JPEG, GIF, and PSD are much harder to read.

Yes, you are going to need some additional software or script to read the data from a file.
WB
Willis_Bowman
Dec 9, 2006
Hi Chris – Thanks for your reply. Yep, the info palette does give the required data but I don’t think I have the patience to write each pixel point down. Do you know of any software or scripts that will read the data?
CC
Chris_Cox
Dec 9, 2006
Lots.

What are you trying to do with the pixel values?
WB
Willis_Bowman
Dec 9, 2006
My goal is to make large scale portraits, bed sheet size, of people. I am making a large XY plotter to do so but instead of ink will be using puffs of paint to make the "pixels" on the sheets. The longer the puffs of paint the darker the "pixel" on the sheet.

So I want to extract the brightness value (% K) of pixels in a grayscale photo (I’ll do color someday) which will be translated into the darkness of paint "pixels" on the bed sheet. I hope this makes sense.

I don’t know how fine a resolution I will have, certainly a lot less fine than what is presented in a jpg for instance; it depends on how the paint, sprayer and the machine behaves and how coarse or fine I want the painting to be. With the % K values extracted from the photo I can take every third, fourth or whatever pixel and run with it or do some averaging.

What kind of program , that is, its general name should I be looking for?
CC
Chris_Cox
Dec 9, 2006
A JPEG image can be any resolution, from pixels/nanometer to pixels/mile.

All that matters is how many pixels are used to cover the surface.

It sounds like you need to write some code to translate images to your plotter’s control signals.

You could use open source libraries like LibTIFF, or the PBM (Portable Bit Map) package to read the files.

But then you need code to turn those values into control signals.
LL
Larry_Ligon
Dec 9, 2006
Go here and register: http://www.ps-scripts.com/bb/

Ask your question in the Help Me section.

I believe that Mike Hale has some experience reading file formats.

Larry
WB
Willis_Bowman
Dec 10, 2006
Larry, Thanks. I just mailed in a request.
WB
Willis_Bowman
Dec 14, 2006
Hi Larry and Chris,

Thanks for your help. I did find a work around – I was able to find a hex editor (Groovy Hex Editor <http://www.sb-software.com/hexeditor/)> that will change the binary into decimal and export to an Excel file. Perfect! I format my photo as a grayscale then save it as a RAW file so there is one unique value per pixel. The hex editor reads each pixel and changes the hex reading to decimal. I can export to Excel then in turn into Word where I need it to be. I appreciate all your help!

Willis

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

Related Discussion Topics

Nice and short text about related topics in discussion sections