A focusing method, device, electronic device and storage medium for measuring equipment

By obtaining the clarity of the focus area in the video measurement equipment and using the area focusing algorithm to adjust the focus lens, the problem of the equipment being unable to focus in complex environments is solved, achieving fast and accurate focusing and measurement.

CN113917437BActive Publication Date: 2025-01-21FUJIAN HUICHUAN DIGITAL TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111176027.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-09
Publication Date
2025-01-21
Estimated Expiration
2041-10-09

AI Technical Summary

Technical Problem

In complex environments, the video measurement equipment cannot focus on the target object due to interference, resulting in dummy focus and measurement failure. The laser landing pixel coordinates change with distance, so fixed area focus cannot be used.

Method used

By obtaining the focus area of ​​the shooting image of the measuring equipment camera, the sharpness of the laser focus image and the area focus image is calculated, the focus lens is adjusted using the area focus algorithm, and adjustments are made based on the sharpness comparison results to achieve rapid focus.

Benefits of technology

The clarity of the focus area is improved, ensuring that the video measurement equipment can quickly and accurately focus on the target object, and solving the problems of virtual focus and measurement failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113917437B_ABST
    Figure CN113917437B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a focusing method, device, electronic device and computer-readable storage medium for a measuring device, the method comprising: obtaining the focal area of ​​the shooting picture of the camera in the measuring device; obtaining the clarity of the laser focus image of the focal area; adjusting the focus lens of the camera using a regional focusing algorithm to focus on the focal area; obtaining the clarity of the regional focus image of the focal area; adjusting the focus lens of the camera according to the clarity of the laser focus image and the clarity of the regional focus image. Compared with the prior art, the focus of the camera is completed according to the comparison result of the clarity of the laser focus image and the clarity of the regional focus image, which can improve the clarity of the focal area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of measuring equipment, and in particular to a focusing method, device, electronic device and computer-readable storage medium for measuring equipment. Background Art

[0002] Video measurement equipment is a device that combines real-time video images and laser ranging technology to perform spatial measurements. When working, the camera needs to be clearly focused on the target object to perform measurements. However, in actual applications, due to the complex on-site environment, there may be various interferences in the picture, which causes the camera of the measurement equipment to fail to focus on the target object, resulting in the target object being out of focus and the measurement work being unable to be completed. In addition, since the pixel coordinates of the laser landing point of the video measurement equipment in the picture will change with distance, it is impossible to use the camera to focus on a fixed area to solve the above problem. Therefore, a fast focusing method is needed that can make the area near the laser landing point in the video picture of the video measurement equipment clearly focused. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a focusing method, device, electronic device and computer-readable storage medium for a measuring device, which can quickly complete the focusing of a camera in the measuring device.

[0004] In a first aspect, the present application provides a focusing method for a measuring device, comprising:

[0005] Obtaining a focal area of ​​a shooting picture of a camera in the measuring device;

[0006] Obtaining the clarity of the laser focus image in the focal area;

[0007] Using a regional focusing algorithm to adjust the focus lens of the camera to focus on the focal area;

[0008] Obtaining the regional focus image clarity of the focal area;

[0009] The focus lens of the camera is adjusted according to the clarity of the laser focus image and the clarity of the area focus image.

[0010] In the above implementation process, the focus area of ​​the camera shooting picture in the measuring device is obtained, and the clarity of the focus area is calculated as the laser focus image clarity. The focus lens of the camera is adjusted using the regional focus algorithm, the focus area is refocused, and the clarity of the focus area is recalculated as the regional focus image clarity; the laser focus image clarity and the regional focus image clarity are compared, and the focus lens of the camera is adjusted according to the laser focus image clarity and the second clarity, so as to complete the clear focus of the focus area. Compared with the prior art, the focus of the camera can be completed only according to the comparison result of the laser focus image clarity and the regional focus image clarity, which can improve the clarity of the focus area.

[0011] Furthermore, the step of obtaining the focus area of ​​the current camera image includes:

[0012] Obtaining a laser distance of a laser rangefinder in the measuring device;

[0013] Acquire a focusing distance according to the laser distance;

[0014] Adjusting the focus lens of the camera according to the focusing distance;

[0015] Obtaining the adjusted shooting picture of the camera;

[0016] The focus area is determined according to the laser distance and the captured image.

[0017] In the above implementation process, the laser distance of the laser rangefinder of the measuring device is obtained, so as to obtain the focusing distance according to the laser distance, and the camera is focused according to the focusing distance, and the shooting picture of the focused camera is captured, and then the focus area is obtained in the shooting picture. Based on the above implementation method, laser focusing can be completed quickly and the focus area can be obtained.

[0018] Furthermore, the step of acquiring the focusing distance according to the laser distance includes:

[0019] Obtaining focus parameters of the camera;

[0020] The focusing distance is calculated according to the laser distance and the focusing parameter.

[0021] In the above implementation process, the focus parameters of the camera are first obtained, and then the focus distance is calculated according to the laser distance and the focus parameters. In the above implementation, the laser distance of the laser rangefinder is used as the imaging object distance of the camera, which can make the calculated focus distance more accurate.

[0022] Furthermore, the step of determining the focus area according to the laser distance and the captured image includes:

[0023] Obtaining the relative position relationship between the laser rangefinder and the camera;

[0024] Acquire the pixel coordinates of the laser landing point of the laser rangefinder in the shooting picture of the camera according to the laser distance and the relative position relationship;

[0025] The focus area is determined according to the pixel coordinates.

[0026] In the above implementation process, the relative position relationship between the laser rangefinder and the camera is first obtained, and the pixel coordinates of the laser landing point of the laser rangefinder in the camera's shooting screen can be obtained according to the laser distance and the relative position relationship, and then the focus area is determined. Determining the focus area based on the pixel coordinates of the laser landing point of the laser rangefinder can make the clarity of the laser focus image calculated later more accurate, and thus the camera focus can be completed faster.

[0027] Furthermore, the step of adjusting the focus lens of the camera according to the clarity of the laser focus image and the clarity of the regional focus image comprises:

[0028] When the clarity of the regional focusing image is less than the clarity of the laser focusing image, the focusing lens of the camera is adjusted according to the focusing distance.

[0029] In the above implementation process, when the clarity of the regional focus image is less than the clarity of the laser focus image, it means that the camera will be clearer if the camera is focused according to the focus distance. At this time, the position of the focus lens of the camera should be adjusted according to the focus distance to complete the focus. Based on the above implementation, the camera can be focused quickly.

[0030] Furthermore, after the step of adjusting the focus lens of the camera according to the clarity of the laser focus image and the clarity of the regional focus image, the method further includes:

[0031] Acquire and save the current camera's shooting picture;

[0032] Obtaining and saving the rotation angle of the pan / tilt in the measuring device;

[0033] The laser distance from the laser rangefinder to the target object is obtained and saved.

[0034] In the above implementation process, after the camera is focused, the current camera's shooting picture is saved so that other work can be done based on the shooting picture later. The rotation angle of the pan / tilt of the measuring device and the laser distance from the laser rangefinder to the target object are saved so as to complete the subsequent measurement work.

[0035] In a second aspect, the present application provides a focusing device for a measuring device, comprising:

[0036] A focus area acquisition module, used to acquire the focus area of ​​the shooting picture of the camera in the measuring device;

[0037] A clarity acquisition module, used to acquire the clarity of the laser focus image and the clarity of the regional focus image of the focal area;

[0038] A regional focusing module, used for adjusting the focus lens of the camera using a regional focusing algorithm to focus on the focal area;

[0039] The adjustment module is used to adjust the focus lens of the camera when the clarity of the laser focus image is greater than the clarity of the regional focus image.

[0040] In the above implementation process, the focus area of ​​the camera shooting picture in the measuring device is obtained, and the clarity of the focus area is calculated as the laser focus image clarity. The focus lens of the camera is adjusted using the regional focus algorithm, the focus area is refocused, and the clarity of the focus area is recalculated as the regional focus image clarity; the laser focus image clarity and the regional focus image clarity are compared, and the focus lens of the camera is adjusted according to the laser focus image clarity and the regional focus image clarity, so as to complete the clear focus of the focus area. Compared with the prior art, the focus of the camera can be completed only according to the comparison result of the laser focus image clarity and the regional focus image clarity, which can improve the clarity of the focus area.

[0041] Furthermore, the focus area acquisition module is also used to obtain the laser distance of the laser rangefinder in the measuring device; obtain the focusing distance according to the laser distance; adjust the focus lens of the camera according to the focusing distance; obtain the adjusted shooting picture of the camera; and determine the focus area according to the laser distance and the shooting picture.

[0042] In the above implementation process, the laser distance of the laser rangefinder in the measuring device is obtained, the focusing distance is calculated according to the laser distance, the camera is focused according to the focusing distance, the shooting picture of the focused camera is captured, and then the focus area is obtained in the shooting picture according to the laser distance. Based on the above implementation method, the focus area can be quickly obtained.

[0043] In a third aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the focusing method of the measuring device described in the first aspect are executed.

[0044] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the focusing method of the measuring device as described in the first aspect are executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0046] Figure 1 A schematic diagram of a flow chart of a focusing method for a measuring device provided in an embodiment of the present application;

[0047] Figure 2 A schematic diagram of the structural composition of a focusing device for a measuring device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0049] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0050] Video measurement equipment is a device that combines real-time video images and laser ranging technology to perform spatial measurements. When working, the camera needs to be clearly focused on the target object to perform measurements. However, in actual applications, due to the complex on-site environment, there may be various interferences in the picture, which causes the camera of the measurement equipment to fail to focus on the target object, resulting in the target object being out of focus and the measurement work being unable to be completed. In addition, since the pixel coordinates of the laser landing point of the video measurement equipment in the video picture will change with distance, it is impossible to use the camera to focus on a fixed area to solve the above problem. Therefore, a fast focusing method is needed that can make the area near the laser landing point in the video picture of the video measurement equipment clearly focused.

[0051] Example 1

[0052] The present application embodiment provides a focusing method for a measuring device, such as Figure 1 As shown, including:

[0053] S1: Obtaining the focus area of ​​the shooting picture of the camera in the measuring device;

[0054] S2: Obtain the laser focus image clarity of the focus area;

[0055] S3: Use the regional focusing algorithm to adjust the focus lens of the camera to focus on the focus area;

[0056] S4: Obtaining the regional focus image clarity of the focus area;

[0057] S5: When the clarity of the laser focus image is greater than the clarity of the regional focus image, adjust the focus lens of the camera.

[0058] In the above embodiment, the measuring device at least includes a camera, a laser rangefinder and a pan-tilt head, and the camera and the laser rangefinder are both mounted on the pan-tilt head. The working principle of the measuring device is to use a camera to obtain a video image containing a target object, rotate the pan-tilt head according to the video image, aim the laser of the laser rangefinder at the target object and obtain the laser distance, and measure the physical size of the target object according to the video image and the laser distance. Therefore, the focus clarity of the camera when shooting the target object is related to whether the measurement result is accurate. The regional focusing algorithm is a common focusing algorithm and will not be described here. The clarity can be the image clarity calculated using the Brenner gradient function, or it can be an evaluation index calculated based on other methods, which is not limited here.

[0059] In the above embodiment, the focus area of ​​the camera shooting picture in the measuring device is obtained, and the clarity of the focus area is calculated as the laser focus image clarity. The focus lens of the camera is adjusted using the regional focus algorithm, the focus area is refocused, and the clarity of the focus area is recalculated as the regional focus image clarity; the laser focus image clarity and the regional focus image clarity are compared, and the focus lens of the camera is adjusted according to the laser focus image clarity and the second clarity, so as to complete the clear focus of the focus area. Compared with the prior art, the focus of the camera can be completed only according to the comparison result of the laser focus image clarity and the regional focus image clarity, so as to improve the clarity of the focus area.

[0060] In a possible implementation, S1 includes:

[0061] Obtaining a laser distance of a laser rangefinder in the measuring device;

[0062] Acquire a focusing distance according to the laser distance;

[0063] Adjust the camera's focus lens according to the focusing distance;

[0064] Get the adjusted camera's shooting picture;

[0065] The focus area is determined according to the laser distance and the photographed image.

[0066] In the above embodiment, the focusing distance refers to the distance between the focusing lenses of the camera.

[0067] In the above embodiment, the laser distance of the laser rangefinder of the measuring device is first obtained, and then the focusing distance is obtained according to the laser distance. The camera is focused according to the focusing distance, and the shooting picture of the focused camera is captured, and then the focus area is obtained in the shooting picture. Based on the above implementation, laser focusing can be completed quickly and the focus area can be obtained.

[0068] In a possible implementation, the step of acquiring the focusing distance according to the laser distance includes:

[0069] Get the focus parameters of the camera;

[0070] Calculate the focusing distance based on the laser distance and focus parameters.

[0071] In the above embodiment, the focus parameter of the camera is a pre-calibrated comparison relationship between the object distance and the focusing distance; it should be noted that if the camera is a variable-magnification camera, the comparison relationship between the object distance and the focusing distance needs to be calibrated for each focal length used for measurement.

[0072] In the above embodiment, the focus parameters of the camera are first obtained, and then the focus distance is calculated according to the laser distance and the focus parameters. In the above embodiment, the laser distance of the laser rangefinder is used as the imaging object distance of the camera, which can make the calculated focus distance more accurate.

[0073] In a possible implementation, the step of determining the focus area according to the laser distance and the captured image includes:

[0074] Obtain the relative position relationship between the laser rangefinder and the camera;

[0075] Obtain the pixel coordinates of the laser landing point of the laser rangefinder in the camera's shooting picture according to the laser distance and relative position relationship;

[0076] Determine the focus area based on pixel coordinates.

[0077] In the above embodiment, the relative position relationship between the laser rangefinder and the camera can be expressed using a pre-calibrated straight line equation of the laser beam in the camera coordinate system, and then the laser distance and the straight line equation are used to calculate the pixel coordinates of the laser spot in the camera video screen; then, with the pixel coordinates of the laser spot as the center, a rectangular area with a size equal to the preset pixel width and pixel height is obtained, and the rectangular area is the focus area.

[0078] First, the relative position relationship between the laser rangefinder and the camera is obtained. According to the laser distance and relative position relationship, the pixel coordinates of the laser landing point of the laser rangefinder in the camera's shooting picture can be obtained, and then the focus area can be determined. Determining the focus area based on the pixel coordinates of the laser landing point of the laser rangefinder can make the clarity of the subsequently calculated laser focus image more accurate, and thus the camera focus can be completed faster.

[0079] In a possible implementation, when the clarity of the laser focus image is greater than the clarity of the regional focus image, the step of adjusting the focus lens of the camera includes:

[0080] When the clarity of the area focus image is less than that of the laser focus image, adjust the focus lens of the camera according to the focusing distance.

[0081] In a specific implementation, when the clarity of the regional focus image is less than that of the laser focus image, it means that the camera will be clearer if the camera is focused according to the focus distance. At this time, the position of the focus lens of the camera should be adjusted according to the focus distance to complete the focus. Based on the above implementation, the camera can be focused quickly.

[0082] In a possible implementation manner, after the step of adjusting the focus lens of the camera according to the clarity of the laser focus image and the clarity of the regional focus image, the method further includes:

[0083] Get and save the current camera's shooting picture;

[0084] Get and save the rotation angle of the gimbal in the measuring device;

[0085] Get and save the laser distance from the laser rangefinder to the target.

[0086] After the camera is focused, the current camera image is saved so that other work can be done based on the image. The rotation angle of the pan / tilt of the measuring device and the laser distance from the laser rangefinder to the target object are saved so that subsequent measurement work can be completed.

[0087] Example 2

[0088] The present application provides a focusing device for a measuring device, comprising:

[0089] A focus area acquisition module 1 is used to acquire the focus area of ​​the shooting picture of the camera in the measuring device;

[0090] A clarity acquisition module 2 is used to acquire the clarity of the laser focus image and the clarity of the regional focus image in the focus area;

[0091] The regional focusing module 3 is used to adjust the focus lens of the camera using the regional focusing algorithm to focus on the focus area;

[0092] The adjustment module 4 is used to adjust the focus lens of the camera when the clarity of the laser focus image is greater than the clarity of the regional focus image.

[0093] The focus area of ​​the camera shooting picture in the measuring device is obtained, and the clarity of the focus area is calculated as the clarity of the laser focus image. The focus lens of the camera is adjusted using the regional focus algorithm, the focus area is refocused, and the clarity of the focus area is recalculated as the clarity of the regional focus image; the clarity of the laser focus image and the clarity of the regional focus image are compared, and the focus lens of the camera is adjusted according to the clarity of the laser focus image and the clarity of the regional focus image, so as to complete the clear focus of the focus area. Compared with the prior art, the focus of the camera can be completed only according to the comparison result of the clarity of the laser focus image and the clarity of the regional focus image, which can improve the clarity of the focus area.

[0094] In a possible implementation, the focus area acquisition module 1 is also used to acquire the laser distance of a laser rangefinder in a measuring device; acquire the focusing distance according to the laser distance; adjust the focusing lens of the camera according to the focusing distance; acquire the shooting picture of the adjusted camera; and determine the focus area according to the laser distance and the shooting picture.

[0095] After obtaining the laser distance of the laser rangefinder in the measuring device and calculating the focusing distance according to the laser distance, the camera is focused according to the focusing distance, the shooting picture of the focused camera is captured, and then the focus area is obtained in the shooting picture according to the laser distance. Based on the above implementation method, the focus area can be quickly obtained.

[0096] In a possible implementation, the adjustment module 4 is further configured to adjust the focus lens of the camera according to the focus distance when the clarity of the regional focus image is less than the clarity of the laser focus image.

[0097] In a possible implementation, the focus area acquisition module 1 is further used to acquire the focus parameters of the camera;

[0098] Calculate the focusing distance based on the laser distance and focus parameters.

[0099] In a possible implementation, the focus area acquisition module 1 is also used to obtain the relative position relationship between the laser rangefinder and the camera; obtain the pixel coordinates of the laser landing point of the laser rangefinder in the camera's shooting picture based on the laser distance and the relative position relationship; and determine the focus area based on the pixel coordinates.

[0100] In a possible implementation, the adjustment module 5 is further used to obtain and save the current camera shooting picture;

[0101] Get and save the rotation angle of the gimbal in the measuring device;

[0102] Get and save the laser distance from the laser rangefinder to the target.

[0103] Example 3

[0104] The present application provides an electronic device, including a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the focusing method of the measuring device in Example 1 are executed.

[0105] Example 4

[0106] The present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the focusing method of the measuring device of Embodiment 1 are executed.

[0107] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0108] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0109] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable 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 methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0110] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0111] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0112] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A focusing method for a measuring device, characterized in that: include: Obtaining a focal area of ​​a shooting picture of a camera in the measuring device; Obtaining the clarity of the laser focus image in the focal area; Using a regional focusing algorithm to adjust the focus lens of the camera to focus on the focal area; Obtaining the regional focus image clarity of the focal area; When the clarity of the laser focus image is greater than the clarity of the regional focus image, adjusting the focus lens of the camera; The step of obtaining the focus area of ​​the shooting picture of the camera in the measuring device includes: Obtaining a laser distance of a laser rangefinder in the measuring device; Acquire a focusing distance according to the laser distance; Adjusting the focus lens of the camera according to the focusing distance; Obtaining the adjusted shooting picture of the camera; Determine the focus area according to the laser distance and the captured image; The step of determining the focus area according to the laser distance and the captured image includes: Obtaining the relative position relationship between the laser rangefinder and the camera; Acquire the pixel coordinates of the laser landing point of the laser rangefinder in the shooting picture of the camera according to the laser distance and the relative position relationship; The focus area is determined according to the pixel coordinates.

2. The focusing method of the measuring device according to claim 1, characterized in that: The step of acquiring the focusing distance according to the laser distance comprises: Obtaining focus parameters of the camera; The focusing distance is calculated according to the laser distance and the focusing parameter.

3. The focusing method of the measuring device according to claim 1, characterized in that: Said When the clarity of the laser focus image is greater than the clarity of the regional focus image, the step of adjusting the focus lens of the camera comprises: When the clarity of the regional focusing image is less than the clarity of the laser focusing image, the focusing lens of the camera is adjusted according to the focusing distance.

4. The focusing method of the measuring device according to claim 1, characterized in that: After the step of adjusting the focus lens of the camera according to the clarity of the laser focus image and the clarity of the regional focus image, the method further includes: Acquire and save the current camera's shooting picture; Obtaining and saving the rotation angle of the pan / tilt in the measuring device; The laser distance from the laser rangefinder of the measuring device to the target object is obtained and saved.

5. A focusing device for a measuring device, characterized in that: The device comprises: A focus area acquisition module, used to acquire the focus area of ​​the shooting picture of the camera in the measuring device; A clarity acquisition module, used to acquire the clarity of the laser focus image and the clarity of the regional focus image of the focal area; A regional focusing module, used for adjusting the focus lens of the camera using a regional focusing algorithm to focus on the focal area; An adjustment module, used for adjusting the focus lens of the camera when the clarity of the laser focus image is greater than the clarity of the regional focus image; The focus area acquisition module is also used to acquire the laser distance of the laser rangefinder in the measuring device; acquire the focus distance according to the laser distance; adjust the focus lens of the camera according to the focus distance; acquire the adjusted shooting picture of the camera; determine the focus area according to the laser distance and the shooting picture; The focus area acquisition module is also used for: Obtaining the relative position relationship between the laser rangefinder and the camera; Acquire the pixel coordinates of the laser landing point of the laser rangefinder in the shooting picture of the camera according to the laser distance and the relative position relationship; The focus area is determined according to the pixel coordinates.

6. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the focusing method of the measuring device according to any one of claims 1 to 4 are executed.

7. A 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 focusing method of the measuring device according to any one of claims 1 to 4 are executed.

Citation Information

Patent Citations

  • Shooting method, shooting device, camera and mobile terminal

    CN104935815A

  • Target measuring method and device for measuring camera

    CN112731343A

  • Focusing adjustment method and device, electronic equipment and storage medium

    CN113114947A