CN107146205B - Distorted image correction method, touch position recognition method and device - Google Patents
Distorted image correction method, touch position recognition method and device Download PDFInfo
- Publication number
- CN107146205B CN107146205B CN201710170665.0A CN201710170665A CN107146205B CN 107146205 B CN107146205 B CN 107146205B CN 201710170665 A CN201710170665 A CN 201710170665A CN 107146205 B CN107146205 B CN 107146205B
- Authority
- CN
- China
- Prior art keywords
- point
- calibrated
- screen
- image
- calibration
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 65
- 238000003702 image correction Methods 0.000 title claims abstract description 16
- 238000012937 correction Methods 0.000 claims abstract description 25
- 230000008569 process Effects 0.000 abstract description 9
- 238000010586 diagram Methods 0.000 description 11
- 238000004590 computer program Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Position Input By Displaying (AREA)
- Projection Apparatus (AREA)
Abstract
本发明提供了一种畸变图像校正方法、触控位置识别方法及装置。该方法包括:针对待标定屏幕的各个目标标定点,向所述待标定屏幕投射两条直线,所述两条直线的交点为目标标定点;获取待标定屏幕的各个点与标定图像中各个点的对应关系,所述标定图像为向所述待标定屏幕投射两条直线时采集的所述待标定屏幕的图像;根据标定后的屏幕的各个点与标定图像中各个点的对应关系对畸变图像进行校正。本发明实施例无需对摄像头进行几何校正的情况下,通过向屏幕投射直线的方式对屏幕进行标定,利用标定后的屏幕坐标点对畸变图像进行校正,标定过程抗干扰能力强,校正结果更准确。
The invention provides a distorted image correction method, a touch position recognition method and a device. The method includes: for each target calibration point of the screen to be calibrated, projecting two straight lines to the screen to be calibrated, and the intersection of the two straight lines is the target calibration point; obtaining each point of the screen to be calibrated and each point in the calibration image The corresponding relationship, the calibration image is the image of the screen to be calibrated collected when two straight lines are projected to the screen to be calibrated; according to the corresponding relationship between each point of the calibrated screen and each point in the calibration image, the distorted image Make corrections. When the embodiment of the present invention does not require geometric correction of the camera, the screen is calibrated by projecting a straight line to the screen, and the distorted image is corrected by using the calibrated screen coordinate points. The calibration process has strong anti-interference ability and the calibration result is more accurate. .
Description
技术领域technical field
本发明涉及图像处理技术领域,具体涉及一种畸变图像校正方法、触控位置识别方法及装置。The present invention relates to the technical field of image processing, in particular to a distorted image correction method, a touch position recognition method and a device.
背景技术Background technique
为了在传统的屏幕上增加触控功能,让人机交互更加便利,可以在屏幕前安装摄像头,通过摄像头获取用户的触控位置可以将原来不能进行触控操作的交互式系统升级为具有触控功能的系统。由于摄像头采集的图像存在畸变,因此需要对摄像头进行几何校正或者对畸变后的图像进行校正,从而根据采集的图像识别触控位置。In order to increase the touch function on the traditional screen and make the computer interaction more convenient, a camera can be installed in front of the screen, and the user's touch position can be obtained through the camera to upgrade the interactive system that cannot perform touch operation to a touch control system. functional system. Since the image collected by the camera is distorted, it is necessary to perform geometric correction on the camera or correct the distorted image, so as to recognize the touch position according to the collected image.
现有技术对摄像头的几何校正方法中,利用标定物存在的特征点和其在图像上对应点之间的关系,求解摄像头参数,完成标定过程,但对摄像头的标定需要定制标定物,在标定物的放置和使用上有严格的要求,操作复杂。In the prior art geometric correction method for the camera, the relationship between the characteristic points of the calibration object and its corresponding points on the image is used to solve the camera parameters and complete the calibration process, but the calibration of the camera needs to customize the calibration object. There are strict requirements on the placement and use of objects, and the operation is complicated.
在不对摄像头进行几何校正的前提下,摄像头采集的图像会产生畸变,现有的畸变图像校正方法中,利用屏幕上显示的棋盘格完成对屏幕的标定,进而完成对畸变图像的校正,但该方法中的校正结果受环境光照影响较大,校正结果不准确。Without geometric correction of the camera, the image collected by the camera will be distorted. In the existing distorted image correction method, the checkerboard displayed on the screen is used to complete the calibration of the screen, and then complete the correction of the distorted image. The correction results in the method are greatly affected by the ambient light, and the correction results are inaccurate.
发明内容Contents of the invention
本发明实施例提供一种畸变图像校正方法、触控位置识别方法及装置,用于解决现有的畸变图像校正方法的校正结果受环境光照影响较大,校正结果不准确的问题。Embodiments of the present invention provide a distorted image correction method, a touch position recognition method and a device, which are used to solve the problem that the correction result of the existing distorted image correction method is greatly affected by ambient light and the correction result is inaccurate.
本发明实施例提供了一种畸变图像校正方法,包括:The embodiment of the present invention provides a distorted image correction method, comprising:
针对待标定屏幕的各个目标标定点,向所述待标定屏幕投射两条直线,所述两条直线的交点为目标标定点;For each target calibration point of the screen to be calibrated, project two straight lines to the screen to be calibrated, and the intersection of the two straight lines is the target calibration point;
获取待标定屏幕的各个点与标定图像中各个点的对应关系,所述标定图像为向所述待标定屏幕投射两条直线时采集的所述待标定屏幕的图像;Acquiring the corresponding relationship between each point of the screen to be calibrated and each point in the calibration image, the calibration image being an image of the screen to be calibrated collected when two straight lines are projected to the screen to be calibrated;
根据标定后的屏幕的各个点与标定图像中各个点的对应关系对畸变图像进行校正。The distorted image is corrected according to the corresponding relationship between each point of the calibrated screen and each point in the calibrated image.
可选地,所述获取待标定屏幕的各个点与标定图像中各个点的对应关系,包括:Optionally, the obtaining the corresponding relationship between each point of the screen to be calibrated and each point in the calibration image includes:
获取所述标定图像中与所述两条直线对应的两条曲线,所述两条曲线的交点与所述目标标定点相对应。Two curves corresponding to the two straight lines in the calibration image are acquired, and the intersection point of the two curves corresponds to the target calibration point.
可选地,所述获取待标定屏幕的各个点与标定图像中各个点的对应关系,包括:Optionally, the obtaining the corresponding relationship between each point of the screen to be calibrated and each point in the calibration image includes:
获取待标定屏幕的预设个数的目标标定点与标定图像中各个点的对应关系;Obtain the corresponding relationship between the preset number of target calibration points on the screen to be calibrated and each point in the calibration image;
采用插值法根据所述预设个数的目标标定点与标定图像中各个点的对应关系获取待标定屏幕的各个点与标定图像中各个点的对应关系。The interpolation method is used to obtain the corresponding relationship between each point of the screen to be calibrated and each point in the calibration image according to the corresponding relationship between the preset number of target calibration points and each point in the calibration image.
可选地,所述根据标定后的屏幕的各个点与标定图像中各个点的对应关系对畸变图像进行校正包括:Optionally, correcting the distorted image according to the corresponding relationship between each point of the calibrated screen and each point in the calibrated image includes:
将畸变图像中的各个点的颜色填充至标定后的屏幕的对应点,获得校正后的图像。Fill the color of each point in the distorted image to the corresponding point on the calibrated screen to obtain a corrected image.
本发明实施例提供了一种触控位置识别方法,包括:An embodiment of the present invention provides a touch position recognition method, including:
采用上述方法对采集的触控图像进行校正;Using the above method to correct the collected touch image;
根据校正后的触控图像识别触控位置。A touch position is identified according to the corrected touch image.
本发明实施例提供了一种畸变图像校正装置,包括:An embodiment of the present invention provides a distorted image correction device, including:
直线投射单元,用于针对待标定屏幕的各个目标标定点,向所述待标定屏幕投射两条直线,所述两条直线的交点为目标标定点;A linear projection unit, configured to project two straight lines to the screen to be calibrated for each target calibration point of the screen to be calibrated, and the intersection of the two straight lines is the target calibration point;
对应关系获取单元,用于获取待标定屏幕的各个点与标定图像中各个点的对应关系,所述标定图像为向所述待标定屏幕投射两条直线时采集的所述待标定屏幕的图像;A correspondence relationship acquiring unit, configured to acquire a correspondence relationship between each point of the screen to be calibrated and each point in the calibration image, the calibration image being an image of the screen to be calibrated collected when two straight lines are projected to the screen to be calibrated;
校正单元,用于根据标定后的屏幕的各个点与标定图像中各个点的对应关系对畸变图像进行校正。The correction unit is used to correct the distorted image according to the corresponding relationship between each point of the calibrated screen and each point in the calibrated image.
可选地,所述对应关系获取单元进一步用于:Optionally, the correspondence obtaining unit is further used for:
获取所述标定图像中与所述两条直线对应的两条曲线,所述两条曲线的交点与所述目标标定点相对应。Two curves corresponding to the two straight lines in the calibration image are acquired, and the intersection point of the two curves corresponds to the target calibration point.
可选地,所述对应关系获取单元进一步用于:Optionally, the correspondence obtaining unit is further used for:
获取待标定屏幕的预设个数的目标标定点与标定图像中各个点的对应关系;Obtain the corresponding relationship between the preset number of target calibration points on the screen to be calibrated and each point in the calibration image;
采用插值法根据所述预设个数的目标标定点与标定图像中各个点的对应关系获取待标定屏幕的各个点与标定图像中各个点的对应关系。The interpolation method is used to obtain the corresponding relationship between each point of the screen to be calibrated and each point in the calibration image according to the corresponding relationship between the preset number of target calibration points and each point in the calibration image.
可选地,所述校正单元进一步用于:Optionally, the correction unit is further used for:
将畸变图像中的各个点的颜色填充至标定后的屏幕的对应点,获得校正后的图像。Fill the color of each point in the distorted image to the corresponding point on the calibrated screen to obtain a corrected image.
本发明实施例提供了一种触控位置识别装置,包括:An embodiment of the present invention provides a touch position recognition device, including:
校正单元,用于采用上述装置对采集的触控图像进行校正;A correction unit, configured to correct the collected touch image by using the above-mentioned device;
触控位置识别单元,用于根据校正后的触控图像识别触控位置。The touch position identification unit is used to identify the touch position according to the corrected touch image.
本发明实施例提供的畸变图像校正方法、触控位置识别方法及装置,针对待标定屏幕的各个目标标定点,向所述待标定屏幕投射两条直线,所述两条直线的交点为目标标定点;获取待标定屏幕的各个点与标定图像中各个点的对应关系,所述标定图像为向所述待标定屏幕投射两条直线时采集的所述待标定屏幕的图像;根据标定后的屏幕的各个点与标定图像中各个点的对应关系对畸变图像进行校正。本发明实施例无需对摄像头进行几何校正的情况下,通过向屏幕投射直线的方式对屏幕进行标定,利用标定后的屏幕坐标点对畸变图像进行校正,标定过程抗干扰能力强,校正结果更准确。The distorted image correction method, touch position recognition method and device provided by the embodiments of the present invention project two straight lines to the screen to be calibrated for each target calibration point of the screen to be calibrated, and the intersection of the two straight lines is the target mark. Fixing a point; obtaining the corresponding relationship between each point of the screen to be calibrated and each point in the calibration image, the calibration image being the image of the screen to be calibrated collected when two straight lines are projected to the screen to be calibrated; according to the calibrated screen Correct the distorted image by the corresponding relationship between each point in the calibration image and each point in the calibration image. In the embodiment of the present invention, when the geometric correction of the camera is not required, the screen is calibrated by projecting a straight line to the screen, and the distorted image is corrected by using the calibrated screen coordinate points. The calibration process has strong anti-interference ability and the calibration result is more accurate. .
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are For some embodiments of the present invention, those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1是本发明一个实施例的畸变图像校正方法的流程示意图;FIG. 1 is a schematic flow chart of a distorted image correction method according to an embodiment of the present invention;
图2是本发明一个实施例的获取屏幕区域的原理图;Fig. 2 is a schematic diagram of acquiring a screen area according to an embodiment of the present invention;
图3a、图3b、图3c是本发明一个实施例的获取对应关系的原理图;FIG. 3a, FIG. 3b, and FIG. 3c are schematic diagrams of obtaining corresponding relationships according to an embodiment of the present invention;
图4是本发明一个实施例的对屏幕进行标定的原理图;Fig. 4 is a schematic diagram of calibrating the screen according to an embodiment of the present invention;
图5是本发明一个实施例的触控位置识别方法的流程示意图;FIG. 5 is a schematic flowchart of a touch position recognition method according to an embodiment of the present invention;
图6是本发明一个实施例的畸变图像校正装置的结构示意图;Fig. 6 is a schematic structural diagram of a distorted image correction device according to an embodiment of the present invention;
图7是本发明一个实施例的触控位置识别装置的结构示意图。FIG. 7 is a schematic structural diagram of a touch position recognition device according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
图1是本发明一个实施例的畸变图像校正方法的流程示意图。如图1所示,该实施例的方法包括:FIG. 1 is a schematic flowchart of a method for correcting a distorted image according to an embodiment of the present invention. As shown in Figure 1, the method of this embodiment includes:
S11:针对待标定屏幕的各个目标标定点,向所述待标定屏幕投射两条直线,所述两条直线的交点为目标标定点;S11: For each target calibration point of the screen to be calibrated, project two straight lines to the screen to be calibrated, and the intersection of the two straight lines is the target calibration point;
需要说明的是,本发明实施例的对畸变图像进行校正前,需要对屏幕进行标定,在待标定屏幕上选择目标标定点。It should be noted that before correcting the distorted image in the embodiment of the present invention, it is necessary to calibrate the screen, and select a target calibration point on the screen to be calibrated.
S12:获取待标定屏幕的各个点与标定图像中各个点的对应关系,所述标定图像为向所述待标定屏幕投射两条直线时采集的所述待标定屏幕的图像;S12: Obtain the corresponding relationship between each point of the screen to be calibrated and each point in the calibration image, where the calibration image is an image of the screen to be calibrated collected when two straight lines are projected to the screen to be calibrated;
需要说明的是,本发明实施例获取所述标定图像中与所述两条直线对应的两条曲线,所述两条曲线的交点与所述目标标定点相对应,从而获取待标定屏幕的各个点与标定图像中各个点的对应关系。It should be noted that, in the embodiment of the present invention, the two curves corresponding to the two straight lines in the calibration image are obtained, and the intersection point of the two curves corresponds to the target calibration point, so as to obtain each curve of the screen to be calibrated. The corresponding relationship between points and each point in the calibration image.
在实际应用中,在屏幕附近搭设摄像头,使其能够采集到包括整个屏幕区域的图像。如图2所示,可通过先设置屏幕为黑色,摄像头采集此时的图像A,再设置屏幕为白色,摄像头采集此时的图像B,通过|A-B|可以大概确定绝对值较大值对应的区域为屏幕区域。还可以采用其他方式确定屏幕区域,本发明对此不作限制。In practical applications, a camera is set up near the screen so that it can collect images including the entire screen area. As shown in Figure 2, you can set the screen to black first, and the camera captures image A at this time, then set the screen to white, and the camera captures image B at this time, and you can roughly determine the value corresponding to the larger absolute value by |A-B| Region is the screen area. Other methods may also be used to determine the screen area, which is not limited in the present invention.
可理解的是,在摄像头采集的图像中看,向屏幕投射的直线为圆弧形曲线。如图3a、图3b和图3c所示,对于每个目标标定点,可以分别投射两条直线,通过两条相交于目标标定点的直线,在实际采集图像中用曲线逼近两条畸变直线,屏幕上两个已知直线的交点必然对应于两个圆弧曲线的交点。以图3a为例,向屏幕投射直线L1和L2,L1和L2相交于屏幕的P1点;在摄像头采集的图像中(标定图像),曲线C1对应L1,曲线C2对应L2,曲线C1和曲线C2的交点Q1对应P1,由此,完成了对目标标定点P1的标定。It can be understood that, in the image captured by the camera, the straight line projected to the screen is a circular arc curve. As shown in Figure 3a, Figure 3b and Figure 3c, for each target calibration point, two straight lines can be projected respectively, and through the two straight lines intersecting at the target calibration point, the two distorted straight lines can be approximated by curves in the actual collected image, The intersection of two known straight lines on the screen necessarily corresponds to the intersection of two circular arcs. Take Figure 3a as an example, project straight lines L1 and L2 to the screen, and L1 and L2 intersect at point P1 on the screen; in the image collected by the camera (calibration image), curve C1 corresponds to L1, curve C2 corresponds to L2, curve C1 and curve C2 The intersection point Q1 of is corresponding to P1, thus, the calibration of the target calibration point P1 is completed.
S13:根据标定后的屏幕的各个点与标定图像中各个点的对应关系对畸变图像进行校正。S13: Correct the distorted image according to the corresponding relationship between each point of the calibrated screen and each point in the calibrated image.
本发明实施例提供的畸变图像校正方法,无需对摄像头进行几何校正的情况下,通过向屏幕投射直线的方式对屏幕进行标定,利用标定后的屏幕坐标点对畸变图像进行校正,标定过程抗干扰能力强,校正结果更准确。The distorted image correction method provided by the embodiment of the present invention does not need to perform geometric correction on the camera, and the screen is calibrated by projecting a straight line to the screen, and the distorted image is corrected by using the calibrated screen coordinate points, and the calibration process is anti-interference Strong ability, more accurate calibration results.
在本发明实施例的一种可选的实施方式中,所述获取待标定屏幕的各个点与标定图像中各个点的对应关系,包括:In an optional implementation manner of the embodiment of the present invention, the obtaining the corresponding relationship between each point of the screen to be calibrated and each point in the calibration image includes:
获取待标定屏幕的预设个数的目标标定点与标定图像中各个点的对应关系;Obtain the corresponding relationship between the preset number of target calibration points on the screen to be calibrated and each point in the calibration image;
采用插值法根据所述预设个数的目标标定点与标定图像中各个点的对应关系获取待标定屏幕的各个点与标定图像中各个点的对应关系。The interpolation method is used to obtain the corresponding relationship between each point of the screen to be calibrated and each point in the calibration image according to the corresponding relationship between the preset number of target calibration points and each point in the calibration image.
可理解的是,为了提高对屏幕标定的效率,本发明实施例对预设个数的目标标定点进行标定,然后采用插值法根据屏幕上完成标定的点对未进行标定的点进行标定。如图4所示,本发明实施例对网格的交点完成标定,将网格的各个交点对应至实际采集到的畸变网络,进而可以采用插值法对未进行标定的点进行标定。It can be understood that, in order to improve the efficiency of screen calibration, the embodiment of the present invention calibrates a preset number of target calibration points, and then uses an interpolation method to calibrate uncalibrated points based on the calibrated points on the screen. As shown in FIG. 4 , the embodiment of the present invention completes the calibration of the intersection points of the grid, and corresponds each intersection point of the grid to the actually collected distortion network, and then uses the interpolation method to calibrate the points that have not been calibrated.
具体地,所述根据标定后的屏幕的各个点与标定图像中各个点的对应关系对畸变图像进行校正包括:Specifically, correcting the distorted image according to the corresponding relationship between each point of the calibrated screen and each point in the calibrated image includes:
将畸变图像中的各个点的颜色填充至标定后的屏幕的对应点,获得校正后的图像。Fill the color of each point in the distorted image to the corresponding point on the calibrated screen to obtain a corrected image.
图5是本发明一个实施例的触控位置识别方法的流程示意图。如图5所示,本发明实施例的方法包括:FIG. 5 is a schematic flowchart of a method for identifying a touch position according to an embodiment of the present invention. As shown in Figure 5, the method of the embodiment of the present invention includes:
S51:采用上述方法对采集的触控图像进行校正;S51: Using the above method to correct the collected touch image;
S52:根据校正后的触控图像识别触控位置。S52: Identify the touch position according to the corrected touch image.
本发明实施例提供的触控位置识别方法,无需对摄像头进行几何校正的情况下,通过向屏幕投射直线的方式对屏幕进行标定,利用标定后的屏幕坐标点对畸变图像进行校正,标定过程抗干扰能力强,校正结果更准确,可更准确地对用户的触控位置进行识别。The touch position recognition method provided by the embodiment of the present invention calibrates the screen by projecting a straight line to the screen without geometrically correcting the camera, and uses the calibrated screen coordinate points to correct the distorted image, and the calibration process is resistant to The interference ability is strong, the correction result is more accurate, and the user's touch position can be identified more accurately.
图6是本发明一个实施例的畸变图像校正装置的结构示意图。如图6所示,本发明实施例的装置包括直线投射单元61、对应关系获取单元62和校正单元63,具体地:Fig. 6 is a schematic structural diagram of a distorted image correction device according to an embodiment of the present invention. As shown in FIG. 6, the device of the embodiment of the present invention includes a linear projection unit 61, a correspondence relationship acquisition unit 62, and a correction unit 63, specifically:
直线投射单元61,用于针对待标定屏幕的各个目标标定点,向所述待标定屏幕投射两条直线,所述两条直线的交点为目标标定点;The straight line projection unit 61 is used for projecting two straight lines to the screen to be calibrated for each target calibration point of the screen to be calibrated, and the intersection of the two straight lines is the target calibration point;
对应关系获取单元62,用于获取待标定屏幕的各个点与标定图像中各个点的对应关系,所述标定图像为向所述待标定屏幕投射两条直线时采集的所述待标定屏幕的图像;Correspondence acquisition unit 62, configured to acquire the correspondence between each point of the screen to be calibrated and each point in the calibration image, the calibration image being the image of the screen to be calibrated collected when two straight lines are projected to the screen to be calibrated ;
校正单元63,用于根据标定后的屏幕的各个点与标定图像中各个点的对应关系对畸变图像进行校正。The correction unit 63 is configured to correct the distorted image according to the corresponding relationship between each point of the calibrated screen and each point in the calibrated image.
对应关系获取单元62进一步用于:The corresponding relationship acquiring unit 62 is further used for:
获取所述标定图像中与所述两条直线对应的两条曲线,所述两条曲线的交点与所述目标标定点相对应。Two curves corresponding to the two straight lines in the calibration image are acquired, and the intersection point of the two curves corresponds to the target calibration point.
对应关系获取单元62进一步用于:The corresponding relationship acquiring unit 62 is further used for:
获取待标定屏幕的预设个数的目标标定点与标定图像中各个点的对应关系;Obtain the corresponding relationship between the preset number of target calibration points on the screen to be calibrated and each point in the calibration image;
采用插值法根据所述预设个数的目标标定点与标定图像中各个点的对应关系获取待标定屏幕的各个点与标定图像中各个点的对应关系。The interpolation method is used to obtain the corresponding relationship between each point of the screen to be calibrated and each point in the calibration image according to the corresponding relationship between the preset number of target calibration points and each point in the calibration image.
校正单元63进一步用于:Correction unit 63 is further used for:
将畸变图像中的各个点的颜色填充至标定后的屏幕的对应点,获得校正后的图像。Fill the color of each point in the distorted image to the corresponding point on the calibrated screen to obtain a corrected image.
本发明实施例的畸变图像校正装置可以用于执行上述畸变图像校正方法实施例,其原理和技术效果类似,此处不再赘述。The apparatus for correcting distorted images in the embodiments of the present invention can be used to implement the above embodiments of the methods for correcting distorted images. The principles and technical effects are similar and will not be repeated here.
图7是本发明一个实施例的触控位置识别装置的结构示意图。如图7所示,本发明实施例的装置包括校正单元71和触控位置识别单元72,具体地:FIG. 7 is a schematic structural diagram of a touch position recognition device according to an embodiment of the present invention. As shown in FIG. 7 , the device of the embodiment of the present invention includes a correction unit 71 and a touch position recognition unit 72, specifically:
校正单元71,用于采用上述装置对采集的触控图像进行校正;A correction unit 71, configured to correct the collected touch image by using the above device;
触控位置识别单元72,用于根据校正后的触控图像识别触控位置。The touch position identification unit 72 is configured to identify the touch position according to the corrected touch image.
本发明实施例的触控位置识别装置可以用于执行上述触控位置识别方法实施例,其原理和技术效果类似,此处不再赘述。The touch position recognition device of the embodiment of the present invention can be used to implement the above touch position recognition method embodiment, its principle and technical effect are similar, and will not be repeated here.
本发明实施例提供的畸变图像校正方法、触控位置识别方法及装置,针对待标定屏幕的各个目标标定点,向所述待标定屏幕投射两条直线,所述两条直线的交点为目标标定点;获取待标定屏幕的各个点与标定图像中各个点的对应关系,所述标定图像为向所述待标定屏幕投射两条直线时采集的所述待标定屏幕的图像;根据标定后的屏幕的各个点与标定图像中各个点的对应关系对畸变图像进行校正。本发明实施例无需对摄像头进行几何校正的情况下,通过向屏幕投射直线的方式对屏幕进行标定,利用标定后的屏幕坐标点对畸变图像进行校正,标定过程抗干扰能力强,校正结果更准确。The distorted image correction method, touch position recognition method and device provided by the embodiments of the present invention project two straight lines to the screen to be calibrated for each target calibration point of the screen to be calibrated, and the intersection of the two straight lines is the target mark. Fixing a point; obtaining the corresponding relationship between each point of the screen to be calibrated and each point in the calibration image, the calibration image being the image of the screen to be calibrated collected when two straight lines are projected to the screen to be calibrated; according to the calibrated screen Correct the distorted image by the corresponding relationship between each point in the calibration image and each point in the calibration image. In the embodiment of the present invention, when the geometric correction of the camera is not required, the screen is calibrated by projecting a straight line to the screen, and the distorted image is corrected by using the calibrated screen coordinate points. The calibration process has strong anti-interference ability and the calibration result is more accurate. .
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
需要说明的是术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that the terms "comprising", "comprising" or any other variation thereof are intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, but also includes not expressly other elements listed, or also include elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
本发明的说明书中,说明了大量具体细节。然而能够理解的是,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。类似地,应当理解,为了精简本发明公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。In the description of the invention, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description. Similarly, it should be appreciated that in the above description of exemplary embodiments of the invention, in order to streamline the present disclosure and to facilitate understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together into a single embodiment , figure, or description of it. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
以上实施例仅用于说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be described in the foregoing embodiments Modifications are made to the recorded technical solutions, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710170665.0A CN107146205B (en) | 2017-03-21 | 2017-03-21 | Distorted image correction method, touch position recognition method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710170665.0A CN107146205B (en) | 2017-03-21 | 2017-03-21 | Distorted image correction method, touch position recognition method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107146205A CN107146205A (en) | 2017-09-08 |
CN107146205B true CN107146205B (en) | 2019-12-13 |
Family
ID=59783995
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710170665.0A Active CN107146205B (en) | 2017-03-21 | 2017-03-21 | Distorted image correction method, touch position recognition method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107146205B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101453662A (en) * | 2007-12-03 | 2009-06-10 | 华为技术有限公司 | Stereo video communication terminal, system and method |
CN102298467A (en) * | 2010-06-24 | 2011-12-28 | 北京威亚视讯科技有限公司 | Automatic calibration method and system for display screen |
CN102339169A (en) * | 2010-07-27 | 2012-02-01 | 中国科学院软件研究所 | Method for calibrating large-sized multipoint touch system |
CN104076987A (en) * | 2013-03-25 | 2014-10-01 | 南京瓦迪电子科技有限公司 | Optical touch control device |
CN104568307A (en) * | 2015-01-08 | 2015-04-29 | 鲁东大学 | Curve evaluation method based on embedded system force/displacement detection device |
CN104699323A (en) * | 2013-12-06 | 2015-06-10 | 北京汇冠新技术股份有限公司 | Method for optically positioning touch point based on image processing |
CN106022344A (en) * | 2016-05-24 | 2016-10-12 | 北京仁光科技有限公司 | Corner point positioning method of virtual checkerboard |
-
2017
- 2017-03-21 CN CN201710170665.0A patent/CN107146205B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101453662A (en) * | 2007-12-03 | 2009-06-10 | 华为技术有限公司 | Stereo video communication terminal, system and method |
CN102298467A (en) * | 2010-06-24 | 2011-12-28 | 北京威亚视讯科技有限公司 | Automatic calibration method and system for display screen |
CN102339169A (en) * | 2010-07-27 | 2012-02-01 | 中国科学院软件研究所 | Method for calibrating large-sized multipoint touch system |
CN104076987A (en) * | 2013-03-25 | 2014-10-01 | 南京瓦迪电子科技有限公司 | Optical touch control device |
CN104699323A (en) * | 2013-12-06 | 2015-06-10 | 北京汇冠新技术股份有限公司 | Method for optically positioning touch point based on image processing |
CN104568307A (en) * | 2015-01-08 | 2015-04-29 | 鲁东大学 | Curve evaluation method based on embedded system force/displacement detection device |
CN106022344A (en) * | 2016-05-24 | 2016-10-12 | 北京仁光科技有限公司 | Corner point positioning method of virtual checkerboard |
Also Published As
Publication number | Publication date |
---|---|
CN107146205A (en) | 2017-09-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU2017229995B2 (en) | Perspective correction for curved display screens | |
TWI402793B (en) | Calibrating apparatus and method for image processing apparatus | |
US7893393B2 (en) | System and method for calibrating an image projection system | |
CN104361580B (en) | Real-time correction method of projected image based on flat screen | |
WO2019041650A1 (en) | Method, apparatus and device for correcting calibration parameters of video camera, and storage medium | |
JP7145432B2 (en) | Projection system, image processing device and projection method | |
CN112272292B (en) | Projection correction method, apparatus and storage medium | |
CN104853180B (en) | Correction method for image acquisition system | |
CN103116889A (en) | Positioning method and electronic device | |
KR100996897B1 (en) | Circumferential Distortion Image Correction Method of Wide Angle Lens by Linear Fitting | |
US11284052B2 (en) | Method for automatically restoring a calibrated state of a projection system | |
CN111627073B (en) | Calibration method, calibration device and storage medium based on man-machine interaction | |
CN102158673A (en) | Projection correction system and method | |
CN105407342A (en) | Image calibration system and calibration method of stereo camera | |
CN104574355A (en) | Calibration system of stereo camera and calibration method of stereo camera | |
JP4696018B2 (en) | Observation position following video presentation device, observation position following video presentation program, video presentation device, and video presentation program | |
CN107105210A (en) | Projection correction's method and device | |
CN101727244A (en) | Correction device and correction method | |
CN107967078B (en) | Calibration method for touch points of spliced screen | |
CN107146205B (en) | Distorted image correction method, touch position recognition method and device | |
CN106485648B (en) | Image acquisition device with correction function and correction method of image acquisition device | |
KR20200032442A (en) | 3D information generating device and method capable of self-calibration | |
CN109313811A (en) | Auto-correction method, the apparatus and system of view-based access control model system vibration displacement | |
CN111145268A (en) | Video registration method and device | |
WO2021145304A1 (en) | Image processing system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
OL01 | Intention to license declared | ||
OL01 | Intention to license declared |