Nothing Special   »   [go: up one dir, main page]

CN108399412A - A kind of X-type angular-point sub-pixel extracting method - Google Patents

A kind of X-type angular-point sub-pixel extracting method Download PDF

Info

Publication number
CN108399412A
CN108399412A CN201810187810.0A CN201810187810A CN108399412A CN 108399412 A CN108399412 A CN 108399412A CN 201810187810 A CN201810187810 A CN 201810187810A CN 108399412 A CN108399412 A CN 108399412A
Authority
CN
China
Prior art keywords
point
image
corner
angular
sub
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
CN201810187810.0A
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.)
Angang Group Mining Co Ltd
Original Assignee
Angang Group Mining 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 Angang Group Mining Co Ltd filed Critical Angang Group Mining Co Ltd
Priority to CN201810187810.0A priority Critical patent/CN108399412A/en
Publication of CN108399412A publication Critical patent/CN108399412A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • 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

Landscapes

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

Abstract

The present invention proposes a kind of X-type angular-point sub-pixel extracting method, belong to technical field of image processing, this method establishes coordinate system using the pixel in the gray level image upper left corner as origin, the horizontal direction of the gray level image is X-axis, vertical direction is Y-axis, and Corner Detection is carried out to gray level image using Harris operators;The coordinate position that angle point is determined by Harris operators obtains sub-pixel angular coordinate according to the coordinate position of angle point;As window center and the window length of side is set using each sub-pixel angle point, builds window, retains the maximum angle point of angle point amount in window, and delete other angle points;This method can filter the pseudo- angle point in image, the angle point that can be accurately detected in image, and accuracy of detection can reach 0.09 pixel, and this method calculates simply, insensitive to image rotation, grey scale change, influence of noise and viewpoint change.

Description

X-shaped angular point sub-pixel extraction method
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to an X-type corner sub-pixel extraction method.
Background
With the continuous development of science and technology, cameras have also been developed rapidly, the variety and the function of cameras are also more and more, and people also enjoy various conveniences brought by the development of science and technology. For example, people can acquire environmental information in a parking lot by arranging a camera on a vehicle and acquiring images through the camera.
In the existing camera, parameters need to be calibrated when in use so as to obtain more accurate parameters, and the parameter calculation is directly influenced by the accuracy of the angular points, so that the accuracy of angular point extraction is required to be higher; the traditional angular point extraction technology is an angular point detection method based on segment testing, but due to the fact that an image scene is complex, the size of a template added with the segment testing, a gray level difference threshold value are difficult to select and the like, missing detection and multiple detection are easily caused in the process of detecting the X-shaped angular point, and more false angular points appear.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides an X-type angular point sub-pixel extraction method which can accurately identify the X-type angular point in an image and provide guarantee for accurate calibration of a camera.
An X-shaped corner sub-pixel extraction method comprises the following steps:
step 1, converting an image to be processed into a gray image;
step 2, establishing a coordinate system by taking a pixel point at the upper left corner of the gray image as an origin, taking the horizontal direction of the gray image as an X axis and the vertical direction as a Y axis, and performing corner point detection on the gray image by adopting a Harris operator;
step 3, determining the coordinate position of the corner point through a Harris operator, and obtaining sub-pixel level corner point coordinates according to the coordinate position of the corner point;
step 4, taking each sub-pixel level angular point as a window center, setting the side length of the window, constructing the window, reserving the angular point with the largest angular point quantity in the window, and deleting other angular points;
step 5, judging whether the number of the angular points of the detected image is known, if so, executing step 6, otherwise, executing step 7;
step 6, sequencing the reserved angular points from large to small according to the angular point quantity, and selecting the angular points arranged in front according to the number of the known angular points of the image to finish the extraction of X-type angular point sub-pixels of the image;
step 7, judging whether the corner quantity of the reserved corner is larger than a set threshold value or not, if so, reserving, and finishing the extraction of the X-type corner sub-pixels of the image; otherwise, deleting.
And if any point around the X-shaped angular point p is set as q, the dot product of the gradient at the point p and the vector qp is zero.
The invention has the advantages that:
the invention provides an X-shaped corner sub-pixel extraction method which can filter out false corners in an image, can accurately detect corners in the image, and has detection accuracy reaching 0.09 pixels.
Drawings
FIG. 1 is a flowchart of an X-type corner sub-pixel extraction method according to an embodiment of the present invention;
FIG. 2 is a diagram of an image to be processed according to an embodiment of the present invention;
FIG. 3 is a gray scale image of an image to be processed according to an embodiment of the present invention;
FIG. 4 is a Gaussian image of one embodiment of the present invention;
FIG. 5 is a filtered and eroded grayscale image according to one embodiment of the present invention;
FIG. 6 is a schematic diagram of pixel-level coordinates extracted using the Harris operator, in accordance with one embodiment of the present invention;
FIG. 7 is a schematic diagram of sub-pixel level coordinates extracted using the Harris operator, in accordance with one embodiment of the present invention;
FIG. 8 is a schematic diagram of sub-pixel level X-type corner vectors according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of coordinates of pixel-level corners with deleted corners according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of deleted corner coordinates of a sub-pixel level corner in accordance with an embodiment of the present invention;
FIG. 11 is a schematic diagram of an X-shaped corner at a subpixel level when the number of corners is known according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of sub-pixel level X-type corner points when the number of corner points is unknown according to an embodiment of the present invention;
fig. 13 is a diagram illustrating an extraction result of corner points according to a pixel level according to an embodiment of the present invention.
Detailed Description
An embodiment of the present invention will be further described with reference to the accompanying drawings.
In the embodiment of the present invention, a method for extracting sub-pixels from an X-shaped corner, a flow chart of which is shown in fig. 1, includes the following steps:
step 1, converting an image to be processed into a gray image;
in the embodiment of the invention, the Harris corner point is a point on the image with larger gray value change in any two vertical directions. However, the Harris algorithm processes the gray level image to extract the corner points, so the original image is first converted into the gray level image, fig. 2 is the original image, and fig. 3 is the corresponding gray level image;
step 2, establishing a coordinate system by taking a point at the upper left corner of the gray-scale image as an origin, wherein the horizontal direction of the gray-scale image is an X axis, and the vertical direction of the gray-scale image is a Y axis, and performing corner point detection on the gray-scale image by adopting a Harris operator;
in the embodiment of the invention, a coordinate system is established by taking a point at the upper left corner in an image as an origin, wherein the horizontal direction of the image is an X axis, the vertical direction of the image is a Y axis, and the corner detection is carried out by a Harris operator, and the specific detection process comprises the following steps:
2-1, calculating the difference value of the x direction and the y direction by using a gradient operator;
step 2-2, calculating the gradient I of each pixel point in the image in the directions of the x axis and the y axis by utilizing the gray level of each pixel point in the imagex、Iy
The calculation formula is as follows:
in formula (1) and formula (2), the gradient operator may be an operator as shown in table 1;
TABLE 1
Step 2-3, respectively calculating the gradient product I of each pixel point in the image in two directionsx 2、Iy 2And Ixy
The calculation formula is as follows:
Ix 2=Ix*Ix(3)
Iy 2=Iy*Iy(4)
Ixy=Ix*Iy(5)
step 2-4, generating Gaussian kernel pairs I by utilizing Gaussian functionx 2、Iy 2And IxyFiltering, the gaussian filter image is shown in fig. 4;
wherein the gaussian function formula is:
wherein x represents the horizontal direction, y represents the vertical direction, σ is the standard deviation of a two-dimensional Gaussian curve, g represents convolution, and W is a Gaussian filter window.
Calculating the angular point quantity R of each pixel point according to the formulas (6) to (9), wherein the calculation formulas are as follows:
in the embodiment of the invention, finding out the corner point corresponding to the local maximum value of the corner point quantity R from the obtained corner point quantity R, namely the X-shaped corner point to be extracted; however, in practical application, the corners and corners of a class of corner points are obvious and points which are not required to be extracted are not obtained, so that the embodiment of the invention is carried out by utilizing a shape similar to a checkerboard, the obtained gray-scale image is subjected to median filtering and corrosion operation, the corners and corners of the image shape are not obvious, the R value of the corner points which are not expected by people is reduced, the corner point characteristics of the type of corner points are weakened, meanwhile, the blurring caused by filtering processing of the X-shaped corner points is avoided, and the R value of the X-shaped corner points in the image is the highest; fig. 5 is a gray scale image after the filtering and etching operations.
Step 3, determining the coordinate position of the corner point through a Harris operator, and obtaining sub-pixel level corner point coordinates according to the coordinate position of the corner point;
in the embodiment of the invention, a Harris operator is utilized to determine the coordinate position of a corner point, and the corner point coordinate of a subpixel level is calculated according to the coordinate position of the corner point, wherein an X-shaped corner point p is set, any point around the p is set as q, and the dot product of the gradient at the p point and a vector qP is zero; the pixel-level coordinates extracted by the Harris operator are shown in fig. 6, and the sub-pixel-level coordinates are shown in fig. 7;
in the embodiment of the invention, as can be seen from fig. 7, the black and white grid area laid by the large white paper has only 7 Harris angular points which can be detected accurately, wherein one of the 7 angular points is a required marking point. Because the scene is relatively complex, many non-marked points, such as points outside the scene of fig. 6, i.e., the large white paper, are also detected in fig. 6, and the position coordinates of the corner points in fig. 6 are only at the pixel level, and further purification is needed to obtain the sub-pixel level;
in the embodiment of the present invention, since the dot product of the gradient at the p point and the vector qp is zero, the vector shown in fig. 8 can be constructed according to this theorem;
in the embodiment of the present invention, the positions of the points near the corner region can be divided into two types, i.e., on the edge and not on the edge, and in fig. 8, it is assumed that the point B is on the edge and the gray gradient vector thereofPerpendicular to the vector OB, thenDot product with vector OB is 0; the point A is not on the edge, and the gray gradient vector of the point is 0, soThe dot product with the vector OA is also 0, and can be expressed by the following formula:
wherein,a gray-scale gradient vector is represented by,a vector representing the origin of the image to coordinate point i,a vector representing the origin of the image to a coordinate point O;
in the embodiment of the present invention, a plurality of points may be found near the point O according to the formula (11), and the gray gradient vector of each point of the plurality of points found may be calculatedAndand forming an equation set, and solving the equation set to obtain coordinate values of the sub-pixel level precision of the corner points O so as to complete the extraction of the sub-pixels of the corner points in the image, wherein the sub-pixel level coordinates are shown in FIG. 7.
Step 4, taking each sub-pixel level angular point as a window center, setting the side length of the window, constructing the window, reserving the angular point with the largest angular point quantity in the window, and deleting other angular points;
in the embodiment of the invention, as for the found corner points, the condition of corner point aggregation often occurs, which can be clearly seen in fig. 6 and 7, the type of corner points are called as repeated corner points, and a corner point with the largest R value is required to be selected at the position of the corner point aggregation; the method comprises the following steps:
setting a window with the size of nxn by taking each found angular point as the center of the window, finding out the angular point corresponding to the maximum value of the angular point quantity of each pixel point in the nxn window and deleting other angular points at the same time, and selecting a proper n value according to the specific image size, wherein n in the embodiment of the invention is 5, and the unit is a pixel; FIG. 9 is the result of FIG. 6 after deletion, and FIG. 10 is the result of FIG. 7 after deletion;
according to the actual angular point position on the white paper, the accuracy of the angular point coordinate extracted by using the sub-pixels is greatly improved, the angular point coordinate is closer to the actual angular point, and the angular point position is more accurate.
Step 5, judging whether the number of the angular points of the detected image is known, if so, executing step 6, otherwise, executing step 7;
step 6, sequencing the reserved angular points from large to small according to the angular point quantity, and selecting the angular points arranged in front according to the number of the known angular points of the image to finish the extraction of X-type angular point sub-pixels of the image;
in the embodiment of the invention, the angular points are obtained by calculating the R value of the angular point quantity, and the R value of the X-shaped angular point is larger than that of the angular point on the outline, so that when the number N of the angular points in the image is known, all the angular points in the image are sorted according to the size of the R value, and the first N angular points are selected as the X-shaped angular points; in the embodiment of the invention, 4 pieces of white paper are laid on the floor, so that N is set to be 4, namely 4X-shaped angular points are known;
step 7, judging whether the corner quantity of the reserved corner is larger than a set threshold value or not, if so, reserving, and finishing the extraction of the X-type corner sub-pixels of the image; otherwise, deleting.
In the embodiment of the invention, a threshold value is set when the Harris operator is used for extracting the corner point, when the R value of the point is larger than the threshold value, the point is taken as the corner point, and when the R value of the point is smaller than the threshold value, the point is not the corner point. For the X-shaped angular points, the R values of the X-shaped angular points are generally larger, so that only the X-shaped angular points can be extracted by properly improving the threshold value when the threshold value is set; the threshold value is selected so that the X-type corner points are not missed and the non-X-type corner points cannot be extracted.
Experiments were performed for both of the above two methods, fig. 11 is a result obtained with a known number of corner points, and fig. 12 is a result obtained with an unknown number of corner points; the results show that the X-shaped angular points extracted by the two methods are consistent and accord with the actual situation, and the method has good effect on extracting the X-shaped angular points of the complex background; similarly, the same result is obtained by extracting the pixel-level corner points by the above two methods, and fig. 13 is a result of extracting the pixel-level corner points; the comparison of the two results shows that the position of the X-shaped corner point at the sub-pixel level is more accurate and more in line with the actual situation.

Claims (2)

1. An X-shaped corner sub-pixel extraction method is characterized by comprising the following steps:
step 1, converting an image to be processed into a gray image;
step 2, establishing a coordinate system by taking a pixel point at the upper left corner of the gray image as an origin, taking the horizontal direction of the gray image as an X axis and the vertical direction as a Y axis, and performing corner point detection on the gray image by adopting a Harris operator;
step 3, determining the coordinate position of the corner point through a Harris operator, and obtaining sub-pixel level corner point coordinates according to the coordinate position of the corner point;
step 4, taking each sub-pixel level angular point as a window center, setting the side length of the window, constructing the window, reserving the angular point with the largest angular point quantity in the window, and deleting other angular points;
step 5, judging whether the number of the angular points of the detected image is known, if so, executing step 6, otherwise, executing step 7;
step 6, sequencing the reserved angular points from large to small according to the angular point quantity, and selecting the angular points arranged in front according to the number of the known angular points of the image to finish the extraction of X-type angular point sub-pixels of the image;
step 7, judging whether the corner quantity of the reserved corner is larger than a set threshold value or not, if so, reserving, and finishing the extraction of the X-type corner sub-pixels of the image; otherwise, deleting.
2. The method for extracting sub-pixels from an X-type corner point according to claim 1, wherein if any point around an X-type corner point p is q, the dot product of the gradient at the point p and a vector qp is zero.
CN201810187810.0A 2018-03-07 2018-03-07 A kind of X-type angular-point sub-pixel extracting method Pending CN108399412A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810187810.0A CN108399412A (en) 2018-03-07 2018-03-07 A kind of X-type angular-point sub-pixel extracting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810187810.0A CN108399412A (en) 2018-03-07 2018-03-07 A kind of X-type angular-point sub-pixel extracting method

Publications (1)

Publication Number Publication Date
CN108399412A true CN108399412A (en) 2018-08-14

Family

ID=63092635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810187810.0A Pending CN108399412A (en) 2018-03-07 2018-03-07 A kind of X-type angular-point sub-pixel extracting method

Country Status (1)

Country Link
CN (1) CN108399412A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113487594A (en) * 2021-07-22 2021-10-08 上海嘉奥信息科技发展有限公司 Sub-pixel angular point detection method, system and medium based on deep learning

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100177966A1 (en) * 2009-01-14 2010-07-15 Ruzon Mark A Method and system for representing image patches
CN102169578A (en) * 2011-03-16 2011-08-31 内蒙古科技大学 Non-rigid medical image registration method based on finite element model
CN103345755A (en) * 2013-07-11 2013-10-09 北京理工大学 Chessboard angular point sub-pixel extraction method based on Harris operator
CN103996191A (en) * 2014-05-09 2014-08-20 东北大学 Detection method for black and white checkerboard image corners based on least square optimization
CN104517276A (en) * 2013-09-28 2015-04-15 沈阳新松机器人自动化股份有限公司 Checker corner detection method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100177966A1 (en) * 2009-01-14 2010-07-15 Ruzon Mark A Method and system for representing image patches
CN102169578A (en) * 2011-03-16 2011-08-31 内蒙古科技大学 Non-rigid medical image registration method based on finite element model
CN103345755A (en) * 2013-07-11 2013-10-09 北京理工大学 Chessboard angular point sub-pixel extraction method based on Harris operator
CN104517276A (en) * 2013-09-28 2015-04-15 沈阳新松机器人自动化股份有限公司 Checker corner detection method
CN103996191A (en) * 2014-05-09 2014-08-20 东北大学 Detection method for black and white checkerboard image corners based on least square optimization

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SENIT_CO: "图像特征之Harris角点检测", 《HTTPS://SENITCO.GITHUB.IO/2017/06/18/IMAGE-FEATURE-HARRIS/》 *
孟偲等: "具有方向特性的X角点的亚像素检测定位", 《北京航空航天大学学报》 *
徐甲: "一种用于无人机航空相机标定的角点检测算法", 《桂林航天工业高等专科学校学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113487594A (en) * 2021-07-22 2021-10-08 上海嘉奥信息科技发展有限公司 Sub-pixel angular point detection method, system and medium based on deep learning
CN113487594B (en) * 2021-07-22 2023-12-01 上海嘉奥信息科技发展有限公司 Sub-pixel corner detection method, system and medium based on deep learning

Similar Documents

Publication Publication Date Title
CN109615611B (en) Inspection image-based insulator self-explosion defect detection method
CN107543828B (en) Workpiece surface defect detection method and system
CN109035276B (en) Image edge extraction method and device and automatic driving system
JP5699788B2 (en) Screen area detection method and system
CN108629775B (en) Thermal state high-speed wire rod surface image processing method
CN108369650B (en) Method for identifying possible characteristic points of calibration pattern
CN106920245B (en) Boundary detection method and device
CN111474184A (en) AOI character defect detection method and device based on industrial machine vision
CN108229475B (en) Vehicle tracking method, system, computer device and readable storage medium
CN110596120A (en) Glass boundary defect detection method, device, terminal and storage medium
CN112419298B (en) Bolt node plate rust detection method, device, equipment and storage medium
CN104899888B (en) A kind of image sub-pixel edge detection method based on Legendre squares
CN103119609B (en) A kind of method and apparatus determining video foreground main image area
KR102073468B1 (en) System and method for scoring color candidate poses against a color image in a vision system
CN105718931B (en) System and method for determining clutter in acquired images
CN112598922B (en) Parking space detection method, device, equipment and storage medium
CN110207592A (en) Building cracks measurement method, device, computer equipment and storage medium
CN105894521A (en) Sub-pixel edge detection method based on Gaussian fitting
CN112801141B (en) Heterogeneous image matching method based on template matching and twin neural network optimization
CN111489337A (en) Method and system for removing false defects through automatic optical detection
CN112991374A (en) Canny algorithm-based edge enhancement method, device, equipment and storage medium
CN111222507A (en) Automatic identification method of digital meter reading and computer readable storage medium
CN114419045A (en) Method, device and equipment for detecting defects of photoetching mask plate and readable storage medium
CN109242917A (en) One kind being based on tessellated camera resolution scaling method
Lin et al. A new prediction method for edge detection based on human visual feature

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180814