WO2024016686A1 - 角点检测的方法和装置 - Google Patents

角点检测的方法和装置 Download PDF

Info

Publication number
WO2024016686A1
WO2024016686A1 PCT/CN2023/081107 CN2023081107W WO2024016686A1 WO 2024016686 A1 WO2024016686 A1 WO 2024016686A1 CN 2023081107 W CN2023081107 W CN 2023081107W WO 2024016686 A1 WO2024016686 A1 WO 2024016686A1
Authority
WO
WIPO (PCT)
Prior art keywords
corner
target
corner points
image
corner point
Prior art date
Application number
PCT/CN2023/081107
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 宁德时代新能源科技股份有限公司
Priority to EP23733613.6A priority Critical patent/EP4336444A1/en
Priority to US18/359,086 priority patent/US20240020846A1/en
Publication of WO2024016686A1 publication Critical patent/WO2024016686A1/zh

Links

Classifications

    • 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/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Definitions

  • the present application relates to the field of image processing technology, and more specifically, to a method and device for corner point detection.
  • the corner points in the image usually refer to the points where the brightness changes drastically in the image, or the points where the curvature on the edge contour curve of the image takes a maximum value. It is an important feature that characterizes the image.
  • the corner point detection of the image is an automatic detection method for workpieces in industrial sites. It is a very important part of the inspection process. Its ability and speed to extract corner points will directly affect the accuracy and efficiency of industrial automation inspection.
  • the current corner detection algorithms mainly include three types of corner detection algorithms based on grayscale images, binary images and contour curves. Among them, the corner detection methods based on contours are more widely used because of their lower detection error rate. Applications. However, the existing contour-based corner point detection methods have high computational complexity and are not suitable for detection scenarios with high efficiency requirements. Therefore, an efficient corner detection method is urgently needed.
  • the embodiments of the present application provide a corner point detection method and device, which can reduce the complexity of the algorithm. complexity, thus improving the detection efficiency of corner points.
  • a method of corner point detection including: acquiring multiple corner points of a target object in an image to be detected, where the plurality of corner points are corners of the outline of a first object in the image to be detected.
  • the outline of the first object includes the outline of the target object; obtaining the area proportion corresponding to each corner point in the plurality of corner points, the area proportion is a predetermined area centered on the corner point The proportion of the area of the first object within the first object; according to the area proportion, the target corner point of the target object is determined among the plurality of corner points.
  • determining the target corner point of the target object among the plurality of corner points according to the area proportion includes: obtaining the area proportion among the plurality of corner points. At least one candidate corner point whose ratio is greater than a predetermined value; and the target corner point is obtained from the at least one candidate corner point.
  • interference points are filtered out through numerical comparison, leaving qualified candidate corner points, which is conducive to determining the target corner point as quickly as possible, thereby improving the detection efficiency of corner points.
  • obtaining the target corner point from the at least one candidate corner point includes: if there are multiple candidate corner points, based on the multiple candidate corner points and the target corner point The positional relationship of the center point of the object determines the target corner point.
  • the target corner point can be determined at one time among multiple candidate corner points through the positional relationship to improve the efficiency of corner point detection.
  • determining the target corner point based on the positional relationship between the plurality of candidate corner points and the center point of the target object includes: , the candidate corner point with the largest vertical distance from the position of the center point of the target object is determined as the target corner point.
  • obtaining the plurality of corner points of the target object in the image to be detected includes: obtaining the plurality of corner points in a region of interest in the image to be detected.
  • the scope of analysis and processing in the image to be detected can be narrowed, and the number of corner points acquired for the next step of processing can be reduced, thus improving the efficiency of corner point detection.
  • the method further includes: determining at least one region of interest in the image to be detected.
  • multiple areas of interest can be set to obtain corner points.
  • the number of acquired corner points can be further reduced by setting multiple regions of interest to further increase the number of traversals and calculations and improve the efficiency of corner point detection.
  • obtaining multiple corner points of the target object in the image to be detected includes: obtaining the outline of the first object in the area of interest to obtain the target outline, where the target outline includes the The outline of the target object is obtained; the corner points of the target outline are obtained to obtain the plurality of corner points.
  • Corner points reuse the area of interest to obtain corner points on the outline including the target object, which reduces the number of corner points obtained and helps improve the efficiency of corner point detection.
  • obtaining the corner points of the target contour to obtain the plurality of corner points includes: obtaining the polygon corresponding to the target contour through a polygon approximation method; obtaining the vertices of the polygon to Obtain the multiple corner points.
  • Obtaining the polygon corresponding to the target contour through the polygon approximation method can reduce the number of corner points that need to be processed later and improve the detection efficiency of corner points.
  • the method before obtaining the outline of the first object in the area of interest, the method further includes: binarizing the image to be detected to obtain a binary representation of the image to be detected. Value the image; obtain the outline of the first object according to the edge of the binary image.
  • the entire image can be made to show an obvious black and white effect to highlight the outline of the first object, so that the outline of the first object can be quickly extracted from the edge of the binarized image.
  • the predetermined area is circular.
  • the radius of the circle is 10 pixels.
  • the predetermined value is 0.6.
  • Setting the predetermined value to 0.6 can exclude corner points on the approximate straight line, which is beneficial to quickly obtaining the target corner points and improving the efficiency of corner point detection.
  • the target object is an ear.
  • a device for corner point detection including a processor and a memory.
  • the memory is used to store a program.
  • the processor is used to call and run the program from the memory to execute the first aspect. Or the corner detection method in any possible implementation of the first aspect.
  • a computer-readable storage medium including a computer program, When the computer program is run on the computer, the computer is caused to perform the corner point detection method in the above-mentioned first aspect or any possible implementation of the first aspect.
  • a fourth aspect provides a computer program product containing instructions that, when executed by a computer, cause the computer to perform the corner point detection method in the above-mentioned first aspect or any possible implementation of the first aspect.
  • Figure 1 is a schematic flow chart of a corner point detection method provided by an embodiment of the present application.
  • Figure 2 is a schematic diagram of an image to be detected provided by an embodiment of the present application.
  • Figure 3 is a schematic flow chart of another corner point detection method provided by an embodiment of the present application.
  • Figure 4 is a schematic process diagram of another corner point detection method provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a corner point detection device provided by an embodiment of the present application.
  • an embodiment means that a particular feature, structure or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application.
  • the appearances of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those skilled in the art understand, both explicitly and implicitly, that the embodiments described herein may be combined with other embodiments.
  • multiple refers to more than two (including two).
  • multiple groups refers to two or more groups (including two groups), and “multiple pieces” refers to It is more than two pieces (including two pieces).
  • Corner point detection of an image is a very important part of the process of automatic inspection of workpieces in industrial sites. Its ability and speed to extract corner points will directly affect the performance of industrial automated inspection. Accuracy and efficiency.
  • Existing corner detection algorithms can be roughly divided into three categories: model-based methods, grayscale-based methods, and contour-based methods. Among them, when extracting corner points on contour curves, this type of algorithm is widely used in industrial inspection sites because of its less calculation amount and high detection accuracy. The existing method first extracts candidate corner points on the contour, and then determines whether the middle corner point is the real corner point through the angle of the line connecting the three corner points.
  • This method requires a large number of traversals, which will lead to high algorithm complexity, thus Affects the efficiency of corner detection.
  • the workpiece in the image may include multiple objects, and the multiple objects may overlap each other, it will be more difficult to detect or locate the corner points of the target object.
  • embodiments of the present application provide a corner point detection method.
  • the corner points on the outline of the target object are obtained, and then the area proportion corresponding to each corner point is calculated.
  • the area proportion refers to the current corner point.
  • the proportion of the area except the background in the predetermined area in the center is determined by the relationship between the area proportion and the predetermined value whether the corner point is the target corner point.
  • the corner point detection method of this application only needs to compare the area ratio of the current corner point with the predetermined value to confirm whether it is the target corner point. It does not require the auxiliary confirmation of other corner points. Compared with the existing method, it reduces the number of traversals and reduces the time required. The complexity of the algorithm improves the efficiency of corner detection.
  • Figure 1 is a corner point detection method 100 according to an embodiment of the present application.
  • the method 100 specifically includes the following steps 110-130.
  • the plurality of corner points are the corner points of the outline of the first object in the image to be detected, and the outline of the first object includes the outline of the target object.
  • the image to be detected may be, for example, an image obtained by photographing the target object through a camera, To detect the corner points of the target object.
  • the target object can be the entire workpiece or a certain component on the workpiece.
  • the image to be detected obtained by photographing the workpiece through the camera not only includes the target object, but may also include other objects.
  • This application refers to all objects in the image to be detected as the first object. Objects, target objects and other objects may be separated from each other or may overlap with each other. Overlapping can be complete or partial.
  • the image to be detected shown in Figure 2 is an electrode assembly captured by a camera.
  • the image includes a background 10, a cell body 11, tabs 12 and an adapter piece 13.
  • the first object is an electrode assembly, including a cell. There are three objects: the main body 11, the tab 12 and the adapter piece 13. When the target object is the tab 13, it can be seen that the target tab 12 is welded to another object, the adapter piece 13, and the two partially overlap.
  • the target object is a certain component on the workpiece
  • the image to be detected has a first object and an environmental background.
  • the first object includes a target object.
  • the outline of the first object refers to the line that forms the outer edge of the first object when the first object is separated from the background.
  • the outline of the target object refers to the line that forms the outer edge of the target object when it is segmented from the background.
  • the area proportion is the area proportion of the first object within the predetermined area centered on the corner point.
  • each corner point is traversed and the area proportion corresponding to each corner point is calculated.
  • the area proportion refers to drawing a predetermined area with the currently traversed corner point as the center, and calculating the proportion of the first object's area in the predetermined area.
  • the target corner point refers to the corner point where the target object is adjacent to the background in the image to be detected.
  • corner points 1-8 are the target corner points of the pole lug 12. Corner points: After obtaining multiple corner points, interference points among the multiple corner points can be eliminated based on the area proportions to determine the target corner point of the target object.
  • the corner point detection method provided by the embodiment of the present application only needs to determine whether the corner point is the target corner point through the area ratio, and does not require the auxiliary confirmation of other corner points. Compared with the existing method, it reduces the number of traversals and reduces the number of traversals. It reduces the complexity of the algorithm and improves the efficiency of corner detection.
  • step 130 may obtain at least one candidate corner point whose area proportion is greater than a predetermined value among multiple corner points, and then obtain the target corner point from at least one candidate corner point.
  • the above embodiment first compares each region proportion among multiple region proportions with a predetermined value. When the region proportion is greater than the predetermined value, the corner point corresponding to the region proportion is listed as a candidate corner point. . After traversing all corner points, there may be one or more candidate corner points. When there is only one candidate corner point, the candidate corner point is the target corner point. When there are multiple candidate corner points, a target corner point needs to be determined from multiple candidate corner points.
  • the corner point corresponding to the area proportion can be listed as a candidate corner point.
  • interference points are filtered out through numerical comparison, leaving qualified candidate corner points, which is conducive to determining the target corner point as quickly as possible, thereby improving the detection efficiency of corner points.
  • obtaining the target corner point from at least one candidate corner point may include: if there are multiple candidate corner points, determining the target corner according to the positional relationship between the multiple candidate corner points and the center point of the target object. point.
  • the positional relationship may include the distance relationship or direction between the candidate corner point and the center point of the target object. relationship, or both.
  • Each of the plurality of candidate corner points has a different positional relationship with the center point of the target object, and the target corner point can be determined among the plurality of candidate corner points by setting the positional relationship. For example, the candidate corner point that is farthest from the center point of the target object can be selected as the target corner point, or the candidate corner point at a certain orientation of the center point of the target object can be selected as the target corner point.
  • the target corner point can be determined at one time among multiple candidate corner points based on the positional relationship, thereby improving the efficiency of corner point detection.
  • determining the target corner point based on the positional relationship between multiple candidate corner points and the center point of the target object may be to determine the vertical distance from the position of the center point of the target object among the multiple candidate corner points. The largest candidate corner point is determined as the target corner point.
  • obtaining multiple corner points of the target object in the image to be detected in step 110 may include: obtaining multiple corner points in the area of interest in the image to be detected.
  • the region of interest can be a manually set area, and its size and location can be set in advance.
  • the area to be processed can be outlined in a box, circle, ellipse, irregular polygon, etc.
  • the area of interest can be set in the image to be inspected to narrow down the analysis and processing required in the image to be inspected. range. For example, you can reduce the number of corner points obtained and proceed to the next step of processing, which can reduce the number of traversals and calculations and improve the efficiency of corner point detection.
  • At least one region of interest in the image to be detected may be determined.
  • multiple regions of interest can be set to obtain corner points.
  • the number of acquired corner points can be further reduced by setting multiple regions of interest to further increase the number of traversals and calculations and improve the efficiency of corner point detection.
  • the embodiment of the present application is mainly aimed at obtaining the target corner point of the target object when the position of the target object in the image to be detected is known. Therefore, the approximate position of the target corner point is determined, and the area of interest can be used to obtain the target corner point. Reduce the number of corners to analyze. In the embodiment of the present application, the number of regions of interest is consistent with the number of target corners, and only one target corner point is determined for each region of interest.
  • obtaining multiple corner points of the target object in the image to be detected in step 110 may include: obtaining the outline of the first object in the area of interest to obtain the target outline, where the target outline includes the Contour, obtain the corner points of the target contour to obtain the multiple corner points.
  • the image to be detected may include one or more areas of interest.
  • the outline of the first object may not only include the outline of the target object, but may also include the outlines of other objects.
  • the area of interest is used to intercept the outline of the target object from the outline of the first object. down to obtain the contour including the target object, and then obtain the corner points on the contour including the target object. Compared with first obtaining all the corner points of the contour of the first object and then using the region of interest to obtain the corner points on the contour including the target object. , which reduces the number of corner points obtained and helps improve the efficiency of corner point detection.
  • a polygon corresponding to the target contour can be obtained through a polygon approximation method, and then the vertices of the polygon can be obtained to obtain multiple corner points.
  • Obtaining the polygon corresponding to the target contour through the polygon approximation method can reduce the number of corner points that need to be processed later and improve the detection efficiency of corner points.
  • the method 100 may also include: binarizing the image to be detected to obtain a binarized image of the image to be detected, and obtaining the outline of the first object according to the edge of the binarized image.
  • the corresponding binarization method can be selected according to the brightness relationship between the foreground (first object or workpiece) and the environmental background, such as ordinary binarization, large-law binarization, local binarization, adaptive binarization, etc. , which can set the value of the foreground pixel to 1 and the value of the background pixel to 0, or it can set the value of the foreground pixel to 0 and the value of the background pixel to 1.
  • the edge of the first object will appear in the binarized image, and the edge of the first object can constitute the contour curve of the first object.
  • the first object may have one or more contour curves.
  • the entire image can be made to show an obvious black and white effect to highlight the outline of the first object, so as to quickly extract the first object from the edge of the binarized image.
  • Object outline
  • the binarized image before obtaining the outline of the first object according to the edge of the binarized image, the binarized image may be denoised.
  • the median filtering method can be used to denoise a binary image.
  • the median filtering method is a nonlinear smoothing technology that sets the gray value of each pixel to all pixels in a neighborhood window of that point. The median of the point gray value makes the surrounding pixel values close to the true value, thereby eliminating isolated noise points.
  • the specific method can use a two-dimensional sliding template with a certain structure to sort the pixels in the plate according to the size of the pixel value to generate a monotonically rising (or falling) two-dimensional data sequence. Two-dimensional templates are usually 3*3, 5*5 areas, and can also be different shapes, such as lines, circles, crosses, donuts, etc.
  • the median filtering method is a commonly used denoising method in the prior art and will not be described in detail here. Of course, other denoising methods can also be used.
  • the predetermined area may be circular. Set the predetermined area Setting it as a circle is helpful to quickly determine the area ratio of the first object's area in the predetermined area. It can also avoid the need to consider the impact of the angle on the area ratio like other angled images, thereby improving the accuracy of corner point detection. Spend.
  • the radius of the circle may be 10 pixels. Setting the radius of the circular predetermined area to 10 pixels can avoid the problem that if the radius value is too large, other corner points may be included in the predetermined area, which will affect the calculation of the area proportion of the current corner point. If the radius value is too small, the accuracy will be low. , this value can calculate the area proportion more reasonably and effectively to improve the accuracy of corner detection.
  • the predetermined value may be 0.6. Setting the predetermined value to 0.6 can exclude corner points on the approximate straight line, which is beneficial to quickly obtaining the target corner points and improving the efficiency of corner point detection.
  • the target object may be a lug.
  • the process of detecting the pole target corner point please refer to the following description and Figure 3 and Figure 4.
  • the present application provides a schematic flow chart of a method 300 for pole corner point detection.
  • the process 300 may include at least part of the following content.
  • Figure 4 is a schematic process diagram for detecting the target corner point of the pole tab.
  • the image to be detected includes, in addition to the tabs 12, the cell body 11 and the adapter piece 13.
  • the tabs 12 are welded to on the adapter piece 13.
  • Figure 4(a) is a binarized image of Figure 2.
  • the black part is the electrode assembly, including the cell body 11, the tab 12, and the adapter piece 13; the white part is the background.
  • FIG. 4(b) is an outline of the electrode assembly obtained by taking the edge of the electrode assembly in FIG. 4(a). Among them, the outline curve of the electrode assembly There are three edge curves, that is, three white areas. The outline of the electrode assembly includes part of the outline of the tab.
  • the outline including the target object is acquired through the region of interest.
  • the rectangular frame of the area of interest is used to intercept the outline including the tabs to obtain the target outline. It should be noted that (c) of Figure 4 only shows one rectangular frame of the region of interest. In fact, there are 8 rectangular frames of the region of interest. The other 7 are not shown, and each rectangular frame needs to be detected. To find a target corner point, a total of 8 target corner points of the pole need to be detected in this image.
  • the polygon corresponding to the target contour is obtained through the polygon approximation method, and the vertices of the polygon are obtained to obtain multiple corner points.
  • a plurality of acquired corner points are shown in (e) of FIG. 4 .
  • a predetermined area can be drawn with each corner point as the center, and the area ratio of the first object's area in the predetermined area is calculated.
  • the predetermined area is a circle as an example, and the area proportion diagram of the corner points.
  • the method embodiments of the embodiments of the present application are described in detail above. The following describes the method embodiments of the present application.
  • the device embodiments of the embodiments, the device embodiments and the method embodiments correspond to each other, so the parts not described in detail can be referred to the previous method embodiments, and the device can implement any possible implementation method in the above method.
  • FIG. 5 is a schematic diagram of the hardware structure of a corner point detection device according to an embodiment of the present application.
  • the device 500 for corner point detection shown in FIG. 5 includes a memory 501 and a processor 502.
  • the memory 501 stores instructions, and when the instructions are run by the processor, the device 500 causes the device 500 to execute the method described in any of the above embodiments.
  • the memory 501 may be a read-only memory (ROM), a static storage device, and a random access memory (RAM).
  • ROM read-only memory
  • RAM random access memory
  • the processor 502 may be a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more
  • the integrated circuit is used to execute relevant programs to implement the functions required to be performed by the units in the corner point detection device according to the embodiment of the present application, or to execute the corner point detection method according to the embodiment of the present application.
  • the processor 502 may also be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the corner point detection method in the embodiment of the present application can be completed by instructions in the form of hardware integrated logic circuits or software in the processor 502 .
  • the above-mentioned processor 502 can also be a general-purpose processor, a digital signal processor (digital signal processing, DSP), an ASIC, an off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP digital signal processing
  • ASIC application-specific integrated circuit
  • FPGA field programmable gate array
  • Each method, step and logical block diagram disclosed in the embodiment of this application can be implemented or executed.
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • the steps of the methods disclosed in conjunction with the embodiments of the present application can be directly implemented by a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor.
  • Software modules may be located in random access memory, flash memory, ROM, programmable ROM or It can be used in storage media that are mature in this field such as electrically erasable programmable memories and registers.
  • the storage medium is located in the memory 501.
  • the processor 502 reads the information in the memory 501, and combines its hardware to complete the functions required to be performed by the units included in the device for corner detection in the embodiment of the present application, or to perform the corner point detection in the embodiment of the present application. Point detection method.
  • Embodiments of the present application also provide a computer-readable storage medium that stores program code for device execution, and the program code includes instructions for executing steps in the above method of corner point detection.
  • Embodiments of the present application also provide a computer program product.
  • the computer program product includes a computer program stored on a computer-readable storage medium.
  • the computer program includes program instructions. When the program instructions are executed by a computer, The computer executes the above method of corner point detection.
  • the above-mentioned computer-readable storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
  • the disclosed devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • the described embodiments may be implemented by software, hardware, or a combination of software and hardware.
  • the described embodiments may also be embodied by computer-readable media having computer-readable code stored thereon, the computer-readable code including instructions executable by at least one computing device.
  • the computer-readable medium can be associated with any data storage device capable of storing data readable by a computer system. Examples of computer-readable media may include read-only memory, random access memory, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), hard disk drive (Hard Disk Drive, HDD), digital Video discs (Digital Video Disc, DVD), tapes and optical data storage devices, etc.
  • the computer-readable medium can also be distributed among computer systems coupled through a network, so that the computer-readable code can be stored and executed in a distributed manner.

Landscapes

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

Abstract

本申请实施例公开了一种角点检测的方法、装置,能够提高角点检测效率。该角点检测的方法包括:获取待检测图像中目标对象的多个角点,所述多个角点为所述待检测图像中第一对象的轮廓的角点,所述第一对象的轮廓包括所述目标对象的轮廓;获取所述多个角点中每个角点对应的区域占比,所述区域占比为以所述角点为中心的预定区域内所述第一对象的区域的占比;根据所述区域占比,在所述多个角点中确定所述目标对象的目标角点。

Description

角点检测的方法和装置
相关申请的交叉引用
本申请要求享有于2022年07月18日提交的名称为“角点检测的方法和装置”的中国专利申请202210841619.X的优先权,该申请的全部内容通过引用并入本文中。
技术领域
本申请涉及图像处理技术领域,更为具体地,涉及一种角点检测的方法和装置。
背景技术
图像中的角点通常指图像中亮度变化剧烈的点,或者图像边缘轮廓曲线上曲率取极大值的点,是表征图像的一种重要特征,图像的角点检测作为工业现场中工件的自动检测等过程中很重要的一环,其提取角点的能力和速度会直接影响工业自动化检测的精度和效率。
现阶段的角点检测算法主要有基于灰度图像、二值图像和轮廓曲线的角点检测算法三类,其中基于轮廓的角点检测方法因其具有较低的检测错误率而得到更为广泛的应用。但目前已有的基于轮廓的角点检测方法计算复杂度较高,不适用于高效率要求的检测场景。因此,亟需一种高效的角点检测方法。
发明内容
本申请实施例提供了一种角点检测方法和装置,能够减少算法复 杂度,从而提高了角点的检测效率。
第一方面,提供了一种角点检测的方法,包括:获取待检测图像中目标对象的多个角点,所述多个角点为所述待检测图像中第一对象的轮廓的角点,所述第一对象的轮廓包括所述目标对象的轮廓;获取所述多个角点中每个角点对应的区域占比,所述区域占比为以所述角点为中心的预定区域内所述第一对象的区域的占比;根据所述区域占比,在所述多个角点中确定所述目标对象的目标角点。
本申请的技术方案中,仅需要通过区域占比就可以确定角点是否为目标角点,不需要其他角点的辅助确认,相比现有方法减少了遍历次数,减少了算法的复杂度,提高了角点检测的效率。
在一些可能的实施方式中,所述根据所述区域占比,在所述多个角点中确定所述目标对象的目标角点包括:在所述多个角点中,获取所述区域占比大于预定值的至少一个候选角点;在所述至少一个候选角点中获取所述目标角点。
通过比较区域占比与预定值,以数值比较的方式筛掉干扰点,留下符合条件的候选角点,有利于尽快确定目标角点,从而提高角点的检测效率。
在一些可能的实施方式中,所述在所述至少一个候选角点中获取所述目标角点,包括:若所述候选角点为多个,根据多个所述候选角点与所述目标对象的中心点的位置关系确定所述目标角点。
由于候选角点与目标对象的中心点的位置关系均不同,可以通过该位置关系在多个候选角点中一次性确定目标角点,以提高角点检测的效率。
在一些可能的实施方式中,所述根据多个所述候选角点与所述目标对象的中心点的位置关系确定所述目标角点包括:在多个所述候选角点 中,将与所述目标对象的中心点的位置垂直距离最大的所述候选角点确定为所述目标角点。
在一些可能的实施方式中,所述获取待检测图像中目标对象的多个角点包括:在所述待检测图像中的感兴趣区域中,获取所述多个角点。
通过在待检测图像中设置感兴趣区域,可以缩小待检测图像中需要分析和处理的范围,可以减少获取的角点的数量,以进行下一步处理,因此提高了角点检测的效率。
在一些可能的实施方式中,所述方法还包括:确定所述待检测图像中至少一个所述感兴趣区域。
在待检测区域中,可以设置多个感兴趣区域获取角点。当第一对象的轮廓上的角点较多时,可以通过设置多个感兴趣区域进一步减少获取的角点数量,以进一步遍历次数与计算量,提高角点检测的效率。
在一些可能的实施方式中,所述获取待检测图像中目标对象的多个角点包括:获取所述感兴趣区域中所述第一对象的轮廓,以得到目标轮廓,所述目标轮廓包括所述目标对象的轮廓;获取所述目标轮廓的角点,以得到所述多个角点。
利用感兴趣区域将目标对象的轮廓从第一对象的轮廓上截取下来,以得到包括目标对象的轮廓,然后再在包括目标对象的轮廓获取角点,相比先获取第一对象的轮廓的所有角点再利用感兴趣区域获取包括目标对象的轮廓上的角点,减少了获取角点的数量,有助于提高角点检测的效率。
在一些可能的实施方式中,所述获取所述目标轮廓的角点,以得到所述多个角点包括:通过多边形逼近方法获取所述目标轮廓对应的多边形;获取所述多边形的顶点,以得到所述多个角点。
通过多边形逼近方法获取目标轮廓对应的多边形,可以减少后续需要处理的角点,提高角点的检测效率。
在一些可能的实施方式中,获取所述感兴趣区域中所述第一对象的轮廓之前,所述方法还包括:对所述待检测图像进行二值化,以得到所述待检测图像的二值化图像;根据所述二值化图像的边缘获取所述第一对象的轮廓。
在对待检测图像进行二值化处理后,可以使整个图像呈现出明显的黑白效果,以凸显出第一对象的轮廓,以便于从二值化图像的边缘快速提取该第一对象的轮廓。
在一些可能的实施方式中,所述预定区域为圆形。
将预定区域设置为圆形,有利于快速判断第一对象的区域在预定区域的区域占比,还可以避免像其他有角度的图像,需要考虑角度对区域占比的影响,从而提高了角点检测的准确度。
在一些可能的实施方式中,所述圆形的半径为10个像素。
将圆形预定区域的半径设置为10个像素,可以避免半径值过大可能将其他角点包括在预定区域中,以影响计算当前角点的区域占比,过小引起精确度不高的问题,该取值可以更合理、有效计算区域占比,以提高角点检测的准确度。
在一些可能的实施方式中,所述预定值为0.6。
将预定值设置为0.6,可以将近似直线上的角点排除,有利于快速获取目标角点,提高角点检测的效率。
在一些可能的实施方式中,所述目标对象为极耳。
第二方面,提供了一种角点检测的装置,包括处理器和存储器,所述存储器用于存储程序,所述处理器用于从所述存储器中调用并运行所述程序以执行上述第一方面或第一方面的任一可能的实施方式中的角点检测的方法。
第三方面,提供了一种计算机可读存储介质,包括计算机程序, 当所述计算机程序在计算机上运行时,使得所述计算机执行上述第一方面或第一方面的任一可能的实施方式中的角点检测的方法。
第四方面,提供一种包含指令的计算机程序产品,该指令被计算机执行时使得该计算机执行上述第一方面或第一方面的任一可能的实现方式中的角点检测的方法。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据附图获得其他的附图。
图1是本申请实施例提供的一种角点检测的方法的示意性流程图;
图2是本申请实施例提供的一种待检测图像的示意图;
图3是本申请实施例提供的另一种角点检测的方法的示意性流程图;
图4是本申请实施例提供的另一种角点检测的方法的示意性过程图;
图5是本申请实施例提供的一种角点检测的装置的结构示意图。
具体实施方式
下面将结合附图对本申请技术方案的实施例进行详细的描述。以下实施例仅用于更加清楚地说明本申请的技术方案,因此只作为示例,而不能以此来限制本申请的保护范围。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同;本文中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请;本申请的说明书和权利要求书及上述附图说明中的术语“包括”和“具有”以及它们的任 何变形,意图在于覆盖不排他的包含。
在本申请实施例的描述中,技术术语“第一”“第二”等仅用于区别不同对象,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量、特定顺序或主次关系。在本申请实施例的描述中,“多个”的含义是两个以上,除非另有明确具体的限定。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
在本申请实施例的描述中,术语“多个”指的是两个以上(包括两个),同理,“多组”指的是两组以上(包括两组),“多片”指的是两片以上(包括两片)。
在本申请实施例的描述中,技术术语“中心”“纵向”“横向”“长度”“宽度”“厚度”“上”“下”“前”“后”“左”“右”“竖直”“水平”“顶”“底”“内”“外”“顺时针”“逆时针”“轴向”“径向”“周向”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本申请实施例和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请实施例的限制。
在本申请实施例的描述中,除非另有明确的规定和限定,技术术语“安装”“相连”“连接”“固定”等术语应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或成一体;也可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通或两个元件的相互作用关系。对于本领域的普通技术人 员而言,可以根据具体情况理解上述术语在本申请实施例中的具体含义。
图像的角点是表征图像的一种重要特征,图像的角点检测作为工业现场中工件的自动检测等过程中很重要的一环,其提取角点的能力和速度会直接影响工业自动化检测的精度和效率。现有的角点检测算法大致可分为三类:基于模型的方法、基于灰度的方法、基于轮廓的方法。其中,在轮廓曲线上进行角点提取时,因其计算量较少、检测的准确性较高,因此该类算法被广泛的应用在工业检测现场。现有的方法在轮廓上初次提取候选角点后,再通过三个角点连线的角度确定中间角点是否为真实角点,该方法的遍历次数较多,会导致算法复杂度高,从而影响角点检测的效率。另外,目前在目标对象的角点进行检测时,由于图像中的工件可能包括多个对象,其中多个对象可能相互重叠,会导致目标对象的角点更加难以检测或定位。
鉴于此,本申请实施例提供了一种角点检测的方法,首先获取目标对象轮廓上的角点,然后计算每个角点对应的区域占比,该区域占比是指以当前角点为中心的预定区域内除背景以外的区域的占比,通过区域占比与预定值的关系确定该角点是否为目标角点。本申请的角点检测方法仅需要比较当前角点的区域占比与预定值即可确认是否为目标角点,不需要其他角点的辅助确认,相比现有方法减少了遍历次数,减少了算法的复杂度,提高了角点检测的效率。
图1是本申请实施例的角点检测的方法100,该方法100具体包括以下步骤110-130。
110,获取待检测图像中目标对象的多个角点。其中,多个角点为待检测图像中第一对象的轮廓的角点,第一对象的轮廓包括目标对象的轮廓。
待检测图像例如可以是通过摄像机拍摄目标对象所得到的图像, 以对目标对象的角点进行检测。在工件的检测场景中,目标对象可以是整个工件也可以是工件上的某一部件。
需要说明的是,目标对象为工件上的某一部件时,通过摄像机拍摄工件所得的待检测图像不仅包括目标对象,还可能包括其他对象,本申请将待检测图像中的所有对象称为第一对象,目标对象与其他对象有可能相互分离,也有可能相互重叠。相互重叠可以是完全重叠,也可以是部分重叠。例如图2所示的待检测图像,是利用摄像头拍摄的电极组件,该图像包括背景10,电芯主体11、极耳12以及转接片13,其中,第一对象为电极组件,包括电芯主体11、极耳12以及转接片13三种对象,当目标对象为极耳13,可以看出,目标对象极耳12焊接于其他对象即转接片13上,两者有部分重叠。
当目标对象为工件上的某一部件时,待检测图像中的目标对象可以有一个,也可以有多个,例如图2上有4个极耳,本申请对此不作限定。
待检测图像具有第一对象和环境背景,第一对象包括目标对象,通过确定目标对象的轮廓曲线上的角点的位置,能够对目标对象进行快速定位,进而快速完成对目标对象的后续分析。
第一对象的轮廓指第一对象与背景分割时,构成第一对象外缘的线条。目标对象的轮廓指目标对象与背景分割时,构成目标对象外缘的线条。当目标对象与其他对象的部分相互重叠时,第一对象的轮廓包括目标对象的轮廓,目标对象的轮廓上的角点在第一对象的轮廓上。
120,获取多个角点中每个交点对应的区域占比。其中,区域占比为以角点为中心的预定区域内第一对象的区域的占比。
在获取到目标对象的多个角点后,遍历每个角点,计算每个角点对应的区域占比。区域占比指以当前遍历的角点为中心,绘出预定区域,计算第一对象的区域在该预定区域的占比。
130,根据区域占比,在多个角点中确定目标对象的目标角点。
当目标对象与其他对象的部分相互重叠时,目标角点是指在待检测图像中,目标对象与背景相邻的角点。如图2所示,角点1-8为极耳12的目标角点。角点当获取多个角点后,可以根据区域占比排除多个角点中的干扰点,以确定目标对象的目标角点。
本申请实施例提供的角点检测的方法,仅需要通过区域占比就可以确定该角点是否为目标角点,不需要其他角点的辅助确认,相比现有方法减少了遍历次数,减少了算法的复杂度,提高了角点检测的效率。
可选地,在一些实施例中,步骤130可以在多个角点中,获取区域占比大于预定值的至少一个候选角点,然后在至少一个候选角点中获取目标角点。
应理解,上述实施例首先将多个区域占比中的每个区域占比与预定值进行比较,当区域占比大于预定值时,将该区域占比所对应的角点列为候选角点。遍历完所有角点后,候选角点可能有一个,可能有多个。当候选角点仅为一个时,该候选角点即为目标角点。当候选角点为多个时,需要从多个候选角点确定一个目标角点。
需要说明的是,还可能通过预定范围与区域占比进行比较,当区域占比在预定范围内,即可将该区域占比对应的角点列为候选角点了。
通过比较区域占比与预定值,以数值比较的方式筛掉干扰点,留下符合条件的候选角点,有利于尽快确定目标角点,从而提高角点的检测效率。
可选地,在一些实施例中,在至少一个候选角点中获取目标角点可以包括:若候选角点为多个,根据多个候选角点与目标对象的中心点的位置关系确定目标角点。
位置关系可以包括候选角点与目标对象的中心点的距离关系或方 位关系,或者两者兼备。多个候选角点中的每个候选角点与目标对象中心点的位置关系均不同,可以通过设置位置关系在多个候选角点中确定目标角点。示例性的,可以选择与目标对象中心点距离最远的候选角点作为目标角点,也可以选择在目标对象中心点的某一方位的候选角点作为目标角点。
上述实施例,由于候选角点与目标对象的中心点的位置关系均不同,可以通过该位置关系在多个候选角点中一次性确定目标角点,以提高角点检测的效率。
可选地,在一些实施例中,根据多个候选角点与目标对象的中心点的位置关系确定目标角点可以是在多个候选角点中,将与目标对象的中心点的位置垂直距离最大的候选角点确定为目标角点。
可选地,在一些实施例中,步骤110在获取待检测图像中目标对象的多个角点可以包括:在待检测图像中的感兴趣区域中,获取多个角点。
感兴趣区域(region of interest,ROI)可以是人为设定的区域,其大小和位置皆可以提前设定。例如可以是方框、圆、椭圆、不规则多边形等方式勾勒出需要处理的区域。在视觉检测工位上,每次拍摄的待检测图像中,目标对象在待检测图像中的位置区域较为固定,可以在待检测图像中设置感兴趣区域,以缩小待检测图像中需要分析和处理的范围。例如,可以减少获取的角点的数量,进行下一步处理,即可以减少遍历次数与计算量,提高角点检测的效率。
可选地,在一些实施例中,可以确定待检测图像中至少一个所述感兴趣区域。
也就是说,在待检测区域中,可以设置多个感兴趣区域获取角点。当第一对象的轮廓上的角点较多时,可以通过设置多个感兴趣区域进一步减少获取的角点数量,以进一步遍历次数与计算量,提高角点检测的效率。
需要说明的是,本申请实施例中主要针对待检测图像中目标对象的位置已知的情况下,获取目标对象的目标角点,因此目标角点的大致位置是确定的,利用感兴趣区域可以减少需要分析的角点。本申请实施例中,感兴趣区域的数目与目标角点的数目一致,每个感兴趣区域仅需确定一个目标角点。
可选地,在一些实施例中,步骤110在获取待检测图像中目标对象的多个角点可以包括:获取感兴趣区域中第一对象的轮廓,以得到目标轮廓,目标轮廓包括目标对象的轮廓,获取目标轮廓的角点,以得到所述多个角点。
待检测图像可以包括一个或多个感兴趣区域,第一对象的轮廓不仅包括目标对象的轮廓,还可能包括其他对象的轮廓,利用感兴趣区域将目标对象的轮廓从第一对象的轮廓上截取下来,以得到包括目标对象的轮廓,然后再在包括目标对象的轮廓获取角点,相比先获取第一对象的轮廓的所有角点再利用感兴趣区域获取包括目标对象的轮廓上的角点,减少了获取角点的数量,有助于提高角点检测的效率。
可选地,在一些实施例中,可以通过多边形逼近方法获取目标轮廓对应的多边形,然后获取该多边形的顶点,以得到多个角点。
在对一个轮廓进行形状分析时,通常需要使用多边形来逼近一个轮廓,使得顶点数变少,常见的OpenCV的approxPolyDP函数就可以实现这个功能,也可以通过其他方法实现获取目标轮廓对应的多边形,本申请对此不作限定。由于OpenCV的approxPolyDP函数是现有技术中常用的多边形逼近方法,在此不再赘述。
通过多边形逼近方法获取目标轮廓对应的多边形,可以减少后续需要处理的角点,提高角点的检测效率。
可选地,在一些实施例中,在获取感兴趣区域中第一对象的轮廓 之前,方法100还可以包括:对待检测图像进行二值化,以得到待检测图像的二值化图像,根据二值化图像的边缘获取第一对象的轮廓。
可以根据前景(第一对象或工件)与环境背景之间的亮度关系选择相应的二值化方法,例如普通二值化、大律法二值化、局部二值化、自适应二值化等,这可以将前景像素点的值为1,背景像素点的值为0,也可以将前景像素点的值为0,背景像素点的值为1。
对二值化的图像进行边缘分析,第一对象的边缘便会出现在二值化后的图像中,第一对象的边缘便可构成第一对象的轮廓曲线。
根据第一对象中对象的数量和形状,第一对象的轮廓曲线可能有一条,也可能有多条。
上述实施例中,在对待检测图像进行二值化处理后,可以使整个图像呈现出明显的黑白效果,以凸显出第一对象的轮廓,以便于从二值化图像的边缘快速提取该第一对象的轮廓。
可选地,在一些实施例中,在根据二值化图像的边缘获取第一对象的轮廓之前,可以对二值化图像进行去噪处理。
经过二值化处理后图中物体的轮廓边缘是粗糙的,不平整的。例如可以使用中值滤波法对二值图像进行去噪处理,中值滤波法是一种非线性平滑技术,它将每一像素点的灰度值设置为该点某邻域窗口内的所有像素点灰度值的中值,让周围的像素值接近的真实值,从而消除孤立的噪声点。具体方法可采用某种结构的二维滑动模板,将板内像素按照像素值的大小进行排序,生成单调上升(或下降)的二维数据序列。二维模板通常为3*3,5*5区域,也可以是不同的形状,如线状,圆形,十字形,圆环形等。中值滤波法是现有技术中常用的去噪方法,在此不再赘述,当然也可以采用其他的去噪方法。
可选地,在一些实施例中,预定区域可以为圆形。将预定区域设 置为圆形,有利于快速判断第一对象的区域在预定区域的区域占比,还可以避免像其他有角度的图像,需要考虑角度对区域占比的影响,从而提高了角点检测的准确度。
可选地,在一些实施例中,圆形的半径可以为10个像素。将圆形预定区域的半径设置为10个像素,可以避免半径值过大可能将其他角点包括在预定区域中,以影响计算当前角点的区域占比,过小引起精确度不高的问题,该取值可以更合理、有效计算区域占比,以提高角点检测的准确度。
可选地,在一些实施例中,预定值可以为0.6。将预定值设置为0.6,可以将近似直线上的角点排除,有利于快速获取目标角点,提高角点检测的效率。
可选地,在一些实施例中,目标对象可以是极耳。检测极耳目标角点的过程可参考以下描述以及图3、图4。
根据本申请的一些实施例,参见图3至图4,本申请提供了一种极耳角点检测的方法300的示意性流程图,该流程300中可以包括以下内容的至少部分内容。图4为检测极耳的目标角点的示意性过程图。
301,获取待检测图像。如图2所示,当检测电池组件上极耳12的角点时,所拍摄的待检测图像除包括极耳12外,还包括电芯主体11、转接片13,其中极耳12焊接于在转接片13上。
302,对待检测图像进行二值化。图4的(a)是对图2进行二值化处理过的图像,其中黑色部分为电极组件,包括电芯主体11、极耳12、转接片13;白色部分为背景。
303,获取第一对象的轮廓。通过二值化图像的边缘,即黑色与白的相交处,可以提取第一对象的轮廓。图4的(b)是获取图4的(a)中电极组件的边缘,得到的电极组件的轮廓。其中,电极组件的轮廓曲线 有三条,即三块白色区域的边缘曲线,电极组件的轮廓包括极耳的部分轮廓。
304,获取包括目标对象的的轮廓。具体地,通过感兴趣区域获取包括目标对象的轮廓。图4的(c)中,利用感兴趣区域的矩形框截取包括极耳的轮廓,以得到目标轮廓。需要说明的是,该图4的(c)仅示出了一个感兴趣区域的矩形框,实际上共包括8个感兴趣区域的矩形框,其他7个未示出,每个矩形框需要检测出一个目标角点,该图像共需要检测出极耳的8个目标角点。
305,获取多个角点,并计算每个角点的区域占比。具体地,通过多边形逼近方法获取目标轮廓对应的多边形,获取多边形的顶点以获得多个角点。图4的(e)中示出了获取的多个角点。在计算每个角点的区域占比时,可以以每个角点为中心,绘制预定区域,计算第一对象的区域在该预定区域的区域占比。如图4的(f)是以预定区域为圆形为例,角点的区域占比图。
306,在多个角点中,获取区域占比大于预定值的至少一个候选角点。判断每个角点对应的区域占比是否大于预定值,若大于,该角点被列为候选角点。
307,判断候选角点是否为多个。若否,说明通过预定值与区域占比并已将所有的干扰点排除,列出的这一个候选角点便为目标角点。若是,说明通过预定值与区域占比并未将所有的干扰点排除,则在多个候选角点中,将与目标对象的中心点的位置垂直距离最大的候选角点确定为目标角点,如图4的(g),预定值为0.6时,最终检测出的极耳的目标角点。
还需要说明的是,上述仅以一个感兴趣区域为例,其他7个感兴趣区域内的目标节角点可以参考步骤304后的步骤进行检测。
上文详细地描述了本申请实施例的方法实施例,下面描述本申请 实施例的装置实施例,装置实施例与方法实施例相互对应,因此未详细描述的部分可参见前面方法实施例,装置可以实现上述方法中任意可能实现的方式。
图5是本申请实施例的角点检测的装置的硬件结构示意图。图5所示的角点检测的装置500包括存储器501和处理器502,存储器501存储有指令、指令被处理器运行时,使得装置500执行上述任一实施例所述的方法。
存储器501可以是只读存储器(read-only memory,ROM),静态存储设备和随机存取存储器(random access memory,RAM)。
处理器502可以采用通用的中央处理器(central processing unit,CPU),微处理器,应用专用集成电路(application specific integrated circuit,ASIC),图形处理器(graphics processing unit,GPU)或者一个或多个集成电路,用于执行相关程序,以实现本申请实施例的角点检测的装置中的单元所需执行的功能,或者执行本申请实施例的角点检测的方法。
处理器502还可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,本申请实施例的角点检测的方法的各个步骤可以通过处理器502中的硬件的集成逻辑电路或者软件形式的指令完成。
上述处理器502还可以是通用处理器、数字信号处理器(digital signal processing,DSP)、ASIC、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或 者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器501,处理器502读取存储器501中的信息,结合其硬件完成本申请实施例的角点检测的装置中包括的单元所需执行的功能,或者执行本申请实施例的角点检测的方法。
本申请实施例还提供了一种计算机可读存储介质,存储用于设备执行的程序代码,程序代码包括用于执行上述角点检测的方法中的步骤的指令。
本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括存储在计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述角点检测的方法。
上述的计算机可读存储介质可以是暂态计算机可读存储介质,也可以是非暂态计算机可读存储介质。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
本申请中使用的用词仅用于描述实施例并且不用于限制权利要求。如在实施例以及权利要求的描述中使用的,除非上下文清楚地表明,否则 单数形式的“一个”和“所述”旨在同样包括复数形式。类似地,如在本申请中所使用的术语“和/或”是指包含一个或一个以上相关联的列出的任何以及所有可能的组合。另外,当用于本申请中时,术语“包括”指陈述的特征、整体、步骤、操作、元素,和/或组件的存在,但不排除一个或一个以上其它特征、整体、步骤、操作、元素、组件和/或这些的分组的存在或添加。
所描述的实施例中的各方面、实施方式、实现或特征能够单独使用或以任意组合的方式使用。所描述的实施例中的各方面可由软件、硬件或软硬件的结合实现。所描述的实施例也可以由存储有计算机可读代码的计算机可读介质体现,该计算机可读代码包括可由至少一个计算装置执行的指令。所述计算机可读介质可与任何能够存储数据的数据存储装置相关联,该数据可由计算机系统读取。用于举例的计算机可读介质可以包括只读存储器、随机存取存储器、紧凑型光盘只读储存器(Compact Disc Read-Only Memory,CD-ROM)、硬盘驱动器(Hard Disk Drive,HDD)、数字视频光盘(Digital Video Disc,DVD)、磁带以及光数据存储装置等。所述计算机可读介质还可以分布于通过网络联接的计算机系统中,这样计算机可读代码就可以分布式存储并执行。
上述技术描述可参照附图,这些附图形成了本申请的一部分,并且通过描述在附图中示出了依照所描述的实施例的实施方式。虽然这些实施例描述的足够详细以使本领域技术人员能够实现这些实施例,但这些实施例是非限制性的;这样就可以使用其它的实施例,并且在不脱离所描述的实施例的范围的情况下还可以做出变化。比如,流程图中所描述的操作顺序是非限制性的,因此在流程图中阐释并且根据流程图描述的两个或两个以上操作的顺序可以根据若干实施例进行改变。作为另一个例子,在若干实施例中,在流程图中阐释并且根据流程图描述的一个或一个以上操作 是可选的,或是可删除的。另外,某些步骤或功能可以添加到所公开的实施例中,或两个以上的步骤顺序被置换。所有这些变化被认为包含在所公开的实施例以及权利要求中。
另外,上述技术描述中使用术语以提供所描述的实施例的透彻理解。然而,并不需要过于详细的细节以实现所描述的实施例。因此,实施例的上述描述是为了阐释和描述而呈现的。上述描述中所呈现的实施例以及根据这些实施例所公开的例子是单独提供的,以添加上下文并有助于理解所描述的实施例。上述说明书不用于做到无遗漏或将所描述的实施例限制到本申请的精确形式。根据上述教导,若干修改、选择适用以及变化是可行的。在某些情况下,没有详细描述为人所熟知的处理步骤以避免不必要地影响所描述的实施例。虽然已经参考优选实施例对本申请进行了描述,但在不脱离本申请的范围的情况下,可以对其进行各种改进并且可以用等效物替换其中的部件。尤其是,只要不存在结构冲突,各个实施例中所提到的各项技术特征均可以任意方式组合起来。本申请并不局限于文中公开的特定实施例,而是包括落入权利要求的范围内的所有技术方案。

Claims (15)

  1. 一种角点检测的方法,其特征在于,所述方法包括:
    获取待检测图像中目标对象的多个角点,所述多个角点为所述待检测图像中第一对象的轮廓的角点,所述第一对象的轮廓包括所述目标对象的轮廓;
    获取所述多个角点中每个角点对应的区域占比,所述区域占比为以所述角点为中心的预定区域内所述第一对象的区域的占比;
    根据所述区域占比,在所述多个角点中确定所述目标对象的目标角点。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述区域占比,在所述多个角点中确定所述目标对象的目标角点包括:
    在所述多个角点中,获取所述区域占比大于预定值的至少一个候选角点;
    在所述至少一个候选角点中获取所述目标角点。
  3. 根据权利要求2所述的方法,其特征在于,所述在所述至少一个候选角点中获取所述目标角点,包括:
    若所述候选角点为多个,根据多个所述候选角点与所述目标对象的中心点的位置关系确定所述目标角点。
  4. 根据权利要求3所述的方法,其特征在于,所述根据多个所述候选角点与所述目标对象的中心点的位置关系确定所述目标角点包括:
    在多个所述候选角点中,将与所述目标对象的中心点的位置垂直距离最大的所述候选角点确定为所述目标角点。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述获取待检测图像中目标对象的多个角点包括:在所述待检测图像中的感兴趣区域中,获取所述多个角点。
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:确定所述待检测图像中至少一个所述感兴趣区域。
  7. 根据权利要求5或6中所述的方法,其特征在于,所述获取待检测图像中目标对象的多个角点包括:
    获取所述感兴趣区域中所述第一对象的轮廓,以得到目标轮廓,所述目标轮廓包括所述目标对象的轮廓;
    获取所述目标轮廓的角点,以得到所述多个角点。
  8. 根据权利要求7所述的方法,其特征在于,所述获取所述目标轮廓的角点,以得到所述多个角点包括:
    通过多边形逼近方法获取所述目标轮廓对应的多边形;
    获取所述多边形的顶点,以得到所述多个角点。
  9. 根据权利要求7或8所述的方法,其特征在于,获取所述感兴趣区域中所述第一对象的轮廓之前,所述方法还包括:
    对所述待检测图像进行二值化,以得到所述待检测图像的二值化图像;
    根据所述二值化图像的边缘获取所述第一对象的轮廓。
  10. 根据权利要求1至9中任一项所述的方法,其特征在于,所述预定区域为圆形。
  11. 根据权利要求10所述的方法,其特征在于,所述圆形的半径为10个像素。
  12. 根据权利要求2至11中任一项所述的方法,其特征在于,所述预定值为0.6。
  13. 根据权利要求1至12中任一项所述的方法,其特征在于,所述目标对象为极耳。
  14. 一种角点检测的装置,其特征在于,包括处理器和存储器,所述存储器用于存储程序,所述处理器用于从所述存储器中调用并运行所述程序以执行权利要求1至13中任一项所述的角点检测的方法。
  15. 一种计算机可读存储介质,其特征在于,包括计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行权利要求1至13中任一项所述的角点检测的方法。
PCT/CN2023/081107 2022-07-18 2023-03-13 角点检测的方法和装置 WO2024016686A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP23733613.6A EP4336444A1 (en) 2022-07-18 2023-03-13 Corner detection method and apparatus
US18/359,086 US20240020846A1 (en) 2022-07-18 2023-07-26 Corner point detection method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210841619.X 2022-07-18
CN202210841619.XA CN115830049A (zh) 2022-07-18 2022-07-18 角点检测的方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/359,086 Continuation US20240020846A1 (en) 2022-07-18 2023-07-26 Corner point detection method and apparatus

Publications (1)

Publication Number Publication Date
WO2024016686A1 true WO2024016686A1 (zh) 2024-01-25

Family

ID=85522863

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/081107 WO2024016686A1 (zh) 2022-07-18 2023-03-13 角点检测的方法和装置

Country Status (2)

Country Link
CN (2) CN118015029A (zh)
WO (1) WO2024016686A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117392161A (zh) * 2023-11-01 2024-01-12 广州紫为云科技有限公司 用于远距离大透视畸变的标定板角点及角点编号确定方法

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150104106A1 (en) * 2013-10-16 2015-04-16 Canon Kabushiki Kaisha Method, system and apparatus for determining a contour segment for an object in an image captured by a camera
US20150178593A1 (en) * 2013-12-24 2015-06-25 Huawei Technologies Co., Ltd. Method, apparatus, and device for detecting convex polygon image block
CN107341802A (zh) * 2017-07-19 2017-11-10 无锡信捷电气股份有限公司 一种基于曲率与灰度复合的角点亚像素定位方法
CN108229433A (zh) * 2018-02-01 2018-06-29 中国电子科技集团公司第十五研究所 一种基于直线段检测和形状特征的靠岸舰船检测方法
CN109509200A (zh) * 2018-12-26 2019-03-22 深圳市繁维医疗科技有限公司 基于轮廓提取的棋盘格角点检测方法、装置以及计算机可读存储介质
CN110569857A (zh) * 2019-07-28 2019-12-13 景德镇陶瓷大学 一种基于质心距离计算的图像轮廓角点检测方法
CN110992326A (zh) * 2019-11-27 2020-04-10 江苏理工学院 一种qfn芯片引脚图像快速倾斜校正方法
CN111986219A (zh) * 2020-08-10 2020-11-24 中国科学院光电技术研究所 一种三维点云与自由曲面模型的匹配方法
CN113409334A (zh) * 2021-06-20 2021-09-17 桂林电子科技大学 一种基于质心的结构光角点检测方法
CN113888456A (zh) * 2020-07-01 2022-01-04 长春工业大学 一种基于轮廓的角点检测算法
CN114445499A (zh) * 2020-10-19 2022-05-06 深圳市光鉴科技有限公司 棋盘格角点自动提取方法、系统、设备及介质

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103927750B (zh) * 2014-04-18 2016-09-14 上海理工大学 棋盘格图像角点亚像素的检测方法
CN107816951B (zh) * 2017-10-24 2019-08-09 大连理工大学 蜂窝芯面形测量数据毛刺去除方法
CN107833217B (zh) * 2017-11-14 2021-08-10 安徽森力汽车电子有限公司 一种基于数学形态学的图卡检测方法
CN108875723B (zh) * 2018-01-03 2023-01-06 北京旷视科技有限公司 对象检测方法、装置和系统及存储介质
CN109409366B (zh) * 2018-10-30 2022-04-05 四川长虹电器股份有限公司 基于角点检测的畸变图像校正方法及装置
CN111047614B (zh) * 2019-10-10 2023-09-29 南昌市微轲联信息技术有限公司 一种基于特征提取的复杂场景图像的目标角点提取方法
CN111681284A (zh) * 2020-06-09 2020-09-18 商汤集团有限公司 一种角点检测方法、装置、电子设备及存储介质
CN111832659B (zh) * 2020-07-21 2023-07-04 武汉纺织大学 一种基于特征点提取算法检测的激光标刻系统及方法
CN112528847A (zh) * 2020-12-08 2021-03-19 北京嘀嘀无限科技发展有限公司 一种目标检测方法、装置、电子设备及存储介质
CN112669365A (zh) * 2020-12-10 2021-04-16 上海欧菲智能车联科技有限公司 一种复杂环境下的低依赖性棋盘角点检测方法及装置
CN112348815B (zh) * 2021-01-07 2021-04-06 新东方教育科技集团有限公司 图像处理方法、图像处理装置以及非瞬时性存储介质
CN113920324B (zh) * 2021-12-13 2022-04-01 广州思德医疗科技有限公司 图像识别方法、装置、电子设备及存储介质

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150104106A1 (en) * 2013-10-16 2015-04-16 Canon Kabushiki Kaisha Method, system and apparatus for determining a contour segment for an object in an image captured by a camera
US20150178593A1 (en) * 2013-12-24 2015-06-25 Huawei Technologies Co., Ltd. Method, apparatus, and device for detecting convex polygon image block
CN107341802A (zh) * 2017-07-19 2017-11-10 无锡信捷电气股份有限公司 一种基于曲率与灰度复合的角点亚像素定位方法
CN108229433A (zh) * 2018-02-01 2018-06-29 中国电子科技集团公司第十五研究所 一种基于直线段检测和形状特征的靠岸舰船检测方法
CN109509200A (zh) * 2018-12-26 2019-03-22 深圳市繁维医疗科技有限公司 基于轮廓提取的棋盘格角点检测方法、装置以及计算机可读存储介质
CN110569857A (zh) * 2019-07-28 2019-12-13 景德镇陶瓷大学 一种基于质心距离计算的图像轮廓角点检测方法
CN110992326A (zh) * 2019-11-27 2020-04-10 江苏理工学院 一种qfn芯片引脚图像快速倾斜校正方法
CN113888456A (zh) * 2020-07-01 2022-01-04 长春工业大学 一种基于轮廓的角点检测算法
CN111986219A (zh) * 2020-08-10 2020-11-24 中国科学院光电技术研究所 一种三维点云与自由曲面模型的匹配方法
CN114445499A (zh) * 2020-10-19 2022-05-06 深圳市光鉴科技有限公司 棋盘格角点自动提取方法、系统、设备及介质
CN113409334A (zh) * 2021-06-20 2021-09-17 桂林电子科技大学 一种基于质心的结构光角点检测方法

Also Published As

Publication number Publication date
CN118015029A (zh) 2024-05-10
CN115830049A (zh) 2023-03-21

Similar Documents

Publication Publication Date Title
CN111627009B (zh) 一种屏幕检测方法、装置及头戴显示设备
CN111612781B (zh) 一种屏幕缺陷检测方法、装置及头戴显示设备
CN110992326B (zh) 一种qfn芯片引脚图像快速倾斜校正方法
WO2022121531A1 (zh) 一种产品缺陷检测方法和装置
CN111179243A (zh) 一种基于计算机视觉的小尺寸芯片裂纹检测方法及系统
EP3620981A1 (en) Object detection method, device, apparatus and computer-readable storage medium
TW202011733A (zh) 對影像進行目標取樣的方法及裝置
JP7508556B2 (ja) 文字分割方法、装置、および、コンピュータ可読記憶媒体
CN110647882A (zh) 图像校正方法、装置、设备及存储介质
CN111882520B (zh) 一种屏幕缺陷检测方法、装置及头戴显示设备
CN113160161B (zh) 目标边缘处缺陷的检测方法和装置
CN113808131B (zh) 一种连接器缺陷识别方法及系统及装置及介质
KR102587710B1 (ko) 카메라 스트림용 마스크를 생성하기 위한 방법, 컴퓨터 프로그램 제품 및 컴퓨터 판독 가능 매체
WO2024016686A1 (zh) 角点检测的方法和装置
US20120320433A1 (en) Image processing method, image processing device and scanner
CN111275659A (zh) 一种焊缝图像处理方法、装置、终端设备及存储介质
CN110751156A (zh) 用于表格线大块干扰去除方法、系统、设备及介质
WO2024016715A1 (zh) 检测系统的成像一致性的方法、装置和计算机存储介质
CN113902742B (zh) 一种基于tft-lcd检测缺陷真假判定方法和系统
CN113744200B (zh) 一种摄像头脏污检测方法、装置及设备
CN113378847B (zh) 字符分割方法、系统、计算机设备和存储介质
CN112511725B (zh) 一种内窥镜圈的自动识别方法、装置、存储介质及终端
US20240020846A1 (en) Corner point detection method and apparatus
WO2021174506A1 (zh) 图像边缘检测方法、装置以及图像信号处理器
CN110782439B (zh) 一种辅助检测图像标注质量的方法及装置

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2023733613

Country of ref document: EP

Effective date: 20230703