2011 spring lecture(1)_digial imaging_fly

Upload: 400kv

Post on 06-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    1/27

    FlowMeasurement

    Digitalimageanalysis

    Workingprincipleofadigitalcamera

    Digitalimageprocessing

    LDV, LDA (continued)

    FuLingYang

    May,18,2011

    Workingprincipleofadigitalcamera arrayofopticalsensorsthatconvertslightintensityintoelectricalsignals

    2

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    2/27

    ScientificDigitalCamera

    Digitalimagesensor Convertsanopticalimage(lightintensity)intoanelectricsignalby

    CCDor

    CMOS

    sensors.

    CCD:ChargeCoupledDevice

    CMOS:ComplementaryMetalOxideSemiconductordetector

    Digitalcamera Builtindigitalimageprocessingchiptocoverttherawdatafromthe

    imagesensorintoacolorcorrectedimageinastandardimagefile

    orma .

    Commontypes:CMOScamera,CCDcamera,EMCCD(ElectronmultiplyingCCD)

    camera;ICCD(ImageintensifiedCCD)camera.

    3

    CCDsensor

    Chargecoupleddevicehasthreemajorcomponents:

    (A)Asilicondiodephotosensor (aPixel)thatreceivesphotonsofvarious

    n ens y.

    e

    nc en

    p o ons

    ave

    su c en

    energy

    o

    ag a e

    an

    electronmotionawayfromthesiliconlayer,whichgeneratesacharge.

    (B)Thechargemovestoadownstream

    chargestorageregion,generating

    ananalogoussignal.

    (A)

    (C)Thequantityoftheaccumulated

    charge,thesumof0or1(depending

    on

    the

    incident

    light

    intensity),

    is

    then

    amplifiedandtransmittedthrougha

    clocksignal.

    (B)

    (C)

    4

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    3/27

    CCDsensor (C),amplified

    (A)

    (B)

    An image is projected by a lense on the diode photo-sensor, causing eachpixel to accumulate an electric charge proportional to the light intensity atthat location.

    Once the array has been exposed to the image, a control circuit causes eachpixel to transfer its charges to its neighbor. The last capacitor in the storagesection sends its charge into a charge amplifier, which converts the chargeinto a voltage.

    B re eatin this rocess scannin across the hoto-sensor , the controlsignal converts the charge information of the entire pixel array (in (A)) to asequence of voltages (output from (C)), which it samples, digitizes andstores in some memory format.

    The algorithms for voltage conversion results in digital images/videos ofdifferent formats. These stored images can then be transferred to a printer,digital storage device or video display.

    5

    EMCCD

    InaCCD,thereistypicallyonlyone

    amplifieratthecorneroftheentire

    array;thestoredchargeis

    sequentiallytransferred

    through

    theparallelregisterstoalinear

    serialregister,thentoanoutput

    nodeadjacenttothereadout

    amplifier.

    uses m arstructuresto s, utpr orto e ngrea outatt e

    outputnodethechargeisshiftedthroughanadditionalregister the

    multiplicationregister inwhichthechargeisamplified.

    Asignalcanthereforebeamplifiedabovethereadoutnoise oftheamplifier

    andhenceanEMCCDcanhaveahighersensitivitythanaCCD.

    6

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    4/27

    CMOSsensor

    Eachcolumnofphoto

    Arowofpixelscanbereadoutinparallelwiththerowselectedbyan

    sensors

    asan

    amp er

    associatedwithit(imagecan

    betransmittedabovethe

    noise).

    columnmultiplexer(Xaddressing).

    ACMOS

    device

    is

    essentially

    a

    parallel

    readout

    device

    and

    therefore

    can

    achievehigherreadoutspeeds. However,compensatingforthevariations

    inthecurrentstateoftheartCMOSdevicesisdifficult.

    7

    ICCDsensor

    Thephotocathode issimilartothephotosensitiveregionofaPhotoMultiplierTubes

    andspectrometers:

    the

    incident

    photons

    strikeoutelectronswiththeimpactenergy..

    Theliberatedelectronsarethenaccelerated towardanelectron

    multipliercomposedofaseriesofangledtubesknownastheMicro

    ChannelPlate(MCP).

    Undertheacceleratingpotentialofahighvoltage,theincident

    electronsgainsufficientenergytoknockoffadditionalelectronsand

    henceamplifiestheoriginalsignal.

    Thissignalisthendetected/amplified/transmittedusingthe

    techniquesdevelopedinotherCCDsensors. 8

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    5/27

    Remarksontheperformance

    OneweaknessofaCCDstemsfromthefactthattheCCDisessentiallyaserialreadoutdevice andlownoiseperformanceisonlyachievedattheexpenseofslowreadoutspeeds.Thusashortexposuretime isthemajor

    ott enec

    or

    t e

    CCD

    tec nique.

    CMOScamerascanachievehighframerateswithmoderatesensitivity.The precisions,however,iscomparativelylowduetothenonlinearmodulationofsignalattransmission.

    Duetotheaccelerationsection,IntensifiedCCDCamerascanachieveultrashortexposuretimes.ButtheMCPsmaketheunitexpensive,heavy,and

    .

    Sincetheelectrontransmissionissensitivetotemperature,overheatingmay

    degrade

    the

    performance

    of

    a

    high

    speed

    CCD

    image

    acquisition

    facility.Extraexpensesispaidforintegratedcoolingsystem.

    9

    Colorimagesensor

    Differedbythemeansofthecolorseparationmechanisms:

    , , pixels.

    The

    image

    is

    reconstructed

    using

    a

    specific

    algorithm.

    FoveonX3sensor: layeredsensoratonepixelthatrespondstoR,G,Blightdifferently.

    3CCD: thelightisfirstseparatedbyadichroicprism,whichgenerates, , .

    quality,butmostexpensive)

    10

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    6/27

    Bayerfilter(GRGB)

    Acolorfilterarrayatopofasquaregrid

    ofCCDsensorsthatredistributeR,G,B

    lightsinaspecificarrangements:

    EachpixeloftheBayerpatternimageonlycarriesinformationofONE

    Tomimichumaneyesthataremoresensitivetogreenlights,thefilteredimage

    is50%green,25%red,and25%blue,

    resultingaBayerpatternimage.

    co or. us,someco or a a sm ss ngan as o erecons ruc e withsomemathematicalalgorithms(artificialcompensation).

    Tointerpolate

    a

    complete

    image

    from

    a

    partial

    raw

    data,

    Demosaicing

    (incontrarytoaMosaicpattern)algorithmcanbethemeanofnearestneighborhood,linearinterpolation,,etc.

    11

    Foveonverticalcolorfilter

    Atopeachpixel,thereare3stackedactivesensorswithdifferent

    siliconlayerdeposition.TheR,G,Bcomponentsarefilteredin

    se uenceandthefilteredcom ositionof R G B.

    Thetransmissionrateofeachcolorelementisbasedonthe

    wavelengthdependentabsorptionoflightofthesilicon.

    12

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    7/27

    Trichroicprismassembly(TPA)

    Afteralightrayentersthefirstprism(A),theblue

    componentisreflectedbyacoating(F1)attheAB

    interface(longwavelengthbandwidth,high

    TheremaininggreencomponentofthebeamtravelsthroughprismC.

    frequency).

    Thetransmittedlightray(oflowerfrequency)enters

    asecondprism(B)andissplitagainattheBCinterface,

    withacoating(F2)designatedfortheredcomponent.

    EachofR,G,Braysundergoesatotalinternalreflection Thethreecolorcomponentsarethen

    Note:TPAcanbeusedinreversetocombinered,greenand

    bluebeamsintoacolorimageandisusedinmanyprojector

    devices.

    13

    ColorimageformatsInadditiontoRGBdecomposition,HSL(Hue,Saturation,Lightness)andHSV(

    ,,value)presentationsarealsopopular.

    Atruecolorcanalsobecomposedbythecombinationof

    hue

    ()

    thesaturation()

    thelightness/value()

    NotethatHSL/Vformatsarenottherawdatafromadigitalcamera. 14

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    8/27

    StructureofIndexedimage(8/16 bit)

    matrix

    ColorMap

    15

    Intensity/Truecolor(RGB)image

    16

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    9/27

    Digitalimageformats

    17

    Digitalimageformats

    Twomaincategories:

    as er

    mage

    ,

    ,

    ,

    ,

    , 2dimensional

    Vectorimage(SVGscalableVectorGraphics)

    Alsoknownasgeometricmodeling,objectorientedgraphicsthatutilizesgeometricalprimitives(point,line,triangle,curve,polygon)

    torepresentanimageincomputergraphics.

    ,theconstructingelementstogenerateanimagewrt.aspecific

    screen/imageresolution.

    Theresulting

    image

    in

    general

    preserves

    good

    quality

    than

    a

    2D

    flatrasterimagewhentheimagesareenlarged.

    18

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    10/27

    Imagecompression

    Losslesscompression:

    LossycompressionDiscardinformationthatcannotberecognizedbyhuman

    eyes;differentlossycompressionalgorithmsutilizevariouslevelsofqualitycompressiontoreducetheimagefilesize

    Maycausedeterioration(compressionartifacts)

    er mageApplyaninternationallyacceptednoisetothedatato

    reducethe

    artificial

    error

    induced

    by

    quantization.

    19

    Rasterimagetypes

    Eachimageisstoredasambynmatrix.Eachentry

    relationtolightintensity)withoneofthefollowing

    formats:

    Binary:0/1(black/white)image

    8bit/16bit: 1256/1 162

    Grayscale: 01

    Color: OnepopularformatisRGBcolor formats.Eachpixelhas

    threedigits

    (8

    /16

    bits)

    that

    store

    the

    intensity

    of

    each

    color

    (R,G,B)

    element. OtherformatincludesHSL,HSV.

    20

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    11/27

    Rasterimageformat(1)

    JPEG(JointPhotographicExpertsGroups) Lossy format(8bitpalette;256colorsintotal);degradationafterrepetitive

    editing/saving

    BMP(Windowsbitmap) Losslesscompression(developedforMSsystem,thuswidelyaccepted)

    GIF(GraphicsInterchangeFormat) Losslesscompression;8bitpalette

    Suitabletostoreimagesofsimplecolorcombination;

    Raw Losslesscompressionbutdifferamongdevices,thusnotaccessibletonormalsoftware

    21

    Rasterimageformat(2)

    TIFF(TaggedImageFileFormat) LossyorLosslessformat(8/16 bitspercolor)

    Recorddevicespecifiedcolorspaces,notsupportedbynormalsoftware

    PNG(PortableNetworkGraphics) Losslessformatisexcellentforediting

    Lossyformatusedwhendistributingimages(aspopularasJPEG)

    Supportstruecolor(16millioncolors)images;whilethesimilarGIFonlyaccepts256colors.

    Otherformats:

    EPS(EncapsulatedPostScript);PDF;WindowsMetafile

    22

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    12/27

    LZWfundamentals(19771979)

    Thefirst256codes(8bitcharacters)arebydefaultassignedtothestandardcharacterset.Theremainingcodes(dependingonthetypeof

    codes,eg:

    12bit,

    16

    bit)

    are

    assigned

    to

    strings

    of

    new

    characters

    as

    the

    algorithmproceeds.

    Fora12bitcodes,themain0255codesrefertoindividualcharactersof

    usualapplications,whilecodes2564095refertosubstringsgeneratedfor

    eachdataset.

    Compression:outputanewcodeonlywhenanewcharacterisdetected.Theresultingnewstringwillbeaddedtothestringtable(04095).

    [OPTIONAL]

    23

    LZWdecompression[OPTIONAL]

    Input Codes: / W E D 256 E 260 261 257 B 260 TInput/

    NEW_CODE OLD_CODESTRING/Output

    CHARACTER New table entry

    / / /W / W W 256 (= /W)E W E E 257 (= WE)D E D D 258 (= ED)

    256 D /W / 259 (= D/)E 256 E E 260 (= /WE)

    260 E /WE / 261 (= E/)261 260 E/ E 262 (= /WEE

    ReadOLD_CODE

    outputOLD_CODE

    WHILEtherearestillinputcharactersDO

    ReadNEW_CODE

    STRING=gettranslationofNEW_CODE

    257 261 WE W 263 (= E/W)B 257 B B 264 (= WEB)

    260 B /WE / 265 (= B/)T 260 T T 266 (= /WET)

    _

    outputSTRING

    CHARACTER=firstcharacterinSTRING

    addOLD_CODE+CHARACTERtothetranslationtable

    OLD_CODE=NEW_CODE

    ENDofWHILE

    Justlikethecompressionalgorithm,itaddsanewstringtothestringtableeachtimeitreadsinanewcode.Allitneedstodoinadditiontothatistranslateeachincomingcodeintoastringandsendittotheoutput.

    Outputcodevalue

    Astringofoutputcodevalueisgenerated,whichcanbeconvertedintotheinputstringusingthestringtablegeneratedduringcompression..Theoutputstringisidenticaltotheinputstringfromthecompressionalgorithm.

    OnereasonfortheefficiencyoftheLZWalgorithmisthatitdoesnotneedtopassthestringtabletothe

    decompressioncode.Thetablecanbebuiltexactlyasitwasduringcompression,usingtheinputstreamasdata.

    ThisispossiblebecausethecompressionalgorithmalwaysoutputstheSTRINGandCHARACTERcomponentsofa

    codebeforeitusesitintheoutputstream.Thismeansthatthecompresseddataisnotburdenedwithcarryinga

    largestringtranslationtable.

    24

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    13/27

    %Compressioncode

    Initiation:STRING=getinputcharacter

    WHILEtherearestillinputcharactersDO

    CHARACTER=getinputcharacter

    IFSTRING+CHARACTERisinthestringtablethen

    LZWcompression[OPTIONAL]

    InputString=/WED/WE/WEE/WEB/WET

    Character

    Input

    Code

    Output

    Newcode

    value

    New

    String

    /W / 256 /W

    E W 257 WE

    D E 258 ED

    / D 259 D/

    WE 256 260 /WE

    = c arac er

    ELSE

    outputthecodeforSTRING

    addSTRING+CHARACTERtothe

    stringtable

    STRING=CHARACTER

    ENDofIF

    ENDofWHILE

    outputthecodeforSTRING

    TheinputstringisashortlistofEnglishwordsseparatedbythe'/'character.

    WEE 260 262 /WEE

    /W 261 263 E/W

    EB 257 264 WEB

    / B 265 B/

    WET 260 266 /WET

    EOF T

    1. Readin/andWasthefirststringandcharacter.Thestring/Wisnotinthedefaultstringtable,generatea

    newcodevalue(256)forandaddittothestringtable.ThereferencestringisnowW.

    2. KeepreadinginEasthenewcharacter. Wisoutputasanexistingstring.ThenewstringWEisnewtothe

    stringtable,

    thus

    added

    in

    and

    assigned

    to

    a

    new

    code

    value

    (257).

    .The

    reference

    string

    is

    now

    E.

    3. WhenwereadW at asthenewcharacter.Itcombineswiththereferencestring/intoastring/Won

    thestringtableandacodevalue256isoutput.TheprogramreadsinthenextcharacterEandcombinesit

    withthereferencestring/Wtoformanewstring/WEwithanewcodevalue(260).

    4. Theprocesscontinuesuntilthestringisexhaustedandallofthecodeshavebeenoutputtoastringtable. 25

    Digitalvideoformat

    Adigitalvideoisgeneratedbythreadingaseriesofdigitalimagesintime.

    Differedbythealgorithmsforaudioandvideodatacompression:

    MPEG(MovieProfessionalExpertGroup)

    MPEG1,MPEG2(forbroadcastqualitytelevision),MPEG4

    AVI(AudioVideoInterleave)

    especiallydesignedforMSenvironment,developedupontheResourceInterchangeFileFormat(RIFF).

    ,coded/decodedbyaspecificCODEC.

    QuickTime

    MultimediaframeworkdevelopedbyApple.

    26

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    14/27

    Analysisofadigitalvideo

    ConverttheAVI,MPEG,..etcvideosintoasequenceofdigitalimages(grayscaleortruecolor).Analyzetheconsecutiveimagestoobtainthe

    . Becarefulabouttheconversionrate:

    Recrededat20fps

    1sec

    Convertedat

    10

    fps

    for

    1sec

    Convertedat3fpsfor1sec

    t=1/20sec

    t=1/10sec

    t=1/3sec 27

    Fundamentalsofimageanalysis

    Conversionbetweenimageformats

    Definethetargetedimagecomponents

    consecutiveimage

    frames.

    Theliquidmotioncanbeextrapolatedbythedisplacementoftheseedingparticles betweentwoframes

    Thevolumefractionofasolidliquidmixturescanbeestimatedbythetotalareaofthesolidobjects

    Developaneffectivealgorithmforthetaskbymanipulatingtheimages.

    Software:MATLAB,ImageJ,

    Byanalyzingthesequentialimages,thetransientphenomenacanbe

    extrapolated.Thus,

    the

    knowledge

    of

    time

    duration

    between

    consecutive

    imagesisessentialforarealtransientphenomenon.

    28

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    15/27

    Digitalimageacquisition

    Employadigitalcameratorecordatransientoradynamicphenomena.

    Theobtaineddigitalvideoistransformedintoasequenceofdigitalimages

    witha

    designated

    rate.

    Boththefilmingandexportframeratecombinetodeterminetheactual

    timedurationbetweenthetwoconsecutiveimages,whichinformationis

    importantinextrapolatingthetransientinformation.

    Thecamerafilmingratedetermineshowfasttheinformationoflight

    intensityisexportedfromaCCDsensor.Thus,astronglightsourceis

    requ re a g ramera e srequ re .

    29

    Digitalimageprocessingandanalysis

    Generallycontainsthreemajorcategories:

    (1)Image

    conversion

    changeofformats,compression(toreducetheamountmemoryneeded

    tostoreadigitalimage);

    (2)Imageenhancementandrestoration

    imagedefectscausedbydigitizationprocessorbythesystemsetupmay

    becorrectedorenhancedinthissteptoobtainanimageappropriatefor

    atermeasurements

    (3)Measurementextraction

    furthermanipulation

    may

    be

    needed

    to

    achieve

    the

    desired

    measurement

    30

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    16/27

    Imageprocessing

    Adigitalimage isacommonlystoredasaMxNx3(orx1)matrixof

    numbers,whichvaluecorrespondtothelightintensity(EMwave)ofthe

    object.

    Imageprocessing/editingisperformingmathematicaloperations on

    thesenumbersinordertoachievedesiredformatortoextrapolate

    informationfromthearraysofnumbers:

    Forexample,thefollowingalgorithmfollowsNTSCstandardto

    calculatetheluminanceofaRGBcolorimagestoredasP(M,N,3):

    I(m,n)=0.2989P(m,n,1)+0.587 P(m,n,2)+0.114P(m,n,3)

    R G B

    31

    Manipulation/Conversion

    Histogram:agraphicalrepresentationoftonal(grayscaleor

    luminosity

    luminosity)distribution

    of

    a

    digital

    image

    Bychangingthehistogram,image

    enhancementandmanipulationcan

    beachieved.

    R,G,B

    Bri htness mean luminosity of the image

    Threshold change a grayscale image into a BW (binary) image:

    For each pixelI >threshold, make it 1 (Black pixel)

    I

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    17/27

    Manipulation/dataextraction

    Edgedetection:onagrayscaleimage(imageluminositystoredinanarrayofnumbersbetween0and1),theimagelightgradientcanbe

    calculate(use

    the

    difference

    between

    the

    neighboring

    pixels)

    .Use

    the

    localmaximumofgradienttopresenttheedge.

    Different algorithms can be developed

    to outline the image.

    This class of approach requires

    (1) Gradient calculation (mathematical

    description, difference equation)

    (2) Criterion for the characteristic

    gradient of an edge33

    Sharpen/Bluralgorithmsusingthegradientfieldoftheoriginalgrayscaleimage

    Manipulation/dataextraction

    Watershed algorithm(Segmentationmethod)tosplitthewholeimageintosmallsegments

    Fill from the minimum (local or global) upto a specific level to reveal the boarderlines (which can be used to regeneratedthe watershed).

    Due to the shape homogeneity, equaldistance between the boardershapes can be applied as one extraalgorithm to separate the objects

    34

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    18/27

    example

    Enhancecontrast:bysubtractingan

    averagedbackground(2),whichisgenerated

    bydilating/smearingouttheoriginalimage(1) (2) FFT of (1)

    (1) (2) (3) Remove peaks (4) inverse FFT

    (3) (4)

    Removal the regular unwanted

    pattern with the help of FFT (fastFourier Transformation) thatreveals the underlying relation(distribution) of the number array.

    35

    Example1.

    Wedliketoanalyzethemotionofthetwospheresfromtherecordedvideo.

    Objective:Locatethespherepositionineachframe.

    Goal:By

    the

    displacement

    between

    two

    consecutive

    images,

    the

    sphere

    velocitycanbeestimatedwithagiven elapsedtime.

    Conert an AVI video into an image sequence at a specific frame rate.36

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    19/27

    Preparation:generateimagesequence,obtaint

    t

    Crop the image of interest. To savememory of your pc. 37

    Imageprocessing:

    Converttheimagetype:RGBtoGrayscale(intensity)tomanipulatetheimage

    x

    y

    + brightness + contrast

    into BW image:

    For each pixelI >threshold, make it 1 (Black pixel)

    I

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    20/27

    ImageProcessing (3)

    Method1:

    Usethepixelswith011or110neighborstolocatetheedge ofthe

    blackpixels.

    Thenusethecircumferentialpixelstolocatethespherecenter.

    (x1 , y1)

    (x , y)=??

    x

    (x2 , y2)

    (x3 , y3)

    Large deviation due to the thin line that defines the edge of the sphere39

    ImageProcessing (4)

    Method2: Fillholes:nowalltheblackpixelspresentthesolidspherewhilewhite

    y

    .

    Averageoutthecoordinates(xi,yi)ofalltheblackpixelswouldgiveanaveragedpositionforthesphere.

    (x , y)=??

    x(xi , yi)

    Due to the greater number of solid pixels, the estimated sphere center isless sensitive to the BW image manipulations.

    40

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    21/27

    Smalldefectduetounevennessofthelightintensity

    ImageProcessing (5)

    Dilatethenerodetheimages(Close)

    Erodethendilatetheimage(Open)

    Dilate 3 times (radially) to diminish the influences of thedefect on the averaged coordinate of the sphere (moreblack/less white pixels).

    41

    Concept:shapedetectioninparameterspace

    Line:

    ImageProcessing (6):Houghtransformation(2nd method)

    0 1 2 3 4 54

    6

    8

    10

    12

    14

    x

    y

    (1,6)

    (2,8)

    (3,10)

    (4,12)

    8

    10

    12

    14

    y

    y=2x+4

    0),( baxyyxf

    420 0.5 1 1.5 2 2.5 3

    0

    2

    4

    6

    8

    10

    12

    a

    b

    (2,4)

    0),( yaxbbaf0 1 2 3 4 5

    4

    6

    x

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    22/27

    0)()(),( 222 rbyaxyxf

    Circle

    0)()(),( 222 rybxabaf

    1)2()2(22 yx

    43

    Circle, used to locate a sphere center

    44

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    23/27

    Postanalysis (1)

    Afterweobtainthespherepositionintheconsecutiveimages,ostanal sis can be followed to obtain the var in velocit

    x

    y

    andtheaccelerationcomponents

    45

    Velocity: differentiation of the digitized position-time data

    To express : use

    PostAnalysis(2)

    df dx

    x

    y

    ' x h x

    212!

    0 0

    (3) 21 12! 3!

    0

    ( ) ( ) 1lim lim ( ) '( ) ''( ) ( )

    '( ) lim ''( ) ( )

    h h

    h

    df f x h f xf x f x h f x h f x

    dx h h

    f x f x h f x h

    appx

    hus

    ' ( ) ( )Error ( ) '( ) '( ) ( ) . . .app

    f x h f xf x f x f x o h H O T

    h

    Forward-difference scheme

    46

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    24/27

    Postanalysis(3): Finitedifferenceequation

    ( ) ( )df f x h f xo h

    To express first order differential equation

    ( ) ( )

    ( )

    dx hdf f x f x h

    o hdx h

    Central difference

    Backward difference

    More accurate21 ( )

    2 F B

    df df df o h

    dx dx dx

    0

    0

    212!

    2102!

    1 1 ( ) ( ) ( ) ( )lim

    2 2

    1lim ( ) ( )

    2

    ( ) '( ) ''( )1lim

    2 ( ) '( ) ''( )

    hC F B

    h

    h

    df df df f x h f x f x f x h

    dx dx dx h h

    f x h f x hh

    f x f x h f x h

    h f x f x h f x h

    47

    Post-analysis (4)

    x

    y

    Velocity, if taking forward difference scheme:

    Toobtaintheactualvelocity,needconversionbetweenthedigitalandtheactualsizesandtimeduration:

    (1) Length:measurehowmanypixelscorrespondtoaspherediameter(flowcharacteristiclen thscalethatiseas tomeasure

    (pixel/frame)( )i N ii

    xuN

    N: Number of elapsed frames

    (2) Time:byknowtheactualtimedurationbetweentwoprocessedimages(Nofelapsedframes/recordingframerate)

    1 5

    2

    (

    7

    ) ?i ii

    mm ms

    pixels n frame

    x x

    t su

    (mm/s)

    48

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    25/27

    Errorestimation

    Sincethetimedifferencebetweeneachframeispreciselyset(viadigitalcameraandtheconversionsoftware),themain

    sourceo

    error

    n

    e erm n ng

    e

    sp ere

    ve oc y

    comes

    rom

    theimageanalysis! Thisiswhyweneedtobecarefulaboutimagemanipulations.

    Repeatseveralmeasurements,thenanaveragedvelocityprofilewillbeobtained.Thestandarddeviationoftheresiduesofeachmeasurementfromthemeanvaluecanbe

    .

    Ifa

    line

    is

    fitted

    to

    the

    empirical

    data,

    then

    a

    fitting

    deviation

    canbecalculatedlikewise.

    49

    ErrorEstimation

    Assume we want to measure a quantity that requires two actualmeasurements on x, y, andz from the experiment.

    ( , , )F x y z

    F x z , , .A general error estimation can be obtained as the following.

    Denote the uncertainty in the measuredx, y, andz by .

    The overall uncertainty in F is thus:

    , , andx y z

    22 2

    2

    , ,,y z x yx z

    F F FdF x y z

    x y z

    Normalizing the uncertainty with the measured value ofFgives thegeneralized error estimation

    2

    2 dFE

    F

    50

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    26/27

    ErrorEstimation example

    2 1U U

    Assume that we want to calculate the coefficient of restitution for a

    collision between two solid spheres, defined as

    1 2 1 2, , , andV V U U

    2 1V V

    2 2 2 2

    where are the velocities of each sphere before and after

    the collision measured in the experiment.

    From the previous formula, the error would be

    2

    2 deE

    e

    2

    2 1 2 1

    2 1 2 1

    e e e ede U U V V

    U U V V

    2 2 2 222 1 2 1

    2 22

    2 1 2 1

    + +

    U U V V deE

    e U U V V

    ????

    51

    ErrorEstimation example

    For example, we can track the sphere motion in time, which gives the

    following plot:

    We can fit a line through 4 position data points and use the slope for the

    sphere velocity.

    1U 2U1V 2V

    2

    2 _predicted 2 _measured12

    ( )N

    i iiy y t

    UN

    the standard deviation of line-fitting.

    52

  • 8/3/2019 2011 Spring Lecture(1)_Digial Imaging_FLY

    27/27

    Example2.

    PIVmeasurementofthemotionofaninjectedvortexring

    C. Morales, Mexico Univ.

    camera

    L/D=2 L/D=4 53