Programming Homework

HWP3: Image Filtering

and Edge Detection

Goal: Image filters and edge detectors

    • Remove noise by blurring filters: Gaussian, mean and median filters.
    • Detect edges by directional filters: sobel and laplacian files.
    • Detect edges by Canny detector

Readings and sample codes

Programming

    • Write three program codes: denoise.cpp, edge_detection_filter.cpp, and canny_detector.cpp.
    • denoise.cpp: write a program code to run Gaussian, Mean, and Median filters for one image.
      • Follow the explanation in this PDF. Remember that you have to change kernel size and compare the blurring results among filters and among kernel sizes.
      • Then you have to add salt-and-pepper noise and run the three filters again. You have to change kernel size and compare the denoise results among filters and among kernel sizes.
    • edge_detection.cpp: write a program code to run Sobel and Laplacian filters
      • Follow the explanation in this PDF. Remember that you have to use an image to run both Sobel and Laplacian filters. Compare the results of edge images.
    • canny_detector.cpp: write a program code to run the Canny edge detector by OpenCV.

Web Report

    • Create a web page with descriptions, explanation and pictures for your programs.
    • Requirements of the report page:
      • For each program code, you have to write 4 parts: (1) goal of this code, (2) theory and principle of the code, (3) code segment explanation, and (4) result comparison or analysis.
      • Use your image to run your programs.
      • Change parameters of algorithm's functions to get different result images.
      • Compare and discuss the result images, and explain why the change of parameters can produce different results.
    • Submit your web address by Google Classroom.