FOV measurement method, device, computer program product and storage medium

By taking two images when the optical axis of the terminal device lens is horizontal and calculating the FOV based on the overlapping area and the target angle, the problem of high measurement cost of the terminal device lens FOV is solved, and low-cost and accurate FOV measurement is achieved.

CN114666570BActive Publication Date: 2025-03-18REALSEE (BEIJING) TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210173958.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-24
Publication Date
2025-03-18
Estimated Expiration
2042-02-24

AI Technical Summary

Technical Problem

The cost of obtaining FOVs of terminal equipment lenses is too high, and the prior art is difficult to achieve low-cost and accurate FOV measurements.

Method used

When the lens optical axis direction of the terminal device is horizontal, the lens is called to capture the first and second images, and the FOV of the lens is calculated using a formula based on the overlapping area and the target angle of the two images.

Benefits of technology

The FOV of the terminal device lens is realized at a low cost, which improves the accuracy of measurement and reduces the measurement cost of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114666570B_ABST
    Figure CN114666570B_ABST
Patent Text Reader

Abstract

The present invention provides a FOV measurement method, device, computer program product and storage medium, the method comprising: when the optical axis direction of the lens of the terminal device is in the horizontal direction, calling the lens to shoot and obtain a first image; wherein the terminal device is fixed on a gimbal; sending a first instruction to the gimbal; wherein the first instruction is used to instruct the gimbal to rotate to a target angle; the first instruction includes the target angle; calling the lens to shoot and obtain a second image; based on the first image and the second image, determining the FOV of the lens. The method provided by the present invention, when the optical axis of the lens of the terminal device is in the horizontal direction and the angle with the horizontal direction is the target angle, respectively calling the lens of the terminal device to shoot and obtain the first image and the second image; then based on the first image and the second image, the FOV measurement of the lens is realized, the user can obtain the FOV of the lens at a low cost, and at the same time, the accuracy of the FOV measurement of the lens is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a FOV measurement method, device, computer program product and storage medium. Background Art

[0002] The field of view (FOV) of a lens refers to the angle formed by the two edges of the lens with the lens as the vertex and the maximum range of the target image that can pass through the lens, that is, the angle range in which the lens can receive the target image; FOV is one of the important technical indicators of the lens, and it is crucial to obtain the FOV of the lens of the terminal device.

[0003] In the related art, when measuring the FOV of the lens of a terminal device, a special measurement laboratory needs to be built, and an open space is required to obtain the FOV of the lens of the terminal device; however, for ordinary consumers, the solution of building a special measurement laboratory results in excessively high measurement costs for users. Summary of the invention

[0004] The present invention provides a FOV measurement method, device, computer program product and storage medium, which are used to solve the defect that it is too expensive for ordinary consumers to obtain the FOV of the lens of a terminal device, to achieve low-cost measurement of the FOV of the lens of the terminal device, and to improve the FOV measurement accuracy of the lens of the terminal device.

[0005] The present invention provides a FOV measurement method, the method comprising:

[0006] When the optical axis direction of the lens of the terminal device is horizontal, calling the lens to shoot to obtain a first image; wherein the terminal device is fixed on the pan / tilt platform;

[0007] Sending a first instruction to the gimbal; wherein the first instruction is used to instruct the gimbal to rotate to a target angle; the first instruction includes the target angle;

[0008] Calling the lens to shoot and obtain a second image;

[0009] Based on the first image and the second image, a FOV of the lens is determined.

[0010] According to a FOV measurement method provided by the present invention, determining the FOV of the lens based on the first image and the second image includes:

[0011] Based on the first image and the second image, determining an overlapping area between the first image and the second image;

[0012] The FOV of the lens is determined based on the overlap area, the first image, and the target angle.

[0013] According to a FOV measurement method provided by the present invention, determining the FOV of the lens based on the overlapping area, the first image and the target angle includes:

[0014] Determining the length of the overlapping area based on the pixel value of the overlapping area;

[0015] determining a length of the first image based on pixel values ​​of the first image;

[0016] The FOV of the lens is determined according to the length of the overlapping area, the length of the first image and the target angle.

[0017] According to a FOV measurement method provided by the present invention, determining the FOV of the lens according to the length of the overlapping area, the length of the first image and the target angle includes:

[0018] According to the length of the overlapping area, the length of the first image and the target angle, the FOV of the lens is calculated using formula (1):

[0019] FOV=A / (1-K) (1)

[0020] Wherein, A represents the target angle of rotation of the gimbal; K represents the overlap ratio; K=Y / X; Y represents the length of the overlap area, and X represents the length of the first image.

[0021] According to a FOV measurement method provided by the present invention, before calling the lens to shoot and obtain the second image, the method further includes:

[0022] Receive a response message sent by the gimbal; wherein the response message is used to indicate whether the gimbal has successfully rotated to the target angle.

[0023] According to a FOV measurement method provided by the present invention, calling the lens to shoot and obtaining a second image includes:

[0024] When the response message indicates that the pan / tilt head has successfully rotated to the target angle, the lens is called to shoot to obtain a second image.

[0025] According to a FOV measurement method provided by the present invention, before calling the lens to shoot and obtain the first image, the method further includes:

[0026] Obtaining the optical axis direction of the lens;

[0027] When the optical axis direction of the lens is not horizontal, a second instruction is sent to the gimbal to rotate the rotating arm of the gimbal and drive the terminal device to rotate, so that the optical axis direction of the lens is adjusted to the horizontal direction.

[0028] The present invention also provides a FOV measuring device, the device comprising:

[0029] A first shooting module, used to call the lens of the terminal device to shoot when the optical axis direction of the lens of the terminal device is horizontal, so as to obtain a first image; wherein the terminal device is fixed on the gimbal;

[0030] A sending module, used for sending a first instruction to the gimbal; wherein the first instruction is used for instructing the gimbal to rotate to a target angle; the first instruction includes the target angle;

[0031] A second shooting module, used for calling the lens to shoot and obtain a second image;

[0032] A determination module is used to determine the FOV of the lens based on the first image and the second image.

[0033] The present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of any of the above-mentioned FOV measurement methods when executed by a processor.

[0034] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described FOV measurement methods.

[0035] The FOV measurement method provided by the present invention, when the optical axis of the lens of the terminal device is in the horizontal direction and the angle with the horizontal direction is the target angle, respectively calls the lens of the terminal device to shoot, to obtain a first image and a second image; then according to the first image and the second image, the FOV of the lens is determined, thereby realizing the FOV measurement of the lens of the terminal device. The user can obtain the FOV of the lens of the terminal device at a low cost, and at the same time, the accuracy of the FOV measurement of the lens of the terminal device is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1This is one of the flow charts of the FOV measurement method provided by the present invention;

[0038] Figure 2 This is the second flow chart of the FOV measurement method provided by the present invention;

[0039] Figure 3 This is the third flow chart of the FOV measurement method provided by the present invention;

[0040] Figure 4 This is the fourth flow chart of the FOV measurement method provided by the present invention;

[0041] Figure 5 This is the fifth flow chart of the FOV measurement method provided by the present invention;

[0042] Figure 6 It is a structural schematic diagram of the FOV measurement system provided by the present invention;

[0043] Figure 7 It is a structural schematic diagram of the FOV measurement device provided by the present invention;

[0044] Figure 8 It is a structural schematic diagram of the terminal device provided by the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments 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.

[0046] The FOV measurement method provided by the present invention is described in detail below through some embodiments and application scenarios in conjunction with the accompanying drawings.

[0047] The present invention provides a FOV measurement method, which can be applied to the FOV measurement scene of the lens of a terminal device. When the optical axis direction of the lens of the terminal device is in the horizontal direction, the lens is called to shoot to obtain a first image; wherein the terminal device is fixed on a gimbal; a first instruction is sent to the gimbal; wherein the first instruction is used to instruct the gimbal to rotate to a target angle; the first instruction includes the target angle; the lens is called to shoot to obtain a second image; based on the first image and the second image, the FOV of the lens is determined. The FOV measurement method provided by the present invention, when the optical axis of the lens of the terminal device is in the horizontal direction and the angle with the horizontal direction is the target angle, the lens of the terminal device is called to shoot respectively to obtain a first image and a second image; then the FOV of the lens is determined according to the first image and the second image, thereby realizing the FOV measurement of the lens of the terminal device, and the user can obtain the FOV of the lens of the terminal device at a low cost, and at the same time, the accuracy of the FOV measurement of the lens of the terminal device is improved.

[0048] Figure 1 It is one of the flow charts of the FOV measurement method provided by the present invention, such as Figure 1 As shown, the method includes steps 110 to 140, wherein:

[0049] Step 110, when the optical axis direction of the lens of the terminal device is horizontal, calling the lens to shoot to obtain a first image; wherein the terminal device is fixed on a gimbal.

[0050] It should be noted that the FOV measurement method provided by the present invention can be applied to the FOV measurement scenario of the lens of the terminal device. The FOV measurement method provided by the present invention can be executed by a FOV measurement device, such as a terminal device, or a control module in the FOV measurement device for executing the FOV measurement method.

[0051] Specifically, the terminal device is fixed on the gimbal, and the terminal device and the gimbal are connected via Bluetooth, so that the terminal device and the gimbal communicate via Bluetooth; it should be noted that the optical axis direction of the lens of the terminal device is located on the central axis of the gimbal, reducing the measurement error of the FOV of the lens of the terminal device.

[0052] In practice, when the terminal device is fixed on the gimbal, the terminal device calls the gyroscope in the terminal device to measure the optical axis direction of the lens of the terminal device through the gyroscope; when the optical axis direction of the lens of the terminal device is horizontal, the terminal device schedules its lens to shoot and obtain a first image.

[0053] Step 120, sending a first instruction to the gimbal; wherein the first instruction is used to instruct the gimbal to rotate to a target angle; the first instruction includes the target angle.

[0054] Optionally, the target angle refers to a preset angle at which the pan / tilt can rotate after the pan / tilt receives a first instruction sent by the terminal device during the FOV measurement process of the lens of the terminal device.

[0055] It should be noted that after the terminal device captures the first image, the terminal device may immediately send the first instruction to the gimbal, or a delay time may be set, after which the terminal device sends the first instruction to the gimbal.

[0056] Specifically, the terminal device sends a first instruction to the gimbal. After the gimbal receives the first instruction sent by the terminal device, the rotating arm of the gimbal rotates to a target angle, and at the same time drives the terminal device fixed on the gimbal to rotate to the target angle.

[0057] Step 130: call the lens to shoot and obtain a second image.

[0058] It should be noted that, before the terminal device calls the lens to shoot and obtains the second image, it also includes: receiving a response message sent by the gimbal; wherein the response message is used to indicate whether the gimbal has successfully rotated to the target angle.

[0059] Specifically, after the gimbal receives the first instruction sent by the terminal device, the rotating arm of the gimbal rotates to the target angle; after the rotating arm of the gimbal rotates to the target angle, the gimbal sends a response message to the terminal device; wherein the response message is used to indicate whether the gimbal has successfully rotated to the target angle.

[0060] Optionally, the terminal device calls the lens to shoot to obtain the second image, including: when the response message indicates that the pan / tilt head has successfully rotated to the target angle, the terminal device calls the lens to shoot to obtain the second image.

[0061] Step 140: determine the FOV of the lens based on the first image and the second image.

[0062] It should be noted that the first image and the second image are two images captured by the terminal device in the same shooting scene.

[0063] Optionally, based on the first image and the second image, the terminal device can determine the FOV of its lens.

[0064] The FOV measurement method provided by the present invention, when the optical axis of the lens of the terminal device is in the horizontal direction and the angle with the horizontal direction is the target angle, respectively calls the lens of the terminal device to shoot, to obtain a first image and a second image; then according to the first image and the second image, the FOV of the lens is determined, thereby realizing the FOV measurement of the lens of the terminal device. The user can obtain the FOV of the lens of the terminal device at a low cost, and at the same time, the accuracy of the FOV measurement of the lens of the terminal device is improved.

[0065] Figure 2 This is the second flow chart of the FOV measurement method provided by the present invention, such as Figure 2 As shown, the method includes steps 210 to 250, wherein:

[0066] Step 210, when the optical axis direction of the lens of the terminal device is horizontal, calling the lens to shoot to obtain a first image; wherein the terminal device is fixed on the gimbal.

[0067] Step 220, sending a first instruction to the gimbal; wherein the first instruction is used to instruct the gimbal to rotate to a target angle; the first instruction includes the target angle.

[0068] Step 230: call the lens to shoot and obtain a second image.

[0069] Optionally, the description and explanation of steps 210-230 may refer to the above description and explanation of steps 110-130, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.

[0070] Step 240: Determine an overlapping area between the first image and the second image based on the first image and the second image.

[0071] Optionally, according to the first image and the second image, the first image and the second image are gray-processed to obtain gray-scale images of the first image and the second image respectively; then the first image and the second image are overlapped, the first image is fixed, and the second image slides to the right, and for each sliding step, the difference in gray-scale values ​​between two corresponding pixel points in the overlapping area of ​​the first image and the second image is calculated, and the differences in all gray-scale values ​​in the overlapping area are summed; until there is no overlapping area with the first image during the sliding process of the second image; therefore, according to the sum of the differences in all gray-scale values ​​in multiple overlapping areas, the overlapping area with the smallest sum of the differences in all gray-scale values ​​in multiple overlapping areas is obtained, which is the overlapping area of ​​the first image and the second image.

[0072] Step 250: Determine the FOV of the lens based on the overlapping area, the first image and the target angle.

[0073] Optionally, the FOV of the lens of the terminal device may be determined according to the overlapping area of ​​the first image and the second image, the grayscale image obtained from the first image, and the target angle of rotation of the pan / tilt head.

[0074] The FOV measurement method provided by the present invention, when the optical axis of the lens of the terminal device is in the horizontal direction and the angle with the horizontal direction is the target angle, respectively calls the lens of the terminal device to shoot, to obtain a first image and a second image; then determines the FOV of the lens according to the overlapping area of ​​the first image and the second image, the first image and the target angle, thereby realizing the FOV measurement of the lens of the terminal device. The user can obtain the FOV of the lens of the terminal device at a low cost, and at the same time, improves the accuracy of the FOV measurement of the lens of the terminal device.

[0075] Figure 3 FIG. 3 is a flow chart of the FOV measurement method provided by the present invention. Figure 3 As shown, the method includes steps 310 to 370, wherein:

[0076] Step 310, when the optical axis direction of the lens of the terminal device is horizontal, call the lens to shoot and obtain a first image; wherein the terminal device is fixed on the gimbal.

[0077] Step 320, sending a first instruction to the gimbal; wherein the first instruction is used to instruct the gimbal to rotate to a target angle; the first instruction includes the target angle.

[0078] Step 330: call the lens to shoot and obtain a second image.

[0079] Optionally, the description and explanation of steps 310-330 may refer to the above description and explanation of steps 110-130, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.

[0080] Step 340: Determine an overlapping area between the first image and the second image based on the first image and the second image.

[0081] Optionally, the description and explanation of step 340 may refer to the above description and explanation of step 240, and the same technical effect can be achieved. To avoid repetition, they will not be repeated here.

[0082] Step 350: Determine the length of the overlapping area based on the pixel value of the overlapping area.

[0083] Optionally, the length of the overlapping area is determined according to the number of corresponding row pixel values ​​in the pixel values ​​of the overlapping area.

[0084] Step 360: Determine the length of the first image based on the pixel values ​​of the first image.

[0085] Optionally, the length of the first image is determined according to the number of corresponding row pixel values ​​in the pixel values ​​of the first image.

[0086] Step 370: Determine the FOV of the lens according to the length of the overlapping area, the length of the first image and the target angle.

[0087] Optionally, the FOV of the lens of the terminal device may be determined according to the length of the overlapping area, the length of the first image and the target angle of the pan / tilt rotation.

[0088] The FOV measurement method provided by the present invention uses the lens of the terminal device to shoot respectively when the optical axis of the lens of the terminal device is in the horizontal direction and the angle with the horizontal direction is the target angle, so as to obtain a first image and a second image; then, according to the pixel value of the overlapping area of ​​the first image and the second image, the length of the overlapping area is determined; according to the pixel value of the first image, the length of the first image is determined; according to the length of the overlapping area, the length of the first image and the target angle, the FOV of the lens is determined, thereby realizing the FOV measurement of the lens of the terminal device, the user can obtain the FOV of the lens of the terminal device at a low cost, and at the same time, the accuracy of the FOV measurement of the lens of the terminal device is improved.

[0089] Optionally, the method for determining the FOV of the lens according to the length of the overlapping area, the length of the first image and the target angle in step 370 includes: calculating the FOV of the lens according to the length of the overlapping area, the length of the first image and the target angle using formula (1):

[0090] FOV=A / (1-K)(1)

[0091] Wherein, A represents the target angle of the pan / tilt rotation; K represents the overlap ratio; K=Y / X; Y represents the length of the overlap area, and X represents the length of the first image.

[0092] In the present invention, the overlap ratio of the first image is calculated according to the length of the overlap area and the length of the first image; and the FOV of the lens is calculated according to the overlap ratio of the first image and the target angle.

[0093] In a possible implementation, the overlap ratio of the second image is calculated according to the length of the overlap area and the length of the second image; and the FOV of the lens is calculated according to the overlap ratio of the second image and the target angle.

[0094] Figure 4 FIG. 4 is a flow chart of the FOV measurement method provided by the present invention. Figure 4As shown, the method includes steps 410 to 460, wherein:

[0095] Step 410: Obtain the optical axis direction of the lens.

[0096] Optionally, when the terminal device is fixed on the gimbal, the terminal device calls a gyroscope in the terminal device to measure the optical axis direction of the lens of the terminal device through the gyroscope, thereby obtaining the optical axis direction of the lens.

[0097] Step 420, when the optical axis direction of the lens is not in the horizontal direction, a second instruction is sent to the gimbal to rotate the rotating arm of the gimbal and drive the terminal device to rotate, so that the optical axis direction of the lens is adjusted to the horizontal direction.

[0098] Optionally, when the optical axis direction of the lens of the terminal device measured by the gyroscope is non-horizontal, the terminal device sends a second instruction to the gimbal, and after the gimbal receives the second instruction sent by the terminal device, the rotating arm of the gimbal starts to rotate. During the rotation of the rotating arm of the gimbal, the terminal device and the rotating arm of the gimbal are driven to rotate together, thereby adjusting the optical axis direction of the lens of the terminal device to the horizontal direction.

[0099] Step 430, when the optical axis direction of the lens of the terminal device is horizontal, calling the lens to shoot to obtain a first image; wherein the terminal device is fixed on the gimbal.

[0100] Step 440, sending a first instruction to the gimbal; wherein the first instruction is used to instruct the gimbal to rotate to a target angle; the first instruction includes the target angle.

[0101] Step 450: call the lens to shoot and obtain a second image.

[0102] Step 460: Determine the FOV of the lens based on the first image and the second image.

[0103] Optionally, the description and explanation of steps 430 to 460 may refer to the above description and explanation of steps 110 to 140, and the same technical effect can be achieved. To avoid repetition, they will not be repeated here.

[0104] The FOV measurement method provided by the present invention obtains the optical axis direction of the lens of the terminal device. When the optical axis direction of the lens is not in the horizontal direction, the terminal device sends a second instruction to the pan / tilt head, so that the rotating arm of the pan / tilt head rotates, driving the terminal device to rotate, so that the optical axis direction of the lens is adjusted to the horizontal direction; when the optical axis of the lens of the terminal device is in the horizontal direction and the angle with the horizontal direction is the target angle, the lens of the terminal device is respectively called to shoot to obtain a first image and a second image; then, the FOV of the lens is determined according to the first image and the second image, thereby realizing the FOV measurement of the lens of the terminal device, and the user can obtain the FOV of the lens of the terminal device at a low cost, and at the same time, the accuracy of the FOV measurement of the lens of the terminal device is improved.

[0105] Figure 5 FIG. 5 is a flow chart of the FOV measurement method provided by the present invention. Figure 5 As shown, the method includes steps 501 to 510, wherein:

[0106] Step 501, obtaining the optical axis direction of the lens of the terminal device. The terminal device is fixed on the gimbal, and the terminal device and the gimbal are connected via Bluetooth, so that the terminal device and the gimbal communicate via Bluetooth; the terminal device calls the gyroscope in the terminal device to obtain the optical axis direction of the lens of the terminal device.

[0107] Step 502, determine whether the optical axis direction of the lens of the terminal device is horizontal; if the optical axis direction of the lens of the terminal device is non-horizontal, go to step 503; otherwise, go to step 505.

[0108] Step 503: The terminal device sends a second instruction to the PTZ.

[0109] Step 504: The rotating arm of the pan / tilt head rotates and drives the terminal device to rotate, so that the optical axis direction of the lens is adjusted to a horizontal direction.

[0110] Step 505: The terminal device uses a lens to shoot and obtains a first image.

[0111] Step 506: The terminal device sends a first instruction to the PTZ.

[0112] Step 507: The rotating arm of the pan / tilt head rotates to a target angle, and drives the terminal device to rotate to the target angle.

[0113] Step 508: After the PTZ rotates to the target angle, a response message is sent to the terminal device.

[0114] Step 509: the terminal device receives a response message sent by the gimbal, and when the response message indicates that the gimbal has successfully rotated to the target angle, the lens is called to shoot to obtain a second image.

[0115] Step 510: The terminal device determines the FOV of the lens according to the first image and the second image.

[0116] The FOV measurement method provided by the present invention determines the optical axis direction of the lens of the terminal device by acquiring the optical axis direction of the lens of the terminal device. When the optical axis direction of the lens is not in the horizontal direction, the terminal device sends a second instruction to the pan / tilt head, so that the rotating arm of the pan / tilt head rotates, drives the terminal device to rotate, and adjusts the optical axis direction of the lens to the horizontal direction; the terminal device calls the lens to shoot and obtains a first image; the terminal device sends a first instruction to the pan / tilt head, so that the rotating arm of the pan / tilt head rotates to a target angle, and drives the terminal device to rotate to the target angle. After the pan / tilt head rotates to the target angle, a response message is sent to the terminal device. The terminal device receives the response message sent by the pan / tilt head, and when the response message indicates that the pan / tilt head has successfully rotated to the target angle, the lens is called to shoot and obtain a second image; the terminal device determines the FOV of the lens according to the first image and the second image, thereby realizing the FOV measurement of the lens of the terminal device. The user can obtain the FOV of the lens of the terminal device at a low cost, and at the same time, the accuracy of the FOV measurement of the lens of the terminal device is improved.

[0117] Figure 6 : is a schematic diagram of the structure of the FOV measurement system provided by the present invention, such as Figure 6 As shown, the structure of the FOV measurement system includes: a terminal device 601 and a pan-tilt head 602; wherein the pan-tilt head 602 includes: a pan-tilt head base 6021, a pan-tilt head rotating arm 6022, and a pan-tilt head fixing mechanism 6023; the terminal device 601 includes: a lens 6011 of the terminal device, and a range 6012 that can be photographed by the lens 6011 of the terminal device. The terminal device 604 is fixed on the pan-tilt head 602 through the pan-tilt head fixing mechanism 6023, and the pan-tilt head 602 and the terminal device 604 communicate via Bluetooth.

[0118] Optionally, the optical axis direction of the lens 6011 of the terminal device is located on the central axis of the gimbal 602, thereby reducing the measurement error of the FOV of the lens 6011 of the terminal device.

[0119] The FOV measuring device provided by the present invention is described below. The FOV measuring device described below and the FOV measuring method described above can be referenced to each other.

[0120] The present invention provides a FOV measuring device. Figure 7 The schematic diagram of the structure of the FOV measurement device provided by the present invention is as follows: Figure 7 As shown, the FOV measuring device 700 includes: a first shooting module 701, a sending module 702, a second shooting module 703, and a determining module 704; wherein,

[0121] The first shooting module 701 is used to call the lens of the terminal device to shoot when the optical axis direction of the lens of the terminal device is horizontal, so as to obtain a first image; wherein the terminal device is fixed on the gimbal;

[0122] The sending module 702 is used to send a first instruction to the gimbal; wherein the first instruction is used to instruct the gimbal to rotate to a target angle; and the first instruction includes the target angle;

[0123] A second shooting module 703, used for calling the lens to shoot and obtain a second image;

[0124] The determination module 704 is configured to determine the FOV of the lens based on the first image and the second image.

[0125] The FOV measuring device provided by the present invention, when the optical axis of the lens of the terminal device is in a horizontal direction and the angle with the horizontal direction is a target angle, calls the lens of the terminal device to shoot respectively to obtain a first image and a second image; then determines the FOV of the lens according to the first image and the second image, thereby realizing the FOV measurement of the lens of the terminal device. The user can obtain the FOV of the lens of the terminal device at a low cost, and at the same time, the accuracy of the FOV measurement of the lens of the terminal device is improved.

[0126] Optionally, the determination module 704 is specifically configured to:

[0127] Based on the first image and the second image, determining an overlapping area between the first image and the second image;

[0128] The FOV of the lens is determined based on the overlap area, the first image, and the target angle.

[0129] Optionally, the determination module 704 is specifically configured to:

[0130] Determining the length of the overlapping area based on the pixel value of the overlapping area;

[0131] determining a length of the first image based on pixel values ​​of the first image;

[0132] The FOV of the lens is determined according to the length of the overlapping area, the length of the first image and the target angle.

[0133] Optionally, the determination module 704 is specifically configured to:

[0134] According to the length of the overlapping area, the length of the first image and the target angle, the FOV of the lens is calculated using formula (1):

[0135] FOV=A / (1-K) (1)

[0136] Wherein, A represents the target angle of rotation of the gimbal; K represents the overlap ratio; K=Y / X; Y represents the length of the overlap area, and X represents the length of the first image.

[0137] Optionally, the FOV measuring device 700 further includes:

[0138] A receiving module is used to receive a response message sent by the gimbal; wherein the response message is used to indicate whether the gimbal has successfully rotated to the target angle.

[0139] Optionally, the second shooting module 703 is specifically used to:

[0140] When the response message indicates that the pan / tilt head has successfully rotated to the target angle, the lens is called to shoot to obtain a second image.

[0141] Optionally, the FOV measuring device 700 further includes:

[0142] An acquisition module, used to acquire the optical axis direction of the lens;

[0143] The rotation module is used to send a second instruction to the pan-tilt head to rotate the rotating arm of the pan-tilt head and drive the terminal device to rotate when the optical axis direction of the lens is not in the horizontal direction, so that the optical axis direction of the lens is adjusted to the horizontal direction.

[0144] Figure 8 is a schematic diagram of the physical structure of the terminal device provided by the present invention, such as Figure 8 As shown, the terminal device 800 may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the FOV measurement method, which includes: when the optical axis direction of the lens of the terminal device is horizontal, calling the lens to shoot and obtain a first image; wherein the terminal device is fixed on a pan-tilt platform; sending a first instruction to the pan-tilt platform; wherein the first instruction is used to instruct the pan-tilt platform to rotate to a target angle; the first instruction includes the target angle; calling the lens to shoot and obtain a second image; and determining the FOV of the lens based on the first image and the second image.

[0145] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0146] On the other hand, the present invention also provides a computer program product, which includes a computer program / instructions. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program / instructions are executed by a processor, the computer can execute the FOV measurement method provided by the above methods, the method including: when the optical axis direction of the lens of the terminal device is horizontal, calling the lens to shoot and obtain a first image; wherein the terminal device is fixed on a gimbal; sending a first instruction to the gimbal; wherein the first instruction is used to instruct the gimbal to rotate to a target angle; the first instruction includes the target angle; calling the lens to shoot and obtain a second image; and determining the FOV of the lens based on the first image and the second image.

[0147] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the FOV measurement method provided by the above-mentioned methods, the method comprising: when the optical axis direction of the lens of the terminal device is horizontal, calling the lens to shoot and obtain a first image; wherein the terminal device is fixed on a gimbal; sending a first instruction to the gimbal; wherein the first instruction is used to instruct the gimbal to rotate to a target angle; the first instruction includes the target angle; calling the lens to shoot and obtain a second image; and determining the FOV of the lens based on the first image and the second image.

[0148] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0149] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for measuring a field of view angle FOV, characterized in that: The method comprises: When the optical axis direction of the lens of the terminal device is horizontal, calling the lens to shoot to obtain a first image; wherein the terminal device is fixed on the pan / tilt platform; Sending a first instruction to the gimbal; wherein the first instruction is used to instruct the gimbal to rotate to a target angle; the first instruction includes the target angle; Calling the lens to shoot and obtain a second image; Determining a FOV of the lens based on the first image and the second image; The determining the FOV of the lens based on the first image and the second image includes: Based on the first image and the second image, grayscale processing is performed on the first image and the second image to obtain grayscale images of the first image and the second image respectively; then the first image and the second image are overlapped, the first image is fixed, and the second image slides to the right, and for each sliding step, the difference in grayscale values ​​between two corresponding pixel points in the overlapping area of ​​the first image and the second image is calculated, and all grayscale value differences in the overlapping area are summed; until there is no overlapping area between the second image and the first image during the sliding process; according to the sum of all grayscale value differences in multiple overlapping areas, the overlapping area with the smallest sum of all grayscale value differences in the obtained multiple overlapping areas is determined as the overlapping area of ​​the first image and the second image; The FOV of the lens is determined based on the overlap area, the first image, and the target angle.

2. The FOV measurement method according to claim 1, characterized in that: The determining the FOV of the lens based on the overlapping area, the first image and the target angle comprises: Determining the length of the overlapping area based on the pixel value of the overlapping area; determining a length of the first image based on pixel values ​​of the first image; The FOV of the lens is determined according to the length of the overlapping area, the length of the first image and the target angle.

3. The FOV measurement method according to claim 2, characterized in that: The determining the FOV of the lens according to the length of the overlapping area, the length of the first image and the target angle comprises: According to the length of the overlapping area, the length of the first image and the target angle, the FOV of the lens is calculated using formula (1): FOV=A / (1-K) (1) Wherein, A represents the target angle of rotation of the gimbal; K represents the overlap ratio; K=Y / X; Y represents the length of the overlap area, and X represents the length of the first image.

4. The FOV measurement method according to claim 1, characterized in that: Before calling the lens to shoot and obtain the second image, the method further includes: Receive a response message sent by the gimbal; wherein the response message is used to indicate whether the gimbal has successfully rotated to the target angle.

5. The FOV measurement method according to claim 4, characterized in that: The calling the lens to shoot and obtain a second image includes: When the response message indicates that the pan / tilt head has successfully rotated to the target angle, the lens is called to shoot to obtain a second image.

6. The FOV measurement method according to claim 1, characterized in that: Before calling the lens to shoot and obtain the first image, the method further includes: Obtaining the optical axis direction of the lens; When the optical axis direction of the lens is not horizontal, a second instruction is sent to the gimbal to rotate the rotating arm of the gimbal and drive the terminal device to rotate, so that the optical axis direction of the lens is adjusted to the horizontal direction.

7. A FOV measurement device, characterized in that: The device comprises: A first shooting module, used to call the lens of the terminal device to shoot when the optical axis direction of the lens of the terminal device is horizontal, so as to obtain a first image; wherein the terminal device is fixed on the gimbal; A sending module, used for sending a first instruction to the gimbal; wherein the first instruction is used for instructing the gimbal to rotate to a target angle; the first instruction includes the target angle; A second shooting module, used for calling the lens to shoot and obtain a second image; A determination module, configured to determine the FOV of the lens based on the first image and the second image; The determination module is specifically used for: Based on the first image and the second image, grayscale processing is performed on the first image and the second image to obtain grayscale images of the first image and the second image respectively; then the first image and the second image are overlapped, the first image is fixed, and the second image slides to the right, and for each sliding step, the difference in grayscale values ​​between two corresponding pixel points in the overlapping area of ​​the first image and the second image is calculated, and all grayscale value differences in the overlapping area are summed; until there is no overlapping area between the second image and the first image during the sliding process; according to the sum of all grayscale value differences in multiple overlapping areas, the overlapping area with the smallest sum of all grayscale value differences in the obtained multiple overlapping areas is determined as the overlapping area of ​​the first image and the second image; The FOV of the lens is determined based on the overlap area, the first image, and the target angle.

8. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the FOV measurement method according to any one of claims 1 to 6 are implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the FOV measurement method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method and device for measuring field angle of vidicon and vidicon field angle measuring instrument

    CN105716582A