当前位置:网站首页>Halon common affine transformation operators
Halon common affine transformation operators
2022-06-27 04:26:00 【weixin_ thirty-nine million nine hundred and twenty-six thousan】
Reprint :
Affine transformation
Affine transformation mainly includes translation transformation 、 Rotation transformation 、 Zoom transform ( It's also called scaling )、 Tilt shift ( It's also called stagger transformation 、 Shear transform 、 Offset transformation )、 Flip transformation . There are six degrees of freedom .
To perform an affine transformation , You must get the transform first matrix . To get the transformation matrix , The coordinates of feature points must be obtained first 、 Angle and other information , Geometric matching and bolb It is an efficient method to obtain feature points , There are other ways , As long as the characteristic points can be obtained stably .
Affine transformation process
(1.) Obtain the coordinates of feature points 、 angle
(2.) Calculate the affine transformation matrix
(3.) To image 、 Area 、 Affine transformation of contour
According to feature points 、 Angle calculation affine transformation matrix
hom_mat2d_identity(:::HomMat2DIdentity)
function : Generate affine transformation matrix
hom_mat2d_rotate(::HomMat2D,Phi,Px,Py:HomMat2DRotate)
function : Add the rotation angle to the affine transformation matrix
HomMat2D:( Input parameters ) Affine transformation matrix
Phi( Input parameters ): Rotation Angle ( Unit radian )
Px( Input parameters ): Transformed fixed point row coordinates . A fixed point is an affine transformation supported by this point ( Here it means to rotate around this point )
Py:( Input parameters ) Fixed point column coordinates of transformation
HomMat2DRotate:( Output parameters ) Output transformation matrix
hom_mat2d_scale(::HomMat2D,Sx,Sy,Px,Py:HomMat2DScale)
function : Add scaling to the affine transformation matrix
HomMat2D( Input parameters ): Affine transformation matrix
Sx( Input parameters ):x Scaling factor in the axis direction
Sy( Input parameters ):y Scaling factor in the axis direction
Px( Input parameters ): Transformed fixed point row coordinates
Py( Input parameters ): Fixed point column coordinates of transformation
HomMat2DScale( Output parameters ): Output transformation matrix
hom_mat2d_translate(::HomMat2D,Tx,Ty:HomMat2DTranslate)
function : Add translation to the anti fire transformation matrix
HomMat2D:( Input parameters ) Affine transformation matrix
Tx( Input parameters ): Along the x The distance of translation in the axis direction
Ty: Input parameters ): Along the y The distance of translation in the axis direction
HomMat2DTranslate( Output parameters ): Output transformation matrix
hom_mat2d_slant(::HomMat2D,Theta,Axis,Px,Py:HomMat2DSlant)
function : Add the oblique tangent to the anti fire transformation matrix
HomMat2D( Input parameters ): Affine transformation matrix
Theta( Input parameters ): Bevel angle ( Company : radian )
Axis( Input parameters ): The axis of the oblique cut . Value list :x,y
Px( Input parameters ): Fixed point of transformation x coordinate
Py( Input parameters ): Fixed point of transformation y coordinate
HomMat2DSlant( Output parameters ): Output affine transformation matrix
vector_angle_to_rigid(::Row1,Column1,Angle1,Row2,Column2,Angle2:HomMat2D)
function : The rigid affine transformation matrix is calculated according to the point and angle , Support rotation and translation
Row1( Input parameters ): Original point line coordinates
Column1( Input parameters ): Original point column coordinates
Angle1( Input parameters ): Original point angle
Row2( Input parameters ): The destination line coordinates of the transformation
Column2( Input parameters ): The coordinates of the destination column of the transformation
Angle2( Input parameters ): The destination angle of the transformation
HomMat2D( Output parameters ): Output affine transformation matrix
The affine transformation matrix is calculated according to more than two characteristic points
vector_to_rigid(::Px,Py,Qx,Qy:HomMat2D)
function : The rigid affine transformation matrix is calculated according to more than two point pairs , Support rotation and translation
Px:( Input parameters ) Of the original point group x coordinate
Py:( Input parameters ) Of the original point group y coordinate
Qx:( Input parameters ) The destination group of the transformation x coordinate
Qy:( Input parameters ) The destination group of the transformation y coordinate
HomMat2D:( Output parameters ) Output affine transformation matrix
vector_to_similarity(::Px,Py,Qx,Qy:HomMat2D)
function : Calculate the similar affine transformation matrix according to more than two point pairs , Support rotation 、 Pan and zoom
Px:( Input parameters ) Of the original point group x coordinate
Py:( Input parameters ) Of the original point group y coordinate
Qx:( Input parameters ) The destination group of the transformation x coordinate
Qy:( Input parameters ) The destination group of the transformation y coordinate
HomMat2D:( Output parameters ) Output affine transformation matrix
The affine transformation matrix is obtained according to more than three feature points
vector_to_hom_mat2d(::Px,Py,Qx,Qy:HomMat2D)
function : Calculate the affine transformation matrix according to more than three point pairs , Support rotation 、 translation 、 The zoom 、 Oblique cutting
Px:( Input parameters ) Of the original point group x coordinate
Py:( Input parameters ) Of the original point group y coordinate
Qx:( Input parameters ) The destination group of the transformation x coordinate
Qy:( Input parameters ) The destination group of the transformation y coordinate
HomMat2D:( Output parameters ) Output affine transformation matrix
Calculate affine transformation parameters
hom_mat2d_to_affine_par(::HomMat2D:Sx,Sy,Phi,Theta,Tx,Ty)
function : According to the affine transformation matrix ( Homogeneous two-dimensional transformation matrix ) Calculate affine transformation parameters
HomMat2D( Input parameters ): Affine transformation matrix
Sx( Output parameters ):x The scaling factor of the direction ( If you change from image space to physical space , Namely x The direction of the Single pixel quantity )
Sy( Output parameters ):y The scaling factor of the direction ( If you change from image space to physical space , Namely y The direction of the Single pixel quantity )
Phi( Output parameters ): Rotation Angle
Theta( Output parameters ): Bevel angle
Tx( Output parameters ): Along the x Direction translation distance
Ty( Output parameters ): Along the y Direction translation distance
8. To image 、ROI and XLD Affine transformation
affine_trans_contour_xld(Contours:ContoursAffinTrans:HomMat2D)
function : Yes XLD Two dimensional affine transformation of contour , Support zoom , rotate , translation , Oblique cutting
Contours( Input parameters ): Input XLD outline
ContoursAffinTrans( Output parameters ): Output transformed XLD outline
HomMat2D( Input parameters ): Affine transformation matrix
affine_trans_image(Image:ImageAffinTrans:HomMat2D,Interpolation,AdaptImageSize)
function : Carry out two-dimensional affine transformation on the image contour , Support zoom 、 rotate 、 translation , Oblique cutting
Image( Input parameters ): The input image
ImageAffinTrans( Output parameters ): The transformed image
HomMat2D( Input parameters ): Affine transformation matrix
Interpolation( Input parameters ): Interpolation algorithm . Parameter value list : nearest_neighbor,bilinear,constant,weighted
AdaptImageSize( Input parameters ): Results whether the image size is adaptive . The default value is :false
affine_trans_region(Region:RegionAffineTrans:HomMat2D,Interpolate:)
function : Perform arbitrary two-dimensional affine transformation on the region
Region( Input parameters ): Input area
RegionAffineTrans( Output parameters ): Transformed region
HomMat2D( Input parameters ): Affine transformation matrix
Interpolate( Input parameters ): Interpolation algorithm . The default value is :nearest_neighbor. Parameter value list :constant,nearest_neighbor
affine_trans_polygon_xld(Polygon:PolygonsAffinTrans:HomMat2D:)
function : Yes XLD Arbitrary two-dimensional affine transformation of polygons
Polygon( Input parameters ): Input XLD polygon
PolygonsAffinTrans( Output parameters ): Transformed XLD polygon
HomMat2D( Input parameters ): Affine transformation matrix
affine_trans_point_2d(::HomMat2D,Px,Py:Qx,Qy)
function : Arbitrary two-dimensional affine transformation of points , Support zoom 、 rotate 、 translation 、 Oblique cutting
HomMat2D( Input parameters ): Affine transformation matrix
Px( Input parameters ): Original point x Or row coordinates
Py( Input parameters ): Original point y Or column coordinates
Qx( Output parameters ): Transformation point x Or row coordinates
Qy( Output parameters ): Transformation point y Or column coordinates
affine_trans_pixel(::HomMat2D,Row,Col:RowTrans,ColTrans)
function : Arbitrary two-dimensional affine transformation of pixels
HomMat2D( Input parameters ): Affine transformation matrix
Row( Input parameters ): Enter pixel row coordinates
Col( Input parameters ): Enter the pixel column coordinates
RowTrans( Output parameters ): Transformed pixel row coordinates
ColTrans( Output parameters ): Transformed pixel column coordinates
ps:affine_trans_point_2d And affine_trans_pixel The difference between :affine_trans_pixel The origin of the image coordinate system used is in the upper left corner of the image ,affine_trans_point_2d Use the standard image coordinate system , The origin is at the center of the pixel in the upper left corner
边栏推荐
- MySql最详细的下载教程
- 缓存综合项目--秒杀架构
- Golang Hello installation environment exception [resolved]
- 日志收集系統
- 2022-06-26:以下golang代码输出什么?A:true;B:false;C:编译错误。 package main import “fmt“ func main() { type
- 面对AI人才培养的“产学研”鸿沟,昇腾AI如何做厚产业人才黑土地?
- MySql的开发环境
- 010 C语言基础:C函数
- 014 C language foundation: C string
- [BJDCTF2020]The mystery of ip
猜你喜欢

Microservice system design - service fusing and degradation design

面对AI人才培养的“产学研”鸿沟,昇腾AI如何做厚产业人才黑土地?

MobileNet系列(4):MobileNetv3网络详解

如何系统学习LabVIEW?

Microservice system design -- distributed cache service design

文旅灯光秀打破时空限制,展现景区夜游魅力
![[数组]BM94 接雨水问题-较难](/img/2b/1934803060d65ea9139ec489a2c5f5.png)
[数组]BM94 接雨水问题-较难

Baidu PaddlePaddle's "universal gravitation" first stop in 2022 landed in Suzhou, comprehensively launching the SME empowerment plan

差点因为 JSON.stringify 丢了奖金...

2022-06-26: what does the following golang code output? A:true; B:false; C: Compilation error. package main import “fmt“ func main() { type
随机推荐
2022-06-26:以下golang代码输出什么?A:true;B:false;C:编译错误。 package main import “fmt“ func main() { type
Argo Workflows —— Kubernetes的工作流引擎入门
Nestjs environment variable configuration to solve the problem of how to inject services into interceptors
A^2=E | 方程的解 | 这个方程究竟能告诉我们什么
math_ Number set (number set symbol) and set theory
Cultural tourism light show breaks the time and space constraints and shows the charm of night tour in the scenic spot
009 basics of C language: C loop
iOS开发:对于动态库共享缓存(dyld)的了解
MySQL development environment
【B站UP DR_CAN学习笔记】Kalman滤波2
Mobilenet series (4): mobilenetv3 network details
nignx配置单ip限流
733. 图像渲染
微服务系统设计——API 网关服务设计
Log collection system
微服务系统设计——分布式定时服务设计
MATLAB | 基于分块图布局的三纵坐标图绘制
乐得瑞LDR6035 USB-C接口设备支持可充电可OTG传输数据方案。
Kotlin compose implicitly passes the parameter compositionlocalprovider
Cultural tourism night tour | stimulate tourists' enthusiasm with immersive visual experience