Beruflich Dokumente
Kultur Dokumente
Lecture1:IntroductiontoImage
ProcessingandImageJ
ProfEmmanuelAgu
ComputerScienceDept.
WorcesterPolytechnicInstitute(WPI)
WhatisanImage?
2dimensionalmatrixofIntensity(grayorcolor)values
Image coordinates
Set of Intensity values are integers
ExampleofDigitalImages
a) Naturallandscape
b) Syntheticallygeneratedscene
c) Postergraphic
d) Computerscreenshot
e) Blackandwhiteillustration
f) Barcode
g) Fingerprint
h) Xray
i) Microscopeslide
j) SatelliteImage
k) Radarimage
l) Astronomicalobject
ImagingSystem
becomeanapproximation ofarealscene
1 pixel
Wewillstartwithgrayscaleimages,extendtocolorlater
WhatisimageProcessing?
Algorithmsthatalteraninputimagetocreatenewimage
Inputisimage,outputisimage
Image Processing
Algorithm
(e.g. Sobel Filter)
Improvesanimageforhumaninterpretationinwaysincluding:
Imagedisplayandprinting
Imageeditting
Imageenhancement
Imagecompression
ExampleOperation:NoiseRemoval
Examples:NoiseRemoval
Example:ContrastAdjustment
Example:EdgeDetection
Example:RegionDetection,
Segmentation
Example:ImageCompression
Example:ImageInpainting
OriginalMRIImageofaDogHeart EdgeDetectionImage
ApplicationsofImageProcessing
dd
ApplicationsofImageProcessing:
GeographicInformationSystems(GIS)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Terrainclassification
Meteorology(weather)
ApplicationsofImageProcessing:Law
Enforcement
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Numberplaterecognitionforspeedcamerasor
automatedtollsystems
Fingerprintrecognition
ApplicationsofImageProcessing:HCI
Facerecognition
Gesturerecognition
RelationshipwithotherFields
KeyStagesinDigitalImageProcessing
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
recognition
Colour Image Image
Processing Compression
KeyStagesinDigitalImageProcessing:
ImageAquisition
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Image Morphological
Restoration Processing
Example: Remove
Noise
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
recognition
Colour Image Image
Processing Compression
KeyStagesinDigitalImageProcessing:
MorphologicalProcessing
Extract
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
recognition
Colour Image Image
Processing Compression
KeyStagesinDigitalImageProcessing:
Segmentation
Divide
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
recognition
Colour Image Image
Processing Compression
KeyStagesinDigitalImageProcessing:
ObjectRecognition
Image
regions
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
recognition
Colour Image Image
Processing Compression
KeyStagesinDigitalImageProcessing:
Representation&Description
Finds &
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
recognition
Colour Image Image
Processing Compression
KeyStagesinDigitalImageProcessing:
ImageCompression
Reduce
Image Morphological
image size
Restoration Processing (e.g. JPEG)
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
recognition
Colour Image Image
Processing Compression
KeyStagesinDigitalImageProcessing:
ColourImageProcessing
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
recognition
Consider color
Colour Image Image
images (color
models, etc) Processing Compression
MathematicsforImageProcessing
Calculus
Linearalgebra
Probabilityandstatistics
DifferentialEquations(PDEsandODEs)
DifferentialGeometry
HarmonicAnalysis(Fourier,wavelet,etc)
AboutThisCourse
ImageProcessinghasmanyaspects
ComputerScientists/Engineersdeveloptools(e.g.photoshop)
Requires knowledgeofmaths,algorithms,programming
Artists useimageprocessingtoolstomodifypictures
DOESNOTrequireknowledgeofmaths,algorithms,programming
Retinacoveredwith
lightreceptorscalled
cones (67million)and
rods (75150million)
Conesconcentrated
aroundfovea.Very
sensitivetocolour
Rodsmorespreadout
andsensitivetolowilluminationlevels
ImageFormationInTheEye
Musclesineyecanchangetheshapeofthelens
allowingusfocusonnearorfarobjects
Animageisfocusedontoretinaexcitingtherodsand
conesandsendsignalstothebrain
ImageFormation
ThePinholeCamera(abstraction)
FirstdescribedbyancientChineseandGreeks(300400AD)
ThinLens
BrightnessAdaptation&
Discrimination
Thehumanvisualsystemcanperceiveapproximately
1010 differentlightintensitylevels
However,atanyonetimewecanonlydiscriminate
betweenamuchsmallernumber brightnessadaptation
Similarly,perceivedintensity ofaregionisrelatedtothe
lightintensitiesoftheregionssurroundingit
BrightnessAdaptation&
Discrimination:MachBandEffect
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Perceived intensity
overshoots or undershoots
at areas of intensity change
BrightnessAdaptation&
Discrimination
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
All inner squares have same intensity but appear darker as outer
square (surrounding area) gets lighter
ImageAcquisition
Imagestypicallygeneratedbyilluminatingascene
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
andabsorbingenergyreflectedbysceneobjects
ImageSensing
Incomingenergy(e.g.light)landsonasensormaterial
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
responsivetothattypeofenergy,generatingavoltage
Collectionsofsensorsarearrangedtocaptureimages
Imaging Sensor
Samplingandquantizationgenerates
approximation ofarealworldscene
ImageasDiscreteFunction
ImageasaFunction
RepresentingImages
Imagedatastructureis2Darrayofpixelvalues
Pixelvaluesaregraylevelsinrange0255orRGBcolors
Arrayvaluescanbeanydatatype(bit,byte,int,float,
double,etc.)
SpatialResolution
Thespatialresolutionofanimageisdeterminedby
howfine/coarsesamplingwascarriedout
Spatialresolution:smallestdiscernableimagedetail
Visionspecialists
talkaboutimageresolution
Graphicdesigners
talkaboutdotsper
inch(DPI)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
SpatialResolution
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
SpatialResolution:StretchedImages
IntensityLevelResolution
Intensitylevelresolution:numberofintensitylevels
usedtorepresenttheimage
Themoreintensitylevelsused,thefinerthelevelofdetail
discernableinanimage
Intensitylevelresolutionusuallygivenintermsofnumber
ofbitsusedtostoreeachintensitylevel
Number of Intensity
Number of Bits Examples
Levels
1 2 0, 1
2 4 00, 01, 10, 11
4 16 0000, 0101, 1111
8 256 00110011, 01010101
16 65,536 1010101010101010
IntensityLevelResolution
256 grey levels (8 bits per pixel) 128 grey levels (7 bpp) 64 grey levels (6 bpp) 32 grey levels (5 bpp)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
16 grey levels (4 bpp) 8 grey levels (3 bpp) 4 grey levels (2 bpp) 2 grey levels (1 bpp)
Saturation&Noise
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Example:Pictureonrightokayforcountingnumber
ofcars,butnotforreadingthenumberplate
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Low Detail
Medium Detail
IntensityLevelResolution
High Detail
ImageFileFormats
Hundredsofimagefileformats.Examples
TaggedImageFileFormat(TIFF)
GraphicsInterchangeFormat(GIF)
PortableNetworkGraphics(PNG)
JPEG,BMP,PortableBitmapFormat(PBM),etc
Imagepixelvaluescanbe
Grayscale:0 255range
Binary:0or1
Color:RGBcolorsin0255range(orothercolormodel)
Applicationspecific(e.g.floatingpointvaluesinastronomy)
HowmanyBitsPerImageElement?
IntroductiontoImageJ
ImageJ:OpensourceJavaImageprocessingsoftware
DevelopedbyWayneRasbandatNat.InstforHealth(NIH)
Manyimageprocessingalgorithmsalreadyimplemented
Newimageprocessingalgorithmscanalsobeimplementedeasily
Niceclickanddraginterface
Pluginmechanismforimplementingnew
functionality,extendingImageJ
Macrolanguage+interpreter:Easytoimplement
largeblocksfromsmallpieceswithoutknowingJava
ImageJSoftwareArchitecture
ImageJusesJavaswindowingsystem(AWT)fordisplay
ProgrammerwritespluginstoextendImageJ
AlreadyimplementedpluginsavailablethroughImageJs
pluginsmenu
ImageJPlugins
Plugins:Javaclassesthatimplementaninterface
definedbyImageJ
Twotypesofplugins
Plugin:Requiresnoimagetobeopenfirst
PlugInFilter:Passedcurrentlyopenimage,operatesonit
WewillmostlyfocusonPlugInFilters
Twomethodsdefined
intsetup(Stringarg,ImagePlusim):
Doesinitialization,verifiesplugincapabilitiesmatchesinputimage
intrun(ImageProcessorip):
Doesactualwork.Passedimage(ip),modifiesit,createsnewimages
FirstImageJExample:InvertImage
Task:Invert8bitgrayscale(MxN)image
Basically,replaceeachimagepixelwithitscomplement
WeshallcallplugInMy_Inverter
NameofJavaClass:My_Inverter
Nameofsourcefile:My_Inverter.java
_underscoremakesImageJrecognizesourcefileasplugin
Aftercompilation,automaticallyinsertedintoImageJmenu
FirstImageJExample:InvertImage
Note:Onstartup,ImageJ loadsallpluginsinthe<ij>plugins/
subdirectory
ImageJ canalsobeusedwitheclipseIDE(largeprograms)
References
WilhelmBurgerandMarkJ.Burge,DigitalImage
Processing,Springer,2008
UniversityofUtah,CS4640:ImageProcessingBasics,
Spring2012
GonzalesandWoods,DigitalImageProcessing(3rd
edition),PrenticeHall
DigitalImageProcessingslidesbyBrianMacNamee