- Write a program (WAP) to convert Grayscale image to binary image.
Case 1: Assume Mean Intensity Image as threshold value.
Case 2: Input the threshold value from user.
- WAP to convert RGB (Color) Image to grayscale image.
Case 1: By taking mean avearge of three planes.
Case 2: Input the weightage of three planes, i.e., R, G, B from the user. The weightage is a value between 0 and 1, and sum of all three weightages is equal to 1.
(Example: Weightage of R, G, B is 0.7, 0.2, 0.1, respectively.)
- WAP to shrink/zoom the image using a) Nearest neighbor interpolation, b) Bilinear interpolation.
Input the scale or the dimensions of the desired output image after scaling from the user.
- WAP to draw a border around the input image (or in other words pad the input image).
Input the width of the border (in terms of pixel count) and the desired color of the border from the user.
Try this for both binary and grayscale image.
- WAP to blend two images using alpha blending. Input the blending ratio from the user.
Case 1: Assume the size of both the images are same.
Case 2: Assume the size of the other image is smaller than the reference image.
Try this for both binary and grayscale image.
- WAP for Image Compliment.
Try this for both binary and grayscale image.
- WAP to enhance the input image using Log transform.
Assume c=1.
- WAP to enhance the input image using Power law/gamma transform.
Assume c=1, and input the value of gamma from the user.
- WAP to enhance the input image using Intensity level slicing (Contrast stretching).
The input range of intensity values and the desired range of intensity values in the output image are obtained from the user.
(Example: The input range of intensity values from 80 to 120 is stretched to 50-150 in the output image)
- WAP to enhance the input image using histogram equalization.
- WAP to match the histogram of the input image with that of reference image using histogram matching technique.
- WAP to extract the bit planes from the input image and then perform the following
- Reconstruct the image using only few of bit planes. Input the number of bit planes and the plane number from the user.
- Reconstruct the image by embedding a binary watermark in one of the bit planes of the input image. Input the plane number from the user. Also, extract the embedded watermark to check whether it has extracted properly or not.
- Reconstruct the image by embedding a binary watermark in one of the bit planes of the input image. After reconstructing, tamper a portion of watermarked image and then extract the watermark from the tampered image to check for any distortions in the (embedded) watermark.
- WAP to smooth the input image using:
- Averaging filter (un-weighted)
- Weighted filter given by h(x,y)=max(|x|,|y|)
- Gaussian filter
Note: Input the filter size and other parameters such as sigma in case of Gaussian filter, method of padding (replication, zero padding, etc.) from the user.
- WAP to sharpen the input image using:
- Laplacian filter
- Gradient operators of Sobel
- Unsharp masking. To obtain blurred image, use the Gaussian filter of size 5x5 and sigma=3.
- WAP to generate following noises using equations derived from PDFs of noise distributions. Compare your output with those generated using inbuilt function imnoise. Plot the histograms of generated noise to determine the shape of the distribution.
- Uniform noise
- Gaussian noise
- Erlang noise
- Exponential noise
- Rayleigh noise
- WAP to denoise the input image using Contraharmonic mean filter. Input the value of Q from the user. Also plot the graph of PSNR at different values of Q.
- WAP to denoise the input image using alpha-trimmed mean filter. Input the value of d from the user. Also plot the graph of PSNR at different values of d.
- WAP to denoise the input image using adaptive median filter. Input the initial window size and maximum size of window (Smax) from the user. Compare the performance of median filter and adaptive median filter, using the PSNR values.
- WAP to compute DCT coefficients of the input image and compare the results with built in function dct2.
- WAP to prove 100% reconstruction capability of DCT.
- WAP to re-order (display) the DCT coefficients in a zig-zag pattern, assume size of image MxN.
- WAP to compress and decompress the input image using run-length coding, determine the compression ratio achieved and relative data redundancy in original image.
- WAP to threshold the image using Otsu’s global threshold.
- WAP to reconstruct image using only X% of compared DCT coefficients , after doing so , determine the reconstruct error (RMSE)
- #repeat the above procedure for different values of X , 5, 10, 20, 25, 50 and plot graph
- RMSE vs X.
WAP to implement the following:-
- Divide image into nXn non-overlapping blocks.
- Apply DCT on each block.
- Reconstruct the block by neglecting 75% of the obtained DCT coefficients (of each block).
- Merge the reconstructed blocks to obtain the reconstructed image f(x,y).
- Determine RMSE between f(x,y) and f’(x,y).
- Repeat above steps for different size of blocks (2x2, 4x4, 8x8 16x16, 32x32, 64x64).