Está en la página 1de 10

CameraRequirementsForPrecisionAgriculture

RadiometricanalysissuchasNDVIrequirescarefulacquisitionandhandlingoftheimagerytoprovidereliablevalues.Inthisguide,weexplain
howPix4Dmapperhandlestheimagesaswellaswhataretherequirementsforaccurateandreliableradiometricmapping.

Introduction

Thegoalweareconsideringisaquantitativeanalysisofplantpropertiesusingremotesensingwithdigitalimages.Thequantityofinterestisthe
reflectanceoftheplantsfordifferentwavelengths,sincethewavelengthresolvedreflectancepropertiescontainalotofinformationaboutthe
plants.Forexample,chlorophyllabsorbsredlight(makingplantslookgreen)andreflectsinfrared,sothedifferencebetweenredandinfrared,
suchascomputedbytheNDVI,tellsussomethingaboutthechlorophyllcontent.

The
reflectance
iswhatisrequiredtoperformindexcalculationsuchasNDVI,butthecameraoutputsonlyimages.However,ifonecanestimate
theinfluenceofthe
illumination
aswellasthe
sensor
,thisimagecanbetransformedinagoodestimationofthereflectance:

Reflectance=Image/(Sensor*Illumination)

Illumination

Thespectralsignatureoftheillumination
Thesundoesnotemitthesameamountofradiationinallwavelengths.Therelativepowerofdifferentwavelengthscanvarydependingon
clouds,geometry,andshadowoftheplantsamongothers.Thiscanbeestimatedusingaradiometriccalibrationtarget.
Thetotalpoweroftheirradiance
Thetotalamountofirradiancecanchangeduetochangingconditionssuchasmovingclouds.Theamountofirradiancecanbemeasured
usinganupwardlookingsensor.ThisisimportanttogetabsolutereflectancevaluesbutisnotveryimportantforNDVIcomputation.

Sensor

Opticalvignetting
Duetothelenseandsensorgeometry,notallpartsofthesensorreceivethesameamountoflight.Thisismostlyvisibleinthecornersof
theimage.Tocompensatethiseffectitispossibletoapplyavignettingcorrection.
Darkcurrent
SolidstatesensorssuchasCMOSorCCDsarecontaminatedwithnoisecausedbythermalstimulationofelectronswhichiscalleddark
current.Tocompensatethiseffectitispossibletosubtractadarkframe.Thedarkcurrentstronglydependsontemperature.
Spectraloverlap
Singlelensecamerassuchasthemodifiedfiltercamerasnormallyhavespectraloverlap:thedifferentbandsareoverlapping.Forexample,
theinfrarediscontaminatedwithabitofblue.Toreducethiseffectitispossibletoapplyaspecificcolormatrix.
Sensorsensitivity
Thesensordoesnotusuallycapturethedifferentwavelengthswiththesamesensitivity.Forexample,aCCDismuchmoresensitiveto
greenthanitistoinfrared.Aradiometrictargetcanbeusedtocomputeandcompensateforthiseffect.
Linearlyencodedvalues
Thehumaneyeperceivesbrightnessinanonlinearway.Thereforemostconsumercamerassavetheirimagesusingagamma
correction.Howevertoperformradiometriccomputation,thevaluesshouldbeencodedlinearly.ThisisusuallyonlydoneinRawandTiff
images.
ISO/aperture/exposuretime
Camerasneedtocontinuouslyadjustsettingstoadaptforthedifferenceofbrightnessineachimage.Adarkerimagedoesntnecessarily
meanthatithaslesslight,itmightbethattheexposuretimewasshorter.Ifacquiredimagesarelinearwithrespecttothesensordata
(suchasinRawandTiffimages),itispossibletoaccuratelycombineimageswithdifferentISO/aperture/exposuretimesettingsby
correctingfortherespectiveeffects.

Thislistisstillasimplifiedapproximation.Foracompletecharacterisation,onewouldneedtolookatthebidirectionalreflectancedistribution
function(BRDF).However,theintegratedreflectance(withoutconsideringtheangulardependency)alreadygivessomeusefulinformation.

Inpractice,thereareusuallytwotypesofcamerathatareusedtoperformradiometricanalysissuchasNDVI:
A. Standarddigitalconsumercamerawithamodifiedfilter
Thesecameraswerenotdesignedforradiometricfidelity,especiallywhenusingtheJPGoutput.However,withcarefulhandlingofthe
Rawfilesasdescribedbelow,theycanbeusedasameasurementdevice.Thereareusuallytwowaysofmodifyingthefiltersthateither
provideinfraredorrededgeinsteadofoneoftheotherbands.However,themeasurementisusuallybroadband,meaningthatthe
bandsusuallycoveraratherlargespectrumandoftenoverlapabit.Thechoiceofspecificfiltersdependsentirelyonwhatyouaretryingto
measureandwhatindexyoutrytocompute,anddoesnotinfluencetheprocessing.
Note:WeusuallyrecommendtoconverttheRawimagerytoTiffformat.However,itisalsopossibletoconverttheRawtoJPGinaway
thatdoesnotdistortthedataandwhere99%oftheinformationispreservedwhilereducingthesizeondiskoftheimages,whichcanbe
essentialifthefilesneedtobetransferredthroughanetworkwithlimitedbandwidth.Thisisexplainedattheendofthisguide.

B. Specificmultispectralcamera(AirinovmultiSPEC4C,MicaSenseRedEdge,Tetracam,)
Thesecamerasaredesignedforradiometricfidelityandthemanufacturerusuallyprovidesthetoolstocorrectlyproduceaccurateresults.
Thecamerasthathaveasinglesensorareusuallybroadbandandverysimilartothecategoryabove.Thecamerasthatcomewith
multiplesensorsareusuallynarrowbandandthisusuallyallowstocomputemoreindicesfromasingleflightandalsogivesaccesstoan
extendedsetofindices.

Steps

Filter
modified
camera

Beforetakingimages:
settosaveRawimages
keepIsoandaperture
constant
Beforeeachflight,take
apictureofaradiometric
target

ConvertRawtoTiff
keeplinearvalues
keepwhitebalanceneutral
saveas16bitTiff
Inadditionperformcorrection
for
vignetting
darkcurrent

ImportTiffinPix4Dmapper

Performradiometriccalibrationusingthe
pictureofthetargetanditsknownalbedo
values.

Multi
spectral
cameras

Beforetakingimages:
Beforeeachflight,take
pictureofaradiometric
target
Makesuretofollow
cameraspecific
guidelines

Mostcorrectionapplied
automaticallytotheimagesby
thecamerafirmwareor
postprocessingsoftware
Checkwithmanufacturerif
manualstepsarerequired(for
example,vignettingcorrection
forTetracam)

ImportTiffinPix4Dmapper

Performradiometriccalibrationusingatarget
onlyifnotalreadydoneinthepreviousstep
bythefirmwareorpostprocessingsoftware

Any
images

Pix4Dmapperreadsimages
ifdarkcurrentinformationisinExif,
performsdarkcurrentcorrection
ifvignettingmodelinfoisinExif,performs
vignettingcorrection
ifspectraloverlapmatrixisavailableinExif,
performsunmixing
ifISO/aperture/exposureinformationisinthe
Exifandtheimageisnotdeemedalready
processed(e.g.jpegsfromcamerafirmware),
performsbrightnessadjustment
ifsunirradiationisinExif,doesillumination
correctionperimage
ifcalibrationtargetwidgetused,performs
balancingofthedifferentbandsto
compensateforsunillumination
ifsensorsensitivityisinExif,performs
sensoradjustmentperband(whichis
overriddenifusingcalibrationtargetwidget)

Aftergeometrical
calibration,multiple
valuesaregatheredto
producethereflectance
map.

Valuesinthecenterof
eachimagearegiven
moreimportance.
Valuestheclosestand
themostperpendicular
totheterrainaregiven
moreimportance.

Eachreflectance
goesthroughauser
providedformula.In
caseofNDVI,each
pixelfromtheindex
mapwillbecomputed
asaratioof
subtractionsand
additionsofthe
infraredandred
bands.

Statisticsoftheindexmapare
computedandtheindexvalues
aresplitinauserdefinednumber
ofclasses(5bydefault)usinga
userdefinedalgorithm(equalarea
bydefault)

Theindexmapisthen
subsampled(6metersbydefault)
andpixelsofthesameclassare
groupedtogether.Thesepolygons
arethensavedinavectorialSHP
filetogetherwithuserprovided
commentsandrate.

Step1

Itisrecommendedtotakeapictureofaradiometriccalibrationtargetwithknownreflectancevalueforeachbandofthecamerajustbeforethe
flight.Theradiometriccalibrationtargetshouldreflectthelightequallyineverydirectionandisoftenmadefromteflonmaterial.Thereflectance
valuesareusuallyprovidedalongwiththetargetbythemanufacturerandcanbeenteredinPix4Dmapper.Thesetargetscanbeboughtinmost
photographicequipmentshopsandallowtoperformtheestimationoftheilluminationcoloringtoremoveitseffect.Failingtoestimatelightcolor
biasmayresultindistortedNDVIvaluesespeciallyifitisovercastorearlymorning/evening.

ItisalsorecommendedtokeeptheISOandaperturesettingsofthecameraconstant,onlyusingtheexposuretimetocompensatefordifferent
illuminationwhilecapturingtheimages.

AlthoughPix4Dmapperisabletocorrectforthejointeffectofthese3values,ingeneralitismoreaccuratetocompensatetheexposuredifference
thanthetwootherparameters.

F
orfiltermodifiedconsumercameras,itisimperativenottousetheJPGproducedbythecamera.Thevalueshavebeenheavilydistortedtobe
visuallyappealingandthisprocessisnotreversible.SuchanimagewillleadtoheavilystretchedanddistortedNDVI.However,theRawimages
(inwhateverformat,.raw,.dng,...)dopreservetheradiometriclinearityandshouldbeusedinsteadofJPG.

Step2

BeforefeedingtheimagestoPix4Dmapper,theimageshavetogothroughsomecorrectionsthatarenecessaryforaccurateresults.

Themostessentialcorrectionsarevignettinganddarkcurrent.

Howtocomputeopticalvignetting?
Opticalvignettingistheeffectthatusuallydarkenstheborderandcornersoftheimage.Itisnotthesameasgeometricallensdistortionthatbends
straightlines,andthegeometricaleffectdoesnotneedtobecorrectedinadvanceasPix4Dmapperautomaticallycorrectsit.Themodelisusually
expressedasapolynomial.Theequipmentrequiredtocomputeitisaperfectlywhitesurfacethatreflectslightevenlyinalldirectionsaswellasa
homogenouslighting.ManysoftwarepackagessuchasAdobeLensetoolorLensfuncancomputethevignettingmodel.Toapplythismodelwe
recommendusingUFRawasdescribedbelow.

Howtocomputedarkcurrent?
Darkcurrentisaneffectthathappensinmostsensorsandaddsapatternonthesensor.Awaytomodelthiseffectistotakeanentirelydark
image(bycoveringthelens)andtosubtractthisimagetoallsubsequentimages.ToapplythismodelwerecommendusingUFRawasdescribed
below.

Inaddition,theoutputvaluesneedtobelinearlyencoded,thewhitebalanceshouldbeneutralandidenticalforallimages,andimagesshouldbe
savedin16bitdepthtoavoidclipping.

Whenusingadedicatedmultispectralcamera,thesecorrectionsareusuallyperformedbythefirmwareorbyadedicatedpostprocessing
software.Checkwithyourcameramanufacturertogetmoredetails.

Whenusingafiltermodifiedcamera,thesecorrectionareusuallynotappliedtotheRawimages.Werecommendtouseasoftwaresuchas
UFRawtoproperlyproduceTiffoutputsfromtheRawimages.
1. OpenUFRaw
2. SelectManualWB
a. SeteachChan.multipliersto1.000
b. Optionallyaddadarkframetoremovedarkcurrent
3. (Optional)Underlenscorrection,enableOpticalvignetting.Select6thorderpolynomialmodelandapplythevaluesthatyoumighthave
computedusing
http://lensfun.sourceforge.net/calibrationtutorial/lensvignetting.html
4. Undercolormanagement,setgammato1,linearityto1,outputintentanddisplayintenttoAbsolutecolorimetric,andtheoutputbitdepth
to16.
5. FinallysavethetheimageasaTiffandmakesuretoembedtheExifintheoutput.

Step3

Whenreadingtheimages,Pix4Dmappercanperformadditionalcomputations:

1)IfthedarkcurrentisavailableintheExif,itiscorrected(Xmp.Camera.BlackCurrent,orExif.Image.BlackLeveland
Exif.Image.BlackLevelRepeatDim)

2)IfavignettingmodelisavailableintheExif,itisapplied.Therearetwovignettingmodelsavailable:
2Dpolynomial:
N

v = c ij
i,j=0

( ) ( )
x
w

y
h

withpixelcoordinates(x,y)andimagewidthwandheighth.Exiftags:Xmp.Camera.VignettingPolynomial2DNameand
Xmp.Camera.VignettingPolynomial2D.
Radiallysymmetricpolynomial:
N

v = 1 + c i r i with r =
i=1

(x c ) + (y c )
x

andcentrepointcx,cy.Exiftags:Xmp.Camera.VignettingPolynomialandXmp.Camera.VignettingCenter.

3)IftheISO/aperture/exposureareavailableintheExifandtheimageisinTiffformat,thenPix4Dmapperwillcorrectlycompensateforthe
differenceinbrightnessoftheimages:
2

p = p kK
withISO K ,aperturefnumber k ,andexposuretime .TheExiftagsreadbyPix4Dmapperare:
Exif.Photo.ISOSpeedRatings
Exif.Photo.FNumber
Exif.Photo.ExposureTime

4)IfthesensorbandsensitivityisavailableintheExif,Pix4Dmapperperformssensoradjustmentperband(overriddenifusingcalibrationtarget
widget).TheExiftagis
Xmp.Camera.BandSensitivity

Howtocomputethesensorbandsensitivity?
Thesensitivityofthebandsofthesensorismodeledasanumber(perband)thatwillmultiplythisspecificvalue.Theequipmentrequiredto
computethesensitivityisaradiometriccalibrationtarget,aswellasacontrolledlightwithknownilluminationproperties.Therelativeband
sensitivityisthentheimagedividedbytheilluminationandthetargetreflectance.
Notethatthisvalueisoverriddenifacalibrationtargetisusedintheworkflow.

5)IfacolorcorrectionmatrixisavailableintheExifasXmp.Camera.ColorTransform,spectraloverlapiscorrected.

Howtocomputespectraloverlapmodel?
Computingthevaluesofthismatrixisnotatrivialtaskandrequiresaspectrometer.Speciallaboratoriescanprovidesuchservices.Themodelisa
3x3colormatrix.

6)Ifthereisanupwardlookingirradiationsensorduringtheflight,andifthisinformationisstoredintheExif,thenPix4Dmapperwilladjusteach
imageforthechangeoflight,aswellasprovideabsolutereflectancevalues.ThetagreadisXmp.Camera.Irradiance.

7)
Ifthecalibrationtargetwidgetused,Pix4Dmapperperformsbalancingofthedifferentbandstocompensateforsunillumination.

Step4
Aftergeometricalcalibration,multiplevaluesaregatheredtoproducethereflectancemap.Valuesonthecenterofeachimagesaregivenmore
importance.Valuescloserandthemoreperpendiculartotheterrainaregivenmoreimportance.

Step5
Eachreflectancegoesthroughauserprovidedformula.InthecaseofNDVI,eachpixelfromtheindexmapwillbecomputedasaratioof
subtractionsandadditionsoftheinfraredandredbands.

Step6
Statisticsoftheindexmaparecomputedandtheindexvaluesaresplitinauserdefinednumberofclasses(5bydefault)usingauserdefined
algorithm(equalareabydefault)

Theindexmapisthensubsampled(6metersbydefault)andpixelsofthesameclassaregroupedtogether.Thesepolygonsarethensavedina
vectorialSHPfiletogetherwithuserprovidedcommentsandrate.

Thefollowingtableindicateswhichcorrectionsaremadetotheimages.Forexample,Pix4Dmapperappliesdarkcurrentcorrectionforthe
MicasenseRedEdgesincethecamerawritestheappropriatetagintheEXIF.Pix4DmapperdoesnotapplydarkcurrentcorrectiontoTetracam
imagessincethiscorrectionisdonebythefirmware.

multiSPEC4C

MicaSense

Tetracam

Exposurecorrection

yes,putsvaluesinExif

yes,putsvaluesinExif

yes,PW2putsvaluesinExif

Vignetting

yes,putsvaluesinExif

yes,putsvaluesinExif

manuallythroughPW2

Darkcurrent

yes,putsvaluesinExif

yes,putsvaluesinExif

yesbyfirmware

Spectraloverlap

Narrowband,notrequired

Narrowband,notrequired

MCA:Narrowband,notrequired
ADC:Broadband

Sensorsensitivity

yes,putsvaluesinExif

yes,putsvaluesinExif

yesthroughPW2

Linearlyencodedvalues

yes

yes

yes

Irradianceamount

yes,putsvaluesinExif

no

yes,optional

HowtoconvertRawtoJPGsinaproperwayforradiometryfidelityinPix4Dmapper?
Ifyoureallyneedsmallfiles,forexamplefortransferringvialimitedbandwidthconnections,usingJPGfilesisoftennecessary.SinceJPGfilesonly
support8bit,youneedtoapplyagammafactortopreservethedynamicrange:
p = 255

1/

( )
p

ItisimportantthatthistransformberevertedbyPix4Dmapperbeforeusingthedatainordertokeeplinearvaluesitisonlyusedtocompressthe
data(incontrasttowhatconsumercamerasdoinordertohaveopticallyappealingimages).Therefore,youneedtosavetheapplied
transformationparametersinspecialExiftags.Useafixedgamma(e.g.2.2)forallimagesandchannelsandofcourseafixedwhitebalancefor
allimages(e.g.D65).Calculate and suchthataround0.5%ofthepixelsare0and255,respectively.Save , , foreachchannelintheExif

tagsXmp.Camera.TransformAlpha,Xmp.Camera.TransformBeta,andXmp.Camera.TransformGamma,respectively.
Then,instep3,beforedoinganythingelse,Pix4Dmapperwillrevertthegammatransformusingtheparametersprovidedandtransformvalues
backtolinear.

También podría gustarte