Corner point extraction method, device, electronic device and storage medium

By calculating the black area response value and gradient consistency score and combining them with weighted integration, the problem of low accuracy of corner detection in complex environments in existing technologies is solved, and more accurate corner extraction is achieved.

CN120451257BActive Publication Date: 2025-09-26SHANGTEJIE POWER TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510943598.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-09
Publication Date
2025-09-26
Estimated Expiration
2045-07-09

AI Technical Summary

Technical Problem

Existing corner detection methods lack dynamic adjustment capabilities in complex environments, resulting in inaccurate corner extraction and omissions.

Method used

By extracting the initial corner point set from the target image, calculating the black area response value and gradient consistency score, and combining the black area response value and gradient consistency score, the target corner point set is obtained to improve the accuracy of corner point extraction.

Benefits of technology

The accuracy of corner point extraction is improved, the omission of corner points in the image is avoided, and especially the corner points are screened more robustly in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451257B_ABST
    Figure CN120451257B_ABST
Patent Text Reader

Abstract

The present disclosure provides a corner point extraction method, device, electronic device, and storage medium, belonging to the field of image processing technology. The method comprises: extracting an initial corner point set from a target image, where the target image is an optical image or an infrared image; calculating a black area response value for each initial corner point in the initial corner point set, and calculating a gradient consistency score for each initial corner point in the initial corner point set; and obtaining a target corner point set based on the black area response value and gradient consistency score of each initial corner point. The technical solution provided by the embodiments of the present disclosure improves the accuracy of corner point extraction and avoids missing corner points in the image by processing corner points using black area response and gradient consistency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the field of image processing technology, and in particular relates to a corner point extraction method, device, electronic device, and storage medium. Background Art

[0002] In the process of photovoltaic module image registration, corner detection is the core link to achieve image alignment and multimodal information fusion. How to extract corner points in the image is very important.

[0003] Key corner detection methods include the Harris operator and the Shi-Tomasi operator. These traditional methods lack dynamic adjustment capabilities for images captured in complex environments and cannot automatically adjust the extraction criteria based on actual image variations. This results in poor corner extraction accuracy and can even lead to missed corners. Summary of the Invention

[0004] The embodiments of the present disclosure provide a solution to solve the problem in related technologies that images acquired in complex environments lack dynamic adjustment capabilities and cannot automatically adjust the extraction criteria according to the actual differences in the images, resulting in poor accuracy of extracted corner points and the possibility of missed corner points.

[0005] In a first aspect, the present disclosure provides a corner point extraction method, the method comprising:

[0006] Extracting an initial corner point set from a target image, wherein the target image is an optical image or an infrared image;

[0007] Calculate the black area response value of each initial corner point in the initial corner point set,

[0008] Calculating a gradient consistency score for each initial corner point in the initial corner point set;

[0009] Based on the black area response value and gradient consistency score of each initial corner point, the target corner point set is obtained.

[0010] In a second aspect, the present disclosure provides a corner point extraction device, the device comprising:

[0011] A processing unit, configured to execute any method in the first aspect or any possible implementation manner of the first aspect;

[0012] A sending unit is used to send the target corner point set obtained after the processing unit executes the first aspect or any method in the possible implementation manner of the first aspect to a target device, so that the target device displays the target corner point set.

[0013] In a third aspect, the present disclosure provides an electronic device, comprising:

[0014] processor; and

[0015] a memory for storing executable instructions of the processor;

[0016] The processor is configured to execute any method in the first aspect or any possible implementation of the first aspect by executing the executable instructions.

[0017] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any method in the first aspect or any possible implementation of the first aspect.

[0018] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, comprising computer instructions, which, when executed by a processor, implement any method in the first aspect or any possible implementation of the first aspect.

[0019] The technical solution provided by the present disclosure extracts an initial set of corner points from a target image, which may be an optical image or an infrared image; calculates a black area response value for each initial corner point in the initial set of corner points, and calculates a gradient consistency score for each initial corner point in the initial set of corner points; and obtains a target set of corner points based on the black area response value and gradient consistency score of each initial corner point. The technical solution provided by various embodiments of the present disclosure improves the accuracy of corner point extraction and avoids missing corner points in the image by processing corner points using black area response and gradient consistency. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0021] Figure 1 A flowchart of a corner point extraction method provided by an embodiment of the present disclosure;

[0022] Figure 2 A schematic structural diagram of a corner point extraction device provided in one embodiment of the present disclosure;

[0023] Figure 3 A schematic structural diagram of an electronic device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] The embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to be used to explain the present disclosure, but should not be understood as limiting the present disclosure.

[0025] The terms "first" and "second" and the like in the specification, claims, and drawings of the embodiments of the present disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the embodiments of the present disclosure described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or apparatus.

[0026] The corner extraction method provided in the embodiments of the present disclosure can be run on a terminal device or a server. The terminal device can be a local terminal device, including wearable devices such as VR (Virtual Reality), AR (Augmented Reality), and MR (Mixed Reality). The server can be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0027] Figure 1 This is a flowchart of a corner point extraction method provided by an exemplary embodiment of the present disclosure. The method can be applied to a device with a data processing function and includes at least the following steps S101-S104:

[0028] S101, extracting an initial set of corner points from a target image.

[0029] In some embodiments, the target image is an optical image or an infrared image.

[0030] In some embodiments, in order to facilitate the extraction of corner points, the target image needs to be processed. Specifically, extracting an initial set of corner points from the target image includes steps S11-S13:

[0031] S11, obtaining an image texture gradient map of the target image.

[0032] In this embodiment, obtaining the image texture gradient map of the target image specifically includes: using the Sobel operator to perform first-order derivative calculations on the grayscale image of the target image in the x direction and the y direction respectively, obtaining the gradient maps of the image in two directions, and then obtaining the image texture gradient map by calculating the gradient values.

[0033] S12, preprocessing the image texture gradient map to obtain a regional image.

[0034] In some embodiments, the preprocessing includes at least: texture threshold processing and binarization, filling operation, and morphological dilation processing.

[0035] In some embodiments, in step S11 above, after obtaining the target image's texture gradient map, the image texture gradient map is subjected to texture thresholding and binarization. The image texture gradient map is normalized and converted to an 8-bit image, and then fixed threshold segmentation is performed to obtain a preliminary region image. During this process, to ensure the structural integrity of the region image, the preliminary region image is filled to fill in any edge regions that may have been broken by noise, thereby generating a structurally complete region image.

[0036] In order to increase the saliency around the corner points of the regional image, the regional image needs to be morphologically expanded. The filled regional image is morphologically expanded based on the structural element (cross-shaped kernel) to enhance the saliency around the corner points.

[0037] S13: extracting the initial corner point set from the region image based on a preset algorithm.

[0038] In some embodiments, the preset algorithm refers to the Shi-Tomasi algorithm.

[0039] Specifically, in the actual extraction process, the algorithm identifies potential corner areas with strong response and high local contrast by calculating the minimum eigenvalue of the local window of the regional image, thereby obtaining an initial corner point set with high responsiveness.

[0040] S102: Calculate a black area response value of each initial corner point in the initial corner point set.

[0041] Among them, the response value of the black area can be used to measure whether the corner point is at the edge of the black area.

[0042] In some embodiments, the step of calculating the black area response value of each initial corner point in the initial corner point set includes steps S21-S23:

[0043] S21 : determining a plurality of neighborhood windows at a plurality of scales for an initial corner point in the initial corner point set.

[0044] In some embodiments, the multiple scales correspond one-to-one to the multiple neighborhood windows.

[0045] Among them, the scales may include: 5×5, 9×9, 13×13, etc.

[0046] S22, calculating the ratio of black pixels in each neighborhood window whose grayscale values ​​are less than the black threshold.

[0047] In some embodiments, different scales correspond to different black thresholds.

[0048] In this embodiment, the black pixel ratio formula can be used to calculate the black pixel ratio of each neighborhood window whose pixel grayscale value is less than the black threshold. The black pixel ratio formula is as follows:

[0049]

[0050] Among them, the is the weight at the kth scale, is the position in the target image The pixel gray value, is the black threshold at the kth scale.

[0051] In some embodiments, the black threshold is determined as follows:

[0052] Step 01: determining the number of pixels in the target image and the grayscale value of each pixel at any one of the multiple scales;

[0053] Step 02: Based on the pixel grayscale value of each pixel, determine the total grayscale value of all pixels;

[0054] Step 03: Based on the grayscale value sum and the number of pixels, determine the grayscale average value, and use the grayscale average value as the black threshold corresponding to the scale, thereby obtaining multiple black thresholds corresponding to multiple scales.

[0055] Furthermore, for a black threshold corresponding to a certain scale, in a target image at that scale, pixels whose grayscale values ​​are greater than the black threshold are set to white, and pixels whose grayscale values ​​are not greater than the black threshold are set to black.

[0056] S23 , performing weighted averaging on the black pixel ratios corresponding to different scales to obtain a black area response value of the initial corner point, and further obtaining a plurality of black area response values ​​of the plurality of initial corner points.

[0057] In other embodiments, the weighted averaging of the black pixel ratios corresponding to different scales to obtain the black area response value of the initial corner point includes: using a first weighted formula to weighted average the black pixel ratios corresponding to different scales to obtain the black area response value of the initial corner point.

[0058] Among them, the first weighted formula is as follows:

[0059]

[0060] Among them, the is the weight at the kth scale, ∈[0,1], is the black pixel ratio corresponding to the k-th scale, ∈[0,1], is the black area response value, ∈[0,1].

[0061] In this embodiment, the closer the black area response value is to 1, the stronger the black area response is, and it is very likely to be at the edge of the component or inside the occlusion, and has a higher corner point credibility.

[0062] S103: Calculate the gradient consistency score of each initial corner point in the initial corner point set.

[0063] Among them, the gradient consistency score is used to determine whether the area where the corner point is located has continuous structural texture in adjacent directions.

[0064] In some embodiments, calculating the gradient consistency score of each initial corner point in the initial corner point set includes steps S31-S32:

[0065] S31, determining two target direction angles corresponding to each initial corner point in the initial corner point set, and removing initial corner points that do not have two target direction angles to obtain a second corner point set.

[0066] In some embodiments, during a specific operation, the target direction angle may include {0°, 90°}, {90°, 180°}, {180°, 270°}, and {0°, 270°}. Because corner points have different positions in the image, the target direction angles of the corner points are different.

[0067] In some embodiments, when a corner point corresponds to one or no target direction angle, the corner point does not meet the requirements and needs to be eliminated, and a corner point with two target direction angles is used as the second corner point.

[0068] S32: Determine a gradient consistency score for each second corner point according to the second corner point set and a gradient consistency calculation formula.

[0069] The gradient consistency calculation formula is:

[0070]

[0071] Among them, the is the black area pixel set of the d-th target direction angle, For the The total number of pixels in Pixel The gradient direction, is the target direction angle, is a parameter that controls the direction consistency tolerance. Score the gradient consistency.

[0072] S104: Obtain a target corner point set based on the black area response value and gradient consistency score of each initial corner point.

[0073] In some embodiments, a target corner point set is obtained based on the black area response value and gradient consistency score of each initial corner point, including steps S41-S42:

[0074] S41 , taking the initial corner points in the initial corner point set whose black area response values ​​are greater than a first threshold as first corner points, to obtain a first corner point set.

[0075] In some embodiments, because the closer it is to 1, the stronger the response of the black area is, which may be at the edge of the component or inside the occlusion, and has a higher corner point credibility, the first threshold can be preferably set to 0.9, and the initial corner point in the initial corner point set whose black area response value is greater than 0.9 is taken as the first corner point to obtain the first corner point set.

[0076] S42: Taking the first corner point in the first corner point set whose gradient consistency score is greater than a second threshold as a target corner point, to obtain the target corner point set.

[0077] In some embodiments, the second threshold is preferably 0.85, and the first corner point in the first corner point set with a gradient consistency score greater than 0.85 is taken as the target corner point to obtain the target corner point set.

[0078] In some embodiments, in order to achieve more robust corner point screening in complex lighting, occlusion, and low texture contrast environments, it is necessary to combine the black area response value and gradient consistency score for judgment. Therefore, based on the black area response value and gradient consistency score of each initial corner point, a target corner point set is obtained, including steps S51-S52:

[0079] S51, performing weighted integration on the black area response value and the gradient consistency score of each initial corner point to determine a joint score of each initial corner point.

[0080] In some embodiments, the weighted integration of the black area response value and the gradient consistency score of each initial corner point to determine the joint score of each initial corner point includes: based on a second weighted formula, weighted integration of the black area response value and the gradient consistency score of each initial corner point to determine the joint score of each initial corner point.

[0081] The second weighted formula is as follows:

[0082]

[0083] Among them, the For the joint score, the is the black area response value, To score the gradient consistency, the is the weight adjustment parameter.

[0084] S52: Taking the initial corner points in the initial corner point set whose joint scores are greater than a third threshold as target corner points, to obtain a target corner point set.

[0085] In this embodiment, the third threshold can be set according to actual conditions. Specifically, if the third threshold is 2, the initial corner points with the joint score greater than 2 in the initial corner point set are taken as target corner points to obtain the target corner point set.

[0086] Figure 2 A schematic structural diagram of a corner point extraction device provided by an exemplary embodiment of the present disclosure;

[0087] The device includes: a processing unit 201 and a sending unit 202;

[0088] The processing unit 201 is configured to execute the above method embodiment to implement the method in the embodiment of the present disclosure.

[0089] The sending unit 202 is configured to send the target corner point set obtained by the above method embodiment to a target device, so that the target device displays the target corner point set.

[0090] In some embodiments, the apparatus is configured to obtain a target corner point set based on a black area response value and a gradient consistency score of each initial corner point, and the apparatus is specifically configured to:

[0091] Taking the initial corner points in the initial corner point set whose black area response values ​​are greater than a first threshold as first corner points, to obtain a first corner point set;

[0092] The first corner point in the first corner point set whose gradient consistency score is greater than a second threshold is used as a target corner point to obtain the target corner point set.

[0093] In some embodiments, the apparatus is configured to obtain a target corner point set based on a black area response value and a gradient consistency score of each initial corner point, and the apparatus is specifically configured to:

[0094] Perform weighted integration on the black area response value and gradient consistency score of each initial corner point to determine the joint score of each initial corner point;

[0095] The initial corner points in the initial corner point set whose joint scores are greater than a third threshold are taken as target corner points to obtain a target corner point set.

[0096] In some embodiments, the apparatus is configured to calculate a black area response value for each initial corner point in the initial corner point set, and the apparatus is specifically configured to:

[0097] For an initial corner point in the initial corner point set, determining a plurality of neighborhood windows at a plurality of scales, wherein the plurality of scales correspond one-to-one to the plurality of neighborhood windows;

[0098] Calculate the ratio of black pixels in each neighborhood window whose grayscale value is less than the black threshold. Different scales correspond to different black thresholds.

[0099] The black pixel ratios corresponding to different scales are weighted averaged to obtain the black area response value of the initial corner point, and then multiple black area response values ​​of multiple initial corner points are obtained.

[0100] In some embodiments, the device is further configured to:

[0101] Determining the number of pixels in the target image and the grayscale value of each pixel at any one of the multiple scales;

[0102] Determine the total grayscale value of all pixels based on the grayscale value of each pixel;

[0103] Determining a grayscale average based on the grayscale value sum and the number of pixels, and using the grayscale average as a black threshold corresponding to the scale, thereby obtaining multiple black thresholds corresponding to multiple scales;

[0104] In some embodiments, the apparatus is configured to perform weighted averaging of black pixel ratios corresponding to different scales to obtain a black area response value of the initial corner point, and the apparatus is specifically configured to:

[0105] Using the first weighted formula, weighted average the black pixel ratios corresponding to different scales to obtain the black area response value of the initial corner point;

[0106] Among them, the first weighted formula is:

[0107]

[0108] Among them, the is the weight at the kth scale, ∈[0,1], is the black pixel ratio corresponding to the k-th scale, ∈[0,1], For location The black area response value of the initial corner point at ∈[0,1].

[0109] In some embodiments, the apparatus is configured to calculate the ratio of black pixels in each neighborhood window whose grayscale values ​​are less than a black threshold value. The apparatus is specifically configured to calculate the ratio of black pixels in each neighborhood window whose grayscale values ​​are less than a black threshold value according to a black pixel ratio formula. The black pixel ratio formula is:

[0110]

[0111] Among them, the is the weight at the kth scale, is the position in the target image The pixel gray value at is the black threshold at the kth scale.

[0112] In some embodiments, the apparatus is configured to calculate a gradient consistency score for each initial corner point in the initial corner point set, and the apparatus is specifically configured to:

[0113] Determine two target direction angles corresponding to each initial corner point in the initial corner point set, and remove initial corner points that do not have two target direction angles to obtain a second corner point set;

[0114] The gradient consistency score of each second corner point is determined according to the second corner point set and the gradient consistency calculation formula, wherein the gradient consistency calculation formula is:

[0115]

[0116] Among them, the is the black area pixel set of the d-th target direction angle, is the total number of pixels in the Pixel The gradient direction, is the target direction angle, is a parameter that controls the direction consistency tolerance. Score the gradient consistency.

[0117] In some embodiments, the apparatus is configured to perform weighted integration on the black area response value and the gradient consistency score of each initial corner point to determine a joint score for each initial corner point, and the apparatus is specifically configured to:

[0118] Based on the second weighted formula, the black area response value and the gradient consistency score of each initial corner point are weighted and integrated to determine the joint score of each initial corner point. The second weighted formula is as follows:

[0119]

[0120] Among them, the For the joint score, the is the black area response value, To score the gradient consistency, the is the weight adjustment parameter.

[0121] In some embodiments, the apparatus is used to extract an initial set of corner points from a target image, and the apparatus is specifically used to:

[0122] Acquire an image texture gradient map of the target image;

[0123] Preprocessing the image texture gradient map to obtain a regional image, wherein the preprocessing includes at least: texture threshold processing and binarization, filling operation, and morphological dilation processing;

[0124] The initial corner point set is extracted from the region image based on a preset algorithm, wherein the preset algorithm is the Shi-Tomasi algorithm.

[0125] It should be understood that the device embodiments and the method embodiments may correspond to each other, and similar descriptions may refer to the method embodiments. To avoid repetition, they will not be described in detail here. Specifically, the device can perform the above-mentioned method embodiments, and the aforementioned and other operations and / or functions of each module in the device are the corresponding processes in each method in the above-mentioned method embodiments, which will not be described in detail here for the sake of brevity.

[0126] The above describes the apparatus of the embodiment of the present disclosure from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in the form of hardware, can be implemented by instructions in the form of software, or can be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present disclosure can be completed by the hardware integrated logic circuit and / or software instructions in the processor, and the steps of the method disclosed in conjunction with the embodiment of the present disclosure can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in conjunction with its hardware.

[0127] Figure 3 is a schematic block diagram of an electronic device provided by an embodiment of the present disclosure, which may include:

[0128] The memory 301 and the processor 302 are configured to store computer programs and transmit the program code to the processor 302. In other words, the processor 302 can call and run the computer program from the memory 301 to implement the method in the embodiment of the present disclosure.

[0129] For example, the processor 302 may be configured to execute the above method embodiments according to instructions in the computer program.

[0130] In some embodiments of the present disclosure, the processor 302 may include but is not limited to:

[0131] General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0132] In some embodiments of the present disclosure, the memory 301 includes but is not limited to:

[0133] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0134] In some embodiments of the present disclosure, the computer program may be divided into one or more modules, which are stored in the memory 301 and executed by the processor 302 to implement the method provided by the present disclosure. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.

[0135] like Figure 3 As shown, the electronic device may further include:

[0136] The transceiver 303 may be connected to the processor 302 or the memory 301 .

[0137] The processor 302 may control the transceiver 303 to communicate with other devices. Specifically, the processor 302 may send information or data to other devices or receive information or data sent by other devices. The transceiver 303 may include a transmitter and a receiver. The transceiver 303 may further include one or more antennas.

[0138] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0139] The present disclosure also provides a computer storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment. Alternatively, the present disclosure also provides a computer program product containing instructions, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment.

[0140] When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present disclosure are fully or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disk, hard disk, magnetic tape), optical media (e.g., digital video disc (DVD)), or semiconductor media (e.g., solid-state drive (SSD)).

[0141] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.

[0142] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0143] Modules described as separate components may or may not be physically separate, and components displayed as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected based on actual needs to achieve the purpose of the present embodiment. For example, the functional modules in the various embodiments of the present disclosure may be integrated into a single processing module, each module may exist physically separately, or two or more modules may be integrated into a single module.

[0144] The above are only specific embodiments of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this disclosure should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.

Claims

1. A corner point extraction method, characterized in that: The method comprises: Extracting an initial corner point set from a target image, wherein the target image is an optical image or an infrared image; Calculate the black area response value of each initial corner point in the initial corner point set, Calculating a gradient consistency score for each initial corner point in the initial corner point set; Based on the black area response value and gradient consistency score of each initial corner point, the target corner point set is obtained; Among them, based on the black area response value and gradient consistency score of each initial corner point, the target corner point set is obtained, including: Perform weighted integration on the black area response value and gradient consistency score of each initial corner point to determine the joint score of each initial corner point; Taking the initial corner points in the initial corner point set whose joint scores are greater than a third threshold as target corner points, to obtain a target corner point set; The calculating the black area response value of each initial corner point in the initial corner point set includes: For an initial corner point in the initial corner point set, determining a plurality of neighborhood windows at a plurality of scales, wherein the plurality of scales correspond one-to-one to the plurality of neighborhood windows; Calculate the ratio of black pixels in each neighborhood window whose grayscale value is less than the black threshold. Different scales correspond to different black thresholds. Taking a weighted average of the black pixel ratios corresponding to different scales to obtain a black area response value of the initial corner point, and then obtaining multiple black area response values ​​of multiple initial corner points; The method further comprises: Determining the number of pixels in the target image and the grayscale value of each pixel at any one of the multiple scales; Determine the total grayscale value of all pixels based on the grayscale value of each pixel; Determining a grayscale average based on the grayscale value sum and the number of pixels, and using the grayscale average as a black threshold corresponding to the scale, thereby obtaining multiple black thresholds corresponding to multiple scales; The step of performing weighted averaging on the black pixel ratios corresponding to different scales to obtain the black area response value of the initial corner point includes: Using the first weighted formula, weighted average the black pixel ratios corresponding to different scales to obtain the black area response value of the initial corner point; The first weighted formula is: Among them, the is the weight at the kth scale, ∈[0,1], is the black pixel ratio corresponding to the k-th scale, ∈[0,1], For location The black area response value of the initial corner point at ∈[0,1]; Calculating the ratio of black pixels in each neighborhood window whose grayscale values ​​are less than the black threshold includes: calculating the ratio of black pixels in each neighborhood window whose grayscale values ​​are less than the black threshold according to a black pixel ratio formula, wherein the black pixel ratio formula is: Among them, the is the weight at the kth scale, is the position in the target image The pixel gray value at is the black threshold at the kth scale, and II is the indicator function.

2. The method according to claim 1, characterized in that Based on the black area response value and gradient consistency score of each initial corner point, the target corner point set is obtained, including: Taking the initial corner points in the initial corner point set whose black area response values ​​are greater than a first threshold as first corner points, to obtain a first corner point set; The first corner point in the first corner point set whose gradient consistency score is greater than a second threshold is used as a target corner point to obtain the target corner point set.

3. The method according to claim 1, characterized in that Calculating the gradient consistency score of each initial corner point in the initial corner point set includes: Determine two target direction angles corresponding to each initial corner point in the initial corner point set, and remove initial corner points that do not have two target direction angles to obtain a second corner point set; The gradient consistency score of each second corner point is determined according to the second corner point set and the gradient consistency calculation formula, wherein the gradient consistency calculation formula is: Among them, the is the black area pixel set of the d-th target direction angle, For the The total number of pixels in Pixel The gradient direction, is the target direction angle, is a parameter that controls the direction consistency tolerance. Score the gradient consistency.

4. The method according to claim 1, wherein The weighted integration of the black area response value and the gradient consistency score of each initial corner point to determine the joint score of each initial corner point includes: Based on the second weighted formula, the black area response value and the gradient consistency score of each initial corner point are weighted and integrated to determine the joint score of each initial corner point. The second weighted formula is as follows: Among them, the For the joint score, the is the black area response value, To score the gradient consistency, the is the weight adjustment parameter.

5. The method according to claim 1, wherein Extract the initial corner point set from the target image, including: Acquire an image texture gradient map of the target image; Preprocessing the image texture gradient map to obtain a regional image, wherein the preprocessing includes at least: texture threshold processing and binarization, filling operation, and morphological dilation processing; The initial corner point set is extracted from the region image based on a preset algorithm, wherein the preset algorithm is the Shi-Tomasi algorithm.

6. A corner point extraction device, characterized in that: The device comprises: A processing unit, configured to execute the method according to any one of claims 1 to 5; a sending unit, configured to send the target corner point set obtained by the processing unit after executing the method according to any one of claims 1 to 5 to a target device, so that the target device displays the target corner point set; The device is also used for: Perform weighted integration on the black area response value and gradient consistency score of each initial corner point to determine the joint score of each initial corner point; Taking the initial corner points in the initial corner point set whose joint scores are greater than a third threshold as target corner points, to obtain a target corner point set; The device is also used for: For an initial corner point in the initial corner point set, determining a plurality of neighborhood windows at a plurality of scales, wherein the plurality of scales correspond one-to-one to the plurality of neighborhood windows; Calculate the ratio of black pixels in each neighborhood window whose grayscale value is less than the black threshold. Different scales correspond to different black thresholds. Taking a weighted average of the black pixel ratios corresponding to different scales to obtain a black area response value of the initial corner point, and then obtaining multiple black area response values ​​of multiple initial corner points; The device is also used for: Determining the number of pixels in the target image and the grayscale value of each pixel at any one of the multiple scales; Determine the total grayscale value of all pixels based on the grayscale value of each pixel; Determining a grayscale average based on the grayscale value sum and the number of pixels, and using the grayscale average as a black threshold corresponding to the scale, thereby obtaining multiple black thresholds corresponding to multiple scales; The step of performing weighted averaging on the black pixel ratios corresponding to different scales to obtain the black area response value of the initial corner point includes: Using the first weighted formula, weighted average the black pixel ratios corresponding to different scales to obtain the black area response value of the initial corner point; The first weighted formula is: Among them, the is the weight at the kth scale, ∈[0,1], is the black pixel ratio corresponding to the k-th scale, ∈[0,1], For location The black area response value of the initial corner point at ∈[0,1]; Calculating the ratio of black pixels in each neighborhood window whose grayscale values ​​are less than the black threshold includes: calculating the ratio of black pixels in each neighborhood window whose grayscale values ​​are less than the black threshold according to a black pixel ratio formula, wherein the black pixel ratio formula is: Among them, the is the weight at the kth scale, is the position in the target image The pixel gray value at is the black threshold at the kth scale, and II is the indicator function.

7. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to perform the method according to any one of claims 1 to 5 by executing the executable instructions.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Corner detection method

    CN108615041A