A zoom curve fitting method, device, storage medium and electronic equipment

By acquiring the sampling set of equally spaced distributions and constructing the conversion formula of the zoom curve, the time-consuming and labor-intensive fitting of the zoom curve in high-magnification lenses are solved, the accuracy and fitting efficiency of the zoom curve are improved, and the high quality of the image acquisition equipment is ensured. Focus effect.

CN118938432BActive Publication Date: 2024-12-20CHENGDU POWER VIEW SCIENCE & TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411427794.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2024-12-20
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

The prior art is time-consuming and labor-intensive to fit the zoom curve in high-magnification lenses, and has low accuracy, which leads to the image acquisition device being easily blurred during the zoom process, with large errors, making it difficult to meet the high requirements of users for image quality.

Method used

By obtaining the sampling set of equally spaced distributions, determine the target fixed parameters and object distance parameter formulas of the zoom curve, construct the conversion formula of the target variable motor coordinates and the zoom motor coordinates, and reversely calculate the target object distance, so as to guide focus when the target object distance is used. , improve the accuracy and fitting efficiency of the zoom curve.

Benefits of technology

On the basis of limited object distance sampling, the accuracy of the zoom curve is improved, the fitting time is shortened, the focus efficiency of the image acquisition device is improved, the sampling time is reduced, and the image quality is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118938432B_ABST
    Figure CN118938432B_ABST
Patent Text Reader

Abstract

The present invention proposes a zoom curve fitting method, device, storage medium and electronic device, which obtains the i-th sampling set corresponding to the i-th object distance; determines the target fixed parameters and object distance parameter formula of the zoom curve based on the i-th sampling set; constructs the object distance and zoom motor coordinate conversion formula corresponding to the target variable magnification motor coordinates based on the target fixed parameters and the object distance parameter formula; determines the target object distance based on the zoom motor estimated coordinates and the object distance and zoom motor coordinate conversion formula corresponding to the target variable magnification motor coordinates; constructs the target zoom curve corresponding to the target object distance based on the object distance parameter formula, the target fixed parameters and the target object distance, and the target zoom curve is used to guide focusing when at the target object distance. On the basis of limited object distance sampling, the target object distance can be inversely calculated to obtain the corresponding target zoom curve, which greatly reduces the sampling time and improves the fitting efficiency while ensuring the accuracy of the target zoom curve.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of images, and in particular to a zoom curve fitting method, device, storage medium and electronic equipment. Background Art

[0002] With the development of high-definition video, image processing, video surveillance and other technologies, users have higher and higher requirements for image quality and lens magnification. In the process of image acquisition, it is necessary to guide the focus based on the zoom curve (also known as AF curve or focus curve). The accuracy of the zoom curve directly affects the image clarity. If the accuracy of the zoom curve is too low, it will lead to large errors and affect the image quality. Therefore, it is necessary to ensure the accuracy of the zoom curve.

[0003] As the lens magnification increases, the fitting of the zoom curve becomes very difficult, which makes the fitting of the zoom curve time-consuming and laborious, and the fitting accuracy is low. The error of the zoom curve is large, which in turn causes the image to be blurred during the zooming process of the image acquisition device. Summary of the invention

[0004] The object of the present invention is to provide a zoom curve fitting method, device, storage medium and electronic device to at least partially improve the above-mentioned problem.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0006] In a first aspect, the present invention provides a zoom curve fitting method, the method comprising:

[0007] Obtaining an i-th sampling set corresponding to an i-th object distance, wherein the sampling set includes J sampling points, the sampling points include a zoom motor coordinate and a corresponding zoom motor coordinate, and the J zoom motor coordinates are evenly spaced, 1≤i≤I, I≥3;

[0008] Determining a target fixed parameter of a zoom curve and an object distance parameter formula based on the i-th sampling set, wherein the object distance parameter formula is a conversion formula between the object distance and an object distance associated parameter in the zoom curve;

[0009] Constructing a conversion formula between the object distance and the zoom motor coordinates corresponding to the target zoom motor coordinates based on the target fixed parameters and the object distance parameter formula;

[0010] Determine the target object distance based on the estimated zoom motor coordinates corresponding to the target zoom motor coordinates and the object distance and zoom motor coordinate conversion formula;

[0011] A target zoom curve corresponding to the target object distance is constructed based on the object distance parameter formula, the target fixed parameter and the target object distance, and the target zoom curve is used to guide focusing when the target object distance is reached.

[0012] In a second aspect, the present invention provides a zoom curve fitting device, the device comprising:

[0013] A first processing unit is used to obtain an i-th sampling set corresponding to an i-th object distance, wherein the sampling set includes J sampling points, the sampling points include a zoom motor coordinate and a corresponding zoom motor coordinate, and the J zoom motor coordinates are evenly spaced, 1≤i≤I, I≥3;

[0014] The first processing unit is further used to determine a target fixed parameter and an object distance parameter formula of the zoom curve based on the i-th sampling set, wherein the object distance parameter formula is a conversion formula between the object distance and the object distance associated parameter in the zoom curve;

[0015] The first processing unit is further used to construct an object distance and zoom motor coordinate conversion formula corresponding to the target zoom motor coordinate based on the target fixed parameter and the object distance parameter formula;

[0016] The first processing unit is further used to determine the target object distance based on the estimated zoom motor coordinates corresponding to the target zoom motor coordinates and the object distance and zoom motor coordinate conversion formula;

[0017] The second processing unit is used to construct a target zoom curve corresponding to the target object distance based on the object distance parameter formula, the target fixed parameter and the target object distance, wherein the target zoom curve is used to guide focusing when the target object distance is reached.

[0018] In a third aspect, the present invention provides a storage medium having a computer program stored thereon, which implements the above method when executed by a processor.

[0019] In a fourth aspect, the present invention provides an electronic device, comprising: a processor and a memory, wherein the memory is used to store one or more programs; when the one or more programs are executed by the processor, the above method is implemented.

[0020] Compared with the prior art, the present invention provides a zoom curve fitting method, device, storage medium and electronic device, which obtain the i-th sampling set corresponding to the i-th object distance, wherein the sampling set includes J sampling points, and the sampling points include zoom motor coordinates and corresponding zoom motor coordinates, and the J zoom motor coordinates are evenly spaced, 1≤i≤I, I≥3; based on the i-th sampling set, the target fixed parameters and object distance parameter formula of the zoom curve are determined, wherein the object distance parameter formula is a conversion formula between the object distance and the object distance associated parameters in the zoom curve; based on the target fixed parameters and the object distance parameter formula, a conversion formula between the object distance and the zoom motor coordinates corresponding to the target zoom motor coordinates is constructed; based on the zoom motor estimated coordinates corresponding to the target zoom motor coordinates and the object distance and zoom motor coordinate conversion formula, the target object distance is determined; based on the object distance parameter formula, the target fixed parameters and the target object distance, a target zoom curve corresponding to the target object distance is constructed, and the target zoom curve is used to guide focusing when at the target object distance. On the basis of limited object distance sampling, the target object distance can be inversely calculated to obtain the corresponding target zoom curve. Under the premise of ensuring the accuracy of the target zoom curve, the sampling time is greatly reduced and the fitting efficiency is improved.

[0021] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0024] Figure 2 One of the flowchart diagrams of the zoom curve fitting method provided by an embodiment of the present invention.

[0025] Figure 3 A schematic diagram of a curve corresponding to a sampling set provided in an embodiment of the present invention.

[0026] Figure 4 A schematic diagram of an initial zoom curve provided by an embodiment of the present invention.

[0027] Figure 5 The second flowchart of the zoom curve fitting method provided by the embodiment of the present invention.

[0028] Figure 6The third flowchart of the zoom curve fitting method provided by the embodiment of the present invention.

[0029] Figure 7 A schematic diagram of residual provided by an embodiment of the present invention.

[0030] Figure 8 A schematic diagram of a zoom curve fitting device provided by an embodiment of the present invention.

[0031] In the figure: 10 - processor; 11 - memory; 12 - bus; 13 - communication interface; 201 - first processing unit; 202 - second processing unit. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0033] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0034] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0035] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0036] In the description of the present invention, it should be noted that the terms "upper", "lower", "inside", "outside", etc. indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings, or are directions or positional relationships in which the product of the invention is usually placed when in use. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as a limitation on the present invention.

[0037] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "disposed" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0038] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0039] In an optional implementation, the AF curve fitting algorithm is a linear interpolation method, that is, multiple curves are sampled for the lens, and then linear interpolation is performed on each two curves. Specifically, the total stroke (also known as the total motor step length) of the lens zoom motor (also known as the ZOOM motor) is discretized to obtain J zoom motor coordinates with equal spacing; the zoom motor coordinates corresponding to different object distances (such as 1.5M, 1.8M, 2.5M, 3M, 3.8M, 7M, 10M, 30M and 1000M, etc.) under the j-th zoom motor coordinate are obtained, 1≤j≤J, to obtain the sampling curve corresponding to the j-th zoom motor coordinate, and then the sampling curve corresponding to the j-th zoom motor coordinate is curve fitted based on the linear interpolation method.

[0040] This curve fitting by linear interpolation method consumes a lot of time in collecting the sampling curves corresponding to the coordinates of J zoom motors, and when collecting all the curves, the image acquisition device (such as a camera) cannot be powered off. Once the power is off or one of the curves is disturbed by environmental factors, it will be necessary to restart the curve acquisition; and this method requires the chip to have a relatively large storage capacity. Furthermore, since the AF curve is a nonlinear curve, the error is very large when the linear interpolation method is used, which is particularly evident in lenses with large magnifications (such as 30X or 45X), resulting in the image being easily blurred during the zooming process of the image acquisition device.

[0041] In order to solve the above problems, an embodiment of the present invention provides a zoom curve fitting method, which is applied to the electronic device described below, and can improve the accuracy of the zoom curve, shorten the time of zoom curve fitting, and improve the fitting efficiency.

[0042] An embodiment of the present invention provides an electronic device, which may be a main control unit of an image acquisition device, or an image acquisition device, or a mobile phone, a computer, a server, or other devices connected to the image acquisition device for communication. The image acquisition device in the embodiment of the present invention may be, but is not limited to, a spherical camera with a fixed installation position.

[0043] Please refer to Figure 1 , a schematic diagram of the structure of an electronic device. The electronic device includes a processor 10, a memory 11, and a bus 12. The processor 10 and the memory 11 are connected via the bus 12, and the processor 10 is used to execute an executable module stored in the memory 11, such as a computer program.

[0044] The processor 10 may be an integrated circuit chip having signal processing capabilities. In the implementation process, each step of the zoom curve fitting method may be completed by an integrated logic circuit of hardware in the processor 10 or by instructions in the form of software. The above-mentioned processor 10 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, or discrete hardware components.

[0045] The memory 11 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.

[0046] The bus 12 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. Figure 1Although only one bidirectional arrow is used in the figure, it does not mean that there is only one bus 12 or only one type of bus 12 .

[0047] The memory 11 is used to store programs, such as programs corresponding to the zoom curve fitting device. The zoom curve fitting device includes at least one software function module that can be stored in the memory 11 in the form of software or firmware or fixed in the operating system (OS) of the electronic device. After receiving the execution instruction, the processor 10 executes the program to implement the zoom curve fitting method.

[0048] Possibly, the electronic device provided by the embodiment of the present invention further includes a communication interface 13. The communication interface 13 is connected to the processor 10 via a bus.

[0049] It should be understood that Figure 1 The structure shown is only a schematic diagram of a portion of the electronic device. The electronic device may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0050] A zoom curve fitting method provided by an embodiment of the present invention can be applied to, but is not limited to, Figure 1 For detailed procedures, please refer to the electronic equipment shown in Figure 2 , the zoom curve fitting method includes: S10, S11, S15, S18 and S19, which are specifically described as follows.

[0051] S10, obtaining an i-th sampling set corresponding to an i-th object distance.

[0052] The sampling set includes J sampling points, the sampling points include the coordinates of the zoom motor and the corresponding zoom motor coordinates, the J zoom motor coordinates are evenly spaced, 1≤i≤I, I≥3, and the value of J can range from 30-60.

[0053] exist Figure 2 Based on the content in S10, the embodiment of the present invention further provides an optional implementation, please refer to the following: S10, the step of obtaining the i-th sampling set corresponding to the i-th object distance includes: S101 and S102, which are specifically described as follows.

[0054] S101, discretize the total stroke of the lens zoom motor to obtain J zoom motor coordinates distributed at equal intervals.

[0055] S102 , determining the j-th zoom motor coordinate corresponding to the j-th variable magnification motor coordinate at the i-th object distance to obtain an i-th sampling set, where 1≤j≤J.

[0056] Optionally, when the object distance is the i-th object distance and the lens zoom motor rotates to the j-th zoom motor coordinate, the zoom motor is adjusted, and the corresponding zoom motor coordinate when the image clarity is the highest is the j-th zoom motor coordinate.

[0057] It should be noted that at least three sampling sets corresponding to object distances need to be obtained. Optionally, the value of the first object distance can be the minimum effective recognition object distance corresponding to the image acquisition device, and the value of the first object distance can be the maximum effective recognition object distance corresponding to the image acquisition device. Data sampling is only required at a limited object distance, which greatly reduces the amount of data sampling, thereby reducing the time for curve fitting.

[0058] Optionally, the value of the first object distance may be 1.5M, the value of the Ith object distance may be 1000M, and the value of the intermediate object distance may be 7M.

[0059] Please refer to Figure 3 , Figure 3 A schematic diagram of a curve corresponding to a sampling set provided in an embodiment of the present invention. Figure 3 The horizontal axis represents the coordinates of the zoom motor, and the vertical axis represents the coordinates of the zoom motor. Figure 3 ① in the figure represents the curve corresponding to the sampling set when the object distance is 1.5M, ② represents the curve corresponding to the sampling set when the object distance is 7M, and ③ represents the curve corresponding to the sampling set when the object distance is 1000M.

[0060] S11, determining a target fixed parameter and an object distance parameter formula of a zoom curve based on the i-th sampling set.

[0061] The object distance parameter formula is a conversion formula for the object distance and the object distance associated parameter in the zoom curve.

[0062] Optionally, a least squares curve fitting is performed based on the i-th sampling set to determine a target fixed parameter and an object distance parameter formula of the zoom curve.

[0063] exist Figure 2 Based on the content in S11, the embodiment of the present invention further provides an optional implementation, please refer to the following. S11, the step of determining the target fixed parameter and object distance parameter formula of the zoom curve based on the i-th sampling set, includes: S111, S112 and S113, which are specifically described as follows.

[0064] S111 , performing least square curve fitting based on the i th sampling set to obtain the i th primary zoom curve.

[0065] The primary zoom curve includes primary fixed parameters and primary object distance related parameters.

[0066] It should be noted that the least squares curve fitting is more consistent with the characteristics of the zoom curve, thereby ensuring that the parameters after fitting are more accurate and reducing the error of the zoom curve obtained by fitting.

[0067] In an optional implementation, in order to further improve the accuracy of the zoom curve, the embodiment of the present invention also provides an optional implementation, please refer to the following. S111, performing least squares curve fitting based on the i-th sampling set to obtain the i-th primary zoom curve, includes: S111-1 and S111-2, which are specifically described as follows.

[0068] S111 - 1 , obtaining the jth mean square error value corresponding to the jth variable magnification motor coordinate based on the J variable magnification motor coordinates, so as to obtain the i-th mean square error set corresponding to the i-th object distance.

[0069] The i-th mean square error set includes J mean square error points, and the j-th mean square error point includes the j-th mean square error value at the i-th object distance and the j-th zoom motor coordinate.

[0070] Optionally, an average value of J variable magnification motor coordinates is obtained, and based on the average value, a j-th mean square error value corresponding to the j-th variable magnification motor coordinate is calculated.

[0071] S111-2, performing least square curve fitting based on the i-th mean square error set to obtain the i-th primary zoom curve.

[0072] Optionally, the formula for the i-th primary zoom curve is:

[0073]

[0074] in, represents the mean square error value in the mean square error point at the i-th object distance, represents the coordinates of the zoom motor in the mean square error point at the i-th object distance, , , , , is the primary fixed parameter in the i-th primary zoom curve, , , , is the primary object distance correlation parameter in the i-th primary zoom curve.

[0075] Alternatively, the lsqcurvefit function of the Matlab tool can be used to perform a least squares curve fit on the mean square error set.

[0076] Please refer to Figure 4 , Figure 4 A schematic diagram of an initial zoom curve provided by an embodiment of the present invention. Figure 4 The horizontal axis represents the mean square error of the zoom motor coordinates, and the vertical axis represents the zoom motor coordinates. Figure 4 ① represents the primary zoom curve when the object distance is 1.5M, ② represents the primary zoom curve when the object distance is 7M, and ③ represents the primary zoom curve when the object distance is 1000M.

[0077] S112, determining a target fixed parameter of the zoom curve based on the primary fixed parameters in all the primary zoom curves.

[0078] Optionally, the average value (or median value) of the preliminary fixed parameters of the same type is used to determine the target fixed parameter of the type.

[0079] For example, ,in, represents the initial fixed parameters The corresponding target fixed parameters.

[0080] S113, obtaining an object distance parameter formula based on the object distance and the primary object distance correlation parameter in the primary zoom curve.

[0081] It should be noted that there are a total of I object distances, and it is known that the i-th object distance corresponds to the primary object distance associated parameter in the i-th primary zoom curve (for example, ), so that a quadratic fit can be performed to obtain the object distance parameter formula.

[0082] Optionally, the object distance parameter formula is:

[0083]

[0084] in, represents the qth object distance association parameter (corresponding to the above , , , ), Indicates the object distance, represents the first correlation coefficient of the qth object distance correlation parameter, represents the second correlation coefficient of the qth object distance correlation parameter, The third correlation coefficient representing the qth object distance correlation parameter, 1≤q≤4.

[0085] S15, constructing a conversion formula between the object distance and the zoom motor coordinates corresponding to the target zoom motor coordinates based on the target fixed parameters and the object distance parameter formula.

[0086] The target zoom motor coordinates may be the Jth zoom motor coordinates, or Figure 3 The maximum value of the X-axis coordinate.

[0087] Optionally, the object distance and zoom motor coordinate conversion formula is:

[0088]

[0089] in, Indicates the mean square error value corresponding to the target zoom motor coordinates, Indicates object distance The corresponding zoom motor coordinates, a, c, d, f and h are the target fixed parameters in the zoom curve, represents the qth object distance association parameter, Indicates the object distance, represents the first correlation coefficient of the qth object distance correlation parameter, represents the second correlation coefficient of the qth object distance correlation parameter, represents the third correlation coefficient of the qth object distance correlation parameter.

[0090] S18, determining the target object distance based on the zoom motor estimated coordinates corresponding to the target zoom motor coordinates and the object distance and zoom motor coordinate conversion formula.

[0091] It should be noted that when the target zoom motor coordinates are fixed, the estimated zoom motor coordinates are substituted into the above formula: In the equation, the corresponding object distance D, i.e. the target object distance, can be obtained.

[0092] S19, constructing a target zoom curve corresponding to the target object distance based on the object distance parameter formula, the target fixed parameter and the target object distance, wherein the target zoom curve is used to guide focusing when the object is at the target object distance.

[0093] Optionally, the formula of the target zoom curve is:

[0094]

[0095] in, It represents the mean square error of the zoom motor coordinates at object distance D. represents the zoom motor coordinates corresponding to the zoom motor coordinates at object distance D, a, c, d, f and h are the target fixed parameters in the zoom curve, represents the qth object distance association parameter, Indicates the object distance, represents the first correlation coefficient of the qth object distance correlation parameter, represents the second correlation coefficient of the qth object distance correlation parameter, represents the third correlation coefficient of the qth object distance correlation parameter.

[0096] exist Figure 2 Based on how to determine the estimated coordinates of the zoom motor, the embodiment of the present invention also provides an optional implementation method, please refer to Figure 5 In S18, based on the estimated zoom motor coordinates corresponding to the target zoom motor coordinates and the object distance and zoom motor coordinate conversion formula, before determining the target object distance, the zoom curve fitting method also includes: S16 and S17, which are specifically described as follows.

[0097] S16, determining the target zoom motor coordinates corresponding to the lens zoom motor at the i-th object distance when the lens zoom motor is at the target zoom motor coordinates.

[0098] The i-th object distance can be any object distance, such as the object distance 1.5M or the object distance 1000M mentioned above. When the target zoom motor coordinates are determined, for example, the target zoom motor coordinates are the J-th zoom motor coordinates, the corresponding zoom motor coordinates can be determined, that is, the target zoom motor coordinates.

[0099] S17, based on the target zoom motor coordinates, performing accumulation and / or accumulation subtraction based on a preset step length to determine the estimated zoom motor coordinates corresponding to the target zoom motor coordinates.

[0100] The preset step length may be the minimum step length of the zoom motor.

[0101] By accumulating and / or subtracting at equal intervals (intervals being preset step lengths), the estimated coordinates of all zoom motors within the travel range of the zoom motor can be determined.

[0102] Optionally, the addition and / or subtraction formula is:

[0103]

[0104] in, Indicates the target zoom motor coordinates, Indicates the estimated coordinates of the zoom motor, Indicates the preset step size, is any positive integer.

[0105] exist Figure 2 On the basis of how to further ensure the accuracy of the zoom curve, the embodiment of the present invention also provides an optional implementation method, please refer to Figure 6 In S11, after determining the target fixed parameter and the object distance parameter formula of the zoom curve based on the i-th sampling set, the zoom curve fitting method further includes: S12, S13 and S14, which are specifically described as follows.

[0106] S12, constructing an i-th target zoom curve corresponding to the i-th object distance based on the target fixed parameter and the object distance parameter formula.

[0107] S13, determining an i-th residual based on an i-th target zoom curve and an i-th sampling set corresponding to an i-th object distance.

[0108] Optionally, an i-th sampling curve may be determined based on an i-th sampling set corresponding to the i-th object distance, and an i-th residual may be determined based on the i-th sampling curve and the i-th target zoom curve.

[0109] The i-th residual may also be determined based on discrete sampling points in the i-th sampling set and the i-th target zoom curve.

[0110] S14, determine whether the error requirement is met based on the i-th residual. If so, execute S15, construct the object distance and zoom motor coordinate conversion formula corresponding to the target zoom motor coordinate based on the target fixed parameter and the object distance parameter formula; if not, repeat S10 to obtain the i-th sampling set corresponding to the i-th object distance.

[0111] In an optional implementation, when any residual exceeds a preset residual range, it is determined that the error requirement is not met, or when the average value of all residuals exceeds the preset residual range, it is determined that the error requirement is not met.

[0112] Please refer to Figure 7 , Figure 7 A schematic diagram of residual provided by an embodiment of the present invention. Figure 7 The horizontal axis represents the mean square error of the zoom motor coordinates, and the vertical axis represents the zoom motor coordinates. Figure 7 ① represents the residual curve when the object distance is 1.5M, ② represents the residual curve when the object distance is 7M, and ③ represents the residual curve when the object distance is 1000M.

[0113] See also Figure 8 , Figure 8 A zoom curve fitting device is provided in an embodiment of the present invention. Optionally, the zoom curve fitting device is applied to the electronic device described above.

[0114] The zoom curve fitting device includes: a first processing unit 201 and a second processing unit 202 .

[0115] The first processing unit 201 is used to obtain an i-th sampling set corresponding to an i-th object distance, wherein the sampling set includes J sampling points, the sampling points include a zoom motor coordinate and a corresponding zoom motor coordinate, and the J zoom motor coordinates are evenly spaced, 1≤i≤I, I≥3;

[0116] The first processing unit 201 is further configured to determine a target fixed parameter of the zoom curve and an object distance parameter formula based on the i-th sampling set, wherein the object distance parameter formula is a conversion formula between the object distance and the object distance associated parameter in the zoom curve;

[0117] The first processing unit 201 is also used to construct an object distance and zoom motor coordinate conversion formula corresponding to the target zoom motor coordinate based on the target fixed parameter and the object distance parameter formula;

[0118] The first processing unit 201 is also used to determine the target object distance based on the zoom motor estimated coordinates corresponding to the target zoom motor coordinates and the object distance and zoom motor coordinate conversion formula;

[0119] The second processing unit 202 is used to construct a target zoom curve corresponding to the target object distance based on the object distance parameter formula, the target fixed parameter and the target object distance, and the target zoom curve is used to guide focusing when the target object distance is reached.

[0120] Optionally, the first processing unit 201 may execute the above S10 to S18; the second processing unit 202 may execute the above S19.

[0121] It should be noted that the zoom curve fitting device provided in this embodiment can execute the method flow shown in the above method flow embodiment to achieve the corresponding technical effect. For the sake of brief description, for the parts not mentioned in this embodiment, please refer to the corresponding contents in the above embodiment.

[0122] The embodiment of the present invention further provides a storage medium, which stores computer instructions and programs, and when the computer instructions and programs are read and run, the zoom curve fitting method of the above embodiment is executed. The storage medium may include a memory, a flash memory, a register, or a combination thereof.

[0123] The following provides an electronic device, which may be a main control unit of an image acquisition device, or an image acquisition device, or a mobile phone, computer, server, or other device connected to the image acquisition device for communication. Figure 1 As shown, the zoom curve fitting method described above can be implemented; specifically, the electronic device includes: a processor 10, a memory 11, and a bus 12. The processor 10 can be a CPU. The memory 11 is used to store one or more programs. When the one or more programs are executed by the processor 10, the zoom curve fitting method of the above embodiment is executed.

[0124] In summary, the embodiments of the present invention provide a zoom curve fitting method, device, storage medium and electronic device, which obtain the i-th sampling set corresponding to the i-th object distance, wherein the sampling set includes J sampling points, and the sampling points include zoom motor coordinates and corresponding zoom motor coordinates, and the J zoom motor coordinates are evenly spaced, 1≤i≤I, I≥3; based on the i-th sampling set, the target fixed parameters and object distance parameter formula of the zoom curve are determined, wherein the object distance parameter formula is a conversion formula between the object distance and the object distance associated parameters in the zoom curve; based on the target fixed parameters and the object distance parameter formula, a conversion formula between the object distance and the zoom motor coordinates corresponding to the target zoom motor coordinates is constructed; based on the zoom motor estimated coordinates corresponding to the target zoom motor coordinates and the object distance and zoom motor coordinate conversion formula, the target object distance is determined; based on the object distance parameter formula, the target fixed parameters and the target object distance, a target zoom curve corresponding to the target object distance is constructed, and the target zoom curve is used to guide focusing when at the target object distance. On the basis of limited object distance sampling, the target object distance can be inversely calculated to obtain the corresponding target zoom curve. Under the premise of ensuring the accuracy of the target zoom curve, the sampling time is greatly reduced and the fitting efficiency is improved.

[0125] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

[0126] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

Claims

1. A zoom curve fitting method, characterized in that: The method comprises: Obtaining an i-th sampling set corresponding to an i-th object distance, wherein the sampling set includes J sampling points, the sampling points include a zoom motor coordinate and a corresponding zoom motor coordinate, and the J zoom motor coordinates are evenly spaced, 1≤i≤I, I≥3; Determining a target fixed parameter of a zoom curve and an object distance parameter formula based on the i-th sampling set, wherein the object distance parameter formula is a conversion formula between the object distance and an object distance associated parameter in the zoom curve; Constructing a conversion formula between the object distance and the zoom motor coordinates corresponding to the target zoom motor coordinates based on the target fixed parameters and the object distance parameter formula; Determine the target object distance based on the estimated zoom motor coordinates corresponding to the target zoom motor coordinates and the object distance and zoom motor coordinate conversion formula; constructing a target zoom curve corresponding to the target object distance based on the object distance parameter formula, the target fixed parameter and the target object distance, wherein the target zoom curve is used to guide focusing when the target object distance is reached; The step of obtaining the i-th sampling set corresponding to the i-th object distance includes: Discretize the total stroke of the lens zoom motor to obtain J zoom motor coordinates with equal spacing; Determine the j-th zoom motor coordinate corresponding to the j-th variable magnification motor coordinate at the i-th object distance to obtain the i-th sampling set, where 1≤j≤J; The step of determining a target fixed parameter and an object distance parameter formula of a zoom curve based on the i-th sampling set comprises: Performing least square curve fitting based on the i-th sampling set to obtain an i-th primary zoom curve, wherein the primary zoom curve includes a primary fixed parameter and a primary object distance associated parameter; Determining a target fixed parameter of a zoom curve based on the primary fixed parameters in all the primary zoom curves includes: determining an average value or a median value of the primary fixed parameters of the same type as the target fixed parameter of the type; Obtaining an object distance parameter formula based on object distance and primary object distance associated parameters in the primary zoom curve; The step of performing least squares curve fitting based on the i-th sampling set to obtain the i-th primary zoom curve includes: Based on the J zoom motor coordinates, a j-th mean square error value corresponding to the j-th zoom motor coordinate is obtained to obtain an i-th mean square error set corresponding to the i-th object distance, wherein the i-th mean square error set includes J mean square error points, and the j-th mean square error point includes the j-th mean square error value and the j-th zoom motor coordinate at the i-th object distance; Performing least square curve fitting based on the i-th mean square error set to obtain the i-th primary zoom curve; The formula of the i-th primary zoom curve is: in, represents the mean square error value in the mean square error point at the i-th object distance, represents the coordinates of the zoom motor in the mean square error point at the i-th object distance, , , , , is the primary fixed parameter in the i-th primary zoom curve, , , , is the primary object distance correlation parameter in the i-th primary zoom curve; The object distance parameter formula is: in, represents the qth object distance association parameter, Indicates the object distance, represents the first correlation coefficient of the qth object distance correlation parameter, represents the second correlation coefficient of the qth object distance correlation parameter, represents the third correlation coefficient of the qth object distance correlation parameter; The conversion formula between object distance and zoom motor coordinates is: in, Indicates the mean square error value corresponding to the target zoom motor coordinates, Indicates object distance The corresponding zoom motor coordinates, a, c, d, f and h are the target fixed parameters in the zoom curve, represents the qth object distance association parameter, Indicates the object distance, represents the first correlation coefficient of the qth object distance correlation parameter, represents the second correlation coefficient of the qth object distance correlation parameter, represents the third correlation coefficient of the qth object distance correlation parameter.

2. The zoom curve fitting method according to claim 1, wherein: Before determining the target object distance based on the estimated zoom motor coordinates corresponding to the target variable magnification motor coordinates and the object distance and zoom motor coordinate conversion formula, the method further includes: Determine the target zoom motor coordinates corresponding to the lens zoom motor at the target zoom motor coordinates at the i-th object distance; On the basis of the target zoom motor coordinates, accumulation and / or accumulation subtraction are performed based on a preset step length to determine the estimated zoom motor coordinates corresponding to the target zoom motor coordinates.

3. The zoom curve fitting method according to claim 1, wherein: The formula for the target zoom curve is: in, It represents the mean square error of the zoom motor coordinates at object distance D. represents the zoom motor coordinates corresponding to the zoom motor coordinates at object distance D, a, c, d, f and h are the target fixed parameters in the zoom curve, represents the qth object distance association parameter, Indicates the object distance, represents the first correlation coefficient of the qth object distance correlation parameter, represents the second correlation coefficient of the qth object distance correlation parameter, represents the third correlation coefficient of the qth object distance correlation parameter.

4. The zoom curve fitting method according to claim 1, wherein: After determining the target fixed parameter and object distance parameter formula of the zoom curve based on the i-th sampling set, the method further includes: Constructing an i-th target zoom curve corresponding to an i-th object distance based on the target fixed parameter and the object distance parameter formula; Determine an i-th residual based on an i-th sampling set corresponding to the i-th target zoom curve and the i-th object distance; Determine whether the error requirement is met based on the i-th residual; If satisfied, constructing a conversion formula between the object distance and the zoom motor coordinates corresponding to the target zoom motor coordinates based on the target fixed parameters and the object distance parameter formula; If not satisfied, then repeatedly obtain the i-th sampling set corresponding to the i-th object distance.

5. A zoom curve fitting device, characterized in that: The device comprises: A first processing unit is used to obtain an i-th sampling set corresponding to an i-th object distance, wherein the sampling set includes J sampling points, the sampling points include a zoom motor coordinate and a corresponding zoom motor coordinate, and the J zoom motor coordinates are evenly spaced, 1≤i≤I, I≥3; The first processing unit is further used to determine a target fixed parameter and an object distance parameter formula of the zoom curve based on the i-th sampling set, wherein the object distance parameter formula is a conversion formula between the object distance and the object distance associated parameter in the zoom curve; The first processing unit is further used to construct an object distance and zoom motor coordinate conversion formula corresponding to the target zoom motor coordinate based on the target fixed parameter and the object distance parameter formula; The first processing unit is further used to determine the target object distance based on the estimated zoom motor coordinates corresponding to the target zoom motor coordinates and the object distance and zoom motor coordinate conversion formula; A second processing unit, configured to construct a target zoom curve corresponding to a target object distance based on the object distance parameter formula, the target fixed parameter, and the target object distance, wherein the target zoom curve is used to guide focusing when the target object distance is reached; The obtaining the i-th sampling set corresponding to the i-th object distance includes: Discretize the total stroke of the lens zoom motor to obtain J zoom motor coordinates with equal spacing; Determine the j-th zoom motor coordinate corresponding to the j-th variable magnification motor coordinate at the i-th object distance to obtain the i-th sampling set, where 1≤j≤J; The method of determining the target fixed parameter and object distance parameter formula of the zoom curve based on the i-th sampling set includes: Performing least square curve fitting based on the i-th sampling set to obtain an i-th primary zoom curve, wherein the primary zoom curve includes a primary fixed parameter and a primary object distance associated parameter; Determining a target fixed parameter of a zoom curve based on the primary fixed parameters in all the primary zoom curves includes: determining an average value or a median value of the primary fixed parameters of the same type as the target fixed parameter of the type; Obtaining an object distance parameter formula based on object distance and primary object distance associated parameters in the primary zoom curve; The performing least squares curve fitting based on the i-th sampling set to obtain the i-th primary zoom curve includes: Based on the J zoom motor coordinates, a j-th mean square error value corresponding to the j-th zoom motor coordinate is obtained to obtain an i-th mean square error set corresponding to the i-th object distance, wherein the i-th mean square error set includes J mean square error points, and the j-th mean square error point includes the j-th mean square error value and the j-th zoom motor coordinate at the i-th object distance; Performing least square curve fitting based on the i-th mean square error set to obtain the i-th primary zoom curve; The formula of the i-th primary zoom curve is: in, represents the mean square error value in the mean square error point at the i-th object distance, represents the coordinates of the zoom motor in the mean square error point at the i-th object distance, , , , , is the primary fixed parameter in the i-th primary zoom curve, , , , is the primary object distance correlation parameter in the i-th primary zoom curve; The object distance parameter formula is: in, represents the qth object distance association parameter, Indicates the object distance, represents the first correlation coefficient of the qth object distance correlation parameter, represents the second correlation coefficient of the qth object distance correlation parameter, represents the third correlation coefficient of the qth object distance correlation parameter; The conversion formula between object distance and zoom motor coordinates is: in, Indicates the mean square error value corresponding to the target zoom motor coordinates, Indicates object distance The corresponding zoom motor coordinates, a, c, d, f and h are the target fixed parameters in the zoom curve, represents the qth object distance association parameter, Indicates the object distance, represents the first correlation coefficient of the qth object distance correlation parameter, represents the second correlation coefficient of the qth object distance correlation parameter, represents the third correlation coefficient of the qth object distance correlation parameter.

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

7. An electronic device, characterized in that: include: A processor and a memory, the memory being used to store one or more programs; When the one or more programs are executed by the processor, the method according to any one of claims 1 to 4 is implemented.