640 likes | 741 Views
Data Translation, Inc. Basics of Image Processing. Types of Video Images. Monochrome Image made up of varying shades of gray, from black to white Number of shades depends on resolution of frame grabber. Monochrome Resolutions. Types of Video Images. RGB Color –
E N D
Data Translation, Inc. Basics of Image Processing
Types of Video Images • Monochrome • Image made up of varying shades of gray, from black to white • Number of shades depends on resolution of frame grabber
Types of Video Images • RGB Color – • Three sets of brightness signals • One for each: RED, GREEN, BLUE
Capturing Images • Terminology • Video formats • Frames (interlaced and non-interlaced) • Fields (odd and even) • Video signals
Standard Video Fundamentals • Light collides with the surface of an image sensing device (camera) • Result: an electrical voltage level, related to the amount of light hitting the particular area of the surface, is produced
Video Format • This information is then arranged into a standard format and output from the camera • Sync pulses are also added so that the receiving device can recognize where the sequence is in the frame data
Simplified Camera Diagram Lens Target Object Electron Beam Video Signal
Pixels • Images are broken down into horizontal lines • Lines are broken down into picture elements, or pixels
Monochrome Pixels Each pixel has a gray value. On 8-bit systems, 0=black and 255=white. All other values are shades of gray.
Color Pixels Each pixel contains 3 colored phosphors: RED, GREEN, and BLUE. Each color receives a different intensity value (similar to “gray scale” in monochrome image processing). The resulting combinations determine which color we see.
Frames • Interlaced • Non-interlaced
Interlaced Image Frames • All odd-numbered lines are read from top to bottom, followed by all even-numbered lines
Interlaced Image Frames • - Diagonal lines are active video • Horizontal lines are blanking (beam off) • - At the bottom of the raster, the beam if off and video begins its vertical retrace (vertical blanking)
Fields • Interlacing causes the frame to be divided into two fields: odd and even • Each field is displayed sequentially giving the perception that the frame is updated twice as often as it really is
Fields • Each field updated every 1/60 or 1/50 s • Each frame updated every 1/30 or 1/25 s • 60 (50) fields per second: 30 (25) odd and 30 (25) even
Fields • This method reduces noticeable flicker when displaying images • When working with graphics or thin lines, flicker becomes extremely noticeable
Fields • To reduce flicker: • Use horizontal lines that are wider than 1 pixel (2 lines??) • Use long-persistence monitor • Use non-interlaced monitor for graphics
Monitors • An electron beam scans the surface of the display tube • A horizontal sync resets the beam to the left-most side of the screen and then moves it down to the next line • When a vertical sync is detected, the beam is reset to the top, left-most point of the screen
Diagram of Monitor Essentials Phosphors Video Signal Gun Grid Electrons
Video Signals • A video signal contains a series of analog TV lines • Lines are separated from one another by a sync pulse called horizontal sync • Fields are separated by a longer sync pulse called vertical sync
Typical Video Line Blanking Level Active Pixel Region Horiz. Sync Horiz. Blanking Full Scan Area
Video Signals • Digital video transfers several bits (representing pixel values) simultaneously • Two voltage levels, Logic 0 and 1 • Transmitted on individual TTL (Transistor-Transistor Logic) lines or pairs of lines in differential mode (RS-422 standard, less noise)
Interfacing Input Devices with Frame Grabbers • Video Formats: • RS-170 and CCIR • RS-170 RGB and CCIR RGB • NTSC and PAL
RS-170 • Specifies all timing and voltage levels for standard commercial video signals • Used as basis for most B&W video equipment in the U.S.
RS-170 • For 60 Hz television systems (North American standard) • Frame consists of 525 lines and is displayed once every 1/30 of a second • Each field contains 262.5 lines
RS-170 • Each field also contains 9 sync lines (18 lines per frame) and 11 “no video” or “blanking” lines • A video frame consists of 485 viewable lines: 525 – 18 (sync) – 22 (blanking) = 485
RS-170 • For camera compatibility, most frame grabber manufacturers design boards which capture 480 lines • Therefore, lines are clipped at the top and bottom of the image
RS-170 RGB • Three RS-170 type signals, one for each of the additive primary colors – red, green, and blue • Red, green and blue images are displayed simultaneously • Image manipulations must be performed independently on all three components
CCIR • CCIR – International Radio Consultative Committee • 50 Hz equivalent to RS-170 • A frame consists of 625 lines • Subtracting sync and blanking lines yields 544 lines of displayable video • Lines are clipped from top and bottom to display 512 lines
NTSC • NTSC – National Television Standards Committee • Standard specification for color signals – 60 Hz • Single line input • Color is superimposed over the monochrome (RS-170) signal
NTSC • Color can be removed by frame grabber using chrominance filter • Three most popular NTSC uses: • Broadcast television • Cable television • VCRs
PAL (Phase Alternation Line) • 50 Hz equivalent to NTSC • European standard
Summary of Standard Signals *USA = US, Canada, Japan, Brazil INTL = Most other countries
Non-standard Video Signals • Input device tells frame grabber when to digitize • Non-interlaced signal • All lines are read in succession to create a frame • One type is referred to as “slow scan”
Non-standard Video Signals • The following control signals must be provided by the user • Scan trigger • Clock enable • Pixel clock • Pixel value (analog)
Picture Aspect Ratio • The relationship between the width and height of a frame 4 3
Pixel Aspect Ratio • The relationship between the width and height of a pixel US 5:4 1:1 INTL 3:2 1:1
Chrominance Filter • Jumper-selectable circuit that removes color information from NTSC signals. Normally found on monochrome frame grabbers to prevent interference with the monochrome image • Implemented via a notch filter
Look-Up Tables (LUT’s) • Implements pixel (point) processing • One value goes in, another comes out 0 = 0 60 = 75 75 = 19 193 = 200 222 = 222 230 = 229 75 19
Input Look-Up Tables • Used for thresholding • Real-time processing • Add or multiply by a constant
Thresholding • A pixel operation used to reduce the number of gray levels displayed • One example is binary thresholding, resulting in either black or white
Binary Thresholding Example 0 - 160 0 LUT 161 - 255 255
Binary Thresholding Example #2 0 - 80 0 81 - 175 100 LUT 176 - 225 200 226 - 255 0
Contrast • Refers to the clarity (sharpness or dullness) of an image • A result of the ratio of black to gray to white
Histogram • Graphic representation of contrast Number of pixels 50 40 30 0 = black, 255 = white 20 10 0 20 40 60 80 100 120 140 160 180 200 220 240 255
Histogram Equalization • Alters the histogram, thereby smoothing the contrast
Zoom • Magnification of an image • Typical factors: 2, 4, or 8
Pan • Shifts image to left or right