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
OpenCV 4 Computer Vision Application Programming Cookbook, by D. M. Escrivá, R. Laganiere, Fourth Edition, Packt Publishing, 2019. [Book URL] [GitHub]
OpenCV online documentation
Image Filtering module: blur(), GaussianBlur(), medianBlur(), filter2D(), Laplacian(), Sobel() functions
Feature Detection module: Canny() function
Tutorial: OpenCV tutorial on Canny edge detector
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 Microsoft Teams.