Write a program to generate a correlation coefficient map for a template matching example as illustrated in slide 25Python Programming

Test data: Image files can be found on Canvas (Files -> ImageData). For this assignment, you need flowers.raw (400x300, 8-bit), flowers-template.raw (42x45, 8-bit) and lena.raw (512x512, 8-bit). Use these images as inputs to your programs as needed.

Note that these files don’t include any header information (e.g., image dimension and number of intensity levels). Thus, the simple image viewer in Windows system may not work. For displaying them, use Photoshop or some free software for image display (e.g., ImageJ, MRICro).

 

  1. Similarity measure – correlation coefficient (50 points)

Write a program to generate a correlation coefficient map for a template matching example as illustrated in slide 25 of Lecture Note #9. Use flowers.raw as an original image and flowers-template.raw as a template (reference) image. Specifically, you can shift the template image over the original image, then calculate the correlation coefficient for each overlap case between the reference image and original image patch. Export an output file named flowers_correlation_coefficient.raw.

 

  1. Image downsampling and upsampling (50 points)

Write a program for performing image downsampling and upsampling. For downsampling, apply the naïve method to lena.raw illustrated in slide 3 of Lecture Note #11 by a factor of 2 (512x512->256x256). Then, upsample the 256x256 downsamped image to 512x512 by using nearest neighbor interpolation. Export an output file named lena_resampling.raw.

Python Programming Experts

expert
Oliver
Python Programming

60 Answers

expert
Issac Torres
Python Programming

67 Answers

View More Experts
Disclaimer

The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.

Get Free Quote!

262 Experts Online