WO2022127010A1 - Perspective image correction method - Google Patents
Perspective image correction method Download PDFInfo
- Publication number
- WO2022127010A1 WO2022127010A1 PCT/CN2021/092912 CN2021092912W WO2022127010A1 WO 2022127010 A1 WO2022127010 A1 WO 2022127010A1 CN 2021092912 W CN2021092912 W CN 2021092912W WO 2022127010 A1 WO2022127010 A1 WO 2022127010A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- undistorted
- coordinates
- area
- correction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0012—Biomedical image inspection
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10116—X-ray image
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30004—Biomedical image processing
- G06T2207/30008—Bone
Definitions
- the invention relates to the field of image processing, in particular to a perspective image correction method.
- the C-arm X-ray machine As one of the large-scale medical equipment in the operating room, the C-arm X-ray machine has been widely used in various orthopedic operations because of its advantages of fluoroscopy imaging and storing the acquired images at any time.
- orthopedic surgical robots with assisted positioning have also developed rapidly, and have been gradually applied in actual orthopedic clinical operations, while C-arm X-ray machines have become an indispensable and important imaging component in orthopedic surgical robotic systems.
- the accuracy also directly affects the navigation and positioning accuracy of the entire surgical robot system.
- the shadow-enhancing X-ray machine has become the first choice of major surgical robot research and development companies because of its low price, stable function and convenient maintenance.
- the C-arm X-ray machine will definitely produce images during the imaging process through the lens in the intensifier. Distortion causes the position of each pixel in the original image to be shifted, which does not conform to the law of perspective imaging, which makes the image unable to be used in high-precision navigation and positioning occasions.
- How to correct or reduce the distortion in the X-ray machine perspective imaging process has also become It is one of the problems that the surgical robot system with high precision navigation and positioning must solve.
- the present invention proposes a perspective image correction method, which corrects the perspective image based on a distance-weighted polynomial fitting model, which has high correction accuracy and is easy to operate.
- a perspective image correction method comprising the steps of:
- the marking points are steel balls with a diameter of 2 mm.
- the image coordinates of all marked points are extracted using canny operator, adaptive threshold segmentation method or edge detection algorithm.
- the first-order radial distortion correction model based on the principle of cross-ratio invariance is adopted for the central region as follows:
- X 1i represents the abscissa of a mark point i in the C 1 area in the image coordinate system
- Y 1i represents the ordinate of a mark point i in the C 1 area in the image coordinate system
- r represents C 1
- X 1i' represents the abscissa of the theoretical undistorted position of a marker point i in the C 1 area in the image coordinate system
- Y 1i' represents C 1 is the ordinate of the theoretically undistorted position of a marker i in the image coordinate system
- ki represents the distortion coefficient of the straight line where the marker i is located.
- a ij and b ij are polynomial coefficients, and n is the polynomial order;
- the least squares solution method is used for the above-mentioned high-order polynomial model, and the target error function is the sum of squares of the fitting errors, that is, the following formula
- Each marker point has an image coordinate and a theoretical undistorted coordinate, that is, each marker point generates two differential equations to obtain an overdetermined equation system, and the coefficients a ij and b ij of the polynomial model can be obtained by solving the overdetermined equation system .
- step (6) the actual undistorted image is subjected to distortion mapping to obtain the theoretical distortion position coordinates of the marker point, which is compared with the image coordinates of the marker point obtained in step (2), and the average value between the corresponding points of the two is compared. Pixel distance as correction error.
- the present invention directly completes the correction for a single fluoroscopic image after the end cover of the X-ray intensifier has a cover with a specific steel ball arrangement, and establishes a correction model through the partition processing of the image, which greatly eliminates the large distortion of the image edge. Influence, improve the accuracy of intraoperative positioning. It has important application value in the surgical robot system based on the shadow-enhancing X-ray machine.
- FIG. 1 is a flow chart of the steps of the present invention.
- FIG. 2 is a schematic diagram of a flat plate structure of the present invention.
- FIG. 3 is a perspective view of the X-ray machine of the present invention for the bone model after the flat plate structure is installed.
- FIG. 4 is a schematic diagram of partitioning an image.
- Figure 5 is a schematic diagram of cross ratio invariance.
- FIG. 6 is a schematic diagram of an undistorted image after correction.
- the fluoroscopic image correction method of the present invention is processed based on a distance-weighted polynomial fitting model.
- a flat plate structure member with steel balls arranged according to a designed rule is installed on the imaging path of the X-ray machine. It can be installed directly approximately parallel to the plane of the shadow intensifier.
- the flat plate structure includes a flat plate and a support member supporting the flat plate around it, the flat plate of the flat plate structure is a circular plate, and a steel ball with a diameter of 2 mm is arranged on the flat plate as a marking point;
- the range with a diameter smaller than d 1 on the plate is set as the central area, and the range with a diameter greater than d 1 is set as the outer area;
- the specific steel ball distribution is: the steel balls are radially distributed with the central steel ball as the center, the steel balls in the central area are sparsely distributed, and the steel balls in the outer area are distributed. It is densely distributed, and every five steel balls arranged in the central area are collinear, and there are four groups of collinear steel balls; the steel balls in the outer area are arranged on the extension line of each collinear straight line.
- a steel ball is arranged at the center of the flat plate, and with the steel ball as the central layer, at least two layers are arranged from the inside to the outside in the central area, and each layer is evenly arranged with 8 steel balls, and the outer layers are opposite to each other.
- the two steel balls are collinear with the steel balls in the center layer; the steel balls in the outer area are arranged in several layers from the inside to the outside, and the steel balls in each layer are evenly arranged, with an equal number of 32; and 8 steel balls are arranged in the center area. extension line.
- Fig. 1 is the step flow chart of the present invention, as shown in Fig. 1, the present invention comprises the following steps:
- the distortion of the image is that the distortion in the center of the image is small, and the distortion far from the center of the image is large, if the distortion correction is only performed on the central area of the image, the commonly used correction model can achieve a better correction effect. For the overall distortion correction accuracy, it is a more reasonable choice to partition the image.
- the C 1 area is located in the center of the image and has small distortion
- the C 2 area is located outside the image and has large distortion;
- the present invention first performs distortion correction on the C 1 area containing small distortion to obtain The undistorted position of the marker point in the C1 area, and the undistorted position of the outer marker point is calculated based on this, and the undistorted coordinate position of the marker point is the necessary input data for the distortion correction model;
- intersection ratio is a basic law in perspective projection. Referring to Figure 5, A, B, C, D on the straight line l, and the line connecting the ray source S and l 0 intersect at A 0 , B 0 , C 0 , D 0 , the intersection ratio is defined as ⁇ , and the following formula holds:
- the undistorted position of the marked point in the C1 area and the actual position of the marked point satisfy the law of cross ratio invariance.
- the position coordinates are A', B', C', and D', because the spacing between the marked points can be calculated from the design parameters, and the cross ratio is a constant, there is the following relationship:
- the actual image position coordinates of a certain mark point i in the C1 area are set as (X 1i , Y 1i ), where X 1i represents the horizontal direction of a certain mark point i in the C 1 area under the image coordinate system Coordinates, Y 1i represents the ordinate of a marker point i in the C 1 area under the image coordinate system, r represents the distance of a marker point i in the C 1 area from the origin in the image coordinate system; because the center of the perspective image
- the distortion of the area is small.
- the first-order radial distortion correction is used to describe the distortion model of this area to achieve high accuracy.
- k i represents the distortion coefficient of the straight line where the marker point i is located
- each straight line has 5 marking points, and the marking points on the flat plate structure are arranged at equal distances, then each straight line corresponds to a distortion coefficient k j
- the theoretical undistorted positions of all marked points in the area C1 are to be determined;
- step (4) According to the distortion correction model established in step (4), combined with the image coordinates extracted from the marked points in the C1 area and its design coordinates Solve the correction coefficient k j corresponding to each straight line, and calculate the theoretical undistorted position coordinates of all marked points in the C 1 area accordingly
- M′ img is the distorted image
- M img is the undistorted image to be obtained
- f n is the high-order polynomial mapping model between the undistorted image and the distorted image, and its model coefficients need to be solved accurately
- a ij and b ij are polynomial coefficients that need to be solved, and n is the polynomial order;
- the least squares solution method is used for the above-mentioned high-order polynomial model, and the target error function is the sum of squares of the fitting errors, that is, the following formula
- Each marked point has an actual coordinate and a theoretical undistorted coordinate, that is, each marked point generates two differential equations to obtain an overdetermined equation system, and the coefficients a ij and b ij of the polynomial model can be obtained by solving the overdetermined equation system ;
- step (8) Apply the correction model obtained in step (7), perform distortion mapping on the actual undistorted image, and obtain the theoretical distortion position coordinates of the marker point Compare it with the actual coordinates of the marked point obtained in step (2) comparing, and The average pixel distance between the corresponding points is used as the correction error.
- the correction model is applied to the entire image to obtain a corrected undistorted image.
- the corrected undistorted image in Figure 3 is shown in Figure 6, and the correction error is 0.38 pixel.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Medical Informatics (AREA)
- Quality & Reliability (AREA)
- Radiology & Medical Imaging (AREA)
- Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Geometry (AREA)
- Image Processing (AREA)
Abstract
Description
本发明涉及图像处理领域,尤其涉及一种透视图像矫正方法。The invention relates to the field of image processing, in particular to a perspective image correction method.
C型臂X射线机作为手术室大型医疗设备之一,因其能随时透视成像、存储所取图像的优点,所以一直被广泛应用于各种骨科手术中。且近年来,辅助定位的骨科手术机器人也得到了快速发展,已经逐步应用于实际骨科临床手术中,而C型臂X射线机则成为骨科手术机器人系统中不可或缺的重要成像部件,其成像精度也直接影响着整个手术机器人系统的导航定位精度。As one of the large-scale medical equipment in the operating room, the C-arm X-ray machine has been widely used in various orthopedic operations because of its advantages of fluoroscopy imaging and storing the acquired images at any time. In recent years, orthopedic surgical robots with assisted positioning have also developed rapidly, and have been gradually applied in actual orthopedic clinical operations, while C-arm X-ray machines have become an indispensable and important imaging component in orthopedic surgical robotic systems. The accuracy also directly affects the navigation and positioning accuracy of the entire surgical robot system.
影增型X射线机因其价格低廉,功能稳定,维修方便,成为各大手术机器人研发公司的首选,但C型臂X射线机在通过增强器中的透镜成像过程中,一定会产生图像的畸变,使得原始图像中的各个像素的位置发生偏移,不符合透视成像定律,导致图像无法应用于高精度的导航定位场合,而怎么修正或减少X射线机透视成像过程中的畸变,也成为了高精度导航定位的手术机器人系统所要必须解决的问题之一。The shadow-enhancing X-ray machine has become the first choice of major surgical robot research and development companies because of its low price, stable function and convenient maintenance. However, the C-arm X-ray machine will definitely produce images during the imaging process through the lens in the intensifier. Distortion causes the position of each pixel in the original image to be shifted, which does not conform to the law of perspective imaging, which makes the image unable to be used in high-precision navigation and positioning occasions. How to correct or reduce the distortion in the X-ray machine perspective imaging process has also become It is one of the problems that the surgical robot system with high precision navigation and positioning must solve.
发明内容SUMMARY OF THE INVENTION
发明目的:本发明针对上述问题,提出了一种透视图像矫正方法,基于距离加权的多项式拟合模型对透视图像进行矫正,具有较高的矫正精度,且操作方便。Purpose of the invention: In view of the above problems, the present invention proposes a perspective image correction method, which corrects the perspective image based on a distance-weighted polynomial fitting model, which has high correction accuracy and is easy to operate.
技术方案:Technical solutions:
一种透视图像矫正方法,包括步骤:A perspective image correction method, comprising the steps of:
(1)在X射线机的成像路径上安装平板结构件,在所述平板结构件上设有若干组共线的标记点;(1) Install a flat plate structure on the imaging path of the X-ray machine, and set several groups of collinear marking points on the flat plate structure;
(2)X射线机透视成像,提取得到所有标记点的图像坐标,并对透视图像进行分区得到设定直径的中心区域及其外侧区域;(2) X-ray machine fluoroscopic imaging, extracting the image coordinates of all marked points, and partitioning the fluoroscopic image to obtain the central area of the set diameter and its outer area;
(3)对中心区域采用基于交比不变性原理的一阶径向畸变矫正模型,并根据中心区域处标记点的图像坐标及设计参数得到各条直线的矫正系数,进一步得到中心区域内所有标记点的理论无畸变坐标;(3) The first-order radial distortion correction model based on the principle of cross-ratio invariance is adopted for the central area, and the correction coefficients of each straight line are obtained according to the image coordinates and design parameters of the marked points in the central area, and all markers in the central area are further obtained. The theoretical undistorted coordinates of the point;
(4)根据交比不变性原理及设计参数,得到外侧区域内标记点的理论无畸变坐标;(4) According to the principle of cross ratio invariance and design parameters, the theoretical undistorted coordinates of the marked points in the outer region are obtained;
(5)建立无畸变图像至畸变图像的矫正模型,得到由无畸变图像至畸变图像的高阶多项式映射模型f n; (5) establishing a correction model from an undistorted image to a distorted image, and obtaining a high-order polynomial mapping model f n from an undistorted image to a distorted image;
(6)应用矫正模型得到无畸变图像。(6) Apply the correction model to obtain an undistorted image.
所述标记点为直径2mm的钢珠。The marking points are steel balls with a diameter of 2 mm.
所述步骤(2)提取所有标记点的图像坐标采用canny算子、自适应阈值分割方法或边缘检测算法。In the step (2), the image coordinates of all marked points are extracted using canny operator, adaptive threshold segmentation method or edge detection algorithm.
所述步骤(3)中,对中心区域采用基于交比不变性原理的一阶径向畸变矫正模型具体如下:In the step (3), the first-order radial distortion correction model based on the principle of cross-ratio invariance is adopted for the central region as follows:
设中心区域内的某一标记点i的图像坐标为(X 1i,Y 1i),设该点的理论无畸变位置坐标为(X 1i',Y 1i'),则畸变矫正模型如下: Suppose the image coordinates of a mark point i in the central area are (X 1i , Y 1i ), and the theoretical undistorted position coordinates of this point are (X 1i' , Y 1i' ), then the distortion correction model is as follows:
其中,X 1i表示C 1区域内的某一标记点i在图像坐标系下的横坐标,Y 1i表示C 1区域内的某一标记点i在图像坐标系下的纵坐标,r表示C 1区域内的某一标记点i在图像坐标系下距原点的距离;X 1i'表示C 1区域内的某一标记点i在图像坐标系下理论无畸变位置的横坐标,Y 1i'表示C 1区域内的某一标记点i在图像坐标系下理论无畸变位置的纵坐标;k i表示标记点i所在直线的畸变系数。 Among them, X 1i represents the abscissa of a mark point i in the C 1 area in the image coordinate system, Y 1i represents the ordinate of a mark point i in the C 1 area in the image coordinate system, and r represents C 1 The distance of a marker point i in the area from the origin in the image coordinate system; X 1i' represents the abscissa of the theoretical undistorted position of a marker point i in the C 1 area in the image coordinate system, and Y 1i' represents C 1 is the ordinate of the theoretically undistorted position of a marker i in the image coordinate system; ki represents the distortion coefficient of the straight line where the marker i is located.
建立所述步骤(5)中的高阶多项式映射模型f n具体如下:令(x,y)为畸变图像中的一像素点坐标,(x',y')为与其对应的理论无畸变像素点坐标,则有关系式: The details of establishing the high-order polynomial mapping model f n in the step (5) are as follows: let (x, y) be the coordinates of a pixel in the distorted image, and (x', y') be the corresponding theoretical undistorted pixels point coordinates, there is a relation:
其中,a ij、b ij为多项式系数,n为多项式阶数; Among them, a ij and b ij are polynomial coefficients, and n is the polynomial order;
对上述高阶多项式模型采用最小二乘解法,目标误差函数为拟合误差平方和,即下式The least squares solution method is used for the above-mentioned high-order polynomial model, and the target error function is the sum of squares of the fitting errors, that is, the following formula
即需要系数a ij、b ij使的拟合误差平方和ε x、ε y取最小值; That is, the fitting error square sums ε x and ε y made by the coefficients a ij and b ij are required to take the minimum value;
每一个标记点均有一图像坐标和理论无畸变坐标,即每一个标记点产生两个微分方程,得到超定方程组,求解该超定方程组即可求出多项式模型的系数a ij和b ij。 Each marker point has an image coordinate and a theoretical undistorted coordinate, that is, each marker point generates two differential equations to obtain an overdetermined equation system, and the coefficients a ij and b ij of the polynomial model can be obtained by solving the overdetermined equation system .
所述步骤(6)中,对实际无畸变图像进行畸变映射得到标记点理论畸变位置坐标,将其与步骤(2)得到的标记点的图像坐标进行对比,将二者对应点之间的平均像素距离作为矫正误差。In the step (6), the actual undistorted image is subjected to distortion mapping to obtain the theoretical distortion position coordinates of the marker point, which is compared with the image coordinates of the marker point obtained in step (2), and the average value between the corresponding points of the two is compared. Pixel distance as correction error.
有益效果:本发明在X射线机影增器端罩上有特定钢珠排布的罩壳后直接针对单张透视图像完成矫正,通过图像的分区处理建立矫正模型,大大消除了图像边缘畸变大的影响,提高了术中定位的精度。在基于影增型X射线机的手术机器人系统中具有重要的应用价值。Beneficial effects: The present invention directly completes the correction for a single fluoroscopic image after the end cover of the X-ray intensifier has a cover with a specific steel ball arrangement, and establishes a correction model through the partition processing of the image, which greatly eliminates the large distortion of the image edge. Influence, improve the accuracy of intraoperative positioning. It has important application value in the surgical robot system based on the shadow-enhancing X-ray machine.
图1为本发明的步骤流程图。FIG. 1 is a flow chart of the steps of the present invention.
图2为本发明的平板结构件示意图。FIG. 2 is a schematic diagram of a flat plate structure of the present invention.
图3为本发明的X射线机针对安装平板结构件后的骨头模型的透视图。FIG. 3 is a perspective view of the X-ray machine of the present invention for the bone model after the flat plate structure is installed.
图4为对图像分区示意图。FIG. 4 is a schematic diagram of partitioning an image.
图5为交比不变性原理图。Figure 5 is a schematic diagram of cross ratio invariance.
图6为矫正后无畸变图像示意图。FIG. 6 is a schematic diagram of an undistorted image after correction.
下面结合附图和具体实施例,进一步阐明本发明。The present invention will be further illustrated below in conjunction with the accompanying drawings and specific embodiments.
本发明的透视图像矫正方法是基于距离加权的多项式拟合模型进行处理,在透视成像前,在X射线机的成像路径上安装根据设计好的规则排布有钢珠的平板结构件,平板结构件直接近似平行于影增器平面安装即可。图2为本发明的平板结构件示意图,平板结构件包括平板以及其周围支撑该平板的支撑件,平板结构件的平板为圆形板,在平板上布有直径2mm的钢珠作为标记点;将平板上直径小于d 1的范围设为中心区域,直径大于d 1的范围设为外侧区域;具体钢珠分布为:钢珠以中心钢珠为圆心呈放射状发散分布,中心区域的钢珠稀疏分布,外侧区域钢珠稠密分布,且中心区域内布置的每五个钢珠共线,且设有四组共线的钢珠;外侧区域的钢珠布置在各共线直线的延长线上。 The fluoroscopic image correction method of the present invention is processed based on a distance-weighted polynomial fitting model. Before fluoroscopic imaging, a flat plate structure member with steel balls arranged according to a designed rule is installed on the imaging path of the X-ray machine. It can be installed directly approximately parallel to the plane of the shadow intensifier. 2 is a schematic diagram of the flat plate structure of the present invention, the flat plate structure includes a flat plate and a support member supporting the flat plate around it, the flat plate of the flat plate structure is a circular plate, and a steel ball with a diameter of 2 mm is arranged on the flat plate as a marking point; The range with a diameter smaller than d 1 on the plate is set as the central area, and the range with a diameter greater than d 1 is set as the outer area; the specific steel ball distribution is: the steel balls are radially distributed with the central steel ball as the center, the steel balls in the central area are sparsely distributed, and the steel balls in the outer area are distributed. It is densely distributed, and every five steel balls arranged in the central area are collinear, and there are four groups of collinear steel balls; the steel balls in the outer area are arranged on the extension line of each collinear straight line.
在本发明中,在平板圆心处布置一钢珠,并以该钢珠为中心层,在中心区域内由内至外布置至少两层,每一层均匀布置8个钢珠,且其外层上相对的两个钢珠以中心层钢珠共线;外侧 区域钢珠由内至外布置若干层,且各层钢珠均匀布置,数量相等,均为32个;且其中8个钢珠布置在中心区域内各共线直线的延长线上。In the present invention, a steel ball is arranged at the center of the flat plate, and with the steel ball as the central layer, at least two layers are arranged from the inside to the outside in the central area, and each layer is evenly arranged with 8 steel balls, and the outer layers are opposite to each other. The two steel balls are collinear with the steel balls in the center layer; the steel balls in the outer area are arranged in several layers from the inside to the outside, and the steel balls in each layer are evenly arranged, with an equal number of 32; and 8 steel balls are arranged in the center area. extension line.
图1为本发明的步骤流程图,如图1所示,本发明包括如下步骤:Fig. 1 is the step flow chart of the present invention, as shown in Fig. 1, the present invention comprises the following steps:
(1)利用带有平板结构件的成像设备透视成像,如图3所示为X射线机在实际应用中透视成像得到透视图像;(1) Using an imaging device with a flat plate structure for perspective imaging, as shown in Figure 3, the X-ray machine is used in practical applications to obtain a perspective image by perspective imaging;
(2)对标记点坐标进行精确提取,得到所有标记点在透视图像的实际坐标 在本发明中,提取方法有很多,常用的canny算子、自适应阈值分割或边缘检测等都可以实现,但需保证能达到足够的提取精度; (2) Accurately extract the coordinates of the marked points to obtain the actual coordinates of all the marked points in the perspective image In the present invention, there are many extraction methods, and the commonly used canny operator, adaptive threshold segmentation or edge detection can be implemented, but it is necessary to ensure that sufficient extraction accuracy can be achieved;
(3)考虑到图像的畸变是图像中心畸变较小,远离图像中心的畸变较大,如果只针对图像中心区域进行畸变矫正,则常用的矫正模型即可取得较好的矫正效果,为保证图像整体的畸变矫正精度,对图像进行分区处理是比较合理的选择。这里将整张透视图像分成C 1区域和C 2区域,如图4所示,分别为半径为d 1的圆形中心区域和径向范围在d 1~d 2的环形外侧区域,且d 1=d 2/2;C 1区域居于图像中心,具有较小的畸变,C 2区域居于图像外侧,具有较大的畸变;本发明首先对含有较小畸变的C 1区域进行畸变矫正,以得到C 1区域内的标记点无畸变的位置,并以此推算出外侧标记点的无畸变位置,而标记点无畸变的坐标位置是畸变矫正模型的必要输入数据; (3) Considering that the distortion of the image is that the distortion in the center of the image is small, and the distortion far from the center of the image is large, if the distortion correction is only performed on the central area of the image, the commonly used correction model can achieve a better correction effect. For the overall distortion correction accuracy, it is a more reasonable choice to partition the image. Here, the entire fluoroscopic image is divided into C 1 area and C 2 area, as shown in Figure 4, which are a circular central area with a radius of d 1 and an annular outer area with a radial range of d 1 to d 2 , and d 1 =d 2 /2; the C 1 area is located in the center of the image and has small distortion, and the C 2 area is located outside the image and has large distortion; the present invention first performs distortion correction on the C 1 area containing small distortion to obtain The undistorted position of the marker point in the C1 area, and the undistorted position of the outer marker point is calculated based on this, and the undistorted coordinate position of the marker point is the necessary input data for the distortion correction model;
(4)对C 1区域建立基于交比不变性的一阶径向畸变矫正模型,在本发明具体实施例中,C 1区域径向共有4条直线l j,j=1,2,3,4;如图4,每条直线l j对应矫正系数k j; (4) Establish a first -order radial distortion correction model based on the invariance of the cross ratio for the C1 region. 4; As shown in Figure 4, each straight line l j corresponds to the correction coefficient k j ;
交比不变性是透视投影中的一个基本定律,参考图5,直线l上的A、B、C、D,与射线源S的连线与l 0相交于A 0、B 0、C 0、D 0,交比定义为λ,有下式成立: The invariance of the intersection ratio is a basic law in perspective projection. Referring to Figure 5, A, B, C, D on the straight line l, and the line connecting the ray source S and l 0 intersect at A 0 , B 0 , C 0 , D 0 , the intersection ratio is defined as λ, and the following formula holds:
则C 1区域标记点的无畸变位置与实际上标记点的位置满足交比不变性定律,如针对C 1区域一条直线上连续4个标记点A、B、C、D,设其理论无畸变位置坐标为A'、B'、C'、D',因为各标记点之间的间距由设计参数可以计算得到,则交比为常数,则有如下关系式: Then the undistorted position of the marked point in the C1 area and the actual position of the marked point satisfy the law of cross ratio invariance. For example, for four consecutive marked points A, B, C, and D on a straight line in the C1 area, it is assumed that there is no distortion in theory. The position coordinates are A', B', C', and D', because the spacing between the marked points can be calculated from the design parameters, and the cross ratio is a constant, there is the following relationship:
据此,设C 1区域内的某一标记点i的图像实际位置坐标为(X 1i,Y 1i),其中,X 1i表示C 1区域内的某一标记点i在图像坐标系下的横坐标,Y 1i表示C 1区域内的某一标记点i在图像坐标 系下的纵坐标,r表示C 1区域内的某一标记点i在图像坐标系下距原点的距离;因为透视图像中心区域的畸变较小,这里采用一阶径向畸变矫正来描述此区域的畸变模型即可达到较高的精度,设该点的理论无畸变位置坐标为(X 1i',Y 1i'),其中,X 1i'表示C 1区域内的某一标记点i在图像坐标系下理论无畸变位置的横坐标,Y 1i'表示C 1区域内的某一标记点i在图像坐标系下理论无畸变位置的纵坐标;则畸变矫正模型如下: Accordingly, the actual image position coordinates of a certain mark point i in the C1 area are set as (X 1i , Y 1i ), where X 1i represents the horizontal direction of a certain mark point i in the C 1 area under the image coordinate system Coordinates, Y 1i represents the ordinate of a marker point i in the C 1 area under the image coordinate system, r represents the distance of a marker point i in the C 1 area from the origin in the image coordinate system; because the center of the perspective image The distortion of the area is small. Here, the first-order radial distortion correction is used to describe the distortion model of this area to achieve high accuracy. Let the theoretical undistorted position coordinates of this point be (X 1i' , Y 1i' ), where , X 1i' represents the abscissa of the theoretically undistorted position of a marked point i in the C1 area under the image coordinate system, and Y 1i' represents a theoretically undistorted position of a marked point i in the C1 area under the image coordinate system The ordinate of the position; the distortion correction model is as follows:
其中,k i表示标记点i所在直线的畸变系数; Among them, k i represents the distortion coefficient of the straight line where the marker point i is located;
在本发明具体实施例中,透视图像的C 1区域有四条直线,每条直线上有5个标记点,平板结构件上的标记点为等距排列,则每条直线对应一个畸变系数k j为待求及C 1区域内所有标记点的理论无畸变位置为待求; In the specific embodiment of the present invention, there are four straight lines in the C 1 area of the fluoroscopic image, each straight line has 5 marking points, and the marking points on the flat plate structure are arranged at equal distances, then each straight line corresponds to a distortion coefficient k j The theoretical undistorted positions of all marked points in the area C1 are to be determined;
(5)根据步骤(4)建立的畸变矫正模型,结合C 1区域的标记点提取的图像坐标 及其设计时的坐标 求解出与每条直线相对应的矫正系数k j,并据此计算得到C 1区域内所有标记点的理论无畸变位置坐标 (5) According to the distortion correction model established in step (4), combined with the image coordinates extracted from the marked points in the C1 area and its design coordinates Solve the correction coefficient k j corresponding to each straight line, and calculate the theoretical undistorted position coordinates of all marked points in the C 1 area accordingly
(6)根据交比不变性,由C 1区域内所有标记点的理论无畸变位置坐标 根据平板结构件的设计参数得到C 2区域内标记点与C 1区域内标记点之间的拓扑关系,并据此计算得到C 2区域内标记点的理论无畸变位置坐标 (6) According to the invariance of the cross ratio, the theoretical undistorted position coordinates of all the marked points in the C1 area According to the design parameters of the plate structure, the topological relationship between the marked points in the C2 area and the marked points in the C1 area is obtained, and based on this, the theoretical undistorted position coordinates of the marked points in the C2 area are calculated.
(7)根据步骤(5)和步骤(6)计算得到透视图像上所有标记点的理论无畸变位置坐标 结合步骤(2)得到的所有标记点在透视图像的实际坐标 建立由无畸变图像至畸变图像的矫正模型,即下式: (7) Calculate the theoretical undistorted position coordinates of all the marked points on the fluoroscopic image according to steps (5) and (6) Combine the actual coordinates of all marked points in the perspective image obtained in step (2) Establish a correction model from an undistorted image to a distorted image, that is, the following formula:
M′ img=f n(M img) M′ img = f n (M img )
其中,M′ img为畸变图像,M img为待求无畸变图像,f n为由无畸变图像与畸变图像的高阶多项式映射模型,需要精确求解出其模型系数; Among them, M′ img is the distorted image, M img is the undistorted image to be obtained, f n is the high-order polynomial mapping model between the undistorted image and the distorted image, and its model coefficients need to be solved accurately;
建立的高阶多项式映射模型f n可描述如下:令(x,y)为畸变图像中的一像素点坐标,(x',y')为与其对应的理论无畸变像素点坐标,则有关系式: The established higher-order polynomial mapping model f n can be described as follows: Let (x, y) be the coordinates of a pixel in the distorted image, and (x', y') be the corresponding theoretical undistorted pixel coordinates, then there is a relationship Mode:
式(3)中,a ij、b ij为多项式系数,需要求解,n为多项式阶数; In formula (3), a ij and b ij are polynomial coefficients that need to be solved, and n is the polynomial order;
对上述高阶多项式模型采用最小二乘解法,目标误差函数为拟合误差平方和,即下式The least squares solution method is used for the above-mentioned high-order polynomial model, and the target error function is the sum of squares of the fitting errors, that is, the following formula
即需要求解的系数a ij、b ij,使的拟合误差平方和ε x、ε y取最小值; That is, the coefficients a ij and b ij need to be solved, so that the squared sums of fitting errors ε x and ε y take the minimum value;
每一个标记点均有一实际坐标和理论无畸变坐标,即每一个标记点产生两个微分方程,得到超定方程组,求解该超定方程组即可求出多项式模型的系数a ij和b ij; Each marked point has an actual coordinate and a theoretical undistorted coordinate, that is, each marked point generates two differential equations to obtain an overdetermined equation system, and the coefficients a ij and b ij of the polynomial model can be obtained by solving the overdetermined equation system ;
(8)应用步骤(7)得到的矫正模型,对实际无畸变图像进行畸变映射,得到标记点理论畸变位置坐标 将其与步骤(2)得到的标记点实际坐标 进行对比, 与 对应点之间的平均像素距离作为矫正误差,同时将矫正模型应用到整副图像上,得到矫正后无畸变图像,对图3进行矫正后的无畸变图像见图6,矫正误差为0.38pixel。 (8) Apply the correction model obtained in step (7), perform distortion mapping on the actual undistorted image, and obtain the theoretical distortion position coordinates of the marker point Compare it with the actual coordinates of the marked point obtained in step (2) comparing, and The average pixel distance between the corresponding points is used as the correction error. At the same time, the correction model is applied to the entire image to obtain a corrected undistorted image. The corrected undistorted image in Figure 3 is shown in Figure 6, and the correction error is 0.38 pixel.
以上详细描述了本发明的优选实施方式,但是本发明并不限于上述实施方式中的具体细节,在本发明的技术构思范围内,可以对本发明的技术方案进行多种等同变换(如数量、形状、位置等),这些等同变换均属于本发明的保护范围。The preferred embodiments of the present invention are described in detail above, but the present invention is not limited to the specific details of the above-mentioned embodiments. Within the scope of the technical concept of the present invention, various equivalent transformations (such as quantity, shape, etc.) can be performed on the technical solutions of the present invention. , position, etc.), these equivalent transformations all belong to the protection scope of the present invention.
Claims (6)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011508936.7 | 2020-12-18 | ||
| CN202011508936.7A CN112288659B (en) | 2020-12-18 | 2020-12-18 | Perspective image correction method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022127010A1 true WO2022127010A1 (en) | 2022-06-23 |
Family
ID=74426888
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2021/092912 Ceased WO2022127010A1 (en) | 2020-12-18 | 2021-05-10 | Perspective image correction method |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN112288659B (en) |
| WO (1) | WO2022127010A1 (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115293979A (en) * | 2022-07-13 | 2022-11-04 | 中南大学 | Infrared image radial and tangential distortion correction method |
| CN116152121A (en) * | 2023-04-20 | 2023-05-23 | 合肥高维数据技术有限公司 | Curved surface screen generating method and correcting method based on distortion parameters |
| CN116228558A (en) * | 2022-12-26 | 2023-06-06 | 中国科学院空天信息创新研究院 | A distortion correction method for a push-broom hyperspectral imager |
| CN116823681A (en) * | 2023-08-31 | 2023-09-29 | 尚特杰电力科技有限公司 | Infrared image distortion correction method, device, system and storage medium |
| CN119762401A (en) * | 2024-12-12 | 2025-04-04 | 吉林大学 | A method for correcting image on curved optical element surface |
| CN120013830A (en) * | 2025-04-18 | 2025-05-16 | 山东省地质测绘院 | A geometric correction method and system for multispectral remote sensing data |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112288659B (en) * | 2020-12-18 | 2021-03-23 | 南京佗道医疗科技有限公司 | Perspective image correction method |
| CN115564822A (en) * | 2021-07-01 | 2023-01-03 | 杭州三坛医疗科技有限公司 | Distortion calibration method, device, electronic equipment and medium |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5675380A (en) * | 1994-12-29 | 1997-10-07 | U.S. Philips Corporation | Device for forming an image and method of correcting geometrical optical distortions in an image |
| CN101467887A (en) * | 2007-12-29 | 2009-07-01 | 复旦大学 | X ray perspective view calibration method in operation navigation system |
| CN112288659A (en) * | 2020-12-18 | 2021-01-29 | 南京佗道医疗科技有限公司 | Perspective image correction method |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101582161B (en) * | 2009-06-15 | 2012-11-21 | 北京航空航天大学 | C-type arm image correction method based on perspective imaging model calibration |
| CN102579061A (en) * | 2011-01-12 | 2012-07-18 | 元创生技股份有限公司 | Positioning method combined with C-arm and guidance system |
| DE102011088265B4 (en) * | 2011-12-12 | 2017-10-19 | Siemens Healthcare Gmbh | Method for correcting image artifacts due to a scattered radiation grid |
| CN103489181B (en) * | 2013-09-03 | 2017-01-18 | 上海逸动医学科技有限公司 | Perspective X-ray image correcting device and correcting method thereof |
| CN108876749A (en) * | 2018-07-02 | 2018-11-23 | 南京汇川工业视觉技术开发有限公司 | A kind of lens distortion calibration method of robust |
-
2020
- 2020-12-18 CN CN202011508936.7A patent/CN112288659B/en active Active
-
2021
- 2021-05-10 WO PCT/CN2021/092912 patent/WO2022127010A1/en not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5675380A (en) * | 1994-12-29 | 1997-10-07 | U.S. Philips Corporation | Device for forming an image and method of correcting geometrical optical distortions in an image |
| CN101467887A (en) * | 2007-12-29 | 2009-07-01 | 复旦大学 | X ray perspective view calibration method in operation navigation system |
| CN112288659A (en) * | 2020-12-18 | 2021-01-29 | 南京佗道医疗科技有限公司 | Perspective image correction method |
Non-Patent Citations (1)
| Title |
|---|
| LI JIAYING: "Sub-Regional Camera Distortion Correction Based on Cross-Ratio Invariance", CHINA MEASUREMENT & TESTING TECHNOLOGY, vol. 46, no. 9, 30 September 2020 (2020-09-30), CN , pages 125 - 130, XP055942733, ISSN: 1674-5124, DOI: 10.11857/j.issn.1674-5124.2019110052 * |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115293979A (en) * | 2022-07-13 | 2022-11-04 | 中南大学 | Infrared image radial and tangential distortion correction method |
| CN116228558A (en) * | 2022-12-26 | 2023-06-06 | 中国科学院空天信息创新研究院 | A distortion correction method for a push-broom hyperspectral imager |
| CN116152121A (en) * | 2023-04-20 | 2023-05-23 | 合肥高维数据技术有限公司 | Curved surface screen generating method and correcting method based on distortion parameters |
| CN116152121B (en) * | 2023-04-20 | 2023-07-04 | 合肥高维数据技术有限公司 | Curved surface screen generating method and correcting method based on distortion parameters |
| CN116823681A (en) * | 2023-08-31 | 2023-09-29 | 尚特杰电力科技有限公司 | Infrared image distortion correction method, device, system and storage medium |
| CN116823681B (en) * | 2023-08-31 | 2024-01-26 | 尚特杰电力科技有限公司 | Method, device and system for correcting distortion of infrared image and storage medium |
| CN119762401A (en) * | 2024-12-12 | 2025-04-04 | 吉林大学 | A method for correcting image on curved optical element surface |
| CN120013830A (en) * | 2025-04-18 | 2025-05-16 | 山东省地质测绘院 | A geometric correction method and system for multispectral remote sensing data |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112288659B (en) | 2021-03-23 |
| CN112288659A (en) | 2021-01-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112288659B (en) | Perspective image correction method | |
| CN108053450B (en) | High-precision binocular camera calibration method based on multiple constraints | |
| CN110163918B (en) | Line structure cursor positioning method based on projective geometry | |
| CN112802124A (en) | Calibration method and device for multiple stereo cameras, electronic equipment and storage medium | |
| CN100557635C (en) | A Camera Calibration Method Based on Flexible Stereo Target | |
| CN101582161B (en) | C-type arm image correction method based on perspective imaging model calibration | |
| CN109272574B (en) | Construction method and calibration method of linear array rotary scanning camera imaging model based on projection transformation | |
| CN105823417B (en) | A kind of method for turning station precision based on photogrammetric raising laser tracker | |
| CN109064516B (en) | A camera self-calibration method based on absolute quadratic image | |
| CN110640745A (en) | Vision-based robot automatic calibration method, equipment and storage medium | |
| EP3255609A1 (en) | A method of automatically identifying a sequence of marking points in 3d medical image | |
| US20150216498A1 (en) | Geometric Characterization and Calibration of a Cone-Beam Computer Tomography Apparatus | |
| WO2019099544A1 (en) | Geometric calibration of x-ray imaging systems | |
| CN101467887A (en) | X ray perspective view calibration method in operation navigation system | |
| CN114176779B (en) | A surgical robot navigation and positioning method and device | |
| CN104979258A (en) | Wafer aligning system and wafer aligning method | |
| CN115713563B (en) | A method, apparatus, electronic device, and storage medium for camera calibration. | |
| CN107330927B (en) | Airborne visible light image positioning method | |
| CN114209433A (en) | Surgical robot navigation positioning method and device | |
| CN108537849A (en) | The scaling method of the line-scan digital camera of three-dimensional right angle target based on donut | |
| CN112288796A (en) | Method for extracting center of perspective image mark point | |
| CN115564822A (en) | Distortion calibration method, device, electronic equipment and medium | |
| CN108420531B (en) | Surgical tool adjusting method, electronic device and clamping device | |
| CN110645928A (en) | Space coordinate positioning method of three-dimensional scanner | |
| CN110503604A (en) | A real-time orthomosaic method for aerial area array images based on high-precision POS |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21904949 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 21904949 Country of ref document: EP Kind code of ref document: A1 |