Method, device, medium and equipment for detecting focal length deviation condition of camera module

By taking target images before and after dispensing and calculating the distance ratio, and utilizing the principle of similar triangles, the problem of difficulty in judging the focal length offset of the camera module is solved, and the quality of the camera module is accurately assessed, thus avoiding the production of defective products.

CN116546188BActive Publication Date: 2025-10-17KUNSHAN QIUTI PHOTOELECTRIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310450355.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-24
Publication Date
2025-10-17
Estimated Expiration
2043-04-24

AI Technical Summary

Technical Problem

Existing technologies make it difficult to accurately determine the focal length offset of a camera module before and after glue curing, which affects the accuracy of camera module quality assessment, especially the user experience of a fixed-focus camera module.

Method used

By taking target images of the inspection object before and after dispensing and curing, calculating and comparing the distance ratio of the two inspection targets, and using the principle of similar triangles to determine the direction and degree of focal length offset of the camera module.

Benefits of technology

It achieves accurate judgment of the focal length offset of the camera module, avoids the production of defective products, and improves the accuracy of camera module quality assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116546188B_ABST
    Figure CN116546188B_ABST
Patent Text Reader

Abstract

The application discloses a method, device, medium and equipment for detecting focal length offset condition of a camera module. The method comprises the following steps: before and after dispensing and curing of the camera module, a detection object is photographed to obtain a first target picture before dispensing and curing and a second target picture after dispensing and curing, wherein the detection object comprises at least two detection targets; two detection targets are selected as selected targets; a first distance of the two selected targets is determined according to the first target picture, and a second distance of the two selected targets is determined according to the second target picture; and focal length offset information of the camera module is determined according to the first distance and the second distance. The application can determine the focal length offset direction and offset degree of the camera module, and accurately judge the focal length offset condition of the camera module.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of camera module detection, in particular, to a method and device for detecting focal length deviation of a camera module, a medium and an apparatus. BACKGROUND

[0002] The camera module includes lens, sensor and lens seat and other components, the lens and sensor and other components are installed on the lens seat by means of dispensing, and then the lens and sensor and other components are firmly connected to the lens seat by means of dispensing curing. Since the glue expands when heated and shrinks when cooled, the actual focal point will deviate from the preset focal point before curing after the glue is cured, resulting in a certain degree of deviation of the actual focal length of the camera module from the preset focal length before curing.

[0003] However, the focal length deviation of the camera module before and after curing includes the deviation direction and the deviation degree, which is difficult to accurately determine, affecting the accuracy of the quality evaluation of the camera module. In particular, for fixed-focus camera modules, since the focal length is not adjustable, when the focal length deviation is greater than the preset deviation, the quality and actual use experience of the camera module will be affected. Therefore, there is an urgent need for a method for detecting the focal length deviation of the camera module. SUMMARY

[0004] Embodiments of the present application provide a method, device, medium and electronic device for detecting the focal length deviation of a camera module, which can detect the deviation direction and the deviation degree of the camera module and accurately evaluate the quality of the camera module.

[0005] Other characteristics and advantages of the present application will become apparent from the following detailed description, or will be learned by practice of the present application.

[0006] According to a first aspect of the embodiments of the present application, a method for detecting the focal length deviation of a camera module is provided, comprising:

[0007] Before and after dispensing and curing of the camera module, the detection object is photographed to obtain a first target picture before dispensing and curing and a second target picture after dispensing and curing, wherein the detection object includes at least two detection targets;

[0008] Two detection targets are selected as selected targets;

[0009] According to the first target picture, the first distance of the two selected targets is determined, and according to the second target picture, the second distance of the two selected targets is determined;

[0010] According to the first distance and the second distance, the focal length deviation information of the camera module is determined.

[0011] In some embodiments of the present application, based on the foregoing scheme, the determining the focal length shift information of the camera module according to the first distance and the second distance comprises:

[0012] calculating a ratio of the first distance and the second distance;

[0013] determining the focal length shift information of the camera module by similar triangles according to the ratio of the first distance and the second distance.

[0014] In some embodiments of the present application, based on the foregoing scheme, the determining the focal length shift information of the camera module according to the ratio of the first distance and the second distance by similar triangles comprises:

[0015] comparing the ratio of the first distance and the second distance with 1 to determine the focal length shift direction of the camera module.

[0016] In some embodiments of the present application, based on the foregoing scheme, the comparing the ratio of the first distance and the second distance with 1 to determine the focal length shift direction of the camera module comprises:

[0017] if the ratio of the first distance and the second distance is greater than 1, the focal length shift direction of the camera module is near focus;

[0018] if the ratio of the first distance and the second distance is less than 1, the focal length shift direction of the camera module is far focus.

[0019] In some embodiments of the present application, based on the foregoing scheme, the determining the focal length shift information of the camera module according to the ratio of the first distance and the second distance comprises:

[0020] determining the focal length shift degree of the camera module according to the ratio of the first distance and the second distance.

[0021] In some embodiments of the present application, based on the foregoing scheme, the determining the first distance of the two selected targets according to the first target picture comprises:

[0022] determining the first distance of the two selected targets according to the number of pixels between the two selected targets.

[0023] In some embodiments of the present application, based on the foregoing scheme, the determining the second distance of the two selected targets according to the second target picture comprises:

[0024] determining the second distance of the two selected targets according to the number of pixels between the two selected targets.

[0025] In some embodiments of the present application, the direction and degree of the focal length deviation of the camera module are determined by the ratio of the first distance and the second distance, so that the focal length deviation of the camera module can be accurately judged and the quality of the camera module can be effectively evaluated, thereby avoiding substandard products.

[0026] According to a second aspect of embodiments of the present application, a device for detecting the focal length deviation of a camera module is provided, and the device is characterized in that the device comprises:

[0027] a shooting unit configured to shoot a detection object before and after curing of the camera module, to obtain a first target picture shot before curing and a second target picture shot after curing, wherein the detection object comprises at least two detection targets;

[0028] a selection unit configured to select the two detection targets as selected targets;

[0029] a distance determination unit configured to determine a first distance between the two selected targets according to the first target picture, and determine a second distance between the two selected targets according to the second target picture;

[0030] a deviation information determination unit configured to determine the focal length deviation information of the camera module according to the first distance and the second distance.

[0031] According to a third aspect of embodiments of the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program comprising executable instructions, when the executable instructions are executed by a processor, the method of any one of the above-mentioned first aspect is implemented.

[0032] According to a fourth aspect of embodiments of the present application, an electronic device is provided, and the electronic device comprises one or more processors, and a memory configured to store executable instructions of the processor, when the executable instructions are executed by the one or more processors, the one or more processors implement the method of any one of the above-mentioned first aspect.

[0033] The beneficial effects of the above-mentioned second aspect to fourth aspect can refer to the beneficial effects of the above-mentioned first aspect and the beneficial effects of each embodiment of the first aspect, which will not be repeated here.

[0034] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0035] The accompanying drawings are incorporated into and constitute a part of the specification, illustrating embodiments consistent with the present application and, together with the specification, explaining the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0036] Figure 1 A test chart including two dots in an embodiment of the present application is shown;

[0037] Figure 2 A flow chart showing a method for detecting a focal length offset condition of a camera module in an embodiment of the present application is shown;

[0038] Figure 3 A flowchart of a method for determining focal length offset information of the camera module according to the first distance and the second distance in an embodiment of the present application is shown;

[0039] Figure 4 A schematic diagram illustrating the principle of determining focal length offset information of the camera module using similar triangles in an embodiment of the present application is shown;

[0040] Figure 5 A block diagram of a device for detecting a focal length offset of a camera module in an embodiment of the present application is shown;

[0041] Figure 6 A schematic diagram showing a computer-readable storage medium in an embodiment of the present application is shown;

[0042] Figure 7 A schematic diagram showing the system structure of an electronic device in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0043] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art.

[0044] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner.In the following description, many specific details are provided so as to provide a full understanding of the embodiments of the present application. However, it will be appreciated by those skilled in the art that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps etc. can be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0045] The block diagrams illustrated in the drawings are merely functional entities, and do not necessarily have to correspond to physically independent entities. That is, the functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0046] The flowcharts illustrated in the drawings are merely exemplary illustrations, and do not necessarily include all contents and operations / steps, nor do they have to be executed in the order described. For example, some operations / steps can be further decomposed, and some operations / steps can be combined or partially combined, so the actual execution order can be changed according to actual conditions.

[0047] It should be noted that the terms "a plurality of" mentioned herein refer to two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the three cases of A alone, A and B together, and B alone. The character " / " generally represents that the front and rear associated objects are in an "or" relationship.

[0048] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the objects thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described.

[0049] The system architecture can include a detection object, a camera module, a network, and a server, the detection object including at least two detection targets, referring to Figure 1 , Figure 1 A test card including two round dots is shown in the embodiments of the present application, the detection object can be a test card including two round dots, the center of the round dot of the test card serving as a detection target, or two round balls with mark points, each mark point of the round ball serving as a detection target, or a panel with three detection points, the detection points serving as detection targets, the camera module including an image sensor, a lens, a lens seat, and a memory, the image sensor can be a CCD (Charge-Coupled Device) image sensor or a CMOS (Complementary Metal-Oxide Semiconductor) image sensor, the image sensor can include a photosensitive area, an analog-to-digital converter, and an image processor, the network is a medium for providing a communication link between the camera module and the server, the lens can include a lens through which light passes, and the network can include various connection types, such as wired communication links, wireless communication links, and the like.

[0050] In an embodiment of the present application, the lens can be used to capture the detection object, the optical image of the detection object passes through the lens of the lens, is projected onto the photosensitive area of the image sensor to form an image analog signal, and then is converted into an image digital signal by an analog-to-digital converter, and then is compressed into a compressed image signal by an image processor, and the compressed image signal is stored in a memory, and then can be sent to a server through a network, and the first distance and the second distance are determined by the server.

[0051] In the embodiment, after the lens and other components are mounted on the lens seat by the dispensing method, before the dispensing solidifies, the lens is used to capture the detection object, and the image of the detection object is formed on the photosensitive area of the image sensor to obtain a first target picture, the distance between the two detection targets in the first target picture is the first distance, after the dispensing solidifies, the lens is used to capture the detection object again, and the image of the detection object is formed on the photosensitive area of the image sensor to obtain a second target picture, the distance between the two detection targets in the second target picture is the second distance, the first picture and the second picture are sent to the server through a network, the first distance and the second distance are determined by the server based on the first picture and the second picture, and the focal length offset information of the camera module is determined according to the first distance and the second distance, the focal length offset information of the camera module is the focal length offset condition of the camera module after the dispensing solidifies relative to the camera module before the dispensing solidifies, the focal length offset direction of the camera module is that the focal length of the camera module belongs to one of the following situations relative to the preset focal length, that is, the near focal offset, the far focal offset and the no offset, the focal length offset degree of the camera module is that the focal length of the camera module belongs to one of the following situations relative to the preset focal length, that is, the large offset degree, the small offset degree and the no offset, and the size of the offset degree can be determined by the quality requirement of the camera module, for example, it can be set that the offset degree is greater than a preset offset value, and then it is judged that the camera module is unqualified, the preset offset value can be set according to the actual situation, and therefore, according to the first distance and the second distance, the focal length offset condition of the camera module can be accurately judged, the quality of the camera module can be effectively evaluated, and the substandard product of the camera module can be avoided.

[0052] The technical scheme provided in the present application is mainly applied to the scene of camera module quality detection, in the scene of camera module quality detection, the focal length of the camera module needs to be detected to judge whether the focal length of the camera module is offset compared with the preset focal length, if the focal length is offset or the offset reaches a certain degree, for example, the focal length offset reaches 6 μm, it is judged that the quality of the camera module is unqualified.

[0053] It should be noted that the method for detecting the focal length offset condition of the camera module provided in the embodiments of the present application can be executed by a server. However, in other embodiments of the present application, the camera module can also have similar functions as the server, so as to execute the method for detecting the focal length offset condition of the camera module provided in the embodiments of the present application.

[0054] It should also be noted that the number of servers is only illustrative. According to actual needs, the server can be a stand-alone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms, etc. The present application does not limit this.

[0055] It should be explained that the cloud computing mentioned above is a computing mode that distributes computing tasks on a resource pool composed of a large number of computing devices, so that various application systems can obtain computing power, storage space and information services according to needs. The network that provides resources is called "cloud". The resources in the "cloud" are infinitely expandable to users and can be obtained at any time, used on demand, and expanded at any time. By establishing a cloud computing resource pool (referred to as a cloud platform, generally referred to as an IaaS (Infrastructure as a Service) platform), a plurality of types of virtual resources are deployed in the resource pool for external customers to select and use. The cloud computing resource pool mainly includes: computing devices (virtualized machines containing operating systems), storage devices, network devices.

[0056] Figure 2 A flowchart of the method for detecting the focal length offset condition of the camera module in the embodiments of the present application is shown, which can be executed by a device with computing processing function.

[0057] Referring to Figure 2 The method for detecting the focal length offset condition of the camera module at least includes steps S1 to S4, which are described in detail as follows:

[0058] In step S1, the detection object is photographed before and after the camera module is glued and cured, to obtain a first target picture photographed before gluing and curing and a second target picture photographed after gluing and curing, wherein the detection object includes at least two detection targets.

[0059] In step S2, two detection targets are selected as selected targets.

[0060] In step S3, a first distance of the two selected targets is determined according to the first target image, and a second distance of the two selected targets is determined according to the second target image.

[0061] When the number of detected targets is greater than two, two detected targets need to be selected as the selected targets for determining the first distance and the second distance, that is, the same two detected targets are selected as the reference, and if the two detected targets corresponding to the first distance and the two detected targets corresponding to the second distance are not the same, the comparison of the first distance and the second distance is meaningless. For example, the detected objects include three detected targets located on the same straight line, which can be sequentially marked as detected target A, detected target B and detected target C. If the two detected targets corresponding to the first distance are detected target A and detected target B, and the two detected targets corresponding to the second distance are detected target A and detected target C, in the detected objects, the distance between detected target A and detected target C is greater than the distance between detected target A and detected target B. Thus, the first distance is likely to be greater than the second distance, but this is due to the distance of the detected targets themselves, and cannot be used to judge the offset condition of the camera module.

[0062] Specifically, the first distance of the two selected targets can be determined according to the first target image by the following method:

[0063] According to the number of pixels between the two selected targets, the first distance of the two selected targets is determined. Specifically, according to the number of pixels and the preset resolution, the first distance can be obtained.

[0064] The first distance of the two selected targets can also be determined by a direct distance measurement method.

[0065] The second distance of the two selected targets can be determined according to the second target image by the following method:

[0066] According to the number of pixels between the two selected targets, the second distance of the two selected targets is determined. Specifically, according to the number of pixels and the preset resolution, the second distance can be obtained.

[0067] The second distance of the two selected targets can also be determined by a direct distance measurement method.

[0068] In the present application, the number of pixels is used to determine the first distance and the second distance because the order of magnitude of the first distance and the second distance is small, and it is more convenient to calculate using the number of pixels.

[0069] In step S4, the focal length offset information of the camera module is determined according to the first distance and the second distance.

[0070] Figure 3A flowchart of a method for determining the focal length offset information of the camera module according to the first distance and the second distance is shown in the embodiments of the present application, and at least includes S41 to S42, which are described in detail as follows.

[0071] In step S41, the ratio of the first distance and the second distance is calculated.

[0072] In step S42, the focal length offset information of the camera module is determined according to the ratio of the first distance and the second distance by similar triangles.

[0073] Figure 4 A principle diagram of determining the focal length offset information of the camera module by similar triangles is shown in the embodiments of the present application, and the application scenario is as follows: the detection object is a test card with two circular dots, the plane of the test card is perpendicular to the shooting direction of the camera module, Figure 5 In the above, H is the actual distance of the two detection targets, i.e., the distance between the centers of the two circular dots, h1 is the first distance, h2 is the second distance, V1 is the focal length of the camera module before curing, V2 is the focal length of the camera module after curing, U1 is the distance between the lens of the lens and the detection object (test card) before curing, U2 is the distance between the lens of the lens and the detection object (test card) after curing, and C is the focal length offset of the camera module after curing relative to the focal length before curing, wherein U2=U1-C, V2=V1+C, according to the principle of similar triangles, the following can be obtained:

[0074] H / U1=h1 / V1, H / U2=h2 / V2, since the order of magnitude of U1 is millimeter level, about 100mm to 1000mm, the order of magnitude of C is micrometer level, about 0 to 10μm, C can be ignored relative to U1 and U2, and it can be considered that the distance between the lens of the lens and the detection object, i.e., the object distance, remains unchanged before and after curing, so U2≈U1, H / U1

[0075] ≈H / U2, so h1 / V1=h2 / V2, after transformation, h1 / h2=V1 / V2, i.e., the triangle formed by the lens of the lens and the edge of h1 and the triangle formed by the lens of the lens and the edge of h2 can be regarded as similar triangles, and according to the principle of similar triangles, V1 / V2 can be obtained from h1 / h2.

[0076] Therefore, according to the ratio of the first distance and the second distance, the ratio of the focal length of the camera module before curing relative to the focal length after curing can be obtained, and the focal length offset information of the camera module is determined according to the ratio of the focal length of the camera module before curing relative to the focal length after curing.

[0077] Specifically, a ratio of the first distance and the second distance can be compared with 1, i.e., by comparing the ratio of the focal length of the camera module before dispensing and curing with the focal length of the camera module after dispensing and curing, a direction of focal length shift of the camera module is determined.

[0078] If the ratio of the first distance and the second distance is greater than 1, the first distance is greater than the second distance, and the focal length of the camera module before dispensing and curing is greater than the focal length of the camera module after dispensing and curing, the direction of focal length shift of the camera module is near focus. If the ratio of the first distance and the second distance is less than 1, the first distance is less than the second distance, and the focal length of the camera module before dispensing and curing is less than the focal length of the camera module after dispensing and curing, the direction of focal length shift of the camera module is far focus. If the ratio of the first distance and the second distance is equal to 1, i.e., the focal length of the camera module before dispensing and curing is equal to the focal length of the camera module after dispensing and curing, the focal length of the camera module does not exist shift.

[0079] Specifically, according to the ratio of the first distance and the second distance, a degree of focal length shift of the camera module is determined.

[0080] A limit value of an absolute value of a difference between the ratio of the first distance and the second distance and 1 can be set, such as the limit value can be 0.000125. If the absolute value of the difference between the ratio of the first distance and the second distance and 1 is 0, it is determined that the focal length of the camera module does not exist shift. If the absolute value of the difference between the ratio of the first distance and the second distance and 1 is less than the limit value, it is determined that the degree of focal length shift of the camera module is small. If the absolute value of the difference between the ratio of the first distance and the second distance and 1 is greater than the limit value, it is determined that the degree of focal length shift of the camera module is large.

[0081] Since the absolute value of the difference between the ratio of the first distance and the second distance and 1 is small in order of magnitude, the difference between the first distance and the second distance can also be used to determine the degree of focal length shift of the camera module.

[0082] A limit value of an absolute value of the difference between the first distance and the second distance can be set, such as the limit value can be 6μm. If the absolute value of the difference between the first distance and the second distance is 0, it is determined that the focal length of the camera module does not exist shift. If the absolute value of the difference between the first distance and the second distance is less than the limit value, it is determined that the degree of focal length shift of the camera module is small. If the absolute value of the difference between the first distance and the second distance is greater than the limit value, it is determined that the degree of focal length shift of the camera module is large.

[0083] Figure 5A block diagram of the device for detecting the focal length offset condition of the camera module in the embodiment of the present application is shown.

[0084] As shown in Figure 5 the same inventive concept, the second aspect of the embodiment of the present application further provides a device 100 for detecting the focal length offset condition of the camera module, which comprises a shooting unit 101, a selected unit 102, a distance determination unit 103 and an offset information determination unit 104:

[0085] The shooting unit 101 shoots the detection object before and after the camera module is glued and cured, to obtain a first target picture shot before the gluing and curing and a second target picture shot after the gluing and curing, wherein the detection object comprises at least two detection targets.

[0086] The selected unit 102 selects two detection targets as selected targets.

[0087] The distance determination unit 103 determines a first distance of the two selected targets according to the first target picture, and determines a second distance of the two selected targets according to the second target picture.

[0088] The offset information determination unit 104 determines the focal length offset information of the camera module according to the first distance and the second distance.

[0089] Based on the same inventive concept, the third aspect of the embodiment of the present application further provides another aspect, and the present application further provides a computer readable storage medium having a program product stored thereon, which can implement the method for detecting the focal length offset condition of the camera module described above in the specification. In some possible implementation manners, each aspect of the present application can also be implemented in the form of a program product, which includes program codes for causing the terminal device to perform the steps according to various exemplary embodiments of the present application described in the above “Exemplary Methods” section of the specification when the program product runs on the terminal device.

[0090] Referring to Figure 6 , a program product 200 for implementing the above method according to the embodiment of the present application is described, which can adopt a portable compact disc read-only memory (CD-ROM) and include program codes, and can run on a terminal device, such as a personal computer. However, the program product of the present application is not limited to this, and in this document, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or apparatus.

[0091] The program product can employ any combination of one or more computer-readable media. The computer-readable media can be a computer-readable storage medium or a computer-readable signal medium. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include the following: an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0092] The computer-readable signal medium can include a computer-readable storage medium that is propagated as a carrier wave. The propagated signal can take any of a variety of forms, including but not limited to electro-magnetic, optical, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium that is not a computer-readable storage medium and that can communicate, propagate, or transport programming code.

[0093] The program code embodied on the computer-readable media can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0094] The program code can be executed by one or more programmable processors, which can be implemented using one or more microprocessors, microcontrollers, digital signal processors, application specific integrated circuits, field programmable gate arrays, programmable logic devices, or the like. The program code can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or the like. The program code can execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider. The application can also be practiced in

[0095] As another aspect, the application also provides an electronic device capable of implementing the above method.

[0096] Those skilled in the art can understand that each aspect of the present application can be implemented as a system, a method or a program product. Therefore, each aspect of the present application can be specifically implemented as follows: a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, which can be collectively referred to as "circuitry", "module" or "system" here.

[0097] The electronic device 300 according to this embodiment of the present application will be described below with reference to Figure 7 Figure 7 The electronic device 300 is merely an example and should not impose any limitation on the function and use range of the embodiments of the present application.

[0098] As shown in Figure 7 The electronic device 300 is in the form of a general computing device. The components of the electronic device 300 can include, but are not limited to, the at least one processing unit 310 described above, the at least one storage unit 320 described above, and a bus 330 connecting different system components, including the storage unit 320 and the processing unit 310.

[0099] The storage unit stores program codes which can be executed by the processing unit 310, so that the processing unit 310 performs the steps according to various exemplary embodiments of the present application described in the "Embodiment Method" part of the present specification.

[0100] The storage unit 320 can include a readable medium in the form of a volatile storage unit, such as a random access memory (RAM) 321 and / or a cache memory 322, and can further include a read-only memory (ROM) 323.

[0101] The storage unit 320 can further include program / utilities 324 having a set of (at least one) program modules 325, such as an operating system, one or more application programs, other program modules, and program data, each of which or some combination of which can include the implementation of a network environment.

[0102] The bus 330 can represent one or more of several types of bus structures, including a storage unit bus or storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of a variety of bus structures.

[0103] ​The electronic device 300 can also communicate with one or more external devices 400 such as a keyboard or pointing device, a Bluetooth device, etc.; other devices that enable a user to interact with the electronic device 300; and / or any devices (e.g., a router, a modem, a peer device or other computing device) that enable the electronic device 300 to communicate with one or more other computing devices. Such communication can occur via an input / output (I / O) interface 350. Still yet, the electronic device 300 can communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or the Internet, through a network adapter 360. As illustrated, the network adapter 360 communicates with the other components of the electronic device 300 via the bus 330. It should be appreciated that the bus 330 can be one of any suitable type and that the components of the electronic device 300 can be implemented using one or more of any suitable type of architecture and / or platform.

[0104] The functions described herein can be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions can be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Other examples and implementations are within the scope and spirit of the disclosure and appended claims. For example, due to the nature of software, functions described above can be implemented using software executed by a processor, hardware, firmware, hardwiring, or combinations of any of these. Features implementing functions can also be physically located at various positions, including being distributed such that portions of functions are implemented at different physical locations. Also, as technology evolves, the literal "software" described is intended to encompass any electronic hardware with like functionality.

[0105] In several embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. Among them, the above-mentioned device embodiments are only schematic, for example, the division of the units can be a logical function division, and actual implementation can have another division mode, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the coupling or direct coupling or communication connection between the displayed or discussed each other can be through some interface, indirect coupling or communication connection between units or modules, which can be electrical or other forms.

[0106] The units described as separate components can or can not be physically separated, and the components of the control device can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0107] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the entire or part of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0108] The above only describes the embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims

1. A method for detecting a focus offset condition of a camera module, characterized in that: include: Before and after the glue curing of the camera module, the detection object is photographed respectively to obtain a first target image taken before the glue curing and a second target image taken after the glue curing, wherein the detection object includes at least two detection targets; Select two detection targets as selected targets; Determine a first distance between two selected targets based on the first target image, and determine a second distance between the two selected targets based on the second target image; According to the first distance and the second distance, the focal length offset information of the camera module is determined, and the determining of the focal length offset information of the camera module according to the first distance and the second distance includes: calculating the ratio of the first distance and the second distance; according to the ratio of the first distance and the second distance, determining the focal length offset information of the camera module through similar triangles; according to the ratio of the first distance and the second distance, determining the focal length offset degree of the camera module; according to the ratio of the first distance and the second distance, determining the focal length offset information of the camera module through similar triangles, including: comparing the ratio of the first distance and the second distance to 1 to determine the focal length offset direction of the camera module.

2. The method according to claim 1, characterized in that The comparing the ratio of the first distance to the second distance and 1 to determine the focus offset direction of the camera module includes: If the ratio of the first distance to the second distance is greater than 1, the focus offset direction of the camera module is close focus; If the ratio of the first distance to the second distance is less than 1, the focus offset direction of the camera module is telefocus.

3. The method according to claim 1, characterized in that Determining a first distance between two selected targets based on the first target image includes: A first distance between the two selected objects is determined based on the number of pixels between the two selected objects.

4. The method according to claim 1, wherein Determining a second distance between two selected targets based on the second target image includes: A second distance between the two selected objects is determined based on the number of pixels between the two selected objects.

5. A device for detecting the focus offset of a camera module, characterized in that: The device comprises: A shooting unit, which shoots the detection object before and after the glue is cured by the camera module, respectively, to obtain a first target image shot before the glue is cured and a second target image shot after the glue is cured, wherein the detection object includes at least two detection targets; The unit is selected, and two detection targets are selected as selected targets; a distance determining unit, which determines a first distance between two selected targets based on the first target image, and determines a second distance between the two selected targets based on the second target image; An offset information determination unit determines the focal length offset information of the camera module based on the first distance and the second distance, and the determining the focal length offset information of the camera module based on the first distance and the second distance includes: calculating the ratio of the first distance and the second distance; determining the focal length offset information of the camera module through similar triangles according to the ratio of the first distance and the second distance; determining the degree of focal length offset of the camera module according to the ratio of the first distance and the second distance; determining the focal length offset information of the camera module through similar triangles according to the ratio of the first distance and the second distance, including: comparing the ratio of the first distance and the second distance to 1 to determine the focal length offset direction of the camera module.

6. A computer-readable storage medium, characterized in that A computer program is stored thereon, which includes executable instructions. When the executable instructions are executed by the processor, the method for detecting the focal length offset condition of the camera module according to any one of claims 1 to 4 is implemented.

7. An electronic device, characterized in that: include: one or more processors; A memory for storing executable instructions of the processor, which, when executed by the one or more processors, enables the one or more processors to implement the method for detecting the focal length offset condition of the camera module according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Focusing method, device, electronic device and medium

    CN109257539A

  • Method for calculating camera module carrying glue shrinkage compensation amount, medium and electronic equipment

    CN112040122A