Image filtering + Hybrid image

Posted 2015.04.22 16:06

Goal

Implement your own code for image filtering, my_imfilter() in MATLAB or C++ (You will get extra credit if you use C++). It must (1) support grayscale and color images (2) support arbitrary shaped filters, as long as both dimensions are odd (e.g. 7x9 filters but not 4x5 filters) (3) pad the input image with zeros or reflected image content and (4) return a filtered image which is the same resolution as the input image. Test your program on the provided images.

Forbidden MATAB functions which you cannot use in your final code: imfilter(), filter2(), conv2(), nlfilter(), colfilt().


1.1. Image filtering

simple image filtering using 'my_imfilter'

더보기

Result

Image filtering [../../images/bike/bicycle.bmp] LOADED. 

Evaluating filtering...finished. 2e+00 sec 


1.2. Hybrid image

Generate hybrid image

더보기

Result

Hybrid image [../../images/bike/bicycle.bmp] + [../../images/bike/motorcycle.bmp] ARE LOADED. 

Evaluating filtering...finished. 3e+00 sec 


1.3 Frequency analysis

For your favorite result, you should also illustrate the process through frequency analysis. Show the log magnitude of the Fourier transform of the two input images, the filtered images, and the hybrid image. In MATLAB, you can compute and display the 2D Fourier transform with: imagesc(log(abs(fftshift(fft2(gray_image)))))


2.1 Zero-crossing of LoG

Find edge by finding zero-crossing of LoG

더보기


Result 

2.2 Zero-crossing of LOBG

- And the zero-crossings of the LOBG (Laplacian of Bilateral Gaussian) - You can derive the LOBG equation and design the kernel similarly to LOG case ? Write a single algorithm that has two kernel options, LOG and LOGB. ? Test your algorithm on the test images by varying the parameters of each algorithm (Try 9x9 kernel size with Gaussian std = 1.4).


Result

더보기

2.3 Add error to image and compare LoG and LoBG

? Add Gaussian noise with std= 20 to the test images and repeat the test on them. ? Show and compare your results, and discuss on them. Give any ideas for improving the performance.

더보기

Result

Full code

더보기


신고
« PREV : 1 : ··· : 100 : 101 : 102 : 103 : 104 : 105 : 106 : 107 : 108 : ··· : 572 : NEXT »

티스토리 툴바