NTUT 2023_Fall_ADIP_hw
This project is part of the Advanced Digital Image Processing (ADIP) course. I used pure C++ to implement the algorithms, but in some instances, I utilized OpenCV's built-in code in professor's require. Please give a star if you think it's helpful
I hope that open-sourcing this project can help beginners in C++ to get an introduction and overcome the most challenging times. I understand the frustrations that can occur while taking this course. However, I do not condone mindless copying, as it will not help you in the long run. It may lead to difficulties in completing your final project.
1.1 Raw image file format understanding
- Download and view raw images using a preferred viewer (e.g., Xnview)
1.2 Raw image file input/output (without OpenCV)
- Read and manipulate raw image files
- Tasks include:
- Reading specific pixel values
- Dividing the image into triangular sub-blocks and rotating them
- Partitioning the image and applying pixel value modifications
1.3 Brightness adjustment
- Increase image brightness uniformly and randomly
- Discussion on handling overflow/underflow issues
- Set up OpenCV environment
- Create a program to draw Doraemon using OpenCV
- Add student ID to the image
- Save the result as a PNG file
- Raw image manipulation should be done without using OpenCV
- Proper handling of data types and potential overflow/underflow is crucial
- Implement various image resizing techniques without using OpenCV
- Tasks include:
- Zoom lena256.raw with 2:1 ratio using row-column replication
- Shrink lena512.raw with 1:4 ratio using row-column deletion
- Resize lena128.raw using nearest neighbor, bilinear, and bicubic interpolation
- Resize lena512.raw to 384x384 with pre-blurring
- Compare ↑2.25↓1.5, ↓1.5↑2.25, and ↑1.5 resizing on lena256.raw
- Compare results, calculate MSE and PSNR, discuss image quality and execution time
- Find shortest paths on map10x10.raw using D4, D8, and Dm distances
- Consider different gray-value roads
- Quantize lena256.raw and baboon256.raw from 8 bits to 1 bit
- Calculate MSE and PSNR, discuss bit rate saving
- Convert lena1024.raw to a binary halftone image
- Partition into 16x16 blocks and plot circles based on average intensity
- OpenCV circle functions allowed for this problem
- Binarize and resize Doraemon image from HW1
- Replace bit planes in lena256.raw with binarized Doraemon image
- Discuss visual impact of replacing different bit planes
- Perform log, inverse log, and power-law transformations on log512.raw
- Apply transformations to the negative image as well
- Compare and discuss results
- Plot histograms for log512.raw and its negative
- Implement histogram equalization
- Perform histogram matching with a specified histogram
- OpenCV usage is generally not allowed unless specified
- Focus on implementing algorithms from scratch
- Calculate centroids of shapes
- Apply central moments of orders 1 to 3
- Perform various filtering techniques:
- Smoothing (Box and Gaussian)
- Roberts
- Prewitt
- Sobel (including custom -45° & +45° version)
- Laplacian
- High-boost filters
- Extract flowers as blob
- Perform selective filtering using ROI mask
- Implement DFT and IDFT
- Compare with OpenCV built-in functions
- Implement DCT and IDCT
- Discuss DCT vs DFT for image compression
- Apply Gaussian, Butterworth, and Ideal filters (LPF and HPF)
- Implement frequency-domain Sobel filter
- Compare with spatial-domain Sobel filter
- Implement homomorphic filter
- Compare with histogram equalization
- Avoid using problem-related OpenCV API unless specified
- Use origin shifting and contrast enhancement for spectrum display
- Pad image borders by mirroring or replication in mask processing
- Perform Adaptive Local Noise Reduction filtering
- Perform Alpha-Trimmed Mean filtering
- Compare results on various noisy images
- Perform Inverse Filtering
- Perform Wiener Filtering
- Perform Constrained Least-Square Filter
- Compare results and discuss noise sensitivity
- Restore distorted image using warping relationship