Skip to content

HW1: Experimenting with Gaussian kernel affects further results #108

@aiphae

Description

@aiphae

In Part 3: Canny Edge Detector, it is necessary to implement gaussian_kernel, and then it says:

# Test with different kernel_size and sigma <--------------
kernel_size = 5
sigma = 1.4

# Load image
img = io.imread('iguana.png', as_gray=True)

# Define 5x5 Gaussian kernel with std = sigma
kernel = gaussian_kernel(kernel_size, sigma)

# Convolve image with kernel to achieve a smoothed effect
smoothed = conv(img, kernel) <-------------- Shouldn't be used later!

...

However, the smoothed image is then used later throughout the non-maximum supression part. And experimenting (as said!) with kernel size and sigma values causes false inconsistencies between own algorithm and the reference iguana_non_max_suppressed.npy.

Proposed change:
Define the Gaussian kernel and produce a smoothed image AGAIN before testing the non-maximum supression algorithm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions