Error in user YAML: (<unknown>): found a tab character that violate indentation while scanning a plain scalar at line 3 column 3
---
- oeasy Python 0640
- 这是 oeasy 系统化 Python 教程,从基础一步步讲,扎实、完整、不跳步。愿意花时间学,就能真正学会。
- 本教程同步发布在:
- 个人网站: `https://oeasy.org`
- 蓝桥云课: `https://www.lanqiao.cn/courses/3584`
- GitHub: `https://github.com/overmind1980/oeasy-python-tutorial`
- Gitee: `https://gitee.com/overmind1980/oeasypython`
---- 上次研究的是HSV
- HSV是一种色彩模式
| 简写 | 名称 | 含义 |
|---|---|---|
| H | Hue | 色相 |
| S | Saturation | 饱和度 |
| V | Value | 亮度 |
- 可以通过滑块对于HSV的图像进行控制
- 还有什么可以玩的东西吗?
import cv2
import numpy as np
import matplotlib as plt
#Affine transform (include translation, rotation, scale)
img = cv2.imread("kun1.png")
height,width = img.shape[:2]
pts1 = np.float32([[50,50],[200,50],[50,200]])
pts2 = np.float32([[10,100],[200,50],[100,250]])
M_off = cv2.getAffineTransform(pts1,pts2) #compute affine transformation
print("Computed affine transform matrix:", M_off)
img_off = cv2.warpAffine(img,M_off, (width,height))
cv2.imwrite("kun2.png", img_off)
cv2.imshow("img",img_off)
cv2.waitKey(0)
cv2.destoryAllWindows()
- 将pts1三个点
- 映射到pts2三个点上
- 这就是getAffineTransform
- 如何理解Affine呢?
- 达到 边界
- 去 亲和
- 来自于 婚姻和邻里的 亲合的;
- 仿射的;拟似的;远交的;
- 数学领域
- affine通常用来描述线性变换中的一种特殊情况
- 指的是一种保持直线平行和比例不变的变换
- 在几何学中
- affine变换可以将一个平面或空间中的图形转化成另一个图形
- 但保持它们之间的相似性
- 透视指的是
- 真实空间中
- 有近大远小的情况
- affine 是仿射
- 邻里友好
- 保持比例
- affinity
- affine 友好
- ity 能力
- 亲和力
- affirm
- 肯定
- self-affirmation
- 自我肯定
- affirmative
- affirm 肯定
- ative 的
- 肯定的
- affirmative action
- 肯定运动
- 反性别、人种歧视运动
- affiliate
- [əˈfɪlieɪt]
- 参加,加入;发生联系
- 参与者 市场
- 参与营销
- affliation
- [əˌfɪliˈeɪʃn]
- 联系;从属关系;入会
- 工作单位
- 这次研究了
- 仿射 和 透视 之间的不同
- 可以自己从零开始画些什么吗?
- 我们下次再说 👋
- 本文来自 oeasy Python 系统教程。
- 想完整、扎实学 Python,
- 搜索 oeasy 即可。













