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

2
Processamento Digital de Imagem (Python) Fernando Soares ([email protected]) 1 AULA PRÁTICA 5. PRACTICAL CLASS 5 1. OPERAÇÕES MORFOLÓGICAS ELEMENTARES. ELEMENTAR MORPHOLOGICAL OPERATIONS. 1.1. Sobre a imagem marilyn.tif, executar as operações de erosão, dilatação, abertura e fecho. On the image marilyn.tif, perform the operations of erosion, dilation, opening and closing. 1.2. Determinar a imagem do gradiente morfológico. Determine the morphological gradient image. Exemplo da erosão. Erosion example. 2. RECONSTRUÇÃO GEODÉSICA NUMÉRICA. NUMERIC GEODESIC RECONSTRUCTION. 2.1. Aplicar a reconstrução geodésica às imagens (f 1 ) ik01.tif,(f 2 ) grains.tif,e(f 3 ) marilyn.tif. Para tal, construír as imagens marcadoras, respectivamente, (h 1 ), (h 2 )e(h 3 ), considerando X 1 = {(79, 110)}, X 2 = {(35, 68)} e X 3 = {(113, 170)}. Apply the geodesic reconstruction to the images (f 1 ) ik01.tif, (f 2 ) grains.tif, and (f 3 ) marilyn.tif. To do this, build the marker images respectively (h 1 ), (h 2 ) and (h 3 ), considering X 1 = {(79, 110)}, X 2 = {(35, 68)} and X 3 = {(139, 113)}. , = , , , , = 0, 2.2. Aplicar a reconstrução geodésica dual às mesmas imagens de 2.1, considerando X 1 = {(68, 111)}, X 2 = {(120, 216)} e X 3 = {(109, 183)}. Apply the dual geodesic reconstruction to the same images of 2.1, considering X 1 = {(68, 111)}, X 2 = {(120, 216)} e X 3 = {(109, 183)}.

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

Page 1: 1. OPERAÇÕES MORFOLÓGICAS ELEMENTARES. …...Processamento Digital de Imagem (Python) Fernando Soares (fjsoares@fc.ul.pt) 1 AULA PRÁTICA 5. PRACTICAL CLASS 5 1. OPERAÇÕES MORFOLÓGICAS

Processamento Digital de Imagem (Python) Fernando Soares ([email protected])

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)}.

Page 2: 1. OPERAÇÕES MORFOLÓGICAS ELEMENTARES. …...Processamento Digital de Imagem (Python) Fernando Soares (fjsoares@fc.ul.pt) 1 AULA PRÁTICA 5. PRACTICAL CLASS 5 1. OPERAÇÕES MORFOLÓGICAS

Processamento Digital de Imagem (Python) Fernando Soares ([email protected])

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.