Sub-pixel position determination, image processing method and device

By preprocessing the original image and determining the stabilization conditions, the position of sub-pixels is determined, solving the problem of low sub-pixel position accuracy in existing technologies and achieving high-precision image processing.

CN115936989BActive Publication Date: 2026-11-24BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211585057.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-09
Publication Date
2026-11-24
Estimated Expiration
2042-12-09

AI Technical Summary

Technical Problem

In existing technologies, the positional accuracy for determining sub-pixel locations is low, which cannot meet the requirements of high-precision image processing.

Method used

By preprocessing the original image, the first and second candidate positions of sub-pixel points are determined. When the stability condition is met, the second candidate position is determined as the target position. The sub-pixel points are accurately located using interpolation algorithms and regional information of feature points.

Benefits of technology

It improves the positional accuracy of sub-pixel points, reduces interference from image noise and preprocessing factors, and ensures high precision in image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115936989B_ABST
    Figure CN115936989B_ABST
Patent Text Reader

Abstract

This disclosure provides a method and apparatus for determining the position of sub-pixels and image processing. The method for determining the position of sub-pixels is executed by an electronic device and includes: preprocessing an original image to obtain a first candidate image; determining a first candidate position corresponding to a sub-pixel obtained based on at least two feature points on the original image; determining a second candidate position corresponding to the sub-pixel obtained based on at least two feature points on the first candidate image; and determining the second candidate position as the target position of the sub-pixel obtained based on the at least two feature points when a stability condition for sub-pixel position stability is met between the first candidate position and the second candidate position. The method provided by this disclosure helps improve the accuracy of the determined sub-pixel position.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, and in particular to a method and apparatus for determining the position of sub-pixels and for image processing. Background Technology

[0002] The more pixels an image has, the higher its level of detail. When the number of pixels in an image is relatively small, new pixels can be added between the existing pixels by performing mathematical operations (such as interpolation), thereby increasing the number of pixels in the image and improving its level of detail.

[0003] The inventors discovered in their research that in existing technologies, once a new pixel is determined, it is used directly regardless of whether the position information of the new pixel is correct, which results in low positional accuracy of the new pixel. Summary of the Invention

[0004] In view of this, the present disclosure provides a method and apparatus for determining the position of sub-pixels and for image processing.

[0005] According to a first aspect of the present disclosure, a method for determining the position of a sub-pixel is provided, the method being executed by an electronic device, comprising:

[0006] The original image is preprocessed to obtain the first candidate image;

[0007] On the original image, a first candidate position corresponding to a sub-pixel point obtained based on at least two feature points is determined;

[0008] On the first candidate image, determine the second candidate position corresponding to the sub-pixel point obtained based on at least two feature points;

[0009] When the stability condition of sub-pixel position stability is met between the first candidate position and the second candidate position, the second candidate position is determined as the target position of the sub-pixel corresponding to the at least two feature points.

[0010] According to a second aspect of the present disclosure, an image processing method is provided, the method comprising:

[0011] Obtain the original image to be processed, and the processing requirements for the original image;

[0012] When the precision value set in the processing requirements is higher than the preset precision value, the target position of at least one sub-pixel point on the original image is determined based on the feature points in the original image.

[0013] Based on the location of the feature points and the target location of the at least one sub-pixel point, the original image is processed to obtain the target image, so that the accuracy of the image processing meets the processing requirements; wherein, the image processing includes: image sharpness adjustment and image calibration;

[0014] The step of determining the target location of at least one sub-pixel point in the original image based on feature points in the original image includes:

[0015] The target location is determined using any of the methods described in the first aspect.

[0016] According to a third aspect of the present disclosure, a sub-pixel position determination apparatus is provided, the apparatus being executed by an electronic device, comprising:

[0017] The first processing module is used to preprocess the original image to obtain the first candidate image;

[0018] The first determining module is used to determine, on the original image, a first candidate position corresponding to a sub-pixel point obtained based on at least two feature points;

[0019] The second determining module is used to determine, on the first candidate image, a second candidate position corresponding to a sub-pixel point obtained based on at least two feature points;

[0020] The third determining module is used to determine the second candidate position as the target position of the sub-pixel point corresponding to the at least two feature points when the stability condition of sub-pixel point position stability is met between the first candidate position and the second candidate position.

[0021] According to a fourth aspect of the present disclosure, an image processing apparatus is provided, the apparatus comprising:

[0022] The acquisition module is used to acquire the original image to be processed and the processing requirements for the original image;

[0023] The target location determination module is used to determine the target location of at least one sub-pixel point in the original image based on feature points in the original image when the accuracy value set in the processing requirements is higher than the preset accuracy value.

[0024] An image processing module is used to perform image processing on the original image based on the position of the feature points and the target position of the at least one sub-pixel point to obtain a target image, so that the accuracy of the image processing meets the processing requirements; wherein, the image processing includes: image sharpness adjustment and image calibration;

[0025] The step of determining the target location of at least one sub-pixel point in the original image based on feature points in the original image includes:

[0026] The target location is determined using any of the methods described in the first aspect.

[0027] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising:

[0028] processor;

[0029] Memory used to store processor-executable instructions;

[0030] The processor is configured to implement the steps of the method described in either the first aspect or the second aspect by running the executable instructions.

[0031] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the method described in either the first or second aspect.

[0032] The technical solutions provided in this disclosure may have the following beneficial effects:

[0033] By performing calculations on the original image and the first candidate image before and after preprocessing, the first candidate positions of sub-pixel points corresponding to at least two feature points in the original image and the second candidate positions of sub-pixel points corresponding to at least two feature points in the first candidate image are obtained.

[0034] Furthermore, by determining whether the first and second candidate positions meet the stability conditions for sub-pixel position stability, if the stability conditions are met, it indicates that the possibility of interference from other factors (such as image noise, image loss, preprocessing, etc.) during the determination of the sub-pixel position is small, and the obtained position is more accurate, which helps to improve the accuracy of the determined sub-pixel position.

[0035] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0036] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0037] Figure 1 This disclosure is a flowchart illustrating a method for determining the position of a subpixel according to an exemplary embodiment;

[0038] Figure 2This is an application scenario diagram illustrating a method for determining the position of a sub-pixel point according to an exemplary embodiment of the present disclosure;

[0039] Figure 3a This is another application scenario diagram of the sub-pixel point position determination method illustrated in this disclosure according to an exemplary embodiment;

[0040] Figure 3b This is a schematic diagram illustrating the determination of a comprehensive parameter value according to an exemplary embodiment of the present disclosure;

[0041] Figure 4a This is another application scenario diagram of the sub-pixel point position determination method illustrated in this disclosure according to an exemplary embodiment;

[0042] Figure 4b This is a schematic diagram illustrating another method for determining a first alternative location according to an exemplary embodiment of the present disclosure;

[0043] Figure 5a This is another application scenario diagram of the sub-pixel point position determination method illustrated in this disclosure according to an exemplary embodiment;

[0044] Figure 5b This is a flowchart illustrating another method for determining the position of a subpixel according to an exemplary embodiment of the present disclosure;

[0045] Figure 6 This is a schematic diagram of a sub-pixel position determination device according to an exemplary embodiment of the present disclosure;

[0046] Figure 7 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation

[0047] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0048] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0049] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0050] Subpixels are units that further subdivide the basic unit of a pixel; they are smaller than pixels. By identifying more subpixels when some pixels in an image are known, image resolution can be improved.

[0051] In image processing, digital images are typically discretized into pixels, with each pixel corresponding to an integer coordinate position. However, for many applications, the precision of integer coordinate positions is insufficient, such as target tracking, camera calibration, image registration, image stitching, and 3D reconstruction.

[0052] For these applications requiring extremely high precision, it is necessary to further refine the pixels and ultimately determine the position of sub-pixel points, which will help improve accuracy.

[0053] This disclosure provides a method and apparatus for determining the position of sub-pixels and for image processing, which will be described in detail below:

[0054] Figure 1 This disclosure is a flowchart illustrating a method for determining the position of a sub-pixel according to an exemplary embodiment, as shown below. Figure 1 As shown, the method is performed by an electronic device and specifically includes the following steps:

[0055] Step 101: Preprocess the original image to obtain the first candidate image.

[0056] Specifically, the original image can be input by the user into an electronic device (e.g., a server, computer, mobile phone, industrial control computer, etc.), or it can be automatically selected by the electronic device from several images.

[0057] Preprocessing includes, but is not limited to, at least one of the following: denoising, morphological image processing (e.g., binary morphology of images, namely binary erosion, binary dilation, opening and closing processing, etc.; and grayscale morphology, namely grayscale erosion, grayscale dilation, thinning, etc.), and size transformation processing.

[0058] The original image and the first candidate image each contain a number of pixels, which are further divided into feature points (such as points where the image grayscale value changes drastically) and non-feature points. After preprocessing the original image to obtain the first candidate image, the pixels in the first candidate image differ somewhat from those in the original image because the first candidate image has undergone a series of processes such as denoising and morphological image processing.

[0059] For example: the feature points in the first candidate image have more obvious colors after dilation; the pixel values ​​of the feature points in the first candidate image change after erosion (for example, binary erosion, the original pixel value of the feature point is 1, and the pixel value becomes 0 after erosion).

[0060] Step 102: On the original image, determine the first candidate position corresponding to the sub-pixel point obtained based on at least two feature points.

[0061] In this embodiment, the method for determining the first candidate position of the sub-pixel is not limited. The following describes the method of obtaining the first candidate position of the sub-pixel through an interpolation algorithm, which specifically includes the following steps:

[0062] Step 1021: Determine at least two regions where the at least two feature points are located.

[0063] Specifically, at least two feature points are determined using feature detection algorithms (such as edge detection, region detection, and feature point detection). Simultaneously, the region containing the feature point and its regional information (shape, color, size, etc.) and edge information (the border formed by connecting the pixels of the region) are determined. Different regions correspond to different regional information (e.g., different colors, different sizes).

[0064] For example, when the feature detection algorithm is a feature point detection algorithm, it identifies at least two feature points in the original image, and then identifies at least two regions based on these two feature points. This can take several forms: for each feature point, the similarity between this feature point and its neighboring pixels is calculated to determine whether the neighboring similar pixels belong to the same region as this feature point, and further, the region where this feature point is located is determined. Then, the pixels on the edge of the region where the feature point is located are sequentially connected to form the edge information of that region.

[0065] For example, when the feature detection algorithm is an edge detection algorithm, the edge detection algorithm outlines several edge lines in the original image, thereby forming several regions. The closed region formed by the edge lines is the region where the feature point is located. This region includes at least one feature point (i.e., the center pixel of the region center, and may also include other feature points, such as pixels on the edge of the region). Therefore, when at least two regions are determined by the feature detection algorithm, at least two feature points can also be determined.

[0066] This will be explained using the example of at least two areas being two separate areas. Figure 2 This is an application scenario diagram illustrating a sub-pixel position determination method according to an exemplary embodiment of this disclosure, such as... Figure 2 As shown, it includes: the first region: edge information 201, region information 202, first feature point 203, and second feature point 207; the second region: edge information 204, region information 205, first feature point 206, and second feature point 208.

[0067] Step 1022: Determine the comprehensive information of each region based on the regional information and edge information of each of the at least two regions.

[0068] Specifically, for each region, after determining at least two regions where at least two feature points are located according to step 1021, the region information and edge information of each region can be obtained.

[0069] This disclosure provides an exemplary method for determining comprehensive information for each region, which is briefly described below:

[0070] Determine the region parameter values ​​used to characterize the region information of each region, and the edge parameter values ​​used to characterize the edge information of each region; based on the region weight value corresponding to the region information, the edge weight value corresponding to the edge information, the region parameter values, and the edge parameter values, determine the comprehensive parameter value used to characterize the comprehensive information of each region.

[0071] Specifically, let's take the example of at least two areas being two separate areas. Figure 3a This is another application scenario diagram illustrating the sub-pixel point position determination method according to an exemplary embodiment of this disclosure, such as... Figure 3a As shown, the first region contains: edge information 201 (edge ​​parameter value is S1), region information 202 (region parameter value is A1), and first feature point 203; the second region contains: edge information 204 (edge ​​parameter value is S2), region information 205 (region parameter value is A2), and first feature point 206.

[0072] Assume the first region has a region weight of w1, an edge weight of w2, and a combined parameter of Info1; the second region has a region weight of w3, an edge weight of w4, and a combined parameter of Info2.

[0073] Therefore, the formula for calculating the comprehensive parameter value is:

[0074] Info1=w1×Norm(S1)+w2×Norm(A1); Formula (1)

[0075] Info2 = w3 × Norm(s2) + w4 × Norm(A2); Formula (2)

[0076] Norm is a function used to standardize / normalize data with different dimensions and units to solve the comparability between data indicators. By standardizing / normalizing the data (A1, S1, A2, S2 in the formula), A1 and S1 (or A2 and S2) can be made to be on the same order of magnitude, making it easier to calculate Info1 or Info2.

[0077] Figure 3b This disclosure is a schematic diagram illustrating the determination of comprehensive parameter values ​​according to an exemplary embodiment, such as... Figure 3b As shown in the figure, referring to formulas (1) and (2), it can be seen that the comprehensive parameter value mainly depends on the edge parameter value corresponding to the edge information and the region parameter value corresponding to the region information.

[0078] In the above formula (1), w1+w2=1, w1 and w2 may be equal or not; in the above formula (2), w3+w4=1, w3 and w4 may be equal or not.

[0079] Figure 4a This is another application scenario diagram of the sub-pixel point position determination method disclosed in an exemplary embodiment, including: edge information 401, region information 402, and feature point 403 of a first region. It can be seen that, since the region information is relatively small, the edge weight value corresponding to edge information 401 can be greater than the region weight value corresponding to region information 402, thereby ensuring that the comprehensive parameter value is significantly affected by the edge parameter value corresponding to edge information 401.

[0080] In summary, Figure 4b This is a schematic diagram illustrating another method for determining a first alternative location according to an exemplary embodiment of this disclosure, such as... Figure 4b As shown, the first alternative location depends on the comprehensive parameter value of the region and the location of the center point of the region.

[0081] Step 1023: Based on the comprehensive information of each region, determine the first candidate location using an interpolation algorithm.

[0082] Specifically, the interpolation algorithm can be arbitrary, such as nearest neighbor method, single linear interpolation, bilinear interpolation, etc. This real-time example does not restrict the specific interpolation algorithm.

[0083] The following exemplifies one method for determining a first alternative location; see [link to relevant documentation]. Figure 4b :

[0084] For each of the at least two regions, determine the weight ratio of the comprehensive parameter value corresponding to that region relative to the comprehensive parameter values ​​corresponding to other regions; calculate the product between the weight ratio and the position of the center point of that region on the original image; and determine the first candidate position based on the product corresponding to each region using an interpolation algorithm.

[0085] Specifically, the following example uses the case where at least two regions are two regions. Let's assume that the weight ratio for the first region is W1 and the weight ratio for the second region is W2.

[0086] The method for determining the weight ratio is as follows:

[0087] W1=Weight(Info1|Info2); formula (3)

[0088] W2=Weight(Info2|Info1); formula (4)

[0089] Wherein, Weight is the weight calculation function used to calculate the weight of Info1 relative to Info2. This disclosure does not limit the specific form of the weight calculation function; for example, it can be obtained using the analytic hierarchy process, the Delphi method, or a simpler method, such as:

[0090]

[0091] For example:

[0092]

[0093] Furthermore, after calculating the weight ratio for each region, the first candidate location is calculated as follows:

[0094] OP1=Insert(W1P1, W2P2); Formula (5)

[0095] Where OP1 is the first alternative position, Insert is the interpolation function (e.g., linear interpolation, nonlinear interpolation, etc.), and this real-time example does not restrict the specific function form of the interpolation function. P1 is the position of the center point of the first region on the original image, and P2 is the position of the center point of the second region on the original image.

[0096] Figure 5a This is another application scenario diagram illustrating the sub-pixel point position determination method according to an exemplary embodiment of this disclosure, such as... Figure 5a As shown, the position of sub-pixel 501 is determined by two regions. It can be seen that when the edge information 201 and the region information 202 of the first region are both less than the edge information 204 and the region information 205 of the second region, then in the calculation of sub-pixel 501, the weight of the second region should be greater than the weight of the first region, that is, W1 > W2 calculated by the above formula (3)-formula (4).

[0097] Step 103: On the first candidate image, determine the second candidate position corresponding to the sub-pixel point obtained based on at least two feature points.

[0098] Specifically, after determining the first candidate positions corresponding to the sub-pixel points of at least two feature points in the original image according to step 102, a second candidate position corresponding to the sub-pixel point can be determined based on the same principle, according to at least two feature points in the first candidate image. At this point, the stability of the obtained sub-pixel point position is verified by performing step 104.

[0099] Step 104: When the stability condition of sub-pixel position stability is met between the first candidate position and the second candidate position, the second candidate position is determined as the target position of the sub-pixel corresponding to the at least two feature points.

[0100] Specifically, when the first and second candidate positions meet a preset stability condition, this method of obtaining candidate positions (first or second candidate positions) for sub-pixels based on the image (original image or first candidate image) is considered to be less susceptible to interference from preprocessing and other external factors, and the accuracy of the obtained sub-pixel positions is also high (the position stability of the sub-pixels is sufficiently high). The stability condition can be set arbitrarily, for example: the two candidate positions are equidistant from their respective image center points, or the two candidate positions have the same relative coordinates in their respective images, etc.

[0101] At this point, the second alternative location can be determined as the target location of the sub-pixel point corresponding to at least two feature points in the original image.

[0102] By performing calculations on the original image and the first candidate image before and after preprocessing, the first candidate positions of sub-pixel points corresponding to at least two feature points in the original image and the second candidate positions of sub-pixel points corresponding to at least two feature points in the first candidate image are obtained.

[0103] Furthermore, by determining whether the first and second candidate positions meet the stability condition for sub-pixel position stability, if the stability condition is met, it indicates that the possibility of interference from other factors (such as image noise, image loss, etc.) during the determination of the sub-pixel position is small, and the obtained position is more accurate, which helps to improve the accuracy of the determined sub-pixel position.

[0104] In one feasible implementation, the stability condition in step 104 includes at least one of the following two conditions:

[0105] Condition 1: The difference between the comprehensive parameter values ​​of the same region determined in two adjacent determinations is less than or equal to a preset difference threshold.

[0106] Specifically, taking at least two regions as an example, for the first region of the two regions, if the difference between the comprehensive parameter value Info1 of the first region in the original image and the comprehensive parameter value Info1 of the first region in the first candidate image obtained by formula (1) is less than or equal to the preset difference threshold, that is, the following relationship is satisfied:

[0107]

[0108] in, The composite parameter value Info1 refers to the first region in the original image. The comprehensive parameter value Info1,thresh refers to the first region in the first candidate image. I nfo is the preset difference threshold.

[0109] Similarly, the difference between the comprehensive parameter value Info2 of the second region in the original image and the comprehensive parameter value Info2 of the second region in the first candidate image obtained by formula (1) is less than or equal to the preset difference threshold, that is, it satisfies the following relationship:

[0110]

[0111] When both formulas (6) and (7) are satisfied, it is considered that the comprehensive information of the feature points and the regions where the feature points are located obtained by feature detection of the first candidate image after preprocessing the original image is similar to the comprehensive information of the feature points and the regions where the feature points are located obtained from the original image before preprocessing. Therefore, the value of the first candidate position OP1 and the value of the second candidate position OP2 obtained based on similar comprehensive parameter values ​​will not differ too much. At this time, it can be approximately considered that the first candidate position and the second candidate position satisfy the stability condition of sub-pixel position stability.

[0112] Condition 2: The distance between two adjacent candidate positions of sub-pixels is less than or equal to a preset distance threshold.

[0113] Specifically, the candidate positions of sub-pixels determined in two consecutive intervals, for example: first candidate position OP and second candidate position OP2, second candidate position OP2 and third candidate position OP3, third candidate position OP3 and fourth candidate position OP4, and so on. Taking the first candidate position OP1 and the second candidate position OP2 as an example, the following relationship is satisfied:

[0114] |OP1,OP2|≤threshP; Formula (8)

[0115] Among them, thresh P It is a preset distance threshold, where |OP1, OP2| represent the distance between the coordinates of the first candidate position and the second candidate position.

[0116] In one feasible implementation, after performing step 104, the method further includes the following steps:

[0117] Step 201: When the stability condition is not met between the first candidate position and the second candidate position, the original image is preprocessed again to obtain a second candidate image that is different from the first candidate image.

[0118] Specifically, if the first and second candidate positions do not meet the stability condition, it may be due to excessive noise in the original image, which leads to the low accuracy of the first candidate position obtained from the original image. In this case, a second candidate image is introduced, that is, the original image is preprocessed again to obtain the second candidate image.

[0119] It is important to note that preprocessing can include denoising and / or morphological processing. If the preprocessing is denoising, the degree of denoising between the first and second candidate images will be different. If the preprocessing includes both denoising and other processing (such as morphological processing, size transformation, etc.), the degree of denoising on the original image can be similar each time, but the other processing will vary. For example, the first candidate image may be obtained by denoising and erosion of the original image, while the second candidate image may be obtained by denoising and dilation of the original image.

[0120] The above method ensures that each preprocessing of the original image yields a different image. Furthermore, when using interpolation algorithms to obtain sub-pixel positions, continuous preprocessing automatically adjusts the interpolation algorithm parameters, thereby optimizing the interpolation algorithm and gradually obtaining more stable sub-pixel positions.

[0121] Step 202: On the second candidate image, determine the third candidate position corresponding to the sub-pixel point obtained based on at least two feature points; when the stability condition is satisfied between the second candidate position and the third candidate position, determine the third candidate position as the target position.

[0122] Specifically, after obtaining the second candidate image, the third candidate position corresponding to the sub-pixel can be determined using the same principle described above. Since the second candidate image is different from the first candidate image (but the images contain the same features and feature points corresponding to the same features), if the third candidate position and the second candidate position satisfy the stability condition, it indicates that the position of the sub-pixel obtained by the above method is reliable and is not affected by artificial noise interference such as preprocessing.

[0123] Step 203: When the stability condition is not met between the second candidate position and the third candidate position, the second candidate image is used as the updated first candidate image, and the process returns to the step of preprocessing the original image again to obtain a second candidate image that is different from the first candidate image (part of the steps in step 201), until the stability condition is met between the candidate positions of the sub-pixel points determined in two adjacent steps.

[0124] Specifically, if the stability condition is not met between the second and third candidate positions, the second candidate image is used as the updated first candidate image so that the steps in step 201 can be executed to preprocess the original image again to obtain a new second candidate image, and steps 202-203 are repeated until the stability condition is met between the candidate positions of the sub-pixel points determined in two adjacent steps.

[0125] Figure 5bThis is a flowchart illustrating another method for determining the position of a sub-pixel point according to an exemplary embodiment of this disclosure. The following is an exemplary description of... Figure 5b The flowchart shown is used for illustration:

[0126] Assumptions: First preprocessing of the original image yields Image 1; second preprocessing of the original image yields Image 2. Image 1 is then used as the first candidate image, and Image 2 as the second candidate image, resulting in a second candidate position and a third candidate position. Based on the current second and third candidate positions, it is determined whether they satisfy a stability condition. If they satisfy the stability condition, the third candidate position is determined as the target position. If they do not satisfy the stability condition, the following steps are executed: the second candidate image is used as the updated first candidate image, and the original image is preprocessed again to obtain a second candidate image different from the first candidate image. The above example illustrates these two steps respectively.

[0127] Step 511: Use the current second candidate image as the updated first candidate image.

[0128] Specifically, if the current second candidate image is image two, then image two will be used as the new first candidate image.

[0129] Step 512: Preprocess the original image to obtain a new second alternative image.

[0130] Specifically, before executing step 512, the second candidate image is still image two. After preprocessing the original image, a new image (e.g., image three, which is different from the current first candidate image) can be obtained. At this time, image three is used as the new second candidate image. That is, after obtaining the updated first and second candidate images, the updated second and third candidate positions are determined. Steps 202-203 are then executed to determine whether the current second and third candidate positions satisfy the stability condition.

[0131] Using the above method, it is verified whether the candidate positions of the sub-pixel points obtained from images two and three meet the stability condition. If they do, the third candidate position is determined as the target position; if they do not, the following steps are repeated: step 511: using the second candidate image as the updated first candidate image, and step 512: preprocessing the original image again to obtain a second candidate image different from the first candidate image, until it is determined that the stability condition is met between the candidate positions of the sub-pixel points determined in two adjacent steps, then the above repeated steps are stopped.

[0132] The above method can ensure that the position of the final sub-pixel is highly accurate.

[0133] In one feasible implementation, embodiments of this disclosure provide an image processing method, the method being performed by an electronic device, comprising:

[0134] The process involves acquiring the original image to be processed and the processing requirements for the original image; when the precision value set in the processing requirements is higher than a preset precision value, determining the target position of at least one sub-pixel point on the original image based on feature points in the original image; and performing image processing on the original image based on the position of the feature points and the target position of the at least one sub-pixel point to obtain a target image, so that the precision of the image processing meets the processing requirements; wherein the image processing includes: image sharpness adjustment and image calibration; wherein determining the target position of at least one sub-pixel point on the original image based on feature points in the original image includes: determining the target position using any of the sub-pixel point position determination methods described above.

[0135] Specifically, image processing involves many requirements that necessitate high-precision image processing, such as image calibration (also known as camera calibration) and image sharpness adjustment.

[0136] For example, image processing can also include image registration, target recognition and tracking, and stereo imaging.

[0137] These image processing methods all require high precision. When there are processing requirements for the original image, it is necessary to determine higher precision pixels, or sub-pixel points, from the original image.

[0138] Therefore, when the pixels in the original image cannot meet the precision requirements specified in the processing requirements of the original image, it is necessary to introduce the concept of sub-pixels. By using known feature points (pixels) in the original image, at least one sub-pixel in the original image and the target position of each sub-pixel are determined. This results in an original image that includes both the original feature points (pixels) and the new sub-pixels. Performing image processing on this basis helps improve the precision of the image processing, thereby meeting the processing requirements of the original image. This disclosure does not limit the precision values ​​or preset precision values ​​in the processing requirements.

[0139] Taking image processing as an example, which involves labeling features in the original image, we assume that the processing requirement is that the labeling accuracy is sufficiently precise (e.g., an accuracy value of 0.85), with a preset accuracy value of 0.6.

[0140] Suppose the original image has 100 pixels. From these 100 pixels, several feature points are determined, for example, 80 (or 5, 20, 50, or 100). Using the steps in the sub-pixel location determination method described above, the target locations of several sub-pixel points can be determined based on the 80 feature points. Let's assume 45 sub-pixel points are determined (or 5, 40, 60, etc.). At this point, the original image has a total of 100 pixels + 45 sub-pixel points. Now, if we want to perform high-precision labeling on a certain feature in the original image (for example, the original image is a face, and we want to extract the feature of the corner of the eye), using the 100 pixels + 45 sub-pixel points can improve the coordinate accuracy of the determined "corner of the eye" feature. This enables high-precision feature labeling, meeting the processing requirements of image processing.

[0141] For the foregoing method embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should know that this disclosure is not limited to the described order of actions, because according to this disclosure, some steps may be performed in other orders or simultaneously.

[0142] Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by this disclosure.

[0143] Corresponding to the aforementioned application function implementation method embodiments, this disclosure also provides an embodiment of a sub-pixel point position determination device and a corresponding terminal.

[0144] In a feasible implementation plan Figure 6 This disclosure is a schematic diagram illustrating a sub-pixel position determination device according to an exemplary embodiment, the device being executed by an electronic device and comprising:

[0145] The first processing module 601 is used to preprocess the original image to obtain the first candidate image.

[0146] The first determining module 602 is used to determine, on the original image, a first alternative position corresponding to a sub-pixel point obtained based on at least two feature points.

[0147] The second determining module 603 is used to determine, on the first candidate image, a second candidate position corresponding to a sub-pixel point obtained based on at least two feature points.

[0148] The third determining module 604 is used to determine the second candidate position as the target position of the sub-pixel point corresponding to the at least two feature points when the stability condition of sub-pixel point position stability is met between the first candidate position and the second candidate position.

[0149] In one feasible implementation, the device further includes:

[0150] The second processing module is used to preprocess the original image again when the stability condition is not met between the first candidate position and the second candidate position, so as to obtain a second candidate image that is different from the first candidate image.

[0151] The fourth determining module is used to determine, on the second candidate image, the third candidate position corresponding to the sub-pixel point obtained based on at least two feature points.

[0152] The fifth determining module is used to determine the third candidate position as the target position when the stability condition is met between the second candidate position and the third candidate position.

[0153] The third processing module is used to, when the stability condition is not met between the second candidate position and the third candidate position, take the second candidate image as the updated first candidate image and return to execute the step of preprocessing the original image again to obtain a second candidate image different from the first candidate image, until the stability condition is met between the candidate positions of the sub-pixel points determined in two adjacent determinations.

[0154] In one feasible implementation, when determining the first candidate location corresponding to a sub-pixel point obtained based on at least two feature points on the original image, the first determining module is specifically used for:

[0155] Determine at least two regions where the at least two feature points are located.

[0156] Based on the regional information and edge information of each of the at least two regions, the comprehensive information of each region is determined.

[0157] Based on the comprehensive information of each region, the first candidate location is determined by an interpolation algorithm.

[0158] In one feasible implementation, when the first determining module is used to determine the comprehensive information of each region based on the region information and edge information of each of the at least two regions, it is specifically used for:

[0159] Determine the region parameter values ​​used to characterize the region information of each region, and the edge parameter values ​​used to characterize the edge information of each region.

[0160] Based on the region weight value corresponding to the region information, the edge weight value corresponding to the edge information, the region parameter value, and the edge parameter value, a comprehensive parameter value is determined to characterize the comprehensive information of each region.

[0161] In one feasible implementation, when the first determining module determines the first candidate location based on the comprehensive information of each region using an interpolation algorithm, it specifically performs the following:

[0162] For each of the at least two regions, determine the weight ratio of the comprehensive parameter value corresponding to that region relative to the comprehensive parameter values ​​corresponding to the other regions.

[0163] Calculate the product between the weight ratio and the position of the center point of the region on the original image.

[0164] Based on the product corresponding to each region, the first candidate position is determined by an interpolation algorithm.

[0165] In one feasible implementation, the stability condition includes at least one of the following:

[0166] The distance between two adjacent candidate positions of sub-pixels is less than or equal to a preset distance threshold.

[0167] The difference between the comprehensive parameter values ​​of the same region determined in two adjacent determinations is less than or equal to a preset difference threshold.

[0168] In one feasible implementation, this disclosure also provides an image processing apparatus, the apparatus comprising:

[0169] The acquisition module is used to acquire the original image to be processed and the processing requirements for the original image.

[0170] The target location determination module is used to determine the target location of at least one sub-pixel point on the original image based on feature points in the original image when the accuracy value set in the processing requirements is higher than the preset accuracy value.

[0171] An image processing module is used to perform image processing on the original image based on the position of the feature points and the target position of the at least one sub-pixel point to obtain a target image, so that the accuracy of the image processing meets the processing requirements; wherein, the image processing includes: image sharpness adjustment and image calibration.

[0172] The step of determining the target location of at least one sub-pixel point in the original image based on feature points in the original image includes:

[0173] The target position is determined by employing the steps of any of the sub-pixel position determination methods described above.

[0174] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0175] Accordingly, this disclosure provides an electronic device, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the steps of the method for determining the position of any of the sub-pixels by running the executable instructions.

[0176] Figure 7 This disclosure is a schematic diagram illustrating the structure of an electronic device according to an exemplary embodiment. For example, the electronic device 700 can be a user device, specifically a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, wearable device such as smartwatch, smart glasses, smart bracelet, smart running shoes, etc.

[0177] Figure 7 This disclosure is a schematic diagram of the structure of an electronic device according to an exemplary embodiment. The electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power supply component 706, a multimedia component 708, an audio component 710, an input / output (I / O) interface 712, a sensor component 714, and a communication component 716.

[0178] Processing component 702 typically controls the overall operation of electronic device 700, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.

[0179] Memory 704 is configured to store various types of data to support the operation of device 700. Examples of this data include instructions for any application or method operating on electronic device 700, contact data, phonebook data, messages, pictures, videos, etc. Memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0180] Power supply component 706 provides power to various components of electronic device 700. Power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 700.

[0181] Multimedia component 708 includes a screen that provides an output interface between the aforementioned electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 708 includes a front-facing camera and / or a rear-facing camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0182] Audio component 710 is configured to output and / or input audio signals. For example, audio component 710 includes a microphone (MIC) configured to receive external audio signals when electronic device 700 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 704 or transmitted via communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.

[0183] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0184] Sensor assembly 714 includes one or more sensors for providing state assessments of various aspects of electronic device 700. For example, sensor assembly 714 can detect the on / off state of electronic device 700, the relative positioning of components such as the display and keypad of electronic device 700, changes in position of electronic device 700 or one of its components, the presence or absence of user contact with electronic device 700, orientation or acceleration / deceleration of electronic device 700, and temperature changes of electronic device 700. Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 714 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0185] Communication component 716 is configured to facilitate wired or wireless communication between electronic device 700 and other devices. Electronic device 700 can access wireless networks based on communication standards, such as WiFi, 4G or 5G, 4G LTE, 5G NR, or combinations thereof. In one exemplary embodiment, communication component 716 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the aforementioned communication component 716 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0186] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0187] In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, such as a memory 704 including instructions, which, when executed by a processor 720 of an electronic device 700, enables the electronic device 700 to perform a sub-pixel position determination method, including:

[0188] The original image is preprocessed to obtain the first candidate image.

[0189] On the original image, a first candidate position corresponding to a sub-pixel point obtained based on at least two feature points is determined.

[0190] On the first candidate image, a second candidate position is determined corresponding to a sub-pixel point obtained based on at least two feature points.

[0191] When the stability condition of sub-pixel position stability is met between the first candidate position and the second candidate position, the second candidate position is determined as the target position of the sub-pixel corresponding to the at least two feature points.

[0192] Alternatively, the electronic device 700 may perform an image processing method, including:

[0193] Obtain the original image to be processed, and the processing requirements for the original image.

[0194] When the accuracy value set in the processing requirements is higher than the preset accuracy value, the target position of at least one sub-pixel point on the original image is determined based on the feature points in the original image.

[0195] Based on the location of the feature points and the target location of the at least one sub-pixel point, the original image is processed to obtain the target image, so that the accuracy of the image processing meets the processing requirements; wherein, the image processing includes: image sharpness adjustment and image calibration.

[0196] The step of determining the target location of at least one sub-pixel point in the original image based on feature points in the original image includes:

[0197] The target position is determined by using any of the sub-pixel position determination methods described above.

[0198] The non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0199] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0200] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for determining the position of a sub-pixel, characterized in that, The method is performed by an electronic device and includes: The original image is preprocessed to obtain the first candidate image; On the original image, identify at least two regions containing at least two feature points; Based on the region information and edge information of each of the at least two regions, the comprehensive information of each region is determined; the edge information is a border formed by connecting the pixels of the contour of the region where the feature point is located in sequence; Based on the comprehensive information of each region, an interpolation algorithm is used to determine the first candidate location; On the first candidate image, determine the second candidate position corresponding to the sub-pixel point obtained based on at least two feature points; When the stability condition of sub-pixel position stability is met between the first candidate position and the second candidate position, the second candidate position is determined as the target position of the sub-pixel corresponding to the at least two feature points.

2. The method according to claim 1, characterized in that, The method further includes: When the stability condition is not met between the first candidate position and the second candidate position, the original image is preprocessed again to obtain a second candidate image that is different from the first candidate image. On the second candidate image, determine the third candidate position corresponding to the sub-pixel point obtained based on at least two feature points; When the stability condition is met between the second and third candidate positions, the third candidate position is determined as the target position. When the stability condition is not met between the second candidate position and the third candidate position, the second candidate image is used as the updated first candidate image, and the process returns to the step of preprocessing the original image again to obtain a second candidate image different from the first candidate image, until the stability condition is met between the candidate positions of two adjacent determined sub-pixel points.

3. The method according to claim 1, characterized in that, The determination of comprehensive information for each region based on the regional information and edge information of each of the at least two regions includes: Determine the region parameter values ​​used to characterize the region information of each region, and the edge parameter values ​​used to characterize the edge information of each region; Based on the region weight value corresponding to the region information, the edge weight value corresponding to the edge information, the region parameter value, and the edge parameter value, a comprehensive parameter value is determined to characterize the comprehensive information of each region.

4. The method according to claim 3, characterized in that, The process of determining the first candidate location based on the comprehensive information of each region using an interpolation algorithm includes: For each of the at least two regions, determine the weight ratio of the comprehensive parameter value corresponding to that region relative to the comprehensive parameter values ​​corresponding to the other regions; Calculate the product between the weight ratio and the position of the center point of the region on the original image; Based on the product corresponding to each region, the first candidate position is determined by an interpolation algorithm.

5. The method according to claim 3, characterized in that, The stability condition includes at least one of the following: The distance between two adjacent candidate positions of sub-pixels is less than or equal to a preset distance threshold. The difference between the comprehensive parameter values ​​of the same region determined in two adjacent determinations is less than or equal to a preset difference threshold.

6. An image processing method, characterized in that, The method includes: Obtain the original image to be processed, and the processing requirements for the original image; When the precision value set in the processing requirements is higher than the preset precision value, the target position of at least one sub-pixel point on the original image is determined based on the feature points in the original image. Based on the location of the feature points and the target location of the at least one sub-pixel point, the original image is processed to obtain the target image, so that the accuracy of the image processing meets the processing requirements; wherein, the image processing includes: image sharpness adjustment and image calibration; The step of determining the target location of at least one sub-pixel point in the original image based on feature points in the original image includes: The target location is determined by using the method described in any one of claims 1-5.

7. A sub-pixel position determination device, characterized in that, The device is operated by an electronic device and includes: The first processing module is used to preprocess the original image to obtain the first candidate image; The first determining module is configured to: determine at least two regions containing at least two feature points on the original image; determine comprehensive information for each region based on the region information and edge information of each region in the at least two regions; the edge information is a border formed by sequentially connecting the pixels of the contour of the region where the feature points are located; and determine a first candidate position based on the comprehensive information of each region through an interpolation algorithm. The second determining module is used to determine, on the first candidate image, a second candidate position corresponding to a sub-pixel point obtained based on at least two feature points; The third determining module is used to determine the second candidate position as the target position of the sub-pixel point corresponding to the at least two feature points when the stability condition of sub-pixel point position stability is met between the first candidate position and the second candidate position.

8. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to implement the steps of the method according to any one of claims 1 to 6 by running the executable instructions.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Fitting centroid sub-pixel positioning method based on correlation method threshold iteration

    CN114565564A