# Basic Digital Image Processing Tasks
> This repository contains basic implementations of image processing algorithms in python.
## Required Libraries
* PIL
```shell
$ pip install pillow
```
* opencv-python
```shell
$ pip install opencv-python
```
## Algorithms
### Gradient
```shell
$ python gradient.py
```
|Original|Gradient|
|---|---|
|![Gradient-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Gradient/lena.jpg)|![Gradient-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Gradient/gradient.jpg)|
### Image Negative
```shell
$ python negative.py binary.jpeg binary
```
|Original|Binary Negative|
|---|---|
|![Binary-Negative-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Image%20Negative/binary.jpg)|![Binary-Negative-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Image%20Negative/binary_inverted.png)|
```shell
$ python negative.py lena.jpg gray
```
|Original|Grayscale Negative|
|---|---|
|![Gray-Negative-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Image%20Negative/grayscale.png)|![Gray-Negative-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Image%20Negative/grayscale_inverted.png)|
```shell
$ python negative.py lena.jpg rgb
```
|Original|RGB Negative|
|---|---|
|![Rgb-Negative-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Image%20Negative/rgb.jpg)|![Rgb-Negative-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Image%20Negative/rgb_inverted.png)|
### Image Segmentation
```shell
$ python Segmentation.py
```
|Original|Segmented|
|---|---|
|![Segmented-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Image%20Segmentation/image.png)|![Segmented-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Image%20Segmentation/Capture3.PNG)|
### Centroid
```shell
$ python Centroid.py
```
|Original|Centroid|
|---|---|
|![Centroid-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Centroid/Signature.png)|<table><tr><td>Top Left</td><td>Top Right</td></tr><tr><td>![Centroid-TopLeft](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Centroid/TopLeft.png)</td><td>![Centroid-TopRight](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Centroid/TopRight.png)</td></tr><tr><td>Bottom Left</td><td>Bottom Right</td></tr><tr><td>![Centroid-BottomLeft](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Centroid/BottomLeft.png)</td><td>![Centroid-BottomRight](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Centroid/BottomRight.png)</td></tr></table>|
### Connected Component Labelling
```shell
$ python ccl4.py
```
|Original|CCL4 Labelled|
|---|---|
|![CCL4-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Connected%20Component%20Labelling/input.png)|![CCL4-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Connected%20Component%20Labelling/ccl.png)|
### Histogram Equalization
```shell
$ python hist_eq.py
```
|Original|Histogram Equalized|
|---|---|
|![Hist-eq-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Histogram%20Equalization/hist2.jpg)|![Hist-eq-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Histogram%20Equalization/high_contrast.png)|
### Local Histogram Analysis
|Original|Local Histogram|
|---|---|
|![Local-Hist-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Local%20Histogram%20Analysis/mountains.jpg)|![Local-Hist-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Local%20Histogram%20Analysis/high_contrast_local_img.png)|
### Morphology
```shell
$ python Simple.py
```
|Original|Morphology|
|---|---|
|![Morphology-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Morphology/signature.png)|<table><tr><td>Erosion</td><td>Dilation</td></tr><tr><td>![Erosion](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Morphology/erosion.png)</td><td>![Dilation](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Morphology/dilation.png)</td></tr><tr><td>Opening</td><td>Closing</td></tr><tr><td>![Opening](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Morphology/opening.png)</td><td>![Closing](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Morphology/closing.png)</td></tr></table>|
### Sharpening
```shell
$ python sharpen.py
```
|Original|Sharpened|
|---|---|
|![Sharpened-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Sharpening/inp1.jpg)|![Sharpened-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Sharpening/sharpen.jpg)|
### Skeletonization
```shell
$ python Skeletonization.py
```
![Skeletionization](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Skeletonization/output.png)
### Smoothing
```shell
$ python AvergingFilter.py
```
|Original|Averaging Filter|
|---|---|
|![Averaging-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Smoothing/inp1.jpeg)|![Averaging-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Smoothing/averaging.jpg)|
```shell
$ python gaussian.py
```
|Original|Gaussian|
|---|---|
|![gaussian-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Smoothing/inp1.jpeg)|![gaussian-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Smoothing/gaussian.jpg)|
```shell
$ python unsharp_masking.py
```
|Original|Unsharp Masking|
|---|---|
|![Unsharp-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Smoothing/inp2.jpeg)|![Unsharp-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Smoothing/unsharp_masking.jpg)|
```shell
$ python median.py
```
|Original|Median|
|---|---|
|![Unsharp-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Smoothing/inp3.jpeg)|![Unsharp-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Smoothing/median.jpg)|
### XY Cuts
```shell
$ python XY_Cuts.py
```
|Original|XY Cuts|
|---|---|
|![XY-Original](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/XY_Cuts/XY-cuts.png)|![XY-Result](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/XY_Cuts/xycut.png)|
### Template Matching
```shell
$ python TemplateMatching.py
```
|Template|Matched in Image|
|---|---|
|![Template](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Template%20Matching/template.png)|![MatchedTemplate](https://github.com/mohammaduzair9/Basic-Digital-Image-Processing/blob/master/Template%20Matching/matchedTemplate.png)|
没有合适的资源?快使用搜索试试~ 我知道了~
在PythonOpenCV中实现基本数字图像处理任务_Python_下载.zip
共95个文件
png:40个
py:20个
jpg:14个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 59 浏览量
2023-04-26
11:02:16
上传
评论
收藏 31.81MB ZIP 举报
温馨提示
在PythonOpenCV中实现基本数字图像处理任务_Python_下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
在PythonOpenCV中实现基本数字图像处理任务_Python_下载.zip (95个子文件)
Basic-Image-Processing-master
.DS_Store 14KB
Skeletonization
.DS_Store 6KB
Skeletonization.py 968B
output.png 152KB
Thumb.png 491KB
Centroid
.DS_Store 6KB
TopLeft.png 1KB
Centroid.py 2KB
BottomLeft.png 1KB
Signature.png 707KB
TopRight.png 1KB
BottomRight.png 2KB
Smoothing
AvergingFilter.py 686B
.DS_Store 6KB
averaging.jpg 72KB
unsharp_masking.jpg 42KB
unsharp_masking.py 810B
gaussian.py 987B
inp2.tif 246KB
inp3.jpeg 303KB
Filter.py 1KB
median.py 2KB
inp1.jpeg 135KB
median.jpg 84KB
inp3.tif 196KB
weightedavg.py 745B
inp1.tif 463KB
weightedavg.jpg 76KB
inp2.jpeg 61KB
gaussian.jpg 66KB
Template Matching
image.png 14.41MB
matchedTemplate.png 11.41MB
TemplateMatching.py 623B
template.png 10KB
matchedTemplateCutOut.png 469KB
XY_Cuts
.DS_Store 6KB
XY_Cuts.py 1KB
xycut.png 77KB
XY-cuts.png 124KB
Histogram Equalization
.DS_Store 6KB
hist2.tif 245KB
hist2.jpg 142KB
high_contrast.png 135KB
hist_eq.py 1KB
Local Histogram Analysis
.DS_Store 6KB
Slidingwindow.py 818B
SlidingWindowHistogram.png 13KB
high_contrast_global.png 17KB
Original.png 17KB
tilingGlobal.py 3KB
high_contrast.png 140KB
mountains.jpg 29KB
high_contrast_local.png 17KB
high_contrast_local_img.png 125KB
Gradient
.DS_Store 6KB
lena.jpg 39KB
gradient.jpg 24KB
gradient.py 603B
Connected Component Labelling
.DS_Store 6KB
ccl.png 12KB
3.png 3KB
ccl4.py 5KB
1.png 3KB
input.png 151KB
4.png 2KB
2.png 3KB
Morphology
.DS_Store 6KB
signature.png 85KB
segment.py 478B
dilation.png 10KB
erosion.png 10KB
closing.png 10KB
simple.py 739B
segment.png 2KB
opening.png 10KB
inp.jpg 9KB
Sharpening
.DS_Store 6KB
sharpen.jpg 45KB
inp1.jpg 62KB
sharpen.py 2KB
README.md 7KB
Image Negative
.DS_Store 6KB
rgb_inverted.png 457KB
negative.py 832B
grayscale_inverted.png 146KB
binary.jpg 412KB
binary_inverted.png 424KB
grayscale.png 229KB
rgb.jpg 39KB
Image Segmentation
.DS_Store 6KB
image.png 224KB
Segmentation.py 2KB
Capture3.PNG 10KB
Capture2.PNG 25KB
Capture.PNG 28KB
共 95 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Picasso_v3.1 2.ipa
- chromedriver-mac-arm64.zip
- 蓝zapro.apk
- chromedriver-linux64.zip
- UCAS研一深度学习实验-MNIST手写数字识别python源码+详细注释(高分项目)
- 基于Python和PyTorch框架完成的一个手写数字识别实验源码(带MINIST手写数字数据集)+详细注释(高分项目)
- 基于Matlab在MNIST数据集上利用CNN完成手写体数字识别任务,并实现单层CNN反向传播算法+源代码+文档说明(高分项目)
- NVIDIA驱动、CUDA和Pytorch及其依赖
- 基于SVM多特征融合的微表情识别python源码+项目说明+详细注释(高分课程设计)
- html动态爱心代码一(附源码)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功