Optical center correction method and device, terminal equipment and storage medium

By using the optical center correction method, the imaging area of ​​the IP camera is automatically corrected using optical center testing equipment and offset parameters. This solves the problem of the optical center of the lens not coinciding with the center of the image sensor, and improves the imaging quality and brightness uniformity.

CN119450204APending Publication Date: 2025-02-14GEER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310960203.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-01
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

During the production of IP cameras, factors such as the accuracy of the positioning holes on the PCB board, the size of the image sensor, and the design tolerances of the image lens can cause the optical center of the lens to not completely coincide with the geometric center of the image sensor, resulting in a decrease in image quality and problems such as vignetting and SFR (Surface Mount Factor) defects.

Method used

The original image is acquired through the optical center testing equipment, the original imaging area is generated, test data is received, and the offset parameters are calculated based on the test data to correct the imaging area, including offset step size, offset gradient, offset speed, offset distance and offset direction, until the imaging area meets the brightness consistency requirements.

Benefits of technology

It improves the imaging quality of optical products without the need for manual disassembly, ensures that the center of the imaging area coincides with the optical center of the lens, eliminates vignetting, and improves the uniformity of imaging brightness and SFR index.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119450204A_ABST
    Figure CN119450204A_ABST
Patent Text Reader

Abstract

The invention discloses an optical center correction method and device, terminal equipment and a storage medium, and the method comprises the steps: carrying out the photographing in response to a test instruction sent by optical center test equipment, and obtaining an original image; sending the original image to optical center testing equipment, and generating an original imaging area based on the original image; receiving test data fed back by the optical center test equipment; and correcting the position of the center of the original imaging area relative to the optical center of the lens based on the test data to obtain a corrected imaging area. By applying the optical center correction scheme, the overall effect of the original imaging area shot by the optical product is analyzed, the brightness data of the test area are obtained, the original imaging area is corrected based on the brightness data of the test area, finally optical center correction is achieved, and the imaging quality of the optical product is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of optical product manufacturing, and in particular to an optical center correction method, device, terminal equipment and storage medium. Background Art

[0002] With the advancement of technology, more and more consumers are beginning to pay attention to home safety and the ability to remotely monitor indoor and outdoor safety conditions anytime and anywhere. IP cameras (network cameras) are favored by more and more consumers for their real-time remote monitoring, high reliability, cost-effectiveness, safety, easy use and maintenance, and wide monitoring area. IP cameras not only have the image capture function of traditional cameras, but also have built-in digital compression controllers, so that audio and video data can be transmitted to the user's mobile phone APP through wired or wireless networks, and can realize two-way voice, WiFi, alarm, motion detection and other functions. Therefore, the quality of optical product imaging directly affects the user experience.

[0003] At present, in the production and assembly process of IPcamera, due to factors such as the positioning hole accuracy of the PCB board, the size of the image sensor, the patch accuracy, and the design tolerance of the image lens itself, the center of the lens (optical center) and the geometric center of the image sensor cannot be completely overlapped in the vertical direction during the assembly process of the lens and the PCB, that is, the optical center of the IPcamera optical product has shifted. After assembly and production line test tooling testing, IPcamera optical products with optical center shift will be found to have uneven overall brightness of the image or image, dark corners will exist in the surrounding areas, and there is a high risk of manually disassembling the machine for optical center correction, which ultimately leads to failure of the evaluation indicator SFR (spatial frequency response) and low imaging quality of the optical product. Summary of the invention

[0004] The main purpose of the present invention is to provide an optical center correction method, device, terminal equipment and storage medium, aiming to realize the optical center correction of optical products and improve the imaging quality of optical products.

[0005] To achieve the above object, the present invention provides an optical center correction method, which is applied to an optical center correction system. The optical center correction method comprises the following steps:

[0006] In response to a test instruction issued by an optical center test device, taking a photo to obtain an original image;

[0007] Sending the original image to the optical center testing device, and generating an original imaging area based on the original image;

[0008] Receiving test data fed back by the optical center test equipment;

[0009] Based on the test data, the position of the center of the original imaging area relative to the optical center of the lens is corrected to obtain a corrected imaging area.

[0010] Optionally, the test data includes one or more of an optical center offset, brightness data of a test area, original imaging area center data, and imaging circle center data, and the step of correcting the original imaging area based on the test data to obtain a corrected imaging area includes:

[0011] Calculate and obtain the offset parameters based on the optical center offset in the test data, the original imaging area center data and the imaging circle center data, wherein the offset parameters include one or more of an offset step length, an offset gradient, an offset speed, an offset distance, an offset time and an offset direction;

[0012] An offset operation is performed on the original imaging area based on the brightness data of the test area in the test data and the offset direction, offset step, offset time, and offset distance in the offset parameters to obtain a corrected imaging area.

[0013] Optionally, the step of calculating and obtaining the offset parameter based on the optical center offset in the test data, the original imaging area center data and the imaging circle center data comprises:

[0014] Calculate the offset step length based on the optical center offset in the test data;

[0015] Calculate the offset gradient based on the offset step size;

[0016] Calculate the migration speed based on the migration gradient and the migration step size;

[0017] Calculating an offset distance based on an optical center offset in the test data and a preset offset target;

[0018] Calculate the migration time based on the migration distance and the migration speed;

[0019] The offset direction is calculated and obtained based on the optical center offset in the test data, the original imaging area center data and the imaging circle center data, and the offset step length.

[0020] Optionally, the step of performing an offset operation on the original imaging area based on the brightness data of the test area in the test data and an offset direction, an offset step, an offset time, an offset distance, and an offset speed in the offset parameters to obtain a corrected imaging area includes:

[0021] Performing an offset operation on the original imaging area based on an offset step size and an offset direction in the offset parameters to obtain a preliminarily corrected imaging area;

[0022] A secondary shift operation is performed on the initially corrected imaging area based on the brightness data of the test area in the test data and the shift direction, shift step, shift time, shift distance and shift speed in the shift parameters to obtain a corrected imaging area.

[0023] Optionally, the step of performing an offset operation on the original imaging area based on the offset step size and the offset direction in the offset parameters to obtain a preliminarily corrected imaging area includes:

[0024] The original imaging area is shifted based on the shift step size and the shift direction in the shift parameters to obtain a first shifted imaging area;

[0025] Acquire the actual distance between the first offset imaging area and the imaging circle from the optical center testing device;

[0026] Determining whether the actual distance is greater than or equal to a preset first threshold;

[0027] If so, the first offset imaging area is offset based on the offset step size and the offset direction in the offset parameters to obtain a new first offset imaging area, and the steps are performed: obtaining the actual distance between the first offset imaging area and the imaging circle from the optical center test device;

[0028] If not, it is determined that the first offset imaging area is currently the imaging area for preliminary correction.

[0029] Optionally, the step of performing a secondary offset operation on the initially corrected imaging area based on the brightness data of the test area in the test data and the offset direction, offset step, offset time, offset distance, and offset speed in the offset parameters to obtain the corrected imaging area includes:

[0030] offsetting the initially corrected imaging area based on the offset step length and the offset direction in the offset parameters to obtain a second offset imaging area;

[0031] Estimate and obtain a first brightness value of an imaging circle and a second brightness value of an imaging circle based on brightness data of a test area in the test data, a shift time, a shift distance, a shift speed in the shift parameters, and a pre-acquired image resolution;

[0032] Determine whether a difference between a first brightness value of the imaging circle and a second brightness value of the imaging circle is greater than a preset second preset threshold;

[0033] If so, the second offset imaging area is offset based on the offset step size and the offset direction in the offset parameters to obtain a new second offset imaging area, and the steps are performed: based on the brightness data of the test area in the test data, the offset time, the offset distance, the offset speed in the offset parameters and the pre-acquired image resolution, the first brightness value of the imaging circle and the second brightness value of the imaging circle are estimated and obtained;

[0034] If not, it is determined that the current second offset imaging area is the corrected imaging area.

[0035] Optionally, the step of estimating and obtaining a first brightness value of an imaging circle and a second brightness value of an imaging circle based on brightness data of a test area in the test data, an offset time, an offset distance, an offset speed in the offset parameters, and a pre-acquired image resolution comprises:

[0036] Obtaining a first-category area brightness value, a second-category area brightness value, and a third-category area brightness value based on brightness data of the test area in the test data;

[0037] Obtaining a brightness change rate of the first-category area based on the brightness value of the first-category area, the brightness value of the third-category area, and the pre-acquired image resolution;

[0038] Obtaining a brightness change rate of the second-category area based on the brightness value of the second-category area, the brightness value of the third-category area, and the pre-acquired image resolution;

[0039] Based on the migration speed, the migration time, the brightness value of the first type of area and the brightness change rate of the first type of area in the migration parameters, estimate and obtain a first brightness value of the imaging circle;

[0040] The second brightness value of the imaging circle is estimated and obtained based on the offset speed, the offset distance, the brightness value of the second type of area and the brightness change rate of the second type of area in the offset parameters.

[0041] In addition, to achieve the above-mentioned purpose, the present invention also provides an optical center correction device, the device comprising:

[0042] A test response module, used to respond to a test instruction issued by the optical center test device and take a photo to obtain an original image;

[0043] A sending module, used for sending the original image to the optical center testing device;

[0044] A generating module, used for generating an original imaging area based on the original image;

[0045] A receiving module, used for receiving the test data fed back by the optical center test equipment;

[0046] The optical center correction module is used to correct the position of the center of the original imaging area relative to the optical center of the lens based on the test data to obtain a corrected imaging area.

[0047] Optionally, the optical center correction module is further used for:

[0048] Calculate and obtain the offset parameters based on the optical center offset in the test data, the original imaging area center data and the imaging circle center data, wherein the offset parameters include one or more of an offset step length, an offset gradient, an offset speed, an offset distance, an offset time and an offset direction;

[0049] An offset operation is performed on the original imaging area based on the brightness data of the test area in the test data and the offset direction, offset step, offset time, and offset distance in the offset parameters to obtain a corrected imaging area.

[0050] Optionally, the optical center correction module is further used for:

[0051] Calculate the offset step length based on the optical center offset in the test data;

[0052] Calculate the offset gradient based on the offset step size;

[0053] Calculate the migration speed based on the migration gradient and the migration step size;

[0054] Calculating an offset distance based on an optical center offset in the test data and a preset offset target;

[0055] Calculate the migration time based on the migration distance and the migration speed;

[0056] The offset direction is calculated and obtained based on the optical center offset in the test data, the original imaging area center data and the imaging circle center data, and the offset step length.

[0057] Optionally, the optical center correction module is further used for:

[0058] Performing an offset operation on the original imaging area based on an offset step size and an offset direction in the offset parameters to obtain a preliminarily corrected imaging area;

[0059] A secondary shift operation is performed on the initially corrected imaging area based on the brightness data of the test area in the test data and the shift direction, shift step, shift time, shift distance and shift speed in the shift parameters to obtain a corrected imaging area.

[0060] Optionally, the optical center correction module is further used for:

[0061] The original imaging area is shifted based on the shift step size and the shift direction in the shift parameters to obtain a first shifted imaging area;

[0062] Acquire the actual distance between the first offset imaging area and the imaging circle from the optical center testing device;

[0063] Determining whether the actual distance is greater than or equal to a preset first threshold;

[0064] If so, the first offset imaging area is offset based on the offset step size and the offset direction in the offset parameters to obtain a new first offset imaging area, and the steps are performed: obtaining the actual distance between the first offset imaging area and the imaging circle from the optical center test device;

[0065] If not, it is determined that the first offset imaging area is currently the imaging area for preliminary correction.

[0066] Optionally, the optical center correction module is further used for:

[0067] offsetting the initially corrected imaging area based on the offset step length and the offset direction in the offset parameters to obtain a second offset imaging area;

[0068] Estimate and obtain a first brightness value of an imaging circle and a second brightness value of an imaging circle based on brightness data of a test area in the test data, a shift time, a shift distance, a shift speed in the shift parameters, and a pre-acquired image resolution;

[0069] Determine whether a difference between a first brightness value of the imaging circle and a second brightness value of the imaging circle is greater than a preset second preset threshold;

[0070] If so, the second offset imaging area is offset based on the offset step size and the offset direction in the offset parameters to obtain a new second offset imaging area, and the steps are performed: based on the brightness data of the test area in the test data, the offset time, the offset distance, the offset speed in the offset parameters and the pre-acquired image resolution, the first brightness value of the imaging circle and the second brightness value of the imaging circle are estimated and obtained;

[0071] If not, it is determined that the current second offset imaging area is the corrected imaging area.

[0072] Optionally, the optical center correction module is further used for:

[0073] Obtaining a first-category area brightness value, a second-category area brightness value, and a third-category area brightness value based on brightness data of the test area in the test data;

[0074] Obtaining a brightness change rate of the first-category area based on the brightness value of the first-category area, the brightness value of the third-category area, and the pre-acquired image resolution;

[0075] Obtaining a brightness change rate of the second-category area based on the brightness value of the second-category area, the brightness value of the third-category area, and the pre-acquired image resolution;

[0076] Based on the migration speed, the migration time, the brightness value of the first type of area and the brightness change rate of the first type of area in the migration parameters, estimate and obtain a first brightness value of the imaging circle;

[0077] The second brightness value of the imaging circle is estimated and obtained based on the offset speed, the offset distance, the brightness value of the second type of area and the brightness change rate of the second type of area in the offset parameters.

[0078] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal device, which includes a memory, a processor, and an optical center correction program stored in the memory and executable on the processor, and the optical center correction program, when executed by the processor, implements the optical center correction method as described above.

[0079] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which an optical center correction program is stored, and when the optical center correction program is executed by a processor, the optical center correction method as described above is implemented.

[0080] An optical center correction method, device, terminal device, and storage medium proposed in an embodiment of the present invention respond to a test instruction issued by an optical center test device, take a photo to obtain an original image; send the original image to the optical center test device, and generate an original imaging area based on the original image; receive test data fed back by the optical center test device; and correct the position of the center of the original imaging area relative to the optical center of the lens based on the test data to obtain a corrected imaging area. The embodiment of the present invention uses the above optical center correction scheme to analyze the overall effect of the original imaging area obtained by shooting during the test, and obtains the brightness data of the test area. The original imaging area is corrected based on the brightness data of the test area, and finally the optical center correction is achieved to improve the imaging quality of the optical product. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] Figure 1 This is a functional module diagram of a terminal device to which the optical center correction device of the present invention belongs;

[0082] Figure 2 This is a schematic diagram of the internal structure of an optical product to which the optical center correction device of the present invention belongs;

[0083] Figure 3This is a schematic diagram of the whole machine test framework of the optical product to which the optical center correction device of the present invention belongs;

[0084] Figure 4 is a flow chart of a first exemplary embodiment of an optical center correction method of the present invention;

[0085] Figure 5 This is an imaging analysis diagram when the optical center is not shifted in the first exemplary embodiment of the optical center correction method of the present invention;

[0086] Figure 6 A schematic diagram of a test area of ​​a first exemplary embodiment of an optical center correction method of the present invention;

[0087] Figure 7 It is a schematic diagram of the correction process of the imaging area of ​​an optical product of the first exemplary embodiment of the optical center correction method of the present invention;

[0088] Figure 8 is a flow chart of a second exemplary embodiment of an optical center correction method of the present invention;

[0089] Fig. 9 is a flow chart of a third exemplary embodiment of an optical center correction method of the present invention;

[0090] Fig.10 is a vector diagram of optical center deviation in the third exemplary embodiment of the optical center correction method of the present invention;

[0091] Fig.11 is a flow chart of a fourth exemplary embodiment of an optical center correction method of the present invention;

[0092] Fig.12 is a flow chart of a fifth exemplary embodiment of an optical center correction method of the present invention;

[0093] Fig.13 is a flow chart of a sixth exemplary embodiment of an optical center correction method of the present invention;

[0094] Fig.14 A schematic diagram of analyzing the brightness value of a test area in a sixth exemplary embodiment of an optical center correction method of the present invention;

[0095] Fig.15 is a flow chart of a seventh exemplary embodiment of the optical center correction method of the present invention;

[0096] Fig.16 is a flow chart of an eighth exemplary embodiment of an optical center correction method of the present invention;

[0097] Fig.17 Schematic diagram of the internal structure of the optical center correction device of the present invention.

[0098] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0099] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0100] The main solution of the embodiment of the present invention is: in response to a test instruction issued by an optical center test device, take a photo to obtain an original image; send the original image to the optical center test device, and generate an original imaging area based on the original image; receive test data fed back by the optical center test device; and correct the position of the center of the original imaging area relative to the optical center of the lens based on the test data to obtain a corrected imaging area.

[0101] The embodiments of the present application take into account that in the current industry, during the production and assembly process of optical products, due to factors such as the positioning hole accuracy of the PCB board, the size of the image sensor, the patch accuracy, and the design tolerance of the image lens itself, the center of the lens (optical center) and the geometric center of the image sensor cannot be completely overlapped in the vertical direction during the lens assembly process with the PCB. After assembly and production line test tooling testing, it will be found that the overall brightness of the imaged picture or image is uneven, there will be dark corners in the surrounding areas, and there is a high risk of manual disassembly for optical center correction, resulting in low imaging quality of the optical product.

[0102] Based on this, an embodiment of the present application provides a solution, which obtains the brightness data of the test area based on the overall effect of the original imaging area captured during the test process, corrects the original imaging area based on the brightness data of the test area, and finally realizes optical center correction to improve the imaging quality of the optical product.

[0103] Specifically, refer to Figure 1 , Figure 1 This is a functional module diagram of the terminal device to which the optical center correction device of this application belongs. The optical center correction device can be a device that is independent of the terminal device and can perform data screening and recommendation, and it can be carried on the terminal device in the form of hardware or software. The terminal device can be an intelligent mobile terminal with data processing function, or a fixed terminal device or server with data processing function, etc. In addition, the optical center correction device can also be carried in the optical center correction system.

[0104] In this embodiment, the terminal device to which the optical center correction device belongs includes at least an output module 110 , a processor 120 , a memory 130 and a communication module 140 .

[0105] The memory 130 stores an operating system and an optical center correction program. The output module 110 may be a display screen, etc. The communication module 140 may include a WIFI module, a mobile communication module, a Bluetooth module, etc., and communicates with an external device or server through the communication module 140.

[0106] When the optical center correction program in the memory 130 is executed by the processor, the following steps are implemented:

[0107] In response to a test instruction issued by an optical center test device, taking a photo to obtain an original image;

[0108] Sending the original image to the optical center testing device, and generating an original imaging area based on the original image;

[0109] Receiving test data fed back by the optical center test equipment;

[0110] Based on the test data, the position of the center of the original imaging area relative to the optical center of the lens is corrected to obtain a corrected imaging area.

[0111] Furthermore, when the optical center correction program in the memory 130 is executed by the processor, the following steps are also implemented:

[0112] Calculate and obtain the offset parameters based on the optical center offset in the test data, the original imaging area center data and the imaging circle center data, wherein the offset parameters include one or more of an offset step length, an offset gradient, an offset speed, an offset distance, an offset time and an offset direction;

[0113] An offset operation is performed on the original imaging area based on the brightness data of the test area in the test data and the offset direction, offset step, offset time, and offset distance in the offset parameters to obtain a corrected imaging area.

[0114] Furthermore, when the optical center correction program in the memory 130 is executed by the processor, the following steps are also implemented:

[0115] Calculate the offset step length based on the optical center offset in the test data;

[0116] Calculate the offset gradient based on the offset step size;

[0117] Calculate the migration speed based on the migration gradient and the migration step size;

[0118] Calculating an offset distance based on an optical center offset in the test data and a preset offset target;

[0119] Calculate the migration time based on the migration distance and the migration speed;

[0120] The offset direction is calculated and obtained based on the optical center offset in the test data, the original imaging area center data and the imaging circle center data, and the offset step length.

[0121] Furthermore, when the optical center correction program in the memory 130 is executed by the processor, the following steps are also implemented:

[0122] Performing an offset operation on the original imaging area based on an offset step size and an offset direction in the offset parameters to obtain a preliminarily corrected imaging area;

[0123] A secondary shift operation is performed on the initially corrected imaging area based on the brightness data of the test area in the test data and the shift direction, shift step, shift time, shift distance and shift speed in the shift parameters to obtain a corrected imaging area.

[0124] Furthermore, when the optical center correction program in the memory 130 is executed by the processor, the following steps are also implemented:

[0125] The original imaging area is shifted based on the shift step size and the shift direction in the shift parameters to obtain a first shifted imaging area;

[0126] Acquire the actual distance between the first offset imaging area and the imaging circle from the optical center testing device;

[0127] Determining whether the actual distance is greater than or equal to a preset first threshold;

[0128] If so, the first offset imaging area is offset based on the offset step size and the offset direction in the offset parameters to obtain a new first offset imaging area, and the steps are performed: obtaining the actual distance between the first offset imaging area and the imaging circle from the optical center test device;

[0129] If not, it is determined that the first offset imaging area is currently the imaging area for preliminary correction.

[0130] Furthermore, when the optical center correction program in the memory 130 is executed by the processor, the following steps are also implemented:

[0131] offsetting the initially corrected imaging area based on the offset step length and the offset direction in the offset parameters to obtain a second offset imaging area;

[0132] Estimate and obtain a first brightness value of an imaging circle and a second brightness value of an imaging circle based on brightness data of a test area in the test data, a shift time, a shift distance, a shift speed in the shift parameters, and a pre-acquired image resolution;

[0133] Determine whether a difference between a first brightness value of the imaging circle and a second brightness value of the imaging circle is greater than a preset second preset threshold;

[0134] If so, the second offset imaging area is offset based on the offset step size and the offset direction in the offset parameters to obtain a new second offset imaging area, and the steps are performed: based on the brightness data of the test area in the test data, the offset time, the offset distance, the offset speed in the offset parameters and the pre-acquired image resolution, the first brightness value of the imaging circle and the second brightness value of the imaging circle are estimated and obtained;

[0135] If not, it is determined that the current second offset imaging area is the corrected imaging area.

[0136] Furthermore, when the optical center correction program in the memory 130 is executed by the processor, the following steps are also implemented:

[0137] Obtaining a first-category area brightness value, a second-category area brightness value, and a third-category area brightness value based on brightness data of the test area in the test data;

[0138] Obtaining a brightness change rate of the first-category area based on the brightness value of the first-category area, the brightness value of the third-category area, and the pre-acquired image resolution;

[0139] Obtaining a brightness change rate of the second-category area based on the brightness value of the second-category area, the brightness value of the third-category area, and the pre-acquired image resolution;

[0140] Based on the migration speed, the migration time, the brightness value of the first type of area and the brightness change rate of the first type of area in the migration parameters, estimate and obtain a first brightness value of the imaging circle;

[0141] The second brightness value of the imaging circle is estimated and obtained based on the offset speed, the offset distance, the brightness value of the second type of area and the brightness change rate of the second type of area in the offset parameters.

[0142] Specifically, the scheme of this embodiment is applied in the process of assembling an optical product. This embodiment takes the optical product as the execution subject, and the optical product is equipped with the above-mentioned optical center correction device to solve the problem of optical center deviation.

[0143] Reference Figure 2 , Figure 2 Schematic diagram of the optical product assembly of this embodiment; Figure 2As shown, the lens (Lens) and the lens support (holder) are assembled into a lens module, and then the lens module is fixed to the PCB (Printed Circuit Board) by screws. The light enters the camera through the lens, and then passes through the IR filter (infrared filter) of the lens itself to filter the infrared light, and finally reaches the image sensor. The light entering the lens will form an imaging circle. The pixel points of the sensor capture the light of the imaging circle and convert the optical signal into an electrical signal, which is then converted into a digital signal through the internal ADC (Analog to Digital Converter) circuit and transmitted to the back-end DSP (Digital Signal Processor) for processing, and finally output in RGB (Red, Green, Blue) or YUV ("YUV" is a color encoding method) format. Figure 2 The actual meaning of each number is shown in Table 1 below:

[0144]

[0145]

[0146] Table 1

[0147] Reference Figure 3 , Figure 3 It is a schematic diagram of the test framework of the optical product to which the optical center correction device belongs. In this embodiment, the optical center correction device of the optical product is connected to the optical center test device through UART (Universal Asynchronous Receiver / Transmitter) and USB (Universal Serial Bus). UART is used for two-way communication between the optical center test device and the optical product. The optical center test device sends control instructions, original imaging area center data and imaging circle center data, judgment results and brightness data of the test area to the optical product. USB is used for the optical product to send large amount of picture information to the optical center test device.

[0148] This embodiment adopts the above scheme, responds to the test instruction issued by the optical center test device, takes a photo to obtain the original image; sends the original image to the optical center test device, and generates the original imaging area based on the original image; receives the test data fed back by the optical center test device; and corrects the position of the center of the original imaging area relative to the optical center of the lens based on the test data to obtain the corrected imaging area. The embodiment of the present invention obtains the brightness value of the entire photo area by analyzing the overall effect of the photo taken by the optical product, and further performs brightness analysis based on the brightness value, thereby performing optical center correction on the original imaging area generated by the optical product to improve the imaging quality of the optical product.

[0149] Based on the above terminal device architecture but not limited to the above architecture, an embodiment of the method of the present application is proposed.

[0150] Reference Figure 4 , Figure 4 This is a flow chart of the first exemplary embodiment of the optical center correction method of the present application. The optical center correction method comprises:

[0151] Step S10, in response to a test instruction issued by the optical center test device, taking a photo to obtain an original image;

[0152] Specifically, the scheme of this embodiment is applied in the assembly process of optical products, and this embodiment takes the optical product as the execution subject. In this embodiment, the optical product is connected for communication via UART and USB, and the optical center test device sends a test instruction to the optical product, and the optical product starts taking pictures and obtains the original image. Among them, UART is usually used for serial communication, and transmits data by sending and receiving data bits, start bits, stop bits and check bits. It is a simple, reliable and low-cost communication protocol, which is widely used in embedded systems, communication equipment, industrial automation and other fields. In this embodiment, the optical center test device sends a test instruction to the optical product via UART, and the optical product starts taking pictures after receiving the test instruction.

[0153] Step S20, sending the original image to the optical center testing device, and generating an original imaging area based on the original image;

[0154] Reference Figure 5 , Figure 5 This is an imaging analysis diagram when the optical center of the optical product of this embodiment is not offset.

[0155] Specifically, Figure 5 As shown in FIG. 1 , the imaging circle is formed by the light entering the lens when taking a photo, and the optical center of the optical product can be represented by the center of the imaging circle. After the optical product takes a photo, the original image is sent to the optical center testing device, so that the optical center testing device can measure the distance between the center of the image sensor and the center of the imaging circle. Figure 5 The situation shown is that the optical center is not offset, so the center of the image sensor coincides with the optical center of the optical product (that is, the center of the imaging circle). In addition, after the optical product takes a picture and obtains the original image, in order to image normally, it will also capture and generate the original imaging area according to the geometric center of the sensor. For example, for an original image with a resolution of 1080p (1920*1080), a 1920*1080 original imaging area will be generated. Based on this, when designing an image sensor, the length and width of the image sensor pixels should be much larger than the image resolution.

[0156] Step S30, receiving the test data fed back by the optical center test device;

[0157] Specifically, referring to the principle of generating the original imaging area in step S20, if the optical center of the optical product is offset, the center of the original imaging area in the original image and the center of the imaging circle will not coincide, and the optical center test device can detect the distance between the center of the original imaging area and the center of the imaging circle in real time, that is, the optical center offset. The optical center offset belongs to the test data and will be fed back to the optical product by the optical center test device through UART.

[0158] Reference Figure 6 , Figure 6 Schematic diagram of the test area in this embodiment.

[0159] Specifically, the test data fed back by the optical center test device to the optical product may include not only the optical center offset, but also the brightness data of the test area, the original imaging area center data and the imaging circle center data. Figure 6 As shown, Figure 6 It is a way of intercepting the test area in the brightness data of the test area. Areas S0, S1, S2, S3, and S4 are exemplary test areas intercepted in this embodiment, O2 is the center position of the original imaging area, areas S1, S2, S3, and S4 are the four corners of the original imaging area, and area S0 is the area where O2 is located. The test area can also be intercepted by itself during the implementation process as needed, and is not limited here. In addition, the original imaging area center data includes the position coordinate data of the center of the original imaging area, and the imaging circle center data includes the position coordinate data of the center of the imaging circle.

[0160] Step S40: Correcting the position of the center of the original imaging area relative to the optical center of the lens based on the test data to obtain a corrected imaging area.

[0161] Reference Figure 7 , Figure 7 It is a schematic diagram of the correction process of the imaging area of ​​the optical product of this embodiment.

[0162] Specifically, Figure 7 As shown, O1 is the center of the imaging circle, and O2 is the center of the original imaging area. Due to the influence of factors such as PCB via size, lens size and other relative positions during the actual product production process, the actual assembly cannot achieve complete overlap of O1 and O2. Based on this, this embodiment proposes to change the position of the center of the original imaging area intercepted by the image sensor without manual disassembly correction, thereby correcting the position of the center of the original imaging area relative to the optical center of the lens (that is, the center of the imaging circle), and finally obtaining a corrected imaging area, where, as Figure 7 The center of the corrected imaging area coincides with the center O1 of the imaging circle.

[0163] The present embodiment proposes an optical center correction method, which obtains an original image by taking a photo in response to a test instruction issued by an optical center test device; sends the original image to the optical center test device, and generates an original imaging area based on the original image; receives test data fed back by the optical center test device; and corrects the position of the center of the original imaging area relative to the optical center of the lens based on the test data to obtain a corrected imaging area. The embodiment of the present invention uses the above optical center correction scheme to analyze the overall effect of the original imaging area obtained by taking a photo during the test, and obtains the brightness data of the test area, and corrects the original imaging area based on the brightness data of the test area, and finally achieves optical center correction to improve the imaging quality of optical products.

[0164] Reference Figure 8 , Figure 8 This is a flow chart of a second exemplary embodiment of the optical center correction method of the present application.

[0165] Based on the first embodiment, a second embodiment of the present application is proposed. The difference between the second embodiment of the present application and the first embodiment is that in this embodiment, in step S40, the position of the center of the original imaging area relative to the optical center of the lens is corrected based on the test data, and the corrected imaging area is refined.

[0166] In this embodiment, step S40, based on the test data, the position of the center of the original imaging area relative to the optical center of the lens is corrected, and the corrected imaging area includes:

[0167] Step S401, calculating and obtaining the offset parameters based on the optical center offset in the test data, the original imaging area center data and the imaging circle center data, wherein the offset parameters include one or more of an offset step length, an offset gradient, an offset speed, an offset distance, an offset time and an offset direction;

[0168] Specifically, the present embodiment first obtains test data from the optical center test device, the test data including the optical center offset, the brightness data of the test area, the original imaging area center data and the imaging circle center data, and then calculates and obtains the offset parameters based on the optical center offset, the original imaging area center data and the imaging circle center data in the test data, the offset parameters characterizing the actual physical characteristics of the movement of the original imaging area during the correction process, such as common physical parameters such as time, distance and speed. The offset parameters in the present embodiment may include one or more of the offset step, offset gradient, offset speed, offset distance, offset time and offset direction. The subsequent correction scheme will correct the original imaging area intercepted by the optical product based on the above-mentioned offset parameters.

[0169] Step S402 , performing an offset operation on the original imaging area based on the brightness data of the test area in the test data and the offset direction, offset step, offset time, and offset distance in the offset parameters to obtain a corrected imaging area.

[0170] Specifically, based on the offset direction and the offset step of the offset parameters obtained in step S401, the optical product can offset the original imaging area through the image sensor, and after offsetting to a certain extent in the direction of the center of the imaging circle, because the actual error is too small and difficult to avoid, this embodiment chooses to judge whether the offset of the original imaging area has met the requirement of consistent image brightness based on the brightness of the test area based on the test data and the offset time and offset distance in the offset parameters, thereby avoiding excessive offset, improving the correction efficiency, thereby improving the production efficiency of the optical product, and improving the imaging quality of the optical product.

[0171] The present embodiment proposes an optical center correction method, which responds to a test instruction issued by an optical center test device, takes a photo to obtain an original image; sends the original image to the optical center test device, and generates an original imaging area based on the original image; receives test data fed back by the optical center test device; and corrects the position of the center of the original imaging area relative to the optical center of the lens based on the test data to obtain a corrected imaging area. The embodiment of the present invention obtains test data from the optical center test device by using the above optical center correction scheme, and analyzes the overall effect of the original imaging area obtained by taking a photo during the test based on the obtained test data, and finally realizes optical center correction to improve the imaging quality of optical products.

[0172] Reference Fig. 9 , Fig. 9 This is a flowchart of a third exemplary embodiment of the optical center correction method of the present application.

[0173] Based on the second embodiment, a third embodiment of the present application is proposed. The difference between the third embodiment of the present application and the second embodiment is that this embodiment refines step S401 by calculating and obtaining the offset parameters based on the optical center offset in the test data, the original imaging area center data, and the imaging circle center data.

[0174] In this embodiment, step S401, calculating and obtaining the offset parameter based on the optical center offset in the test data, the original imaging area center data and the imaging circle center data includes:

[0175] Step S4011, calculating the offset step length based on the optical center offset in the test data;

[0176] Specifically, the optical center offset calculation formula is defined as follows:

[0177] P1*(x+iy)=P2 (1)

[0178] In formula (1), P1 represents position 1, P2 represents position 2, and x represents that position 1 moves x units horizontally in a certain direction and y units vertically in a certain direction, and finally reaches position 2. Based on this, in this example, the appropriate horizontal and vertical offset steps can be set to ΔX and ΔY pixels (pixels, a basic unit of image acquisition). In addition, in the actual implementation process, the optical center offset may not occur in the horizontal or vertical directions, so the offset step in a certain direction may be 0.

[0179] Reference Fig.10 , Fig.10 Schematic diagram of the vector of the optical center offset in this embodiment.

[0180] like Fig.10 As shown, the optical center offset fed back by the optical center test device is X pixels in the horizontal direction and Y pixels in the vertical direction. Can be moved to If the actual production requires the optical center offset to be within 50 pixels and the image sensor size is 3um, the optical center offset X and Y will not exceed 150um. In addition, the horizontal and vertical offset steps ΔX and ΔY relative to the assignment of X and Y are shown in Table 2 below:

[0181]

[0182] Table 2

[0183] Step S4012, calculating an offset gradient based on the offset step length;

[0184] Specifically, in this embodiment, the formula for calculating and obtaining the offset gradient based on the offset step lengths ΔX and ΔY is as follows:

[0185] k=ΔY / ΔX=Y / X (2)

[0186] In formula (2), k is the offset gradient. In a specific implementation process, the offset gradient k can also be calculated based on the optical center offsets X and Y.

[0187] Step S4013, calculating a migration speed based on the migration gradient and the migration step length;

[0188] Specifically, in this embodiment, the formula for calculating the migration speed based on the migration gradient k and the migration steps ΔX and ΔY is as follows:

[0189]

[0190]

[0191] V=|k|×h (3)

[0192] In formula (3), V is the migration velocity, h is an intermediate variable representing the square root of the sum of the squares of ΔX and ΔY, and k is the migration gradient.

[0193] Step S4014, calculating the offset distance based on the optical center offset in the test data and a preset offset target;

[0194] Specifically, in this embodiment, the optical center offset requirement can be set to Z pixels. It should be understood that only when at least one of the optical center offsets X and Y is greater than Z, it is determined that the center of the original imaging area intercepted by the image sensor is offset from the center of the imaging circle (the optical center of the optical product). In order to ensure that the optical center offset index, the overall brightness of the picture, and the test efficiency of the production line are met, the preset offset target can be set to Z / 20 pixels. Based on the optical center offset in the test data and the preset offset target, the specific calculation formula for the offset distance is as follows:

[0195]

[0196] In formula (4), L is the offset distance, X and Y are the optical center offsets, and Z / 20 is the preset offset target.

[0197] Step S4015, calculating the migration time based on the migration distance and the migration speed;

[0198] Specifically, in this embodiment, the calculation formula of the offset time is as follows:

[0199] T=L / V (5)

[0200] In formula (5), T is the migration time, L is the migration distance, and V is the migration velocity.

[0201] Step S4016, calculating and obtaining the offset direction based on the optical center offset in the test data, the original imaging area center data and the imaging circle center data, and the offset step length.

[0202] Specifically, in this embodiment, according to formula (1) and Fig.10 In the embodiment shown, where the original imaging center is located in the third quadrant, the specific calculation formula for the offset direction can be obtained as follows:

[0203] P O2 *[(X+ΔX)+i(Y+ΔY)]=P O1 (6)

[0204] P in formula (6) O2 is the position of the center O2 of the original imaging area, P O1 is the position of the center O1 of the imaging circle, that is, the offset direction means that when the optical center offset in the horizontal direction is X and the optical center offset in the vertical direction is Y, the center O2 of the original imaging area moves toward the center O1 of the imaging circle with an offset step of ΔX in the horizontal direction and with an offset step of ΔY in the vertical direction.

[0205] It should be noted that, in this embodiment, steps S4014, S4015, and S4016 may be executed before the process from step S4011 to step S4013, or after step S4013, or simultaneously with step S4011 to step S4013. In actual implementation, the order of the above executions may be determined according to actual needs.

[0206] The present embodiment proposes an optical center correction method, which is to respond to a test instruction issued by an optical center test device, take a photo to obtain an original image; send the original image to the optical center test device, and generate an original imaging area based on the original image; receive test data fed back by the optical center test device; and correct the position of the center of the original imaging area relative to the optical center of the lens based on the test data to obtain a corrected imaging area. The embodiment of the present invention obtains test data from the optical center test device by using the above optical center correction scheme, and obtains various offset parameters required for optical center correction based on the obtained test data as the basis for correcting the original imaging area, and finally realizes optical center correction and improves the imaging quality of optical products.

[0207] Reference Fig.11 , Fig.11 4 is a flow chart of a fourth exemplary embodiment of the optical center correction method of the present application.

[0208] Based on the second embodiment, a fourth embodiment of the present application is proposed. The difference between the fourth embodiment of the present application and the second embodiment is that in this embodiment, for step S402, an offset operation is performed on the original imaging area based on the brightness data of the test area in the test data and the offset direction, offset step, offset time, offset distance, and offset speed in the offset parameters, so as to refine the corrected imaging area.

[0209] In this embodiment, step S402, based on the brightness data of the test area in the test data and the offset direction, offset step, offset time, offset distance, and offset speed in the offset parameters, the original imaging area is subjected to an offset operation, and the corrected imaging area is obtained, including:

[0210] Step S4021, performing an offset operation on the original imaging area based on the offset step size and the offset direction in the offset parameters to obtain a preliminarily corrected imaging area;

[0211] Specifically, in this embodiment, when the optical center offset in the horizontal direction is X and the optical center offset in the vertical direction is Y, the center O2 of the original imaging area can be offset toward the center O1 of the imaging circle with an offset step of ΔX in the horizontal direction and with an offset step of ΔY in the vertical direction, thereby correcting the position of the center of the original imaging area relative to the optical center of the lens and obtaining a preliminarily corrected imaging area.

[0212] Step S4022, performing a secondary offset operation on the initially corrected imaging area based on the brightness data of the test area in the test data and the offset direction, offset step, offset time, offset distance, and offset speed in the offset parameters to obtain a corrected imaging area.

[0213] Specifically, this embodiment analyzes the brightness data of the test area in the test data based on the offset direction, offset step, offset time, offset distance, and offset speed in the offset parameters, thereby obtaining a preliminary corrected overall brightness condition of the imaging area. When the offset operation is actually performed on the imaging area that has been initially corrected, the overall brightness condition of the imaging area that has been initially corrected will also change accordingly. Based on the judgment of the overall brightness condition of the original imaging area, it can be determined when to stop the secondary offset operation on the imaging area that has been initially corrected. When the operation stops, the imaging area captured by the optical product is the corrected imaging area, and at this time, the overall brightness condition of the imaging area should also reach an ideal condition.

[0214] The present embodiment proposes an optical center correction method, which responds to a test instruction issued by an optical center test device, takes a photo to obtain an original image; sends the original image to the optical center test device, and generates an original imaging area based on the original image; receives test data fed back by the optical center test device; and corrects the position of the center of the original imaging area relative to the optical center of the lens based on the test data to obtain a corrected imaging area. The embodiment of the present invention uses the above optical center correction scheme to obtain test data from the optical center test device, and obtains various offset parameters required for optical center correction based on the obtained test data, corrects the original imaging area, obtains a corrected imaging area, and finally achieves optical center correction to improve the imaging quality of optical products.

[0215] Reference Fig.12 , Fig.12 This is a flowchart of a fifth exemplary embodiment of the optical center correction method of the present application.

[0216] Based on the fourth embodiment, the fifth embodiment of the present application is proposed. The difference between the fifth embodiment of the present application and the fourth embodiment is that in this embodiment, in step S4021, an offset operation is performed on the original imaging area based on the offset step size and the offset direction in the offset parameters, so as to refine the imaging area obtained by preliminary correction.

[0217] In this embodiment, step S4021, performing an offset operation on the original imaging area based on the offset step size and the offset direction in the offset parameters, and obtaining a preliminarily corrected imaging area includes:

[0218] Step S40211, shifting the original imaging area based on the shift step and the shift direction in the shift parameters to obtain a first shifted imaging area;

[0219] Specifically, according to formula (6) in the above embodiment, the offset direction indicates that when the optical center offset in the horizontal direction is X and the optical center offset in the vertical direction is Y, the center O2 of the original imaging area moves toward the center O1 of the imaging circle in the horizontal direction with an offset step of ΔX and in the vertical direction with an offset step of ΔY, thereby obtaining the first offset imaging area.

[0220] Step S40212, obtaining the actual distance between the first offset imaging area and the imaging circle from the optical center testing device;

[0221] Specifically, this embodiment obtains the actual distance between the first offset imaging area and the imaging circle after the offset in step S40211 through the optical center testing device. The distance can be represented by the actual distance from the center position of the first offset imaging area to the center of the imaging circle.

[0222] Step S40213, determining whether the actual distance is greater than or equal to a preset first preset threshold;

[0223] Specifically, the actual distance between the first offset imaging area and the imaging circle obtained from the optical center test device is compared with a preset first preset threshold value, and the first preset threshold value can be preset. It should be understood that in the actual implementation process, the specific value of the first preset threshold value can be set according to the needs. This embodiment is based on the offset requirement Z proposed in the third embodiment, and sets the first preset threshold value to 0.3Z, which can ensure that the optical center correction solution meets the requirements.

[0224] Step S40214: if yes, then the first offset imaging area is offset based on the offset step size and the offset direction in the offset parameters to obtain a new first offset imaging area, and the steps are performed: obtaining the actual distance between the first offset imaging area and the imaging circle from the optical center test device;

[0225] Specifically, in this embodiment, if the actual distance is greater than or equal to 0.3Z, that is, the offset of the original imaging area is not sufficient to meet the standard requirements for secondary offset, it is necessary to offset the first offset imaging area to obtain a new first offset imaging area, and jump and execute step S40212 to obtain the actual distance corresponding to the new first offset imaging area until the actual distance is less than 0.3Z.

[0226] Step S40215: If not, then determine that the current first offset imaging area is the imaging area for preliminary correction.

[0227] Specifically, in this embodiment, if the actual distance is less than 0.3Z, it is determined that the current first offset imaging area is a preliminary corrected imaging area, that is, the condition for performing a secondary offset thereon is met.

[0228] The present embodiment proposes an optical center correction method, which is to respond to a test instruction issued by an optical center test device, take a photo to obtain an original image; send the original image to the optical center test device, and generate an original imaging area based on the original image; receive test data fed back by the optical center test device; and correct the position of the center of the original imaging area relative to the optical center of the lens based on the test data to obtain a corrected imaging area. The embodiment of the present invention obtains test data from the optical center test device by using the above optical center correction scheme, and obtains various offset parameters required for optical center correction based on the obtained test data, and corrects the original imaging area by offsetting the original imaging area to the center position of the imaging circle, and finally achieves optical center correction, thereby improving the imaging quality of optical products.

[0229] Reference Fig.13 , Fig.13 This is a flowchart of a sixth exemplary embodiment of the optical center correction method of the present application.

[0230] Based on the fourth embodiment, a sixth embodiment of the present application is proposed. The difference between the sixth embodiment of the present application and the fourth embodiment is that in this embodiment, for step S4022, a secondary offset operation is performed on the initially corrected imaging area based on the brightness data of the test area in the test data and the offset direction, offset step, offset time, offset distance, and offset speed in the offset parameters, so as to refine the corrected imaging area.

[0231] In this embodiment, step S4022, based on the brightness data of the test area in the test data and the offset direction, offset step, offset time, offset distance, and offset speed in the offset parameters, a secondary offset operation is performed on the initially corrected imaging area, and the corrected imaging area includes:

[0232] Step S40221, shifting the initially corrected imaging area based on the shift step and the shift direction in the shift parameters to obtain a second shifted imaging area;

[0233] Specifically, according to formula (6) in the above embodiment, the offset direction indicates that when the optical center offset in the horizontal direction is X and the optical center offset in the vertical direction is Y, the center of the initially corrected imaging area moves toward the center O1 of the imaging circle with an offset step of ΔX in the horizontal direction and with a step of ΔY in the vertical direction, thereby obtaining the second offset imaging area.

[0234] Step S40222, estimating and obtaining a first brightness value of an imaging circle and a second brightness value of an imaging circle based on the brightness data of the test area in the test data, the offset time, the offset distance, the offset speed in the offset parameters, and the pre-acquired image resolution;

[0235] Specifically, this embodiment analyzes the brightness data of the test area in the test data based on the offset direction, offset step, offset time, offset distance, and offset speed in the offset parameters, thereby obtaining a preliminary and corrected overall brightness of the imaging area. The pre-acquired image resolution refers to the image resolution obtained by taking a photo of the optical product. It should be noted that the image resolution is not limited. The image resolution in this embodiment is m*n.

[0236] Reference Fig.14 , Fig.14 This is a schematic diagram of the brightness value analysis of the test area. Fig.14As shown, the present embodiment selects four corner positions A1, A2, A3, A4 and the center position A0 as the target brightness analysis area, and the basis for selecting the above positions is the test areas S0, S1, S2, S3, S4 selected in the first embodiment. Obviously, the target brightness analysis areas A0, A1, A2, A3, A4 are small areas intercepted from the test areas S0, S1, S2, S3, S4, respectively. The present embodiment obtains a preliminarily corrected imaging area through the above step S4021. At this time, the distance between the center of the preliminarily corrected imaging area and the center of the imaging circle (that is, the optical center of the optical product) is less than 0.3Z. At this time, pre-estimating the brightness after the offset helps to further confirm whether the correction of the optical center meets the specification requirements and improves the test efficiency.

[0237] like Fig.14 As shown, when the optical center correction is performed in this embodiment, no matter from which direction the center position O2 intercepted by the image sensor is offset toward the center O1 of the imaging circle, two of the four corner areas in the target brightness analysis area will inevitably have increased brightness, and the remaining two corner areas will have less brightness, and the center position area A0 of the target brightness analysis area will definitely increase in brightness as the center of the imaging area approaches the center of the imaging circle. Based on this, in this embodiment, the three target brightness analysis areas A0, A1, and A2 with increased brightness are defined as the first type of areas, and the three target brightness analysis areas A3 and A4 with reduced brightness are defined as the second type of areas. This embodiment can perform brightness analysis on the above-mentioned first type of areas and second type of areas through the brightness data of the test area in the test data, so as to estimate and obtain the first brightness value of the imaging circle and the second brightness value of the imaging circle through further analysis of the brightness values ​​of the first type of areas and the brightness values ​​of the second area, wherein the first brightness value of the imaging circle and the second brightness value of the imaging circle are both brightness estimation values ​​of the center O1 of the imaging circle.

[0238] Step S40223, determining whether the difference between the first brightness value of the imaging circle and the second brightness value of the imaging circle is greater than a preset second preset threshold;

[0239] Specifically, in this embodiment, the second preset threshold value can be set to 1 / 20 of the first brightness value of the imaging circle obtained in step S40222. It should be noted that in the specific implementation process, the second preset threshold value can also be set according to the specific situation, which is not limited here. This step compares the difference between the first brightness value of the imaging circle and the second brightness value of the imaging circle with the preset second preset threshold value, and performs subsequent operations based on the judgment result, so that the estimated first brightness of the imaging circle and the estimated second brightness of the imaging circle can be equal to each other as much as possible. Its actual physical meaning is that when an optical product that performs optical center correction according to this method performs optical imaging, the overall brightness of its imaging area can meet the consistency requirements, thereby improving the imaging quality.

[0240] Step S40224: if yes, then the second offset imaging area is offset based on the offset step size and the offset direction in the offset parameters to obtain a new second offset imaging area, and the steps are performed: based on the brightness data of the test area in the test data, the offset time, the offset distance, the offset speed in the offset parameters and the pre-acquired image resolution, the first brightness value of the imaging circle and the second brightness value of the imaging circle are estimated and obtained;

[0241] Specifically, if the difference between the first brightness value of the imaging circle and the second brightness value of the imaging circle is greater than the second preset threshold, it means that the estimated first brightness of the imaging circle and the estimated second brightness of the imaging circle differ greatly, and the overall brightness of the imaging area of ​​the optical product cannot meet the consistency requirement when performing optical imaging, that is, it is necessary to offset the second offset imaging area based on the offset step size and offset direction in the offset parameter to obtain a new second offset imaging area, and jump to step S40222 to obtain a new first brightness value of the imaging circle and a second brightness value of the imaging circle, until the difference between the first brightness value of the imaging circle and the second brightness value of the imaging circle is less than or equal to the preset second preset threshold. .

[0242] Step S40225: if not, determine that the current second offset imaging area is the corrected imaging area.

[0243] Specifically, if the difference between the first brightness value of the imaging circle and the second brightness value of the imaging circle is less than or equal to the second preset threshold, it means that the estimated first brightness of the imaging circle and the estimated second brightness of the imaging circle are not much different. Within an acceptable error range, it can be considered that the estimated first brightness of the imaging circle and the estimated second brightness of the imaging circle are approximately equal. When the optical product performs optical imaging, the overall brightness of its imaging area can meet the consistency requirement, that is, the current second offset imaging area can be determined as the corrected imaging area, thereby completing the optical center correction of the optical product.

[0244] The present embodiment proposes an optical center correction method, which is to respond to a test instruction issued by an optical center test device, take a photo to obtain an original image; send the original image to the optical center test device, and generate an original imaging area based on the original image; receive test data fed back by the optical center test device; and correct the position of the center of the original imaging area relative to the optical center of the lens based on the test data to obtain a corrected imaging area. The embodiment of the present invention obtains test data from the optical center test device by using the above optical center correction scheme, and obtains various offset parameters required for optical center correction based on the obtained test data, corrects the original imaging area by offsetting the original imaging area to the center position of the imaging circle, obtains a preliminary corrected imaging area, and then performs a secondary offset on the preliminary corrected imaging area by analyzing the brightness changes of the four corners and the center position of the imaging area, and finally obtains the corrected imaging area, thereby achieving optical center correction and improving the imaging quality of optical products.

[0245] Reference Fig.15 , Fig.15 It is a flowchart of the seventh exemplary embodiment of the optical center correction method of the present application.

[0246] Based on the sixth embodiment, a seventh embodiment of the present application is proposed. The difference between the seventh embodiment of the present application and the sixth embodiment is that for step S40222, the first brightness value of the imaging circle and the second brightness value of the imaging circle are estimated and refined based on the brightness data of the test area in the test data, the offset time, offset distance, offset speed in the offset parameters and the pre-acquired image resolution.

[0247] In this embodiment, step S40222, estimating and obtaining the first brightness value of the imaging circle and the second brightness value of the imaging circle based on the brightness data of the test area in the test data, the offset time, the offset distance, the offset speed in the offset parameters, and the pre-acquired image resolution includes:

[0248] Step a, obtaining a first-category area brightness value, a second-category area brightness value, and a third-category area brightness value based on the brightness data of the test area in the test data;

[0249] Specifically, Fig.14 As shown, this embodiment obtains test data from an optical center test device, and obtains actual brightness values ​​of target brightness analysis areas A0, A1, A2, A3, and A4 based on the brightness data in the test data. This embodiment records the instance brightness values ​​of the above-mentioned target brightness analysis areas A0, A1, A2, A3, and A4 as b0, b1, b2, b3, and b4, wherein b1 and b2 are brightness values ​​of the first type of area, b3 and b4 are brightness values ​​of the second type of area, and b0 is the brightness value of the third type of area.

[0250] Step b, obtaining a brightness change rate of the first-category area based on the brightness value of the first-category area, the brightness value of the third-category area and the pre-acquired image resolution;

[0251] Specifically, based on the brightness values ​​b1 and b2 of the first-category area, the brightness value b0 of the third-category area and the pre-acquired image resolution m*n, a specific formula for calculating the brightness change rate of the first-category area is as follows:

[0252]

[0253]

[0254] K=(K1+K2) / 2 (7)

[0255] In formula (7), K1 is the estimated brightness change value from A1 to A0, and K2 is the estimated brightness change value from A2 to A0. Since A1 and A2 are target brightness analysis areas at the corners, and A0 is the target brightness analysis area at the center, the pixels from A0 to other areas are Therefore, K1 and K2 need to be multiplied by 2. K is the brightness change rate of the first type of area, which can be obtained by summing and averaging K1 and K2.

[0256] Step c, obtaining the brightness change rate of the second-category area based on the brightness value of the second-category area, the brightness value of the third-category area and the pre-acquired image resolution;

[0257] Specifically, based on the brightness value b3 of the second-type area, the brightness value b0 of the third-type area and the pre-acquired image resolution m*n, a specific formula for calculating the brightness change rate of the second-type area is as follows:

[0258]

[0259] K3 in formula (8) is the brightness change rate of the second type of area. It should be noted that in order to simplify the evaluation amount, this embodiment only uses b3 of the brightness value of the second type of area. In the actual implementation process, b4 of the brightness value of the second type of area can also be used according to actual needs, or the summed average of the two can be taken. At the same time, the determination of the brightness value of the first type of area in step b can also refer to the method of determining the brightness value of the second type of area in this step, which will not be repeated here.

[0260] Step d, estimating and obtaining a first brightness value of an imaging circle based on a migration speed, a migration time, a brightness value of the first type of area, and a brightness change rate of the first type of area in the migration parameters;

[0261] Specifically, the formula for calculating and estimating the first brightness value of the imaging circle in this embodiment is as follows:

[0262] ΔB V =K×V

[0263] B0=b0+T*ΔB V (9)

[0264] In formula (9), B0 is the estimated first brightness value of the imaging circle, ΔB V To estimate the brightness change of the center of the imaging circle during the correction process, V is the offset speed, b0 is the brightness value of the third type of area, and T is the offset time from the center of the original imaging area that has not been processed in any way during the correction process to the center of the imaging circle. T can be obtained by the steps described in the third embodiment and will not be repeated here.

[0265] Step e: based on the migration speed, the migration distance, the brightness value of the second type of area and the brightness change rate of the second type of area in the migration parameters, estimate and obtain the second brightness value of the imaging circle.

[0266] Specifically, the formula for calculating and estimating the second brightness value of the imaging circle in this embodiment is as follows:

[0267]

[0268] In formula (10), B0' is the estimated second brightness value of the imaging circle, K3 is the brightness change rate of the second type of area, V is the offset speed, b3 is the brightness of the second type of area, and L is the offset distance. The V and L can be obtained by the steps described in the third embodiment and will not be repeated here.

[0269] It should be noted that this embodiment does not limit the order of the above steps b and c, and step b can be before or after step c; this embodiment does not limit the order of the above steps d and e, and step d can be before or after step e.

[0270] The present embodiment proposes an optical center correction method, which is to respond to a test instruction issued by an optical center test device, take a photo to obtain an original image; send the original image to the optical center test device, and generate an original imaging area based on the original image; receive test data fed back by the optical center test device; and correct the position of the center of the original imaging area relative to the optical center of the lens based on the test data to obtain a corrected imaging area. The embodiment of the present invention obtains test data from the optical center test device by using the above optical center correction scheme, and obtains various offset parameters required for optical center correction based on the obtained test data, corrects the original imaging area by offsetting the original imaging area to the center position of the imaging circle, obtains a preliminary corrected imaging area, and then performs a secondary offset on the preliminary corrected imaging area by analyzing the brightness changes of the four corners and the center position of the imaging area, and finally obtains the corrected imaging area, thereby achieving optical center correction and improving the imaging quality of optical products.

[0271] Reference Fig.16 , Fig.16 This is a flowchart of the eighth exemplary embodiment of the optical center correction method of the present application. As another implementation, based on the eighth embodiment proposed above, this embodiment proposes an optical center correction solution process, which specifically includes the following steps:

[0272] Step S1, the optical center measurement device feeds back the optical center offset of the product and the brightness value of the relevant area;

[0273] Step S2, setting appropriate optical center offset step lengths in horizontal and vertical directions according to the offset;

[0274] Step S3, calculating the offset gradient, speed and distance parameters;

[0275] Step S4, calculating the offset direction;

[0276] Step S5, determining whether the distance between the sensor and the center of the imaging circle is less than 30% of the specification requirement; if not, jumping to step S4: calculating the offset direction; if yes, executing step S6;

[0277] Step S6, estimating the brightness of the center of the imaging circle by increasing the brightness of the image sensor area;

[0278] Step S7, estimating the brightness of the center of the imaging circle by using the brightness reduction area of ​​the image sensor;

[0279] Step S8, determine whether the difference in the brightness of the center of the imaging circle estimated in two different directions is less than 1 / 20 of the estimated brightness value; if not, jump to step S6: estimate the brightness of the center of the imaging circle by the image sensor brightness increase area; if so, end the optical center correction scheme process.

[0280] Specifically, this embodiment first obtains the product offset and the brightness value of the relevant area fed back by the optical center test equipment, and sets the appropriate optical center offset step in the horizontal and vertical directions according to the offset, calculates the offset gradient, speed and distance parameters based on the optical center offset step, and calculates the offset direction at the same time. The calculation process can refer to the steps of the third embodiment and will not be repeated here; secondly, this embodiment determines whether the distance between the image sensor and the center of the imaging circle is less than 30% of the specification requirements. If the judgment result is no, jump to the step of calculating the offset direction; if the judgment result is yes, the brightness of the imaging circle center is estimated by increasing the area through the image sensor brightness, and then the brightness of the imaging circle center is estimated by reducing the area through the image sensor brightness. Finally, it is determined whether the difference in the brightness of the imaging circle centers in two different directions is less than 1 / 20 of the estimated brightness value. If the judgment result is otherwise, jump to the step of estimating the brightness of the imaging circle center by increasing the area through the image sensor brightness.

[0281] The present embodiment proposes an optical center correction method, which is to respond to a test instruction issued by an optical center test device, take a photo to obtain an original image; send the original image to the optical center test device, and generate an original imaging area based on the original image; receive test data fed back by the optical center test device; and correct the position of the center of the original imaging area relative to the optical center of the lens based on the test data to obtain a corrected imaging area. The embodiment of the present invention obtains test data from the optical center test device by using the above optical center correction scheme, and obtains various offset parameters required for optical center correction based on the obtained test data, corrects the original imaging area by offsetting the original imaging area to the center position of the imaging circle, obtains a preliminary corrected imaging area, and then performs a secondary offset on the preliminary corrected imaging area by analyzing the brightness changes of the four corners and the center position of the imaging area, and finally obtains the corrected imaging area, thereby achieving optical center correction and improving the imaging quality of optical products.

[0282] It should be noted that the above embodiments can be reasonably combined and implemented according to actual conditions, and this embodiment will not be described in detail.

[0283] In addition, the present application also provides an optical center correction device 100, referring to Fig.17 , Fig.17 Schematic diagram of the internal structure of the optical center correction device of the present invention, the optical center correction device 100 comprises:

[0284] A test response module 101 is used to respond to a test instruction issued by an optical center test device and take a photo to obtain an original image;

[0285] A sending module 102, used for sending the original image to the optical center testing device;

[0286] A generating module 103, configured to generate an original imaging area based on the original image;

[0287] A receiving module 104, used for receiving the test data fed back by the optical center test device;

[0288] The imaging correction module 105 is used to correct the position of the center of the original imaging area relative to the optical center of the lens based on the test data to obtain a corrected imaging area.

[0289] For the principle and implementation process of data screening implemented in this embodiment, please refer to the above embodiments and will not be repeated here.

[0290] In addition, an embodiment of the present application also proposes a terminal device, which includes a memory, a processor, and an optical center correction program stored in the memory and executable on the processor, and when the optical center correction program is executed by the processor, the steps of the optical center correction method described above are implemented.

[0291] Since the optical center correction program adopts all the technical solutions of all the aforementioned embodiments when executed by the processor, it has at least all the beneficial effects brought by all the technical solutions of all the aforementioned embodiments, which will not be described one by one here.

[0292] In addition, an embodiment of the present application further provides a computer-readable storage medium, wherein an optical center correction program is stored on the data screening readable storage medium, and when the optical center correction program is executed by a processor, the steps of the optical center correction method described above are implemented.

[0293] Since the optical center correction program adopts all the technical solutions of all the aforementioned embodiments when executed by the processor, it has at least all the beneficial effects brought by all the technical solutions of all the aforementioned embodiments, which will not be described one by one here.

[0294] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system 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 system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0295] The above-mentioned ranking of the embodiments of the present invention is only for description and does not represent the advantages or disadvantages of the embodiments.

[0296] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0297] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An optical center correction method, characterized in that: The optical center correction method comprises the following steps: In response to a test instruction issued by an optical center test device, taking a photo to obtain an original image; Sending the original image to the optical center testing device, and generating an original imaging area based on the original image; Receiving test data fed back by the optical center test equipment; Based on the test data, the position of the center of the original imaging area relative to the optical center of the lens is corrected to obtain a corrected imaging area.

2. The optical center correction method according to claim 1, characterized in that: The test data includes one or more of an optical center offset, brightness data of a test area, original imaging area center data, and imaging circle center data. The step of correcting the original imaging area based on the test data to obtain a corrected imaging area includes: Calculate and obtain the offset parameters based on the optical center offset in the test data, the original imaging area center data and the imaging circle center data, wherein the offset parameters include one or more of an offset step length, an offset gradient, an offset speed, an offset distance, an offset time and an offset direction; An offset operation is performed on the original imaging area based on the brightness data of the test area in the test data and the offset direction, offset step, offset time, and offset distance in the offset parameters to obtain a corrected imaging area.

3. The optical center correction method according to claim 2, characterized in that: The step of calculating and obtaining the offset parameter based on the optical center offset in the test data, the original imaging area center data and the imaging circle center data comprises: Calculate the offset step length based on the optical center offset in the test data; Calculate the offset gradient based on the offset step size; Calculate the migration speed based on the migration gradient and the migration step size; Calculating an offset distance based on an optical center offset in the test data and a preset offset target; Calculate the migration time based on the migration distance and the migration speed; The offset direction is calculated and obtained based on the optical center offset in the test data, the original imaging area center data and the imaging circle center data, and the offset step length.

4. The optical center correction method according to claim 2, characterized in that: The step of performing an offset operation on the original imaging area based on the brightness data of the test area in the test data and the offset direction, offset step length, offset time, offset distance, and offset speed in the offset parameters to obtain a corrected imaging area comprises: Performing an offset operation on the original imaging area based on an offset step size and an offset direction in the offset parameters to obtain a preliminarily corrected imaging area; A secondary shift operation is performed on the initially corrected imaging area based on the brightness data of the test area in the test data and the shift direction, shift step, shift time, shift distance and shift speed in the shift parameters to obtain a corrected imaging area.

5. The optical center correction method according to claim 4, characterized in that: The step of performing an offset operation on the original imaging area based on the offset step size and the offset direction in the offset parameters to obtain a preliminarily corrected imaging area comprises: The original imaging area is shifted based on the shift step size and the shift direction in the shift parameters to obtain a first shifted imaging area; Acquire the actual distance between the first offset imaging area and the imaging circle from the optical center testing device; Determining whether the actual distance is greater than or equal to a preset first threshold; If so, the first offset imaging area is offset based on the offset step size and the offset direction in the offset parameters to obtain a new first offset imaging area, and the steps are performed: obtaining the actual distance between the first offset imaging area and the imaging circle from the optical center test device; If not, it is determined that the first offset imaging area is currently the imaging area for preliminary correction.

6. The optical center correction method according to claim 4, characterized in that: The step of performing a secondary shift operation on the initially corrected imaging area based on the brightness data of the test area in the test data and the shift direction, the shift step, the shift time, the shift distance, and the shift speed in the shift parameters to obtain the corrected imaging area comprises: offsetting the initially corrected imaging area based on the offset step length and the offset direction in the offset parameters to obtain a second offset imaging area; Estimate and obtain a first brightness value of an imaging circle and a second brightness value of an imaging circle based on brightness data of a test area in the test data, a shift time, a shift distance, a shift speed in the shift parameters, and a pre-acquired image resolution; Determine whether a difference between a first brightness value of the imaging circle and a second brightness value of the imaging circle is greater than a preset second preset threshold; If so, the second offset imaging area is offset based on the offset step size and the offset direction in the offset parameters to obtain a new second offset imaging area, and the steps are performed: based on the brightness data of the test area in the test data, the offset time, the offset distance, the offset speed in the offset parameters and the pre-acquired image resolution, the first brightness value of the imaging circle and the second brightness value of the imaging circle are estimated and obtained; if not, it is determined that the current second offset imaging area is the corrected imaging area.

7. The optical center correction method according to claim 6, characterized in that: The step of estimating and obtaining the first brightness value of the imaging circle and the second brightness value of the imaging circle based on the brightness data of the test area in the test data, the offset time, the offset distance, the offset speed in the offset parameters and the pre-acquired image resolution comprises: Obtaining a first-category area brightness value, a second-category area brightness value, and a third-category area brightness value based on brightness data of the test area in the test data; Obtaining a brightness change rate of the first-category area based on the brightness value of the first-category area, the brightness value of the third-category area, and the pre-acquired image resolution; Obtaining a brightness change rate of the second-category area based on the brightness value of the second-category area, the brightness value of the third-category area, and the pre-acquired image resolution; Based on the migration speed, the migration time, the brightness value of the first type of area and the brightness change rate of the first type of area in the migration parameters, estimate and obtain a first brightness value of the imaging circle; The second brightness value of the imaging circle is estimated and obtained based on the offset speed, the offset distance, the brightness value of the second type of area and the brightness change rate of the second type of area in the offset parameters.

8. An optical center correction device, characterized in that: The optical center correction device comprises: A test response module, used to respond to a test instruction issued by the optical center test device and take a photo to obtain an original image; A sending module, used for sending the original image to the optical center testing device; A generating module, used for generating an original imaging area based on the original image; A receiving module, used for receiving the test data fed back by the optical center test device; The optical center correction module is used to correct the position of the center of the original imaging area relative to the optical center of the lens based on the test data to obtain a corrected imaging area.

9. A terminal device, characterized in that: The terminal device includes a memory, a processor, and an optical center correction program stored in the memory and executable on the processor. When the optical center correction program is executed by the processor, the optical center correction method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an optical center correction program, and when the optical center correction program is executed by the processor, the optical center correction method according to any one of claims 1 to 7 is implemented.