Circuit Notebook 95 - Area Measurement of Irregular Shapes using a TV Camera

This may not be true amateur television, but most of the circuit techniques used here have applications in amateur and general video signal processing.

I have built several area measurement systems in the past, mainly for measuring plant leaves. This is a simplified version which could be used for measuring the area of any irregular shape, e.g. the area of copper on a PCB.

System

A monochrome video camera is mounted vertically, pointing downwards, perpendicular to and facing a flat work surface. A processing unit takes in the camera video signal and outputs a video signal to a video monitor.

The processing unit has three controls, 'LEVEL', 'CAL' and 'DOTTING' and is fitted with an analogue moving coil meter scaled 0-100.

Operation

In operation, a calibration piece of white paper, say 10cm x 10cm (area 100 sq cm) is placed on the (preferably dark grey) work surface and the height/zoom of the camera is adjusted so that the image roughly fills the monitor screen. The LEVEL control is adjusted so the white image appears dotted all over. The DOTTING control adjusts the intensity of the dotting for ease of viewing. The CAL control is then adjusted so that the meter indicates 100.

The calibration paper is now removed and replaced with any irregular shaped flat object to be measured, providing it does not exceed the 10cm x 10cm boundaries. The LEVEL control is again adjusted so that only the area of interest is covered with dots. The measured area is displayed in square cm by the analogue meter (a percentage of the 100 sq cm calibration sheet). A number of objects may be measured simultaneously and the sum of the individual areas displayed.

How does it work?

The circuit is shown in Fig. 1. It can be divided into three sections, a video clamp (IC1, TR1 & TR2), a video level comparator (TR3 & TR4), a free-running oscillator and gate (IC2) and a video amplifier (IC3). The waveforms are shown in Fig. 2.

The incoming video signal is a.c. coupled through C1 to the output amplifier IC3. Resistors R12 and R13 define a gain of x2 so that the output through R14 will produce overall unity gain into a 75R load. The input signal is also coupled through R2 and C3 to the sync separator IC1. The (burst/back porch) output of IC1 is coupled through C4, inverted by TR1 to drive the MOSFET TR2 which clamps the black level of the video signal to 0V at line frequency. This ensures that the black level is held constant irrespective of the video content.

The clamped video signal is fed to TR3 which, with TR4, form a voltage comparator. A reference voltage is fed to the base of TR4 from the potential divider formed by R8, RV1 & R9. Video signals exceeding the reference voltage cause a positive voltage output from TR4 which is fed to IC2a.

Gates IC2c and IC2d form a free-running oscillator operating at approximately 1MHz. The square-wave output from IC2d is taken to one input of IC2a. The other input is connected to the collector of TR4. When this goes high the square-wave (dotting) signal is passed to IC2b. The output from IC2b is taken through the DOTTING control RV3 and R11 to IC3, to provide the dotting which is superimposed on the picture. This indicates the area being measured.

The output from IC2b is also taken through R10 and the 'CAL' control RV2, to the moving coil meter. The dotting signal is a square-wave of fixed amplitude. The inertia of the moving coil meter integrates the number of positive half cycles into a current which is displayed by the meter. The current resulting from the dots produced by the calibration test piece (of 100 sq cm) is set by RV2 to give a full scale indication of 100 on the meter. The number of dots and thus the current caused by the unknown sample is indicated as a percentage of full scale indication, in this instance, directly in sq cm. An off-screen picture is shown in Fig.3.

Summary

The purpose of the dotting is to show the area being measured and allow adjustment of the LEVEL control so the correct area is selected. The CAL control allows the meter to be set to full scale when setting up. The DOTTING control adjusts the relative brightness of the dotting, for ease of viewing, but has no affect on the measurement.

A calibration piece of 100 sq cm was chosen as an example, but virtually any size could be measured by changing the camera distance/zoom settings or by using a microscope. An optical colour filter may be used on a monochrome camera to enhance specific areas for independent measurement. In my early experiments this allowed a brown diseased patch on a leaf to be measured separately from the whole leaf and displayed as a percentage. If a colour camera is used, a 47µH choke should be connected in series with R16 to allow the clamp to operate correctly.

The dotting signal from IC2b could be counted and displayed digitally, with gating, counting, display, storage and reset using conventional logic or a microcontroller. Field scan timing could be obtained from IC1.

Note: IC2 pin7 = 0V, pin 14 = +5V.

Figures

Fig.1. Circuit diagram

Fig.2. Waveforms

Fig.3. Off screen picture of geranium leaf