Aan de slagBegin gratis

Filter convolutions

Filters are an essential tool in image processing. They allow you to transform images based on intensity values surrounding a pixel, rather than globally.

2D array convolution. By Michael Plotke [CC BY-SA 3.0  (https://creativecommons.org/licenses/by-sa/3.0)], from Wikimedia Commons

For this exercise, smooth the foot radiograph. First, specify the weights to be used. (These are called "footprints" and "kernels" as well.) Then, convolve the filter with im and plot the result.

Deze oefening maakt deel uit van de cursus

Biomedical Image Analysis in Python

Bekijk cursus

Interactieve oefening met praktijkervaring

Probeer deze oefening door deze voorbeeldcode aan te vullen.

# Set filter weights
weights = [[0.11, 0.11, ____],
           [0.11, ____, 0.11], 
           ____]
Code bewerken en uitvoeren