A focusing curve correction method, device and correction equipment
Patent Information
- Application Number
- CN202211590308.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-12
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2042-12-12
AI Technical Summary
[0005]在本实施例中提供了一种聚焦曲线校正方法、装置以及校正设备,以解决相关技术中在任意环境条件下,摄像设备使用预先存储的理论聚焦曲线聚焦不准确的问题
[0035]Compared with related technologies, the focus curve correction method, apparatus, correction device, and storage medium provided in this embodiment acquire multiple theoretical focus curves of the camera device, conduct lens tests according to the on-site environment, select a focus reference curve from the theoretical focus curves based on the lens test results, select multiple first feature points based on the focus reference curve, calculate correction parameters based on the multiple first feature points, and correct multiple theoretical focus curves based on the correction parameters. This solves the problem of inaccurate focusing of the camera device using pre-stored theoretical focus curves under any environmental conditions, achieving the technical effect of obtaining a focus curve more suitable for the camera device under any environmental conditions, enabling the camera device to focus accurately and maintain clear images when performing zoom tracking based on the new focus curve.
Smart Images

Figure CN116233405B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of video surveillance technology, specifically relating to a focus curve correction method, device, and correction equipment. Background Technology
[0002] Currently, zoom network cameras achieve monitoring of scenes at different distances and with different field of view by carrying lenses whose focal length can be changed by software control. In order to keep the image captured by the camera clear during zooming, zoom tracking is required, which means that the focusing motor in the camera device changes synchronously with the position of the zoom motor.
[0003] Typically, camera manufacturers provide one or more theoretical focus curves pre-stored in the camera device. This allows the camera to accurately focus and maintain image sharpness during zoom tracking. However, individual differences exist in camera lenses: lens thickness varies, lens assembly deviations occur, image sensor soldering errors occur, and there are back focus errors when the image sensor is mounted on the lens. This causes the pre-stored theoretical focus curves to become inaccurate. In other words, the pre-stored theoretical focus curves are no longer applicable to the camera. If the camera continues to use the pre-stored theoretical focus curves for zoom tracking, focusing will be inaccurate, making it difficult to maintain image sharpness. Cameras also cause some deviation in the lens during use. Therefore, how to obtain a focus curve more suitable for the camera under any environmental conditions, enabling the camera to focus accurately and maintain image sharpness during zoom tracking based on the new focus curve, is a technical problem that needs to be solved. Furthermore, it is necessary to support adaptive environment lens calibration.
[0004] There is currently no effective solution to the problem that camera devices using pre-stored theoretical focusing curves may not focus accurately during use in related technologies. Summary of the Invention
[0005] This embodiment provides a focusing curve correction method, apparatus, and correction device to solve the problem in related technologies where the camera device cannot focus accurately using a pre-stored theoretical focusing curve under any environmental conditions.
[0006] Firstly, this embodiment provides a focus curve correction method applied to a camera device, the method comprising:
[0007] Obtain multiple theoretical focusing curves of the camera device;
[0008] Lens testing is conducted based on the on-site environment, and a focal reference curve is selected from the theoretical focal curve based on the results of the lens testing.
[0009] Multiple first feature points are selected based on the focusing reference curve, correction parameters are calculated based on the multiple first feature points, and multiple theoretical focusing curves are corrected based on the correction parameters.
[0010] In some embodiments, the step of performing lens testing based on the field environment and selecting a focusing reference curve from the theoretical focusing curve based on the results of the lens testing includes:
[0011] The first slope is obtained based on the focus value of the clear image at the minimum zoom position and the focus value of the clear image at the maximum zoom position in the described scene environment.
[0012] The focusing reference curve is selected from multiple theoretical focusing curves based on the first slope.
[0013] In some embodiments, the step of selecting multiple first feature points based on the focusing reference curve, calculating correction parameters based on the multiple first feature points, and correcting multiple theoretical focusing curves based on the correction parameters includes:
[0014] Each of the theoretical focusing curves includes multiple second feature points;
[0015] Based on the slope of the tangent of the theoretical focusing curve, multiple first feature points are selected from multiple second feature points of the reference curve, and correction parameters are calculated based on the multiple first feature points.
[0016] The theoretical focusing curve is corrected according to the correction parameters.
[0017] In some embodiments, calculating correction parameters based on the first feature point and correcting the theoretical focusing curve based on the correction parameters includes:
[0018] Connecting adjacent second feature points of each theoretical focusing curve yields multiple lens polygonal lines;
[0019] The camera device is focused onto multiple first feature points to obtain multiple corresponding actual feature points;
[0020] The correction parameters are calculated based on the adjacent first feature points and the corresponding actual feature points;
[0021] Each focus correction curve is obtained by fitting each theoretical focus curve with multiple lens polygons and corresponding correction parameters.
[0022] In some embodiments, the first feature point of each of the theoretical focusing curves includes the start point, end point, first midpoint of the rising edge, second midpoint of the falling edge, vertex, and / or bottom point of the theoretical focusing curve.
[0023] In some of these embodiments, the slope of the first midpoint of the rising edge of the theoretical focusing curve has the smallest difference from 1 among the first feature points of the rising edge.
[0024] Among the first characteristic points of the falling edge of the theoretical focusing curve, the absolute value of the slope of the second midpoint of the falling edge has the smallest difference from 1.
[0025] Secondly, this embodiment provides a focus curve correction device applied to a camera device, the device comprising:
[0026] The acquisition module is used to acquire multiple theoretical focusing curves of the camera device;
[0027] The selection module is used to perform lens testing based on the on-site environment and select a focusing reference curve from the theoretical focusing curve based on the results of the lens testing.
[0028] The calibration module is used to select multiple first feature points based on the focusing reference curve, calculate calibration parameters based on the multiple first feature points, and calibrate multiple theoretical focusing curves based on the calibration parameters.
[0029] In some embodiments, the correction module further includes:
[0030] The selection unit is used to select multiple first feature points from multiple second feature points of the focusing reference curve according to the slope of the tangent of the theoretical focusing curve, wherein each theoretical focusing curve includes multiple second feature points.
[0031] A focusing unit is used to focus the camera device onto multiple first feature points respectively, thereby obtaining multiple corresponding actual feature points;
[0032] The curve correction unit is used to calculate correction parameters based on adjacent second feature points and corresponding actual feature points; and to fit each theoretical focus curve to obtain each focus correction curve based on multiple lens polygons and corresponding correction parameters.
[0033] Thirdly, this embodiment provides a correction device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the focusing curve correction method described in the first aspect above.
[0034] Fourthly, this embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the focusing curve correction method described in the first aspect above.
[0035] Compared with related technologies, the focus curve correction method, apparatus, correction device, and storage medium provided in this embodiment acquire multiple theoretical focus curves of the camera device, conduct lens tests according to the on-site environment, select a focus reference curve from the theoretical focus curves based on the lens test results, select multiple first feature points based on the focus reference curve, calculate correction parameters based on the multiple first feature points, and correct multiple theoretical focus curves based on the correction parameters. This solves the problem of inaccurate focusing of the camera device using pre-stored theoretical focus curves under any environmental conditions, achieving the technical effect of obtaining a focus curve more suitable for the camera device under any environmental conditions, enabling the camera device to focus accurately and maintain clear images when performing zoom tracking based on the new focus curve.
[0036] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0037] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0038] Figure 1 This is a hardware structure block diagram of a terminal for a focusing curve correction method according to this embodiment;
[0039] Figure 2 This is a flowchart of a focusing curve correction method according to this embodiment;
[0040] Figure 3 This is a flowchart of a focusing curve correction method according to a preferred embodiment of the present invention;
[0041] Figure 4 This is a schematic diagram of a focusing curve under field testing conditions according to a preferred embodiment;
[0042] Figure 5(a) is a schematic diagram of a theoretical focusing curve in this embodiment;
[0043] Figure 5(b) is a schematic diagram of a theoretical focusing curve in this embodiment broken down into several broken lines;
[0044] Figure 6 This is a structural block diagram of a focusing curve correction device according to this embodiment;
[0045] Figure 7 This is a structural block diagram of the correction module in this embodiment. Detailed Implementation
[0046] To better understand the purpose, technical solution, and advantages of this application, the application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0047] Unless otherwise defined, the technical or scientific terms used in this application shall have the general meaning as understood by one of ordinary skill in the art to which this application pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these,” used in this application, do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to such processes, methods, products, or devices. The terms “connected,” “linked,” and “coupled,” used in this application, are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. The term “multiple” used in this application refers to two or more. The "and / or" operator describes the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: A alone, A and B simultaneously, and B alone. Typically, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," and "third," etc., used in this application are merely for distinguishing similar objects and do not represent a specific ordering of the objects.
[0048] The method embodiments provided in this example can be executed on a terminal, computer, or similar computing device. For example, it can run on a terminal. Figure 1 This is a hardware structure block diagram of a terminal for a focusing curve correction method according to this embodiment. For example... Figure 1 As shown, a terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 and a memory 104 for storing data are also included. The processor 102 may be, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA). The terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that… Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown are illustrated.
[0049] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to a focusing curve correction method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0050] The transmission device 106 is used to receive or send data via a network. This network includes a wireless network provided by the terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 can be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0051] This embodiment provides a focusing curve correction method. Figure 2 This is a flowchart of a focusing curve correction method according to this embodiment, such as... Figure 2 As shown, the process includes the following steps:
[0052] Step S201: Obtain multiple theoretical focusing curves of the camera device;
[0053] Specifically, the camera equipment stores multiple theoretical focusing curves. These theoretical focusing curves can be curves obtained by the lens supplier based on the hardware design, or they can be curves obtained by designers based on the feature points provided. These curves can be smooth curves or broken lines composed of line segments passing through these feature points.
[0054] Step S202: Perform lens testing based on the on-site environment, and select a focusing reference curve from the theoretical focusing curve based on the lens test results;
[0055] Specifically, lens testing is conducted based on the on-site environment. The camera is tested in any environment, recording the first coordinate point (zoom position and focus position) when the widest angle of the lens is in focus, and the second coordinate point (zoom position and focus position) when the lens is in focus at its maximum magnification. The slopes of the first and second coordinate points are calculated and compared with the slopes obtained from the same coordinate point on multiple theoretical focus curves pre-stored in the camera. The theoretical focus curve with the closest slope is selected as the focus reference curve.
[0056] Step S203: Select multiple first feature points based on the focusing reference curve, calculate correction parameters based on the multiple first feature points, and correct multiple theoretical focusing curves based on the correction parameters.
[0057] In this embodiment of the invention, by acquiring multiple theoretical focusing curves of the camera device, performing lens tests based on the on-site environment, and selecting a focusing reference curve from the theoretical focusing curves based on the lens test results, multiple first feature points are selected based on the focusing reference curve, correction parameters are calculated based on the multiple first feature points, and the multiple theoretical focusing curves are corrected based on the correction parameters. This solves the problem that the camera device cannot focus accurately when using the pre-stored theoretical focusing curves under any environmental conditions. It achieves the technical effect of obtaining a focusing curve more suitable for the camera device under any environmental conditions, enabling the camera device to focus accurately and maintain the clarity of the captured image when performing zoom tracking based on the new focusing curve.
[0058] In some embodiments, lens testing is performed based on the field environment, and a focusing reference curve is selected from the theoretical focusing curve based on the lens test results, including:
[0059] The first slope is obtained based on the focus value of the image at the minimum zoom position and the focus value of the image at the maximum zoom position in the on-site environment.
[0060] The focusing reference curve is selected from multiple theoretical focusing curves based on the first slope.
[0061] In some embodiments, selecting multiple first feature points based on a focusing reference curve, calculating correction parameters based on the multiple first feature points, and correcting multiple theoretical focusing curves based on the correction parameters include:
[0062] Each theoretical focusing curve includes multiple second feature points; based on the slope of the tangent of the theoretical focusing curve, multiple first feature points are selected from the multiple second feature points of the reference curve; correction parameters are calculated based on the multiple first feature points; and the theoretical focusing curve is corrected based on the correction parameters.
[0063] Specifically, the theoretical focusing curve is a curve obtained by the lens supplier based on the hardware design. The second feature point is a point on the reference curve. The error between the vertical coordinate value of the point on the broken line connecting adjacent second feature points and the theoretical curve value is less than or equal to 1 unit. On the theoretical focusing curve, the horizontal axis represents the position of the zoom motor, and the vertical axis represents the position of the focusing motor. One unit on the vertical axis is the distance that the stepper motor moves the lens with one step, which is the smallest scale unit.
[0064] In some embodiments, a correction parameter is calculated based on a first feature point; correcting the theoretical focusing curve based on the correction parameter includes:
[0065] Connecting adjacent second feature points of each theoretical focusing curve yields multiple lens polygonal lines;
[0066] The camera is focused on multiple first feature points to obtain multiple corresponding actual feature points;
[0067] Calculate the correction parameters based on the adjacent first feature points and the corresponding actual feature points;
[0068] Each focus correction curve is obtained by fitting multiple lens polygons and corresponding correction parameters to each theoretical focus curve.
[0069] Specifically, for example, refer to Figure 5(a). Figure 5(a) is a theoretical focusing curve. Assuming Figure 5(a) is a theoretical focusing curve with an object distance of 2m, the focusing reference curve is chosen as the theoretical focusing curve with a distance of 2m. The second feature points are points 1, 2, 3, 4, 5, 6, 7, 8, and 9. The first feature points are points 1, 3, 5, 7, and 9. The camera is focused on the first feature points 1, 3, 5, 7, and 9 respectively, resulting in multiple corresponding actual feature points. The ratio of the tested value to the theoretical value of the first feature point is calculated as follows:
[0070] Where r 1~3 This is the ratio of the test value to the theoretical value between points 1 and 3. Test 3 is the test value obtained when the camera focuses on point 3. The theoretical value 2m is the coordinate value of the original 3 points on the theoretical focusing curve with an object distance of 2m. Since the x-coordinate of the actual feature point is equal to that of the first feature point, the test value of the first feature point is the y-coordinate value of the actual feature point, and the theoretical value of the first feature point is the y-coordinate value of the first feature point. Therefore, the theoretical value 2m is the y-coordinate value of the original 3 points on the theoretical focusing curve with an object distance of 2m. Similarly, the same applies to other feature points. This ratio is the correction parameter. Depending on the specific situation, the ratio of each segment of the lens break line may be different.
[0071] Furthermore, the lens polygons f(x1), f(x2), f(x3), f(x4), f(x5), f(x6), f(x7), and f(x8) obtained from the above theoretical curve expression are multiplied by the correction parameters to obtain the focus correction curve that conforms to the lens.
[0072] In some of these embodiments, the first feature point of each theoretical focusing curve includes the start point, end point, first midpoint of the rising edge, second midpoint of the falling edge, vertex, and / or bottom point of the theoretical focusing curve.
[0073] In some of these embodiments, the slope of the first midpoint of the rising edge of the theoretical focusing curve has the smallest difference from 1 among the first feature points of the rising edge.
[0074] Among the first characteristic points of the falling edge of the theoretical focusing curve, the absolute value of the slope at the second midpoint of the falling edge has the smallest difference from 1.
[0075] The present embodiment will now be described and illustrated through preferred embodiments.
[0076] Figure 3 This is a flowchart of a focusing curve correction method according to a preferred embodiment of this invention. Figure 3 As shown, the process includes the following steps:
[0077] Step S301: At the minimum zoom position, record the coordinates of the clearest image by moving the focus image;
[0078] Specifically, Figure 4 This is a focusing curve under the actual shooting conditions. The horizontal axis represents the position of the zoom motor, and the vertical axis represents the position of the focusing motor. Figure 4 The zoom position and focus position when the camera lens is in sharp focus at its widest angle. Figure 4 Point A in the middle.
[0079] Step S302: At the maximum zoom position, move the focus image and record the coordinates of the point where the image is clearest.
[0080] Specifically, such as Figure 4 The zoom position and focus position when the camera lens is in sharp focus at its maximum magnification. Figure 4 Point B in the middle.
[0081] Furthermore, when the zoom range changes from wide-angle to telephoto, the focal length of the zoom lens changes from F... wide Increase to F tele And the perspective is from φ wide Reduce to φ teleIn response to this change, the in-focus plane (image distance) should shift during this process. For an object at distance d, sd(z) wide ) and sd(z tele ) are defined as the image distance during wide-angle zoom and telephoto zoom, respectively.
[0082] Step S303: Calculate and record the slope of the straight line connecting the two points;
[0083] Specifically, record the coordinates of points 1 and 2 in the graph, and calculate the slope of the two coordinate points.
[0084] Step S304: Compare with the theoretical curve and select the curve that is closest to it;
[0085] Specifically, the slope of the focus value at the minimum zoom level and the focus value at the maximum zoom level are compared with the theoretical curve, and the closest one is taken as the object distance in the current environment. Subsequent curve fitting is based on this theoretical curve.
[0086] Specifically, the camera device pre-stores multiple theoretical focus curves. Similarly, it calculates the zoom and focus positions at the widest angle of the lens and at the maximum magnification of the lens for each theoretical focus curve, as well as the slopes of these positions. For example, the ratio of the widest angle to the maximum magnification of the theoretical focus curves at object distances of 1 meter, 1.5 meters, 2 meters, 2.5 meters, 3 meters, 5 meters, 10 meters, and infinity can be expressed as follows: Where focus(1m)2 represents the focus value of the theoretical focus curve with an object distance of 1m at the maximum zoom position, focus(1m)1 represents the focus value of the theoretical focus curve with an object distance of 1m at the minimum zoom position, zoom(1m)2 represents the zoom value of the theoretical focus curve with an object distance of 1m at the maximum zoom position, and zoom(1m)1 represents the zoom value of the theoretical focus curve with an object distance of 1m at the minimum zoom position. Other variables can be understood by reference. For example, if the slope obtained by the test is closest to the slope of the theoretical curve with a distance of 2m, then the theoretical curve with a distance of 2m is the benchmark curve and is used as the benchmark for subsequent curve fitting.
[0087] Step S305, Lens curve test, fit all lens curves.
[0088] Specifically, as shown in Figures 5(a) and 5(b), the lens curve expression uses a method of breaking down the lens curve into several straight lines, and then using the set of all the straight lines to represent the lens curve. The curve expression is:
[0089]
[0090] When the horizontal coordinate is [zoom1,zoom2], the lens curve f(x1) is represented as a straight line a1x1+b1, where a1 and b1 represent constants, and other expressions are similar.
[0091] Furthermore, select some points from the lens curve. The principle for selecting points on the lens curve is that the error between the value on the straight line and the theoretical curve value is less than or equal to 1 unit. On the theoretical focusing curve, the horizontal axis represents the position of the zoom motor, and the vertical axis represents the position of the focusing motor. One unit of the vertical axis is the distance that the stepper motor moves the lens in one step, which is the smallest scale unit. For example, select points 1, 2, 3, 4, 5, 6, 7, 8, and 9 in Figure 5(a). The coordinates of point 1 are represented as (zoom1, focus1), and the coordinates of other points are deduced in the same way.
[0092] Lens curve testing does not require recording all points clearly. It is only necessary to find a few feature points. For example, for the lens curve above, it is only necessary to record the focus value of the clear image at points 1, 3, 5, 7, and 9 to support subsequent curve fitting calculations.
[0093] The selection principle for lens curve test points is as follows: starting point (1 point), ending point (9 points), vertex (5 points), bottom point (none in this example), the point where the slope of the tangent line of the rising edge is closest to 45° (3 points), and the point where the slope of the tangent line of the falling edge is closest to 135° (7 points).
[0094] Curve fitting, in the example above: if the slope obtained from the test is closest to the slope of the theoretical curve at 2m, then the theoretical curve at 2m is the baseline curve, serving as the benchmark for subsequent curve fitting. First, calculate the ratio of test points to theoretical values, based on test records at points 1, 3, 5, 7, and 9.
[0095]
[0096] The values f(x1), f(x2), f(x3), f(x4), f(x5), f(x6), f(x7), and f(x8) obtained from the theoretical curve expression above are multiplied by the ratio to obtain the actual curve that fits the lens. For example, the actual curve expression for a 1m lens is as follows:
[0097]
[0098] Similarly, the expressions for other object distance curves are:
[0099]
[0100] Lens controls such as zoom tracking algorithms and focus algorithms are based on the calculated actual lens curves.
[0101] By comparing the slope of the focus value at the minimum zoom position with the slope of the focus value at the maximum zoom position with the theoretical curve, the theoretical curve with the closest slope is selected, and the object distance in the current environment is obtained accordingly. Lens calibration is not required in a specific environment, nor is it required to simulate the preset object distance in a professional test environment. Lens calibration can be performed in any environment, which effectively improves calibration efficiency.
[0102] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0103] This embodiment also provides a focus curve correction device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. The terms "module," "unit," "subunit," etc., used below refer to combinations of software and / or hardware that perform a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0104] Figure 6 This is a structural block diagram of a focusing curve correction device according to this embodiment, as shown below. Figure 6 As shown, the device is used in a camera equipment, and the device includes:
[0105] Acquisition module 10 is used to acquire multiple theoretical focusing curves of the camera device;
[0106] Select module 20 is used to perform lens testing based on the on-site environment and select a focusing reference curve from the theoretical focusing curve based on the lens test results.
[0107] The calibration module 30 is used to select multiple first feature points based on the focusing reference curve, calculate calibration parameters based on the multiple first feature points, and calibrate multiple theoretical focusing curves based on the calibration parameters.
[0108] Furthermore, such as Figure 7 As shown, the calibration module 30 also includes:
[0109] Selection unit 31 is used to select multiple first feature points from multiple second feature points of the focusing reference curve according to the slope of the tangent of the theoretical focusing curve, wherein each theoretical focusing curve includes multiple second feature points.
[0110] The focusing unit 32 is used to focus the camera device onto multiple first feature points to obtain multiple corresponding actual feature points;
[0111] The curve correction unit 33 is used to calculate correction parameters based on adjacent second feature points and corresponding actual feature points; and to fit each theoretical focus curve with multiple lens polygons and corresponding correction parameters to obtain each focus correction curve.
[0112] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0113] This embodiment also provides an electronic device including a memory and a processor, the memory storing a computer program, and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0114] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0115] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0116] S1, acquire multiple theoretical focusing curves of the camera device;
[0117] S2, conduct lens testing based on the on-site environment, and select a focal reference curve from the theoretical focal curve based on the lens test results;
[0118] S3: Select multiple first feature points based on the focusing reference curve, calculate correction parameters based on the multiple first feature points, and correct multiple theoretical focusing curves based on the correction parameters.
[0119] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.
[0120] Furthermore, in conjunction with the focus curve correction methods provided in the above embodiments, this embodiment can also provide a storage medium for implementation. The storage medium stores a computer program; when executed by a processor, the computer program implements any of the focus curve correction methods in the above embodiments.
[0121] It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. All other embodiments derived by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0122] Obviously, the accompanying drawings are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, for those skilled in the art, certain design, manufacturing, or production modifications made based on the technical content disclosed in this application are merely conventional technical means and should not be considered as insufficient disclosure of this application.
[0123] The term "embodiment" in this application refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily imply the same embodiment, nor does it imply that it is mutually exclusive with or independent of other embodiments. It will be clearly or implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0124] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.
Claims
1. A focusing curve correction method, characterized in that, Applied to a camera device, the method includes: Obtain multiple theoretical focusing curves of the camera device; Lens testing is conducted based on the on-site environment, and a focal reference curve is selected from the theoretical focal curve based on the results of the lens testing. Based on the slope of the tangent of the theoretical focusing curve, multiple first feature points are selected from the focusing reference curve, correction parameters are calculated based on the multiple first feature points, and multiple theoretical focusing curves are corrected based on the correction parameters. The step of conducting lens testing based on the on-site environment and selecting a focal reference curve from the theoretical focal curve based on the results of the lens testing includes: The first slope is obtained based on the focus value of the clear image at the minimum zoom position and the focus value of the clear image at the maximum zoom position in the described scene environment. The focusing reference curve is selected from multiple theoretical focusing curves based on the first slope.
2. The focusing curve correction method according to claim 1, characterized in that, The step of selecting multiple first feature points from the focusing reference curve based on the tangent slope of the theoretical focusing curve, calculating correction parameters based on the multiple first feature points, and correcting multiple theoretical focusing curves based on the correction parameters includes: Each of the theoretical focusing curves includes multiple second feature points; Based on the slope of the tangent of the theoretical focusing curve, select multiple first feature points from multiple second feature points of the focusing reference curve, and calculate correction parameters based on the multiple first feature points; The theoretical focusing curve is corrected according to the correction parameters.
3. The focusing curve correction method according to claim 2, characterized in that, The step of calculating correction parameters based on the first feature point and correcting the theoretical focusing curve based on the correction parameters includes: Connecting adjacent second feature points of each theoretical focusing curve yields multiple lens polygonal lines; The camera device is focused onto multiple first feature points to obtain multiple corresponding actual feature points; The correction parameters are calculated based on the adjacent first feature points and the corresponding actual feature points; Each focus correction curve is obtained by fitting each theoretical focus curve with multiple lens polygons and corresponding correction parameters.
4. The focusing curve correction method according to claim 2, characterized in that, The second feature point of each of the theoretical focusing curves includes the starting point, ending point, first midpoint of the rising edge, second midpoint of the falling edge, vertex, and / or bottom point of the theoretical focusing curve.
5. The focusing curve correction method according to claim 3, characterized in that, Among the second characteristic points of the rising edge of the theoretical focusing curve, the slope of the first midpoint of the rising edge has the smallest difference from 1; Among the second characteristic points of the falling edge of the theoretical focusing curve, the absolute value of the slope of the second midpoint of the falling edge has the smallest difference from 1.
6. A focusing curve correction device, characterized in that, Applied to camera equipment, the device includes: The acquisition module is used to acquire multiple theoretical focusing curves of the camera device; The selection module is used to perform lens testing based on the on-site environment and select a focusing reference curve from the theoretical focusing curve based on the results of the lens testing. The selection module is further configured to obtain a first slope based on the focus value of the image in sharp focus at the minimum zoom position and the focus value of the image in sharp focus at the maximum zoom position in the on-site environment; and select the focus reference curve from multiple theoretical focus curves based on the first slope. The correction module is used to select multiple first feature points from the focusing reference curve based on the tangent slope of the theoretical focusing curve, calculate correction parameters based on the multiple first feature points, and correct multiple theoretical focusing curves based on the correction parameters.
7. The focusing curve correction device according to claim 6, characterized in that, The correction module also includes: The selection unit is used to select multiple first feature points from multiple second feature points of the focusing reference curve according to the slope of the tangent of the theoretical focusing curve, wherein each theoretical focusing curve includes multiple second feature points. A focusing unit is used to focus the camera device onto multiple first feature points respectively, thereby obtaining multiple corresponding actual feature points; The curve correction unit is used to calculate correction parameters based on adjacent first feature points and corresponding actual feature points; and to fit each theoretical focus curve with multiple lens polygons and corresponding correction parameters to obtain each focus correction curve; the lens polygons are obtained by connecting adjacent second feature points of each theoretical focus curve.
8. A calibration device, characterized in that, It includes a processor and a memory, the memory being used to store instructions, and the processor being used to execute the instructions, wherein when the processor executes the instructions, it performs the focus curve correction method as described in any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the focus curve correction method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Calibration method and device of zooming tracking curve
CN105611159A
Lens calibration method and device, electronic device and storage medium
CN114900683A