CN113132710A - Binocular camera distance adjusting method and device, binocular camera and storage medium - Google Patents

Binocular camera distance adjusting method and device, binocular camera and storage medium Download PDF

Info

Publication number
CN113132710A
CN113132710A CN202110433651.XA CN202110433651A CN113132710A CN 113132710 A CN113132710 A CN 113132710A CN 202110433651 A CN202110433651 A CN 202110433651A CN 113132710 A CN113132710 A CN 113132710A
Authority
CN
China
Prior art keywords
parallax
parallax range
binocular
preset
range
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
CN202110433651.XA
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.)
Shenzhen Huiyuan Innovation Technology Co ltd
Original Assignee
Shenzhen Huiyuan Innovation 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 Shenzhen Huiyuan Innovation Technology Co ltd filed Critical Shenzhen Huiyuan Innovation Technology Co ltd
Priority to CN202110433651.XA priority Critical patent/CN113132710A/en
Publication of CN113132710A publication Critical patent/CN113132710A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/20Image signal generators
    • H04N13/204Image signal generators using stereoscopic image cameras
    • H04N13/239Image signal generators using stereoscopic image cameras using two 2D image sensors having a relative position equal to or related to the interocular distance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/20Image signal generators
    • H04N13/204Image signal generators using stereoscopic image cameras
    • H04N13/246Calibration of cameras

Abstract

The application provides a method and a device for adjusting the distance between binocular cameras, the binocular cameras and a storage medium, wherein the method comprises the following steps: acquiring a first binocular image; determining the parallax of each pixel point in the first binocular image; classifying the parallax of each pixel point in the first binocular image according to a plurality of preset parallax ranges to determine a first parallax range; acquiring a preset parallax range in a current shooting scene; if the preset parallax range is inconsistent with the first parallax range, the distance adjusting mechanism is controlled to adjust the current distance of the binocular camera based on the preset parallax range and the first parallax range, so that the first parallax range of the binocular image shot by the adjusted binocular camera is consistent with the preset parallax range, and therefore the binocular camera can shoot videos with good stereoscopic effect in scenes with different depths of field.

Description

Binocular camera distance adjusting method and device, binocular camera and storage medium
Technical Field
The application relates to the field of image processing, in particular to a method and a device for adjusting the distance between binocular cameras, the binocular cameras and a storage medium.
Background
The existing naked eye 3D video is shot by a binocular camera with a fixed distance in the shooting process. When the binocular cameras with fixed intervals are used for shooting, due to the fact that the depth of field of shooting scenes is different, the parallax of the left and right pictures shot by the binocular cameras is different. The three-dimensional effect of the 3D picture is related to the parallax of the left picture and the right picture, if the parallax of the left picture and the right picture is within a proper parallax range, the three-dimensional effect of the 3D picture is better, and discomfort phenomena such as dizziness and the like cannot be caused when a user watches the three-dimensional effect; on the contrary, if the parallax of the left and right images is not within the proper parallax range, the stereoscopic effect of the 3D image is greatly reduced.
For the binocular cameras with fixed spacing, when a scene with a specific depth of field is shot, the shot binocular images (including the images shot by each camera of the binocular cameras) can obtain a better stereoscopic effect. However, when scenes with other depths of field are shot, the stereoscopic effect of the shot binocular images is poor, and therefore, the stereoscopic effect of videos shot by the fixed-distance binocular cameras is poor, and the shooting requirements cannot be met.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for adjusting a distance between binocular cameras, a binocular camera, and a storage medium, which can enable videos captured by the binocular camera to have a good stereoscopic effect in scenes with different depths of field.
In a first aspect, the present invention provides a binocular camera distance adjusting method, including: acquiring a first binocular image, wherein the first binocular image is a binocular image shot by a binocular camera at the current interval; determining the parallax of each pixel point in the first binocular image; classifying the parallax of each pixel point in the first binocular image according to a plurality of preset parallax ranges, and determining a first parallax range, wherein the first parallax range is the parallax range which contains the most pixel points in the plurality of parallax ranges; acquiring a preset parallax range in the current shooting scene, wherein the preset parallax range is one of the parallax ranges and is a parallax range in which the current shooting scene can acquire the optimal stereoscopic vision effect; if the preset parallax range is inconsistent with the first parallax range, controlling a distance adjusting mechanism to adjust the current distance of the binocular camera based on the preset parallax range and the first parallax range, so that the adjusted first parallax range of the binocular image shot by the binocular camera is consistent with the preset parallax range.
In the embodiment of the application, the first parallax range in the first binocular image and the preset parallax range capable of obtaining the best stereoscopic vision effect in the current shooting scene are obtained, and when the first parallax range is inconsistent with the preset parallax range, the distance adjusting mechanism is controlled to adjust the current distance of the binocular camera based on the two parallax ranges, so that the binocular camera can shoot videos with good stereoscopic effects in scenes with different depths of field.
In an optional embodiment, each parallax range corresponds to one parallax level, the larger the mean value of the parallax ranges is, the higher the level corresponding to the parallax ranges is, and the controlling the distance adjusting mechanism to adjust the current distance between the binocular cameras based on the preset parallax range and the first parallax range includes: and controlling the distance adjusting mechanism to adjust the current distance of the binocular camera based on the level of the preset parallax range and the level of the first parallax range.
In an optional embodiment, the controlling the distance adjustment mechanism to adjust the current distance between the binocular cameras based on the level of the preset parallax range and the level of the first parallax range includes: and if the grade of the preset parallax range is greater than that of the first parallax range, controlling the distance adjusting mechanism to increase the current distance of the binocular camera by a first preset value.
In an optional embodiment, the controlling the distance adjustment mechanism to adjust the current distance between the binocular cameras based on the level of the preset parallax range and the level of the first parallax range includes: and if the grade of the preset parallax range is smaller than that of the first parallax range, controlling the distance adjusting mechanism to reduce the current distance of the binocular camera by a second preset value.
In an alternative embodiment, the method further comprises: and normalizing the parallax of each pixel point in the first binocular image.
In a second aspect, the present invention provides a binocular camera distance adjusting apparatus, the apparatus comprising: the image acquisition unit is used for acquiring a first binocular image, wherein the first binocular image is a binocular image shot by a binocular camera at the current interval; the parallax determining unit is used for determining the parallax of each pixel point in the first binocular image; the parallax range processing unit is used for classifying the parallax of each pixel point in the first binocular image according to a plurality of preset parallax ranges and determining a first parallax range, wherein the first parallax range is the parallax range which contains the most pixel points in the plurality of parallax ranges; acquiring a preset parallax range in the current shooting scene, wherein the preset parallax range is one of the parallax ranges and is a parallax range in which the current shooting scene can acquire the optimal stereoscopic vision effect; and the control unit is used for controlling the distance adjusting mechanism to adjust the current distance of the binocular camera based on the preset parallax range and the first parallax range if the preset parallax range is inconsistent with the first parallax range, so that the adjusted first parallax range of the binocular image shot by the binocular camera is consistent with the preset parallax range.
In an optional embodiment, each parallax range corresponds to one parallax level, the larger the mean value of the parallax ranges is, the higher the level corresponding to the parallax ranges is, and the control unit is further configured to control the distance adjustment mechanism to adjust the current distance between the binocular cameras based on the level of the preset parallax range and the level of the first parallax range.
In an optional embodiment, the control unit is further configured to control the distance adjustment mechanism to increase the current distance between the binocular cameras by a first preset value if the level of the preset parallax range is greater than the level of the first parallax range.
In an optional embodiment, the control unit is further configured to control the distance adjustment mechanism to decrease the current distance between the binocular cameras by a second preset value if the level of the preset parallax range is smaller than the level of the first parallax range.
In an optional implementation manner, the disparity determining unit is further configured to perform normalization processing on the disparity of each pixel point in the first binocular image.
In a third aspect, the present invention provides a binocular camera comprising a controller for performing the method of any of the preceding embodiments and a distance adjustment mechanism.
In a fourth aspect, the present invention provides a storage medium having stored thereon computer program instructions which, when read and executed by a computer, perform the method according to any of the preceding embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a flowchart of a method for adjusting a distance between two binocular cameras according to an embodiment of the present disclosure;
fig. 2 is a block diagram of a binocular camera distance adjusting apparatus according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Icon: 200-binocular camera distance adjusting device; 201-an image acquisition unit; 202-a disparity determining unit; 203-a disparity range processing unit; 204-a control unit; 300-an electronic device; 301-a processor; 302-a communication interface; 303-a memory; 304-bus.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
The existing naked eye 3D video is shot by a binocular camera with a fixed distance in the shooting process. When the binocular cameras with fixed intervals are used for shooting, due to the fact that the depth of field of shooting scenes is different, the parallax of the left and right pictures shot by the binocular cameras is different. The three-dimensional effect of the 3D picture is related to the parallax of the left picture and the right picture, if the parallax of the left picture and the right picture is within a proper parallax range, the three-dimensional effect of the 3D picture is better, and discomfort phenomena such as dizziness and the like cannot be caused when a user watches the three-dimensional effect; on the contrary, if the parallax of the left and right images is not within the proper parallax range, the stereoscopic effect of the 3D image is greatly reduced.
For the binocular cameras with fixed spacing, when a scene with a specific depth of field is shot, the shot binocular images (including the images shot by each camera of the binocular cameras) can obtain a better stereoscopic effect. However, when scenes with other depths of field are shot, the stereoscopic effect of the shot binocular images is poor, and therefore, the stereoscopic effect of videos shot by the fixed-distance binocular cameras is poor, and the shooting requirements cannot be met.
Based on this, embodiments of the present application provide a method and an apparatus for adjusting a distance between binocular cameras, a binocular camera, and a storage medium, so as to solve the above problems.
The technology can be realized by adopting corresponding software, hardware and a combination of software and hardware. The following describes embodiments of the present application in detail.
Referring to fig. 1, fig. 1 is a flowchart of a method for adjusting a distance between two binocular cameras according to an embodiment of the present disclosure, where the method for adjusting the distance between two binocular cameras includes the following steps:
step S101: a first binocular image is acquired.
Step S102: and determining the parallax of each pixel point in the first binocular image.
Step S103: and classifying the parallax of each pixel point in the first binocular image according to a plurality of preset parallax ranges to determine a first parallax range.
Step S104: and acquiring a preset parallax range in the current shooting scene.
Step S105: if the preset parallax range is not consistent with the first parallax range, the distance adjusting mechanism is controlled to adjust the current distance of the binocular camera based on the preset parallax range and the first parallax range, so that the first parallax range of the binocular image shot by the adjusted binocular camera is consistent with the preset parallax range.
The above-described flow will be described in detail below.
Step S101: a first binocular image is acquired.
In the embodiment of the application, a first binocular image is firstly acquired, wherein the first binocular image is a binocular image shot by a binocular camera at a current interval.
Step S102: and determining the parallax of each pixel point in the first binocular image.
In the embodiment of the application, after the first binocular image is obtained, the first binocular image is processed, so that the parallax of each pixel point in the first binocular image is determined.
It should be noted that the parallax of each pixel is the parallax of the left and right frames of the binocular image. Specifically, the binocular camera has two cameras on the left and right, and pictures of two viewing angles (left-view picture and right-view picture) are obtained after shooting. By calculating and processing each pixel point of the left and right visual angle images, the parallax of the left and right visual angle images of each pixel point in the first binocular image can be obtained.
As an optional implementation manner, the first binocular image is processed by a binocular-stereoscopic matching (SGBM) algorithm, so as to determine the parallax of each pixel point.
Step S103: and classifying the parallax of each pixel point in the first binocular image according to a plurality of preset parallax ranges to determine a first parallax range.
In the embodiment of the application, after the parallax of each pixel point in the first binocular image is determined, the parallax of each pixel point is classified according to a plurality of preset parallax ranges, and the first parallax range is determined. The first parallax range is a parallax range including the most pixel points in the plurality of parallax ranges.
It should be noted that the first parallax range refers to a parallax range including the largest number of pixels for each binocular image. Namely, each binocular image has a first parallax range corresponding to the parallax range containing the most pixel points in the binocular image. The respective first parallax ranges may be different for different binocular images.
Specifically, in the embodiment of the present application, a plurality of parallax ranges are preset, and according to the parallax of each pixel point in the first binocular image, each pixel point is classified, that is, which parallax range each pixel point belongs to is determined. After classifying each pixel point, determining the parallax range containing the most pixel points in the plurality of parallax ranges, namely the first parallax range.
In order to conveniently set the parallax range and classify each pixel point, after the parallax of each pixel point is determined, the parallax of each pixel point is normalized.
For example, the disparity is normalized to 0-255. Smaller values represent smaller disparities, and larger values represent larger disparities. Correspondingly, in the case that the parallax is normalized to 0-255, 0-255 can be divided into 16 parallax ranges in advance, i.e. 0-15 is a parallax range, 16-31 is a parallax range, 32-47 is a parallax range, and so on, 240-255 is a parallax range.
It should be noted that, the above-mentioned normalizing the parallax to 0-255 and dividing into 16 parallax ranges is only an embodiment provided in the present application, the parallax may also be normalized to 0-63 or 0-127, the number of the preset parallax ranges may also be 4, 8, 10, and the like, and the present application is not limited thereto.
Step S104: and acquiring a preset parallax range in the current shooting scene.
It should be noted that, for each shooting scene, there is a predetermined parallax range. The preset parallax range is one of the plurality of parallax ranges. In the preset parallax range, the corresponding shooting scene can obtain the best stereoscopic vision effect. The preset parallax ranges are different for different shooting scenes. In the embodiment of the application, the preset parallax range is a parallax range in which the best stereoscopic vision effect can be obtained from the current shooting scene.
As an alternative embodiment, the preset parallax range may be a parallax range set by the user according to the current shooting scene.
Step S105: if the preset parallax range is not consistent with the first parallax range, the distance adjusting mechanism is controlled to adjust the current distance of the binocular camera based on the preset parallax range and the first parallax range, so that the first parallax range of the binocular image shot by the adjusted binocular camera is consistent with the preset parallax range.
In the embodiment of the application, after the preset parallax range and the first parallax range are determined, the two parallax ranges are compared, and if the preset parallax range is inconsistent with the first parallax range, it is indicated that the stereoscopic effect of the binocular images shot by the binocular camera at the current distance in the current scene is poor, and the distance adjusting mechanism needs to be controlled to adjust the current distance of the binocular camera based on the preset parallax range and the first parallax range.
It should be noted that, the binocular camera in the embodiment of the present application is provided with the distance adjusting mechanism, and the distance adjusting mechanism may adjust the distance between the binocular camera according to a control instruction sent by a control unit in the binocular camera.
After the distance between the binocular cameras is adjusted, in order to ensure that the stereoscopic effect of images shot by the binocular cameras at the adjusted distance is good, the binocular cameras can be controlled to shoot binocular images at the adjusted distance, then the parallax of each pixel point in the binocular images is determined, and a first parallax range in the binocular images is determined. Comparing the first parallax range with a preset parallax range, and if the first parallax range is the same as the preset parallax range, indicating that the binocular images shot by the binocular cameras at the adjusted distance have the best stereoscopic effect, and finishing the adjustment of the distance between the binocular cameras; if the first parallax range is still inconsistent with the preset parallax range, the distance between the binocular cameras is continuously adjusted, and the process is repeated until the first parallax range of the binocular images shot by the binocular cameras is consistent with the preset parallax range.
As an alternative implementation, the step S105 may include the following steps:
and controlling the distance adjusting mechanism to adjust the current distance of the binocular camera based on the level of the preset parallax range and the level of the first parallax range.
In the embodiment of the application, each parallax range (including a plurality of preset parallax ranges and the first parallax range of each binocular image) corresponds to one parallax level, and the larger the average value of the parallax ranges is, the higher the level corresponding to the parallax range is.
The average value of the parallax range is the average value of the upper limit and the lower limit of the parallax range. For example, if the average value of the disparity ranges 0-15 is 7.5 and the average value of the disparity ranges 16-31 is 23.5, the disparity levels corresponding to 0-15 are lower than the disparity levels corresponding to 16-31. Taking the parallax normalized to 0-255 and dividing into 16 parallax ranges as an example, 0-15 corresponds to level 0, 16-31 corresponds to level 1, 32-47 corresponds to level 2, and so on, 240-255 corresponds to level 15.
After each parallax range corresponds to one parallax level, the level of the preset parallax range and the level of the first parallax range can be determined.
And if the grade of the preset parallax range is greater than that of the first parallax range, controlling the distance adjusting mechanism to increase the current distance of the binocular camera by a first preset value.
Specifically, when the level of the preset parallax range is greater than the level of the first parallax range, it is indicated that the distance between the two cameras of the binocular camera is small at this time, so that the subject parallax of the captured binocular image is small, and it is necessary to increase the current distance between the binocular camera so as to make the level of the first parallax range of the binocular image captured by the adjusted binocular camera the same as the level of the preset parallax range.
And if the grade of the preset parallax range is smaller than that of the first parallax range, controlling the distance adjusting mechanism to reduce the current distance of the binocular camera by a second preset value.
Specifically, when the level of the preset parallax range is smaller than the level of the first parallax range, it indicates that the distance between the two cameras of the binocular camera is large at this time, so that the subject parallax of the captured binocular image is large, and it is necessary to reduce the current distance between the binocular cameras so that the level of the first parallax range of the binocular image captured by the adjusted binocular camera is the same as the level of the preset parallax range.
Further, through one-time adjustment, the level of the first parallax range of the binocular image shot by the adjusted binocular camera may still be different from the level of the preset parallax range, in order to ensure that the level of the first parallax range of the binocular image shot by the binocular camera is the same as the level of the preset parallax range, the binocular camera is controlled to shoot the binocular image at the adjusted interval, then the parallax of each pixel point in the binocular image is determined, and the first parallax range in the binocular image is determined. Comparing the first parallax range with a preset parallax range, and if the first parallax range is the same as the preset parallax range, indicating that the binocular images shot by the binocular cameras at the adjusted distance have the best stereoscopic effect, and finishing the adjustment of the distance between the binocular cameras; if the first parallax range is still inconsistent with the preset parallax range, the distance between the binocular cameras is continuously adjusted, and the process is repeated until the first parallax range of the binocular images shot by the binocular cameras is consistent with the preset parallax range.
It can be understood that in the circulation process, if the level of the preset parallax range is greater than the level of the first parallax range, the distance adjusting mechanism is controlled to increase the current distance of the binocular camera by the first preset value; and if the grade of the preset parallax range is smaller than that of the first parallax range, controlling the distance adjusting mechanism to reduce the current distance of the binocular camera by a second preset value.
The first preset value and the second preset value can be the same or different. This is not limited in this application.
The embodiment of the application provides a method for adjusting the distance between binocular cameras, which comprises the steps of acquiring a first parallax range in a first binocular image and a preset parallax range capable of acquiring the best stereoscopic vision effect in a current shooting scene, and controlling a distance adjusting mechanism to adjust the current distance between the binocular cameras based on the two parallax ranges when the first parallax range is inconsistent with the preset parallax range, so that the binocular cameras can shoot videos with good stereoscopic effects in scenes with different depths of field.
Based on the same inventive concept, the embodiment of the application also provides a binocular camera distance adjusting device. Referring to fig. 2, fig. 2 is a block diagram illustrating a binocular camera distance adjusting apparatus according to an embodiment of the present disclosure, where the binocular camera distance adjusting apparatus 200 includes:
an image obtaining unit 201, configured to obtain a first binocular image, where the first binocular image is a binocular image captured by a binocular camera at a current distance;
a disparity determining unit 202, configured to determine a disparity of each pixel in the first binocular image;
the parallax range processing unit 203 is configured to classify the parallax of each pixel point in the first binocular image according to a plurality of preset parallax ranges, and determine a first parallax range, where the first parallax range is a parallax range including the largest number of pixel points in the plurality of parallax ranges; acquiring a preset parallax range in the current shooting scene, wherein the preset parallax range is one of the parallax ranges and is a parallax range in which the current shooting scene can acquire the optimal stereoscopic vision effect;
the control unit 204 is configured to, if the preset parallax range is inconsistent with the first parallax range, control the distance adjustment mechanism to adjust the current distance between the binocular cameras based on the preset parallax range and the first parallax range, so that the adjusted first parallax range of the binocular images captured by the binocular cameras is consistent with the preset parallax range.
In an optional embodiment, each parallax range corresponds to one parallax level, the larger the average value of the parallax ranges is, the higher the level corresponding to the parallax range is, and the control unit 204 is further configured to control the distance adjustment mechanism to adjust the current distance between the binocular cameras based on the level of the preset parallax range and the level of the first parallax range.
In an optional embodiment, the control unit 204 is further configured to control the distance adjustment mechanism to increase the current distance between the binocular cameras by a first preset value if the level of the preset parallax range is greater than the level of the first parallax range.
In an optional embodiment, the control unit 204 is further configured to control the distance adjusting mechanism to decrease the current distance between the binocular cameras by a second preset value if the level of the preset parallax range is smaller than the level of the first parallax range.
In an optional embodiment, the disparity determining unit 202 is further configured to perform normalization processing on the disparity of each pixel point in the first binocular image.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device 300 according to an embodiment of the present application, where the electronic device 300 includes: at least one processor 301, at least one communication interface 302, at least one memory 303, and at least one bus 304. Wherein the bus 304 is used for realizing direct connection communication of these components, the communication interface 302 is used for communicating signaling or data with other node devices, and the memory 303 stores machine readable instructions executable by the processor 301. When the electronic device 300 is in operation, the processor 301 and the memory 303 communicate via the bus 304, and the machine-readable instructions, when invoked by the processor 301, perform the binocular camera distance adjustment method described above.
The processor 301 may be an integrated circuit chip having signal processing capabilities. The Processor 301 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. Which may implement or perform the various methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The Memory 303 may include, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Read Only Memory (EPROM), an electrically Erasable Read Only Memory (EEPROM), and the like.
It will be appreciated that the configuration shown in fig. 3 is merely illustrative and that electronic device 300 may include more or fewer components than shown in fig. 3 or have a different configuration than shown in fig. 3. The components shown in fig. 3 may be implemented in hardware, software, or a combination thereof. In the embodiment of the present application, the electronic device 300 may be, but is not limited to, an entity device such as a desktop, a notebook computer, a smart phone, an intelligent wearable device, and a vehicle-mounted device, and may also be a virtual device such as a virtual machine. In addition, the electronic device 300 is not necessarily a single device, but may also be a combination of multiple devices, such as a server cluster, and the like.
In addition, the embodiment of the application also provides a binocular camera, which comprises a controller and a distance adjusting mechanism, wherein the controller is used for executing the binocular camera distance adjusting method in any one of the previous embodiments. The controller may be the electronic device in the foregoing embodiments.
In addition, the embodiment of the present application also provides a storage medium, on which computer program instructions are stored, and when the computer program instructions are read and executed by a computer, the binocular camera distance adjusting method in the above embodiment is executed.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the 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.
It should be noted that the functions, if implemented in the form of software functional modules and sold or used as independent products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A binocular camera distance adjusting method is characterized by comprising the following steps:
acquiring a first binocular image, wherein the first binocular image is a binocular image shot by a binocular camera at the current interval;
determining the parallax of each pixel point in the first binocular image;
classifying the parallax of each pixel point in the first binocular image according to a plurality of preset parallax ranges, and determining a first parallax range, wherein the first parallax range is the parallax range which contains the most pixel points in the plurality of parallax ranges;
acquiring a preset parallax range in the current shooting scene, wherein the preset parallax range is one of the parallax ranges and is a parallax range in which the current shooting scene can acquire the optimal stereoscopic vision effect;
if the preset parallax range is inconsistent with the first parallax range, controlling a distance adjusting mechanism to adjust the current distance of the binocular camera based on the preset parallax range and the first parallax range, so that the adjusted first parallax range of the binocular image shot by the binocular camera is consistent with the preset parallax range.
2. The method according to claim 1, wherein each parallax range corresponds to a parallax level, the higher the mean value of the parallax ranges is, the higher the levels corresponding to the parallax ranges are, and the controlling the distance adjustment mechanism to adjust the current distance between the binocular cameras based on the preset parallax range and the first parallax range comprises:
and controlling the distance adjusting mechanism to adjust the current distance of the binocular camera based on the level of the preset parallax range and the level of the first parallax range.
3. The method of claim 2, wherein the controlling the distance adjustment mechanism to adjust the current distance of the binocular cameras based on the level of the preset parallax range and the level of the first parallax range comprises:
and if the grade of the preset parallax range is greater than that of the first parallax range, controlling the distance adjusting mechanism to increase the current distance of the binocular camera by a first preset value.
4. The method of claim 2, wherein the controlling the distance adjustment mechanism to adjust the current distance of the binocular cameras based on the level of the preset parallax range and the level of the first parallax range comprises:
and if the grade of the preset parallax range is smaller than that of the first parallax range, controlling the distance adjusting mechanism to reduce the current distance of the binocular camera by a second preset value.
5. The method of claim 1, further comprising:
and normalizing the parallax of each pixel point in the first binocular image.
6. A binocular camera distance adjusting apparatus, the apparatus comprising:
the image acquisition unit is used for acquiring a first binocular image, wherein the first binocular image is a binocular image shot by a binocular camera at the current interval;
the parallax determining unit is used for determining the parallax of each pixel point in the first binocular image;
the parallax range processing unit is used for classifying the parallax of each pixel point in the first binocular image according to a plurality of preset parallax ranges and determining a first parallax range, wherein the first parallax range is the parallax range which contains the most pixel points in the plurality of parallax ranges; acquiring a preset parallax range in the current shooting scene, wherein the preset parallax range is one of the parallax ranges and is a parallax range in which the current shooting scene can acquire the optimal stereoscopic vision effect;
and the control unit is used for controlling the distance adjusting mechanism to adjust the current distance of the binocular camera based on the preset parallax range and the first parallax range if the preset parallax range is inconsistent with the first parallax range, so that the adjusted first parallax range of the binocular image shot by the binocular camera is consistent with the preset parallax range.
7. The apparatus according to claim 6, wherein each of the parallax ranges corresponds to a parallax level, the higher the average value of the parallax ranges is, the higher the level corresponding to the parallax ranges is, and the control unit is further configured to control the distance adjustment mechanism to adjust the current distance between the binocular cameras based on the level of the preset parallax range and the level of the first parallax range.
8. The apparatus of claim 7, wherein the control unit is further configured to control the distance adjustment mechanism to increase the current distance between the binocular cameras by a first preset value if the level of the preset parallax range is greater than the level of the first parallax range.
9. A binocular camera comprising a controller for performing the binocular camera distance adjustment method of any one of claims 1-5 and a distance adjustment mechanism.
10. A storage medium having stored thereon computer program instructions which, when read and executed by a computer, perform the method of any one of claims 1-5.
CN202110433651.XA 2021-04-21 2021-04-21 Binocular camera distance adjusting method and device, binocular camera and storage medium Pending CN113132710A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110433651.XA CN113132710A (en) 2021-04-21 2021-04-21 Binocular camera distance adjusting method and device, binocular camera and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110433651.XA CN113132710A (en) 2021-04-21 2021-04-21 Binocular camera distance adjusting method and device, binocular camera and storage medium

Publications (1)

Publication Number Publication Date
CN113132710A true CN113132710A (en) 2021-07-16

Family

ID=76779163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110433651.XA Pending CN113132710A (en) 2021-04-21 2021-04-21 Binocular camera distance adjusting method and device, binocular camera and storage medium

Country Status (1)

Country Link
CN (1) CN113132710A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117653007A (en) * 2024-01-31 2024-03-08 浙江华诺康科技有限公司 Parallax adjustment method, system and computer equipment of endoscope
CN117653007B (en) * 2024-01-31 2024-05-10 浙江华诺康科技有限公司 Parallax adjustment method, system and computer equipment of endoscope

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003185938A (en) * 2001-12-18 2003-07-03 Pentax Corp Binoculars with photographing function
CN104010178A (en) * 2014-06-06 2014-08-27 深圳市墨克瑞光电子研究院 Binocular image parallax adjusting method and device and binocular camera
CN106331679A (en) * 2015-06-30 2017-01-11 深圳市墨克瑞光电子研究院 Binocular camera space adjusting method and device
CN110233963A (en) * 2019-05-06 2019-09-13 深圳市华芯技研科技有限公司 A kind of binocular camera spacing adjusting method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003185938A (en) * 2001-12-18 2003-07-03 Pentax Corp Binoculars with photographing function
CN104010178A (en) * 2014-06-06 2014-08-27 深圳市墨克瑞光电子研究院 Binocular image parallax adjusting method and device and binocular camera
CN106331679A (en) * 2015-06-30 2017-01-11 深圳市墨克瑞光电子研究院 Binocular camera space adjusting method and device
CN110233963A (en) * 2019-05-06 2019-09-13 深圳市华芯技研科技有限公司 A kind of binocular camera spacing adjusting method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117653007A (en) * 2024-01-31 2024-03-08 浙江华诺康科技有限公司 Parallax adjustment method, system and computer equipment of endoscope
CN117653007B (en) * 2024-01-31 2024-05-10 浙江华诺康科技有限公司 Parallax adjustment method, system and computer equipment of endoscope

Similar Documents

Publication Publication Date Title
CN109961406B (en) Image processing method and device and terminal equipment
CN108335279B (en) Image fusion and HDR imaging
EP2849431B1 (en) Method and apparatus for detecting backlight
EP2153669B1 (en) Method, apparatus and system for processing depth-related information
US20120140038A1 (en) Zero disparity plane for feedback-based three-dimensional video
US9154762B2 (en) Stereoscopic image system utilizing pixel shifting and interpolation
CN111582005B (en) Image processing method, device, computer readable medium and electronic equipment
US20180115763A1 (en) Optimization method of image depth information and image processing apparatus
US9747694B2 (en) Method and apparatus for optimizing depth information
WO2011014229A1 (en) Adjusting perspective and disparity in stereoscopic image pairs
CN102859555A (en) Image processing device, image processing method, and program therefor
US10116917B2 (en) Image processing apparatus, image processing method, and storage medium
US20160180514A1 (en) Image processing method and electronic device thereof
US11127141B2 (en) Image processing apparatus, image processing method, and a non-transitory computer readable storage medium
CN103828363B (en) Parallax adjustment device and operation control method therefor
US9918015B2 (en) Exposure control using depth information
EP2680224B1 (en) Method and device for determining a depth image
CN113132710A (en) Binocular camera distance adjusting method and device, binocular camera and storage medium
CN105488845B (en) Generate the method and its electronic device of 3-D view
CN110892706B (en) Method for displaying content derived from light field data on a 2D display device
CN114786001B (en) 3D picture shooting method and 3D shooting system
US20180227563A1 (en) Methods and devices for determining visual fatigue of three-dimensional image or video and computer readable storage medium
US20190028698A1 (en) Generation method for multi-view auto-stereoscopic images, displaying method and electronic apparatus
US20150117757A1 (en) Method for processing at least one disparity map, corresponding electronic device and computer program product
CN116017129A (en) Method, device, system, equipment and medium for adjusting angle of light supplementing lamp

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210716