1. OPERAÇÕES MORFOLÓGICAS ELEMENTARES. …...Processamento Digital de Imagem (Python) Fernando...

Post on 14-Jul-2020

5 views 0 download

Transcript of 1. OPERAÇÕES MORFOLÓGICAS ELEMENTARES. …...Processamento Digital de Imagem (Python) Fernando...

Processamento Digital de Imagem (Python) Fernando Soares (fjsoares@fc.ul.pt)

1

AULAPRÁTICA5.PRACTICALCLASS51. OPERAÇÕESMORFOLÓGICASELEMENTARES.ELEMENTARMORPHOLOGICALOPERATIONS.

1.1. Sobre a imagemmarilyn.tif, executar as operações de erosão, dilatação, abertura e fecho.On theimagemarilyn.tif,performtheoperationsoferosion,dilation,openingandclosing.1.2. Determinaraimagemdogradientemorfológico.Determinethemorphologicalgradientimage.

• Exemplodaerosão.Erosionexample.

2.RECONSTRUÇÃOGEODÉSICANUMÉRICA.NUMERICGEODESICRECONSTRUCTION.

2.1. Aplicar a reconstrução geodésica às imagens (f1) ik01.tif, (f2) grains.tif, e (f3)marilyn.tif. Para tal,construír as imagensmarcadoras, respectivamente, (h1), (h2) e (h3), considerandoX1 = {(79,110)},X2 = {(35,68)} eX3 = {(113, 170)}.Apply the geodesic reconstruction to the images (f1) ik01.tif, (f2)grains.tif, and (f3)marilyn.tif.Todothis,buildthemarkerimagesrespectively(h1),(h2)and(h3),consideringX1={(79,110)},X2={(35,68)}andX3={(139,113)}.

ℎ 𝑥, 𝑦 = 𝑓 𝑥, 𝑦 , 𝑖𝑓 𝑥, 𝑦 ∈ 𝑋

ℎ 𝑥, 𝑦 = 0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

2.2. Aplicarareconstruçãogeodésicadualàsmesmasimagensde2.1,considerandoX1={(68,111)},X2={(120,216)}eX3={(109,183)}.Applythedualgeodesicreconstructiontothesameimagesof2.1,consideringX1={(68,111)},X2={(120,216)}eX3={(109,183)}.

Processamento Digital de Imagem (Python) Fernando Soares (fjsoares@fc.ul.pt)

2

ℎ 𝑥, 𝑦 = 𝑓 𝑥, 𝑦 , 𝑖𝑓 𝑥, 𝑦 ∈ 𝑋

ℎ 𝑥, 𝑦 = 255, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

2.3. Determinar as imagens dos mínimos e máximos regionais de uma das imagens f da alínea 2.1.Determinetheimagesoftheregionalminimumandmaximumofoneoftheimagesfof2.1.3. TRANSFORMAÇÃOWATERSHED.WATERSHEDTRANSFORMATION.

3.1. Determinar os mínimos regionais da imagem marilyn.tif (I) e do seu gradiente morfológico (G).Determinetheregionalminimaoftheimagemarilyn.tif(I)andofthemorphologicalgradient(G).

3.2. Executar a transformação watershed de I e G, com os respectivos mínimos regionais comomarcadores.Visualizarecompararambasasimagensdasbaciasdeescoamento,representadascomosvaloresdos pixels da imagem inicial I.Perform the I and Gwatershed transformation, with the respective regionalminimaasmarkers.Displayandcomparebothcatchmentbasins images,shownwiththepixelsvaluesoftheinitialimageI.