Basic Digital Image Processing Tasks
This repository contains basic implementations of image processing algorithms in python.
$ pip install opencv-python
Original |
Gradient |
![Gradient-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Gradient/lena.jpg) |
![Gradient-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Gradient/gradient.jpg) |
$ python negative.py binary.jpeg binary
Original |
Binary Negative |
![Binary-Negative-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Image%20Negative/binary.jpg) |
![Binary-Negative-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Image%20Negative/binary_inverted.png) |
$ python negative.py lena.jpg gray
Original |
Grayscale Negative |
![Gray-Negative-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Image%20Negative/grayscale.png) |
![Gray-Negative-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Image%20Negative/grayscale_inverted.png) |
$ python negative.py lena.jpg rgb
Original |
RGB Negative |
![Rgb-Negative-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Image%20Negative/rgb.jpg) |
![Rgb-Negative-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Image%20Negative/rgb_inverted.png) |
Original |
Segmented |
![Segmented-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Image%20Segmentation/image.png) |
![Segmented-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Image%20Segmentation/Capture3.PNG) |
Original |
Centroid |
![Centroid-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Centroid/Signature.png) |
Top Left | Top Right | ![Centroid-TopLeft](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Centroid/TopLeft.png) | ![Centroid-TopRight](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Centroid/TopRight.png) | Bottom Left | Bottom Right | ![Centroid-BottomLeft](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Centroid/BottomLeft.png) | ![Centroid-BottomRight](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Centroid/BottomRight.png) |
|
Connected Component Labelling
Original |
CCL4 Labelled |
![CCL4-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Connected%20Component%20Labelling/input.png) |
![CCL4-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Connected%20Component%20Labelling/ccl.png) |
Original |
Histogram Equalized |
![Hist-eq-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Histogram%20Equalization/hist2.jpg) |
![Hist-eq-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Histogram%20Equalization/high_contrast.png) |
Original |
Local Histogram |
![Local-Hist-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Local%20Histogram%20Analysis/mountains.jpg) |
![Local-Hist-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Local%20Histogram%20Analysis/high_contrast_local_img.png) |
Original |
Morphology |
![Morphology-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Morphology/signature.png) |
Erosion | Dilation | ![Erosion](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Morphology/erosion.png) | ![Dilation](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Morphology/dilation.png) | Opening | Closing | ![Opening](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Morphology/opening.png) | ![Closing](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Morphology/closing.png) |
|
Original |
Sharpened |
![Sharpened-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Sharpening/inp1.jpg) |
![Sharpened-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Sharpening/sharpen.jpg) |
$ python Skeletonization.py
![Skeletionization](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Skeletonization/output.png)
$ python AvergingFilter.py
Original |
Averaging Filter |
![Averaging-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Smoothing/inp1.jpeg) |
![Averaging-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Smoothing/averaging.jpg) |
Original |
Gaussian |
![gaussian-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Smoothing/inp1.jpeg) |
![gaussian-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Smoothing/gaussian.jpg) |
$ python unsharp_masking.py
Original |
Unsharp Masking |
![Unsharp-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Smoothing/inp2.jpeg) |
![Unsharp-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Smoothing/unsharp_masking.jpg) |
Original |
Median |
![Unsharp-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Smoothing/inp3.jpeg) |
![Unsharp-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Smoothing/median.jpg) |
Original |
XY Cuts |
![XY-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/XY_Cuts/XY-cuts.png) |
![XY-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/XY_Cuts/xycut.png) |
$ python TemplateMatching.py
Template |
Matched in Image |
![Template](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Template%20Matching/template.png) |
![MatchedTemplate](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/raw/master/Template%20Matching/matchedTemplate.png) |