Assignment number 2 in Computer Vision & Image Proccessing course. All tasks and functions were written in the ex2_utils.py file and they were all tested in the ex2_main.py file.
Using Python and the OpenCV library, implementation of:
- Convolution
- Image derivatives
- Image Blurring
- Edge detection via LoG zero-crossing
- Hough Circles
- Bilateral filter
Calculate gradient of an image. An image derivative - gradient - is defined as the change in the pixel value of an image.
Image blurring is achieved by convolving the image with a low-pass filter kernel. It is useful for removing noise. It actually removes high frequency content (eg: noise, edges) from the image. So edges are blurred a little bit in this operation (there are also blurring techniques which don't blur the edges). Here we are blurring an image using a Gaussian kernel, my implementation.
In edge detection, we find the boundaries or edges of objects in an image, by determining where the brightness of the image changes dramatically. Edge detection can be used to extract the structure of objects in an image. If we are interested in the number, size, shape, or relative location of objects in an image, edge detection allows us to focus on the parts of the image most helpful, while ignoring parts of the image that will not help us. Detecting edges using "ZeroCrossingLOG" method - Zero-Crossing Detector Using the Laplacian of Gaussian (LoG) Filter
The circle Hough Transform (CHT) is a basic feature extraction technique used in digital image processing for detecting circles in imperfect images. The circle candidates are produced by “voting” in the Hough parameter space and then selecting local maxima in an accumulator matrix. Find Circles in an image using a Hough Transform algorithm extension.
Original | Output | Original | Output |
---|---|---|---|
Time[Mine]: 43.060 sec [CV]: 0.051 sec | Time[Mine]: 0.664 sec [CV]: 0.004 sec | ||
Time[Mine]: 1.766 sec [CV]: 0.005 sec | [Mine]: 2.415 sec [CV]: 0.001 sec | ||
[Mine]: 3.333 sec [CV]: 0.006 sec |