小编ark*_*khy的帖子

OpenCV仿射变换不会执行

我正在尝试使用枢轴点执行基本的仿射变换.

import cv2
import numpy as np
import PIL
import matplotlib.pyplot as plt

img = cv2.imread('earth.png')
img_pivots = cv2.imread('earth_keys.png')
map_img = cv2.imread('earth2.png')
map_pivots = cv2.imread('earth2_keys.png')

pts_img_R = np.transpose(np.where(img_pivots[:, :, 2] > 0 ))
pts_img_G = np.transpose(np.where(img_pivots[:, :, 1] > 0 ))
pts_img_B = np.transpose(np.where(img_pivots[:, :, 0] > 0 ))
pts_img = np.vstack([pts_img_R, pts_img_G, pts_img_B])
pts_map_R = np.transpose(np.where(map_pivots[:, :, 2] > 0 ))
pts_map_G = np.transpose(np.where(map_pivots[:, :, 1] > 0 ))
pts_map_B = np.transpose(np.where(map_pivots[:, :, 0] > 0 ))
pts_map = …
Run Code Online (Sandbox Code Playgroud)

python opencv image image-processing

7
推荐指数
1
解决办法
356
查看次数

标签 统计

image ×1

image-processing ×1

opencv ×1

python ×1