Upload
nick-barzelay
View
2.006
Download
1
Tags:
Embed Size (px)
Citation preview
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 1
Image Processing - A SurveyNick D. Barzelay
Rochester Institute of Technology
Summer, 2006
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 2
ContentsI. The ImageII. Working With ImagesIII. Image EvaluationIV. Image CorrectionV. ToolsReferencesImage Gallery
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 3
I. The Image
Faithful, distorted, and obscuredreal world representations
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 4
What We See Visible Electromagnetic Spectrum:
– 400 nanometers (approximate blue)– 700 nanometers (approximate red)
Levels of Brightness - 256– Human eye can only distinguish a portion– Inkjet or Laser can only print a portion
Gray Levels - 256– Human eye can only distinguish 20 to 30
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 5
Color Requirements
– Object– Light Source– Observer
Color Gradations– Hue - color as described by wave length– Saturation - amount of color present– Lightness
Amount of light Distinction between dark and light
Color Types– Additive - light emitting (RGB)– Subtractive - light reflecting (CMY)
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 6
Perspective Depth Perception comes from:
– Human Stereoscopy– Relative Size– Precedence– Perspective– Atmospheric Haze– Other Clues
Viewing Geometry– Spatial Area or Distance– Angles– Time
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 7
II. Working With ImagesPurpose
AcquisitionProcessingApplication
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 8
Image Acquisition Continuous Tone Subject - Selected subject material
for black & whites or color Sampling (continuous tone color or gray scale)
– Digital Camera or Scanner– Collect analog samples in a Sampling Grid (pixel count, ie. 640 x 480)
Quantization & Conversion (Rasterization)– Spatial Aspect describing grid location– Tonal Aspect describing color (Trichromacy considerations)
Output Frequencies– Pixel Grid– Spot Addressability Grid– Screener Dot Grid
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 9
Basic Image Processing Improve Correct Restore Analyze Change Archive Retrieve Synthesize Preparation (color, composition, & effects) Presentation or Viewing
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 10
Image Analysis Fundamental Processes
– Counting– Measuring– Matching– Classifying
Segmentation Feature Extraction Outlining (Skeletonization) Object Classification
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 11
CSI: Crime Scene Investigation Video Monitor Recording Analysis
– Restoration– Enhancement– Isolation & Extraction
Finger Print Matching Facial or Body Matching Feature Recognition Location Triangulation Spatial Placement & Measurement Document Analysis Ballistics & Trajectory Analysis
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 12
Image Analysis with ImageJBasic Operations
– Selection Tools: Select an image area (4 types of marques)
– Line Tools: Draw a line on an image (3 types of lines)
– Crosshairs: Mark image locations with coordinates & brightness
– Wand Tool: Automatically find the edge of an object
– Text Tool: Add text or labels to an image
– Magnifying Glass: Increase & decrease image size
– Scrolling Tool: Move image if larger than window
– Color Picker: Set the drawing colors
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 13
ImageJ Processing Undo Revert Cropping Clear Outside (make a perimeter to clear extraneous objects
around a subject area) Enhance Brightness/Contrast Remove Noise Rotate Image Convert to Grayscale (8 bit 256 shades) Thresholding (binary contrast enhancement) Counting & Measuring
– Setting the measurement scale– Measuring distance between points– Measuring Area– Counting particles
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 14
Seeing It In Print Traditional Printing is Binary
– Lay down ink– Don’t lay down ink
Halftone Solution– Dots smaller than eye resolution (150 lpi)– Illusion of continuous tone
Gray Levels 256 (16x16 spot grid)– (addressability (spi)/screen ruling (lpi))2 + 1– Needed gray levels - 16 + 4% noise for vignette
Halftone Methods - assigning halftone dots– AM Screening - Spatial address is constant, dot
size is modulated– FM Screening - Dot size is constant, spatial
addressing is modulated the higher the micron size, the coarser (more granular)
the print
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 15
Screen Ruling Commercial printing (GRACol)
– General Requirements for Applications inCommercial Offset Lithography
– 175 lpi Standard publication printing (SWOP)
– Specification for Web Offset Publishing– 133 lpi or 150 lpi (SWOPv2)
Newspaper printing (SNAP)– Specifications for Non-Heatset Advertising Printing– 85 to 100 lpi
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 16
Printing Color Print is reflective (subtractive) - CMYK separations represent color channels Each separation has its own screen AM screens are spatially offset (w/in90°)
– Yellow = 0° screen angle with Black = 45° angle– Cyan = 15° screen angle with Magenta = 75° angle
FM is random and eliminates angular screening– Many AM problems are overcome:
Loss of detail minimized Subject and screening moiré is eliminated Rosette structures are eliminated Gradient blends tend to print smoother
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 17
Image Storage Storage Systems
– DAMS & CMS– Desktop Systems
Adobe Bridge NikonView
Storage Media– CD (r & rw)– DVD– Magnetic (disk or other media)
Search & Retrieval Logic– Boolean Logic– Fuzzy logic
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 18
Search & Retrieval Mechanisms Key Words Search Fields Particular
Characteristics Color Recognition Matching Shapes Numeric Values Query By Image
Context (QBIC)
MeasurementParameters
Latitude & Longitude Slide Coordinates Time & Date Size or Density Thumbnails “Wild Cards” Cross Correlation
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 19
Image Compression Compression Reasons
– Transport– Storage
Standard Compression Schemes– Lossless: preserves exact image data content (ratios up to 3:1)– Lossy: preserves arbitrary levels of image quality (ratios up to 100:1)
Operational Symetry– Compression
Symmetrical: compression & decompression take similar time Asymmetrical: compression takes more time then decompression
– Decompression Asymmetrical: decompression takes more time than compression
Information Loss– Compression
Detail is lost in high frequency low contrast areas where the eye is notsensitive
– Down Sampling Information is lost throughout overall image resolution independent of
contrast
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 20
Compression Types Lossless (Transmissions & Facsimile)
– CCITT Group 3 & 4 - International Telephone &Telegraph Consultative Committee
– JBIG - Joint Bi-level Image Experts Group Lossy
– JPEG - Joint Photographic Experts Group Fine (1:4) Normal (1:8) Basic (1:16)
– MPEG - Moving Picture Experts Group MPEG-1: low resolution image sequences (320x240 pixels) MPEG-2: higher resolution applications (640x480 pixels)
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 21
Photo Compression & StorageRelative JPEG storage on 16 MB media
2560 x 1704
640 x 480
1024 x 768
1280 x 960
1600 x 1200
2560 x 1920
Pixel Size
271473:2
22914486VGA
1216937XGA
864724SXGA
593116UXGA
25126Full
Basic (1:16)Normal (1:8)Fine (1:4)Image Size
Courtesy of Nikon: The Nikon Guide to Digital Photography with the CoolPix 5700 Digital Camera
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 22
III. Image Evaluation
Image condition is bothperceptual and quantitative
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 23
Image Quality Image Resolution:
– Spatial Density & Frequency (high & low)– Brightness, Contrast, Color– Optics - system capability to resolve details
Dependencies:– Number of Pixels (pixels/inch)– Number of Lines (lines/inch)– Range of Brightness Values (dynamic range - gray levels)
Radiant intensity - reflected light Luminous brightness - acquired light
– Color & Contrast– Viewing Geometry
Image dimensions Viewing distance Aspect ratio (rectangularity)
– Compression Ratios & Relative Results
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 24
Quality Deficiencies Detail Resolution Image contrast & white balance Color Quality Tonal Quality & Range Composition Spatial Characteristics Annoying Image Noise Out-of-focus (specific objects or overall) Motion blur (specific objects or overall) Image Geometry Lost Information from Compression
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 25
Causes of Image Defects Limitations of Optics
– Built-in Limitations– Dirt, Particles, Smudges
Imperfect Detectors Inadequate Illumination Non-uniform Illumination Too Much Illumination An Undesirable Viewpoint (perspective) Unplanned Movement
– The Subject– The Capture Device– Capture Device Settings (Aperture & Shutter Speed)
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 26
Noise Definition - random extraneous pixels that are
not part of the image detail Causes
– High ISO setting– Under exposure– Shooting in darkness with long shutter speed
Types– Luminance Noise: gray scale data, grainy, patchy– Color Noise: colored artifacts– Compression artifacts– Film grain patterns from scanning– Scanner or camera sensor generated noise
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 27
Image Distortion Barrel Distortion - lens defect causing
lines to bow out Pincushion Distortion - lens defect
causing line to bow in Vignetting - image edges and corners
darker than center Chromatic Aberration - color fringes
along edges of image objects
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 28
IV. Image Correction
Making the image “better”
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 29
Correction Strategies Better to optimize or correct the
acquisition process– Not always practical, feasible, achievable– Not always possible
Correct after image is digitized & stored– Corrections may not deliver the highest
quality result– Corrections depend on planned purpose
(desirability vs. usability)
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 30
Approaches Processing Viewpoint:
– Subjective - repetition until satisfactory– Objective - measured and applied once
Processing Types:– Contrast enhancement or degradation– Spatial enhancement or degradation
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 31
The Correction Setup Lighting (approximately 65K) Digital Camera (settings if appropriate) Calibration (monitor, scanner, printer) Standard profiles (hardware & software) Image profiles and metadata Image analysis & correction plan Conversion - convert images to TIFF
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 32
Correction Steps (per Adobe) Duplicate the original image or scan Check image quality & confirm resolution is
appropriate for use Crop image to final size & orientation Repair flaws in scan of damaged photos Adjust overall contrast or tonal range Adjust white balance to modify original photo
conditions Remove any color casts Adjust color & tone is specific parts to bring out
highlights, midtones, shadows, and desaturatedcolors
Sharpen the over-all focus of the image
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 33
Correction Techniques Contrast Expansion & Manipulation Neighborhood Averaging Gaussian Smoothing (to reduce noise) Median Filter Application (reduce shot noise) Conditional Smoothing Manipulation of Pixel Patterns in an area by
addition, subtraction, or averaging Segmentation (critical in creating information)
– Dividing an image into regions corresponding to structural units inthe scene
– Distinguishing objects of interest Halftone Removal Removal of Motion Blur based on vector of direction and
exposure time
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 34
Enhancement & Restoration Histogram Equalization & Filters Image Morphology
– Contrast Enhancement– Edge Enhancement & Skeletonization– Image Erosion - shrinking or removing selected objects– Image Dilation - expansion of selected objects
Geometric Transformation– Rotation– Scaling– Warping
Interpolation Segmentation (removing distracting or useless
information - ie. Background subtraction)
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 35
Specific Processes Complement Image - negative Histogram Sliding - brighten or darken image Binary Contrast Enhancement - create high contrast Brightness Slicing - create high contrast of an object Image Subtraction - remove common background info Image Division - spectral ratioing Image Addition - average identical scenes to reduce noise Low-pass Filter - attenuate image noise from high freq. Unsharp Masking - sharpen by subtracting a brightness-scaled image
from the original High-pass Filter - highlights high frequency details Sobel Edge Enhancement - produce object edges Shift & Difference Edge Enhancement - vertical, horizontal, and
diagonal edges
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 36
Specific Processes (continued) Prewitt Gradient Edge Enhancement - produce object edges in an
image Laplacian Edge Enhancement - extracts all edges in an image Line Segment Enhancement - produce edge-enhanced images Median & Ranking Filters - remove impulse noise spikes Fourier Frequency Transform Filtering - selective removal of periodic
noise patterns Translation Transformation - horizontal or vertical geometric
adjustments Rotation Transformation - geometric rotation of an image Scaling Transformation - geometric adjustment of size Warping Transformation - correct geometric distortions created in
image acquisition
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 37
V. Tools
Functionality for image manipulation
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 38
Key Photoshop Tools Dodge Tool - lighten highlights, reduce light Sponge Tool - saturate a color by adjusting purity Clone Stamp Tool - uses pixels in one area to
replace pixels in another area Spot Healing Brush - paints with sampled pixels from
around retouch area Healing Brush Tool - apply & blend pixels from one
area to another Patch Tool - combines area capture with blending
properties
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 39
Key Photoshop Filters Unsharpen Mask Filter - adjust edge contrast
giving illusion of better focus Reduce Noise Filter - eliminate noise Sharpen Filter - reduce lens blur Vanishing Point Filter - correct perspective Lens Correction Filter - address distortion
issues
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 40
References Adobe. (2005). Adobe Photoshop CS2 classroom in a book. Berkeley,
CA: Peachpit Press. Baxes, Gregory A. (1994). Digital image processing principles and
applications. New York: John Wiley & Sons, Inc. Haynes, Barry & Crumpler, Wendy. (2002). Photoshop 7 artistry.
Indianapolis, IN: New Riders Publishing. London, Sherry & Grossman, Rhoda. (2002). Photoshop 7 magic.
Indianapolis, IN: New Riders Publishing. McClelland, Deke. (2005). Adobe Photoshop CS2 one-on-one.
Sebastopol, CA: O’Reilly Media, Inc. Rasband, W.S. (2006). ImageJ. Bethesda, MD: U.S. National Institute
of Health. Retrieved October 25, 2006, from http://rsb.info.nih.gov/ij Russ, John C. (2002). The image processing handbook, fourth edition.
Boca Raton, FL: CRC Press LLC. Sigg, Franz. (2005). Resolution and contrast for image reproduction.
Slide Presentation. Rochester, NY: RIT.
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 41
Image Gallery
SettingsProcedures
Image Collection
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 42
Image Gallery - Settings Photoshop Color Settings
– RGB: Adobe RGB (1998)– CMYK: U.S. Web Coated (SWOP) v2– Gray & Spot Colors: 20% Dot Gain– Embedded Profiles: Preserve– Rendering Intent: Relative Colorimetric– Color Engine: Adobe (ACE)– Black Point Compensation & Dither
File Save– TIFF with LZW (Lossless) Compression– Interleaved– Macintosh
Acrobat– Default settings for High Quality Desktop Printing
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 43
Image Gallery - Procedure Load Image into Photoshop Convert Profile (sRGB to Adobe RGB) Apply Process(es) or Filter(s) Resize Image Save As… in Processed Image Folder
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 44
Original Photograph
Photograph with Flash
Manually CorrectedPhotograph usingColor Balance for Shadows, Mid-tones,and Highlights
Manually CorrectedPhotograph usingContrast & Brightness
Auto CorrectedPhotograph across Levels
Auto CorrectedPhotograph for Color
Auto CorrectedPhotograph for Contrast
Yellow Flower Collection
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 45
Photograph manually adjusted forbrightness and contrast by holdingone setting at 0 while adjustingthe other setting
Original Photograph
Brightness = -49Contrast = 0
Brightness = -100Contrast = 0
Brightness = 49Contrast = 0
Brightness = 100Contrast = 0
Brightness = 0Contrast = 49
Brightness = 0Contrast = 100
Brightness = 0Contrast = -49
Brightness = 100and Contrast = 100
produces Neutral Gray
Brightness = 0and Contrast = -100
produces Black
Brightness & Contrast
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 46
Photograph manually adjusted for Shadows,Mid-tones, and Highlights to increase the
Greens and strengthen the yellows
OriginalPhotograph
Photograph afterSlight Adjustments
Color Balance
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 47
Application of Image-Wide Adjustments toTone and ColorOriginal Photograph
Tone & ColorEqualized
Tone & ColorPosterized
Tone & ColorInverted
Tone & ColorThresholded
Purple Flower Collection
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 48
The original photograph was takenout of focus
This correction is by applying SmartSharpening: Correction Angle 90°
Radius 40 PixelsMotion Blur Correction
This correction was made by applyingthe Unsharp Mask: Amount 90%
Radius 16.6 PixelsThreshold 48 Levels
Patio Stones - Sharpening
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 49
The object is to bring more detail toTyler (the dog).
#1. The original photograph#2. The desaturated photograph#3. Adjusted highlights and shadows:
Shadows set to 100%Highlights set to 0%#1
#2 #3
Bringing Out Detailswith Shadows & Highlights
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 50
Tyler is not visible in the originalphotograph (upper left), but hebecomes obvious in the two gradient-mapped versions below (see thecircled areas).
I had no idea he was in the pictureuntil it was mapped. It was acomplete surprise.
Bringing Out Details withGradient Mapping
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 51
While Tyler is not visible in theoriginal photograph (previous slide),and somewhat visible with GradientMapping, he is easily located in thesetwo filtered images.
The upper image was created withthe Find Edges Filter.
The lower image was created with theContour Filter where the Levels wereset to 8 to eliminate detail
Bringing Out Detailswith Contour and
Edge Filters
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 52
Bee Collection - UsingMasks, Marques, andTransformation Edits
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 53
The original photograph with someposterization tendency in the upperleft darker blue sky
A Cool 80 filter applied to photographstill leaves a small amount ofposterization tendency in the upperleft darker blue sky
A Warm 85 filter mitigates theposterization tendency and softensthe colors overall
Adjustments with PhotoCool and Warm Filters
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 54
The original photograph with somedetail lost in the shadows and somesharpness overall
A blue filter applied to photograph stillsoftens the photo but is a little cool
A yellow filter warms the photograph,bringing out some green and a littlemore detail
Application of filters (in this case)demonstrates viewer perception andsubjectivity
Adjustments with PhotoColored Filters
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 55
Original Photograph Cyan Proof Plate Magenta Proof Plate Yellow Proof Plate
Black Proof Plate CMY Proof CMYK Proof
Plate ProofSeparations
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 56
The original photograph wascompressed during File Save As…
1. Original TIFF Image2. JPEG - Maximum3. JPEG - High4. JPEG - Medium5. JPEG - Low
1.
2.
3. 4. 5.
JPEG Compression
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 57
ImageJ RGBSeparation
Separated Red Separated Green Separated Blue
Merged RGB
The original photograph wasseparated using the ImageJ image
separation procedure.
This produced three images that wereremerged using a reciprocal procedure
to generate the fourth image.
Original Photograph
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 58
ImageJ ChristmasCollection - Analysis
Original Color Photograph
Converted 8 bit Gray Scale Image
Histogram
BaselinePlot
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 59
ImageJ Christmas Collection- Procedures & Filters
Three procedures were run to identify detail:
1. Identify areas of high variance2. Find edges3. Apply a convolution filter
1.
2. 3.
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 60
ImageJ Collection - ApplySubtraction & Filters
Additional processes brought out more detail:
1. Subtract the background leaving white areas2. Adjust shadows for south west shift3. Apply a sharpening filter
1.
2. 3.
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 61
ImageJ Christmas Collection- Contrast & Gamma
Two Additional processes were applied:
1. Enhance Contrast2. Adjust Gamma to 1.0
2.
1.
2/17/10 Copyright © Nick D. Barzelay, 2006. All rights reserved. 62
End of Galleryand
Presentation
Thank You for Your Attention