2 Star 4 Fork 3

汉塞大叔/Geospatial_Analysis_By_Python

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
7.5.5 OpenCV 转素描图.py 748 Bytes
Copy Edit Raw Blame History
汉塞大叔 authored 2021-01-20 20:59 +08:00 . 上传py
import cv2
import numpy as np
src = "JPG/111.jpg"
img = cv2.imread(src)
cv2.imshow("input image", img)
# cv2.GaussianBlur(..) 根君矩阵虚化
# (21, 21)表示高斯矩阵的长与宽都是21,标准差取0
img_blur = cv2.GaussianBlur(img, (35, 35), 0, 0)
cv2.imshow('GaussianBlur', img_blur)
# 除法函数
img_blend = cv2.divide(img_blur, img, scale=256)
cv2.imshow("divide()", img_blend)
# cv2.cvtColor(p1,p2) 是颜色空间转换函数,p1是需要转换的图片,p2是转换成何种格式。
# cv2.COLOR_BGR2RGB 将BGR格式转换成RGB格式
# cv2.COLOR_BGR2GRAY 将BGR格式转换成灰度图片
img_result = cv2.cvtColor(img_blend, cv2.COLOR_BGR2GRAY)
cv2.imshow("cvtColor", img_result)
cv2.waitKey(0)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/fengfeng233/geospatial_-analysis_-by_-python.git
git@gitee.com:fengfeng233/geospatial_-analysis_-by_-python.git
fengfeng233
geospatial_-analysis_-by_-python
Geospatial_Analysis_By_Python
master

Search