DPChallenge: A Digital Photography Contest You are not logged in. (log in or register
 

DPChallenge Forums >> General Discussion >> script that tells number of black pixels
Pages:  
Showing posts 1 - 7 of 7, (reverse)
AuthorThread
05/24/2006 02:46:06 PM · #1
I have a question, please:

I have > 2000 tif-files that contain only black and white pixels (1-bit). I need a program or a script that tells me (automatically) the number of black pixels in each file. I do not want to open each file seperately to analyse the number of black pixels.

Does anybody knows a simpel solution for my problem?

Thanks, mut.
05/24/2006 04:30:09 PM · #2
Originally posted by mut:

... 2000 tif-files that contain only black and white pixels (1-bit). ...

I'm afraid I don't understand what you mean by (1-bit) -- are the images actually saved as monochome? If you're able, an example of what you have would help.

David
05/24/2006 04:46:14 PM · #3
1 bit means either a pixel is black , or white, nothing else. Here's an article that will help. A program written in C language to count black and white pixels in BMP images.

Linky
05/24/2006 05:09:08 PM · #4
Imagemagick or libtiff should be able to help with the image decoding side of things.
05/26/2006 04:30:09 AM · #5
Thanks for your answers. My problem is that the programs posted by ignite (and probably also the two others posted by bod) can only analyse one picture at a time and not several automatically.

I could send you a sample of my immages by mail, if you like, but I do not know your adresses. If you send me a mail, I will answer. My adress is "helmeiss (at) yahoo (dot) de"

Thanks.
05/26/2006 04:51:53 AM · #6
probably not very simple, but I think the .NET platform can analyse pixels in BitMaps (and other image types)...so you could develop something that looped through every image file in a folder, then loop through each pixel in each image and increment a count if the pixel is black
...if you're a programmer with .NET dev tools that is!
05/27/2006 05:00:27 AM · #7
Thanks for all your helps!
Somebody wrote a small application in C for my problem, which works very well, but I do not understand the details...

Bye.
Pages:  
Current Server Time: 09/01/2025 02:20:40 AM

Please log in or register to post to the forums.


Home - Challenges - Community - League - Photos - Cameras - Lenses - Learn - Help - Terms of Use - Privacy - Top ^
DPChallenge, and website content and design, Copyright © 2001-2025 Challenging Technologies, LLC.
All digital photo copyrights belong to the photographers and may not be used without permission.
Current Server Time: 09/01/2025 02:20:40 AM EDT.