Intelligent Video Switcher
Monitoring several cameras on one
monitor is usually done in one of two ways: divide the screen into
sections and show them all at once, or time sequence the cameras onto
the whole screen.
Three numeric sums (modulo 256) are computed from the 64 samples in the video frame. The first sum either adds or subtracts the video sample on a 'checkerboard' basis (see fig-1). Any object moving from one cell to an adjacent one will create a shift in the sum. A second sum is made using the pattern in fig-2. This sum is more sensitive to larger objects that may not affect the first sum. Likewise, a third sum is made using the pattern in fig-3. Now we just add the 3 sums! A single 8-bit value now reacts to almost any changes in the visual field. All we need to do now is take the samples. There is no way for the PIC's A/D to sample 8 times on a single video scan line. However, it has no trouble taking one sample per line.
Referring now to the Schematic. Each of the 4 video inputs goes to both U1 and U2. U1 controls which input is routed out to the monitor. U2 controls which input goes to the detection circuit.
U4-A acts as a 'video clamp': it forces all of the sync tips to zero volts. This allows U4-B to 'slice' off the sync pulses and feed them to the PIC. The PIC can now locate the Vertical Sync by looking for a set of 6 wide Horizontal Sync pulses. It then counts Horizontal Sync pulses to find the start of any particular video line.
The Source File only implements the 4 cameras. You can connect any number from 1 to 4 and the software will sort out the detection and switching. Motion on any video input switches the output immediately to that source.
Additionally, any IR signal detected switches to the next camera.