Obnova obrazu

Image Processing in Python

Rebeca Gonzalez

Data Engineer

Obnova obrazu

Image Processing in Python

Rekonstrukce obrazu

  • Oprava poškozených obrazů
  • Odstranění textu
  • Odstranění loga
  • Odstranění objektů

Image Processing in Python

Rekonstrukce obrazu

Inpainting
  • Rekonstrukce ztracených částí obrazu
  • Analýza nepoškozených oblastí

Image Processing in Python

Rekonstrukce obrazu

Image Processing in Python

Rekonstrukce obrazu v scikit-image

from skimage.restoration import inpaint

# Obtain the mask mask = get_mask(defect_image)
# Apply inpainting to the damaged image using the mask restored_image = inpaint.inpaint_biharmonic(defect_image, mask, multichannel=True)
# Show the resulting image show_image(restored_image)
Image Processing in Python

Rekonstrukce obrazu v scikit-image

# Show the defect and resulting images
show_image(defect_image, 'Image to restore')
show_image(restored_image, 'Image restored')

Image Processing in Python

Masky

Image Processing in Python

Masky

def get_mask(image):
    ''' Creates mask with three defect regions '''
    mask = np.zeros(image.shape[:-1])

    mask[101:106, 0:240] = 1

    mask[152:154, 0:60] = 1
    mask[153:155, 60:100] = 1
    mask[154:156, 100:120] = 1
    mask[155:156, 120:140] = 1

    mask[212:217, 0:150] = 1
    mask[217:222, 150:256] = 1
    return mask
Image Processing in Python

Pojďme si procvičit!

Image Processing in Python

Preparing Video For Download...