Re: Calculating Area of Scanned Image
From: Phil Platt (phil_at_philipgrae.dabsol.co.uk)
Date: 07/22/04
- Next message: Debra Dalgleish: "Re: Word to Excell2000 macro help"
- Previous message: crcurrie: "Quickly locating duplicate records"
- In reply to: ntegrat61: "Calculating Area of Scanned Image"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 22 Jul 2004 23:09:16 +0100
Hi Michael.
You need an image processing program, such as Photoshop. This will give you
a lot of information, for example the percentage of the image that is red.
In a bitmap, the fact that a pixel is red or any other colour doesn't affect
the file size - every pixel has the same amount of colour information and it
only varies according to the number of colours that can be assigned to a
pixel - eg 8, 16, 24 or 32 -bit. Also the resolution of the image affects
file size.
JPG assesses 8 x 8 pixel blocks in an image and assigns a single value to
the most common colours in the block, using an affiine cosine transfromation
algorithm. In short, it degrades the image by removing subtle colour tones.
The higher the quality you choose when saving the file, the less degradation
it does, and thus the best quality images are always larger files.
Incidentally you notice a lot less degradation with files that have a
majority of blue pixels 'cos the human eye can't detect as many shades of
blue as it can any other colour... thus highly-compressed seascapes look
better that the equivalently-compressd landscapes!
Anyway, try Photoshop's image calculation routines, they should provide you
with what you need.
(I think Paintshop Pro may offer similar functionality, and it's cheaper!)
HTH
Phil
"ntegrat61" <ntegrat61@discussions.microsoft.com> wrote in message
news:0F47D9E2-39FE-4EFC-841E-9AE9DD61E5EF@microsoft.com...
> Does anybody know of a windows program (maybe Excel) that would calculate
the area (in pixels or any other unit) of a scanned image?
>
> For example, if I were to draw circles on a sheet of paper, scan the paper
into my computer, and then fill the circles with red paint in Microsoft
Paint, is there a way to find out the area on the screen that the red paint
occupies? I am hoping there may be a program that counts red pixels, for
example.
>
> I tried to relate file size (in bytes) to amount of red paint, but there
doesn't seem to be a relationship. If the files are saved as a bitmap, for
example, they are all the same size regardless of the amount of color the
image contains. If the files are saved as *.jpg, the file with less color
turned out surprisingly larger.
>
> If I can quantify the amount of red color in any way, I will be able to
convert into the units mm^2 because I can also scan a calibration square
that is known to be 1 mm^2.
>
> Thanks a lot.
>
> Michael
- Next message: Debra Dalgleish: "Re: Word to Excell2000 macro help"
- Previous message: crcurrie: "Quickly locating duplicate records"
- In reply to: ntegrat61: "Calculating Area of Scanned Image"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|