# DIP **Repository Path**: grisson/DIP ## Basic Information - **Project Name**: DIP - **Description**: 上海交大 数字图像处理 课程 大作业 Python + Opencv - **Primary Language**: Python - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 14 - **Forks**: 5 - **Created**: 2013-10-10 - **Last Updated**: 2021-11-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Projects for Digital Image Processing # ## September, 2013 ## (Test images can be found in: ftp.cs.sjtu.edu.cn/lu-ht/DIP-Gonzalez/images.rar) 截止日期:__2013年12月31日__ 要求:7道题中任选6道题完成,不是本专业的同学也可以多人一组(但最多不超过3人)完成。要求完成程序;撰写实验报告,其中包括程序的说明、处理的结果、结果比较分析、心得体会等。 提交方式:程序源代码、实验报告压缩为一个文件,以姓名+学号为文件名,发送到 __xxxx@sjtu.edu.cn__ 。还需提交打印的实验报告,实验报告交到 __xxxxxxxxx__ ,或快递: __闵行区东川路800号上海交通大学计算机系(电信学院楼3号楼xxx室) xxx__ 注意事项:编程语言不限。 **若使用Matlab,不能直接调用现成函数(如imhist等).** Deadline: **Dec 31, 2013** Requirement: Complete the following projects and submit your report and program, send the electronic version to __htlu@sjtu.edu.cn__, and you must print your report, and submit a copy to **3-425, SEIEE building**. ------------------ ### 1. Histogram Equalization (test images: fig1.jpg, fig2.jpg) a. Write a computer program for computing the histogram of an image b. Implement the histogram equalization technique c. Your program must be general to allow any gray-level image as its input. As a minimum, your report should include the original image, a plot of its histogram, a plot of the histogram-equalization, transformation function, the enhanced image, and a plot of its histogram. ### 2. Geometric transform (test image: fig3.tif) Develop a geometric transform program that will rotate, translate, and scale an image by specified amounts, using the nearest neighbor and bilinear interpolation methods, respectively. ### 3. Spatial Filtering (test image: fig4.jpg) a. Noise Generators. * Find (or develop) a program to add Gaussian noise to an image. You must be able to specify the noise mean and variance; * Find (or develop) a program to add salt-and-pepper (impulse) noise to an image. You must be able to specify the probabilities of each of the two noise components. b. Write program to perform spatial mean filtering, applying your filter to the noisy images obtained in. You can fix the size of the spatial mask at 3 x 3, but the coefficients need to be variables that can be input into your program. c. Modify the program that you developed in b) to perform 3 x 3 median filtering. Compare the differences between filtered images by mean and median filters. ### 4. Two-Dimensional Fast Fourier Transform (test image: fig5.jpg) Consult a reference book for Fast Fourier Transform (FFT), and then develop a program that can compute and display the two-dimensional Discrete Fourier Transform (amplitude and phase spectra) of a digital image. Your implementation must have the capabilities to: a. Multiply the input image by (-1)x+y to center the transform. b. Compute and display the amplitude spectrum and phase spectrum. c. Compute the inverse Fourier transform. d. Use the image fig5.jpg to illustrate your algorithm. ### 5. Image restoration (Test image: fig6.jpg) Suppose a blurring degradation function as ![ Eq.(1) ](http://grisson.azurewebsites.net/wp-content/uploads/2013/10/Q5DegradationFunction.png) (1) a. Implement a blurring filter using Eq. (1). b. Blur the test image fig6.jpg using parameters a=b=0.1 and T = 1. c. Add Gaussian noise of 0 mean and variance of 650 to the blurred image. d. Restore the blurred image and the blurred noisy image using the inverse filter, Wiener deconvolution filter and the parametric Wiener filter, respectively. e. add Gaussian noise of 0 and different variances to the blurred image and repeat d), investigate the performance of the Wiener deconvolution filter. ### 6. Image compression a. Develop a program to compute the two-dimensional discrete cosine transform of an image b. Compress the test image to different qualities by using the inverse discrete cosine transform with fewer transform coefficients. c. Compute and display the difference image. ### 7. Edge Detection (Test image: fig3.tif) Develop a program to implement the Laplacian, Roberts, Sobel and the Prewitt Edge detection algorithms.