WO2023029123A1 - 一种顶点坐标的检测方法、装置、设备及存储介质 - Google Patents

一种顶点坐标的检测方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2023029123A1
WO2023029123A1 PCT/CN2021/119730 CN2021119730W WO2023029123A1 WO 2023029123 A1 WO2023029123 A1 WO 2023029123A1 CN 2021119730 W CN2021119730 W CN 2021119730W WO 2023029123 A1 WO2023029123 A1 WO 2023029123A1
Authority
WO
WIPO (PCT)
Prior art keywords
coordinates
detection
vertex
corner
image
Prior art date
Application number
PCT/CN2021/119730
Other languages
English (en)
French (fr)
Inventor
刘贺
辛磊
曾建伟
Original Assignee
歌尔股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 歌尔股份有限公司 filed Critical 歌尔股份有限公司
Publication of WO2023029123A1 publication Critical patent/WO2023029123A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/10Image enhancement or restoration using non-spatial domain filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Definitions

  • the present invention relates to the technical field of image processing, in particular to a detection method, device, equipment and computer-readable storage medium of vertex coordinates.
  • the object of the present invention is to provide a method, device, equipment and computer-readable storage medium for detecting vertex coordinates, so as to accurately extract the vertex coordinates of polygonal regions in an image, so as to facilitate subsequent extraction of polygonal regions.
  • the present invention provides a detection method of vertex coordinates, comprising:
  • performing corner detection on the acquired image to be detected to obtain corner coordinates includes:
  • the performing straight line detection on the image to be detected, and obtaining the intersection coordinates of the straight line corresponding to the polygonal area include:
  • the polygonal area is specifically a rectangular area.
  • the acquiring the vertex coordinates of the polygonal area according to the corner point coordinates and the intersection point coordinates includes:
  • the target coordinates in each of the detection circles calculate the corresponding vertex coordinates of each of the detection circles; wherein, the target coordinates include the corner point coordinates or the corner point coordinates and the vertex coordinates.
  • using the target coordinates in each of the detection circles to calculate the corresponding vertex coordinates of each of the vertex coordinates includes:
  • the present invention also provides a detection device for vertex coordinates, comprising:
  • a corner point detection module configured to perform corner point detection on the acquired image to be detected, and obtain corner point coordinates; wherein, the image to be detected includes a polygonal area;
  • a straight line detection module configured to perform straight line detection on the image to be detected, and obtain intersection coordinates of straight lines corresponding to the polygonal area;
  • the vertex detection module is configured to acquire the vertex coordinates of the polygonal area according to the corner point coordinates and the intersection point coordinates.
  • the vertex detection module includes:
  • Generating submodules used to generate respective detection circles corresponding to each of the vertex coordinates with each of the vertex coordinates as the center according to the preset radius;
  • the calculation submodule is configured to use the target coordinates in each of the detection circles to calculate the corresponding vertex coordinates of each of the detection circles; wherein, the target coordinates include the corner coordinates or the corner coordinates and the vertex coordinates.
  • the present invention also provides a detection device for vertex coordinates, comprising:
  • a processor configured to implement the steps of the method for detecting vertex coordinates as described above when executing the computer program.
  • the present invention also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for detecting vertex coordinates as described above are realized .
  • a method for detecting vertex coordinates includes: performing corner detection on the acquired image to be detected to obtain corner point coordinates; wherein, the image to be detected includes a polygonal area; performing line detection on the image to be detected to obtain the polygonal area The intersection coordinates of the corresponding straight line; according to the corner coordinates and intersection coordinates, obtain the vertex coordinates of the polygonal area;
  • the present invention uses the corner point coordinates obtained by corner point detection and the intersection point coordinates obtained by line detection to obtain the vertex coordinates of the polygon area in the image to be detected, and detects the polygon in the image more accurately through the combination of corner point detection and line detection.
  • the vertex coordinates of provide a prerequisite for the extraction of the subsequent polygonal area, so that it can be used for color correction of the display screen in the rectangular area.
  • the present invention also provides a detection device, equipment and computer-readable storage medium for vertex coordinates, which also have the above beneficial effects.
  • FIG. 1 is a schematic diagram of an image to be detected provided by an embodiment of the present invention
  • Fig. 2 is a flowchart of a method for detecting vertex coordinates provided by an embodiment of the present invention
  • Fig. 3 is a structural block diagram of a detection device for vertex coordinates provided by an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a detection device for vertex coordinates provided by an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a detection device for vertex coordinates provided by an embodiment of the present invention.
  • FIG. 2 is a flowchart of a method for detecting vertex coordinates provided by an embodiment of the present invention.
  • the method can include:
  • Step 101 Perform corner detection on the acquired image to be detected to obtain corner coordinates; wherein, the image to be detected includes a polygonal area.
  • the image to be detected in this step can be an image that needs to be detected by vertex coordinates; the image to be detected can include a polygonal area (ie, a polygonal part) that needs to be detected by vertex coordinates, such as the rectangular area in Figure 1.
  • a polygonal area ie, a polygonal part
  • the specific shape of the polygonal area in the image to be detected in this embodiment can be set by the designer according to the practical scenario and user needs.
  • the polygonal area in the image to be detected can be a rectangular area, as shown in Figure 1
  • the rectangular area of the display in the image; the polygonal area in the image to be detected can also be other types of polygons such as trapezoidal area, triangular area or hexagonal area, which is not limited in this embodiment.
  • the detection device for the vertex coordinates can detect the corner coordinates in the image to be detected by performing corner detection on the image to be detected.
  • the detection equipment performs corner detection on the image to be detected, and the specific method of obtaining the corner coordinates can be set by the designer according to practical scenarios and user needs.
  • the detection equipment can use the Harris corner detection algorithm to treat Perform corner detection on the detected image to obtain corner coordinates; the detection device can also use other corner detection algorithms such as Moravec (Moravec) corner detection algorithm to perform corner detection on the image to be detected to obtain corner coordinates. This embodiment does not impose any limitation on this.
  • the horizontal difference operator and the vertical difference operator can be used to filter each pixel of the image to be detected to obtain the matrix M, and perform Gaussian smoothing filtering on the matrix M, If using, calculate the matrix M corresponding to each pixel of the image to be detected;
  • the matrix M can be an autocorrelation matrix of pixels, can be a window function, and can use a Gaussian window; can be a horizontal difference operator, and can be a vertical difference calculation Sub;
  • Utilize matrix M the corresponding corner point response matrix R of each pixel of image to be detected;
  • R,,, can be preset parameter, and can be two eigenvalues of matrix M;
  • the target element in matrix R The corresponding pixel point coordinates are used as corner coordinates; wherein, the target element can be the maximum value in the corresponding local area (such as the area of three rows and three columns centered on the original target) and the element greater than the threshold value, and the threshold value can be adopted.
  • this embodiment does not limit the specific sequence of steps 101 and 102, for example, step 101 can be performed first and then step 102 can be performed, step 102 can be performed first and then step 101 can be performed, or step 101 and step 102 can be performed simultaneously.
  • step 103 can use the corner point coordinates and corner point coordinates detected in step 101 and step 102 to obtain the vertex coordinates of the polygonal area, this embodiment does not impose any limitation on this.
  • the method provided by this embodiment may further include a step of acquiring an image to be detected.
  • the detection device of vertex coordinates can directly receive the image to be detected, for example, the detection device can receive the original image taken by the camera, and directly use the original image as the image to be detected.
  • the detection device can also preprocess the received original image to obtain the image to be detected; for example, the detection device can preprocess the original image, filter the area other than the polygonal area in the original image, and generate the image to be detected that only contains the polygonal area. Detect images.
  • Step 102 Perform line detection on the image to be detected, and obtain the intersection coordinates of the lines corresponding to the polygonal area.
  • the coordinates of the intersection point in this step may be the coordinates of the intersection point between the straight lines in the image to be detected obtained by the straight line detection.
  • the detection device can detect the straight lines in the polygonal area in the image to be detected by performing line detection on the image to be detected, so as to obtain the coordinates of the intersection points between the straight lines (ie, intersection point coordinates).
  • the detection equipment in this step can use Hough (Hough E) Transform the straight line detection algorithm, carry out line detection on the image to be detected, obtain the straight line corresponding to the polygonal area; determine the intersection coordinates of the intersection points between the straight lines.
  • Hough E Hough E Transform the straight line detection algorithm
  • the detection device may also use other corner point detection algorithms such as the inchworm crawling line detection algorithm to perform line detection on the image to be detected, and obtain the intersection coordinates of the lines corresponding to the polygonal area. This embodiment does not impose any limitation on this.
  • the image to be detected can be binarized first, so as to perform edge extraction, so that the polygonal area (such as a rectangular area) can be turned into white, and the rest of the area can be turned into black; then Using morphological methods for edge extraction, the extracted edges can be beneficial to line detection.
  • Step 103 Obtain the vertex coordinates of the polygonal area according to the corner point coordinates and the intersection point coordinates.
  • the detection device can use the corner point detected by the corner point and the intersection point obtained by the line detection to detect the vertex position (ie, the vertex coordinate) of the polygonal area in the image to be detected, so as to combine the corner point detection with the line
  • the detection is combined to improve the accuracy of vertex coordinates in polygonal areas.
  • the detection device obtains the vertex coordinates of the polygonal area according to the corner coordinates and the intersection coordinates.
  • the specific method can be set by the designer according to the practical scene and user needs.
  • the detected corner points tend to be on the inner side of the real vertex position, while the intersection points obtained by straight line detection tend to be on the outside of the real vertex position.
  • the detection device can use the intersection point coordinates obtained by the straight line detection as the center of the circle.
  • the appropriate parameter that is, the preset radius
  • the detection algorithm that falls in this circle (that is, the detection circle), so that the corner points or corner points and the center of the circle (that is, the intersection point) in this circle can be used )
  • calculate a vertex position i.e. vertex coordinates
  • the detection device generates a detection circle corresponding to each vertex coordinate respectively with each vertex coordinate as the center of the circle according to the preset radius;
  • the target coordinates in each detection circle are calculated, and the corresponding vertex coordinates of each detection circle are calculated; wherein, the target coordinates include corner coordinates or corner coordinates and vertex coordinates.
  • the detection device can also generate a square area corresponding to each vertex coordinate with each vertex coordinate as the center according to the preset side length; use the target coordinates in each square area to calculate the corresponding vertex coordinates of each detection circle.
  • This embodiment does not impose any limitation on this.
  • the aforementioned preset radius may be the radius of a preset detection circle.
  • the preset radius can be a preset fixed radius value, that is, the detection device can directly search for the stored preset radius.
  • the preset radius can also detect the radius value generated by the device itself.
  • the detection device can generate a preset radius according to the specification information of the image to be detected or the polygonal area; for example, the detection device can detect the shortest line among the straight lines in the obtained polygonal area.
  • Generate a preset radius for example, the preset radius can be one-third of the shortest straight line. This embodiment does not impose any limitation on this.
  • the specific method for the above detection equipment to use the target coordinates in each detection circle to calculate the corresponding vertex coordinates of each detection circle can be set by the designer. Take the mean value of the horizontal and vertical coordinates of the corner point and the center of the circle (i.e. the intersection point) as the vertex coordinates; that is, the detection device can calculate the first average value of the horizontal coordinates and the second average value of the vertical coordinates of the target coordinates in the current detection circle. An average value and a second average value are respectively determined as the abscissa and ordinate of the vertex coordinates corresponding to the current detection circle; wherein, the current detection circle is any detection circle, and the target coordinates in the current detection circle include corner coordinates and vertex coordinates .
  • the detection device may also take the average of the horizontal and vertical coordinates of all detected corner points in each detection circle as the vertex coordinates. This embodiment does not impose any limitation on this.
  • the embodiment of the present invention uses the corner point coordinates obtained by corner point detection and the intersection point coordinates obtained by line detection to obtain the vertex coordinates of the polygonal area in the image to be detected, and the combination of corner point detection and line detection is more accurate.
  • the detection of the vertex coordinates of the polygon in the image provides a prerequisite for the extraction of the subsequent polygon area, so that it can be used for color correction of the display screen in the rectangular area.
  • the embodiment of the present invention also provides a detection device for vertex coordinates.
  • the detection device for vertex coordinates described below and the method for detecting vertex coordinates described above can be referred to in correspondence.
  • FIG. 3 is a structural block diagram of an apparatus for detecting vertex coordinates provided by an embodiment of the present invention.
  • the device can include:
  • the corner detection module 10 is used to perform corner detection on the acquired image to be detected, and obtain corner coordinates; wherein, the image to be detected includes a polygonal area;
  • the line detection module 20 is used to perform line detection on the image to be detected, and obtain the intersection coordinates of the lines corresponding to the polygonal area;
  • the vertex detection module 30 is configured to obtain the vertex coordinates of the polygonal area according to the corner point coordinates and the intersection point coordinates.
  • the corner detection module 10 may be specifically configured to use the Harris corner detection algorithm to perform corner detection on the image to be detected to obtain corner coordinates.
  • the line detection module 20 may be specifically configured to use the Hough transform line detection algorithm to perform line detection on the image to be detected, obtain the line corresponding to the polygonal area, and determine the intersection coordinates of the intersection points between the lines.
  • the vertex detection module 30 may include:
  • the calculation sub-module is used to calculate the corresponding vertex coordinates of each detection circle by using the target coordinates in each detection circle; wherein, the target coordinates include corner point coordinates or corner point coordinates and vertex coordinates.
  • the calculation submodule can be specifically used to calculate the first average value of the abscissa and the second average value of the ordinate of the target coordinates in the current detection circle, and determine the first average value and the second average value as the current The abscissa and ordinate of the vertex coordinates corresponding to the detection circle; wherein, the current detection circle is any detection circle, and the target coordinates in the current detection circle include corner coordinates and vertex coordinates.
  • the embodiment of the present invention uses the vertex detection module 30 to obtain the vertex coordinates of the polygonal area in the image to be detected according to the corner point coordinates obtained by the corner point detection and the intersection point coordinates obtained by the line detection, and combines the corner point detection and the line detection
  • the vertex coordinates of the polygons in the image are more accurately detected in a more accurate way, which provides a prerequisite for the subsequent extraction of the polygonal area, so that it can be used for color correction of the display screen in the rectangular area.
  • the embodiment of the present invention also provides a detection device for vertex coordinates.
  • the detection device for vertex coordinates described below and the method for detecting vertex coordinates described above can be referred to in correspondence.
  • FIG. 4 is a schematic structural diagram of a detection device for vertex coordinates provided by an embodiment of the present invention.
  • the detection equipment may include:
  • memory D1 for storing computer programs
  • the processor D2 is configured to implement the steps of the method for detecting vertex coordinates provided by the above method embodiments when executing the computer program.
  • FIG. 5 is a schematic structural diagram of a detection device for vertex coordinates provided by an embodiment of the present invention.
  • the detection device 210 for vertex coordinates may have relatively large differences due to different configurations or performances.
  • One or more processors (central processing units, CPU) 222 for example, one or more processors) and memory 232 may be included, and one or more storage media 230 for storing application programs 242 or data 244 (for example, one or more above mass storage devices).
  • the memory 232 and the storage medium 230 may be temporary storage or persistent storage.
  • the program stored in the storage medium 230 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the data processing device.
  • the central processing unit 222 may be configured to communicate with the storage medium 230, and execute a series of instruction operations in the storage medium 230 on the vertex coordinate detection device 210.
  • the detection device 210 for vertex coordinates may also include one or more power sources 226 , one or more wired or wireless network interfaces 250 , one or more input/output interfaces 258 , and/or, one or more operating systems 241 .
  • one or more power sources 226 may also include one or more wired or wireless network interfaces 250 , one or more input/output interfaces 258 , and/or, one or more operating systems 241 .
  • Windows system for example, Windows system.
  • the steps in the method for detecting vertex coordinates described above can be realized by the structure of the device for detecting vertex coordinates.
  • the embodiment of the present invention also provides a computer-readable storage medium.
  • the computer-readable storage medium described below and the method for detecting vertex coordinates described above can be referred to in correspondence.
  • a computer-readable storage medium where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for detecting vertex coordinates provided by the above method embodiments are implemented.
  • the computer-readable storage medium can specifically be a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, etc., which can store various program codes.
  • readable storage media can specifically be a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, etc., which can store various program codes. readable storage media.
  • each embodiment in the description is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other.
  • the description is relatively simple, and for relevant details, please refer to the description of the method part.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)

Abstract

一种顶点坐标的检测方法、装置、设备及计算机可读存储介质,该方法包括:对获取的待检测图像进行角点检测,获取角点坐标;其中,待检测图像包括多边形区域(S101);对待检测图像进行直线检测,获取多边形区域对应的直线的交点坐标(S102);根据角点坐标和交点坐标,获取多边形区域的顶点坐标(S103);本方法利用角点检测得到的角点坐标和直线检测得到的交点坐标,获取待检测图像中多边形区域的顶点坐标,通过角点检测和直线检测结合的方式更加准确的检测到图像中多边形的顶点坐标,为后续多边形区域的提取提供了先决条件,从而能够用于对矩形区域的显示屏进行颜色校正。

Description

一种顶点坐标的检测方法、装置、设备及存储介质
本申请要求于2021年8月30日提交中国专利局、申请号为202111004774.8、发明名称为“一种顶点坐标的检测方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及图像处理技术领域,特别涉及一种顶点坐标的检测方法、装置、设备及计算机可读存储介质。
背景技术
目前,在对显示屏进行颜色校准时,需要用相机拍摄得到显示屏的图像。如图1所示,图像中矩形区域是显示屏,其余部分是无用信息,需要把其中的显示屏部分,也就是矩形区域分离出来进行颜色校准;而提取其中矩形区域,需要得到其顶点坐标。
因此,如何能够准确的提取图像中多边形区域的顶点坐标,以方便后续对多边形区域的提取,是现今急需解决的问题。
发明内容
本发明的目的是提供一种顶点坐标的检测方法、装置、设备及计算机可读存储介质,以准确的提取图像中多边形区域的顶点坐标,以方便后续对多边形区域的提取。
为解决上述技术问题,本发明提供一种顶点坐标的检测方法,包括:
对获取的待检测图像进行角点检测,获取角点坐标;其中,所述待检测图像包括多边形区域;
对所述待检测图像进行直线检测,获取所述多边形区域对应的直线的交点坐标;
根据所述角点坐标和所述交点坐标,获取所述多边形区域的顶点坐标。
可选的,所述对获取的待检测图像进行角点检测,获取角点坐标,包括:
利用Harris角点检测算法,对所述待检测图像进行角点检测,获取所述角点坐标。
可选的,所述对所述待检测图像进行直线检测,获取所述多边形区域对应的直线的交点坐标,包括:
利用Hough变换直线检测算法,对所述待检测图像进行直线检测,获取所述多边形区域对应的直线;
确定所述直线之间的交点的交点坐标。
可选的,所述多边形区域具体为矩形区域。
可选的,所述根据所述角点坐标和所述交点坐标,获取所述多边形区域的顶点坐标,包括:
根据预设半径,分别以各所述顶点坐标为圆心,生成各所述顶点坐标各自对应的检测圆;
利用每个所述检测圆中的目标坐标,计算各所述检测圆各自对应的顶点坐标;其中,所述目标坐标包括所述角点坐标或所述角点坐标和所述顶点坐标。
可选的,所述利用每个所述检测圆中的目标坐标,计算各所述顶点坐标各自对应的顶点坐标,包括:
计算当前检测圆中的目标坐标的横坐标的第一平均值和纵坐标的第二平均值,将所述第一平均值和所述第二平均值分别确定为当前检测圆对应的顶点坐标的横坐标和纵坐标;其中,当前检测圆为任一所述检测圆,当前检测圆中的目标坐标包括所述角点坐标和所述顶点坐标。
本发明还提供了一种顶点坐标的检测装置,包括:
角点检测模块,用于对获取的待检测图像进行角点检测,获取角点坐标;其中,所述待检测图像包括多边形区域;
直线检测模块,用于对所述待检测图像进行直线检测,获取所述多边形区域对应的直线的交点坐标;
顶点检测模块,用于根据所述角点坐标和所述交点坐标,获取所述多边形区域的顶点坐标。
可选的,所述顶点检测模块,包括:
生成子模块,用于根据预设半径,分别以各所述顶点坐标为圆心,生成 各所述顶点坐标各自对应的检测圆;
计算子模块,用于利用每个所述检测圆中的目标坐标,计算各所述检测圆各自对应的顶点坐标;其中,所述目标坐标包括所述角点坐标或所述角点坐标和所述顶点坐标。
本发明还提供了一种顶点坐标的检测设备,包括:
存储器,用于存储计算机程序;
处理器,用于执行所述计算机程序时实现如上述所述的顶点坐标的检测方法的步骤。
此外,本发明还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上述所述的顶点坐标的检测方法的步骤。
本发明所提供的一种顶点坐标的检测方法,包括:对获取的待检测图像进行角点检测,获取角点坐标;其中,待检测图像包括多边形区域;对待检测图像进行直线检测,获取多边形区域对应的直线的交点坐标;根据角点坐标和交点坐标,获取多边形区域的顶点坐标;
可见,本发明利用角点检测得到的角点坐标和直线检测得到的交点坐标,获取待检测图像中多边形区域的顶点坐标,通过角点检测和直线检测结合的方式更加准确的检测到图像中多边形的顶点坐标,为后续多边形区域的提取提供了先决条件,从而能够用于对矩形区域的显示屏进行颜色校正。此外,本发明还提供了一种顶点坐标的检测装置、设备及计算机可读存储介质,同样具有上述有益效果。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1为本发明实施例所提供的一种待检测图像的示意图;
图2为本发明实施例所提供的一种顶点坐标的检测方法的流程图;
图3为本发明实施例所提供的一种顶点坐标的检测装置的结构框图;
图4为本发明实施例所提供的一种顶点坐标的检测设备的结构示意图;
图5为本发明实施例所提供的一种顶点坐标的检测设备的具体结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
请参考图2,图2为本发明实施例所提供的一种顶点坐标的检测方法的流程图。该方法可以包括:
步骤101:对获取的待检测图像进行角点检测,获取角点坐标;其中,待检测图像包括多边形区域。
可以理解的是,本步骤中的待检测图像可以为需要进行顶点坐标检测的图像;待检测图像中可以包括需要检测出顶点坐标的多边形区域(即多边形部分),如图1中的矩形区域。
具体的,对于本实施例中待检测图像中的多边形区域的具体形状,可以由设计人员根据实用场景和用户需求自行设置,如待检测图像中的多边形区域可以为矩形区域,如图1所示的图像中显示器的矩形区域;待检测图像中的多边形区域也可以为梯形区域、三角形区域或六边形区域等其他类型的多边形,本实施例对此不做任何限制。
需要说明的是,本步骤中顶点坐标的检测设备可以通过对待检测图像进行角点检测,检测出待检测图像中的角点坐标。对于本步骤中检测设备对获取的待检测图像进行角点检测,获取角点坐标的具体方式,可以由设计人员根据实用场景和用户需求自行设置,如检测设备可以利用Harris角点检测算法,对待检测图像进行角点检测,获取角点坐标;检测设备也可以利用如Moravec(莫拉维克)角点检测算法的其他角点检测算法,对待检测图像进行角点检测,获取角点坐标。本实施例对此不做任何限制。
具体的,本步骤中检测设备采用Harris角点检测算法时,可以利用水平差分算子和垂直差分算子对待检测图像的每个像素进行滤波求得矩阵M,并对 矩阵M进行高斯平滑滤波,如利用,计算待检测图像的各像素对应的矩阵M;其中,矩阵M可以为像素点的自相关矩阵,可以为窗函数,可以选用高斯窗口;可以为水平差分算子,可以为垂直差分算子;利用矩阵M,待检测图像的各像素对应的角点响应矩阵R;其中,R,,,可以为预设参数,和可以为矩阵M的两个特征值;将矩阵R中的目标元素对应的像素点坐标作为角点坐标;其中,目标元素可以为对应的局部区域(如以目标原始为中心的三行三列的区域)中的最大值且大于阈值的元素,该阈值可以采用较小的数值,以保证多边形区域的各顶点附近的角点均能够被检测到,方便后续的处理。
其中,本实施例并不限定步骤101与步骤102的具体先后顺序,如可以先进行步骤101再进行步骤102,也可以先进行步骤102再进行步骤101,还可以步骤101和步骤102同时进行。只要步骤103可以利用步骤101和步骤102检测到的角点坐标和角点坐标,获取多边形区域的顶点坐标,本实施例对此不做任何限制。
对应的,本实施例所提供的方法在步骤101和步骤102之前,还可以包括获取待检测图像的步骤。如顶点坐标的检测设备可以直接接收待检测图像,例如检测设备可以接收相机拍摄的原始图像,并直接将原始图像作为待检测图像。检测设备也可以对接收的原始图像进行预处理,获取待检测图像;例如检测设备可以对原始图像进行预处理,将原始图像中多边形区域之外的其他区域进行过滤,生成仅包含多边形区域的待检测图像。
步骤102:对待检测图像进行直线检测,获取多边形区域对应的直线的交点坐标。
可以理解的是,本步骤中的交点坐标可以为直线检测得到的待检测图像中直线之间的交点的坐标。本步骤中检测设备可以通过对待检测图像进行直线检测,检测出待检测图像中的多边形区域的直线,从而得到直线之间交点的坐标(即交点坐标)。
具体的,对于本步骤中检测设备对待检测图像进行直线检测,获取多边形区域对应的直线的交点坐标的具体方式,可以由设计人员根据实用场景和用户需求自行设置,如检测设备可以利用Hough(霍夫)变换直线检测算法,对待检测图像进行直线检测,获取多边形区域对应的直线;确定直线之间的 交点的交点坐标。检测设备也可以利用如尺蠖蠕行直线检测算法的其他角点检测算法,对待检测图像进行直线检测,获取多边形区域对应的直线的交点坐标。本实施例对此不做任何限制。
具体的,检测设备采用Hough变换直线检测算法时,可以先对待检测图像进行二值化,以便于进行边缘提取,使多边形区域(如矩形区域)可以变为白色,其余区域可以变为黑色;然后使用形态学方法进行边缘提取,提取的边缘可以有利于进行直线检测。
步骤103:根据角点坐标和交点坐标,获取多边形区域的顶点坐标。
可以理解的是,本步骤中检测设备可以利用角点检测得到的角点和直线检测得到的交点,检测出待检测图像中多边形区域的顶点位置(即顶点坐标),以将角点检测和直线检测相结合,提高多边形区域的顶点坐标准确的准确性。
具体的,对于本步骤中检测设备根据角点坐标和交点坐标,获取多边形区域的顶点坐标的具体方式,可以由设计人员根据实用场景和用户需求自行设置,如经过试验发现,通过角点检测算法检测出的角点更倾向于在真实顶点位置的内侧,而通过直线检测求取的交点更倾向于在真实顶点位置的外侧,本步骤中检测设备可以以直线检测求得的交点坐标为圆心,设置合适参数(即预设半径)为半径,检测落在此圆(即检测圆)中的角点检测算法检测到的角点,从而利用此圆中的角点或角点和圆心(即交点),计算得到此圆对应的多边形区域的一个顶点位置(即顶点坐标);也就是说,检测设备根据预设半径,分别以各顶点坐标为圆心,生成各顶点坐标各自对应的检测圆;利用每个检测圆中的目标坐标,计算各检测圆各自对应的顶点坐标;其中,目标坐标包括角点坐标或角点坐标和顶点坐标。检测设备也可以根据预设边长,分别以各顶点坐标为中心,生成各顶点坐标各自对应的正方形区域;利用每个正方形区域中的目标坐标,计算各检测圆各自对应的顶点坐标。本实施例对此不做任何限制。
对应的,上述预设半径可以为预先设置的检测圆的半径。本实施例并不限定预设半径的具体获取方式,如预设半径可以为预先设置的一个固定的半径值,即检测设备可以直接查找存储的预设半径。预设半径也可以检测设备自行生成的半径值,如检测设备可以根据待检测图像或多边形区域的规格信息,生成预设半径;例如检测设备可以直线检测得到的多边形区域的直线中 的最短直线,生成预设半径,比如预设半径可以为最短直线的三分之一。本实施例对此不做任何限制。
相应的,对于上述检测设备利用每个检测圆中的目标坐标,计算各检测圆各自对应的顶点坐标的具体方式,可以由设计人员自行设置,如检测设备可以将每个检测圆中所有检测到的角点和圆心(即交点)的横纵坐标取均值作为顶点坐标;即检测设备可以计算当前检测圆中的目标坐标的横坐标的第一平均值和纵坐标的第二平均值,将第一平均值和第二平均值分别确定为当前检测圆对应的顶点坐标的横坐标和纵坐标;其中,当前检测圆为任一检测圆,当前检测圆中的目标坐标包括角点坐标和顶点坐标。检测设备也可以将每个检测圆中所有检测到的角点的横纵坐标取均值作为顶点坐标。本实施例对此不做任何限制。
本实施例中,本发明实施例利用角点检测得到的角点坐标和直线检测得到的交点坐标,获取待检测图像中多边形区域的顶点坐标,通过角点检测和直线检测结合的方式更加准确的检测到图像中多边形的顶点坐标,为后续多边形区域的提取提供了先决条件,从而能够用于对矩形区域的显示屏进行颜色校正。
相应于上面的方法实施例,本发明实施例还提供了一种顶点坐标的检测装置,下文描述的一种顶点坐标的检测装置与上文描述的一种顶点坐标的检测方法可相互对应参照。
请参考图3,图3为本发明实施例所提供的一种顶点坐标的检测装置的结构框图。该装置可以包括:
角点检测模块10,用于对获取的待检测图像进行角点检测,获取角点坐标;其中,待检测图像包括多边形区域;
直线检测模块20,用于对待检测图像进行直线检测,获取多边形区域对应的直线的交点坐标;
顶点检测模块30,用于根据角点坐标和交点坐标,获取多边形区域的顶点坐标。
可选的,角点检测模块10可以具体用于利用Harris角点检测算法,对待检测图像进行角点检测,获取角点坐标。
可选的,直线检测模块20可以具体用于利用Hough变换直线检测算法,对待检测图像进行直线检测,获取多边形区域对应的直线;确定直线之间的交点的交点坐标。
可选的,顶点检测模块30可以包括:
生成子模块,用于根据预设半径,分别以各顶点坐标为圆心,生成各顶点坐标各自对应的检测圆;
计算子模块,用于利用每个检测圆中的目标坐标,计算各检测圆各自对应的顶点坐标;其中,目标坐标包括角点坐标或角点坐标和顶点坐标。
可选的,计算子模块可以具体用于计算当前检测圆中的目标坐标的横坐标的第一平均值和纵坐标的第二平均值,将第一平均值和第二平均值分别确定为当前检测圆对应的顶点坐标的横坐标和纵坐标;其中,当前检测圆为任一检测圆,当前检测圆中的目标坐标包括角点坐标和顶点坐标。
本实施例中,本发明实施例通过顶点检测模块30根据角点检测得到的角点坐标和直线检测得到的交点坐标,获取待检测图像中多边形区域的顶点坐标,通过角点检测和直线检测结合的方式更加准确的检测到图像中多边形的顶点坐标,为后续多边形区域的提取提供了先决条件,从而能够用于对矩形区域的显示屏进行颜色校正。
相应于上面的方法实施例,本发明实施例还提供了一种顶点坐标的检测设备,下文描述的一种顶点坐标的检测设备与上文描述的一种顶点坐标的检测方法可相互对应参照。
请参考图4,图4为本发明实施例所提供的一种顶点坐标的检测设备的结构示意图。该检测设备可以包括:
存储器D1,用于存储计算机程序;
处理器D2,用于执行计算机程序时实现上述方法实施例所提供的顶点坐标的检测方法的步骤。
具体的,请参考图5,图5为本发明实施例所提供的一种顶点坐标的检测设备的具体结构示意图,该顶点坐标的检测设备210可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)222(例如,一个或一个以上处理器)和存储器232,一个或一个以上 存储应用程序242或数据244的存储介质230(例如一个或一个以上海量存储设备)。其中,存储器232和存储介质230可以是短暂存储或持久存储。存储在存储介质230的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对数据处理设备中的一系列指令操作。更进一步地,中央处理器222可以设置为与存储介质230通信,在顶点坐标的检测设备210上执行存储介质230中的一系列指令操作。
顶点坐标的检测设备210还可以包括一个或一个以上电源226,一个或一个以上有线或无线网络接口250,一个或一个以上输入输出接口258,和/或,一个或一个以上操作系统241。例如,Windows系统。
上文所描述的顶点坐标的检测方法中的步骤可以由顶点坐标的检测设备的结构实现。
相应于上面的方法实施例,本发明实施例还提供了一种计算机可读存储介质,下文描述的一种计算机可读存储介质与上文描述的一种顶点坐标的检测方法可相互对应参照。
一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现上述方法实施例所提供的顶点坐标的检测方法的步骤。
该计算机可读存储介质具体可以为U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可存储程序代码的可读存储介质。
说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置、设备及计算机可读存储介质而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。
以上对本发明所提供的一种顶点坐标的检测方法、装置、设备及计算机可读存储介质进行了详细介绍。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发 明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。

Claims (10)

  1. 一种顶点坐标的检测方法,其特征在于,包括:
    对获取的待检测图像进行角点检测,获取角点坐标;其中,所述待检测图像包括多边形区域;
    对所述待检测图像进行直线检测,获取所述多边形区域对应的直线的交点坐标;
    根据所述角点坐标和所述交点坐标,获取所述多边形区域的顶点坐标。
  2. 根据权利要求1所述的顶点坐标的检测方法,其特征在于,所述对获取的待检测图像进行角点检测,获取角点坐标,包括:
    利用Harris角点检测算法,对所述待检测图像进行角点检测,获取所述角点坐标。
  3. 根据权利要求1所述的顶点坐标的检测方法,其特征在于,所述对所述待检测图像进行直线检测,获取所述多边形区域对应的直线的交点坐标,包括:
    利用Hough变换直线检测算法,对所述待检测图像进行直线检测,获取所述多边形区域对应的直线;
    确定所述直线之间的交点的交点坐标。
  4. 根据权利要求1所述的顶点坐标的检测方法,其特征在于,所述多边形区域具体为矩形区域。
  5. 根据权利要求1至4任一项所述的顶点坐标的检测方法,其特征在于,所述根据所述角点坐标和所述交点坐标,获取所述多边形区域的顶点坐标,包括:
    根据预设半径,分别以各所述顶点坐标为圆心,生成各所述顶点坐标各自对应的检测圆;
    利用每个所述检测圆中的目标坐标,计算各所述检测圆各自对应的顶点坐标;其中,所述目标坐标包括所述角点坐标或所述角点坐标和所述顶点坐标。
  6. 根据权利要求5所述的顶点坐标的检测方法,其特征在于,所述利用每个所述检测圆中的目标坐标,计算各所述顶点坐标各自对应的顶点坐标, 包括:
    计算当前检测圆中的目标坐标的横坐标的第一平均值和纵坐标的第二平均值,将所述第一平均值和所述第二平均值分别确定为当前检测圆对应的顶点坐标的横坐标和纵坐标;其中,当前检测圆为任一所述检测圆,当前检测圆中的目标坐标包括所述角点坐标和所述顶点坐标。
  7. 一种顶点坐标的检测装置,其特征在于,包括:
    角点检测模块,用于对获取的待检测图像进行角点检测,获取角点坐标;其中,所述待检测图像包括多边形区域;
    直线检测模块,用于对所述待检测图像进行直线检测,获取所述多边形区域对应的直线的交点坐标;
    顶点检测模块,用于根据所述角点坐标和所述交点坐标,获取所述多边形区域的顶点坐标。
  8. 根据权利要求7所述的顶点坐标的检测装置,其特征在于,所述顶点检测模块,包括:
    生成子模块,用于根据预设半径,分别以各所述顶点坐标为圆心,生成各所述顶点坐标各自对应的检测圆;
    计算子模块,用于利用每个所述检测圆中的目标坐标,计算各所述检测圆各自对应的顶点坐标;其中,所述目标坐标包括所述角点坐标或所述角点坐标和所述顶点坐标。
  9. 一种顶点坐标的检测设备,其特征在于,包括:
    存储器,用于存储计算机程序;
    处理器,用于执行所述计算机程序时实现如权利要求1至6任一项所述的顶点坐标的检测方法的步骤。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至6任一项所述的顶点坐标的检测方法的步骤。
PCT/CN2021/119730 2021-08-30 2021-09-23 一种顶点坐标的检测方法、装置、设备及存储介质 WO2023029123A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111004774.8A CN115731256A (zh) 2021-08-30 2021-08-30 一种顶点坐标的检测方法、装置、设备及存储介质
CN202111004774.8 2021-08-30

Publications (1)

Publication Number Publication Date
WO2023029123A1 true WO2023029123A1 (zh) 2023-03-09

Family

ID=85290834

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/119730 WO2023029123A1 (zh) 2021-08-30 2021-09-23 一种顶点坐标的检测方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN115731256A (zh)
WO (1) WO2023029123A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116894939B (zh) * 2023-09-11 2024-01-09 深圳精智达技术股份有限公司 一种异形屏的区域定位方法、装置、电子设备和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105069799A (zh) * 2015-08-13 2015-11-18 深圳市华汉伟业科技有限公司 一种角点定位方法及装置
CN105096299A (zh) * 2014-05-08 2015-11-25 北京大学 多边形检测方法和多边形检测装置
CN107631782A (zh) * 2017-07-18 2018-01-26 南京邮电大学 一种基于Harris角点检测的水位检测方法
CN112001933A (zh) * 2020-09-09 2020-11-27 成都市精卫鸟科技有限责任公司 一种图像截取方法、装置、设备和介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105096299A (zh) * 2014-05-08 2015-11-25 北京大学 多边形检测方法和多边形检测装置
CN105069799A (zh) * 2015-08-13 2015-11-18 深圳市华汉伟业科技有限公司 一种角点定位方法及装置
CN107631782A (zh) * 2017-07-18 2018-01-26 南京邮电大学 一种基于Harris角点检测的水位检测方法
CN112001933A (zh) * 2020-09-09 2020-11-27 成都市精卫鸟科技有限责任公司 一种图像截取方法、装置、设备和介质

Also Published As

Publication number Publication date
CN115731256A (zh) 2023-03-03

Similar Documents

Publication Publication Date Title
US10803554B2 (en) Image processing method and device
WO2021227360A1 (zh) 一种交互式视频投影方法、装置、设备及存储介质
US11164323B2 (en) Method for obtaining image tracking points and device and storage medium thereof
EP3576017A1 (en) Method, apparatus, and device for determining pose of object in image, and storage medium
TW202011733A (zh) 對影像進行目標取樣的方法及裝置
US20170208207A1 (en) Method and device for correcting document image captured by image pick-up device
CN112348815A (zh) 图像处理方法、图像处理装置以及非瞬时性存储介质
CN108986152B (zh) 一种基于差分图像的异物检测方法及装置
WO2021175180A1 (zh) 视线确定方法、装置、电子设备和计算机可读存储介质
US11861810B2 (en) Image dehazing method, apparatus, and device, and computer storage medium
WO2019128495A1 (zh) 图像清晰度检测方法、装置、存储介质及电子设备
EP3182365B1 (en) Writing board detection and correction
WO2017050083A1 (zh) 一种元件识别方法及装置
CN111814905A (zh) 目标检测方法、装置、计算机设备和存储介质
EP3523777A1 (en) System and method for rectifying a wide-angle image
WO2023029123A1 (zh) 一种顶点坐标的检测方法、装置、设备及存储介质
CN108304840B (zh) 一种图像数据处理方法以及装置
CN112215308A (zh) 一种吊装物体单阶检测方法、装置、电子设备及存储介质
CN113850238A (zh) 文档检测方法、装置、电子设备及存储介质
CN114037992A (zh) 仪表示数识别方法、装置、电子设备及存储介质
US11893884B2 (en) Method for acquiring three-dimensional perception information based on external parameters of roadside camera, and roadside device
US20200294186A1 (en) Method of plane tracking
CN113850805B (zh) 多文档检测方法、装置、电子设备及存储介质
CN115063822A (zh) 文档检测方法、装置、电子设备及存储介质
CN111429450A (zh) 角点检测的方法、系统、设备及存储介质

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: 21955653

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE