python Shi-Tomasi角点检测源代码
import cv2 as cv import matplotlib.pyplot as plt # 1读取图像 img = cv.imread('./image/tv.jpg') gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY) # 2角点检测 corners = cv.goodFeaturesToTra...
python harris角点检测源代码
import cv2 as cv import matplotlib.pyplot as plt import numpy as np # 1读取图像,并转换成灰度图像 img = cv.imread('./image/chess.jpg') gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY) # ...
python霍夫线检测源代码
import cv2 as cv import matplotlib.pyplot as plt import numpy as np # 1.加载图片,转为二值图 img = cv.imread('./image/calendar.jpg') gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY) edge...
python人脸识别源码
import cv2 as cv import matplotlib.pyplot as plt # 1图像和模板读取 img = cv.imread('./image/wulin.jpg') template = cv.imread('./image/man.jpg') h, w, I = template.shape # 2模板匹配...
python 图像的叠加与混合
import numpy as np import cv2 as cv import matplotlib.pyplot as plt # 1读取图像 img1 = cv.imread('pic1.jpg') img2 = cv.imread('pic2.jpg') # 2加法操作 img3 = cv.add(img1, img2) # CV...
python 图像的绘制源代码
import numpy as np import cv2 as cv import matplotlib.pyplot as plt # 1 创建一个空白的图像 img = np.zeros((512, 512, 3), np.uint8) # 2 绘制图形 cv.line(img, (0, 0), (511, 511), (25...
python图像的io操作源代码
import numpy as np import cv2 as cv import matplotlib.pyplot as plt # 读取图像 img = cv.imread('bilibili.jpg',0) # 显示图像 # 2.1 OPENCV # cv.imshow('bilibili', img) # cv.waitKey(0...
标签云