Camera product assembly method, device, system and storage medium
By using light source and image processing technology to calibrate the optical center of the lens and image sensor during the assembly process of camera products, the problem of optical center deviation in traditional technology is solved, product performance and production efficiency are improved, and defective rates and repair costs are reduced.
Patent Information
- Application Number
- CN202310009564.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-04
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2043-01-04
AI Technical Summary
In the production process of traditional camera products, it is difficult for the lens and image sensor to achieve precise concentricity, resulting in optical center deviation, increasing the defective rate and affecting production efficiency and costs.
By obtaining the original image of the product to be assembled when the light source device provides a uniform light source, image processing is performed to determine the offset between the actual optical center and the theoretical optical center, the lens position is adjusted to calibrate the optical center, and assembly is performed.
It effectively prevents problems such as defective vignetting and OC eccentricity, improves production line yield, reduces repair costs, and improves user experience.
Smart Images

Figure CN116160239B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of camera product production, and in particular to a camera product assembly method, equipment, system and storage medium. Background Art
[0002] As people's living standards continue to improve, security cameras and other video products have entered thousands of households. In the production process of video products, the assembly of lens modules is an important part, and the concentricity of the lens and image sensor is a necessary condition to ensure the performance of the lens module.
[0003] In the production process of traditional camera products, the lens and image sensor are concentrically aligned and rely on the structural limit of the screw hole. However, the problem is that it is impossible to achieve precise concentricity between the lens and image sensor, which easily leads to the problem of optical center deviation, resulting in a high defective rate of the assembled lens module, affecting production efficiency and cost. Summary of the invention
[0004] The main purpose of the present invention is to provide a camera product assembly method, device, system and storage medium, aiming to solve the technical problem of high defective rate of lens modules in the existing camera product assembly process.
[0005] To achieve the above object, the present invention adopts the following technical solution:
[0006] In a first aspect, the present invention provides a method for assembling a camera product, the method comprising:
[0007] Acquire an original image; wherein the original image is obtained by photographing a uniform light source when the light source device provides a uniform light source for the product to be assembled, and the product to be assembled is a camera product including a lens and an image sensor;
[0008] Perform image processing on the original image to obtain the target point; wherein the target point is the point with the highest brightness in the original image;
[0009] Determine a first offset between an actual optical center of the product to be assembled and a theoretical optical center to obtain calibration data; wherein the actual optical center corresponds to the target point;
[0010] According to the calibration data, the adjustment device is controlled to adjust the position of the lens to obtain the product to be assembled after the optical center is calibrated;
[0011] Assemble the products to be assembled after calibrating the optical center.
[0012] Optionally, in the above-mentioned camera product assembly method, the step of performing image processing on the original image to obtain the target point includes:
[0013] Crop the original image to obtain a regional image;
[0014] According to a preset threshold, the regional image is binarized to obtain a binary image;
[0015] Determine the center point of the binary image and obtain the target point.
[0016] Optionally, in the above-mentioned camera product assembly method, the step of determining a first offset between an actual optical center and a theoretical optical center of the product to be assembled to obtain calibration data comprises:
[0017] Determine the theoretical optical center of the product to be assembled according to the theoretical center of the image sensor to obtain a first coordinate; wherein the first coordinate is the coordinate information corresponding to the theoretical optical center in the coordinate system established based on the image sensor;
[0018] Determine the actual optical center of the product to be assembled according to the target point, and obtain the second coordinate; wherein the second coordinate is the coordinate information corresponding to the actual optical center in the coordinate system;
[0019] According to the distance between the first coordinate and the second coordinate, a first offset between the actual optical center and the theoretical optical center is obtained;
[0020] Calibration data is obtained according to the first offset.
[0021] Optionally, in the above-mentioned camera product assembly method, the light source device includes a device bracket and a light-diffusing plate arranged on the device bracket;
[0022] Before the step of obtaining the original image, the method further comprises:
[0023] The control adjustment device adjusts the lens and the image sensor to pre-alignment to obtain a product to be assembled; wherein the lens is located between the light averaging plate and the image sensor;
[0024] The light source device is controlled to provide a uniform light source for the product to be assembled through the light averaging plate, and the product to be assembled is controlled to perform a shooting operation on the light averaging plate.
[0025] Optionally, in the above-mentioned camera product assembly method, the image sensor is arranged on the sensor board, the lens is located in the lens module, the lens module is arranged on the lens bracket, the lens bracket is movable relative to the sensor board, and the lens bracket is detachably connected to the sensor board;
[0026] According to the calibration data, the step of controlling the adjustment device to adjust the position of the lens to obtain the product to be assembled after the optical center is calibrated includes:
[0027] According to the calibration data, the adjusting device is controlled to adjust the position of the lens to obtain an adjusted lens;
[0028] According to the adjusted lens, the assembly device is controlled to fix the lens bracket and the sensor plate to obtain the product to be assembled after the optical center is calibrated.
[0029] Optionally, in the above-mentioned camera product assembly method, after the step of controlling the adjustment device to adjust the position of the lens according to the calibration data to obtain the product to be assembled after the optical center is calibrated, the method further includes:
[0030] Determine a second offset between the actual optical center of the product to be assembled after the optical center is calibrated and the theoretical optical center;
[0031] According to the second offset, the product to be assembled is re-inspected after the optical center is calibrated to obtain a test result;
[0032] According to the test results, the final product to be assembled is obtained;
[0033] The steps of assembling the product to be assembled after calibrating the optical center include:
[0034] Assemble the final product to be assembled.
[0035] Optionally, in the above-mentioned camera product assembly method, before the step of controlling the adjustment device to adjust the lens and the image sensor to pre-alignment to obtain the product to be assembled, the method further includes:
[0036] controlling the assembling device to loosen the lens bracket and the sensor plate, and controlling the adjusting device to fix the lens bracket;
[0037] According to the test results, the steps to obtain the final product to be assembled include:
[0038] When the test result is passed, the product to be assembled after the optical center is calibrated is used as the final product to be assembled, so as to perform the step of assembling the final product to be assembled;
[0039] When the detection result is not passed, the process returns to the step of controlling the assembly device to loosen the lens bracket and the sensor plate until the detection result is passed.
[0040] In a second aspect, the present invention provides a camera product assembly device, the device includes a processor and a memory, the memory stores a camera product assembly program, and when the camera product assembly program is executed by the processor, the camera product assembly method as described above is implemented.
[0041] In a third aspect, the present invention provides a camera product assembly system, the system comprising:
[0042] Light source device, adjustment device, assembly device and camera product assembly equipment as described above;
[0043] Among them, the camera product assembly equipment is connected to the light source device, the adjustment device and the assembly device respectively.
[0044] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by one or more processors, the camera product assembly method as described above is implemented.
[0045] The above one or more technical solutions provided by the present invention may have the following advantages or at least achieve the following technical effects:
[0046] The present invention proposes a camera product assembly method, device, system and storage medium, which obtains the original image obtained by photographing the product to be assembled under the condition that the light source device provides a uniform light source; performs image processing on the original image to obtain the point with the highest brightness in the original image as the target point; then determines the first offset between the actual optical center and the theoretical optical center of the product to be assembled to obtain calibration data; then controls the adjustment device to adjust the position of the lens according to the calibration data to obtain the product to be assembled after the optical center is calibrated, and finally assembles the product to be assembled after the optical center is calibrated to obtain the assembled camera product. The present invention calibrates the optical center of the product to be assembled so that the lens center of the product to be assembled is aligned with the center of the image sensor, so that the line connecting the two centers is parallel to the optical path, thereby improving the performance of the camera product and improving the vignetting. The present invention can effectively prevent defective products such as vignetting and OC eccentricity from occurring on the production line of the camera product, improve the production line yield, reduce the rework cost of the camera product, and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0048] Figure 1 It is a flowchart of a first embodiment of a camera product assembly method of the present invention;
[0049] Figure 2 A schematic diagram of the hardware structure of the camera product assembly device involved in the present invention;
[0050] Figure 3 It is a side view schematic diagram of placing the product to be assembled in the first embodiment of the camera product assembly method of the present invention;
[0051] Figure 4 It is a flow chart of a second embodiment of the camera product assembly method of the present invention;
[0052] Figure 5This is a schematic diagram of a regional image of step S410 in the second embodiment of the camera product assembly method of the present invention;
[0053] Figure 6 This is a schematic diagram of a binary image of step S420 in the second embodiment of the camera product assembly method of the present invention;
[0054] Figure 7 Schematic diagram of the target point of step S430 in the second embodiment of the camera product assembly method of the present invention;
[0055] Figure 8 It is a connection diagram of the first embodiment of the camera product assembly system of the present invention.
[0056] 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
[0057] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all the embodiments. Based on the embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] It should be noted that in the present invention, the terms "include", "comprise" or any other variants 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, the elements defined by the sentence "include..." do not exclude the existence of other identical elements in the process, method, article or system including the element. In addition, in the present invention, unless otherwise clearly specified and defined, the terms "connect", "fixed" and the like should be understood in a broad sense, for example, "connection" can be a fixed connection, a detachable connection, or an integral one; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. In the present invention, if there is a description involving "first", "second", etc., the description of "first", "second", etc. is only for descriptive purposes, and cannot be understood as indicating or implying its relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. In addition, the technical solutions of the various embodiments can be combined with each other, but this is based on the ability of those of ordinary skill in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0059] Analysis of existing technologies shows that the assembly of lens modules is an important part of the assembly process of camera products. The lens module mainly includes two important components: lens and image sensor. The lens and image sensor have their own center points, and the concentricity of the two is a necessary condition to ensure the performance of the lens module.
[0060] In the traditional production process of camera products, the components in the lens module are often positioned by the structural limit of the screw hole to achieve the effect of concentricity between the lens and the image sensor. The problem with this method is that it is impossible to achieve precise concentricity between the lens and the image sensor, which easily causes the problem of optical center deviation, resulting in a high defect rate of the assembled lens module, affecting production efficiency and cost.
[0061] In view of the technical problem that the defective rate of lens modules is high during the assembly process of existing camera products, the present invention provides a camera product assembly method, and the overall idea is as follows:
[0062] Acquire an original image; wherein the original image is obtained by photographing a uniform light source when a light source device provides a uniform light source for the product to be assembled, and the product to be assembled is a camera product including a lens and an image sensor; perform image processing on the original image to obtain a target point; wherein the target point is the point with the highest brightness in the original image; determine a first offset between an actual optical center and a theoretical optical center of the product to be assembled to obtain calibration data; wherein the actual optical center corresponds to the target point; according to the calibration data, control the adjustment device to adjust the position of the lens to obtain the product to be assembled after the optical center is calibrated; assemble the product to be assembled after the optical center is calibrated.
[0063] Through the above technical solution, the optical center of the product to be assembled is calibrated so that the center of the lens of the product to be assembled is aligned with the center of the image sensor, so that the line connecting the two centers is parallel to the optical path, thereby improving the performance of the camera product and improving the vignetting. The present invention can effectively prevent defective products such as vignetting and OC eccentricity from appearing on the production line of camera products, improve the production line yield, reduce the cost of camera product rework, and improve user experience.
[0064] The following describes in detail the camera product assembly method, device, system and storage medium provided by the present invention through specific embodiments and implementation modes in conjunction with the accompanying drawings.
[0065] Embodiment 1
[0066] Reference Figure 1 A flow chart of the present invention is provided, which proposes a first embodiment of a camera product assembly method of the present invention, and the camera product assembly method is applied to a camera product assembly device.
[0067] Camera product assembly equipment refers to terminal equipment or control devices that can achieve communication connection. Camera product assembly equipment can be terminal equipment such as mobile phones, computers, tablets, embedded industrial computers, etc., or it can be independent control devices such as controllers and processors.
[0068] like Figure 2 , which is a schematic diagram of the hardware structure of a camera product assembly device. The camera product assembly device may include: a processor 1001, such as a CPU (Central Processing Unit), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005.
[0069] Specifically, the communication bus 1002 is used to realize the connection and communication between these components; the user interface 1003 is used to connect to the client and communicate data with the client. The user interface 1003 may include an output unit such as a display screen and an input unit such as a keyboard; the network interface 1004 is used to connect to the backend server and communicate data with the backend server. The network interface 1004 may include an input / output interface, such as a standard wired interface and a wireless interface such as a Wi-Fi interface; the memory 1005 is used to store various types of data, which may include, for example, instructions for any application or method in the camera product assembly device, as well as application-related data. The memory 1005 may be a high-speed RAM memory or a stable memory such as a disk memory; optionally, the memory 1005 may also be a storage device independent of the processor 1001, and further reference is made to Figure 2 , the memory 1005 may include an operating system, a network communication module, a user interface module, and a camera product assembly program;
[0070] The processor 1001 is used to call the camera product assembly program stored in the memory 1005 and perform the following operations:
[0071] Acquire an original image; wherein the original image is obtained by photographing a uniform light source when the light source device provides a uniform light source for the product to be assembled, and the product to be assembled is a camera product including a lens and an image sensor;
[0072] Perform image processing on the original image to obtain the target point; wherein the target point is the point with the highest brightness in the original image;
[0073] Determine a first offset between an actual optical center of the product to be assembled and a theoretical optical center to obtain calibration data; wherein the actual optical center corresponds to the target point;
[0074] According to the calibration data, the adjustment device is controlled to adjust the position of the lens to obtain the product to be assembled after the optical center is calibrated;
[0075] Assemble the products to be assembled after calibrating the optical center.
[0076] Based on the above-mentioned camera product assembly equipment, the following is combined with Figure 1 The flowchart shown in the figure describes in detail the camera product assembly method of this embodiment. The method may include the following steps:
[0077] Step S200: Acquire the original image.
[0078] The original image is obtained by photographing the uniform light source when the light source device provides a uniform light source for the product to be assembled, and the product to be assembled is a camera product including a lens and an image sensor.
[0079] Specifically, the method is applied in the production process of camera products, specifically, in the assembly production line of the lens and sensor of the camera products. The product to be assembled can be a camera product that has been temporarily assembled and positioned but the components have not been fixed, or a camera product that has been assembled but the optical center is not aligned. In other words, the method can be a calibration process and an assembly process, or a detection process, a calibration process, and a reassembly process after assembly.
[0080] In this embodiment, a camera product assembly device is used as an example of a terminal device. The terminal device can control other devices or equipment. In this embodiment, before assembling the product to be assembled, the product to be assembled can be placed first, such as Figure 3 The figure shows a side view schematic diagram of placing the product to be assembled in this embodiment; the figure shows the product to be assembled and the light source device, the product to be assembled includes an image sensor 21 and a lens 24, the image sensor 21 is arranged on the sensor board 20, the lens 24 is located in the lens module 23, the lens module 23 is arranged on the lens bracket 22, the lens bracket 22 is movable relative to the sensor board 20, and the lens bracket 22 is detachably connected to the sensor board 20. The light source device includes a device bracket 10 and a light scattering plate 11 arranged on the device bracket 10.
[0081] like Figure 3 As shown, the lens 24 is located between the light homogenizing plate 11 and the image sensor 21, and the light source device may also include an illuminating lamp. Figure 3 Not shown in the figure, it is used to provide lighting, and illuminates the lens 24 of the product to be assembled through the light-diffusing plate 11, so that the product to be assembled can perform a shooting operation on the uniform light source. Specifically, the lens shoots at the light-diffusing plate to obtain a light source image, which can be a RAW image. As the original image, it is sent to the camera product assembly equipment. In this embodiment, the image sensor 21 can specifically output the original image to the camera product assembly equipment, that is, the camera product assembly equipment can communicate with the product to be assembled so as to receive the original image output by the product to be assembled, that is, to obtain the original image. It should be noted that the original image file in RAW format that is directly output by the camera after shooting and has not been processed is commonly known as a RAW image. Among them, the light source device provides a uniform light source through the light-diffusing plate 11. When the lens 24 of the product to be assembled is shooting, the light-diffusing plate 11 and the lens 24 can maintain an ultra-close distance.
[0082] Step S400: performing image processing on the original image to obtain the target point.
[0083] Among them, the target point is the point with the highest brightness in the original image.
[0084] Specifically, image processing includes image recognition, binarization, brightness detection, etc., to find the point with the highest brightness in the original image as the target point. Here, the illumination law of the imaging surface of the image sensor is used, that is, the brightness gradually decreases from the central field of view to the peripheral field of view. When the point with the highest brightness coincides with the theoretical center of the image sensor, it can be considered that the optical center of the lens and the image sensor are aligned. Based on this, it is necessary to first find the point with the highest brightness in the original image before proceeding to the next step.
[0085] Step S600: determining a first offset between an actual optical center and a theoretical optical center of a product to be assembled, and obtaining calibration data.
[0086] Among them, the actual optical center corresponds to the target point.
[0087] Specifically, the actual optical center of the product to be assembled has a corresponding relationship with the target point in the original image identified in step S400. After the target point of the original image is identified, the actual optical center of the product to be assembled can be determined accordingly. The theoretical optical center of the product to be assembled is also the optical center of the image sensor. When the product to be assembled has an optical center offset, its theoretical optical center and the actual optical center will inevitably not coincide. At this time, the calibration data that needs to calibrate the actual optical center is inferred by calculating the offset between the actual optical center and the theoretical optical center, that is, the first offset. The calibration data may include adjustment data such as distance information and angle information. Specifically, the data type can be set according to actual needs, so that the actual optical center of the product to be assembled corresponding to the target point of the original image coincides with its theoretical optical center by adjusting the position of the lens.
[0088] Step S800: According to the calibration data, the adjusting device is controlled to adjust the position of the lens to obtain the product to be assembled after the optical center is calibrated.
[0089] Specifically, after obtaining the calibration data, the camera product assembly device can adjust the position of the lens so that the actual optical center of the product to be assembled corresponding to the target point of the original image coincides with its theoretical optical center. Specifically, the position adjustment of the lens can be achieved by controlling the adjustment device, wherein the adjustment device ( Figure 3 The lens (not shown) is used to adjust the position of the lens, which can be an adjustment platform for placing the product to be assembled, or a robot for grabbing the lens, etc. The adjustment device can enable the lens to move freely in multiple directions. The product to be assembled consisting of the lens and the image sensor after the position adjustment is the product to be assembled after the optical center is calibrated.
[0090] Step S1000: assembling the product to be assembled after calibrating the optical center.
[0091] Specifically, after obtaining the product to be assembled after the calibrated optical center, it can be formally assembled to complete the assembly process of the camera product and obtain the final camera product. After that, the camera product can flow into subsequent production lines, such as packaging, quality inspection, etc.
[0092] The camera product assembly method provided in this embodiment obtains the original image obtained by photographing the product to be assembled under the condition that the light source device provides a uniform light source; performs image processing on the original image to obtain the point with the highest brightness in the original image as the target point; then determines the first offset between the actual optical center and the theoretical optical center of the product to be assembled to obtain calibration data; then controls the adjustment device to adjust the position of the lens according to the calibration data to obtain the product to be assembled after the optical center is calibrated, and finally assembles the product to be assembled after the optical center is calibrated to obtain the assembled camera product. The present invention calibrates the optical center of the product to be assembled so that the lens center of the product to be assembled is aligned with the center of the image sensor, so that the line connecting the two centers is parallel to the optical path, thereby improving the performance of the camera product and improving the vignetting. The present invention can effectively prevent defective products such as vignetting and OC eccentricity from occurring on the production line of the camera product, improve the production line yield, reduce the rework cost of the camera product, and improve the user experience.
[0093] Embodiment 2
[0094] Based on the same inventive concept, Figures 3 to 7 , a second embodiment of the camera product assembly method of the present invention is proposed, and the camera product assembly method is also applied to camera product assembly equipment. Figure 4 The flowchart shown in the figure describes in detail the camera product assembly method of this embodiment. Based on the first embodiment, the method of this embodiment may include the following steps:
[0095] Step S110: controlling the adjustment device to adjust the lens and the image sensor to a pre-alignment state to obtain a product to be assembled.
[0096] Among them, Figure 3 As shown, the light source device includes a device bracket 10 and a light averaging plate 11 disposed on the device bracket 10, an image sensor 21 is disposed on the sensor board 20, a lens 24 is located in a lens module 23, the lens module 23 is disposed on a lens bracket 22, the lens bracket 22 is movable relative to the sensor board 20, and the lens bracket 22 is detachably connected to the sensor board 20. The lens 24 is located between the light averaging plate 11 and the image sensor 21.
[0097] The lens holder 22 is movable relative to the sensor board 20. When adjusting the position of the lens 24, it is specifically achieved by adjusting the position of the lens holder 22. Therefore, the lens holder 22 is movable relative to the sensor board 20. The lens holder 22 is also detachably connected to the sensor board 20 through fasteners, so that after the connection between the lens holder 22 and the sensor board 20 is fixed, when it is detected that the optical center of the camera product is inaccurate, the connection between the lens holder 22 and the sensor board 20 is removed, and after adjusting the position of the lens holder 22, it is continued to be connected through fasteners. For example, a detachable connection is achieved by screws and nuts, and the screw holes on the sensor board 20 are set to be long strips, so that the lens holder 22 is movable relative to the sensor board 20. It should be noted that in actual applications, the fixing method and disassembly method between the lens holder 22 and the sensor board 20 can be set according to actual needs. When Figure 3 After the lens holder 22 shown is fixed to the sensor board 20, the assembly of the lens module part of the camera product is completed. During the formal assembly, the optical center calibration can be performed by the method of this embodiment, and then the assembly is performed. First, an approximate assembly position is estimated, that is, the lens 24 is pre-aligned with the image sensor 21. If the optical center calibration is not performed, the lens holder 22 and the sensor board 20 can be directly fixed after the pre-alignment. Here, the optical center calibration of this embodiment is performed, and the pre-alignment is not immediately fixed, but first check whether the optical center is aligned in this state. If not, the calibration can be performed before fixing. That is to say, when the camera product assembly equipment adjusts the lens 24 to pre-align with the image sensor 21 by controlling the adjustment device, the product to be assembled is not the camera product that is finally assembled, but the camera product to be assembled. In this embodiment, the adjustment device is used to adjust the position of the lens, which can be a plane adjustment platform that moves in the X-axis and Y-axis directions, or a three-dimensional adjustment platform that moves in the X-axis, Y-axis and Z-axis directions. The specific selection can be based on actual needs.
[0098] Step S120: controlling the light source device to provide a uniform light source for the product to be assembled through the light homogenizing plate, and controlling the product to be assembled to perform a shooting operation on the light homogenizing plate.
[0099] Both the light source device and the product to be assembled can be controlled by the camera product assembly equipment. In specific implementation, the camera product assembly equipment sends a signal to the light source device, starts the light source device, provides light, and turns on the light scattering plate, so that the light scattering plate provides a uniform light source for the product to be assembled. At the same time, the camera product assembly equipment controls the product to be assembled to perform a shooting operation on the light scattering plate, so that the image sensor sends the acquired image to the camera product assembly equipment for subsequent steps.
[0100] In one implementation, before step S110, the method may further include:
[0101] Step S101: controlling the assembling device to loosen the lens bracket and the sensor plate, and controlling the adjusting device to fix the lens bracket.
[0102] The assembly device can be an automatic screw machine or an automatic glue dispensing machine, which is controlled by the camera product assembly equipment and can be used to fix the lens bracket and the sensor board to assemble the camera product, and can also be used to loosen the lens bracket and the sensor board to calibrate the optical center and reassemble the camera product that has been assembled but still has an optical center misalignment. The adjustment device can be used to fix the lens bracket to obtain a product to be assembled in which the lens and the image sensor are pre-aligned but not necessarily optically aligned, thereby executing the camera product assembly method, and can also be used to move the lens bracket to move the center of the lens to achieve position adjustment of the lens in the product to be assembled.
[0103] In a specific implementation, when the method is applied to the calibration process and assembly process of a camera product assembly line, step S110 can be directly executed. When the method is applied to the inspection process after assembly of a camera product assembly line, for products that fail the inspection due to inaccurate optical center, step S101 can be executed first, and then step S110.
[0104] Step S200: Acquire the original image.
[0105] The original image is obtained by photographing the uniform light source when the light source device provides a uniform light source for the product to be assembled, and the product to be assembled is a camera product including a lens and an image sensor.
[0106] The camera product assembly equipment controls and adjusts the lens and the image sensor to pre-alignment, and after obtaining the product to be assembled, controls the light source device to provide a uniform light source for the product to be assembled, and controls the product to be assembled to perform a shooting operation facing the uniform light source. The image sensor of the product to be assembled obtains the captured RAW image, that is, the original image, and sends it to the camera product assembly equipment; the camera product assembly equipment receives the original image captured and output by the image sensor in the product to be assembled, that is, obtains the original image.
[0107] Step S400: performing image processing on the original image to obtain the target point.
[0108] Among them, the target point is the point with the highest brightness in the original image.
[0109] Specifically, step S400 may include:
[0110] Step S410: cropping the original image to obtain a regional image.
[0111] In the specific implementation process, the original image can be cropped according to preset rules. For example, based on data and calculation considerations, the central area of the original image can be selected as the region image for subsequent target point recognition without scanning the entire original image, which can reduce the amount of calculation. It should be noted that cropping can also be performed according to other cropping rules, such as extracting the area in the image with brightness higher than a certain threshold value as the region image. In this embodiment, Figure 5 The figure shows a schematic diagram of a regional image obtained after cropping the acquired original image. It can be seen that the regional image takes the center position of the original image as the regional image.
[0112] Step S420: binarizing the region image according to a preset threshold value to obtain a binarized image.
[0113] In the specific implementation process, the preset threshold value can be a brightness value or a grayscale value, which can be set according to actual needs. Based on the preset threshold value, the regional image is binarized to obtain a binary image. In this embodiment, Figure 6 Shown is the pair Figure 5 Schematic diagram of the binarized image obtained after binarization of the regional image.
[0114] Step S430: determine the center point of the binary image to obtain the target point.
[0115] In a specific implementation process, the center point of the binary image can be the center position of the white area therein, and the method for determining the center point is set according to the actual shape of the white area in the binary image. For example, when the white area is exactly a circle, its center point is the center of the circle, and when the white area is exactly a rectangle, its center point is the intersection of the diagonals. When the white area is an irregular shape, the white area can also be comprehensively identified or partitioned to obtain the center position of the white area as the center point of the binary image. It should be noted that there are many existing technologies for calculating the center position of a certain area, which will not be repeated here. It can be understood that there are other ways to determine the center point of the binary image, so as to obtain the point with the highest brightness in the original image as the target point. In this embodiment, if Figure 7 Shown is the pair Figure 6 After obtaining the center position of the white area in the binary image, the center point O of the binary image is obtained as a schematic diagram of the target point.
[0116] The traditional way to calculate the center position of the original image is generally to scan the original image file in matrix form to find the brightest point, i.e., the target point. However, the problem with this method is that the calculation example is large and the amount of calculation is large. Secondly, the accuracy of finding the target point depends on the interval between the scanned pixels. The larger the interval, the lower the accuracy. However, the smaller the interval, the larger the calculation example. It is difficult to achieve a reasonable balance between ensuring the calculation example and ensuring the calculation accuracy. When the original image is processed by this embodiment, the brightest point in the original image can be quickly found by using binarization processing to obtain the target point so as to determine the actual optical center of the product to be assembled.
[0117] Step S600: determining a first offset between an actual optical center and a theoretical optical center of a product to be assembled, and obtaining calibration data.
[0118] Among them, the actual optical center corresponds to the target point.
[0119] Specifically, step S600 may include:
[0120] Step S610: determining the theoretical optical center of the product to be assembled according to the theoretical center of the image sensor to obtain a first coordinate; wherein the first coordinate is the coordinate information corresponding to the theoretical optical center in the coordinate system established based on the image sensor.
[0121] Specifically, the coordinate system established based on the image sensor may be a virtual two-dimensional coordinate system, and the position of the theoretical center of the image sensor in the coordinate system is used as the theoretical optical center of the product to be assembled to obtain the first coordinate (X1, Y1).
[0122] Step S620: determining the actual optical center of the product to be assembled according to the target point, and obtaining a second coordinate; wherein the second coordinate is the coordinate information corresponding to the actual optical center in the coordinate system.
[0123] Specifically, after obtaining the target point position based on the regional image, the actual optical center of the product to be assembled can be determined according to the correspondence between the camera product and the image, and the position of the actual optical center is represented in the aforementioned coordinate system to obtain the second coordinate (X2, Y2).
[0124] Step S630: Obtain a first offset between the actual optical center and the theoretical optical center according to the distance between the first coordinate and the second coordinate.
[0125] Specifically, the optical center offset of the product to be assembled is calculated according to the first coordinate and the second coordinate, and the first offset between the actual optical center and the theoretical optical center can be obtained:
[0126]
[0127] Step S640: obtaining calibration data according to the first offset.
[0128] Specifically, based on the above-mentioned first offset, the calibration data of the lens can be directly derived, such as the movement data in the X direction and the movement data in the Y direction. Specifically, the data content of the calibration data can be determined according to the selection of the adjustment device. It can be understood that the calibration data can also be derived according to the relationship between the movement distance of the lens and the corresponding optical center offset distance.
[0129] This embodiment utilizes the illumination law of the imaging surface of the image sensor, that is, the principle that the brightness gradually decreases from the central field of view to the peripheral field of view, and determines the coordinates of the point with the maximum brightness as the center of the image sensor, that is, the actual optical center of the product to be assembled. Then, when it coincides with the theoretical center of the image sensor, that is, the theoretical optical center of the product to be assembled, it is considered that the optical centers of the lens and the image sensor are aligned, and problems such as vignetting will not occur.
[0130] Step S800: According to the calibration data, the adjusting device is controlled to adjust the position of the lens to obtain the product to be assembled after the optical center is calibrated.
[0131] Specifically, step S800 may include:
[0132] Step S810: According to the calibration data, controlling the adjustment device to adjust the position of the lens to obtain an adjusted lens;
[0133] Step S820: According to the adjusted lens, the assembly device is controlled to fix the lens bracket and the sensor plate to obtain a product to be assembled after the optical center is calibrated.
[0134] According to the calibration data obtained, the camera product assembly equipment outputs a signal to the adjustment device to control the adjustment device to move the lens bracket to adjust the position of the lens. After adjusting the position of the lens, the camera product assembly equipment outputs a signal to the assembly device to control the assembly device to fix the lens bracket and the sensor plate to obtain the product to be assembled after calibrating the optical center. At this time, the product can be directly assembled and then flow into the next production line, or it can continue to be re-inspected to prevent the adjustment from being in place.
[0135] By adjusting the position of the lens, the optical center position of the product to be assembled can be automatically adjusted, so that the lens center of the camera product is highly aligned with the center of the image sensor, and the line connecting the two centers is parallel to the optical path, thereby improving the performance of the camera product and improving vignetting.
[0136] In one embodiment, in the case of continuing to re-inspect the product to be assembled after calibrating the optical center, the following may be further included after step S800:
[0137] Step S830: determining a second offset between the actual optical center of the product to be assembled after the optical center is calibrated and the theoretical optical center.
[0138] Specifically, the second offset of the product to be assembled after the optical center is calibrated can be determined in the same way, specifically, the camera product assembly equipment controls the light source device to provide a uniform light source for the product to be assembled after the optical center is calibrated, and controls the product to be assembled after the optical center is calibrated to perform a shooting operation; the camera product assembly equipment obtains the original image; the original image is cropped to obtain a regional image, and then the regional image is binarized according to a preset threshold to obtain a binarized image, and then the center point of the binarized image is identified to obtain a target point; thereafter, the actual optical center of the product to be assembled after the optical center is calibrated is determined according to the target point, and the offset between the actual optical center and the aforementioned theoretical optical center, that is, the second offset, is calculated.
[0139] Step S840: re-inspect the product to be assembled after calibrating the optical center according to the second offset to obtain a test result.
[0140] Specifically, after obtaining the second offset, the product to be assembled after calibrating the optical center is re-inspected based on the second offset. Specifically, it can be determined whether the second offset is within a preset range. If it is within the preset range, it is determined that the re-inspection of the product to be assembled after calibrating the optical center has passed; if it is not within the preset range, it is determined that the re-inspection of the product to be assembled after calibrating the optical center has failed.
[0141] Step S850: Obtain the final product to be assembled according to the detection results.
[0142] Specifically, the final products to be assembled, including good or defective products, are determined according to the test results, and sorting, circulation and other operations can be performed later.
[0143] In a specific implementation, step S850 may include:
[0144] Step S851: when the detection result is passed, the product to be assembled after the optical center is calibrated is used as the final product to be assembled, so as to perform the step of assembling the final product to be assembled;
[0145] When the inspection result is that the re-inspection is passed, the product to be assembled after the optical center is calibrated is determined as the final product to be assembled, and the next step, namely step S1000, can be entered at this time.
[0146] Step S852: When the detection result is not passed, return to the step of controlling the assembly device to loosen the lens bracket and the sensor plate until the detection result is passed.
[0147] When the inspection result is that the re-inspection fails, the optical center calibration can be continued based on the product to be assembled after the optical center calibration. At this time, the process can return to step S101, and the camera product assembly device controls the assembly device to loosen the fasteners between the lens bracket and the sensor board, wherein the degree of loosening can be set according to actual needs; then step S120 is executed, and the camera product assembly device controls the light source device to provide a uniform light source for the product to be assembled after the optical center calibration at this time, and controls the product to be assembled after the optical center calibration to perform a shooting operation on the uniform light source; and then steps S200-S200 are continued. S800, the camera product assembly equipment obtains the original image, performs image processing on the original image to obtain a new target point, and then determines the offset between the actual optical center of the product to be assembled after the calibration optical center at this time and the theoretical optical center, and obtains new calibration data, so that the camera product assembly equipment can continue to control the adjustment device to adjust the position of the lens in the product to be assembled after the calibration optical center at this time; finally, continue to execute steps S830-S850, re-inspect the camera product until the re-inspection is passed, obtain the final product to be assembled, and enter the next step, i.e., step S1000.
[0148] Step S1000: assembling the product to be assembled after calibrating the optical center.
[0149] After obtaining the product to be assembled after calibrating the optical center according to step S820, the product to be assembled after calibrating the optical center can be directly assembled. Specifically, the assembly is performed by an assembly device, for example, the fasteners between the lens holder 22 and the sensor board 20 are locked to complete the assembly. Then, the product can be boxed or flowed into the next production line. In other words, the assembled camera product can be directly used as a good product.
[0150] In one implementation, step S1000 may include:
[0151] Step S1010: Assembling the final product to be assembled.
[0152] After the final product to be assembled is obtained in step S850, the final product to be assembled can be assembled directly. The product at this time is a camera product that has passed the re-inspection, or a camera product that has failed the re-inspection but has been recalibrated and passed the inspection. The final product to be assembled is assembled by the assembly device. After the assembly is completed, the assembled product can be boxed or flowed into the next production line. In other words, the assembled camera product at this time can also be regarded as a good product.
[0153] For more implementation details in the specific implementation of the above method steps, please refer to the description of the specific implementation in Example 1. For the sake of brevity of the description, they will not be repeated here.
[0154] The camera product assembly method provided in this embodiment achieves the purpose of calibrating the optical center of the lens and the image sensor during the camera product assembly process. The offset between the center of the lens and the center of the image sensor is calculated by taking pictures, and the position of the lens is adjusted accordingly according to the offset, so that the center of the lens and the center of the image sensor are aligned, thereby solving the problems of vignetting and image blur caused by the misalignment of the center of the lens and the center of the image sensor, and improving the user experience.
[0155] Embodiment 3
[0156] Based on the same inventive concept, Figure 2 Schematic diagram of the hardware structure, this embodiment provides a camera product assembly device, which may include a processor and a memory, in which a camera product assembly program is stored. When the camera product assembly program is executed by the processor, all or part of the steps of each embodiment of the camera product assembly method of the present invention are implemented.
[0157] Specifically, camera product assembly equipment refers to terminal equipment or control devices that can achieve communication connection. Camera product assembly equipment can be terminal equipment such as mobile phones, computers, tablets, embedded industrial computers, etc., or it can be independent control devices such as controllers and processors.
[0158] It can be understood that the camera product assembly equipment may also include a communication bus, a user interface and a network interface. Among them, the communication bus is used to realize the connection and communication between these components; the user interface is used to connect to the client and communicate data with the client. The client may include a camera product, a light source device, an adjustment device, and an assembly device, etc. The user interface may include an output unit such as a display screen and an input unit such as a keyboard; the network interface is used to connect to the backend server and communicate data with the backend server. The network interface may include an input / output interface, such as a standard wired interface and a wireless interface.
[0159] The memory is used to store various types of data, which may include, for example, instructions for any application or method in the camera product assembly device, and data related to the application. The memory may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), random access memory (RAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. Optionally, the memory may also be a storage device independent of the processor.
[0160] The processor is used to call the camera product assembly program stored in the memory and execute the camera product assembly method as described above. The processor can be an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components, which are used to execute all or part of the steps of each embodiment of the camera product assembly method as described above.
[0161] Those skilled in the art will understand that Figure 2 The hardware structure shown in the figure does not constitute a limitation on the camera product assembly device of the present invention, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0162] Embodiment 4
[0163] Based on the same inventive concept, Figure 8 , a first embodiment of the camera product assembly system of the present invention is proposed, such as Figure 8 As shown in the connection diagram, the system may include:
[0164] Light source devices, adjustment devices, assembly devices and camera product assembly equipment;
[0165] Wherein, the camera product assembly equipment is connected to the light source device, the adjustment device and the assembly device respectively.
[0166] Specifically, the camera product assembly device may be the camera product assembly device of the third embodiment, which is used to implement all or part of the steps of each embodiment of the camera product assembly method of the present invention.
[0167] It should be noted that the functions that can be realized by each device or equipment in the camera product assembly system provided in this embodiment and the corresponding technical effects achieved can refer to the description of the specific implementation methods in each embodiment of the camera product assembly method of the present invention. For the sake of brevity of the specification, they will not be repeated here.
[0168] Embodiment 5
[0169] Based on the same inventive concept, this embodiment provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic memory, a disk, an optical disk, a server, etc. A computer program is stored on the storage medium, and the computer program can be executed by one or more processors. When the computer program is executed by the processor, all or part of the steps of each embodiment of the camera product assembly method of the present invention can be implemented.
[0170] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. The above embodiments are only optional embodiments of the present invention and do not limit the patent scope of the present invention. All equivalent structures or equivalent process changes made by using the contents of the present specification and drawings under the inventive concept of the present invention, or directly or indirectly applied in other related technical fields, are included in the patent protection scope of the present invention.
Claims
1. A camera product assembly method, It is characterized in that The method comprises: Acquire an original image; wherein the original image is obtained by photographing the uniform light source when the light source device provides a uniform light source for the product to be assembled, and the product to be assembled is a camera product including a lens and an image sensor; Performing image processing on the original image to obtain a target point; wherein the target point is the point with the highest brightness in the original image; Determine a first offset between the actual optical center and the theoretical optical center of the product to be assembled, and obtain calibration data; wherein the actual optical center corresponds to the target point, and the theoretical optical center is the optical center of the image sensor; According to the calibration data, controlling the adjustment device to adjust the position of the lens to obtain a product to be assembled after the optical center is calibrated; The products to be assembled after the optical center has been calibrated are assembled.
2. The camera product assembly method according to claim 1, It is characterized in that The step of performing image processing on the original image to obtain the target point comprises: Cropping the original image to obtain a regional image; According to a preset threshold, binarization processing is performed on the regional image to obtain a binary image; The center point of the binary image is determined to obtain the target point.
3. The camera product assembly method according to claim 1, It is characterized in that The step of determining a first offset between the actual optical center and the theoretical optical center of the product to be assembled to obtain calibration data comprises: Determine the theoretical optical center of the product to be assembled according to the theoretical center of the image sensor to obtain a first coordinate; wherein the first coordinate is the coordinate information corresponding to the theoretical optical center in the coordinate system established based on the image sensor; Determine the actual optical center of the product to be assembled according to the target point to obtain a second coordinate; wherein the second coordinate is the coordinate information corresponding to the actual optical center in the coordinate system; Obtaining a first offset between the actual optical center and the theoretical optical center according to the distance between the first coordinate and the second coordinate; The calibration data is obtained according to the first offset.
4. The camera product assembly method according to claim 1, It is characterized in that The light source device comprises a device bracket and a light-diffusing plate arranged on the device bracket; Before the step of acquiring the original image, the method further includes: Controlling the adjustment device to adjust the lens and the image sensor to pre-alignment to obtain the product to be assembled; wherein the lens is located between the light averaging plate and the image sensor; The light source device is controlled to provide a uniform light source for the product to be assembled through the light averaging plate, and the product to be assembled is controlled to perform a shooting operation on the light averaging plate.
5. The camera product assembly method according to claim 4, It is characterized in that The image sensor is arranged on the sensor board, the lens is located in the lens module, the lens module is arranged on the lens bracket, the lens bracket is movable relative to the sensor board, and the lens bracket is detachably connected to the sensor board; The step of controlling the adjustment device to adjust the position of the lens according to the calibration data to obtain the product to be assembled after the optical center is calibrated comprises: According to the calibration data, controlling the adjustment device to adjust the position of the lens to obtain an adjusted lens; According to the adjusted lens, the assembly device is controlled to fix the lens bracket and the sensor plate to obtain a product to be assembled after the optical center is calibrated.
6. The camera product assembly method according to claim 5, It is characterized in that After the step of controlling the adjustment device to adjust the position of the lens according to the calibration data to obtain the product to be assembled after the optical center is calibrated, the method further includes: Determine a second offset between the actual optical center and the theoretical optical center of the product to be assembled after the optical center is calibrated; Re-inspecting the product to be assembled after calibrating the optical center according to the second offset to obtain a test result; According to the test results, a final product to be assembled is obtained; The step of assembling the product to be assembled after calibrating the optical center comprises: The final product to be assembled is assembled.
7. The camera product assembly method according to claim 6, It is characterized in that Before the step of controlling the adjusting device to adjust the lens and the image sensor to pre-alignment to obtain the product to be assembled, the method further includes: Controlling the assembling device to loosen the lens holder and the sensor plate, and controlling the adjusting device to fix the lens holder; The step of obtaining the final product to be assembled according to the detection results includes: When the detection result is passed, the product to be assembled after the optical center is calibrated is used as the final product to be assembled, so as to perform the step of assembling the final product to be assembled; When the detection result is not passed, the method returns to the step of controlling the assembling device to loosen the lens holder and the sensor plate until the detection result is passed.
8. A camera product assembly device, It is characterized in that The device comprises a processor and a memory, wherein a camera product assembly program is stored in the memory, and when the camera product assembly program is executed by the processor, the camera product assembly method according to any one of claims 1 to 7 is implemented.
9. A camera product assembly system, It is characterized in that The system comprises: A light source device, an adjustment device, an assembly device, and a camera product assembly device as claimed in claim 8; Wherein, the camera product assembly equipment is connected to the light source device, the adjustment device and the assembly device respectively.
10. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by one or more processors, the camera product assembly method according to any one of claims 1 to 7 is implemented.
