CN117478980A - Auxiliary automatic focusing method and device based on binocular camera and computer equipment - Google Patents

Auxiliary automatic focusing method and device based on binocular camera and computer equipment Download PDF

Info

Publication number
CN117478980A
CN117478980A CN202311181368.8A CN202311181368A CN117478980A CN 117478980 A CN117478980 A CN 117478980A CN 202311181368 A CN202311181368 A CN 202311181368A CN 117478980 A CN117478980 A CN 117478980A
Authority
CN
China
Prior art keywords
camera
image
auxiliary
focusing
binocular
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311181368.8A
Other languages
Chinese (zh)
Inventor
沈佩雯
刘顺治
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Huagan Technology Co ltd
Original Assignee
Zhejiang Huagan Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Huagan Technology Co ltd filed Critical Zhejiang Huagan Technology Co ltd
Priority to CN202311181368.8A priority Critical patent/CN117478980A/en
Publication of CN117478980A publication Critical patent/CN117478980A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/45Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from two or more image sensors being of different type or operating in different modes, e.g. with a CMOS sensor for moving images in combination with a charge-coupled device [CCD] for still images
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)

Abstract

The application relates to an auxiliary automatic focusing method, an auxiliary automatic focusing device and computer equipment based on a binocular camera, wherein the method comprises the following steps: acquiring a binocular image based on a binocular imaging apparatus; the binocular image includes a visible light image and a thermal imaging image; performing coordinate calibration on the visible light image and the thermal imaging image to obtain a coordinate corresponding relation between image coordinates; when the focusing definition of the first camera does not meet a preset definition threshold, selecting an auxiliary image corresponding to the second camera; the auxiliary image is a thermal imaging image or a visible light image; and automatically focusing the first camera according to the corresponding relation between the auxiliary image and the coordinates. According to the method and the device, the problems that in the related art, the focusing of the visible light camera is influenced by light in the environment, so that the focusing efficiency is low and the focusing effect is poor are solved, and the automatic focusing of the first camera is assisted by using an auxiliary image corresponding to the second camera through a software method; thereby improving the focusing efficiency and guaranteeing the focusing effect.

Description

Auxiliary automatic focusing method and device based on binocular camera and computer equipment
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an auxiliary autofocus method, apparatus, and computer device based on a binocular camera.
Background
The imaging system is provided with a camera which focuses during imaging. Depending on the application, different types of cameras may be used. For a visible light camera, the visible light camera is easily affected by light in the environment, and a complex algorithm is required to reduce the influence of the light intensity in the environment on focusing or increase light supplement so as to enable focusing to be performed normally. The disadvantage of this solution is that: the focusing of the visible light camera is affected by light in the environment, so that the focusing efficiency is low and the focusing effect is poor.
Aiming at the problems that the focusing of a visible light camera in the related art is influenced by light rays in the environment, the focusing efficiency is low, the focusing effect is poor, and no effective solution is proposed at present.
Disclosure of Invention
In this embodiment, an auxiliary automatic focusing method, an auxiliary automatic focusing device and a computer device based on a binocular camera are provided, so as to solve the problems of low focusing efficiency and poor focusing effect caused by the influence of light in the environment on the focusing of a visible light camera in the related technology.
In a first aspect, in this embodiment, there is provided an auxiliary autofocus method based on a binocular camera, suitable for use with a binocular imaging apparatus; the binocular imaging apparatus includes a first camera and a second camera; the method comprises the following steps:
acquiring a binocular image based on the binocular imaging apparatus; the binocular image comprises a visible light image and a thermal imaging image;
performing coordinate calibration on the visible light image and the thermal imaging image to obtain a coordinate corresponding relation between image coordinates;
when the focusing definition of the first camera does not meet a preset definition threshold, selecting an auxiliary image corresponding to the second camera; the auxiliary image is the thermal imaging image or the visible light image;
and automatically focusing the first camera according to the corresponding relation between the auxiliary image and the coordinates.
In some embodiments, the performing coordinate calibration on the visible light image and the thermal imaging image to obtain a coordinate correspondence between image coordinates includes:
and selecting coordinates in the visible light image and the thermal imaging image to carry out affine transformation, and calculating to obtain a coordinate corresponding relation between the visible light image and the thermal imaging image.
In some embodiments, the first camera is a visible light camera and the second camera is a thermal imaging camera;
when the focusing definition of the first camera does not meet a preset definition threshold, selecting an auxiliary image corresponding to the second camera, including:
when the focusing definition of the visible light camera does not meet a preset definition threshold, selecting an auxiliary image corresponding to the thermal imaging camera; the auxiliary image is the thermographic image.
In some of these embodiments, automatically focusing the first camera according to the auxiliary image and the coordinate correspondence includes:
dividing the thermal imaging image into a plurality of first blocks, and determining the standard deviation of the temperature value of each first block;
determining the weight of each first block according to the standard deviation;
and automatically focusing the first camera according to the corresponding relation between the weight and the coordinates.
In some embodiments, the first camera is a thermal imaging camera and the second camera is a visible light camera;
when the focusing definition of the first camera does not meet a preset definition threshold, selecting an auxiliary image corresponding to the second camera, including:
when the focusing definition of the thermal imaging camera does not meet a preset definition threshold, selecting an auxiliary image corresponding to the visible light camera; the auxiliary image is the visible light image.
In some of these embodiments, automatically focusing the first camera according to the auxiliary image and the coordinate correspondence includes:
dividing the visible light image into a plurality of second blocks, and determining a second focal length corresponding to each second block;
and controlling the first focal length of the corresponding first block of the thermal imaging camera within the range of the second focal length based on the coordinate correspondence, thereby completing the automatic focusing of the thermal imaging camera.
In some of these embodiments, the method further comprises:
after the coordinate corresponding relation between the image coordinates is obtained, judging whether the focusing definition of the first camera meets a preset definition threshold value or not;
and when the focusing definition of the first camera meets a preset definition threshold, completing automatic focusing based on the image acquired by the first camera.
In a second aspect, in this embodiment, there is provided an auxiliary autofocus device based on a binocular camera, adapted for use with a binocular imaging apparatus; the binocular imaging apparatus includes a first camera and a second camera; the device comprises: the device comprises an acquisition module, a calibration module, a selection module and an auxiliary focusing module;
the acquisition module is used for acquiring binocular images based on the binocular imaging equipment; the binocular image comprises a visible light image and a thermal imaging image;
the calibration module is used for carrying out coordinate calibration on the visible light image and the thermal imaging image to obtain a coordinate corresponding relation between image coordinates;
the selecting module is used for selecting an auxiliary image corresponding to the second camera when the focusing definition of the first camera does not meet a preset definition threshold; the auxiliary image is the thermal imaging image or the visible light image;
the auxiliary focusing module is used for automatically focusing the first camera according to the corresponding relation between the auxiliary image and the coordinates.
In a third aspect, in this embodiment, there is provided a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the binocular camera-based auxiliary autofocus method of the first aspect.
In a fourth aspect, in this embodiment, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the binocular camera-based auxiliary autofocus method of the first aspect described above.
Compared with the related art, the auxiliary automatic focusing method, the auxiliary automatic focusing device and the computer equipment based on the binocular camera provided in the embodiment acquire binocular images through the binocular imaging equipment; the binocular image includes a visible light image and a thermal imaging image; performing coordinate calibration on the visible light image and the thermal imaging image to obtain a coordinate corresponding relation between image coordinates; when the focusing definition of the first camera does not meet a preset definition threshold, selecting an auxiliary image corresponding to the second camera; the auxiliary image is a thermal imaging image or a visible light image; the first camera is automatically focused according to the corresponding relation between the auxiliary image and the coordinates, so that the problems of low focusing efficiency and poor focusing effect caused by the influence of light rays in the environment in the focusing of the visible light camera in the related technology are solved, and the automatic focusing of the first camera is assisted by the auxiliary image corresponding to the second camera by using a software method; thereby improving the focusing efficiency and guaranteeing the focusing effect.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the other features, objects, and advantages of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
fig. 1 is a block diagram of a hardware structure of a terminal device of an auxiliary auto-focusing method based on a binocular camera according to an embodiment of the present application;
FIG. 2 is a flow chart of a binocular camera-based assisted autofocus method provided in an embodiment of the present application;
FIG. 3 is a flow chart of a binocular camera-based assisted autofocus method according to a preferred embodiment of the present application;
FIG. 4 is a flow chart of a binocular camera-based assisted autofocus method provided in another preferred embodiment of the present application;
fig. 5 is a block diagram of an auxiliary auto-focusing apparatus based on a binocular camera according to an embodiment of the present application.
In the figure: 102. a processor; 104. a memory; 106. a transmission device; 108. an input-output device; 210. an acquisition module; 220. a calibration module; 230. selecting a module; 240. and an auxiliary focusing module.
Detailed Description
For a clearer understanding of the objects, technical solutions and advantages of the present application, the present application is described and illustrated below with reference to the accompanying drawings and examples.
Unless defined otherwise, technical or scientific terms used herein shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terms "a," "an," "the," "these," and the like in this application are not intended to be limiting in number, but rather are singular or plural. The terms "comprising," "including," "having," and any variations thereof, as used in the present application, are intended to cover a non-exclusive inclusion; for example, a process, method, and system, article, or apparatus that comprises a list of steps or modules (units) is not limited to the list of steps or modules (units), but may include other steps or modules (units) not listed or inherent to such process, method, article, or apparatus. The terms "connected," "coupled," and the like in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. Reference to "a plurality" in this application means two or more. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., "a and/or B" may mean: a exists alone, A and B exist together, and B exists alone. Typically, the character "/" indicates that the associated object is an "or" relationship. The terms "first," "second," "third," and the like, as referred to in this application, merely distinguish similar objects and do not represent a particular ordering of objects.
The method embodiments provided in the present embodiment may be executed in a terminal, a computer, or similar computing device. For example, in a terminal, fig. 1 is a block diagram of the hardware structure of the terminal of the auxiliary auto-focusing method based on the binocular camera of the present embodiment. As shown in fig. 1, the terminal may include one or more (only one is shown in fig. 1) processors 102 and a memory 104 for storing data, wherein the processors 102 may include, but are not limited to, a microprocessor MCU, a programmable logic device FPGA, or the like. The terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and is not intended to limit the structure of the terminal. For example, the terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to the binocular camera-based auxiliary autofocus method in the present embodiment, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above-described method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. The network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In this embodiment, an auxiliary autofocus method based on a binocular camera is provided, fig. 2 is a flowchart of the auxiliary autofocus method based on the binocular camera of this embodiment, and as shown in fig. 2, the flowchart includes the following steps:
step S210, acquiring binocular images based on binocular imaging equipment; the binocular image includes a visible light image and a thermal imaging image;
step S220, carrying out coordinate calibration on the visible light image and the thermal imaging image to obtain a coordinate corresponding relation between image coordinates;
step S230, selecting an auxiliary image corresponding to the second camera when the focusing definition of the first camera does not meet a preset definition threshold; the auxiliary image is a thermal imaging image or a visible light image;
step S240, the first camera is automatically focused according to the corresponding relation between the auxiliary image and the coordinates.
Specifically, the auxiliary automatic focusing method based on the binocular camera provided by the embodiment is applicable to binocular imaging equipment; the binocular imaging apparatus includes a first camera and a second camera. During normal use of the binocular imaging apparatus, both the first camera and the second camera need to be focused independently. Such as: the first camera and the second camera are internally provided with an automatic focusing device (AF), and focusing of the corresponding cameras can be completed through the automatic focusing device. Wherein the first camera and the second camera may be a visible light camera and a thermal imaging camera; the binocular imaging device can be suitable for various application scenes such as daytime and night by utilizing various specific features of the visible light camera and the thermal imaging camera. However, for the visible light camera, the visible light camera is easily affected by light in the environment, and a complex algorithm is required to reduce the influence of the light intensity in the environment on focusing or increase the light supplement so as to enable the focusing to be performed normally, so that the problems of low focusing efficiency and poor focusing effect are caused.
The first camera may be considered as a camera whose sharpness after auto-focusing does not satisfy a preset sharpness threshold. The second camera may be considered a camera whose sharpness after auto-focusing meets a preset sharpness threshold. That is, if the post-auto-focus sharpness of the visible light camera does not meet the preset sharpness threshold, the post-auto-focus sharpness of the thermal imaging camera meets the preset sharpness threshold, then the first camera is considered to be a visible light camera; the second camera is a thermal imaging camera.
For binocular images acquired by the two cameras, coordinate calibration is required to be performed firstly, and a coordinate corresponding relation between image coordinates is obtained; the coordinate correspondence can characterize the correspondence of each location in the visible light image in the thermographic image. The first camera can be assisted in efficient autofocus by combining the coordinate correspondence with the auxiliary image that has completed autofocus.
Through the steps, binocular images are acquired based on binocular imaging equipment; performing coordinate calibration on a visible light image and a thermal imaging image in the binocular image to obtain a coordinate corresponding relation between image coordinates; when the focusing definition of the first camera does not meet a preset definition threshold, selecting an auxiliary image corresponding to the second camera; the first camera is automatically focused according to the corresponding relation between the auxiliary image and the coordinates, so that the problems of low focusing efficiency and poor focusing effect caused by the influence of light rays in the environment in the focusing of the visible light camera in the related technology are solved.
The following describes the above steps in detail:
in some embodiments, the step S220 of calibrating coordinates of the visible light image and the thermal imaging image to obtain a coordinate correspondence between image coordinates includes the following steps:
and selecting coordinates in the visible light image and the thermal imaging image to carry out affine transformation, and calculating to obtain a coordinate corresponding relation between the visible light image and the thermal imaging image.
Specifically, three-point coordinates in the visible light image and corresponding three-point coordinates in the thermal imaging image are selected to form three pairs of coordinate points; affine transformation is carried out on the three pairs of coordinate points, and can be regarded as affine transformation from coordinates (x ', y') in the visible light image to coordinates (x, y) in the thermal imaging image, so as to finally obtain a homogeneous coordinate matrix; the homogeneous coordinate matrix is the coordinate corresponding relation between the visible light image and the thermal imaging image.
The expression of the homogeneous coordinate matrix is:
where R represents a rotation matrix and T represents a translation matrix.
In other embodiments, the coordinate correspondence may be obtained by using a transformation function in OpenCV, which is not limited thereto.
In other embodiments, the binocular device is placed in a calibration scene, and binocular images are shot, so that accuracy of the coordinate correspondence is improved.
In some of these embodiments, the implementation of step S230 has two ways:
one implementation manner of step S230 is as follows: as shown in fig. 3, the resolution of the visible camera focus is below the resolution threshold and the thermal imaging image is selected to assist in the auto-focus of the visible camera.
At this time, the first camera is a visible light camera, and the second camera is a thermal imaging camera;
when the focusing definition of the first camera does not meet the preset definition threshold, selecting an auxiliary image corresponding to the second camera, wherein the method comprises the following steps:
when the focusing definition of the visible light camera does not meet a preset definition threshold, selecting an auxiliary image corresponding to the thermal imaging camera; the auxiliary image is a thermographic image.
Specifically, in the automatic focusing process of the visible light camera, the distance between the lens and the CCD is controlled by some definition evaluation indexes when the visible light camera focuses, so that the image is imaged clearly. In general, there is an adjustment process during focusing, the image is from blurring to sharpness, then to blurring, the sharpness peak value is determined, and finally the most sharp position is reached. In the process, the definition of the image is evaluated based on the definition evaluation functions of various gradient methods, and whether the definition of the auto-focus shooting image meets a preset definition threshold is judged. If the sharpness of the camera focus is higher than a preset sharpness threshold (10W), the sharpness of the camera focus is considered to meet the preset sharpness threshold, and the autofocus is completed based on the image acquired by the visible light camera (first camera). If the definition of camera focusing is lower than a preset definition threshold (10W), considering that the definition of camera focusing does not meet the preset definition threshold, and selecting a thermal imaging image corresponding to the thermal imaging camera as an auxiliary image; automatically focusing the first camera according to the corresponding relation between the auxiliary image and the coordinates; so that the focusing efficiency can be greatly improved.
It should be noted that, at this time, the definition after the autofocus of the thermal imaging camera needs to meet the preset definition threshold, and the corresponding thermal imaging image is taken as the auxiliary image. Refocusing is required if the sharpness after autofocusing of both cameras is not met.
Among them, the gradient method includes, but is not limited to, brenner gradient method, tenegrad gradient method, laplace gradient method, variance method, energy gradient method, and the like.
In some of these embodiments, the auto-focusing of the first camera according to the auxiliary image and coordinate correspondence includes the steps of:
dividing a thermal imaging image into a plurality of first blocks, and determining the standard deviation of the temperature value of each first block;
determining the weight of each first block according to the standard deviation;
and carrying out automatic focusing on the first camera according to the corresponding relation between the weight and the coordinates.
Specifically, a thermal imaging image corresponding to a thermal imaging camera is obtained, and the definition of the thermal imaging camera after focusing meets a preset definition threshold. The thermal imaging image is divided into m×n first blocks of the same size, such as: 10 x 8 first blocks. A standard deviation of the temperature values within each first block is calculated based on the first formula. The expression of the first formula is as follows:
wherein s represents the standard deviation of the temperature value of each first block; n represents n first blocks; i represents an i-th first block; x is x i Representing an i-th temperature value;the average of all temperature values is shown.
The larger the value of the standard deviation s, the more part of the detail in the first block is represented, or the first block is located at the edge of the object; the greater the corresponding weight g will be. Thus, with the maximum standard deviation s max As a reference, the weight of the first block is determined by the second formula. The expression of the second formula is as follows:
wherein s is max The maximum value in the standard deviation is represented.
The second block is calculated by the visible light image, and the processing mode is the same as that of the thermal imaging image, and is not repeated here.
Substituting the calculated weight into the calculation of the definition evaluation function of various gradient methods based on the coordinate correspondence, triggering one-time automatic focusing, finding out the point with the highest overall definition of the visible light image, and further completing the automatic focusing of the visible light camera.
In the embodiment, the focusing of the visible light camera is assisted by using the thermal imaging image, so that the focusing effect of the visible light is improved from the aspect of software, the improvement of hardware is not needed, and the production cost is reduced.
Another implementation of step S230 is: as shown in fig. 4, the resolution of the thermal imaging camera focus is below the resolution threshold and the visible light image is selected to assist in the auto-focus of the thermal imaging camera.
At this time, the first camera is a thermal imaging camera, and the second camera is a visible light camera;
when the focusing definition of the first camera does not meet the preset definition threshold, selecting an auxiliary image corresponding to the second camera, wherein the method comprises the following steps:
when the focusing definition of the thermal imaging camera does not meet a preset definition threshold, selecting an auxiliary image corresponding to the visible light camera; the auxiliary image is a visible light image.
Specifically, in the automatic focusing process of the thermal imaging camera, the distance between the lens and the CCD is controlled by some definition judging indexes when the thermal imaging camera focuses, so that the image is imaged clearly. In general, there is an adjustment process during focusing, the image is from blurring to sharpness, then to blurring, the sharpness peak value is determined, and finally the most sharp position is reached. In the process, the definition of the image is evaluated based on the definition evaluation functions of various gradient methods, and whether the definition of the auto-focus shooting image meets a preset definition threshold is judged. If the sharpness of the camera focus is higher than a preset sharpness threshold (10W), the sharpness of the camera focus is considered to meet the preset sharpness threshold, and autofocus is accomplished based on the image acquired by the thermal imaging camera (the first camera). If the definition of camera focusing is lower than a preset definition threshold (10W), the definition of camera focusing is not considered to meet the preset definition threshold, and a visible light image corresponding to the visible light camera is selected as an auxiliary image; automatically focusing the first camera according to the corresponding relation between the auxiliary image and the coordinates; so that the focusing efficiency can be greatly improved.
It should be noted that, at this time, the definition after the auto-focusing of the visible light camera needs to meet the preset definition threshold, and the corresponding visible light image is taken as the auxiliary image. Refocusing is required if the sharpness after autofocusing of both cameras is not met.
In some of these embodiments, the auto-focusing of the first camera according to the auxiliary image and coordinate correspondence includes the steps of:
dividing the visible light image into a plurality of second blocks, and determining a second focal length corresponding to each second block;
and controlling the first focal length of the first block corresponding to the thermal imaging camera within the range of the second focal length based on the coordinate correspondence, thereby completing the automatic focusing of the thermal imaging camera.
Specifically, a visible light image corresponding to a visible light camera is obtained, and the definition of the focused visible light camera meets a preset definition threshold. The visible light image is divided into m×n second blocks of the same size, such as: 10 x 8 second blocks. And determining the second focal length corresponding to each second block by various gradient methods. The thermal imaging image calculates the first block and the corresponding first focal length, and the processing mode is the same as that of the visible light image, which is not repeated here.
And based on the coordinate correspondence, the second focal length corresponds to the first focal length, and the first focal length of the corresponding first block of the thermal imaging camera is controlled within the range of the second focal length, so that the automatic focusing of the thermal imaging camera is completed.
In the embodiment, the focusing of the thermal imaging camera is assisted by using the visible light image, so that the focusing effect of the visible light is improved from the aspect of software, the improvement of hardware is not needed, and the production cost is reduced.
It should be noted that the steps illustrated in the above-described flow or flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
In this embodiment, an auxiliary autofocus device based on a binocular camera is further provided, and this device is used to implement the foregoing embodiments and preferred embodiments, and will not be described again. The terms "module," "unit," "sub-unit," and the like as used below may refer to a combination of software and/or hardware that performs a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware, are also possible and contemplated.
Fig. 5 is a block diagram of the structure of the auxiliary autofocus apparatus based on the binocular camera of the present embodiment, and as shown in fig. 5, the apparatus includes: the device comprises an acquisition module 210, a calibration module 220, a selection module 230 and an auxiliary focusing module 240;
an acquisition module 210 for acquiring a binocular image based on a binocular imaging apparatus; the binocular image includes a visible light image and a thermal imaging image;
the calibration module 220 is configured to perform coordinate calibration on the visible light image and the thermal imaging image, so as to obtain a coordinate correspondence between image coordinates;
a selecting module 230, configured to select an auxiliary image corresponding to the second camera when the resolution focused by the first camera does not meet the preset resolution threshold; the auxiliary image is a thermal imaging image or a visible light image;
the auxiliary focusing module 240 is configured to perform automatic focusing on the first camera according to the corresponding relationship between the auxiliary image and the coordinates.
By the aid of the device, the problems that in the related art, focusing of a visible light camera is affected by light in the environment, focusing efficiency is low and focusing effect is poor are solved, and an auxiliary image corresponding to a second camera is used for assisting automatic focusing of a first camera by a software method; thereby improving the focusing efficiency and guaranteeing the focusing effect.
In some embodiments, the calibration module 220 is further configured to select coordinates in the visible light image and the thermal imaging image to perform affine transformation, and calculate a coordinate correspondence between the visible light image and the thermal imaging image.
In some of these embodiments, the first camera is a visible light camera and the second camera is a thermal imaging camera; the selecting module 230 is further configured to select an auxiliary image corresponding to the thermal imaging camera when the resolution focused by the visible light camera does not meet the preset resolution threshold; the auxiliary image is a thermographic image.
In some of these embodiments, the auxiliary focusing module 240 is further configured to divide the thermal imaging image into a plurality of first blocks, and determine a standard deviation of a temperature value of each first block;
determining the weight of each first block according to the standard deviation;
and carrying out automatic focusing on the first camera according to the corresponding relation between the weight and the coordinates.
In some of these embodiments, the first camera is a thermal imaging camera and the second camera is a visible light camera; the selecting module 230 is further configured to select an auxiliary image corresponding to the visible light camera when the resolution focused by the thermal imaging camera does not meet the preset resolution threshold; the auxiliary image is a visible light image.
In some embodiments, the auxiliary focusing module 240 is further configured to divide the visible light image into a plurality of second blocks, and determine a second focal length corresponding to each second block;
and controlling the first focal length of the first block corresponding to the thermal imaging camera within the range of the second focal length based on the coordinate correspondence, thereby completing the automatic focusing of the thermal imaging camera.
In some of these embodiments, the binocular camera-based auxiliary autofocus apparatus further includes a determination module; the judging module is used for judging whether the focusing definition of the first camera meets a preset definition threshold after the coordinate corresponding relation between the image coordinates is obtained;
and when the focusing definition of the first camera meets a preset definition threshold, completing automatic focusing based on the image acquired by the first camera.
The above-described respective modules may be functional modules or program modules, and may be implemented by software or hardware. For modules implemented in hardware, the various modules described above may be located in the same processor; or the above modules may be located in different processors in any combination.
There is also provided in this embodiment a computer device comprising a memory in which a computer program is stored and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the computer device may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, acquiring binocular images based on binocular imaging equipment; the binocular image includes a visible light image and a thermal imaging image;
s2, carrying out coordinate calibration on the visible light image and the thermal imaging image to obtain a coordinate corresponding relation between image coordinates;
s3, when the focusing definition of the first camera does not meet a preset definition threshold, selecting an auxiliary image corresponding to the second camera; the auxiliary image is a thermal imaging image or a visible light image;
and S4, automatically focusing the first camera according to the corresponding relation between the auxiliary image and the coordinates.
It should be noted that, specific examples in this embodiment may refer to examples described in the foregoing embodiments and alternative implementations, and are not described in detail in this embodiment.
In addition, in combination with the binocular camera-based auxiliary autofocus method provided in the above embodiment, a storage medium may also be provided in the present embodiment. The storage medium has a computer program stored thereon; the computer program, when executed by a processor, implements any of the binocular camera-based auxiliary autofocus methods of the above embodiments.
It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to be limiting. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present application, are within the scope of the present application in light of the embodiments provided herein.
It is evident that the drawings are only examples or embodiments of the present application, from which the present application can also be adapted to other similar situations by a person skilled in the art without the inventive effort. In addition, it should be appreciated that while the development effort might be complex and lengthy, it would nevertheless be a routine undertaking of design, fabrication, or manufacture for those of ordinary skill having the benefit of this disclosure, and thus should not be construed as an admission of insufficient detail.
The term "embodiment" in this application means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive. It will be clear or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the patent. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. An auxiliary automatic focusing method based on a binocular camera is characterized by being suitable for binocular imaging equipment; the binocular imaging apparatus includes a first camera and a second camera; the method comprises the following steps:
acquiring a binocular image based on the binocular imaging apparatus; the binocular image comprises a visible light image and a thermal imaging image;
performing coordinate calibration on the visible light image and the thermal imaging image to obtain a coordinate corresponding relation between image coordinates;
when the focusing definition of the first camera does not meet a preset definition threshold, selecting an auxiliary image corresponding to the second camera; the auxiliary image is the thermal imaging image or the visible light image;
and automatically focusing the first camera according to the corresponding relation between the auxiliary image and the coordinates.
2. The binocular camera-based auxiliary autofocus method of claim 1, wherein the performing coordinate calibration on the visible light image and the thermal imaging image to obtain a coordinate correspondence between image coordinates includes:
and selecting coordinates in the visible light image and the thermal imaging image to carry out affine transformation, and calculating to obtain a coordinate corresponding relation between the visible light image and the thermal imaging image.
3. The binocular camera-based auxiliary autofocus method of claim 1, wherein the first camera is a visible light camera and the second camera is a thermal imaging camera;
when the focusing definition of the first camera does not meet a preset definition threshold, selecting an auxiliary image corresponding to the second camera, including:
when the focusing definition of the visible light camera does not meet a preset definition threshold, selecting an auxiliary image corresponding to the thermal imaging camera; the auxiliary image is the thermographic image.
4. A binocular camera based auxiliary autofocus method according to claim 3, wherein autofocus the first camera according to the auxiliary image and the coordinate correspondence comprises:
dividing the thermal imaging image into a plurality of first blocks, and determining the standard deviation of the temperature value of each first block;
determining the weight of each first block according to the standard deviation;
and automatically focusing the first camera according to the corresponding relation between the weight and the coordinates.
5. The binocular camera-based auxiliary autofocus method of claim 1, wherein the first camera is a thermal imaging camera and the second camera is a visible light camera;
when the focusing definition of the first camera does not meet a preset definition threshold, selecting an auxiliary image corresponding to the second camera, including:
when the focusing definition of the thermal imaging camera does not meet a preset definition threshold, selecting an auxiliary image corresponding to the visible light camera; the auxiliary image is the visible light image.
6. The binocular camera-based auxiliary auto-focusing method of claim 5, wherein auto-focusing the first camera according to the auxiliary image and the coordinate correspondence comprises:
dividing the visible light image into a plurality of second blocks, and determining a second focal length corresponding to each second block;
and controlling the first focal length of the corresponding first block of the thermal imaging camera within the range of the second focal length based on the coordinate correspondence, thereby completing the automatic focusing of the thermal imaging camera.
7. The binocular camera-based auxiliary autofocus method of claim 1, further comprising:
after the coordinate corresponding relation between the image coordinates is obtained, judging whether the focusing definition of the first camera meets a preset definition threshold value or not;
and when the focusing definition of the first camera meets a preset definition threshold, completing automatic focusing based on the image acquired by the first camera.
8. An auxiliary automatic focusing device based on a binocular camera is characterized by being suitable for binocular imaging equipment; the binocular imaging apparatus includes a first camera and a second camera; the device comprises: the device comprises an acquisition module, a calibration module, a selection module and an auxiliary focusing module;
the acquisition module is used for acquiring binocular images based on the binocular imaging equipment; the binocular image comprises a visible light image and a thermal imaging image;
the calibration module is used for carrying out coordinate calibration on the visible light image and the thermal imaging image to obtain a coordinate corresponding relation between image coordinates;
the selecting module is used for selecting an auxiliary image corresponding to the second camera when the focusing definition of the first camera does not meet a preset definition threshold; the auxiliary image is the thermal imaging image or the visible light image;
the auxiliary focusing module is used for automatically focusing the first camera according to the corresponding relation between the auxiliary image and the coordinates.
9. A computer device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the steps of the binocular camera based auxiliary autofocus method of any of claims 1 to 7.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the binocular camera based auxiliary autofocus method of any one of claims 1 to 7.
CN202311181368.8A 2023-09-11 2023-09-11 Auxiliary automatic focusing method and device based on binocular camera and computer equipment Pending CN117478980A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311181368.8A CN117478980A (en) 2023-09-11 2023-09-11 Auxiliary automatic focusing method and device based on binocular camera and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311181368.8A CN117478980A (en) 2023-09-11 2023-09-11 Auxiliary automatic focusing method and device based on binocular camera and computer equipment

Publications (1)

Publication Number Publication Date
CN117478980A true CN117478980A (en) 2024-01-30

Family

ID=89630110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311181368.8A Pending CN117478980A (en) 2023-09-11 2023-09-11 Auxiliary automatic focusing method and device based on binocular camera and computer equipment

Country Status (1)

Country Link
CN (1) CN117478980A (en)

Similar Documents

Publication Publication Date Title
CN107977940B (en) Background blurring processing method, device and equipment
US9998650B2 (en) Image processing apparatus and image pickup apparatus for adding blur in an image according to depth map
KR102032882B1 (en) Autofocus method, device and electronic apparatus
US20150264271A1 (en) Image Blurring Method and Apparatus, and Electronic Devices
TWI538512B (en) Method for adjusting focus position and electronic apparatus
US10827107B2 (en) Photographing method for terminal and terminal
CN101964919A (en) Imaging device and imaging method
CN111385461B (en) Panoramic shooting method and device, camera and mobile terminal
CN104184935B (en) Image capture devices and method
CN107534723B (en) Automatic focusing method, device and equipment
CN112585941A (en) Focusing method and device, shooting equipment, movable platform and storage medium
JP5822492B2 (en) Imaging apparatus and control method
CN109257540B (en) Photographing correction method of multi-photographing lens group and photographing device
CN106878598B (en) Processing method and electronic equipment
CN113747067A (en) Photographing method and device, electronic equipment and storage medium
CN117478980A (en) Auxiliary automatic focusing method and device based on binocular camera and computer equipment
CN116389899A (en) Focusing method and device based on image pickup device, computer device and storage medium
CN110830726A (en) Automatic focusing method, device, equipment and storage medium
US9007515B2 (en) Lens-interchangeable camera system, lens data transmission method and lens data acquisition program
CN115576092A (en) Intelligent automatic focusing method and device for optical microscope and storage equipment
JP2016142924A (en) Imaging apparatus, method of controlling the same, program, and storage medium
CN117714881A (en) Multiplying power adjusting method and device based on binocular camera and computer equipment
CN109600547B (en) Photographing method and device, electronic equipment and storage medium
CN106534704A (en) Infrared technology-based photographing method and apparatus of terminal device
CN105676563A (en) Zoom camera focusing method and camera

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination