Optical center determination method and device, electronic equipment and medium

By connecting edge points in the camera image to determine reference lines and reference points, and using the grayscale ratio to calculate the optical center position, the problem of large computational load in optical center determination in high-pixel scenes is solved, and fast and accurate optical center positioning is achieved.

CN115690191BActive Publication Date: 2025-11-21ZHEJIANG UNIVIEW TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110875409.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-30
Publication Date
2025-11-21
Estimated Expiration
2041-07-30

AI Technical Summary

Technical Problem

Existing technologies require a large amount of computation to determine the optical center position of a camera, especially in high-pixel scenes where the data processing burden is severe, affecting image quality.

Method used

By connecting the edge points with the greatest distance in the target image, a reference line is determined, and reference points with gray values ​​and gray peak values ​​in a preset ratio are found on the reference line. The optical center position is calculated using these points and their auxiliary points.

Benefits of technology

It reduces the data processing burden and enables the optical center position to be determined quickly and accurately in high-pixel scenes, thereby improving image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115690191B_ABST
    Figure CN115690191B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a light center determination method and device, electronic equipment and medium. The method comprises: connecting the edge points with the largest distance in a target image to obtain at least one reference line; determining at least two reference points on the reference line, the gray value of which is in a preset proportion to the gray peak value; determining the position information of the light center according to the reference points and the auxiliary points with the same gray value as the reference points. The technical solution of the present application overcomes the problem of large amount of calculation in the process of determining the light center position in the prior art, and can obtain the corresponding light center position by calculating less data, thereby effectively reducing the data processing burden. For the current scene with more and more pixel points, this scheme can more quickly and accurately determine the light center position.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of computer vision, and particularly relate to a light center determination method and device, electronic equipment and medium. BACKGROUND

[0002] When a camera is imaging, the intersection of the optical axis of the camera lens and the photosensitive plane of the sensor is the light center of the camera lens. In the process of using a conventional camera, the light center of the lens is generally located at the center of the image. If the position of the light center of the camera lens is greatly deviated, the imaging quality of the camera will be directly affected. Therefore, accurately solving the position of the light center of the camera is a necessary prerequisite for adjusting the light center to be located at the center of the image.

[0003] The prior art first uses a camera to shoot a uniform white light panel to obtain a light intensity distribution map, then converts the light intensity distribution map into a gray scale map, and performs binary processing on the gray scale values on the gray scale map (assigning 1 to data greater than a certain percentage, and assigning 0 to data less than the certain percentage), and then obtains the light center coordinates through centroid calculation. However, this scheme needs to calculate the gray scale values of the pixel points of the entire image, and the corresponding data processing amount is large. With the increase of the pixel points of the actual scene image, the data processing burden of this scheme will be increased. SUMMARY

[0004] Embodiments of the present application provide a light center determination method, device, electronic equipment and medium, which can quickly determine the position of the light center of the camera module with a small amount of calculation.

[0005] In a first aspect, the embodiments of the present application provide a light center determination method, which comprises:

[0006] connecting the edge points farthest apart in the target image to obtain at least one reference line;

[0007] determining at least two reference points on the reference line, the gray scale values of which are in a preset proportion to the gray scale peak value; wherein the gray scale peak value is the maximum value among the gray scale values of the pixel points on the reference line;

[0008] determining the position information of the light center according to the auxiliary points whose gray scale values are consistent with the gray scale values of the reference points, and the reference points.

[0009] In a second aspect, the embodiments of the present application provide a light center determination device, which comprises:

[0010] a reference line obtaining module, configured to connect the edge points farthest apart in the target image to obtain at least one reference line;

[0011] a reference point determining module, configured to determine at least two reference points on the reference line, the gray scale values of which are in a preset proportion to the gray scale peak value; wherein the gray scale peak value is the maximum value among the gray scale values of the pixel points on the reference line;

[0012] The optical center position information determination module is configured to determine position information of the optical center according to the auxiliary point with the same gray value as the reference point gray value and the reference point.

[0013] In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable by the processor, and the processor implements the optical center determination method according to the embodiments of the present application when executing the computer program.

[0014] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program executable by a processor, and the processor implements the optical center determination method according to the embodiments of the present application when executing the computer program.

[0015] The present embodiment determines the optical center position of the camera module by the following method: connecting the edge points with the largest distance in the target image to obtain at least one reference line; determining at least two reference points on the reference line with a preset proportion of the gray value and the gray peak value; and determining the position information of the optical center according to the auxiliary point with the same gray value as the reference point gray value and the reference point. The optical center calculation scheme provided by the present embodiment does not need to calculate all the pixel points, but only needs to calculate less data to determine the optical center position, thereby effectively reducing the data processing burden. For the current scene with more and more pixel points, this scheme can more quickly and accurately determine the optical center position. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 is a flowchart of the optical center determination method provided by an embodiment of the present application;

[0017] Figure 2 is a reference line determination schematic diagram provided by an embodiment of the present application;

[0018] Figure 3 is a reference point determination schematic diagram provided by an embodiment of the present application;

[0019] Figure 4 is a flowchart of the optical center determination method provided by another embodiment of the present application;

[0020] Figure 5 is an auxiliary point determination schematic diagram provided by another embodiment of the present application;

[0021] Figure 6 is a midpoint determination schematic diagram provided by another embodiment of the present application;

[0022] Figure 7 is an auxiliary line determination schematic diagram provided by another embodiment of the present application;

[0023] Figure 8is a reference line determination schematic diagram provided by another embodiment of the present application;

[0024] Figure 9 is a reference point determination schematic diagram provided by another embodiment of the present application;

[0025] Figure 10 is an auxiliary point determination schematic diagram provided by another embodiment of the present application;

[0026] Figure 11 is a midpoint determination schematic diagram provided by another embodiment of the present application;

[0027] Figure 12 is an auxiliary line determination schematic diagram provided by another embodiment of the present application;

[0028] Figure 13 is a structural block diagram of an optical center determination apparatus provided by an embodiment of the present application;

[0029] Figure 14 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0030] The present application will be further described in the embodiments in combination with the drawings and examples. It can be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, only the parts related to the present application are shown in the drawings, but not all the structures.

[0031] Figure 1 is a flowchart of an optical center determination method provided by an embodiment of the present application, which can be applied to the scene of determining the optical center position of a module. The method can be executed by the optical center determination apparatus provided by the embodiment of the present application, which can be realized by software and / or hardware, and can be integrated in an electronic device.

[0032] As shown in Figure 1 , the optical center determination method provided by the embodiment of the present application can include the following steps:

[0033] S110, connecting the edge points with the largest distance in the target image to obtain at least one reference line.

[0034] Wherein, the target image can be a gray image obtained by converting the image obtained by shooting a uniform white light lamp panel through a lens module. The image shape can be rectangular, circular or elliptical, etc.

[0035] In the embodiment of the present application, the edge points farthest apart in the target image are connected, for example, if the target image is a rectangle, the edge points farthest apart in the target image are the two opposite corners, and the diagonal line obtained by connecting at least one pair of opposite corners is the reference line; if the target image is a circle, the edge points farthest apart in the target image are the two end points of the diameter passing through the center of the circle, and the line on which at least one diameter of the circle lies is the reference line.

[0036] Figure 2 is a schematic diagram of determining a reference line provided by an embodiment of the present application, and one reference line is taken as an example in the diagram. Figure 2 The image shown in the diagram is a target image, and the target image is a rectangle. The target image has one reference line, that is, one diagonal line of the rectangle.

[0037] In S120, at least two reference points on the reference line are determined, the gray scale values of which are in a preset proportion to the gray scale peak value. The gray scale peak value is the maximum value among the gray scale values of the pixel points on the reference line.

[0038] In the embodiment of the present application, the gray scale peak value on the reference line is the maximum value among the gray scale values corresponding to the pixel points on the reference line. Generally, the range of the gray scale value is 0-255, and the color in the gray scale image is from black to white, and the position of the light center should be the whitest, so the gray scale value corresponding to the pixel point closer to the position of the light center on the reference line is larger, and the gray scale value of the pixel point farther away from the position of the light center on the reference line is smaller.

[0039] In the embodiment of the present application, the preset proportion can be set according to experience or calculated according to the actual distribution of the gray scale values on the reference line.

[0040] Since the gray scale values of the at least two reference points are the same and are in a preset proportion to the gray scale peak value, the at least two reference points are on one gray scale contour line.

[0041] For example, Figure 3 is a schematic diagram of determining a reference point provided by an embodiment of the present application, as shown in Figure 3 , the curve in Figure 3 is Figure 2 The distribution of the gray scale values corresponding to the pixel points on the reference line in Figure 2 The reference points on the reference line in

[0042] It can be understood that the smaller the preset ratio setting is, the greater the difference between the gray values of the at least two reference points on the reference line and the gray peak value is, and the farther the distance between the at least two reference points and the point where the gray peak value is located is; on the contrary, the greater the preset ratio setting is, the smaller the difference between the gray values of the at least two reference points on the reference line and the gray peak value is, and the closer the distance between the at least two reference points and the point where the gray peak value is located is.

[0043] In the embodiment of the application, the determination process of the preset ratio comprises:

[0044] determining a first difference value between the gray peak value and the gray value of the target end point on the reference line; wherein the target end point is the end point with a larger gray value among the two end points of the reference line;

[0045] determining a product value of the first difference value and a preset coefficient, and determining a second difference value between the gray peak value and the product value; wherein the preset coefficient has a value range of (0, 1);

[0046] taking the ratio of the second difference value and the gray peak value as the preset ratio.

[0047] The target end point on the reference line refers to the point with the maximum gray value corresponding to the pixel points at the two end points of the reference line.

[0048] For example, the preset ratio can be expressed by the following formula:

[0049] Preset ratio = (S max (x,y)-(S max (x,y)-MAX(S(1,1),S(x,y))) / N) / S max (x,y)

[0050] wherein S(1,1) is the gray value of the pixel point at one end point of the reference line, S(x,y) is the gray value of the pixel point at the other end point of the reference line, S max (x,y) is the gray peak value on the reference line, and 1 / N is the preset coefficient.

[0051] It can be understood that if S(1,1)>S(x,y), the end point corresponding to S(1,1) is the target end point; if S(1,1)<S(x,y), the end point corresponding to S(x,y) is the target end point; if S(1,1)=S(x,y), the end point corresponding to S(1,1) or S(x,y) can be the target end point.

[0052] In the above formula, S max (x,y)-MAX(S(1,1),S(x,y)) is the first difference value; (S max(x, y) - MAX(S(1, 1), S(x, y))) / N is a product value; S max (x, y) - MAX(S(1, 1), S(x, y))) / N is a product value; S max (x, y) - MAX(S(1, 1), S(x, y))) / N is a second difference value. In the embodiment of the present application, the target gray value is obtained according to the gray peak value and the preset ratio, and at least two reference points with the same target gray value are determined from the reference line.

[0053] In the embodiment of the present application, N is a number greater than 1, for example, 2, 3, 5 / 4, etc. The value of N can determine the position of the reference point in the target image. If N is too large, the reference point is close to the edge of the image. If N is too small, the reference points are close to each other. Neither of them is the best position to determine the optical center. Therefore, the value of N can be adaptively determined according to the gray distribution on the reference line, so that the reference points are located at appropriate positions in the target image. For example, as shown in the reference point, the value of N is selected as 2. Figure 2

[0054] In the embodiment of the present application, at least two reference points on the reference line with the gray value in the preset ratio with the gray peak value are determined, including:

[0055] The target gray value is determined according to the product of the gray peak value and the preset ratio.

[0056] At least two points on the reference line with the same target gray value are taken as reference points.

[0057] In the embodiment of the present application, the product of the gray peak value and the preset ratio can be directly taken as the target gray value, or the product of the gray peak value and the preset ratio and the product of the preset adjustment coefficient can be taken as the target gray value. The adjustment coefficient can be determined according to the actual situation.

[0058] The above-mentioned scheme has the beneficial effect that at least two reference points are determined according to the gray peak value and the preset ratio, so that the reference points are adaptively determined at appropriate positions in the image, and the points with the same gray value belong to the same gray contour, that is, the points on the concentric circle of the light spot edge where the optical center is located, and then the optical center position is quickly and accurately determined through as few pixel points as possible.

[0059] S130, determining the position information of the optical center according to the auxiliary points with the same gray value as the reference points and the reference points.

[0060] For example, the midpoint of the auxiliary points and the reference points on the connecting line of the auxiliary points and the reference points can be determined, and the midpoints on the connecting line that do not intersect are connected to obtain the intersection position as the optical center position. If there are more than two intersection points, the optical center position information can be determined through the midpoint between the intersection points and other schemes.

[0061] ​The embodiment determines the optical center position of the camera module by the following method: connecting the edge points with the largest distance in the target image to obtain at least one reference line; determining at least two reference points on the reference line with a preset proportion of the gray value and the gray peak value; and determining the position information of the optical center according to the auxiliary points with the same gray value as the reference points and the reference points. The optical center calculation scheme provided in the embodiment does not need to calculate all the pixel points, but only needs to calculate less data to determine the optical center position, thereby effectively reducing the data processing burden. For the current scene with more and more pixel points, this scheme can more quickly determine the optical center position. Moreover, since the reference points determined in the scheme are points on the same gray contour line, the light spot where the optical center is located is a concentric circle, and the reference points on the concentric circle can more accurately determine the optical center position.

[0062] Figure 4 The embodiment provided in the application is a flowchart of the optical center determination method, and the embodiment is optimized on the basis of the above-mentioned embodiment. The specific optimization is: determining the position information of the optical center according to the auxiliary points with the same gray value as the reference points and the reference points, including: determining the points with the same gray value as the reference points as auxiliary points in the same horizontal direction as the reference points and in the same vertical direction as the reference points; determining the midpoint of the line between the reference point and the auxiliary point; and determining the position information of the optical center according to the midpoint.

[0063] As Figure 4 shown, the optical center determination method provided in the embodiment of the application can include the following steps:

[0064] S210, connecting the edge points with the largest distance in the target image to obtain at least one reference line.

[0065] S220, determining at least two reference points on the reference line with a preset proportion of the gray value and the gray peak value.

[0066] S230, determining the points with the same gray value as the reference points as auxiliary points in the same horizontal direction as the reference points and in the same vertical direction as the reference points.

[0067] Exemplarily, Figure 5 is a schematic diagram of the auxiliary point determination provided in another embodiment of the application, which takes a reference line as an example. As Figure 5 shown, A 11 is the auxiliary point of the reference point A1 in the same horizontal direction, A 12 is the auxiliary point of the reference point A1 in the same vertical direction, A 11 , A 12 have the same gray value as A1; B 11 is the auxiliary point of the reference point B1 in the same horizontal direction, B12 For the auxiliary point of reference point B1 in the same vertical direction, B 11 , B 12 The gray value is consistent with B1.

[0068] S240, determining the midpoint of the line between the reference point and the auxiliary point.

[0069] In the embodiment of the application, the position of the midpoint of the line between the reference point and the auxiliary point can be determined by establishing a coordinate system. For example, Figure 5 The reference point A1 and its auxiliary point A 11 , A 12 are taken as examples. As shown in Figure 5 , the coordinates of A1 are (x A1 , y A1 ), and the coordinates of A 11 and A 12 are (x A11 , y A11 ) and (x A12 , y A12 ) respectively. Then the coordinates of the midpoint of the line between A1 and A 11 are (x A1 +(x A11 -x A1 ) / 2, y A1 ), and the coordinates of the midpoint of the line between A1 and A 12 are (x A1 , y A12 +(y A1 -y A12 ) / 2). Figure 6 is a midpoint determination schematic diagram provided by another embodiment of the application, Figure 6 A' 11 is Figure 5 The midpoint of the line between the reference point A1 and its auxiliary point A 11 , A' 12 is Figure 5 The midpoint of the line between the reference point A1 and its auxiliary point A 12 , B' 11 is Figure 5 The midpoint of the line between the reference point B1 and its auxiliary point B 11 , B' 12 is Figure 5 The midpoint of the line between the reference point B1 and its auxiliary point B 12 .

[0070] S250, determining the position information of the optical center according to the midpoint.

[0071] In the embodiment of the application, the position information of the optical center is determined according to the midpoint, including:

[0072] Connect the midpoints of the non-intersecting lines to obtain at least two auxiliary lines;

[0073] The location information of the optical center is determined based on the intersection of at least two auxiliary lines.

[0074] Among these, non-intersecting lines are those lines between all reference points and their auxiliary points that do not intersect. For example, Figure 7 This is a schematic diagram illustrating the determination of auxiliary lines according to another embodiment of this application, using a reference line as an example. Figure 7 As shown in the figure, A' 11 A' 12 B' 11 B' 12 A' is the midpoint of the line connecting the reference point and the auxiliary point. As can be seen from the diagram, A' 12 With B' 12 The lines connecting the two points do not intersect, B' 11 With A' 11 The lines connecting the two points do not intersect, so we can place B'. 11 With A' 11 Connect A' 12 With B' 12 Connect the two auxiliary lines to obtain two auxiliary lines. The location of the intersection of these two auxiliary lines is the location of the optical center.

[0075] In this embodiment of the application, the position information of the optical center is determined based on auxiliary points whose gray values ​​match those of the reference point, and the reference point, including:

[0076] If the light spot where the optical center is located is circular, the position information of the optical center is determined according to the perpendicular bisector of the line connecting the reference point and the auxiliary point.

[0077] Here, the light spot is the shape of the fitted graphic formed by connecting the reference point and the auxiliary point. If the light spot shape is circular, the location of the intersection of the perpendicular bisectors of the lines connecting the reference point and the auxiliary point is the position information of the optical center.

[0078] This embodiment determines the position of the optical center of the camera module using the following method: Points with the same grayscale value as the reference point are identified in the same horizontal direction and in the same vertical direction as the reference point, serving as auxiliary points; the midpoint of the line connecting the reference point and the auxiliary points is determined; and the position information of the optical center is determined based on the midpoint. The optical center calculation scheme provided in this embodiment does not require calculation of all pixels; it only needs to calculate a smaller amount of data to obtain the corresponding optical center position, thus effectively reducing the data processing burden. For scenarios with an increasing number of pixels in the current image, this scheme can determine the optical center position more quickly.

[0079] The application further provides a light center determination method. The application illustrates the light center determination method by taking two reference lines as an example. The method is applicable to the case that the light spot where the light center is located is close to the edge of the target image or the light spot where the light center is located is located on one side of a reference line. Figure 8 is a reference line determination schematic diagram provided by another embodiment of the application, Figure 9 is a reference point determination schematic diagram provided by another embodiment of the application, Figure 8 and Figure 9 both take two reference lines as an example.

[0080] Figure 8 The image shown is a target image, and the shape of the target image is a rectangle. The reference lines in the target image are two, that is, two diagonal lines of the rectangle. S1 is a set of gray values of pixel points on one reference line, and S2 is a set of gray values of pixel points on the other reference line. Figure 9 In the figure, A1 and B1 are reference points on one reference line, and C1 and D1 are reference points on the other reference line. The gray values at A1 and B1 are in a preset proportion to the gray peak value on the reference line where A1 and B1 are located, and the gray values at C1 and D1 are in a preset proportion to the gray peak value on the reference line where C1 and D1 are located.

[0081] Figure 10 is an auxiliary point determination schematic diagram provided by another embodiment of the application, which takes two reference lines as an example. As shown in Figure 10 , A 11 is an auxiliary point of reference point A1 in the same horizontal direction, A 12 is an auxiliary point of reference point A1 in the same vertical direction, A 11 , A 12 have the same gray value as A1; B 11 is an auxiliary point of reference point B1 in the same horizontal direction, B 12 is an auxiliary point of reference point B1 in the same vertical direction, B 11 , B 12 have the same gray value as B1; C 11 is an auxiliary point of reference point C1 in the same horizontal direction, C 12 is an auxiliary point of reference point C1 in the same vertical direction, C 11 , C 12 have the same gray value as C1; D 11 is an auxiliary point of reference point D1 in the same horizontal direction, D 12 is an auxiliary point of reference point D1 in the same vertical direction, D 11 , D 12 have the same gray value as D1.

[0082] Figure 10 In the figure, point A1 and point C12 Points D1 and B coincide. 12 Point C1 coincides with point A. 12 Points B1 and D coincide. 12 coincide.

[0083] Figure 11 This is a schematic diagram of midpoint determination provided in another embodiment of this application. Figure 12 This is a schematic diagram of auxiliary line determination provided in another embodiment of this application. Figure 11 , Figure 12 Let's take two reference lines as an example. Figure 11 As shown in the figure, A' 11 A' 12 B' 11 B' 12 C' 11 C' 12 D' 11 D' 12 C' is the midpoint of the line connecting the reference point and the auxiliary point. As can be seen from the diagram, C' 11 With B' 12 The lines connecting the two points do not intersect, B' 11 With A' 11 The lines connecting the two points do not intersect, and so on. Connecting the midpoints of these non-intersecting lines yields at least two auxiliary lines, such as... Figure 12 As shown, Figure 12 The position of point O is the intersection of at least two auxiliary lines, which is the position of the optical center.

[0084] In this embodiment of the application, there are at least four auxiliary lines;

[0085] Accordingly, the position information of the optical center is determined based on the intersection of at least two auxiliary lines, including:

[0086] If at least two of the four auxiliary lines intersect, the position information of the optical center is determined based on the average value of the at least two intersection points.

[0087] The average of at least two intersection points can be the average of the position coordinates of at least two intersection points. For example, if there are intersection points A(x1, y1) and B(x2, y2), then the average coordinates of A and B are ((x1+x2) / 2, (y1+y2) / 2), which is the position information of the optical center.

[0088] The solution in this application embodiment can accurately obtain pixels with a large gray-scale distribution range by using at least two reference lines when the light spot is located in a relatively off-center area of ​​the target image. This allows for more accurate determination of the reference point located on the gray-scale contour line, thereby improving the accuracy of optical center determination.

[0089] Figure 13 is a structure block diagram of an optical center determination device provided in an embodiment of the present application. The device can perform the optical center determination method provided in any embodiment of the present application, and has the corresponding function modules and beneficial effects of performing the method. As shown in the figure, the device can include: Figure 13

[0090] The reference line obtaining module 310 is configured to connect the edge points with the largest distance in the target image to obtain at least one reference line.

[0091] The reference point determining module 320 is configured to determine at least two reference points on the reference line with a preset proportion of a gray value and a gray peak value, wherein the gray peak value is a maximum value in the gray values of the pixel points on the reference line.

[0092] The optical center position information determining module 330 is configured to determine the position information of the optical center according to an auxiliary point with the same gray value as that of the reference point and the reference point.

[0093] In the embodiment of the present application, the reference point determining module 320 includes:

[0094] The target gray value determining unit is configured to determine a target gray value according to the product of the gray peak value and the preset proportion.

[0095] The reference point determining unit takes at least two points on the reference line with the same gray value as the target gray value as the reference points.

[0096] In the embodiment of the present application, the device further includes a preset proportion determining module configured to determine the preset proportion, and the preset proportion determining module includes:

[0097] The first difference determining unit is configured to determine a first difference value of the gray peak value and a gray value of a target end point on the reference line, wherein the target end point is an end point with a larger gray value in the two end points of the reference line.

[0098] The second difference determining unit is configured to determine a product value of the first difference value and a preset coefficient, and determine a second difference value of the gray peak value and the product value, wherein the preset coefficient has a value range of (0, 1).

[0099] The ratio determining unit takes the ratio of the second difference value and the gray peak value as the preset proportion.

[0100] In the embodiment of the present application, the optical center position information determining module 330 includes:

[0101] The auxiliary point determining unit is configured to determine a point with the same gray value as that of the reference point as an auxiliary point in the same horizontal direction as the reference point and in the same vertical direction as the reference point. ​

[0102] The midpoint determination unit is used to determine the midpoint of the line connecting the reference point and the auxiliary point.

[0103] The optical center position information determination unit is used to determine the position information of the optical center based on the midpoint.

[0104] In this embodiment of the application, the optical center position information determination unit is specifically used for:

[0105] Connect the midpoints of the non-intersecting lines to obtain at least two auxiliary lines;

[0106] The location information of the optical center is determined based on the intersection of at least two auxiliary lines.

[0107] In this embodiment of the application, there are at least four auxiliary lines;

[0108] In this embodiment of the application, the optical center position information determination unit is specifically used for:

[0109] If at least two of the four auxiliary lines intersect, the position information of the optical center is determined based on the average value of the at least two intersection points.

[0110] In this embodiment of the application, the optical center position information determination module 330 is specifically used for:

[0111] If the light spot where the optical center is located is circular, the position information of the optical center is determined according to the perpendicular bisector of the line connecting the reference point and the auxiliary point.

[0112] The above-mentioned products can perform the image display method provided in the embodiments of this application, and have the corresponding functional modules and beneficial effects of performing the method.

[0113] Figure 14 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Figure 14 A block diagram is shown that is suitable for implementing an exemplary electronic device 412 according to embodiments of this application. Figure 14 The electronic device 412 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0114] like Figure 14 As shown, the electronic device 412 may include: one or more processors 416; and a memory 428 for storing one or more programs, which, when executed by the one or more processors 416, cause the one or more processors 416 to implement the optical center determination method provided in the embodiments of this application, including:

[0115] Connect the edge points with the largest distance in the target image to obtain at least one reference line;

[0116] At least two reference points on the reference line, at which the gray scale values are in a preset proportion to the gray scale peak value; wherein the gray scale peak value is the maximum value among the gray scale values of the pixel points on the reference line;

[0117] According to the auxiliary point with the same gray scale value as the reference point and the reference point, the position information of the optical center is determined.

[0118] The components of electronic device 412 can include, but are not limited to, one or more processors 416, memory 428, and a bus 418 that connects the various device components, including the memory 428 and the processor 416.

[0119] Bus 418 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics accelerator bus, a processor or local bus using any of a variety of bus architectures including an industry standard architecture (ISA), micro-channel architecture (MAC), peripheral component interconnect (PCI), video electronics standards group (VESA), and expandable bus architecture (EBA). In one embodiment, the architectural framework is provided by an Intel® Itanium® 2 processor.

[0120] Electronic device 412 typically includes a variety of computer device readable media. Such media can be any available media that is localized or remote to electronic device 412, and includes both volatile and nonvolatile media, removable and non-removable media.

[0121] Memory 428 can include computer device readable media in the form of volatile memory, such as random access memory (RAM) 430 and / or cache memory 432. Electronic device 412 can further include other removable / non-removable, volatile / non-volatile computer device storage media. By way of example only, storage system 434 can be provided for reading from and writing to a non-removable, non-volatile magnetic media (not shown and typically called a "hard drive"). Figure 14 Although not shown, a magnetic hard disk drive can also be used for reading from and writing to non-removable, non-volatile magnetic media (e.g., a "hard drive"). Although not shown, a magnetic hard disk drive can also be used for reading from and writing to a removable, non-volatile magnetic medium (e.g., a "floppy disk"). Figure 14 Although not shown, a magnetic hard disk drive can also be used for reading from and writing to non-removable, non-volatile magnetic media (e.g., a "hard drive"). Although not shown, a magnetic hard disk drive can also be used for reading from and writing to a removable, non-volatile magnetic medium (e.g., a "floppy disk").

[0122] Program / utility 440 having a set of program modules 442 can be stored in memory 428 by way of example, and not limitation, as well as an operating system, one or more application programs, other program modules, and program data, each or some combination thereof, can include implementation of the network environment in each or some combination of the above examples. Program modules 442 generally carry out the functions and / or methodologies of embodiments of the application described herein.

[0123] Electronic device 412 can also communicate with one or more external devices 414 and / or with display 424, etc. This communication can be facilitated by input / output (I / O) interface(s) 422. Still yet, electronic device 412 can communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or the Internet, through network adapter 420. As Figure 14 illustrated, network adapter 420 can be communicatively coupled to bus 418 via an application specific integrated circuit (ASIC) 424. It should be appreciated that other components (not shown) such as security applications, encoder / decoders (CODECs), modems, etc. can be utilized. Figure 14 It is to be appreciated that, although not shown explicitly in FIG. 4, other hardware and / or software components could be used in conjunction with electronic device 412. These components, which would be well known in the art, include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID devices, tape drives, and data archival storage devices, etc.

[0124] Processor 416 can execute instructions, for example, to implement a method of determining a principal point, stored in memory 428. In this regard, the term "executable" as may

[0125] Embodiment five of the present application provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to execute a method of determining a principal point, comprising:

[0126] Connecting the edge points with the largest distance in the target image to obtain at least one reference line;

[0127] Determining at least two reference points on the reference line, the gray value of which is in a preset proportion to a gray peak value; wherein the gray peak value is a maximum value among the gray values of the pixel points on the reference line;

[0128] Determining the position information of the principal point according to the auxiliary points with the same gray value as the reference points and the reference points.

[0129] The computer storage medium of the embodiments of the present application can adopt any combination of one or more computer-readable storage media. The computer-readable storage medium can be a computer-readable signal storage medium or a computer-readable storage medium. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, apparatus, or instrument, or any combination thereof. More specific examples (non-exhaustive list) of the computer-readable storage medium include: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiments of the present application, the computer-readable storage medium can be any tangible storage medium containing or storing a program that can be used by or in conjunction with an instruction execution device, apparatus, or instrument.

[0130] The computer-readable signal storage medium can include a data signal propagated in a baseband or as a part of a carrier wave, in which a computer-readable program code is borne. Such a propagated data signal can take on various forms including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer-readable signal storage medium can also be any computer-readable storage medium that can send, propagate, or transfer a program for use by or in connection with an instruction execution device, apparatus, or instrument.

[0131] The program code contained on the computer-readable storage medium can be transmitted using any suitable storage medium, including, but not limited to, wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.

[0132] The computer program code for carrying out operations of the present application can be written in one or more programming languages or combinations of languages including an object-oriented, such as Java, Smalltalk, C++, or conventional procedural, such as the "C" language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or device. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0133] Note that the above merely describes preferred embodiments of the application and the principles of the technology applied. Those skilled in the art will understand that the application is not limited to the specific embodiments described herein, and that various obvious changes, modifications and substitutions can be made to the application without departing from the scope of the application. Therefore, although the application has been described in detail by the above embodiments, the application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the application, and the scope of the application is determined by the appended claims.

Claims

1. A method for determining the optical center, characterized in that, The method comprises: connecting edge points farthest apart in a target image to obtain at least one reference line; determining at least two reference points on the reference line whose gray values are in a preset proportion to a gray peak value, wherein the gray peak value is a maximum value among the gray values of the pixels on the reference line; determining position information of a light center according to an auxiliary point whose gray value is consistent with the gray value of the reference point and the reference point; The method comprises: determining a point whose gray value is consistent with that of the reference point as an auxiliary point in the same horizontal direction and the same vertical direction as the reference point; determining a midpoint of a line connecting the reference point and the auxiliary point; determining the position information of the light center according to the midpoint.

2. The method of claim 1, wherein, The method comprises: determining a target gray value according to the product of the gray peak value and the preset proportion; determining at least two points on the reference line whose gray values are consistent with the target gray value as the reference points.

3. The method of claim 1, wherein, The method comprises: determining a first difference value between the gray peak value and the gray value of a target endpoint on the reference line, wherein the target endpoint is the endpoint with the larger gray value among the two endpoints of the reference line; determining a product value of the first difference value and a preset coefficient, and determining a second difference value between the gray peak value and the product value, wherein the preset coefficient is in the range of (0, 1); determining the preset proportion as the ratio of the second difference value to the gray peak value.

4. The method of claim 1, wherein, The method comprises: connecting the midpoints determined by the non-intersecting lines to obtain at least two auxiliary lines; determining the position information of the light center according to the intersection point of the at least two auxiliary lines.

5. The method of claim 4, wherein, The auxiliary lines are at least four. Correspondingly, the method comprises: if the intersection point of the at least four auxiliary lines is at least two, determining the position information of the light center according to the average value of the at least two intersection points.

6. The method of claim 1, wherein, The method comprises: if the light spot where the light center is located is circular, determining the position information of the light center according to the perpendicular bisector of the line connecting the reference point and the auxiliary point.

7. An optical center determination apparatus characterized by comprising: The device comprises: a reference line obtaining module configured to connect edge points farthest apart in a target image to obtain at least one reference line; a reference point determining module configured to determine at least two reference points on the reference line whose gray values are in a preset proportion to a gray peak value, wherein the gray peak value is a maximum value among the gray values of the pixels on the reference line; a light center position information determining module configured to determine position information of a light center according to an auxiliary point whose gray value is consistent with the gray value of the reference point and the reference point; The light center position information determining module comprises: an auxiliary point determining unit configured to determine a point whose gray value is consistent with that of the reference point as an auxiliary point in the same horizontal direction and the same vertical direction as the reference point; a midpoint determining unit configured to determine a midpoint of a line connecting the reference point and the auxiliary point; A light center position information determining unit is configured to determine position information of a light center according to the midpoint.

8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the light center determination method in any one of claims 1-6.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the light center determination method in any one of claims 1-6.

Citation Information

Patent Citations

  • Method and device for detecting lens center

    CN106839976A

  • Optical center detection method and detection device and correction method

    CN108318224A