Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting pixels?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi everyone,

Frankly, I'm a novice developer that doesn't have much experience with Delphi. However, I'm trying to write a program that analyses scanned documents' toner page coverage. I've knocked together something that is highly accurate, but it takes about 45 seconds to iterate through every pixel in a 3000 x 2000 px monochrome bitmap, and compare it to the mid-gray colour value.

Comparable commercial programs take only a few seconds. Is there efficient code to do this? What the code does at the moment is examine every pixel, compares it to the colour value for RGB 128/128/128, and if it is less increments the 'black pixels' value by one.

Thanks for your help!

Toby Marsden
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top