How to measure flat surface area with an ordinary computer scanner?
The idea is quite simple. The scanner is hardware calibrated in units of length 600x600 dpi (dots per inch) for example. This means that the scanner marks one dot corresponding to 1/600 inch or 0.00423 cm of length. The area of one dot is then (1/600)2 square inch or 0.00001792 cm2. The dots convert to pixels in the image.
The surface, the area you want to measure, surely has some colour. Scan it using some contrasting colour as a background and count the pixels of the colour of the surface of interest. Multiply the number of pixels by the area of one dot. Thus you get the area of the surface in cm2.
Actually it is not necessary to bother with colours. A simple greyscale image is completely sufficient. A greyscale bitmap image is a matrix of numbers between 0 (black) and 255 (white) corresponding to 256 levels of grey. A simple threshold would in most cases be enough to separate the surface from the background.
This idea is implemented in the MatCad worksheet SurfaceArea.mcd. To use it just scan the image as a greyscale and save it as bitmap. Open the bitmap from the MatCad worksheet. Enter the resolution at which you scanned the image in the corresponding place. The result of the worksheet calculation will be the area of the surface.
For flat objects (foils and sheets) you can obtain accuracy no worse that 1% for areas of tens of mm2. You can use it to find the percentage of ink coverage of a printed page. If the object has some thickness you can still scan it, but part of the vertical surface will be visible in the image. Sometimes this may be problem. The worksheet gives also the colour distribution of the image. It and its derivative can be used to determine the best value of the threshold and the error of the determination of the surface area.
Here are the files to download:
|SurfaceArea.mcd||The MathCad worksheet. Tested on MathCad 11. (33KB)|
|SurfaceAreaTest.jpg||A test image scanned at resolution of 600 dpi . Area 3.417 cm2 (16KB)|
|Page.jpg||A4 page with 3.1 % ink coverage. (64KB)|
|SurfaceArea.zip||All files zipped. (180KB)|
No Copyright. Use at your own responsibility.