Method and system for calculating field of view angle of camera module, electronic device and storage medium

By generating a pixel coordinate system for the test chart image, the field of view of the largest complete coaxial circle is identified, solving the problems of low efficiency and large error in field of view testing in the existing technology, and realizing efficient and accurate field of view calculation.

CN118842902BActive Publication Date: 2026-01-16TRULY OPTO ELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410872342.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2026-01-16
Estimated Expiration
2044-07-01

AI Technical Summary

Technical Problem

Existing camera module field of view testing is inefficient and has large errors, making it impossible to accurately determine whether the field of view is within the standard range.

Method used

By generating the pixel coordinate system of the test chart image, the field of view of the largest complete coaxial circle is identified, and the actual field of view is calculated based on the distance between the camera module and the test chart and the pixel coordinate system.

Benefits of technology

It improves the efficiency of measuring the field of view of the camera module, and can accurately calculate whether the field of view is within the standard range, thus reducing errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118842902B_ABST
    Figure CN118842902B_ABST
Patent Text Reader

Abstract

The application provides a camera module field of view angle measurement method and system, electronic equipment and storage medium. The method comprises the following steps: obtaining a test card image according to a test card, and generating a pixel coordinate system according to the test card image, wherein the test card comprises a plurality of coaxial circles; identifying a field of view angle p corresponding to the largest complete coaxial circle in the test card image in the horizontal, vertical or diagonal direction of the test card image; and calculating the actual field of view angle Q of the camera module according to the distance h between the camera module and the test card, the field of view angle p and the pixel coordinate system. The application generates a test card image by analysis and generates a pixel coordinate system according to the test card image. The actual field of view angle of the camera module can be automatically calculated according to the distance h between the camera module and the test card, the field of view angle p and the pixel coordinate system, which greatly improves the measurement efficiency of the field of view angle 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 modules, in particular to a camera module field of view angle measurement method and system, electronic equipment and storage medium. BACKGROUND

[0002] At present, the lens equipped by the camera module will identify the field of view angle size in the specification book when it leaves the factory. Not only the field of view angle size of the lens needs to be measured when it leaves the factory, but also the field of view angle will be actually tested after the module factory assembles into a camera module to confirm whether the actual field of view angle of the camera module is within the standard range. The terminal also needs to ensure that the field of view angle is within the specification range when the module factory leaves the factory. Therefore, evaluating the field of view angle of the camera module will be an important indicator.

[0003] The existing field of view angle test is to shoot a picture at a fixed distance, and then calculate the scale of the shooting picture card by visual observation. Its efficiency is low and the error is large. When the field of view angle is too small or too large, normal testing cannot be performed. SUMMARY

[0004] The purpose of the present application is to solve the problems in the prior art and provide a camera module field of view angle measurement method, system, electronic equipment and storage medium.

[0005] In order to achieve the above purpose, in a first aspect, the present application provides a camera module field of view angle measurement method, comprising:

[0006] According to the test chart image, a pixel coordinate system is generated, wherein the test chart includes a plurality of coaxial circles.

[0007] In the horizontal, vertical or diagonal direction of the test chart image, the field of view angle p corresponding to the largest complete coaxial circle in the test chart image is identified.

[0008] According to the distance h between the camera module and the test chart, the field of view angle p and the pixel coordinate system, the actual field of view angle Q of the camera module is calculated.

[0009] As a preferred embodiment, the test chart image is obtained according to the test chart, and a pixel coordinate system is generated according to the test chart image, wherein the test chart includes a plurality of coaxial circles, comprising:

[0010] The left edge of the test chart image is the Y axis, the bottom edge of the test chart image is the X axis, and the intersection of the left edge and the bottom edge of the test chart image is the origin O. A pixel coordinate system is generated.

[0011] Taking the X-axis direction as an example, a left end point horizontal coordinate x1 of the largest complete coaxial circle, a right end point horizontal coordinate x2 of the largest complete coaxial circle and a farthest horizontal coordinate x3 of the test chart image are obtained according to the pixel coordinate system.

[0012] As a preferred implementation, the calculation of the actual field of view angle of the camera module according to the distance h between the camera module and the test chart, the field of view angle p and the pixel coordinates of the test chart comprises:

[0013] The distance h and the field of view angle p are calculated by a first algorithm to obtain an actual physical radius A of the largest complete coaxial circle in the test chart;

[0014] An imaging radius a of the actual physical radius of the largest complete coaxial circle is obtained according to the pixel coordinate system.

[0015] As a preferred implementation, the calculation of the actual field of view angle of the camera module according to the distance h between the camera module and the test chart, the field of view angle p and the pixel coordinates of the test chart further comprises:

[0016] A first pixel distance Δx1 between the left end point of the largest complete coaxial circle and the left edge of the test chart image and a second pixel distance Δx2 between the right end point of the largest complete coaxial circle and the right edge of the test chart image are calculated according to the horizontal coordinates x1, x2 and x3;

[0017] A first actual physical distance Dx1 corresponding to the first pixel distance Δx1 and a second actual physical distance Dx2 corresponding to the second pixel distance Δx2 are calculated according to the ratio of the actual physical radius A and the imaging radius a;

[0018] The actual field of view angle Q is calculated according to the first actual physical distance Dx1, the second actual physical distance Dx2 and the distance h.

[0019] In a second aspect, the embodiments of the present application further provide a system for measuring and calculating the field of view angle of a camera module, comprising:

[0020] A first processing module is configured to obtain a test chart image according to a test chart and generate a pixel coordinate system according to the test chart image, wherein the test chart comprises a plurality of coaxial circles;

[0021] A second processing module is configured to identify a field of view angle p corresponding to the largest complete coaxial circle in the test chart image in the horizontal, vertical or diagonal direction of the test chart image.

[0022] A third processing module is configured to calculate an actual field of view Q of the camera module according to a distance h between the camera module and the test chart, a field of view p, and the pixel coordinate system.

[0023] As a preferred implementation, the first processing module comprises:

[0024] A first processing unit is configured to generate a pixel coordinate system with a left side of the test chart image as a Y axis, a bottom side of the test chart image as an X axis, and an intersection of the left side and the bottom side of the test chart image as an origin O.

[0025] A second processing unit is configured to, for example, in the X axis direction, obtain a left end point horizontal coordinate x1 of the largest complete coaxial circle, a right end point horizontal coordinate x2 of the largest complete coaxial circle, and a farthest horizontal coordinate x3 of the test chart image according to the pixel coordinate system.

[0026] As a preferred implementation, the third processing module comprises:

[0027] A third processing unit is configured to calculate an actual physical radius A of the largest complete coaxial circle in the test chart by using a first algorithm on the distance h and the field of view p.

[0028] A fourth processing unit is configured to obtain an imaging radius a of the actual physical radius of the largest complete coaxial circle according to the pixel coordinate system.

[0029] As a preferred implementation, the third processing module further comprises:

[0030] A fifth processing unit is configured to calculate a first pixel distance Δx1 between a left end point of the largest complete coaxial circle and the left side of the test chart image, and a second pixel distance Δx2 between a right end point of the largest complete coaxial circle and a right side of the test chart image according to the horizontal coordinates x1, x2, and x3.

[0031] A sixth processing unit is configured to calculate a first actual physical distance Dx1 corresponding to the first pixel distance Δx1 and a second actual physical distance Dx2 corresponding to the second pixel distance Δx2 according to a ratio of the actual physical radius A to the imaging radius a.

[0032] A seventh processing unit is configured to calculate the actual field of view Q according to the first actual physical distance Dx1, the second actual physical distance Dx2, and the distance h.

[0033] In a third aspect, an electronic device is provided, comprising:

[0034] Processor; and

[0035] A memory that stores executable code, which, when executed by the processor, causes the processor to perform the method described above.

[0036] Fourthly, a computer-readable storage medium is also provided, on which executable code is stored, which, when executed by a processor of an electronic device, causes the processor to perform the method described above.

[0037] Compared with the prior art, the present invention has at least the following advantages:

[0038] This application analyzes and generates a test chart image and generates a pixel coordinate system based on the test chart image. The actual field of view of the camera module can be automatically calculated based on the distance h between the camera module and the test chart, the field of view p, and the pixel coordinate system, which greatly improves the efficiency of the field of view calculation of the camera module. Attached Figure Description

[0039] Figure 1 A flowchart illustrating a method for calculating the field of view of a camera module according to an embodiment of the present invention;

[0040] Figure 2 A schematic diagram of a test chart provided in one embodiment of the present invention;

[0041] Figure 3 This is a schematic diagram of a test chart image provided in one embodiment of the present invention;

[0042] Figure 4 A flowchart illustrating a method for calculating the field of view of a camera module according to an embodiment of the present invention;

[0043] Figure 5 A schematic diagram of the computational principle provided for one embodiment of the present invention;

[0044] Figure 6 A schematic diagram of the structure of a camera module field of view measurement system provided in one embodiment of the present invention;

[0045] Figure 7 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. Detailed Implementation

[0046] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0047] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be recognized by one skilled in the art that the present application can be practiced without the specific details, and that in some instances, well-known methods, procedures and components have not been described in detail in order to avoid obscuring aspects of the present application.

[0048] To solve the problems in the prior art, in a first aspect, referring to Figures 1-3 Embodiments of the present application provide a method for calculating the field of view angle of a camera module, comprising:

[0049] S10, obtaining a test chart image according to a test chart, and generating a pixel coordinate system according to the test chart image, wherein referring to Figure 2 , the test chart comprises a plurality of coaxial circles;

[0050] It should be noted that the camera module to be tested is photographed at a distance h away from the test chart, thereby obtaining the test chart image, which is shown in Figure 3 .

[0051] S20, identifying the field of view angle p corresponding to the largest complete coaxial circle in the test chart image in the horizontal, vertical or diagonal direction of the test chart image;

[0052] It should be noted that in the embodiments of the present application, the identification is preferably performed in the horizontal direction, referring to Figure 3 , for example, the field of view angle p is 18°.

[0053] S30, calculating the actual field of view angle Q of the camera module according to the distance h between the camera module and the test chart, the field of view angle p and the pixel coordinate system.

[0054] The present application can automatically calculate the actual field of view angle of the camera module according to the distance h between the camera module and the test chart, the field of view angle p and the pixel coordinate system by analyzing the test chart image and generating the pixel coordinate system according to the test chart image, which greatly improves the calculation efficiency of the field of view angle of the camera module.

[0055] As a preferred embodiment, referring to Figures 3-4 , the test chart image is obtained according to a test chart, and a pixel coordinate system is generated according to the test chart image, wherein the test chart comprises a plurality of coaxial circles, comprising:

[0056] S11, generating a pixel coordinate system with the left edge of the test chart image as the Y-axis, the bottom edge of the test chart image as the X-axis, and the intersection of the left edge and the bottom edge of the test chart image as the origin O;

[0057] S12, taking the X-axis direction as an example, obtaining a left end point horizontal coordinate x1 of the largest complete coaxial circle, a right end point horizontal coordinate x2 of the largest complete coaxial circle, and a farthest horizontal coordinate x3 of the test chart image according to the pixel coordinate system.

[0058] wherein, the image reference of the pixel coordinate system is Figure 3 as shown.

[0059] As a preferred embodiment, the reference Figure 4 , the actual field of view angle Q of the camera module is calculated according to the distance h between the camera module and the test chart, the field of view angle p, and the pixel coordinates of the test chart, which comprises:

[0060] S31, the distance h and the field of view angle p are calculated by a first algorithm to obtain the actual physical radius A of the largest complete coaxial circle in the test chart;

[0061] It should be noted that the calculation formula of the actual physical radius A is A = h * tan (p / 2).

[0062] S32, the imaging radius a of the actual physical radius of the largest complete coaxial circle is obtained according to the pixel coordinate system.

[0063] It should be noted that the calculation formula of the imaging radius a is a = (x2-x1) / 2.

[0064] As a preferred embodiment, the actual field of view angle of the camera module is calculated according to the distance h between the camera module and the test chart, the field of view angle p, and the pixel coordinates of the test chart, which further comprises:

[0065] S33, the first pixel distance Δx1 between the left end point of the largest complete coaxial circle and the left edge of the test chart image, and the second pixel distance Δx2 between the right end point of the largest complete coaxial circle and the right edge of the test chart image are calculated according to the horizontal coordinates x1, x2 and x3.

[0066] It should be noted that the calculation formula of the first pixel distance Δx1 is Δx1 = x1-0; the calculation formula of the second pixel distance Δx2 is Δx2 = x3-x2.

[0067] S34, the first actual physical distance Dx1 corresponding to the first pixel distance Δx1 and the second actual physical distance Dx2 corresponding to the second pixel distance Δx2 are calculated according to the ratio of the actual physical radius A and the imaging radius a.

[0068] It should be noted that the calculation method of the first actual physical distance Dx1 can be substituted into the formula:

[0069] A / a = Dx1 / Δx1;

[0070] The calculation method of the second actual physical distance Dx2 can be substituted into the formula:

[0071] A / a = Dx2 / Δx2.

[0072] S35, according to the first actual physical distance Dx1, the second actual physical distance Dx2, the actual physical radius A and the distance h, the actual field of view angle Q is calculated.

[0073] It should be noted that the calculation method of the actual field of view angle Q can be substituted into the formula

[0074] Q = arctan((A + Dx1) / h) + arctan((A + Dx2) / h).

[0075] The calculation principle diagram is as shown in Figure 5 .

[0076] In a second aspect, with reference to Figure 6 , the application also provides a camera module field of view angle measuring and calculating system, comprising:

[0077] A first processing module 100, the first processing module 100 is used for acquiring a test chart image according to a test chart, and generating a pixel coordinate system according to the test chart image, wherein the test chart comprises a plurality of coaxial circles;

[0078] A second processing module 200, the second processing module 200 is used for identifying a field of view angle p corresponding to the largest complete coaxial circle in the test chart image in the horizontal, vertical or diagonal direction of the test chart image in the test chart image;

[0079] A third processing module 300, the third processing module 300 is used for calculating an actual field of view angle Q of the camera module according to a distance h between the camera module and the test chart, the field of view angle p and the pixel coordinate system.

[0080] The application can generate a test chart image by analysis and generate a pixel coordinate system according to the test chart image, and can automatically calculate the actual field of view angle of the camera module according to the distance h between the camera module and the test chart, the field of view angle p and the pixel coordinate system, which greatly improves the measuring and calculating efficiency of the field of view angle of the camera module.

[0081] As a preferred embodiment, the first processing module comprises:

[0082] The first processing unit is configured to generate a pixel coordinate system with the left edge of the test card image as the Y axis, the bottom edge of the test card image as the X axis, and the intersection of the left edge and the bottom edge of the test card image as the origin O.

[0083] The second processing unit is configured to obtain, for example, in the X axis direction, the left end point horizontal coordinate x1 of the largest complete coaxial circle, the right end point horizontal coordinate x2 of the largest complete coaxial circle, and the farthest horizontal coordinate x3 of the test card image according to the pixel coordinate system.

[0084] The image reference of the pixel coordinate system is shown in the following table. Figure 2

[0085] As a preferred embodiment, the third processing module comprises:

[0086] The third processing unit is configured to calculate the distance h and the field of view angle p by using a first algorithm to obtain the actual physical radius A of the largest complete coaxial circle in the test card.

[0087] It should be noted that the calculation formula of the actual physical radius A is A = h*tan(p / 2).

[0088] The fourth processing unit is configured to obtain the imaging radius a of the actual physical radius of the largest complete coaxial circle according to the pixel coordinate system.

[0089] It should be noted that the calculation formula of the imaging radius a is a = (x2-x1) / 2.

[0090] As a preferred embodiment, the third processing module further comprises:

[0091] The fifth processing unit is configured to calculate the first pixel distance Δx1 between the left end point of the largest complete coaxial circle and the left edge of the test card image, and the second pixel distance Δx2 between the right end point of the largest complete coaxial circle and the right edge of the test card image according to the horizontal coordinates x1, x2 and x3.

[0092] It should be noted that the calculation formula of the first pixel distance Δx1 is Δx1 = x1-0; and the calculation formula of the second pixel distance Δx2 is Δx2 = x3-x2.

[0093] The sixth processing unit is configured to calculate the first actual physical distance Dx1 corresponding to the first pixel distance Δx1 and the second actual physical distance Dx2 corresponding to the second pixel distance Δx2 according to the ratio of the actual physical radius A and the imaging radius a. ​

[0094] It should be noted that the calculation method of the first actual physical distance Dx1 can be substituted into the formula:

[0095] A / a=Dx1 / Δx1;

[0096] The calculation method of the second actual physical distance Dx2 can be substituted into the formula:

[0097] A / a=Dx2 / Δx2.

[0098] The seventh processing unit is configured to calculate the actual field of view angle Q according to the first actual physical distance Dx1, the second actual physical distance Dx2 and the distance h.

[0099] It should be noted that the calculation method of the actual field of view angle can be substituted into the formula Q=arctan(Dx1 / h)+arctan(Dx2 / h).

[0100] In a third aspect, Figure 7 is a structural schematic diagram of an electronic device according to an embodiment of the present application. Referring to Figure 7 The electronic device 1000 includes a memory 1010 and a processor 1020. The processor 1020 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs) and integrated circuits composed of combinations of the foregoing, and the general-purpose processor can be any conventional processor that can run a Linux kernel.

[0101] The memory 1010 can include various types of storage units, such as system memory, read-only memory (ROM) and permanent storage device. Among them, the ROM can store static data or instructions required by the processor 1020 or other modules of the computer. The permanent storage device can be a read-write storage device.

[0102] The persistent storage can be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered off. In some embodiments, the persistent storage employs a mass storage device (e.g., magnetic or optical disk, flash memory) as the persistent storage. In other embodiments, the persistent storage can be a removable storage device (e.g., floppy disk, optical drive). The system memory can be a read-and-write memory device or a volatile read-and-write memory device, such as a dynamic random access memory. The system memory can store some or all of the instructions and data that the processor needs at runtime. In addition, the memory 1010 can include a combination of various types of computer readable storage media, including various types of semiconductor storage (e.g., DRAM, SRAM, SDRAM, flash, programmable read-only memory), magnetic tape and / or disk, and / or optical disk, etc. In some embodiments, the memory 1010 can include removable storage and / or non-removable storage including, for example, laser discs (CDs), read-only digital versatile discs (e.g., DVD-ROM, dual-layer DVD-ROM), read-only Blu-ray discs, ultra density discs, flash memory cards (e.g., SD cards, min SD cards, Micro-SD cards, etc.), magnetic hard disks, etc. Computer readable storage media do not include carrier waves and electronic signals over wire, fiber optics, or other communication media.

[0103] The memory 1010 stores executable code that, when processed by the processor 1020, can cause the processor 1020 to perform some or all of the methods described above.

[0104] In addition, the method according to the embodiments of the present application can also be implemented as a computer program or a computer program product, which includes computer program code instructions for performing some or all of the steps of the above-mentioned methods of the present application.

[0105] The above descriptions are only preferred embodiments of the present application and are not intended to limit the present application in other forms. Any person skilled in the art can modify or change the above-mentioned disclosed technical content to equivalent embodiments applied to other fields, but any simple modification, equivalent change and modification of the above-mentioned embodiments without departing from the technical scheme of the present application, according to the technical essence of the present application, still belongs to the protection scope of the present application.

Claims

1. A method for calculating a field of view angle of a camera module, characterized in that, The method comprises the following steps: According to the test chart, a test chart image is obtained, and a pixel coordinate system is generated according to the test chart image, wherein the test chart comprises a plurality of coaxial circles, the left edge of the test chart image is used as the Y-axis, the bottom edge of the test chart image is used as the X-axis, the intersection of the left edge and the bottom edge of the test chart image is used as the origin O, and the pixel coordinate system is generated; taking the X-axis direction as an example, the left end point horizontal coordinate x1 of the largest complete coaxial circle, the right end point horizontal coordinate x2 of the largest complete coaxial circle and the farthest horizontal coordinate x3 of the test chart image are obtained according to the pixel coordinate system; In the horizontal, vertical or diagonal direction of the test chart image, the field of view angle p corresponding to the largest complete coaxial circle in the test chart image is identified; The actual field of view angle Q of the camera module is calculated according to the distance h between the camera module and the test chart, the field of view angle p and the pixel coordinate system, the distance h and the field of view angle p are calculated by using a first algorithm to obtain the actual physical radius A of the largest complete coaxial circle in the test chart; According to the pixel coordinate system, the imaging radius a of the actual physical radius of the largest complete coaxial circle is obtained, the first pixel distance Δx1 between the left end point of the largest complete coaxial circle and the left edge of the test chart image and the second pixel distance Δx2 between the right end point of the largest complete coaxial circle and the right edge of the test chart image are calculated according to the horizontal coordinates x1, x2 and x3; the first actual physical distance Dx1 corresponding to the first pixel distance Δx1 and the second actual physical distance Dx2 corresponding to the second pixel distance Δx2 are calculated according to the ratio of the actual physical radius A to the imaging radius a; the actual field of view angle Q is calculated according to the first actual physical distance Dx1, the second actual physical distance Dx2 and the distance h.

2. A system for measuring the field of view angle of a camera module, characterized in that, The method comprises the following steps: The first processing module is used for obtaining a test chart image according to a test chart, and generating a pixel coordinate system according to the test chart image, wherein the test chart comprises a plurality of coaxial circles; the first processing module comprises a first processing unit and a second processing unit, the first processing unit is used for generating a pixel coordinate system with the left edge of the test chart image as the Y-axis, the bottom edge of the test chart image as the X-axis, and the intersection of the left edge and the bottom edge of the test chart image as the origin O; the second processing unit is used for taking the X-axis direction as an example, and obtaining the left end point horizontal coordinate x1 of the largest complete coaxial circle, the right end point horizontal coordinate x2 of the largest complete coaxial circle and the farthest horizontal coordinate x3 of the test chart image according to the pixel coordinate system; The second processing module is used for identifying the field of view angle p corresponding to the largest complete coaxial circle in the test chart image in the horizontal, vertical or diagonal direction of the test chart image; A third processing module is configured to calculate an actual field of view Q of the camera module according to a distance h between the camera module and the test chart, a field of view p, and the pixel coordinate system. The third processing module comprises a third processing unit and a fourth processing unit. The third processing unit is configured to calculate the actual physical radius A of a largest complete coaxial circle in the test chart by using a first algorithm with the distance h and the field of view p. The fourth processing unit is configured to obtain an imaging radius a of the actual physical radius of the largest complete coaxial circle according to the pixel coordinate system. The third processing module further comprises a fifth processing unit, a sixth processing unit, and a seventh processing unit. The fifth processing unit is configured to calculate a first pixel distance Δx1 between a left end point of the largest complete coaxial circle and a left side of the test chart image, and a second pixel distance Δx2 between a right end point of the largest complete coaxial circle and a right side of the test chart image, according to the horizontal coordinates x1, x2, and x3. The sixth processing unit is configured to calculate a first actual physical distance Dx1 corresponding to the first pixel distance Δx1 and a second actual physical distance Dx2 corresponding to the second pixel distance Δx2 according to a ratio of the actual physical radius A and the imaging radius a. The seventh processing unit is configured to calculate the actual field of view Q according to the first actual physical distance Dx1, the second actual physical distance Dx2, and the distance h.

3. An electronic device, comprising: comprise: a processor; and a memory having stored thereon executable code that, when executed by the processor, causes the processor to perform the method of claim 1.

4. A computer-readable storage medium, characterized in that, a memory having stored thereon executable code that, when executed by the processor, causes the processor to perform the method of claim 1.

Citation Information

Patent Citations

  • Method for testing focal distance of camera lens by utilizing field angle

    CN102073193A

  • Camera field angle measuring method

    CN110987375A