Image corner point detection method, circuit, device, electronic equipment and storage medium

By using an adaptive corner threshold generation method, the detection threshold is dynamically adjusted based on the distribution information of image feature values, which solves the problems of high power consumption and time consumption in image registration and improves the efficiency and accuracy of image registration.

CN116188508BActive Publication Date: 2026-04-17VIVO MOBILE COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
VIVO MOBILE COMM CO LTD
Filing Date
2023-03-14
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In existing technologies, using a fixed threshold to detect image corners during image registration results in excessive power consumption and time consumption, and is not applicable to images of different frames.

Method used

By processing the image to be detected, the distribution information of feature values ​​is determined, corner thresholds are adaptively generated, and the corner detection thresholds are dynamically adjusted according to the image content to filter out target corners.

Benefits of technology

It reduces the power consumption and time consumption of image registration, and improves the effect and accuracy of image registration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116188508B_ABST
    Figure CN116188508B_ABST
Patent Text Reader

Abstract

This application discloses a method, circuit, device, electronic device, and storage medium for detecting image corner points, belonging to the field of electronic device technology. The image corner point detection method includes: processing the image to be detected to obtain N feature values ​​corresponding to N first pixels in the image, where N is a positive integer; processing the N feature values ​​to obtain distribution information corresponding to the N feature values; determining a corner point threshold based on the distribution information and the number of targets, where the number of targets is the number of target corner points; and determining the target corner points among the N first pixels based on the corner point threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of electronic equipment technology, specifically relating to a method, circuit, device, electronic equipment, and storage medium for detecting corner points in an image. Background Technology

[0002] In related technologies, when mobile phones and other electronic devices take high dynamic range photos, LCD photos, or perform video recording, motion capture, and panoramic shooting, the general method is to take multiple photos in a short period of time and then combine them. The combination of multiple images requires the registration of these images, that is, to align one image onto another image.

[0003] Image registration typically utilizes feature point matching, with image corner points being a commonly used and widely applied feature point. Image corner points are generally determined using a threshold. However, a preset fixed threshold may not be suitable for all images across different frames, and iterating over a fixed threshold consumes significant computational resources, resulting in high power and time overhead. Summary of the Invention

[0004] The purpose of this application is to provide a method, circuit, device, electronic device, and storage medium for detecting image corner points, which can reduce power consumption and time consumption while ensuring registration effect.

[0005] In a first aspect, embodiments of this application provide a method for detecting corner points in an image, including:

[0006] Data processing is performed on the image to be detected to obtain N feature values ​​corresponding to the N first pixels in the image to be detected, where N is a positive integer;

[0007] Data processing is performed on N feature values ​​to obtain the distribution information corresponding to the N feature values;

[0008] The corner threshold is determined based on the distribution information and the number of targets, where the number of targets is the number of target corners;

[0009] Based on the corner threshold, the target corner is determined among N first pixels.

[0010] Secondly, embodiments of this application provide an image corner detection circuit. The detection circuit is used to perform the detection method as described in the first aspect. The detection circuit is applied to an electronic device, which includes a camera assembly and an image signal processing assembly. The camera assembly is connected to the input terminal of the image signal processing assembly, and the detection circuit is connected to the image signal processing assembly. The detection circuit includes:

[0011] The first buffer, connected to the image signal processing component, is used to temporarily store at least a portion of the image data of the image to be detected;

[0012] The first computing unit, connected to the first buffer, is used to calculate the feature value of the first pixel of the image to be detected;

[0013] The second buffer, connected to the first computing unit, is used to cache the N feature values ​​corresponding to the N first pixels of the image to be detected, where N is a positive integer;

[0014] The corner detection unit, connected to the first calculation unit, is used to process N feature values ​​to obtain the distribution information of the N feature values, determine the corner threshold based on the distribution information and the number of targets, and determine the target corners among the N first pixels based on the corner threshold, wherein the number of targets is the number of target corners.

[0015] Thirdly, embodiments of this application provide an image corner detection device, including:

[0016] The processing module is used to process the data of the image to be detected, obtaining N feature values ​​corresponding to N first pixels in the image to be detected, where N is a positive integer; and

[0017] Data processing is performed on N feature values ​​to obtain the distribution information corresponding to the N feature values;

[0018] The determination module is used to determine the corner threshold based on distribution information and the number of targets, where the number of targets refers to the number of target corners; and

[0019] Based on the corner threshold, the target corner is determined among N first pixels.

[0020] Fourthly, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory stores a program or instructions that can run on the processor, and when the program or instructions are executed by the processor, they implement the steps of the method as described in the first aspect.

[0021] Fifthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method as described in the first aspect.

[0022] In a sixth aspect, embodiments of this application provide a chip including a processor and a communication interface coupled to the processor, the processor being used to run programs or instructions to implement the steps of the method as described in the first aspect.

[0023] In a seventh aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method as described in the first aspect.

[0024] In this embodiment, the image to be detected for corner detection is processed to obtain the feature value of each pixel in the image. Based on the distribution information of the feature values, a corner threshold matching the current image is determined, and this threshold is used to detect target corners. Since the corner threshold is determined based on the actual feature value distribution information of the current image, it achieves adaptive generation of corner feature thresholds according to the image content, thereby ensuring that a suitable number of target corners are detected in the image, thus improving the image registration effect. Attached Figure Description

[0025] Figure 1 A flowchart of a detection method according to an embodiment of this application is shown;

[0026] Figure 2 A schematic diagram of the neighborhood of a pixel is shown according to an embodiment of this application;

[0027] Figure 3 A schematic diagram of a neighborhood window for non-maximum suppression according to an embodiment of this application is shown;

[0028] Figure 4 A schematic diagram of feature value partitioning statistics according to an embodiment of this application is shown;

[0029] Figure 5 A structural block diagram of a detection circuit according to an embodiment of this application is shown;

[0030] Figure 6 A second structural block diagram of the detection circuit according to an embodiment of this application is shown;

[0031] Figure 7 A structural block diagram of a detection device according to an embodiment of this application is shown;

[0032] Figure 8 A structural block diagram of an electronic device according to an embodiment of this application is shown;

[0033] Figure 9 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application. Detailed Implementation

[0034] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0035] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0036] The image corner detection method, circuit, device, electronic device, and storage medium provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.

[0037] In some embodiments of this application, a method for detecting image corner points is provided. Figure 1 A flowchart of a detection method according to an embodiment of this application is shown, such as... Figure 1 As shown, the method includes:

[0038] Step 102: Perform data processing on the image to be detected to obtain N feature values ​​corresponding to the N first pixels in the image to be detected;

[0039] Where N is a positive integer;

[0040] Step 104: Process the N feature values ​​to obtain the distribution information corresponding to the N feature values;

[0041] Step 106: Determine the corner threshold based on the distribution information and the number of targets;

[0042] The number of targets refers to the number of target corner points;

[0043] Step 108: Determine the target corner point among the N first pixels based on the corner point threshold.

[0044] In this embodiment of the application, the image to be detected is specifically an image captured by the camera component of the electronic device. The image to be detected may be the entire image of the original image captured by the camera component, or it may be a partial image area of ​​the original image.

[0045] By processing the data of the image to be detected, the feature values ​​of all or most of the pixels in the image to be detected are determined, specifically the feature values ​​of the N first pixels, resulting in a total of N feature values.

[0046] It is understandable that the N first pixels can be all the pixels in the image to be detected, or only a portion of the pixels in the image to be detected. For example, in the case of image content transformation, pixels at the edges of the previous image may not appear in the next image. Therefore, a certain range can be defined within the image as the region for detecting corner points, and the number of first pixels in this region is N.

[0047] In some implementations, a mask matrix or edge invalid region can be defined, and the feature values ​​of pixels within the mask matrix or outside the edge invalid region can be determined only. This allows for greater focus on corner information in the central region when detecting corners, thereby reducing the possibility that corners detected in the previous image may not exist in the next image due to changes in the shooting angle or the movement of edge objects outside the shooting range.

[0048] After obtaining N eigenvalues, data processing is performed on the N eigenvalues, such as nonmaximum suppression, to improve the quality of corner point selection.

[0049] After processing, the distribution information of the N feature values ​​is determined based on their magnitudes. This distribution can be achieved by dividing the feature values ​​into multiple preset intervals, such as dividing the range of 0 to 255 into X preset intervals. These X preset intervals can be equally spaced or unequally spaced; for example, the range of 0 to 255 can be divided into 255 intervals. The distribution information is obtained by statistically analyzing the distribution of the N features across these multiple preset intervals.

[0050] The distribution information of feature values ​​can reflect the content features of the current image. Therefore, after obtaining the distribution information of N feature values, the corner threshold of the current image to be detected can be determined according to the required number and distribution information of target corner points. This can adapt to the current image content, and the target corner points can be detected by using this corner threshold, ensuring that an appropriate number of target corner points are obtained.

[0051] This application embodiment determines a corner threshold that matches the current image to be detected based on the distribution information of feature values, and then detects target corners using this corner threshold. Since the corner threshold is determined based on the actual feature value distribution information of the current image to be detected, it achieves adaptive generation of corner feature thresholds based on image content, thereby ensuring that an appropriate number of target corners are detected in the image to be detected, thus improving the image registration effect.

[0052] In some embodiments of this application, data processing is performed on the image to be detected to obtain N feature values ​​corresponding to N first pixels in the image to be detected, including:

[0053] The image to be detected is converted to brightness to obtain the brightness map data corresponding to the image to be detected. The brightness map data includes N second pixels, and the N second pixels correspond one-to-one with the N first pixels.

[0054] The feature value of the target pixel is determined based on the pixel value of the target pixel and the pixel value of the first neighboring pixels of the target pixel; wherein, the N second pixels include the target pixel, the first neighboring pixels are second pixels arranged in a preset direction with the target pixel as the center, and the distance between the first neighboring pixels and the target pixel is a preset distance value.

[0055] In this embodiment of the application, the camera component of the electronic device acquires image data through an image sensor, and converts the data stream of the image to be detected output by the image sensor or image processor into a brightness data stream, thereby performing brightness conversion on the image to be detected to form corresponding brightness data.

[0056] The image to be detected can be image data arranged in Bayer or Quad Bayer, or it can be RGB image data after demosaicing, or it can be YUV image data after color space conversion.

[0057] For example, for image data arranged in Bayer, Quad Bayer, or RGB, corresponding weights can be set for each color channel in the image. After weighted calculation of the pixel values ​​under each color channel by setting the corresponding weights, the brightness data can be obtained.

[0058] For example, for YUV image data, the data of the Y channel can be used as luminance data.

[0059] Using brightness data as corner detection data has a more obvious effect on contrast and edge details, and is more robust.

[0060] After obtaining the luminance map data, based on each second pixel in the large luminance map data, and combined with the corner point category to be detected (such as FAST corner point, Shi-Tomas corner point, Harris corner point, etc.), a preset number of neighboring pixels, i.e. first neighboring pixels, are extracted from the surrounding area of ​​each second pixel. Based on the pixel values ​​of each second pixel and the first neighboring pixels of the current second pixel, a feature value of a second pixel is determined.

[0061] It is understandable that we can prioritize selecting corner point types that are closer to the center pixel, have less feature computation, and are faster in the first neighboring pixels, which is beneficial to reduce the computational cost and memory and cache overhead of corner point detection.

[0062] For example, the first neighboring pixel can be a FAST9 neighboring pixel. Figure 2A schematic diagram of the neighborhood of a pixel according to an embodiment of this application is shown, such as... Figure 2 As shown, p is the target pixel, and the first neighboring pixels include... Figure 2 The image shows 16 pixels, numbered 1 to 16. The preset direction can be a circular direction centered on the target pixel, or a fixed direction relative to the target pixel. The preset distance value refers to the distance from the target pixel being within a certain range.

[0063] The embodiments of this application use brightness data for corner detection, which can well reflect contrast and edge details and has good robustness.

[0064] In some embodiments of this application, after processing the image to be detected to obtain N feature values ​​corresponding to N first pixels in the image to be detected, the method further includes:

[0065] Determine the neighborhood window corresponding to the target pixel. The neighborhood window is a rectangular window centered on the target pixel and includes multiple second neighboring pixels.

[0066] If the feature value of the target pixel is less than the feature value of each of the multiple second neighboring pixels, the feature value of the target pixel is set to a preset feature value, where the preset feature value is the minimum value of the pixel's feature value.

[0067] In the embodiments of this application, when corner detection is performed based on the feature values ​​of pixels in the image to be detected, non-maximum suppression can be applied to the feature value data to reduce the impact of image noise, resolution, or image enhancement.

[0068] Specifically, when performing non-maximum suppression on the target pixel, a neighborhood window of a preset size can be set. This neighborhood window is a rectangular window centered on the target pixel, such as a 3×3 rectangular window. The 3×3 rectangular window includes 9 pixels in 3 rows and 3 columns, and the pixel at the center of the rectangular window is the target pixel.

[0069] Determine whether the feature value of each second neighboring pixel in the neighborhood window is greater than the feature value of the target pixel. If the feature value of the target pixel is less than the feature value of the second neighboring pixel of each target pixel in the neighborhood window, then set the feature value of the current target pixel to a preset feature value, which is the minimum value within the range of feature values.

[0070] When the feature value of a pixel is set to the minimum value, that is, the preset feature value, the pixel will not be used as a candidate pixel for the corner of the image, nor will it be counted by the corner counting algorithm.

[0071] For example, taking a feature value range of 0 to 255, if the feature value of the target pixel is less than the feature value of each second neighboring pixel, then the feature value of the target pixel is set to 0.

[0072] For example, the preset feature value can also be set to a negative value. When a pixel's feature value is detected to be negative, the pixel with the negative feature value will not be considered as a candidate when counting corner points.

[0073] This application embodiment uses non-maximum suppression to reduce the influence of pixels (weak corners or false corners) around real corners that appear as corners due to factors such as noise, low image resolution, or image enhancement. It retains the corners with the strongest features, thereby filtering out weak corners and false corners, improving the quality of detected target corners, and improving the accuracy of image registration.

[0074] In some embodiments of this application, data processing is performed on N feature values ​​to obtain distribution information corresponding to the N feature values, including:

[0075] Based on the mapping relationship between N eigenvalues ​​and M eigenvalue intervals, the distribution information is determined, where M is a positive integer, and the distribution information includes the number of eigenvalues ​​in each of the M eigenvalue intervals.

[0076] In this embodiment, the range of eigenvalues ​​is divided into M eigenvalue intervals according to the range of eigenvalues, either by equal or unequal intervals. For example, assuming the range of eigenvalues ​​is 0 to 255, dividing the range of 0 to 255 into 255 equally spaced intervals yields a total of 255 eigenvalue intervals: [0, 1), [1, 2), ..., (254, 255].

[0077] Based on the specific values ​​of N feature values, determine the feature value interval corresponding to each of the N feature values, and place the feature value into the corresponding feature value interval. After placing all N feature values ​​into their corresponding feature value intervals, the amount of feature value data contained in the M feature value intervals represents the distribution information of the N feature values.

[0078] In some implementations, since some feature values ​​have a non-linear relationship with pixel values ​​or pixel value differences, the range of feature values ​​may be large. By using non-linear or custom segmented interval division, the number of feature value interval divisions can be reduced, thereby reducing hardware register or memory overhead and improving the relative accuracy of corner threshold selection.

[0079] This application embodiment divides the value range of feature values ​​and counts the number of feature values ​​in different feature value ranges in a segmented manner, which can reduce the amount of computation, reduce memory consumption, and improve corner detection efficiency.

[0080] In some embodiments of this application, determining the corner threshold based on distribution information and the number of targets includes:

[0081] The target interval is determined based on M feature value intervals, wherein the target interval includes K consecutive feature value intervals, the M feature value intervals include K feature value intervals, and the starting point of the target interval is greater than or equal to the ending point of any feature value interval other than the K feature value intervals in the M feature value intervals, and the number of feature values ​​in the target interval is greater than or equal to the target number.

[0082] The corner threshold is determined based on the starting point of the target interval.

[0083] In the embodiments of this application, the M feature value intervals can be obtained by dividing the range of feature values ​​at equal or unequal intervals. Therefore, the M feature value intervals are continuous intervals after being sorted in order of size.

[0084] After sorting in descending order, the number of feature values ​​in each feature value interval is counted sequentially and accumulated. For example, the number of feature values ​​in the first interval with the largest endpoint is added to the number of feature values ​​in the second interval with the second largest endpoint. At the same time, the first and second intervals are merged to obtain the first summed interval. If the number of feature values ​​in the first summed interval is less than the target number, that is, the number of target corner points to be detected, the number of feature values ​​in the first summed interval is added to the number of feature values ​​in the third interval with the third largest endpoint. At the same time, the first summed interval and the third interval are merged. This process is repeated until the number of feature values ​​in the target interval after summing is greater than or equal to the target number.

[0085] Since the summation is performed in descending order, the target interval after merging is actually the sum of the K consecutive intervals starting from the interval with the largest endpoint, and the starting point of the target interval must be greater than or equal to the endpoint of the remaining MK eigenvalue intervals.

[0086] After obtaining the target interval, the starting point of the target interval is used as the corner threshold. The N feature values ​​are filtered by the corner threshold, and the first pixel with a feature value greater than the corner threshold is taken as the corner pixel.

[0087] This application determines the corner threshold by interval accumulation, and filters the target corner pixels from N first pixels using the corner threshold. Therefore, it can always find a sufficient number of target corners in the image to be detected, thus improving the corner detection quality.

[0088] In some embodiments of this application, after processing the image to be detected to obtain N feature values ​​corresponding to N first pixels in the image to be detected, the method further includes:

[0089] Cache N feature values ​​and generate a feature map corresponding to the image to be detected.

[0090] In this embodiment, after obtaining the N feature values ​​of all N first pixels of the image to be detected, the N feature values ​​are cached in the form of a feature map for subsequent corner detection. Cache the feature values ​​of each pixel of the image to be detected in the form of a feature map, which helps to improve the efficiency of corner detection.

[0091] In some embodiments of this application, before performing data processing on the image to be detected to obtain N feature values ​​corresponding to N first pixels in the image to be detected, the method further includes:

[0092] The original image is partitioned to obtain J partitioned images to be detected;

[0093] In response to the input settings, the number of target corner points is set for each of the J images to be detected.

[0094] In the embodiments of this application, the following strategies are employed when detecting corner points used for image registration: firstly, corner points in the central region of the image are more robust; secondly, corner points should not be concentrated too much in a small area.

[0095] To address this, the original image captured by the camera component of the electronic device can be partitioned. For example, it can be divided into J partitions, with each partition containing Y grid cells (e.g., 32×32). After partitioning, a two-dimensional statistical table `hist[Y][J]` can be obtained. Each partition represents one image to be detected, meaning the original image is divided into J images to be detected. Assuming the grid is equally divided, the number of pixels in the first pixel is equal to the original image's (length × width) ÷ the number of grid cells. Optionally, the grid can also be unequally divided.

[0096] After dividing the original image into J images to be detected, the feature values ​​within each region of the image to be detected are calculated. Specifically, based on the distance between the image center of each image to be detected and the image center of the original image, weights are assigned to these images to be detected, and these weights affect the number of target corner points in the images to be detected.

[0097] In some implementations, the closer the image center of the image to be detected is to the image center of the original image, that is, the closer the image region is to the central region of the original image, the higher the weight value is set for it. Therefore, the number of target corner points is also higher, which can both avoid the corner points being too concentrated and increase the number of corner points in the central region.

[0098] In other implementations, the number of target corner points corresponding to multiple images to be detected whose distance from the image center of the original image is less than a certain threshold can be set to the same level. When the distance from the image center of the original image exceeds a certain threshold, the number of target corner points is gradually reduced as the distance increases.

[0099] This application divides the original image into multiple small grid images and determines the corresponding number of corner points in each to be detected. This can prevent the detected corner points from being concentrated in a certain area of ​​the original image and can increase the number of corner points in the central area, thereby improving the corner point detection quality.

[0100] In some embodiments of this application, for example, FAST9 corner detection is performed on a 1080p image (pixel area of ​​1920×1080) to be detected.

[0101] The image to be detected is RGB 8-bit data acquired by the image sensor of the camera component and processed by Image Signal Processing (ISP).

[0102] Step a: Convert the RGB 8-bit data to be processed into 8-bit continuous data. For example, the conversion formula is as follows:

[0103] Y = 0.299R + 0.587G + 0.114B;

[0104] Where Y is the pixel's brightness data, R is the pixel value in the red channel, G is the pixel value in the green channel, and B is the pixel value in the blue channel.

[0105] Step b involves calculating the feature value of each pixel in the brightness data.

[0106] Taking the calculation of FAST9 eigenvalues ​​as an example, such as Figure 2 As shown, p is the current pixel position, and the neighborhood of the current pixel p includes... Figure 2 The 16 pixels shown.

[0107] The corner feature value F of FAST9 is defined as the minimum absolute value of the difference between a neighboring pixel and the pixel value p when nine neighboring pixels are consecutively greater than or consecutively less than the pixel value p, as shown in the following formula:

[0108]

[0109] Where F is the eigenvalue, P c Let P be the pixel value of pixel point P. i Let be the pixel value of the i-th neighboring pixel of pixel p.

[0110] Step c: After obtaining the feature values, non-maximum suppression is applied to the pixel values ​​of each pixel in the calculated image to be detected. Specifically, the neighborhood window for non-maximum suppression is set to a 3×3 rectangular window. Figure 3 A schematic diagram of a neighborhood window for non-maximum suppression according to an embodiment of this application is shown, as follows: Figure 3 As shown, Fc is the feature value of the pixel p currently undergoing non-maximum suppression, and F1 to F8 are the feature values ​​of other pixels in the neighborhood window, respectively.

[0111] If Fc is greater than any of the feature values ​​from F1 to F8, then the feature value Fc of pixel p is retained. If Fc is less than or equal to any of the feature values ​​from F1 to F8, then the feature value Fc of pixel p is set to 0 and is not counted.

[0112] Step d: Regarding the definition of FAST9 feature values, for 8-bit luminance data, the range of feature values ​​is [0, 256). Therefore, in terms of partitioning, 64 equally spaced intervals can be used, and then the feature values ​​after non-maximum suppression are statistically analyzed pixel by pixel. That is, the number of features falling within each of the 64 intervals [0, 4), [4, 8), ..., [252, 256) is counted.

[0113] Specifically, the statistical method could be to accumulate the number of pixels in a certain interval when the feature value falls within that interval. When the statistics reach the end of the frame, a statistical table with a dimension of 64×1 is obtained, which can be displayed using a chart. Figure 4 A schematic diagram of feature value partitioning statistics according to an embodiment of this application is shown. Figure 4 In the diagram, the horizontal axis represents the starting value of the feature partition, and the vertical axis represents the number of feature values ​​falling within the corresponding partition.

[0114] It is understandable that for Harris or Shi-Tomas corner points, the feature value and the original pixel value are not linearly related, but are related to the determinant and trace of the Hessian matrix of the pixel value. Therefore, in the partitioning, we can first specify the range of interest [min, max], and then combine it with non-linear methods such as logarithms to divide the interval.

[0115] Step e: The non-maximum suppressed feature values ​​obtained in step c are cached to form a feature map with the resolution threshold of the image to be detected.

[0116] Step f: Based on the segmented statistical results in step d and the number of target corner points, the number of feature values ​​in each segmented interval of the segmented statistical table is accumulated in descending order of feature values ​​until the accumulated result matches the number of target corner points (greater than or equal to the number of target corner points). Then, the segmented intervals involved in the accumulation are merged, and the starting feature value of the merged interval is the corner point threshold.

[0117] In step e, the feature map from step e is filtered pixel by pixel, and points with feature values ​​greater than the corner threshold are selected as target corner points, and their coordinates are added to the corner point list. For example, the corner point list records the two-dimensional coordinates (x, y) and feature value of each target corner point.

[0118] In some embodiments of this application, an image corner detection circuit is provided. Figure 5 A block diagram of a detection circuit according to an embodiment of this application is shown, such as... Figure 5 As shown, the detection circuit 500 is applied to an electronic device, which includes a camera assembly and an image signal processing assembly. The camera assembly is connected to the input terminal of the image signal processing assembly, and the detection circuit 500 is connected to the image signal processing assembly. The detection circuit 500 includes:

[0119] The first buffer 502 is connected to the image signal processing component and is used to temporarily store at least a portion of the image data of the image to be detected.

[0120] The first calculation unit 504 is connected to the first buffer 502 and is used to calculate the feature value of the first pixel of the image to be detected.

[0121] The second buffer 506 is connected to the first computing unit 504 and is used to cache N feature values ​​corresponding to N first pixels of the image to be detected, where N is a positive integer;

[0122] The corner detection unit 508 is connected to the first calculation unit 504 and is used to process N feature values ​​to obtain the distribution information of the N feature values, determine the corner threshold based on the distribution information and the number of targets, and determine the target corners in the N first pixels based on the corner threshold, wherein the number of targets is the number of target corners.

[0123] In this embodiment of the application, the first buffer 502 includes a plurality of storage devices arranged along at least a first dimension and a second dimension of the first buffer 502 for storing a certain number of image data streams and providing them to the first computing unit 504 for access and retrieval.

[0124] According to the determined corner point category, the first calculation unit 504 extracts the first pixel and its neighboring pixels in the first buffer 502 for each first pixel, calculates the corner point feature value of the pixel, and outputs it to the second buffer 506.

[0125] The second buffer 506 includes a plurality of storage devices arranged along at least a first dimension and a second dimension of the second buffer 506 for caching a certain amount of feature value data streams and for access by the subsequent corner detection unit 508.

[0126] The corner detection unit 508 processes the feature value data to obtain the distribution information of N feature values. Based on the distribution information, and according to the required number and distribution information of target corners, it determines the corner threshold of the current image to be detected. It can adapt to the current image content and detect target corners by using the corner threshold, thus ensuring that a suitable number of target corners are obtained.

[0127] This application embodiment determines a corner threshold that matches the current image to be detected based on the distribution information of feature values, and then detects target corners using this corner threshold. Since the corner threshold is determined based on the actual feature value distribution information of the current image to be detected, it achieves adaptive generation of corner feature thresholds based on image content, thereby ensuring that an appropriate number of target corners are detected in the image to be detected, thus improving the image registration effect.

[0128] In some embodiments of this application, the first buffer 502 is connected to the camera assembly, and at least a portion of the image data includes at least one row of pixel data of the image to be detected.

[0129] In the application embodiment, the photosensitive element of the camera component is generally a rolling shutter exposure, which outputs a row of pixel data in each exposure cycle. The first buffer 502 caches each row of pixel data sequentially. After enough rows of pixels are cached, the subsequent calculation unit can calculate the feature values ​​of these pixels. Therefore, it is not necessary to wait for the entire frame image to be completely cached, thus improving the corner detection efficiency.

[0130] In some embodiments of this application, Figure 6 A second structural block diagram of the detection circuit 500 according to an embodiment of this application is shown, such as... Figure 6 As shown, the detection circuit 500 also includes:

[0131] The third buffer 510 is connected to the camera assembly and the first buffer 502. The third buffer 510 is located between the camera assembly and the first buffer 502. The third buffer 510 is used to temporarily store the original image captured by the camera assembly.

[0132] The first buffer 502 is also used to partition the original image to obtain at least two partitioned images to be detected.

[0133] In this embodiment, the third buffer 510 is used to temporarily store the original image captured by the camera component. After the complete original image is temporarily stored, the first buffer 502 further temporarily stores at least a part of the original image, namely an image to be detected. The subsequent calculation unit calculates the feature value of the image to be detected and detects the corner points in each image area of ​​the image to be detected. This can avoid corner points from being concentrated in a specific area of ​​the original image and improve the corner point detection quality.

[0134] In some embodiments of this application, such as Figure 5 and Figure 6 As shown, the corner detection unit 508 includes:

[0135] The suppression unit 5081 is used to set the feature value of the target pixel to a preset feature value when the feature value of the target pixel is less than the feature value of each of the multiple second neighboring pixels.

[0136] Among them, multiple second neighboring pixels are pixels in the neighboring window corresponding to the target pixel, and the neighboring window is a rectangular window centered on the target pixel.

[0137] In this embodiment, the suppression unit 5081 performs non-maximum suppression on each obtained feature value according to the setting of the neighborhood window. Specifically, when performing non-maximum suppression on the target pixel, a neighborhood window of a preset size can be set. This neighborhood window is specifically a rectangular window centered on the target pixel, such as a 3×3 rectangular window. The 3×3 rectangular window includes 9 pixels in 3 rows and 3 columns, and the pixel at the center of the rectangular window is the target pixel.

[0138] In the neighborhood window, determine whether the feature value of each second neighboring pixel is greater than the feature value of the target pixel. If the feature value of the target pixel is less than the feature value of each second neighboring pixel in the neighborhood window, then set the feature value of the current target pixel to a preset feature value. This preset feature value is the minimum value within the feature value range. For example, if the feature value range is 0 to 255, and the feature value of the target pixel is less than the feature value of each second neighboring pixel, then set the feature value of the target pixel to 0.

[0139] This application embodiment uses non-maximum suppression to reduce the influence of pixels (weak corners or false corners) around real corners that appear as corners due to factors such as noise, low image resolution, or image enhancement. It retains the corners with the strongest features, thereby filtering out weak corners and false corners, improving the quality of detected target corners, and improving the accuracy of image registration.

[0140] In some embodiments of this application, such as Figure 5 and Figure 6As shown, the corner detection unit 508 further includes:

[0141] The statistical unit 5082 is connected to the suppression unit 5081. The statistical unit 5082 is used to determine the distribution information based on the mapping relationship between N feature values ​​and M feature value intervals, where M is a positive integer. The distribution information includes the number of feature values ​​in each feature value interval among the M feature value intervals.

[0142] The fourth buffer 5083, connected to the statistics unit 5082, is used to temporarily store distribution information.

[0143] In this embodiment, the statistics unit 5082 is used to map the feature value to a segmented statistics table and perform statistics when a feature value is greater than all other feature values ​​in the neighborhood window, and store the results of the statistics table in an on-chip buffer.

[0144] The number of segments and the segmentation method of the segmented statistics table are configurable. For example, the number of segments can be set using a single register value, and the segmentation method can be set using a lookup table. It is understood that the segmented statistics table is also designed using on-chip memory.

[0145] For example, assuming the eigenvalues ​​range from 0 to 255, dividing the range from 0 to 255 into 255 equally spaced intervals, we can obtain a total of 255 eigenvalue intervals: [0, 1), [1, 2), ..., (254, 255].

[0146] Based on the specific values ​​of N feature values, determine the feature value interval corresponding to each of the N feature values, and place the feature value into the corresponding feature value interval. After placing all N feature values ​​into their corresponding feature value intervals, the amount of feature value data contained in the M feature value intervals represents the distribution information of the N feature values.

[0147] This application embodiment divides the value range of feature values ​​and counts the number of feature values ​​in different feature value ranges in a segmented manner, which can reduce the amount of computation, reduce memory consumption, and improve corner detection efficiency.

[0148] In some embodiments of this application, such as Figure 5 and Figure 6 As shown, the corner detection unit 508 further includes:

[0149] The second calculation unit 5084 is connected to the fourth buffer 5083. The second calculation unit 5084 is used to determine the corner threshold based on the distribution information and the number of targets.

[0150] In this embodiment of the application, the second calculation unit 5084 is connected to the fourth buffer 5083 and is used to accumulate the segmented statistics table in a manner from high to low according to the segmented statistics table and the number of target corner points, to find the segmented interval corresponding to the number of target corner points, and the starting feature value of the segmented interval is the corner point threshold.

[0151] Specifically, after sorting in descending order, the number of feature values ​​in each feature value interval is counted sequentially and accumulated. For example, the number of feature values ​​in the first interval with the largest endpoint is added to the number of feature values ​​in the second interval with the second largest endpoint. At the same time, the first and second intervals are merged to obtain the first summed interval. If the number of feature values ​​in the first summed interval is less than the target number, that is, the number of target corner points to be detected, the first summed interval is added to the number of feature values ​​in the third interval with the third largest endpoint. At the same time, the first summed interval and the third interval are merged. This process continues until the number of feature values ​​in the target interval after summing is greater than or equal to the target number.

[0152] After obtaining the target interval, the starting point of the target interval is used as the corner threshold. The N feature values ​​are filtered by the corner threshold, and the first pixel with a feature value greater than the corner threshold is taken as the corner pixel.

[0153] This application determines the corner threshold by interval accumulation, and filters the target corner pixels from N first pixels using the corner threshold. Therefore, it can always find a sufficient number of target corners in the image to be detected, thus improving the corner detection quality.

[0154] In some embodiments of this application, such as Figure 5 and Figure 6 As shown, the corner detection unit 508 further includes:

[0155] The comparison unit 5085 is connected to the second calculation unit 5084. The comparison unit 5085 is used to determine the target corner point among N first pixels based on the corner point threshold.

[0156] In this embodiment of the application, the comparison unit 5085 is used to read data from the corner feature map buffer 5086 line by line according to the corner threshold and judge each feature value in the feature map, and select the points that are higher than the corner threshold as the final target corner points and add them to the corner list.

[0157] The image frame buffer and the corner feature map buffer 5086 can be located on the same hardware entity or on different hardware entities.

[0158] The detection method provided in this application can be executed by a detection device. This application uses a detection device to perform the detection method as an example to illustrate the detection device provided in this application.

[0159] In some embodiments of this application, Figure 5 and Figure 6 In the detection circuit 500 shown, the first buffer 502 and the second buffer 506 can be line buffers.

[0160] In other implementations, Figure 5 and Figure 6 In the detection circuit 500 shown, the first buffer 502 and the second buffer 506 can be two-dimensional window buffers.

[0161] In this design, the first dimension of the two-dimensional window buffer is smaller than the column length of the image to be detected (i.e., the number of pixels in each column), and the second dimension of the line buffer is smaller than the row length of the image to be detected (i.e., the number of pixels in each row).

[0162] Optionally, the first and second dimensions can be set to be equal, such as having a size of M×M, where M is a multiple or larger of the number of rows or columns occupied by neighboring pixels in the method. The advantage of this approach is that it reduces the size of the buffer compared to a line buffer, and eliminates the need to store the entire row of data.

[0163] In some embodiments of this application, an image corner detection device is provided. Figure 7 A structural block diagram of a detection device according to an embodiment of this application is shown, such as... Figure 7 As shown, the detection device 700 includes:

[0164] Processing module 702 is used to perform data processing on the image to be detected, obtaining N feature values ​​corresponding to N first pixels in the image to be detected, where N is a positive integer; and

[0165] Data processing is performed on N feature values ​​to obtain the distribution information corresponding to the N feature values;

[0166] The determination module 704 is used to determine the corner threshold based on the distribution information and the number of targets, wherein the number of targets is the number of target corners; and to determine the target corners among N first pixels based on the corner threshold.

[0167] This application embodiment determines a corner threshold that matches the current image to be detected based on the distribution information of feature values, and then detects target corners using this corner threshold. Since the corner threshold is determined based on the actual feature value distribution information of the current image to be detected, it achieves adaptive generation of corner feature thresholds based on image content, thereby ensuring that an appropriate number of target corners are detected in the image to be detected, thus improving the image registration effect.

[0168] Optionally, the processing module is also used to perform brightness conversion on the image to be detected to obtain brightness map data corresponding to the image to be detected. The brightness map data includes N second pixels, and the N second pixels correspond one-to-one with the N first pixels.

[0169] The determining module is also used to determine the feature value of the target pixel based on the pixel value of the target pixel and the pixel value of the first neighboring pixels of the target pixel; wherein, the N second pixels include the target pixel, the first neighboring pixels are second pixels arranged around the target pixel with the target pixel as the center, and the distance between the first neighboring pixels and the target pixel is a preset distance value.

[0170] The embodiments of this application use brightness data for corner detection, which can well reflect contrast and edge details and has good robustness.

[0171] Optionally, the determining module is also used to determine the neighborhood window corresponding to the target pixel. The neighborhood window is a rectangular window centered on the target pixel and includes multiple second neighboring pixels.

[0172] The processing module is also used to set the feature value of the target pixel to a preset feature value when the feature value of the target pixel is less than the feature value of each of the multiple second neighboring pixels. The preset feature value is the minimum value of the pixel's feature value, and the pixel with the preset feature value will not be identified as an image corner point.

[0173] This application embodiment uses non-maximum suppression to reduce the influence of pixels (weak corners or false corners) around real corners that appear as corners due to factors such as noise, low image resolution, or image enhancement. It retains the corners with the strongest features, thereby filtering out weak corners and false corners, improving the quality of detected target corners, and improving the accuracy of image registration.

[0174] Optionally, the determining module is further configured to determine distribution information based on the mapping relationship between N feature values ​​and M feature value intervals, where M is a positive integer, and the distribution information includes the number of feature values ​​in each of the M feature value intervals.

[0175] This application embodiment divides the value range of feature values ​​and counts the number of feature values ​​in different feature value ranges in a segmented manner, which can reduce the amount of computation, reduce memory consumption, and improve corner detection efficiency.

[0176] Optionally, the determining module is further configured to determine a target interval based on M feature value intervals, wherein the target interval includes K consecutive feature value intervals, the M feature value intervals include K feature value intervals, and the starting point of the target interval is greater than or equal to the ending point of any feature value interval other than the K feature value intervals in the M feature value intervals, and the number of feature values ​​in the target interval is greater than or equal to the target number; and a corner threshold is determined based on the starting point of the target interval.

[0177] This application determines the corner threshold by interval accumulation, and filters the target corner pixels from N first pixels using the corner threshold. Therefore, it can always find a sufficient number of target corners in the image to be detected, thus improving the corner detection quality.

[0178] Optionally, the processing module is also used to cache N feature values ​​and generate a feature map corresponding to the image to be detected.

[0179] In this embodiment, after obtaining the N feature values ​​of all N first pixels of the image to be detected, the N feature values ​​are cached in the form of a feature map for subsequent corner detection. Cache the feature values ​​of each pixel of the image to be detected in the form of a feature map, which helps to improve the efficiency of corner detection.

[0180] Optionally, the processing module is also used to partition the original image to obtain J partitioned images to be detected;

[0181] In response to the input settings, the number of target corner points is set for each of the J images to be detected.

[0182] This application divides the original image into multiple small grid images and determines the corresponding number of corner points in each to be detected. This can prevent the detected corner points from being concentrated in a certain area of ​​the original image and can increase the number of corner points in the central area, thereby improving the corner point detection quality.

[0183] The detection device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the scope of the device.

[0184] The detection device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.

[0185] The detection device provided in this application embodiment can implement all the processes implemented in the above method embodiments, and will not be described again here to avoid repetition.

[0186] Optionally, embodiments of this application also provide an electronic device. Figure 8 A structural block diagram of an electronic device according to an embodiment of this application is shown, such as... Figure 8 As shown, the electronic device 800 includes a processor 802, a memory 804, and a program or instructions stored in the memory 804 and executable on the processor 802. When the program or instructions are executed by the processor 802, they implement the various processes of the above method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.

[0187] It should be noted that the electronic devices in the embodiments of this application include the aforementioned mobile electronic devices and non-mobile electronic devices.

[0188] Figure 9 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0189] The electronic device 900 includes, but is not limited to, components such as: radio frequency unit 901, network module 902, audio output unit 903, input unit 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, and processor 910.

[0190] Those skilled in the art will understand that the electronic device 900 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 910 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 9 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0191] The processor 910 is used to process data in the image to be detected, to obtain N feature values ​​corresponding to N first pixels in the image to be detected, where N is a positive integer; to process the N feature values ​​to obtain distribution information corresponding to the N feature values; to determine the corner threshold based on the distribution information and the number of targets, where the number of targets is the number of target corners; and to determine the target corners among the N first pixels based on the corner threshold.

[0192] This application embodiment determines a corner threshold that matches the current image to be detected based on the distribution information of feature values, and then detects target corners using this corner threshold. Since the corner threshold is determined based on the actual feature value distribution information of the current image to be detected, it achieves adaptive generation of corner feature thresholds based on image content, thereby ensuring that an appropriate number of target corners are detected in the image to be detected, thus improving the image registration effect.

[0193] Optionally, the processor 910 is further configured to perform brightness conversion on the image to be detected to obtain brightness map data corresponding to the image to be detected. The brightness map data includes N second pixels, and the N second pixels correspond one-to-one with the N first pixels. Based on the pixel value of the target pixel and the pixel value of the first neighboring pixels of the target pixel, the feature value of the target pixel is determined. Among them, the N second pixels include the target pixel, and the first neighboring pixels are second pixels arranged around the target pixel with the target pixel as the center, and the distance between the first neighboring pixels and the target pixel is a preset distance value.

[0194] The embodiments of this application use brightness data for corner detection, which can well reflect contrast and edge details and has good robustness.

[0195] Optionally, the processor 910 is further configured to determine the neighborhood window corresponding to the target pixel, wherein the neighborhood window is a rectangular window centered on the target pixel and includes multiple second neighboring pixels; if the feature value of the target pixel is less than the feature value of each of the multiple second neighboring pixels, the feature value of the target pixel is set to a preset feature value, wherein the preset feature value is the minimum value of the pixel's feature value, and a pixel with the preset feature value will not be determined as an image corner point.

[0196] This application embodiment uses non-maximum suppression to reduce the influence of pixels (weak corners or false corners) around real corners that appear as corners due to factors such as noise, low image resolution, or image enhancement. It retains the corners with the strongest features, thereby filtering out weak corners and false corners, improving the quality of detected target corners, and improving the accuracy of image registration.

[0197] Optionally, the processor 910 is further configured to determine distribution information based on the mapping relationship between N feature values ​​and M feature value intervals, where M is a positive integer, and the distribution information includes the number of feature values ​​in each of the M feature value intervals.

[0198] This application embodiment divides the value range of feature values ​​and counts the number of feature values ​​in different feature value ranges in a segmented manner, which can reduce the amount of computation, reduce memory consumption, and improve corner detection efficiency.

[0199] Optionally, the processor 910 is further configured to determine a target interval based on M feature value intervals, wherein the target interval includes K consecutive feature value intervals, the M feature value intervals include K feature value intervals, and the starting point of the target interval is greater than or equal to the ending point of any feature value interval other than the K feature value intervals in the M feature value intervals, and the number of feature values ​​in the target interval is greater than or equal to the target number; and to determine a corner threshold based on the starting point of the target interval.

[0200] This application determines the corner threshold by interval accumulation, and filters the target corner pixels from N first pixels using the corner threshold. Therefore, it can always find a sufficient number of target corners in the image to be detected, thus improving the corner detection quality.

[0201] Optionally, the processor 910 is also used to cache N feature values ​​and generate a feature map corresponding to the image to be detected.

[0202] In this embodiment, after obtaining the N feature values ​​of all N first pixels of the image to be detected, the N feature values ​​are cached in the form of a feature map for subsequent corner detection. Cache the feature values ​​of each pixel of the image to be detected in the form of a feature map, which helps to improve the efficiency of corner detection.

[0203] Optionally, the processor 910 is also used to partition the original image to obtain J partitioned images to be detected;

[0204] In response to the input settings, the number of target corner points is set for each of the J images to be detected.

[0205] This application improves corner detection quality by dividing the original image into multiple small grid images and determining the corresponding number of corner points in each area to be detected, thereby preventing the detected corner points from being concentrated in a certain area of ​​the original image.

[0206] It should be understood that, in this embodiment, the input unit 904 may include a graphics processing unit (GPU) 9041 and a microphone 9042. The GPU 9041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.

[0207] The memory 909 can be used to store software programs and various data. The memory 909 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 909 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 909 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0208] Processor 910 may include one or more processing units; optionally, processor 910 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 910.

[0209] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0210] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0211] This application also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0212] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0213] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above method embodiments and achieve the same technical effects. To avoid repetition, it will not be described again here.

[0214] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0215] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0216] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for detecting corner points in an image, characterized in that, include: Data processing is performed on the image to be detected to obtain N feature values ​​corresponding to N first pixels in the image to be detected, where N is a positive integer; Data processing is performed on the N feature values ​​to obtain the distribution information corresponding to the N feature values; The corner threshold is determined based on the distribution information and the number of targets, wherein the number of targets is the number of target corners; Based on the corner threshold, the target corner is determined among the N first pixels; The step of processing the N feature values ​​to obtain the distribution information corresponding to the N feature values ​​includes: The distribution information is determined based on the mapping relationship between the N feature values ​​and the M feature value intervals, where M is a positive integer. The distribution information includes the number of feature values ​​in each of the M feature value intervals, and the M feature value intervals are consecutive intervals after being sorted in order of size. Before performing data processing on the image to be detected to obtain N feature values ​​corresponding to N first pixels in the image to be detected, the method further includes: The original image is partitioned to obtain J partitioned images to be detected; In response to the setting input, the target quantity is set for each of the J images to be detected based on the distance value between the image center of each image to be detected and the image center of the original image.

2. The detection method according to claim 1, characterized in that, The data processing of the image to be detected, to obtain N feature values ​​corresponding to N first pixels in the image to be detected, includes: The image to be detected is subjected to brightness conversion to obtain brightness map data corresponding to the image to be detected. The brightness map data includes N second pixels, and the N second pixels correspond one-to-one with the N first pixels. The feature value of the target pixel is determined based on the pixel value of the target pixel and the pixel value of the first neighboring pixels of the target pixel; wherein, the N second pixels include the target pixel, the first neighboring pixels are second pixels arranged in a preset direction with the target pixel as the center, and the distance between the first neighboring pixels and the target pixel is a preset distance value.

3. The detection method according to claim 2, characterized in that, After processing the image to be detected to obtain N feature values ​​corresponding to N first pixels in the image to be detected, the method further includes: A neighborhood window corresponding to the target pixel is determined. The neighborhood window is a rectangular window centered on the target pixel and includes multiple second neighboring pixels. If the feature value of the target pixel is less than the feature value of each of the plurality of second neighboring pixels, the feature value of the target pixel is set to a preset feature value, wherein the preset feature value is the minimum value of the pixel's feature value.

4. The detection method according to claim 1, characterized in that, Determining the corner threshold based on the distribution information and the number of targets includes: A target interval is determined based on the M feature value intervals, wherein the target interval includes K consecutive feature value intervals, the M feature value intervals include the K feature value intervals, and the starting point of the target interval is greater than or equal to the ending point of any feature value interval other than the K feature value intervals in the M feature value intervals, and the number of feature values ​​in the target interval is greater than or equal to the target number. The corner threshold is determined based on the starting point of the target interval.

5. The detection method according to claim 3, characterized in that, After processing the image to be detected to obtain N feature values ​​corresponding to N first pixels in the image to be detected, the method further includes: The N feature values ​​are cached, and a feature map corresponding to the image to be detected is generated.

6. A corner detection circuit for an image, characterized in that, The detection circuit is used to perform the detection method as described in any one of claims 1 to 5. The detection circuit is applied to an electronic device, the electronic device including a camera assembly and an image signal processing assembly, the camera assembly being connected to the input terminal of the image signal processing assembly, and the detection circuit being connected to the image signal processing assembly. The detection circuit includes: The first buffer is connected to the image signal processing component and is used to temporarily store at least a portion of the image data of the image to be detected. The first computing unit, connected to the first buffer, is used to calculate the feature value of the first pixel of the image to be detected; The second buffer, connected to the first computing unit, is used to cache N feature values ​​corresponding to N first pixels of the image to be detected, where N is a positive integer; A corner detection unit, connected to the first calculation unit, is used to process the N feature values ​​to obtain the distribution information of the N feature values, determine a corner threshold based on the distribution information and the number of targets, and determine the target corners among the N first pixels based on the corner threshold, wherein the number of targets is the number of target corners.

7. The detection circuit according to claim 6, characterized in that, The first buffer is connected to the camera assembly, and the at least part of the image data includes at least one row of pixel data of the image to be detected.

8. The detection circuit according to claim 6, characterized in that, Also includes: A third buffer is connected to the camera assembly and the first buffer. The third buffer is located between the camera assembly and the first buffer and is used to temporarily store the original image captured by the camera assembly. The first buffer is also used to partition the original image to obtain at least two partitioned images to be detected.

9. The detection circuit according to claim 8, characterized in that, The corner detection unit includes: The suppression unit is used to set the feature value of the target pixel to a preset feature value when the feature value of the target pixel is less than the feature value of each of the multiple second neighboring pixels, wherein the preset feature value is the minimum value of the feature value of the pixel. Wherein, the plurality of second neighboring pixels are pixels in the neighboring window corresponding to the target pixel, and the neighboring window is a rectangular window centered on the target pixel.

10. The detection circuit according to claim 9, characterized in that, The corner detection unit further includes: A statistical unit, connected to the suppression unit, is used to determine the distribution information based on the mapping relationship between the N feature values ​​and the M feature value intervals, where M is a positive integer, and the distribution information includes the number of feature values ​​in each of the M feature value intervals; The fourth buffer, connected to the statistical unit, is used to temporarily store the distribution information.

11. The detection circuit according to claim 10, characterized in that, The corner detection unit further includes: The second calculation unit is connected to the fourth buffer and is used to determine the corner threshold based on the distribution information and the number of targets.

12. The detection circuit according to claim 11, characterized in that, The corner detection unit further includes: A comparison unit, connected to the second calculation unit, is used to determine the target corner point among the N first pixels based on the corner point threshold.

13. An image corner detection device, characterized in that, include: The processing module is used to perform data processing on the image to be detected to obtain N feature values ​​corresponding to N first pixels in the image to be detected, where N is a positive integer; as well as Data processing is performed on the N feature values ​​to obtain the distribution information corresponding to the N feature values; The determining module is used to determine a corner threshold based on the distribution information and the number of targets, wherein the number of targets is the number of target corners; as well as Based on the corner threshold, the target corner is determined among the N first pixels; The determining module is further configured to determine the distribution information based on the mapping relationship between the N feature values ​​and the M feature value intervals, where M is a positive integer, and the distribution information includes the number of feature values ​​in each of the M feature value intervals, and the M feature value intervals are consecutive intervals after being sorted in order of size. The processing module is further configured to partition the original image to obtain J images to be detected after partitioning; in response to the setting input, the target number is set for each of the J images to be detected according to the distance value between the image center of each image to be detected and the image center of the original image.

14. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the method as described in any one of claims 1 to 5; as well as A camera assembly and an image signal processing assembly, wherein the camera assembly is connected to the input terminal of the image signal processing assembly; The detection circuit as described in any one of claims 6 to 12, wherein the detection circuit is connected to the image signal processing component.

15. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Image feature processing module, augmented reality equipment and corner detection method

    CN109493349A

  • Vehicle image recognition method and related device

    CN110689004A