autolevel
题目If we obtain and observe the histogram of an image, we can see that, typically, pixels are not filled all ranges of its gray scale values. More specifically, there are no pixels near gray scale 0, or gray scale 255. Of course, this varies from image to image. From what we learn in class, an image with such a histogram will demonstrate itself with low contrast. Besides histogram equalization, we can define an adaptive gray scale transform to make this kind of images with higher contrast. Assume ...
freLaplacian
题目In frequency, a Laplacian filter can be defined by H(u,v) = -(u2 + v2). In this project one is required to implement this filter in the Fourier frequency domain.A python proto-type code is provided, and one should implement the function called FreqLaplacian, which accepts an numpy array as input, and returns filtered result as another numpy array. Note: The most difficult part of this project is how to represent the filtered result.
代码12345678910111213141516171819202122232425262728293031323334 ...
adaptivethresholding
题目In adaptive thresholding, every pixel in an image is given a threshold. In the so called niblack method, T(i,j)=m(i,j)+k*sigma(i,j), where k=-0.2 is a constant. m(i,j) is the mean of the pixels in the neighborhood of the one located at (i,j)sigma(i,j) is the standard deviation similarly calculated. T(i,j) is the threshold for pixel at (i,j)Take 3x3 neighborhood as an example, it contains 9 pixels,they are located at (-1,-1), (0, -1), (1, -1) ( -1,0), (0, 0), (1, 0 ) ...
histeq
题目This assignment aims to histogram equalization of a gray image with more than 8 bits per pixel. The provided image is called splash.png, which is a 10 bits gray image. As the image is stored in png format, so the image is in mode ‘I’ when it is read into pillow Image object. for images other than those with 8 bit-depth, Image.histogram can not be used to get its histogram (one can verify this, by applying histogram() to the above image), in this case one can only rely on the histogram function ...