CN114445499A - Checkerboard angular point automatic extraction method, system, equipment and medium - Google Patents

Checkerboard angular point automatic extraction method, system, equipment and medium Download PDF

Info

Publication number
CN114445499A
CN114445499A CN202011116627.5A CN202011116627A CN114445499A CN 114445499 A CN114445499 A CN 114445499A CN 202011116627 A CN202011116627 A CN 202011116627A CN 114445499 A CN114445499 A CN 114445499A
Authority
CN
China
Prior art keywords
checkerboard
area
image
central
corner
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.)
Pending
Application number
CN202011116627.5A
Other languages
Chinese (zh)
Inventor
李品品
朱力
吕方璐
汪博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Guangjian Technology Co Ltd
Original Assignee
Shenzhen Guangjian Technology Co Ltd
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 Shenzhen Guangjian Technology Co Ltd filed Critical Shenzhen Guangjian Technology Co Ltd
Priority to CN202011116627.5A priority Critical patent/CN114445499A/en
Publication of CN114445499A publication Critical patent/CN114445499A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/564Depth or shape recovery from multiple images from contours
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20164Salient point detection; Corner detection

Landscapes

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

Abstract

The invention provides a checkerboard angular point automatic extraction method, a system, equipment and a medium, comprising the following steps: acquiring a checkerboard image, carrying out binarization processing on the checkerboard image to generate a checkerboard binarization image, and extracting a plurality of contours from the checkerboard binarization image; screening out a grid profile from the plurality of profiles, and further determining a central point of each grid profile; determining a thick corner point of each grid area according to the center points of the four adjacent grid outlines; and extracting sub-pixels of each coarse corner, and determining a target corner of each grid region according to the sub-pixels of the coarse corners. In the invention, a plurality of outlines are extracted from the checkerboard binary image, the check outlines are screened from the outlines, and then the center point of each check outline is determined, so that the thick corner point of each check area can be determined, and the target corner point is determined, thereby realizing the automatic extraction of the corner points of the checkerboard without knowing the number of the checkerboards in the checkerboard.

Description

Checkerboard angular point automatic extraction method, system, equipment and medium
Technical Field
The invention relates to camera calibration, in particular to a checkerboard corner point automatic extraction method, a checkerboard corner point automatic extraction system, checkerboard corner point automatic extraction equipment and a checkerboard corner point automatic extraction medium.
Background
In image measurement process and machine vision application, in order to determine the correlation between the three-dimensional geometric position of a certain point on the surface of a space object and the corresponding point in an image, a geometric model of camera imaging must be established, and the parameters of the geometric model are the parameters of the camera. Under most conditions, the parameters must be obtained through experiments and calculation, and the process of solving the parameters is called camera calibration.
When the camera is calibrated, a calibration board is usually used for calibration. The camera shoots the array flat plate with the fixed-spacing pattern, and a geometric model of the camera can be obtained through calculation of a calibration algorithm, so that high-precision measurement and reconstruction results are obtained.
The commonly used calibration boards include checkerboard calibration boards, circular mark point calibration boards, two-dimensional code calibration boards, code mark point calibration boards, and the like. When the checkerboard calibration plate is used for camera calibration, collected checkerboard image corner points are required to be marked manually in the prior art or when the number of the checkerboard image grids is small and only occupies a part of the camera view, the corner points of the checkerboard image can be detected in an image identification mode to identify the corner points of the checkerboard image. However, when the checkerboard image fills the entire camera field of view, there is often an error in identifying the corner points, so that each of the checkerboard regions in the checkerboard image cannot be labeled.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a method, a system, equipment and a medium for automatically extracting checkerboard corner points.
The method for automatically extracting the angular points of the checkerboard provided by the invention comprises the following steps:
step S1: acquiring a checkerboard image, carrying out binarization processing on the checkerboard image to generate a checkerboard binarization image, and extracting a plurality of contours from the checkerboard binarization image;
step S2: screening out a grid profile from the plurality of profiles, and further determining a central point of each grid profile;
step S3: determining a thick corner point of each grid area according to the center points of the four adjacent grid outlines;
step S4: and extracting sub-pixels of each coarse corner, and determining a target corner of each grid region according to the sub-pixels of the coarse corners.
Preferably, the step S1 includes the steps of:
step S101: carrying out binarization processing on the checkerboard image through a preset first gray value threshold value to generate a first checkerboard binarized image, wherein the outline of a white checkerboard area in the first checkerboard binarized image is isolated by the outline of a black checkerboard, and the black checkerboard areas are connected to form an integral area;
step S102: carrying out binarization processing on the checkerboard image through a preset second gray value threshold value to generate a second checkerboard binarized image, wherein the outline of a black checkerboard area in the second checkerboard binarized image is isolated by the outline of a white checkerboard area, and the white checkerboard areas are connected to form an integral area;
step S103: and extracting the grid outline of each white checkerboard region from the first checkerboard binary image, and extracting the grid outline of each black checkerboard region from the second checkerboard binary image.
Preferably, the step S2 includes the steps of:
step S201: extracting a plurality of contours from the checkerboard binary image, calculating the area A of each contour,
step S202: the area A is in the interval of [0.2A ]median,Amedian]Inner contour extraction, AmedianIs the median of all contour areas;
step S203: screening the extracted outline according to a preset area screening formula to determine the lattice outline, wherein the area screening formula is as follows:
Amedian-2σ<A<Amedian+2σ,σx<0.02×L3,σy<0.02×L3
wherein σxIs a variance, σ, of the profile X directionyIs the variance in the Y direction of a profile, σ is the variance of the area of all profiles,
Figure BDA0002730508200000021
preferably, the method further comprises the following steps:
step M1: determining a central checkerboard area of the checkerboard binary image, wherein the central checkerboard area is provided with a preset marker;
step M2: and labeling the grid areas by taking the central checkerboard area as a center, and determining a space distance and a pixel distance according to the labels and the corner points so as to determine internal and external parameters of the camera.
Preferably, the step M1: the method comprises the following steps:
step M101: acquiring gray values of a central point of each contour and upper, lower, left and right four points which are at a Manhattan distance L from the central point, wherein the central checkerboard is black, and the markers positioned at the center of the central checkerboard are preset to be white;
step M102: judging whether the ratio of the gray values of the upper, lower, left and right four points to the gray value of the central point is greater than a preset proportional threshold, and if so, determining the contour as a central checkerboard area;
step M103: and repeating the steps M101 to M102 until the central checkerboard area is determined.
Preferably, the step S1 includes the steps of:
step S101: reversing the color of the marker area to black to generate a target checkerboard image;
step S102: carrying out binarization processing on the target checkerboard image through a preset first gray value threshold value to generate a first checkerboard binarized image, wherein the outline of a white checkerboard area in the first checkerboard binarized image is isolated by the outline of a black checkerboard, and the black checkerboard areas are connected to form an integral area;
step S103: carrying out binarization processing on the target checkerboard image through a preset second gray value threshold value to generate a second checkerboard binarized image, wherein the outline of a black checkerboard area in the second checkerboard binarized image is isolated by the outline of a white checkerboard, and the white checkerboard areas are connected to form an integral area;
step S104: and extracting the grid outline of each white checkerboard region from the first checkerboard binary image, and extracting the grid outline of each black checkerboard region from the second checkerboard binary image.
Preferably, the step M2 includes the following steps:
step M201: searching a white checkerboard area adjacent to the central checkerboard area by taking the central checkerboard area as a central area, and labeling the white checkerboard areas adjacent to the central checkerboard area, wherein the number of the white checkerboard areas adjacent to each other is less than four, the distance between the center of the white checkerboard area adjacent to each other and the center of the central checkerboard area is less than L,
Figure BDA0002730508200000031
Figure BDA0002730508200000032
wherein area is the area of the central region;
step M202: searching a neighboring black checkerboard area by taking the searched white checkerboard area of each neighboring as a central area, and marking the neighboring black checkerboard area, and further searching a neighboring white checkerboard area by taking the searched black checkerboard area of each neighboring as a central area and marking the neighboring white checkerboard area;
step M203: step M202 is repeatedly executed until no white checkerboard area or no black checkerboard area can be grown.
The system for automatically extracting the angular points of the checkerboard provided by the invention comprises the following modules:
the contour extraction module is used for acquiring a checkerboard image, carrying out binarization processing on the checkerboard image, generating a checkerboard binarization image, and extracting a plurality of contours from the checkerboard binarization image;
the contour screening module is used for screening out the grid contours from the plurality of contours so as to determine the central point of each grid contour;
the coarse corner determining module is used for determining the coarse corner of each grid area according to the central points of the four adjacent grid outlines;
and the corner generating module is used for extracting sub-pixels of each coarse corner and determining a target corner of each grid region according to the sub-pixels of the coarse corners.
The checkerboard angular point automatic extraction equipment provided by the invention comprises:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the checkerboard corner point automatic extraction method via execution of the executable instructions.
According to the present invention, a computer-readable storage medium is provided for storing a program, which when executed implements the steps of the checkerboard corner automatic extraction method.
Compared with the prior art, the invention has the following beneficial effects:
in the invention, a plurality of outlines are extracted from the checkerboard binary image, the check outlines are screened from the outlines, and then the center point of each check outline is determined, so that the thick corner point of each check area can be determined, and the target corner point is determined, thereby realizing the automatic extraction of the corner points of the checkerboard without knowing the number of the checkerboards in the checkerboard.
According to the invention, a camera to be calibrated can be carried through the automatically controlled guide rail, the checkerboard image is automatically shot to obtain the internal and external parameters of the camera, the reference distance between the checkerboard and the camera can be obtained according to the internal and external parameters, the reference distance can be used as the real distance between a calibration board and the camera and can be used as the calibrated reference distance of the depth camera, and the problem that the real distance cannot be obtained in the evaluation of a common camera is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts. Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:
FIG. 1 is a flow chart illustrating steps of a checkerboard corner automatic extraction method according to an embodiment of the present invention;
FIG. 2 is a flowchart of the steps for extracting a plurality of contours from the checkerboard binarized image according to the embodiment of the present invention;
FIG. 3 is a flow chart illustrating the steps of screening a grid profile among a plurality of said profiles in accordance with an embodiment of the present invention;
FIG. 4 is a flowchart illustrating the steps for determining the central checkerboard region of the checkerboard binarized image in an embodiment of the present invention;
FIG. 5 is a flowchart of the steps of extracting a plurality of contours from the checkerboard binarized image according to the variation of the present invention;
FIG. 6 is a flow chart of the steps for labeling a plurality of grid regions in an embodiment of the present invention;
FIG. 7 is a schematic block diagram of an automatic extraction system for checkerboard corners in an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of an automatic checker corner extraction device according to an embodiment of the present invention; and
fig. 9 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that variations and modifications can be made by persons skilled in the art without departing from the spirit of the invention. All falling within the scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
The invention provides an automatic extraction method of checkerboard angular points, and aims to solve the problems in the prior art.
The following describes the technical solutions of the present invention and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Fig. 1 is a flowchart of steps of an automatic extraction method for checkerboard corners in an embodiment of the present invention, and as shown in fig. 1, the automatic extraction method for checkerboard corners provided by the present invention includes the following steps:
step S1: acquiring a checkerboard image, carrying out binarization processing on the checkerboard image to generate a checkerboard binarization image, and extracting a plurality of contours from the checkerboard binarization image;
step S2: screening out a grid profile from the plurality of profiles, and further determining a central point of each grid profile;
step S3: determining a thick corner point of each grid area according to the center points of the four adjacent grid outlines;
step S4: and extracting sub-pixels of each thick corner, and determining a target corner of each grid region according to the sub-pixels of the thick corners.
In the embodiment of the invention, a plurality of outlines are extracted from the checkerboard binary image, the outlines of the grids are screened out from the outlines, and then the central point of each grid outline is determined, so that the thick angular point of each grid area can be determined, and the target angular point is determined, thereby realizing the automatic extraction of the angular points of the checkerboards without knowing the number of the checkerboards in the checkerboards.
In the embodiment of the invention, the thick corner point is determined according to the gravity center of the central point forming area of the four adjacent grid outlines.
Fig. 2 is a flowchart of a step of extracting a plurality of contours from the checkerboard binarized image according to the embodiment of the present invention, and as shown in fig. 2, the step S1 includes the following steps:
step S101: carrying out binarization processing on the checkerboard image through a preset first gray value threshold value to generate a first checkerboard binarized image, wherein the outline of a white checkerboard area in the first checkerboard binarized image is isolated by the outline of a black checkerboard, and the black checkerboard areas are connected to form an integral area;
step S102: carrying out binarization processing on the checkerboard image through a preset second gray value threshold value to generate a second checkerboard binarized image, wherein the outline of a black checkerboard area in the second checkerboard binarized image is isolated by the outline of a white checkerboard area, and the white checkerboard areas are connected to form an integral area;
step S103: and extracting the lattice outline of each white checkerboard region from the first checkerboard binary image, and extracting the lattice outline of each black checkerboard region from the second checkerboard binary image.
In the embodiment of the present invention, the first grayscale value threshold may be set to 200, and the second grayscale value threshold may be set to 50.
Fig. 3 is a flowchart of a step of screening a lattice contour from a plurality of contours according to an embodiment of the present invention, and as shown in fig. 3, the step S2 includes the following steps:
step S201: extracting a plurality of contours from the checkerboard binary image, calculating the area A of each contour,
step S202: the area A is in the interval of [0.2A ]median,Amedian]Inner contour extraction, AmedianIs the median of all contour areas;
step S203: screening the extracted outline according to a preset area screening formula to determine the lattice outline, wherein the area screening formula is as follows:
Amedian-2σ<A<Amedian+2σ,σx<0.02×L3,σy<0.02×L3
wherein σxIs a variance, σ, of the profile X directionyIs the variance in the Y direction of a profile, σ is the variance of the area of all profiles,
Figure BDA0002730508200000071
in the embodiment of the invention, formula Amedian-2σ<A<Amedian+2 σ is used for area screening of the contours, equation σx<0.02×L3,σy<0.02×L3Whether the outline is a rectangle.
In the embodiment of the present invention, the method for automatically extracting corner points of a checkerboard provided by the present invention further includes the following steps:
step M1: determining a central checkerboard area of the checkerboard binary image, wherein the central checkerboard area is provided with a preset marker;
step M2: and labeling the grid areas by taking the central checkerboard area as a center, and determining a space distance and a pixel distance according to the labels and the corner points so as to determine internal and external parameters of the camera.
Fig. 4 is a flowchart of the step of determining the central checkerboard region of the checkerboard binarized image in the embodiment of the present invention, and as shown in fig. 4, the step M1 includes the following steps:
step M101: acquiring gray values of a central point of each contour and upper, lower, left and right four points which are at a Manhattan distance L from the central point, wherein the central checkerboard is black, and the markers positioned at the center of the central checkerboard are preset to be white;
step M102: judging whether the ratio of the gray values of the upper, lower, left and right four points to the gray value of the central point is greater than a preset proportional threshold, and if so, determining the contour as a central checkerboard area;
step M103: and repeating the steps M101 to M102 until the central checkerboard area is determined.
In the embodiment of the present invention, the ratio threshold is 2. The marker is preset to be white and is adhered to the black checkerboard, and the area of the marker is smaller than that of the black checkerboard and is contained by the black checkerboard. In order to ensure that the gray values of the upper, lower, left and right four points of the central point are also larger, the central point is prevented from being a salt noise point. If the gray value I of the central point is greater than 100 and the sum of the intensities of the four surrounding points is greater than 2I, a centroid is finally obtained when all the central points satisfying this condition are obtained, and the centroid is the position of the central point.
Fig. 5 is a flowchart of a step of extracting a plurality of contours from the checkerboard binarized image according to a modification of the present invention, and as shown in fig. 5, the step S1 includes the following steps:
step S101: reversing the color of the marker area to black to generate a target checkerboard image;
step S102: carrying out binarization processing on the target checkerboard image through a preset first gray value threshold value to generate a first checkerboard binarized image, wherein the outline of a white checkerboard area in the first checkerboard binarized image is isolated by the outline of a black checkerboard, and the black checkerboard areas are connected to form an integral area;
step S103: carrying out binarization processing on the target checkerboard image through a preset second gray value threshold value to generate a second checkerboard binarized image, wherein the outline of a black checkerboard area in the second checkerboard binarized image is isolated by the outline of a white checkerboard, and the white checkerboard areas are connected to form an integral area;
step S104: and extracting the grid outline of each white checkerboard region from the first checkerboard binary image, and extracting the grid outline of each black checkerboard region from the second checkerboard binary image.
In the embodiment of the present invention, the marker area may be changed to black in a reverse color, or the marker area may be painted to black to generate a target checkerboard image, and then the target checkerboard image is binarized to generate a first checkerboard binarized image and a second checkerboard binarized image.
Fig. 6 is a flowchart of steps of labeling a plurality of grid regions according to an embodiment of the present invention, and as shown in fig. 6, the step M2 includes the following steps:
step M201: searching a white checkerboard area adjacent to the central checkerboard area by taking the central checkerboard area as a central area, and labeling the white checkerboard areas adjacent to the central checkerboard area, wherein the number of the white checkerboard areas adjacent to each other is less than four, the distance between the center of the white checkerboard area adjacent to each other and the center of the central checkerboard area is less than L,
Figure BDA0002730508200000081
Figure BDA0002730508200000082
wherein area is the area of the central region;
step M202: searching a neighboring black checkerboard area by taking the searched white checkerboard area of each neighboring as a central area, and marking the neighboring black checkerboard area, and further searching a neighboring white checkerboard area by taking the searched black checkerboard area of each neighboring as a central area and marking the neighboring white checkerboard area;
step M203: step M202 is repeatedly executed until no white checkerboard area or no black checkerboard area can be grown.
In the embodiment of the invention, the size of the checkerboard is 31 × 31, and the number of the adjacent black checkerboard areas and the adjacent white checkerboard areas is less than or equal to four. In the labeling, for a checkerboard region with coordinates (m, n), key is 31 × m + n, and key is the label of the checkerboard region.
Fig. 7 is a schematic block diagram of an automatic checkerboard corner extraction system in an embodiment of the present invention, and as shown in fig. 7, the automatic checkerboard corner extraction system provided by the present invention includes the following modules:
the contour extraction module is used for acquiring a checkerboard image, carrying out binarization processing on the checkerboard image, generating a checkerboard binarization image, and extracting a plurality of contours from the checkerboard binarization image;
the contour screening module is used for screening out the grid contours from the plurality of contours so as to determine the central point of each grid contour;
the coarse corner determining module is used for determining a coarse corner of each grid area according to the central points of the four adjacent grid outlines;
and the corner generating module is used for extracting sub-pixels of each coarse corner and determining a target corner of each grid region according to the sub-pixels of the coarse corners.
The embodiment of the invention also provides checkerboard corner automatic extraction equipment which comprises a processor. A memory having stored therein executable instructions of the processor. Wherein the processor is configured to perform the steps of the method for automatically extracting corner points of a checkerboard via execution of executable instructions.
As described above, in the embodiment of the present invention, a plurality of contours are extracted from the checkerboard binarized image, the lattice contour is screened from the plurality of contours, and the center point of each lattice contour is determined, so that the coarse corner point of each lattice region can be determined, and the target corner point is determined, thereby implementing automatic extraction of the corner points of the checkerboard without knowing the number of the checkerboard in the checkerboard.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" platform.
Fig. 8 is a schematic structural diagram of the automatic checkerboard corner point extraction device of the present invention. An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 8. The electronic device 600 shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 8, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one memory unit 620, a bus 630 connecting the different platform components (including the memory unit 620 and the processing unit 610), a display unit 640, etc.
Wherein the storage unit stores a program code, which can be executed by the processing unit 610, so that the processing unit 610 executes the steps according to various exemplary embodiments of the present invention described in the above-mentioned checkerboard corner automatic extraction method section of this specification. For example, processing unit 610 may perform the steps as shown in fig. 1.
The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)6201 and/or a cache memory unit 6202, and may further include a read-only memory unit (ROM) 6203.
The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 can be any bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via the bus 630. It should be appreciated that although not shown in FIG. 8, other hardware and/or software modules may be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, to name a few.
The embodiment of the invention also provides a computer readable storage medium for storing a program, and the steps of the checkerboard corner automatic extraction method are realized when the program is executed. In some possible embodiments, the aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the invention described in the above-mentioned checkered corner point automatic extraction method section of this specification, when the program product is run on the terminal device.
As shown above, when the program of the computer-readable storage medium of this embodiment is executed, the present invention extracts a plurality of outlines from the checkerboard binarized image, screens out a grid outline from the plurality of outlines, and further determines a center point of each grid outline, so that a thick corner point of each grid region can be determined, and further a target corner point can be determined, thereby realizing automatic extraction of corner points of the checkerboard without knowing the number of the checkerboard in the checkerboard.
Fig. 9 is a schematic structural diagram of a computer-readable storage medium of the present invention. Referring to fig. 9, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In the embodiment of the invention, a plurality of outlines are extracted from the checkerboard binary image, the outlines of the grids are screened out from the outlines, and then the central point of each grid outline is determined, so that the thick angular point of each grid area can be determined, and the target angular point is determined, thereby realizing the automatic extraction of the angular points of the checkerboards without knowing the number of the checkerboards in the checkerboards. The method can be implemented by carrying a camera to be calibrated through an automatically controlled guide rail, automatically shooting the checkerboard image to obtain the internal and external parameters of the camera, and obtaining the reference distance of the checkerboard from the camera according to the internal and external parameters, wherein the reference distance can be used as the real distance of a calibration board from the camera and can be used as the reference distance for calibrating the depth camera, and the problem that the real distance cannot be obtained in the evaluation of a common camera is solved.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention.

Claims (10)

1. A checkerboard corner automatic extraction method is characterized by comprising the following steps:
step S1: acquiring a checkerboard image, carrying out binarization processing on the checkerboard image to generate a checkerboard binarization image, and extracting a plurality of contours from the checkerboard binarization image;
step S2: screening out a grid profile from the plurality of profiles, and further determining a central point of each grid profile;
step S3: determining a thick corner point of each grid area according to the central points of the four adjacent grid outlines;
step S4: and extracting sub-pixels of each coarse corner, and determining a target corner of each grid region according to the sub-pixels of the coarse corners.
2. The method for automatically extracting checkerboard corner points as claimed in claim 1, wherein said step S1 includes the steps of:
step S101: carrying out binarization processing on the checkerboard image through a preset first gray value threshold value to generate a first checkerboard binarized image, wherein the outline of a white checkerboard area in the first checkerboard binarized image is isolated by the outline of a black checkerboard, and the black checkerboard areas are connected to form an integral area;
step S102: carrying out binarization processing on the checkerboard image through a preset second gray value threshold value to generate a second checkerboard binarized image, wherein the outline of a black checkerboard area in the second checkerboard binarized image is isolated by the outline of a white checkerboard area, and the white checkerboard areas are connected to form an integral area;
step S103: and extracting the lattice outline of each white checkerboard region from the first checkerboard binary image, and extracting the lattice outline of each black checkerboard region from the second checkerboard binary image.
3. The method for automatically extracting checkerboard corner points as claimed in claim 1, wherein said step S2 includes the steps of:
step S201: extracting a plurality of contours from the checkerboard binary image, calculating the area A of each contour,
step S202: the area A is in the interval of [0.2A ]median,Amedian]Inner contour extraction, AmedianIs the median of all contour areas;
step S203: screening the extracted outline according to a preset area screening formula to determine the lattice outline, wherein the area screening formula is as follows:
Amedian-2σ<A<Amedian+2σ,σx<0.02×L3,σy<0.02×L3
wherein σxIs a variance, σ, of the profile X directionyIs the variance in the Y direction of a profile, σ is the variance of the area of all profiles,
Figure FDA0002730508190000011
4. the method for automatically extracting checkerboard corner points as claimed in claim 1, further comprising the steps of:
step M1: determining a central checkerboard area of the checkerboard binary image, wherein the central checkerboard area is provided with a preset marker;
step M2: and labeling the grid areas by taking the central checkerboard area as a center, and determining a space distance and a pixel distance according to the labels and the corner points so as to determine internal and external parameters of the camera.
5. The method for automatically extracting checkerboard corner points as claimed in claim 4, wherein said step M1: the method comprises the following steps:
step M101: acquiring gray values of a central point of each contour and upper, lower, left and right four points which are at a Manhattan distance L from the central point, wherein the central checkerboard is black, and the markers positioned at the center of the central checkerboard are preset to be white;
step M102: judging whether the ratio of the gray values of the upper, lower, left and right four points to the gray value of the central point is greater than a preset proportional threshold, and if so, determining the contour as a central checkerboard area;
step M103: and repeating the steps M101 to M102 until the central checkerboard area is determined.
6. The method for automatically extracting checkerboard corner points as claimed in claim 4, wherein said step S1 includes the steps of:
step S101: reversing the color of the marker area to black to generate a target checkerboard image;
step S102: carrying out binarization processing on the target checkerboard image through a preset first gray value threshold value to generate a first checkerboard binarized image, wherein the outline of a white checkerboard area in the first checkerboard binarized image is isolated by the outline of a black checkerboard, and the black checkerboard areas are connected to form an integral area;
step S103: carrying out binarization processing on the target checkerboard image through a preset second gray value threshold value to generate a second checkerboard binarized image, wherein the outline of a black checkerboard area in the second checkerboard binarized image is isolated by the outline of a white checkerboard, and the white checkerboard areas are connected to form an integral area;
step S104: and extracting the grid outline of each white checkerboard region from the first checkerboard binary image, and extracting the grid outline of each black checkerboard region from the second checkerboard binary image.
7. The method for automatically extracting checkerboard corner points as claimed in claim 6, wherein said step M2 includes the steps of:
step M201: searching a white checkerboard area adjacent to the central checkerboard area by taking the central checkerboard area as a central area, and labeling the white checkerboard areas adjacent to the central checkerboard area, wherein the number of the white checkerboard areas adjacent to each other is less than four, the distance between the center of the white checkerboard area adjacent to each other and the center of the central checkerboard area is less than L,
Figure FDA0002730508190000021
Figure FDA0002730508190000022
wherein area is the area of the central region;
step M202: searching a neighboring black checkerboard area by taking the searched white checkerboard area of each neighboring as a central area, and marking the neighboring black checkerboard area, and further searching a neighboring white checkerboard area by taking the searched black checkerboard area of each neighboring as a central area and marking the neighboring white checkerboard area;
step M203: step M202 is repeatedly executed until no white checkerboard area or no black checkerboard area can be grown.
8. An automatic extraction system for checkerboard corner points is characterized by comprising the following modules:
the contour extraction module is used for acquiring a checkerboard image, carrying out binarization processing on the checkerboard image, generating a checkerboard binarization image, and extracting a plurality of contours from the checkerboard binarization image;
the contour screening module is used for screening out the grid contours from the plurality of contours so as to determine the central point of each grid contour;
the coarse corner determining module is used for determining a coarse corner of each grid area according to the central points of the four adjacent grid outlines;
and the corner generating module is used for extracting sub-pixels of each coarse corner and determining a target corner of each grid region according to the sub-pixels of the coarse corners.
9. An automatic extraction device for checkerboard corner points is characterized by comprising:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to execute the steps of the checkerboard corner automatic extraction method of any one of claims 1 to 7 via execution of the executable instructions.
10. A computer-readable storage medium storing a program, wherein the program is configured to implement the steps of the checkerboard corner automatic extraction method according to any one of claims 1 to 7 when executed.
CN202011116627.5A 2020-10-19 2020-10-19 Checkerboard angular point automatic extraction method, system, equipment and medium Pending CN114445499A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011116627.5A CN114445499A (en) 2020-10-19 2020-10-19 Checkerboard angular point automatic extraction method, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011116627.5A CN114445499A (en) 2020-10-19 2020-10-19 Checkerboard angular point automatic extraction method, system, equipment and medium

Publications (1)

Publication Number Publication Date
CN114445499A true CN114445499A (en) 2022-05-06

Family

ID=81357002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011116627.5A Pending CN114445499A (en) 2020-10-19 2020-10-19 Checkerboard angular point automatic extraction method, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN114445499A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115830049A (en) * 2022-07-18 2023-03-21 宁德时代新能源科技股份有限公司 Corner point detection method and device
CN116030450A (en) * 2023-03-23 2023-04-28 摩尔线程智能科技(北京)有限责任公司 Checkerboard corner recognition method, device, equipment and medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115830049A (en) * 2022-07-18 2023-03-21 宁德时代新能源科技股份有限公司 Corner point detection method and device
WO2024016686A1 (en) * 2022-07-18 2024-01-25 宁德时代新能源科技股份有限公司 Corner detection method and apparatus
CN116030450A (en) * 2023-03-23 2023-04-28 摩尔线程智能科技(北京)有限责任公司 Checkerboard corner recognition method, device, equipment and medium
CN116030450B (en) * 2023-03-23 2023-12-19 摩尔线程智能科技(北京)有限责任公司 Checkerboard corner recognition method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN109118542B (en) Calibration method, device, equipment and storage medium between laser radar and camera
CN106920245B (en) Boundary detection method and device
CN104700062A (en) Method and equipment for identifying two-dimension code
CN110490839B (en) Method and device for detecting damaged area in expressway and computer equipment
CN110910445B (en) Object size detection method, device, detection equipment and storage medium
CN110189341B (en) Image segmentation model training method, image segmentation method and device
CN111652209B (en) Damage detection method, device, electronic equipment and medium
CN114445499A (en) Checkerboard angular point automatic extraction method, system, equipment and medium
CN106062824A (en) Edge detection device, edge detection method, and program
CN112991374B (en) Canny algorithm-based edge enhancement method, canny algorithm-based edge enhancement device, canny algorithm-based edge enhancement equipment and storage medium
CN114445498A (en) Depth camera calibration method, system, device and medium
CN116071311A (en) Equipment cleaning detection method, system and storage medium based on image recognition
CN113012096A (en) Display screen sub-pixel positioning and brightness extraction method, device and storage medium
CN110991201B (en) Bar code detection method and related device
CN112036304A (en) Medical bill layout identification method and device and computer equipment
CN114880730A (en) Method and device for determining target equipment and photovoltaic system
CN113283439B (en) Intelligent counting method, device and system based on image recognition
CN112581374A (en) Speckle sub-pixel center extraction method, system, device and medium
CN106663317A (en) Morphologically processing method for digital images and digital image processing device thereof
CN104766332A (en) Image processing method and electronic device
CN115187769A (en) Positioning method and device
CN115937324A (en) Assembly quality evaluation method, device, equipment and storage medium
CN112446895B (en) Automatic extraction method, system, equipment and medium for checkerboard corner points
CN113780278A (en) Method and device for identifying license plate content, electronic equipment and storage medium
CN112446895A (en) Checkerboard angular point automatic extraction method, system, equipment and medium

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