CN108093243A - A kind of three-dimensional imaging processing method, device and stereoscopic display device - Google Patents

A kind of three-dimensional imaging processing method, device and stereoscopic display device Download PDF

Info

Publication number
CN108093243A
CN108093243A CN201711495534.6A CN201711495534A CN108093243A CN 108093243 A CN108093243 A CN 108093243A CN 201711495534 A CN201711495534 A CN 201711495534A CN 108093243 A CN108093243 A CN 108093243A
Authority
CN
China
Prior art keywords
view
left view
right view
width
position information
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
CN201711495534.6A
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 Super Technology Co Ltd
Original Assignee
Shenzhen Super 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 Super Technology Co Ltd filed Critical Shenzhen Super Technology Co Ltd
Priority to CN201711495534.6A priority Critical patent/CN108093243A/en
Publication of CN108093243A publication Critical patent/CN108093243A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/165Detection; Localisation; Normalisation using facial parts and geometric relationships

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Geometry (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Abstract

The present embodiments relate to stereo display technique fields, specifically disclose a kind of three-dimensional imaging processing method, including:Obtain the first left view and the first right view of binocular camera shooting;Determine the spatial positional information of the first left view and the object in the second left view;According to the spatial positional information of object and pre-set spatial positional information and the correspondence of parallax adjustment offset, determine that the corresponding parallax of spatial positional information of object adjusts offset;Offset is adjusted according to parallax, processing is cut into line misregistration to the first left view and the first right view, obtains the second left view and the second right view, according to the second left view and the second right view, carries out three-dimensional imaging.By the above-mentioned means, the embodiment of the present invention can carry out parallax adjustment in a manner that dislocation is cut to stereo-picture, so as to meet the perception demand of user, user's viewing experience is promoted.

Description

Three-dimensional imaging processing method and device and three-dimensional display equipment
Technical Field
The invention relates to the technical field of stereoscopic display, in particular to a stereoscopic imaging processing method and device and stereoscopic display equipment.
Background
In daily life, if the human eye is very close to an observation object, the human eye feels very large intraocular pressure and very unnatural when watching the object, so that the human eye has a more comfortable observation distance.
When a stereoscopic image is stereoscopically displayed by using a stereoscopic display device, the stereoscopic effect of the stereoscopic image in human eyes is not necessarily optimal, for example, the stereoscopic effect of the scene may be very prominent, so that a human may feel very close to the human eyes, and in this case, the human eyes may be very uncomfortable. Moreover, the stereoscopic display projects too much image, which is easy to generate crosstalk, and also can affect the effect of the stereoscopic display to a certain extent.
Disclosure of Invention
The embodiment of the invention provides a stereoscopic imaging processing method and device and a stereoscopic display device, which can solve the problem that people in the prior art may feel uncomfortable when watching a stereoscopic display image, effectively ensure a good stereoscopic display effect, meet the viewing and feeling requirements of users and improve the user experience.
In a first aspect, an embodiment of the present invention provides a stereoscopic imaging processing method, which is applied to a stereoscopic display device, where a binocular camera is arranged on the stereoscopic display device, and the method includes:
acquiring a first left view and a first right view shot by the binocular camera;
determining spatial position information of a target object in the first left view and the first right view;
determining a parallax adjustment offset corresponding to the spatial position information of the target object according to the spatial position information of the target object and a preset corresponding relation between the spatial position information and the parallax adjustment offset;
performing dislocation cropping processing on the first left view and the first right view according to the parallax adjustment offset to obtain a second left view and a second right view, so that pixel points at the same positions in the first left view and the second right view are horizontally dislocated in the second left view and the second right view, and the distance of horizontal dislocation is equal to the parallax adjustment offset;
and carrying out stereoscopic imaging according to the second left view and the second right view.
With reference to the first aspect, in a first implementation manner of the first aspect, the determining spatial position information of the object in the first left view and the first right view includes:
acquiring depth maps corresponding to the first left view and the first right view, determining depth information of a target object in the first left view and the second left view according to the depth maps, and determining spatial position information of the target object according to the depth information of the target object;
or
Determining image position information of the target object in the first left view and/or the first right view, and determining spatial position information of the target object according to the image position information of the target object.
With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the acquiring depth maps corresponding to the first left view and the first right view includes:
acquiring a depth map corresponding to the first left view and the first right view provided by the ranging hardware from the ranging hardware;
or
And acquiring the depth maps corresponding to the first left view and the first right view by using a stereo matching algorithm.
With reference to the first embodiment of the first aspect, in a third embodiment of the first aspect, the target is a human eye;
the determining image position information of the object in the first left view and/or the first right view comprises:
determining a face region in the first left view and/or the first right view;
detecting human face characteristic points of the human face area by using a human face alignment algorithm;
determining the position of the human eye in the first left view and/or the first right view according to the position of the detected human face feature point.
With reference to the first aspect, in a fourth implementation manner of the first aspect, the determining, according to the spatial position information of the target object and a preset correspondence between the spatial position information and a parallax adjustment offset amount, a parallax adjustment offset amount corresponding to the spatial position information of the target object includes:
inquiring a preset offset database by taking the spatial position information of the target object as an index to obtain a parallax adjustment offset corresponding to the spatial position information;
or
And substituting the spatial position information of the target object into a preset functional relation between the parallax offset and the spatial position information to obtain a parallax adjustment offset corresponding to the spatial position information.
With reference to the fourth implementation manner of the first aspect, in a fifth implementation manner of the first aspect, the obtaining the parallax adjustment offset amount corresponding to the spatial position information by substituting the spatial position information of the target object into a preset functional relationship between the parallax offset amount and the spatial position information includes:
acquiring a parallax adjustment offset amount corresponding to the spatial position information by the following formula:
wherein newp is a parallax adjustment offset amount, d is spatial position information of the object, d1 and d2 are preset spatial position sections, and p1 and p2 are preset parallax adjustment offset amounts corresponding to d1 and d 2.
With reference to the first aspect or any one of the first to fifth implementation manners of the first aspect, in a sixth implementation manner of the first aspect, the performing a misalignment clipping process on the first left view and the first right view according to the parallax adjustment offset amount to obtain second left views and second right views includes:
acquiring a third left view region in the first left view, translating the third left view region in the first left view by a first distance along a first horizontal direction, and acquiring a view in the translated third left view region in the first left view as a second left view; and
acquiring a third right-view region in the first right-view, translating the third right-view region by a second distance in a second horizontal direction opposite to the first horizontal direction in the first right-view, and acquiring a view in the translated third right-view region in the first right-view as a second right-view;
wherein a sum of the first distance and the second distance is equal to the parallax adjustment offset amount.
With reference to the first aspect or any one of the first to fifth implementation manners of the first aspect, in a seventh implementation manner of the first aspect, the performing a misalignment clipping process on the first left view and the first right view according to the parallax adjustment offset amount to obtain second left views and second right views includes:
cutting out image content with a first width in the horizontal direction at a first side of the first left view to obtain a second left view; and the number of the first and second groups,
cutting off image content with a first width in the horizontal direction at a second side of the first right view to obtain a second right view;
wherein the first width is equal to the parallax adjustment offset, the first side is one of a left side and a right side, and the second side is the other of the left side and the right side.
With reference to the first aspect or any one of the first to fifth implementation manners of the first aspect, in an eighth implementation manner of the first aspect, the performing a misalignment clipping process on the first left view and the first right view according to the parallax adjustment offset amount to obtain second left views and second right views includes:
cutting out image content with a first width in the horizontal direction at a first side of the first left view to obtain a fourth left view, splicing pure color pictures in the horizontal direction at the first side and/or a second side of the fourth left view to obtain the second left view, so that the size of the second left view is consistent with that of the first left view;
cutting out image content with a first width in the horizontal direction on the second side of the first right view to obtain a fourth right view, and horizontally splicing pure-color pictures on the first side and/or the second side of the fourth right view to obtain the second right view, so that the size of the second right view is consistent with that of the first right view;
the first width is equal to the parallax adjustment offset, the first side is one of the left side and the right side, the second side is the other of the left side and the right side, and the fourth left view and the fourth right view are spliced into a pure-color picture on the same side.
With reference to the first aspect or any one of the first to fifth implementation manners of the first aspect, in a ninth implementation manner of the first aspect, the performing a misalignment clipping process on the first left view and the first right view according to the parallax adjustment offset amount to obtain second left views and second right views includes:
cutting off image content of a first width in a horizontal direction at a first side of the first left view and cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the first left view to obtain the second left view so that a ratio of a length of the second left view in the horizontal direction to the width in the vertical direction is consistent with the first left view;
cutting off image content of a first width in a horizontal direction at a second side of the first right view and cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the first left view to obtain the second right view, wherein a ratio of a length of the second right view in the horizontal direction to a width of the second right view in the vertical direction is consistent with the first right view;
the first width is equal to the parallax adjustment offset, the first side is one of the left side and the right side, the second side is the other of the left side and the right side, the third side is one of the upper side and the lower side, the second side is the other of the upper side and the lower side, and the first left view and the first right view cut off image content in the vertical direction at the same side.
With reference to the first aspect or any one of the first to fifth implementation manners of the first aspect, in a tenth implementation manner of the first aspect, the performing a misalignment clipping process on the first left view and the first right view according to the parallax adjustment offset amount to obtain second left views and second right views includes:
cutting out image content of a first width in a horizontal direction at a first side of the first left view to obtain a fifth left view;
cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the fifth left view to obtain the second left view so that a ratio of a length of the second left view in a horizontal direction to a width of the second left view in a vertical direction is consistent with the first left view;
and
cutting off image content of a first width in a horizontal direction at a second side of the first right view to obtain a sixth right view;
cutting off image content of a second width in the vertical direction at a third side and/or a fourth side of the sixth right view to obtain the second right view, wherein the ratio of the length of the second right view in the horizontal direction to the width of the second right view in the vertical direction is consistent with the first right view;
the first width is equal to the parallax adjustment offset, the first side is one of the left side and the right side, the second side is the other of the left side and the right side, the third side is one of the upper side and the lower side, the second side is the other of the upper side and the lower side, and the sixth left view and the sixth right view have the same side from which the image content in the vertical direction is cut off.
With reference to the first aspect, in an eleventh implementation manner of the first aspect, the performing stereoscopic imaging according to the second left view and the second right view includes:
synthesizing the second left view and the second right view into a second stereoscopic image;
and carrying out naked eye three-dimensional display by utilizing the second three-dimensional image so as to realize three-dimensional imaging.
In a second aspect, an embodiment of the present invention provides a stereoscopic imaging processing apparatus, where the apparatus includes:
the first acquisition unit is used for acquiring a first left view and a first right view shot by the binocular camera;
a first determination unit configured to determine spatial position information of the target object in the first left view and the first right view;
a second determining unit, configured to determine a parallax adjustment offset corresponding to the spatial position information of the target object according to the spatial position information of the target object and a preset correspondence between the spatial position information and the parallax adjustment offset;
the processing unit is used for carrying out dislocation cutting processing on the first left view and the first right view according to the parallax adjustment offset to obtain a second left view and a second right view so as to enable pixel points at the same positions in the first left view and the second right view to be horizontally dislocated in the second left view and the second right view, and the distance of horizontal dislocation is equal to the parallax adjustment offset;
and the display unit is used for carrying out stereoscopic imaging according to the second left view and the second right view.
With reference to the second aspect, in a first implementation manner of the second aspect, the first determining unit includes:
the first acquisition module is used for acquiring the depth maps corresponding to the first left view and the first right view;
a first determining module, configured to determine depth information of a target object in the first left view and the second left view according to the depth map;
the second determining module is used for determining the spatial position information of the target object according to the depth information of the target object;
or
A third determining module, configured to determine image position information of the target object in the first left view and/or the first right view;
and the fourth determining module is used for determining the spatial position information of the target object according to the image position information of the target object.
With reference to the first implementation manner of the second aspect, in a second implementation manner of the second aspect, the first obtaining module is specifically configured to:
acquiring a depth map corresponding to the first left view and the first right view provided by the ranging hardware from the ranging hardware;
or
And acquiring the depth maps corresponding to the first left view and the first right view by using a stereo matching algorithm.
With reference to the first embodiment of the second aspect, in a third embodiment of the second aspect, the target object is a human eye;
the third determining module is specifically configured to:
determining a face region in the first left view and/or the first right view;
detecting human face characteristic points of the human face area by using a human face alignment algorithm;
determining the position of the human eye in the first left view and/or the first right view according to the position of the detected human face feature point.
With reference to the second aspect, in a fourth implementation manner of the second aspect, the second determining unit includes:
the query module is used for querying a preset offset database by taking the spatial position information of the target object as an index to acquire a parallax adjustment offset corresponding to the spatial position information;
or
And the calculation module is used for substituting the spatial position information of the target object into a preset functional relation between the parallax offset and the spatial position information to acquire the parallax adjustment offset corresponding to the spatial position information.
With reference to the fourth implementation manner of the second aspect, in a fifth implementation manner of the second aspect, the calculating module is specifically configured to:
acquiring a parallax adjustment offset amount corresponding to the spatial position information by the following formula:
wherein newp is a parallax adjustment offset amount, d is spatial position information of the object, d1 and d2 are preset spatial position sections, and p1 and p2 are preset parallax adjustment offset amounts corresponding to d1 and d 2.
With reference to the second aspect or any one of the first to fifth implementation manners of the second aspect, in a sixth implementation manner of the second aspect, the processing unit is specifically configured to:
acquiring a third left view region in the first left view, translating the third left view region in the first left view by a first distance along a first horizontal direction, and acquiring a view in the translated third left view region in the first left view as a second left view; and
acquiring a third right-view region in the first right-view, translating the third right-view region by a second distance in a second horizontal direction opposite to the first horizontal direction in the first right-view, and acquiring a view in the translated third right-view region in the first right-view as a second right-view;
wherein a sum of the first distance and the second distance is equal to the parallax adjustment offset amount.
With reference to the second aspect or any one of the first to fifth implementation manners of the second aspect, in a seventh implementation manner of the second aspect, the processing unit is specifically configured to:
cutting out image content with a first width in the horizontal direction at a first side of the first left view to obtain a second left view; and the number of the first and second groups,
cutting off image content with a first width in the horizontal direction at a second side of the first right view to obtain a second right view;
wherein the first width is equal to the parallax adjustment offset, the first side is one of a left side and a right side, and the second side is the other of the left side and the right side.
With reference to the second aspect or any one of the first to fifth implementation manners of the second aspect, in an eighth implementation manner of the second aspect, the processing unit is specifically configured to:
cutting out image content with a first width in the horizontal direction at a first side of the first left view to obtain a fourth left view, splicing pure color pictures in the horizontal direction at the first side and/or a second side of the fourth left view to obtain the second left view, so that the size of the second left view is consistent with that of the first left view;
cutting out image content with a first width in the horizontal direction on the second side of the first right view to obtain a fourth right view, and horizontally splicing pure-color pictures on the first side and/or the second side of the fourth right view to obtain the second right view, so that the size of the second right view is consistent with that of the first right view;
the first width is equal to the parallax adjustment offset, the first side is one of the left side and the right side, the second side is the other of the left side and the right side, and the fourth left view and the fourth right view are spliced into a pure-color picture on the same side.
With reference to the second aspect or any one of the first to fifth implementation manners of the second aspect, in a ninth implementation manner of the second aspect, the processing unit is specifically configured to:
cutting off image content of a first width in a horizontal direction at a first side of the first left view and cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the first left view to obtain the second left view so that a ratio of a length of the second left view in the horizontal direction to the width in the vertical direction is consistent with the first left view;
cutting off image content of a first width in a horizontal direction at a second side of the first right view and cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the first left view to obtain the second right view, wherein a ratio of a length of the second right view in the horizontal direction to a width of the second right view in the vertical direction is consistent with the first right view;
the first width is equal to the parallax adjustment offset, the first side is one of the left side and the right side, the second side is the other of the left side and the right side, the third side is one of the upper side and the lower side, the second side is the other of the upper side and the lower side, and the first left view and the first right view cut off image content in the vertical direction at the same side.
With reference to the second aspect or any one of the first to fifth implementation manners of the second aspect, in a tenth implementation manner of the second aspect, the processing unit is specifically configured to:
cutting out image content of a first width in a horizontal direction at a first side of the first left view to obtain a fifth left view;
cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the fifth left view to obtain the second left view so that a ratio of a length of the second left view in a horizontal direction to a width of the second left view in a vertical direction is consistent with the first left view;
and
cutting off image content of a first width in a horizontal direction at a second side of the first right view to obtain a sixth right view;
cutting off image content of a second width in the vertical direction at a third side and/or a fourth side of the sixth right view to obtain the second right view, wherein the ratio of the length of the second right view in the horizontal direction to the width of the second right view in the vertical direction is consistent with the first right view;
the first width is equal to the parallax adjustment offset, the first side is one of the left side and the right side, the second side is the other of the left side and the right side, the third side is one of the upper side and the lower side, the second side is the other of the upper side and the lower side, and the sixth left view and the sixth right view have the same side from which the image content in the vertical direction is cut off.
With reference to the second aspect, in an eleventh implementation manner of the second aspect, the display unit includes:
a synthesizing module, configured to synthesize the second left view and the second right view into a second stereoscopic image;
and the imaging module is used for carrying out naked eye three-dimensional display by utilizing the second three-dimensional image so as to realize three-dimensional imaging.
In a third aspect, an embodiment of the present invention provides a stereoscopic display device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a stereoscopic imaging processing method as described above.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where computer-executable instructions are stored, and the computer-executable instructions are configured to enable a computer to execute the stereo imaging processing method as described above.
In a fifth aspect, the present invention also provides a computer program product, where the computer program product includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions, which, when executed by a computer, make the computer execute the stereo imaging processing method as described above.
The embodiment of the invention has the beneficial effects that: different from the prior art, in the stereoscopic imaging processing method and apparatus and the stereoscopic display device provided in the embodiments of the present invention, after the first left view and the first right view are obtained, spatial position information of an object in the first left view and the first right view, that is, spatial position information of the object relative to a stereoscopic camera that captures the first left view and the first right view, is first determined, based on the spatial position information, a parallax adjustment offset is determined, based on the parallax adjustment offset, the first left view and the first right view are subjected to a misalignment clipping process, and a second left view and a second right view are obtained, so that pixel points at the same position in the first left view and the first right view are horizontally misaligned in the second left view and the second right view by a distance of the parallax adjustment offset, that is, the parallax between the second left view and the second view is increased relative to the parallax between the first left view and the first right view, the parallax adjustment offset is horizontally offset by a distance of the parallax adjustment offset, and the parallax between the second left view and the first right view is increased The parallax adjustment offset is increased or decreased, and further, stereoscopic imaging is performed according to the second left view and the second right view, so that the concave-convex stereoscopic display effect presented by the stereoscopic image can be changed, a good stereoscopic display effect for a user is provided, the condition that the eyes of the user feel uncomfortable when watching the stereoscopic image is avoided, the viewing demand of the user is met, and the viewing experience of the user is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below. It is obvious that the drawings described below are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a schematic flow chart of a stereo imaging processing method according to an embodiment of the present invention;
FIG. 2 is an exemplary illustration of a first left side view and a first right side view provided by a first embodiment of the invention;
FIG. 3 is an exemplary illustration of a second left side view and a second right side view provided by embodiment one of the present invention;
fig. 4 is a schematic flow chart of another stereoscopic imaging processing method according to the second embodiment of the present invention;
fig. 5 is an exemplary schematic diagram of a third left view area and a third right view area provided by the second embodiment of the present invention;
fig. 6 is an exemplary schematic diagram of a second left view and a second right view provided by the second embodiment of the present invention;
fig. 7 is a schematic structural diagram of a stereoscopic imaging processing apparatus according to a third embodiment of the present invention; and the number of the first and second groups,
fig. 8 is a schematic structural diagram of a stereoscopic display device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be noted that, if not conflicted, the various features of the embodiments of the invention may be combined with each other within the scope of protection of the invention. Additionally, while functional block divisions are performed in apparatus schematics, with logical sequences shown in flowcharts, in some cases, steps shown or described may be performed in sequences other than block divisions in apparatus or flowcharts. In addition, the words "first", "second", "third", "fourth", and the like, when used herein, do not denote any order of importance, but rather denote any order of importance, such that the functions and acts are substantially the same.
In recent years, stereoscopic display technologies such as 3D, VR have been a research focus in the display field, and are widely used in many fields such as advertisement, games, movie and television, and science and technology. With the development of stereoscopic display technology, people also put higher demands on the viewing experience of stereoscopic content. Particularly, in the fields of video and games with high requirements for visual impact, in order to pursue the negative parallax display effect of the object image or the portrait protruding out of the display screen, a binocular image is usually captured at a large binocular shooting distance, so that the binocular image obtained by shooting has a large negative parallax value, and the negative parallax stereoscopic display effect that the shooting object is very close to the eyes of the user can be created when the binocular image is presented.
However, in daily life, if the human eye is very close to the observation object, the human eye feels a very large intraocular pressure and a very unnatural feeling when watching the object, so that the human eye has a comfortable observation distance, but the observation comfort zones of each person are different. In addition, in the stereoscopic display technology, when pictures obtained by stereoscopic shooting include real scene images and virtual scene images and stereoscopic display is performed by using a stereoscopic display device, an actual stereoscopic effect formed in human eyes is not necessarily optimal. Therefore, different viewing effects can be obtained when the same stereo image is displayed on different stereo display devices, even when the same stereo image is displayed on the same stereo display device but experienced by different users. For example, the stereoscopic effect of the scene may be very prominent, and people may feel very close to the human eyes, in which case, the human eyes may be very uncomfortable. Moreover, the stereoscopic display projects too much image, which is easy to generate crosstalk, and also can affect the effect of the stereoscopic display to a certain extent.
Based on this, the embodiments of the present invention provide a stereo imaging processing method, an apparatus and a stereo display device, wherein before stereo display, spatial position information of a target object in a stereo image, that is, spatial position information of the stereo image relative to a binocular camera, is detected for the stereo image captured by the binocular camera arranged on the stereo display device, and since a distance between the binocular camera and a captured scene can affect a parallax of the captured stereo image and the spatial position information can represent a distance between the binocular camera and the target object, that is, the captured scene, a corresponding parallax adjustment offset can be obtained, and then the stereo image to be displayed is subjected to offset trimming according to the parallax offset, and the parallax of the stereo image is changed by the offset trimming, so that a concave-convex stereo display effect presented by the stereo image can be improved, the stereoscopic display effect is good for the user, the condition that the eyes of the user feel uncomfortable when watching the stereoscopic image is avoided, the impression requirement of the user is met, and the watching experience of the user is improved.
The stereo imaging processing method can be applied to stereo display equipment which is provided with a binocular camera at will to shoot stereo images, such as: the 3D display device, VR glasses, and the like may be specifically a mobile phone, a tablet computer, a personal computer, a stereoscopic display, and the like, and acquires a second left view (i.e., a processed left view) and a second right view (i.e., a processed right view) by performing a misalignment cropping process on an acquired first left view (i.e., an original left view of a certain stereoscopic image) and a first right view (i.e., an original right view of the stereoscopic image), so that pixel points at the same positions in the first left view and the first right view are horizontally misaligned in the second left view and the second right view, which may increase or decrease a parallax between the second left view and the second right view relative to a parallax between the first left view and the first right view, and further perform stereoscopic imaging according to the second left view and the second right view, the concave-convex three-dimensional display effect presented by the three-dimensional image can be changed, so that the impression requirement of a user is met, and the watching experience of the user is improved. In addition, the problem that crosstalk and the like affect the stereoscopic display effect due to the protruding stereoscopic concave-convex effect can be effectively avoided.
The stereo imaging processing method provided by the embodiment of the invention can be applied to various scenes presenting stereo images, such as: when the stereo image is displayed, the parallax of the stereo image can be adjusted according to the stereo imaging processing instruction input by the user, so that the watching requirement of the user on the convex feeling or the concave feeling of the stereo image can be met; or, the method and the device can also be used for performing parallax adjustment on a stereoscopic image or a stereoscopic video according to the parallax tolerance of the stereoscopic display device, so that the stereoscopic display device can present the optimal stereoscopic display effect.
In the embodiment of the present invention, the parallax is a known concept in the stereoscopic display technology, and will not be described in detail here, in brief, the parallax refers to a horizontal difference between object images on the retina of the left and right eyes to a certain extent due to different normal pupil distances and gaze angles, and specifically, the "parallax" refers to a horizontal offset amount between an image of a certain photographic subject in the left view and an image thereof in the right view, if the image of the photographic subject in the left view is horizontally offset to the left with respect to the image thereof in the right view, a positive parallax is formed, and the larger the absolute value of the positive parallax (i.e., the horizontal offset amount thereof) is, the stronger the recessed feeling of the photographic subject is when performing stereoscopic display; if the horizontal offset between the image of the shot object in the left view and the image of the shot object in the right view is zero, zero parallax is formed, and the shot object is positioned on a display screen when stereoscopic display is carried out; if the image of the subject in the left view is horizontally shifted to the right from the image in the right view, a negative parallax is formed, and the greater the absolute value of the negative parallax (i.e., the horizontal shift amount thereof), the greater the sense of saliency of the subject when performing stereoscopic display. In the embodiment of the invention, the concave-convex feeling of the stereo image is adjusted by adjusting the horizontal offset of the image of the shooting object in the left view relative to the image of the shooting object in the right view leftwards or rightwards, so that the watching requirement of a user is met.
Further, it should be noted that: in the embodiment of the present invention, if there is no special description, the value of "parallax" is an actual value, and includes a positive value, zero, and a negative value, when the parallax value of the stereoscopic image is a positive value, a positive parallax display effect is exhibited, and the larger the value is, the stronger the recessed feeling is; when the parallax value of the stereo image is zero, a zero parallax display effect is presented; when the parallax value of the stereoscopic image is a negative value, a negative parallax display effect is exhibited, and the smaller the value is, the stronger the sense of protrusion is. Therefore, in the embodiment of the present invention, when it is necessary to obtain a stronger recessed feeling, the parallax can be increased; when it is necessary to obtain a stronger sense of protrusion, parallax can be reduced.
The embodiments of the present invention will be further explained with reference to the drawings.
Example one
Fig. 1 is a schematic flowchart of a stereoscopic imaging processing method according to an embodiment of the present invention, where the stereoscopic imaging processing method is applied to a stereoscopic display apparatus provided with binocular cameras, that is, stereoscopic cameras.
Specifically, referring to fig. 1, the stereo imaging processing method may include, but is not limited to, the following steps:
110. a first left view and a first right view shot by a binocular camera are obtained.
In this embodiment, a first left view and a first right view captured by the binocular camera are acquired in this step, respectively. For example, a user uses a stereoscopic display device to photograph a certain scene facing the user to obtain a first left view and a first right view, and the user uses the stereoscopic display device to self-photograph to obtain self-photographed images including the first left view and the first right view.
The first left view and the second right view may be existing, i.e., pre-stored, or may be acquired in real time and currently acquired by stereo shooting.
The first left view and the first right view are both composed of a plurality of pixel points regularly arranged along the horizontal direction and the vertical direction, and the "pixel point" refers to the minimum unit of the image, so that the position of the image content in the first left view or the first right view can be represented by the position of the pixel point corresponding to the image content. In this embodiment, the first left view and the first right view have corresponding pixels, that is, pixels at the same position, that is, "corresponding pixels" refers to a pair of pixels located at the same position when the first left view and the first right view are overlapped, that is, "corresponding pixels" are pixels at the same position in the first left view and the first right view. Generally speaking, because the two pixels are stereo images, there is parallax between the two pixels, and the image contents, i.e., the pixel values, are different. Of course, the image contents in the two pixel points may be the same or different, and if the image contents in the two pixel points are the same, it may be said that the parallax of the point between the first left view and the first right view is 0, and if the image contents in the two pixel points are different, it may be said that the parallax of the point between the first left view and the first right view is not 0.
For example: as shown in fig. 2, fig. 2(a) is a first left view of a stereoscopic image, which is composed of regularly arranged pixel regions a, b, c, d, e, f, g, h, i, j, k and m; to facilitate understanding, the pixel region is described as including one pixel. Fig. 2(b) is a first right view of the stereoscopic image, which is composed of A, B, C, D, E, F, G, H, I, J, K and M; when the first left view and the first right view are overlapped, as shown in fig. 2(c), the pixel points a-A, b-B, c-C, d-D, e-E, f-F, g-G, h-H, i-I, j-J, K-K and M-M are respectively located at the same position, so that the pixel point a and the pixel point a are "corresponding pixel points" (or called, pixel points at the same position in the first left view and the first right view), and similarly, b-B, c-C, d-D, e-E, f-F, g-G, h-H, i-I, j-J, K-K and M-M are also "corresponding pixel points". It should be understood that in practical applications, the first left view and the first right view may be formed by more pixels, and the resolution of the view is generally characterized by the number of pixels in the horizontal direction and the number of pixels in the vertical direction in the view, such as: if the view has 1920 pixels in the horizontal direction and 1080 pixels in the vertical direction, the resolution of the view is 1920 × 1080.
Alternatively, in practical applications, the stereoscopic display device may acquire the first left view and the first right view of a certain stereoscopic image when receiving a "stereoscopic imaging processing instruction" for adjusting the parallax of the stereoscopic image. The stereo image may be an existing one or may be obtained by performing stereo shooting at present. The "stereoscopic imaging processing instruction" may be issued autonomously by the stereoscopic display device, such as: when the stereo display device judges that the maximum negative parallax value (the absolute value of the minimum parallax value of the stereo image) or the maximum positive parallax value of the stereo image exceeds the parallax tolerance, the stereo imaging processing instruction is automatically triggered to increase or reduce the parallax of the stereo image, so that the stereo image can present the best display effect in the stereo display device. Alternatively, the "stereoscopic imaging processing instruction" may be issued by the user, such as: when a user watches a certain stereoscopic image, the user needs to adjust the concave-convex display effect of the stereoscopic image, and can input a stereoscopic imaging processing instruction to the stereoscopic display device in any mode.
120. Spatial position information of the object in the first left view and the first right view is determined.
After the first left view and the first right view are acquired, in this step, spatial position information of the first left view and the first right view is determined, specifically, the spatial position information is spatial position information of a binocular camera corresponding to a target object in a scene shot by the binocular camera, and can be used for representing a distance from the target object to the binocular camera during shooting, that is, a shooting distance of the binocular camera. Specifically, the spatial position information includes a distance between the target object and the binocular camera.
As known to those skilled in the art, the distance between the binocular cameras and the shooting distance of the binocular cameras may affect the parallax of the captured stereoscopic image, i.e., the parallax of the first left view and the first right view, so that for the stereoscopic display device, the distance between the binocular cameras is fixed, and therefore, the parallax of the captured stereoscopic image is substantially determined by the shooting distance, and therefore, whether the parallax of the target object is reasonable, i.e., whether the parallax of the stereoscopic image is reasonable, whether a good stereoscopic display effect can be provided, and the like, may be preliminarily determined according to the shooting distance. Based on this, in the embodiment of the present invention, the spatial position information of the target relative to the binocular camera is determined, and the parallax adjustment offset of the stereoscopic image is determined based on the spatial position information, so that the concave-convex stereoscopic display effect presented by the stereoscopic image is changed, a good stereoscopic display effect is provided for the user, a situation that the eyes of the user feel uncomfortable when watching the stereoscopic image is avoided, the viewing demand of the user is met, and the viewing experience of the user is improved.
The target object is not limited, and may specifically be a photographic subject in the first left view and the first right view, such as a person, a part of the person, an article, a special marker (an article intentionally placed in the photographic scene to mark a photographic distance, such as a sphere, a number plate, a ruler, a label with a pattern, and the like). Because the spatial position information of the target object needs to be determined, objects which are easy to accurately acquire the spatial position information can be selected as the target object according to a specific application scene. For example, for a self-timer scene, i.e. a stereo image of a person shot by a user using a self-timer function, the person in the stereo image, or a part of the person, may be used as a target object, such as the eyes of the person.
Specifically, there may be several ways to determine the spatial position information of the target object in the first left view and the first right view, for example, there may be the following two ways:
firstly, a depth map corresponding to a first left view and a first right view is obtained, then depth information of a target object in the first left view and the second left view is determined according to the depth map, and the depth information of the target object can be read from the depth map because the depth map and the first left view and the first right view have a corresponding relation, and spatial position information of the target object is determined based on the depth information.
The depth map may be acquired by any method capable of acquiring a depth map in the prior art. For example, a stereo matching algorithm, such as a spsstereo algorithm, may be used to obtain depth maps corresponding to the first left view and the first right view. In addition, the depth maps corresponding to the first left view and the first right view provided by the ranging hardware can be acquired from the ranging hardware. The stereoscopic display device may be additionally provided with ranging hardware, for example, infrared ranging, laser ranging, light sensing ranging, ultrasonic ranging, structured light ranging, an RGBD depth camera of a Kinect or a Kinect-like, and the ranging hardware may provide a depth map or depth information of each position point in a shooting scene, and thus, the depth maps, i.e., the depth information, corresponding to the first left view and the first right view may be obtained from the ranging hardware.
Secondly, according to one of the first left view and the second right view, image position information, namely pixel coordinates, of the target object in the view can be determined, and then coordinate transformation is carried out by utilizing the image position information and internal and external parameters of the corresponding binocular camera, so that the space position information of the target object can be obtained. For example, when the target object is a human eye, face recognition may be performed first, a human face region in the first left view and/or the first right view is determined, then, a known face alignment algorithm is used to detect a human face feature point of the human face region, an image position of the human eye in the first left view and/or the first right view, that is, a pixel coordinate is determined according to a position of the detected human face feature point, and then, spatial position information of the human eye may be obtained through coordinate transformation.
Of course, two views, namely, the first left view and the first right view, may be used, the image position information of the target object in the two views is determined first, and the spatial position information of the target object may be obtained by performing coordinate transformation using the image position information and the internal and external parameters of the corresponding binocular camera in one manner, and the spatial position information of the target object may be determined according to the image positions of the target object in the two views and the parallax of the target object in the two views in another manner.
130. And determining the parallax adjustment offset corresponding to the spatial position information of the target object according to the spatial position information of the target object and the preset corresponding relation between the spatial position information and the parallax adjustment offset.
In the embodiment of the present invention, the corresponding relationship between the spatial position information and the parallax adjustment offset may be established in advance, that is, the corresponding relationship between the spatial position information and the parallax adjustment offset may be preset through experiments, theoretical operations, or the like, or a combination of the two methods.
For the spatial position information of the target object in the partial section, the parallax between the first left view and the first right view is reasonable, and a good stereoscopic display effect can be provided, and the parallax adjustment offset corresponding to the spatial position information of the section can be set to 0, that is, the parallax adjustment of the first left view and the first right view is not required.
Specifically, an experimental scene can be set up for a binocular camera arranged on the stereoscopic display device, the binocular camera is used for shooting to shoot, then the stereoscopic effect of the stereoscopic display device is watched on the stereoscopic display device, the parallax is adjusted according to the required target effect, namely, the parallax adjustment offset is set, the adjusted numerical value is recorded, and by analogy, the incidence relation between the positions of a plurality of typical shooting positions and the parallax adjustment offset is recorded. In this step, that is, in a real actual use process, the obtained spatial position information is used as an input of query, a parallax adjustment offset corresponding to the spatial position information is searched in the association relationship, and if a value of the spatial position information is between typical position points distance1, distance2 in the association relationship, a linear interpolation mode may be adopted to calculate the parallax adjustment offset corresponding to the spatial position information, so as to use the parallax adjustment offset as a value of subsequent dislocation cutting.
To give a specific example, such as: for the following shooting distance distances (i.e., spatial location information): distance {300,350,400,450,500,550,600,650,700}, the corresponding parallax adjustment offset is: pixValues ═ {40,30,22,16,10,7,5,1,0 }; when the acquired shooting distance d is between two values in the distance, a linear interpolation method may be used to determine a parallax adjustment offset corresponding to d, where d1 is written, d2 is a preset distance interval value, p1 and p2 are d1, and a parallax adjustment offset corresponding to d2 may be according to the following formula:
therefore, the following steps are carried out:
wherein newp is the parallax adjustment offset. Assuming d 340, d1 300, d2 350, p1, and p2 are 30 and 40.
Specifically, an experimental scene may be set up for a binocular camera provided in the stereoscopic display device, the binocular camera is used for photographing, the stereoscopic effect of the stereoscopic display device is viewed, the parallax is adjusted according to a required target effect, that is, a parallax adjustment offset is set, an adjusted numerical value is recorded, and so on, positions of a plurality of typical photographing positions and the parallax adjustment offset are recorded, then, based on the positions and the parallax adjustment offsets, function fitting is performed to obtain a functional relationship between the parallax offset and the spatial position information, in this step, that is, in a real actual use process, the obtained spatial position information is used as an input and substituted into the functional relationship, so that the parallax adjustment offset corresponding to the spatial position information is obtained.
140. And carrying out dislocation cropping processing on the first left view and the first right view according to the parallax adjustment offset to obtain a second left view and a second right view.
In the present embodiment, the "second left view" refers to a view obtained by subjecting the first left view to the offset clipping processing, and the "second right view" refers to a view obtained by subjecting the first right view to the offset clipping processing, the second left view and the second right view being used for synthesizing a target stereoscopic image of the stereoscopic display apparatus. The second left view and the second right view have the same resolution (number of pixels), but pixels at the same position in the first left view and the first right view (i.e., "corresponding pixels" as above) are horizontally displaced in the second left view and the second right view, so that the parallax between the second left view and the second right view is increased or decreased by the horizontally displaced distance relative to the parallax between the first left view and the first right view. The horizontal offset distance is the parallax adjustment offset, i.e. the variable of parallax,
according to the stereoscopic display technology, the concave-convex display effect of the stereoscopic image is determined by the parallax of the stereoscopic image, and the parallax of the stereoscopic image refers to the horizontal offset between the image of a certain shooting object in the left view and the image of the certain shooting object in the right view when the left view and the right view of the stereoscopic image are overlapped or arranged side by side up and down. Since the position of the image content in the first left view or the first right view can be represented by the position of the pixel corresponding to the image content, in the embodiment of the present invention, the parallax change amount can be expressed by the distance that the "corresponding pixel point" (pixel point at the same position) in the first left view and the first right view is horizontally shifted in the second left view and the second right view, where the "parallax change amount" is the difference between the parallax value of the target stereoscopic image (i.e., the parallax between the second left view and the second right view) and the parallax value of the original stereoscopic image (i.e., the parallax between the first left view and the first right view).
Specifically, in this embodiment, the specific implementation of performing the offset clipping process on the first left view and the first right view according to the parallax adjustment offset amount to obtain the second left view and the second right view may be that:
cutting out image content with a first width in the horizontal direction at a first side of the first left view to obtain a second left view; and cutting out image content with a first width in the horizontal direction on a second side of the first right view to obtain a second right view.
Wherein the "first width" is equal to the parallax adjustment offset amount.
Wherein the "first side" is one of the left side and the right side, and the "second side" is the other of the left side and the right side, that is, if the first side is the left side, the second side is the right side; and if the first side is the right side, the second side is the left side.
Wherein if a second left view is obtained by cutting out image content of a first width in the horizontal direction on the left side of the first left view and a second right view is obtained by cutting out image content of a first width in the horizontal direction on the right side of the first right view, then the obtained parallax between the second left view and the second right view is increased by the first width relative to the parallax between the first left view and the first right view.
If a second left view is obtained by cutting off image content of a first width in the horizontal direction on the right side of the first left view and a second right view is obtained by cutting off image content of the first width in the horizontal direction on the left side of the first right view, then the obtained disparity between the second left view and the second right view is reduced by the first width relative to the disparity between the first left view and the first right view.
In practical applications, the stereoscopic display device may determine a first width to be cut according to the parallax adjustment offset, and further determine, according to the parallax adjustment direction corresponding to the parallax adjustment offset, the left side of the first left view and the right side of the first right view (corresponding to increasing parallax), or cut off the image content of the first width in the horizontal direction on the right side of the first left view and the left side of the first right view (corresponding to decreasing parallax), so as to obtain the second left view and the second right view.
For example: when performing disparity adjustment on the first left view and the first right view shown in fig. 2, it is assumed that the determined disparity adjustment offset is a distance of 1 pixel point.
If for increasing the parallax error, cut off 1 pixel point apart from the corresponding image content along the horizontal direction in the left side of first left side view, promptly: cutting off image contents corresponding to the pixel points a, b and c, thereby obtaining a second left view as shown in fig. 3 (a); cut out the image content that 1 pixel point distance corresponds at the right side of first right side view, promptly: the image content corresponding to pixel point J, K and M is cut out, resulting in a second right view as shown in fig. 3 (b). As can be seen from comparing fig. 3(a) and 3(b), the pixel point "D-D" at the same position in the first left view and the first right view is horizontally shifted by a distance of 1 pixel point in the second left view (fig. 3(a)) and the second right view (fig. 3(b)), and when the second left view and the second right view are overlapped, the pixel point D is shifted to the left with respect to the pixel point D, so that the parallax between the second left view and the second right view is increased by the distance of 1 pixel point with respect to the parallax between the first left view and the first right view.
If the parallax is reduced, cutting off the image content corresponding to the distance of 1 pixel point on the right side of the first left view along the horizontal direction, namely: cutting off image contents corresponding to the pixel points j, k and m, thereby obtaining a second left view as shown in fig. 3 (c); cut out the image content that 1 pixel point distance corresponds at the left side of first right side view, promptly: the image content corresponding to pixel point A, B and C is cut out, resulting in a second right view as shown in fig. 3 (d). As can be seen from comparing fig. 3(c) and 3(D), the pixel point "D-D" at the same position in the first left view and the first right view is horizontally shifted by a distance of 1 pixel point in the second left view (fig. 3(c)) and the second right view (fig. 3(D)), and when the second left view and the second right view are overlapped, the pixel point D is shifted to the right with respect to the pixel point D, so that the parallax between the second left view and the second right view is reduced by the distance of 1 pixel point with respect to the parallax between the first left view and the first right view.
In addition, after the first left view and the first right view are subjected to the staggered cropping processing, the number of pixel points of the second left view and the second right view in the horizontal direction is reduced, so that in some application scenes, if the stereoscopic image after the stereoscopic imaging processing is displayed through the same stereoscopic display device, the stereoscopic image after the stereoscopic imaging processing seen by a user is widened in the horizontal direction relative to the original stereoscopic image.
Based on this, in some embodiments, the specific implementation manners of performing the offset cropping processing on the first left view and the first right view according to the parallax adjustment offset to obtain the second left view and the second right view may further include, but are not limited to, the following three types:
(1) in a first embodiment, image content with a first width in a horizontal direction may be cut at a first side of the first left view to obtain a fourth left view, and pure color pictures may be stitched at the first side and/or a second side of the fourth left view to obtain the second left view, so that the size of the second left view is consistent with the first left view; meanwhile, image content with a first width in the horizontal direction is cut at the second side of the first right view to obtain a fourth right view, and pure-color pictures are horizontally spliced at the first side and/or the second side of the fourth right view to obtain the second right view, so that the size of the second right view is consistent with that of the first right view.
Wherein the first width is equal to the parallax adjustment offset, the first side is one of a left side and a right side, and the second side is the other of the left side and the right side. Specifically, the manner of acquiring the "fourth left view" and the "fourth right view" may refer to the description in the above embodiments, and will not be described in detail here.
In this embodiment, the pure color picture is spliced on the same side of the fourth left view and the fourth right view. For example, a pure color picture with the same size as the cut-out image content is spliced on the left side of the fourth left view and the fourth right view; or splicing pure color pictures with the same size as the cut-out image content on the right sides of the fourth left view and the fourth right view; or splicing pure color pictures on the left side and the right side of the fourth left view and the fourth right view, wherein the total area of the pure color pictures is consistent with the size of the cut-out image content. In some embodiments, in order to present a better stereoscopic display effect, pure color pictures of the same size are respectively spliced on the left side and the right side of the fourth left view and the fourth right view, and the length of the pure color pictures in the horizontal direction is half of the first width. The pure color picture may be any color, and preferably, in order to avoid interference of the pure color picture with the stereoscopic image and thus reduce the viewing experience of the user, the color of the pure color picture is black in this embodiment.
Thus, the second left view and the second right view obtained in the above manner can make the size and aspect ratio of the image content in the stereoscopic image after the stereoscopic imaging process coincide with those of the original stereoscopic image.
(2) In a second embodiment, the second left view may be obtained by cutting out image content of a first width in a horizontal direction at a first side of the first left view and cutting out image content of a second width in a vertical direction at a third side and/or a fourth side of the first left view, such that a ratio of a length of the second left view in the horizontal direction to the width in the vertical direction is consistent with the first left view; simultaneously, cutting off image content of a first width in a horizontal direction at a second side of the first right view and cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the first left view to obtain the second right view, wherein the ratio of the length of the second right view in the horizontal direction to the width in the vertical direction is consistent with the first right view;
wherein the first width is equal to the parallax adjustment offset, the first side is one of a left side and a right side, and the second side is the other of the left side and the right side. In particular, the manner of performing offset trimming on the first left view and the first right view in the horizontal direction can also refer to the description of the above embodiments, and is not further detailed here.
Wherein the second width is a cut width in a vertical direction, and the second width may be determined according to the first width and a length-width ratio of a length of the first left view/the second left view in a horizontal direction to a width in the vertical direction.
Wherein the third side is one of an upper side and a lower side, the fourth side is the other of the upper side and the lower side, and the first left view and the first right view cut off image content in a vertical direction on the same side. For example, image content of a second width in the vertical direction is cut off at the upper side of the first left view and the first right view; or, cutting off image content of a second width in the vertical direction at the lower side of the first left view and the first right view; or, image contents of the same width in the vertical direction are cut out at both upper and lower sides of the first left view and the first right view, and the total width cut out in the vertical direction is equal to the second width.
(3) In the third embodiment, image content of a first width in a horizontal direction may be cut at a first side of the first left view to obtain a fifth left view; cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the fifth left view, obtaining the second left view so as to make a ratio of a length of the second left view in a horizontal direction to a width in a vertical direction consistent with the first left view; and, cutting out image content of a first width in a horizontal direction at a second side of the first right view to obtain a fifth right view; and cutting off image content with a second width in the vertical direction at a third side and/or a fourth side of the fifth right view to obtain the second right view, wherein the ratio of the length of the second right view in the horizontal direction to the width in the vertical direction is consistent with the first right view.
The first width is equal to the parallax adjustment offset, the first side is one of the left side and the right side, the second side is the other of the left side and the right side, the third side is one of the upper side and the lower side, the second side is the other of the upper side and the lower side, and the fifth left view and the fifth right view have the same side from which image content in the vertical direction is cut off.
Wherein this embodiment (3) is substantially the same as the above embodiment (2), except that in embodiment (2), the first left view and the first right view are cut out in both the horizontal direction and the vertical direction to obtain the second left view and the second right view; in the embodiment (3), the first left view and the first right view are cut in the horizontal direction to obtain the fifth left view and the fifth right view, and the fifth left view and the fifth right view are cut in the vertical direction to obtain the second left view and the second right view.
By obtaining the second left view and the second right view in the above-described embodiment (2) or (3), it is possible to keep the aspect ratio of the image content in the stereoscopic image consistent with the original stereoscopic image without introducing other pictures.
150. And carrying out stereoscopic imaging according to the second left view and the second right view.
In this embodiment, after the second left view and the second right view are obtained by cutting the first left view and the first right view, the second left view is presented to the left eye of the user for viewing through the stereoscopic display device, and the second right view is presented to the right eye of the user for viewing, so that stereoscopic imaging is realized.
Or, in some other embodiments, if the stereoscopic display device is an autostereoscopic display device, after a second left view and a second right view are obtained by cutting the first left view and the first right view, the second left view and the second right view may be synthesized into a second stereoscopic image (the second stereoscopic image is the "target stereoscopic image" in this embodiment), and then the second stereoscopic image is used for autostereoscopic display, so as to implement stereoscopic imaging.
According to the technical scheme, the embodiment of the invention has the beneficial effects that: in the stereo imaging processing method provided by the embodiment of the present invention, after a first left view and a first right view are acquired, a second left view and a second right view are acquired by performing a misalignment cropping process on the first left view and the first right view, so that pixel points at the same positions in the first left view and the first right view are horizontally misaligned in the second left view and the second right view, and a parallax between the second left view and the second right view is increased or decreased relative to a parallax between the first left view and the first right view, and further, stereo imaging is performed according to the second left view and the second right view, so that a concave-convex stereo display effect presented by a stereo image can be changed, a good stereo display effect for a user is provided, and a situation that the user feels uncomfortable when the user watches the stereo image is avoided, therefore, the viewing demand of the user is met, and the viewing experience of the user is improved.
Example two
In other application scenarios, in order that neither the size of the stereoscopic image and the proportion of the image content viewed by the user changes after the stereoscopic imaging process is performed, when the stereoscopic image is displayed, the stereoscopic display device does not use the original sizes of the first left view and the first right view, but intercepts a part of the content (i.e., the view in the "third left view region" in the first left view and the view in the "third right view region" in the first right view) and presents the part of the content to the user for viewing, and when the stereoscopic imaging process is required, re-intercepts the image content in the original left view and the original right view to form a new left view and a new right view with the same sizes as the currently displayed left view and right view. Therefore, through the stereo imaging processing, the size and the proportion of the displayed stereo image are not changed, and the watching experience of a user is not influenced.
Specifically, a part of content may be intercepted according to a preset parallax adjustment range, that is, the size and the proportion of an image area to be displayed to a user are determined, and if the parallax adjustment range is 40 pixels, an area outside the left and right reserved areas of the first left and right view, after 40 pixels, may be a third left and right view area. The "preset parallax adjustment range" may be a fixed preset value, or may be a value that changes adaptively to different actual conditions, such as: when the presented shooting scene is a long shot, the parallax adjustment range is increased, and when the presented shooting scene is a short shot, the parallax adjustment range is decreased.
Based on the application scenario, the present embodiment provides another stereo imaging processing method. Fig. 4 is a schematic flowchart of another stereo imaging processing method according to a second embodiment of the present invention, where the difference between this embodiment and the embodiment shown in fig. 1 is step 140, and other steps refer to the foregoing embodiments, which are not described herein again, and refer to fig. 4, where the stereo imaging processing method may include, but is not limited to, the following steps:
410. a first left view and a first right view shot by a binocular camera are obtained.
420. Determining spatial location information of the object in the first left view and the first right view.
430. And determining the parallax adjustment offset corresponding to the spatial position information of the target object according to the spatial position information of the target object and the preset corresponding relation between the spatial position information and the parallax adjustment offset.
440. And acquiring a third left view area in the first left view and a third right view area in the first right view.
In this embodiment, the left view and the right view that the stereoscopic display device needs to present to the user for viewing are respectively views in partial view areas having the same size in the acquired first left view and the acquired first right view, where the "third left view area" is a view area where the left view that the stereoscopic display device needs to present to the user for viewing is located in the first left view; the "third right view area" is a view area where, in the first right view, the stereoscopic display device needs to be presented to the user where the right view is viewed.
In this step, the acquired third left view region and the third right view region have the same position in the first left view and the second left view, that is, when the first left view and the first right view are overlapped, the third left view region and the third right view region are overlapped, and the parallax between the views of the third left view region and the third right view region is equal. For example, assuming that the first left view is shown in fig. 2(a), the first right view is shown in fig. 2(b), and the first left view and the first right view are overlapped and then shown in fig. 2(c), in this embodiment, the third left view region may be formed by the pixels e, f, h, and I in the first left view as shown in fig. 5(a), and the third right view region may be formed by the pixels E, F, H and I in the first right view as shown in fig. 5 (b).
When the third left view region and the third right view region do not coincide but are horizontally offset from each other when the first left view and the first right view are superimposed, the disparity of the stereoscopic image presented to the user for viewing in this case increases or decreases the disparity adjustment offset relative to the disparity between the first left view and the first right view. Accordingly, the parallax may be adjusted by the horizontal shift of the third left-view region and the third right-view region.
In practical applications, when a stereoscopic imaging processing instruction is received, in addition to the first left view and the first right view captured by the binocular camera, an initial view region (i.e., the third left view region) of the left view currently presented to the user in the first left view, i.e., a position of the region, and an initial view region (i.e., the third right view region) of the right view currently presented to the user in the first right view may be obtained.
450. Translating the third left-view region in a first horizontal direction by a first distance in the first left-view, obtaining a view within the translated third left-view region in the first left-view as a second left-view; and translating the third right view region by a second distance in a second horizontal direction opposite to the first horizontal direction in the first right view, the translated view within the third right view region being acquired in the first right view as a second right view.
In the present embodiment, the "first horizontal direction"/the "second horizontal direction" includes horizontal leftward and horizontal rightward. The specific direction is determined by the parallax adjustment direction: when the parallax is required to be increased, the first horizontal direction is horizontal leftward, and the second horizontal direction is horizontal rightward; when the parallax is required to be reduced, the first horizontal direction is horizontal rightward, and the second horizontal direction is horizontal leftward.
The "first distance" refers to a distance that a corresponding pixel point in the first left view is horizontally displaced in a corresponding view (i.e., a left view currently presented to a user) before the translation of the third left view region and a corresponding view (i.e., a second left view) after the translation of the third left view region; the "second distance" refers to a distance that a corresponding pixel point in the first right view is horizontally displaced in a view (i.e., a right view currently presented to a user) corresponding to the third right view region before the third right view region is translated and a view (i.e., a second right view) corresponding to the third right view region after the third right view region is translated, and thus, a sum of the first distance and the second distance is a parallax adjustment offset, that is, a distance that a pixel point at the same position in the first left view and the first right view is horizontally displaced in the second left view and the second right view.
For example, the following steps are carried out: when disparity adjustment is performed on the first left view and the first right view as shown in fig. 2, it is assumed that a third left view region currently presented to the user is as shown in fig. 5(a) and a third right view region is as shown in fig. 5 (b).
At this time, if the parallax is increased, and the determined parallax adjustment value is the distance of 1 pixel. Then, in the first left view, the third left view region is translated leftward by the distance of 1 pixel point, and the view in the translated third left view region is obtained in the first left view as the second left view (as shown in fig. 6 (a)), and since the "first distance" (the distance of 1 pixel point) is equal to the parallax adjustment value, the view in the third right view region (i.e., the currently presented right view) may be directly used as the second right view without translating the third right view region; alternatively, the view in the third left-view region (i.e., the currently presented left view) may be used as the second left view, the third right-view region is shifted to the right by a distance of 1 pixel point in the first right view, and the shifted view in the third right-view region is obtained as the second right view in the first right view (as shown in fig. 6 (b)).
If the parallax is reduced, and the determined parallax adjustment value is the distance of 1 pixel point. Then, in the first left view, the third left view region is translated rightward by the distance of 1 pixel point, and the view in the translated third left view region is obtained in the first left view as the second left view (as shown in fig. 6 (c)), and since the "first distance" (the distance of 1 pixel point) is equal to the parallax adjustment value, the third right view region may not be translated, and the view in the third right view region (i.e., the currently presented right view) is directly taken as the second right view; alternatively, the view in the third left-view region (i.e., the currently presented left view) may be used as the second left view, the third right-view region is shifted to the left by a distance of 1 pixel point in the first right view, and the shifted view in the third right-view region is obtained as the second right view in the first right view (as shown in fig. 6 (d)).
It should be understood that the above-mentioned exemplary embodiments are only for purposes of explaining the embodiments of the present invention, and are not intended to limit the embodiments of the present invention. In practical applications, the first left view and the first right view include more pixel points, and therefore, there are many ways to intercept the second left view from the first left view and intercept the second right view from the first right view, and as long as the pixel points at the same positions in the left view and the right view currently presented to the user are horizontally displaced in the second left view and the second right view, so that the parallax between the second left view and the second right view is increased or decreased relative to the parallax between the left view and the right view currently presented to the user, and the parallax adjustment offset is included in the protection scope claimed in the embodiment of the present invention.
460. And carrying out stereoscopic imaging according to the second left view and the second right view.
According to the technical scheme, the embodiment of the invention has the beneficial effects that: obtaining a translated view within a third left-view region in the first left-view as a second left-view in the first left-view by obtaining the third left-view region in the first left-view, translating the third left-view region in the first left-view by a first distance in a first horizontal direction; and acquiring a third right view area in the first right view, translating the third right view area in the first right view along a second horizontal direction opposite to the first horizontal direction by a second distance, and acquiring a view in the translated third right view area in the first right view as a second right view, so that a stereoscopic image with the same size and proportion as the original image can be presented while parallax adjustment of the stereoscopic image is realized, and viewing experience of a user is not influenced.
EXAMPLE III
Fig. 7 is a schematic structural diagram of a stereo imaging processing apparatus according to a third embodiment of the present invention, please refer to fig. 7, wherein the apparatus 70 includes, but is not limited to: a first acquisition unit 71, a first determination unit 74, a second determination unit 75, a processing unit 72, and a display unit 73.
The first acquiring unit 71 is configured to acquire a first left view and a first right view captured by the binocular camera.
A first determining unit 74 for determining spatial position information of the object in the first left view and the first right view;
a second determining unit 75, configured to determine a parallax adjustment offset corresponding to the spatial position information of the target object according to the spatial position information of the target object and a preset correspondence between the spatial position information and the parallax adjustment offset;
the processing unit 72 is configured to perform misalignment cropping processing on the first left view and the first right view according to a parallax adjustment offset to obtain a second left view and a second right view, so that pixel points at the same positions in the first left view and the first right view are horizontally misaligned in the second left view and the second right view, and thus the parallax between the second left view and the second right view is increased or decreased by the parallax adjustment offset relative to the parallax between the first left view and the first right view.
A display unit 73, configured to obtain a parallax-adjusted stereoscopic image according to the second left view and the second right view.
Wherein, in some embodiments, the first determining unit 74 comprises:
the first acquisition module is used for acquiring the depth maps corresponding to the first left view and the first right view;
a first determining module, configured to determine depth information of a target object in the first left view and the second left view according to the depth map;
the second determining module is used for determining the spatial position information of the target object according to the depth information of the target object;
specifically, the first obtaining module is specifically configured to:
acquiring a depth map corresponding to the first left view and the first right view provided by the ranging hardware from the ranging hardware;
or
And acquiring the depth maps corresponding to the first left view and the first right view by using a stereo matching algorithm.
Wherein, in some embodiments, the first determining unit 74 comprises:
a third determining module, configured to determine image position information of the target object in the first left view and/or the first right view;
and the fourth determining module is used for determining the spatial position information of the target object according to the image position information of the target object.
Specifically, the target object is a human eye; the third determining module is specifically configured to:
determining a face region in the first left view and/or the first right view;
detecting human face characteristic points of the human face area by using a human face alignment algorithm;
determining the position of the human eye in the first left view and/or the first right view according to the position of the detected human face feature point.
In some embodiments, the second determination unit 75 includes:
the query module is used for querying a preset offset database by taking the spatial position information of the target object as an index to acquire a parallax adjustment offset corresponding to the spatial position information;
or
And the calculation module is used for substituting the spatial position information of the target object into a preset functional relation between the parallax offset and the spatial position information to acquire the parallax adjustment offset corresponding to the spatial position information.
Specifically, the calculation module is specifically configured to:
acquiring a parallax adjustment offset amount corresponding to the spatial position information by the following formula:
wherein newp is a parallax adjustment offset amount, d is spatial position information of the object, d1 and d2 are preset spatial position sections, and p1 and p2 are preset parallax adjustment offset amounts corresponding to d1 and d 2.
In some embodiments, the processing unit 72 is specifically configured to:
acquiring a third left view area in the first left view, translating the third left view area in the first left view by a first distance along a first horizontal direction, and acquiring a translated view in the third left view area as a second left view in the first left view; and the number of the first and second groups,
acquiring a third right-view area in the first right-view, translating the third right-view area by a second distance in a second horizontal direction opposite to the first horizontal direction in the first right-view, and acquiring a view in the translated third right-view area in the first right-view as a second right-view;
wherein a sum of the first distance and the second distance is equal to the parallax adjustment offset amount.
In some embodiments, the processing unit 72 is specifically configured to:
cutting out image content with a first width in the horizontal direction at a first side of the first left view to obtain a second left view; and the number of the first and second groups,
cutting off image content with a first width in the horizontal direction at a second side of the first right view to obtain a second right view;
wherein the first width is equal to the parallax adjustment offset, the first side is one of the left side and the right side, and the second side is the other of the left side and the right side.
In some embodiments, the processing unit 72 is specifically configured to:
cutting out image content with a first width in the horizontal direction at a first side of the first left view to obtain a fourth left view, splicing pure color pictures in the horizontal direction at the first side and/or a second side of the fourth left view to obtain the second left view, so that the size of the second left view is consistent with that of the first left view;
cutting out image content with a first width in the horizontal direction on the second side of the first right view to obtain a fourth right view, and horizontally splicing pure-color pictures on the first side and/or the second side of the fourth right view to obtain the second right view, so that the size of the second right view is consistent with that of the first right view;
the first width is equal to the parallax adjustment offset, the first side is one of the left side and the right side, the second side is the other of the left side and the right side, and the fourth left view and the fourth right view are spliced into a pure-color picture on the same side.
In some embodiments, the processing unit 72 is specifically configured to:
cutting off image content of a first width in a horizontal direction at a first side of the first left view and cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the first left view to obtain the second left view so that a ratio of a length of the second left view in the horizontal direction to the width in the vertical direction is consistent with the first left view;
cutting off image content of a first width in a horizontal direction at a second side of the first right view and cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the first left view to obtain the second right view, wherein a ratio of a length of the second right view in the horizontal direction to the width in the vertical direction is consistent with the first right view;
wherein the first width is equal to a parallax adjustment offset, the first side is one of a left side and a right side, the second side is the other of the left side and the right side, the third side is one of an upper side and a lower side, the fourth side is the other of the upper side and the lower side, and the first left view and the first right view have the same side from which image content in a vertical direction is cut off.
In some embodiments, the processing unit 72 is specifically configured to:
cutting out image content of a first width in a horizontal direction at a first side of the first left view to obtain a fifth left view;
cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the fifth left view, obtaining the second left view so as to make a ratio of a length of the second left view in a horizontal direction to a width in a vertical direction consistent with the first left view;
and the number of the first and second groups,
cutting off image content of a first width in a horizontal direction on a second side of the first right view to obtain a fifth right view;
cutting off image content of a second width in the vertical direction at a third side and/or a fourth side of the fifth right view to obtain a second right view, wherein the ratio of the length of the second right view in the horizontal direction to the width of the second right view in the vertical direction is consistent with the first right view;
wherein the first width is equal to a parallax adjustment offset, the first side is one of a left side and a right side, the second side is the other of the left side and the right side, the third side is one of an upper side and a lower side, the fourth side is the other of the upper side and the lower side, and the fifth left view and the fifth right view have the same side from which image content in a vertical direction is cut off.
In some embodiments, the display unit 73 is specifically configured to:
synthesizing the second left view and the second right view into a second stereoscopic image;
and carrying out naked eye three-dimensional display by utilizing the second three-dimensional image so as to realize three-dimensional imaging.
It should be noted that, since the stereo imaging processing apparatus in the present embodiment is based on the same inventive concept as the stereo imaging processing methods in the first and second embodiments, the corresponding contents in the first and second embodiments are also applicable to the present apparatus embodiment, and are not described in detail herein.
According to the technical scheme, the embodiment of the invention has the beneficial effects that: when the first obtaining unit 71 obtains the first left view and the first right view, the processing unit 72 performs misalignment cropping processing on the first left view and the first right view to obtain a second left view and a second right view, so that pixel points at the same positions in the first left view and the first right view are horizontally misaligned in the second left view and the second right view, and parallax between the second left view and the second right view can be increased or decreased relative to parallax between the first left view and the first right view, and further, stereoscopic imaging is performed by the display unit 73 according to the second left view and the second right view, so that a concave-convex stereoscopic display effect presented by a stereoscopic image can be changed, the viewing demand of a user is met, and the viewing experience of the user is improved.
Example four
Fig. 8 is a schematic structural diagram of a stereoscopic display device according to a fourth embodiment of the present invention, where the stereoscopic display device 800 may be any type of intelligent terminal, such as a mobile phone, VR glasses, and the like.
Specifically, referring to fig. 8, the stereoscopic display apparatus 800 includes:
one or more processors 810 and a memory 820, with one processor 810 being an example in FIG. 8.
The processor 810 and the memory 820 may be connected by a bus or other means, such as by a bus in FIG. 8.
The memory 820, which is a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the stereoscopic imaging processing method in the embodiment of the present invention (for example, the acquisition unit 71, the cropping unit 72, and the imaging unit 73 shown in fig. 7). The processor 810 executes various functional applications and data processing of the stereoscopic imaging processing apparatus 70, i.e., the stereoscopic imaging processing method of any of the above-described method embodiments, by executing non-transitory software programs, instructions, and modules stored in the memory 820.
The memory 820 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the stereoscopic imaging processing device 70, and the like. Further, the memory 820 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 820 may optionally include memory located remotely from processor 810, which may be connected to the stereoscopic display device 800 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 one or more modules are stored in the memory 820 and, when executed by the one or more processors 810, perform the stereoscopic imaging processing method in any of the method embodiments described above, e.g., performing the method steps 110-150 of fig. 1, 410-460 of fig. 4, described above, implementing the functionality of the units 71-75 of fig. 7.
EXAMPLE five
Embodiment five of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, which are executed by one or more processors, for example, by one processor 810 in fig. 8, and may cause the one or more processors to execute the stereo imaging processing method in any of the method embodiments, for example, to execute the method steps 110 to 150 in fig. 1 and the method steps 410 to 460 in fig. 4 described above, and implement the functions of the units 71 to 75 in fig. 7.
The above-described embodiments of the apparatus are merely illustrative, and the 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 modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (26)

1. A stereo imaging processing method is applied to stereo display equipment, a binocular camera is arranged on the stereo display equipment, and the method comprises the following steps:
acquiring a first left view and a first right view shot by the binocular camera;
determining spatial position information of a target object in the first left view and the first right view;
determining a parallax adjustment offset corresponding to the spatial position information of the target object according to the spatial position information of the target object and a preset corresponding relation between the spatial position information and the parallax adjustment offset;
performing dislocation cropping processing on the first left view and the first right view according to the parallax adjustment offset to obtain a second left view and a second right view, so that pixel points at the same positions in the first left view and the second right view are horizontally dislocated in the second left view and the second right view, and the distance of horizontal dislocation is equal to the parallax adjustment offset;
and carrying out stereoscopic imaging according to the second left view and the second right view.
2. The method of claim 1, wherein the determining spatial location information of the object in the first left view and the first right view comprises:
acquiring depth maps corresponding to the first left view and the first right view, determining depth information of a target object in the first left view and the second left view according to the depth maps, and determining spatial position information of the target object according to the depth information of the target object;
or
Determining image position information of the target object in the first left view and/or the first right view, and determining spatial position information of the target object according to the image position information of the target object.
3. The method of claim 2, wherein the obtaining the depth maps corresponding to the first left view and the first right view comprises:
acquiring a depth map corresponding to the first left view and the first right view provided by the ranging hardware from the ranging hardware;
or
And acquiring the depth maps corresponding to the first left view and the first right view by using a stereo matching algorithm.
4. The method of claim 2,
the target object is a human eye;
the determining image position information of the object in the first left view and/or the first right view comprises:
determining a face region in the first left view and/or the first right view;
detecting human face characteristic points of the human face area by using a human face alignment algorithm;
determining the position of the human eye in the first left view and/or the first right view according to the position of the detected human face feature point.
5. The method according to claim 1, wherein the determining the parallax adjustment offset value corresponding to the spatial position information of the target object according to the spatial position information of the target object and a preset corresponding relationship between the spatial position information and the parallax adjustment offset value comprises:
inquiring a preset offset database by taking the spatial position information of the target object as an index to obtain a parallax adjustment offset corresponding to the spatial position information;
or
And substituting the spatial position information of the target object into a preset functional relation between the parallax offset and the spatial position information to obtain a parallax adjustment offset corresponding to the spatial position information.
6. The method according to claim 5, wherein the step of substituting the spatial position information of the target object into a preset functional relationship between the parallax offset amount and the spatial position information to obtain the parallax adjustment offset amount corresponding to the spatial position information comprises:
acquiring a parallax adjustment offset amount corresponding to the spatial position information by the following formula:
<mrow> <mi>n</mi> <mi>e</mi> <mi>w</mi> <mi>p</mi> <mo>=</mo> <mi>p</mi> <mn>1</mn> <mo>-</mo> <mfrac> <mrow> <mi>p</mi> <mn>1</mn> <mo>-</mo> <mi>p</mi> <mn>2</mn> </mrow> <mrow> <mi>d</mi> <mn>2</mn> <mo>-</mo> <mi>d</mi> <mn>2</mn> </mrow> </mfrac> <mo>*</mo> <mrow> <mo>(</mo> <mi>d</mi> <mo>-</mo> <mi>d</mi> <mn>1</mn> <mo>)</mo> </mrow> </mrow>
wherein newp is a parallax adjustment offset amount, d is spatial position information of the object, d1 and d2 are preset spatial position sections, and p1 and p2 are preset parallax adjustment offset amounts corresponding to d1 and d 2.
7. The method according to any one of claims 1 to 6, wherein the performing a mis-cropping process on the first left view and the first right view according to the parallax adjustment offset amount to obtain a second left view and a second right view comprises:
acquiring a third left view region in the first left view, translating the third left view region in the first left view by a first distance along a first horizontal direction, and acquiring a view in the translated third left view region in the first left view as a second left view; and
acquiring a third right-view region in the first right-view, translating the third right-view region by a second distance in a second horizontal direction opposite to the first horizontal direction in the first right-view, and acquiring a view in the translated third right-view region in the first right-view as a second right-view;
wherein a sum of the first distance and the second distance is equal to the parallax adjustment offset amount.
8. The method according to any one of claims 1 to 6,
the performing, according to the parallax adjustment offset, a staggered cropping process on the first left view and the first right view to obtain a second left view and a second right view includes:
cutting out image content with a first width in the horizontal direction at a first side of the first left view to obtain a second left view; and the number of the first and second groups,
cutting off image content with a first width in the horizontal direction at a second side of the first right view to obtain a second right view;
wherein the first width is equal to the parallax adjustment offset, the first side is one of a left side and a right side, and the second side is the other of the left side and the right side.
9. The method according to any one of claims 1 to 6, wherein the performing a mis-cropping process on the first left view and the first right view according to the parallax adjustment offset amount to obtain a second left view and a second right view comprises:
cutting out image content with a first width in the horizontal direction at a first side of the first left view to obtain a fourth left view, splicing pure color pictures in the horizontal direction at the first side and/or a second side of the fourth left view to obtain the second left view, so that the size of the second left view is consistent with that of the first left view;
cutting out image content with a first width in the horizontal direction on the second side of the first right view to obtain a fourth right view, and horizontally splicing pure-color pictures on the first side and/or the second side of the fourth right view to obtain the second right view, so that the size of the second right view is consistent with that of the first right view;
the first width is equal to the parallax adjustment offset, the first side is one of the left side and the right side, the second side is the other of the left side and the right side, and the fourth left view and the fourth right view are spliced into a pure-color picture on the same side.
10. The method according to any one of claims 1 to 6, wherein the performing a mis-cropping process on the first left view and the first right view according to the parallax adjustment offset amount to obtain a second left view and a second right view comprises:
cutting off image content of a first width in a horizontal direction at a first side of the first left view and cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the first left view to obtain the second left view so that a ratio of a length of the second left view in the horizontal direction to the width in the vertical direction is consistent with the first left view;
cutting off image content of a first width in a horizontal direction at a second side of the first right view and cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the first left view to obtain the second right view, wherein a ratio of a length of the second right view in the horizontal direction to a width of the second right view in the vertical direction is consistent with the first right view;
the first width is equal to the parallax adjustment offset, the first side is one of the left side and the right side, the second side is the other of the left side and the right side, the third side is one of the upper side and the lower side, the second side is the other of the upper side and the lower side, and the first left view and the first right view cut off image content in the vertical direction at the same side.
11. The method according to any one of claims 1 to 6, wherein the performing a mis-cropping process on the first left view and the first right view according to the parallax adjustment offset amount to obtain a second left view and a second right view comprises:
cutting out image content of a first width in a horizontal direction at a first side of the first left view to obtain a fifth left view;
cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the fifth left view to obtain the second left view so that a ratio of a length of the second left view in a horizontal direction to a width of the second left view in a vertical direction is consistent with the first left view;
and
cutting off image content of a first width in a horizontal direction at a second side of the first right view to obtain a sixth right view;
cutting off image content of a second width in the vertical direction at a third side and/or a fourth side of the sixth right view to obtain the second right view, wherein the ratio of the length of the second right view in the horizontal direction to the width of the second right view in the vertical direction is consistent with the first right view;
the first width is equal to the parallax adjustment offset, the first side is one of the left side and the right side, the second side is the other of the left side and the right side, the third side is one of the upper side and the lower side, the second side is the other of the upper side and the lower side, and the sixth left view and the sixth right view have the same side from which the image content in the vertical direction is cut off.
12. The method of claim 1, wherein the performing stereoscopic imaging according to the second left view and the second right view comprises:
synthesizing the second left view and the second right view into a second stereoscopic image;
and carrying out naked eye three-dimensional display by utilizing the second three-dimensional image so as to realize three-dimensional imaging.
13. A stereoscopic imaging processing apparatus, characterized in that the apparatus comprises:
the first acquisition unit is used for acquiring a first left view and a first right view shot by the binocular camera;
the processing unit is used for carrying out dislocation cutting processing on the first left view and the first right view according to the parallax adjustment offset to obtain a second left view and a second right view so as to enable pixel points at the same positions in the first left view and the second right view to be horizontally dislocated in the second left view and the second right view, and the distance of horizontal dislocation is equal to the parallax adjustment offset;
and the display unit is used for carrying out stereoscopic imaging according to the second left view and the second right view.
14. The apparatus of claim 13, wherein the first determining unit comprises:
the first acquisition module is used for acquiring the depth maps corresponding to the first left view and the first right view;
a first determining module, configured to determine depth information of a target object in the first left view and the second left view according to the depth map;
the second determining module is used for determining the spatial position information of the target object according to the depth information of the target object;
or
A third determining module, configured to determine image position information of the target object in the first left view and/or the first right view;
and the fourth determining module is used for determining the spatial position information of the target object according to the image position information of the target object.
15. The apparatus of claim 14, wherein the first obtaining module is specifically configured to:
acquiring a depth map corresponding to the first left view and the first right view provided by the ranging hardware from the ranging hardware;
or
And acquiring the depth maps corresponding to the first left view and the first right view by using a stereo matching algorithm.
16. The apparatus of claim 14,
the target object is a human eye;
the third determining module is specifically configured to:
determining a face region in the first left view and/or the first right view;
detecting human face characteristic points of the human face area by using a human face alignment algorithm;
determining the position of the human eye in the first left view and/or the first right view according to the position of the detected human face feature point.
17. The apparatus of claim 13, wherein the second determining unit comprises:
the query module is used for querying a preset offset database by taking the spatial position information of the target object as an index to acquire a parallax adjustment offset corresponding to the spatial position information;
or
And the calculation module is used for substituting the spatial position information of the target object into a preset functional relation between the parallax offset and the spatial position information to acquire the parallax adjustment offset corresponding to the spatial position information.
18. The apparatus of claim 17, wherein the computing module is specifically configured to:
acquiring a parallax adjustment offset amount corresponding to the spatial position information by the following formula:
<mrow> <mi>n</mi> <mi>e</mi> <mi>w</mi> <mi>p</mi> <mo>=</mo> <mi>p</mi> <mn>1</mn> <mo>-</mo> <mfrac> <mrow> <mi>p</mi> <mn>1</mn> <mo>-</mo> <mi>p</mi> <mn>2</mn> </mrow> <mrow> <mi>d</mi> <mn>2</mn> <mo>-</mo> <mi>d</mi> <mn>2</mn> </mrow> </mfrac> <mo>*</mo> <mrow> <mo>(</mo> <mi>d</mi> <mo>-</mo> <mi>d</mi> <mn>1</mn> <mo>)</mo> </mrow> </mrow>
wherein newp is a parallax adjustment offset amount, d is spatial position information of the object, d1 and d2 are preset spatial position sections, and p1 and p2 are preset parallax adjustment offset amounts corresponding to d1 and d 2.
19. The apparatus according to any one of claims 13 to 18, wherein the processing unit is specifically configured to:
acquiring a third left view region in the first left view, translating the third left view region in the first left view by a first distance along a first horizontal direction, and acquiring a view in the translated third left view region in the first left view as a second left view; and
acquiring a third right-view region in the first right-view, translating the third right-view region by a second distance in a second horizontal direction opposite to the first horizontal direction in the first right-view, and acquiring a view in the translated third right-view region in the first right-view as a second right-view;
wherein a sum of the first distance and the second distance is equal to the parallax adjustment offset amount.
20. The apparatus of any one of claims 13 to 18,
the processing unit is specifically configured to:
cutting out image content with a first width in the horizontal direction at a first side of the first left view to obtain a second left view; and the number of the first and second groups,
cutting off image content with a first width in the horizontal direction at a second side of the first right view to obtain a second right view;
wherein the first width is equal to the parallax adjustment offset, the first side is one of a left side and a right side, and the second side is the other of the left side and the right side.
21. The apparatus according to any one of claims 13 to 18, wherein the processing unit is specifically configured to:
cutting out image content with a first width in the horizontal direction at a first side of the first left view to obtain a fourth left view, splicing pure color pictures in the horizontal direction at the first side and/or a second side of the fourth left view to obtain the second left view, so that the size of the second left view is consistent with that of the first left view;
cutting out image content with a first width in the horizontal direction on the second side of the first right view to obtain a fourth right view, and horizontally splicing pure-color pictures on the first side and/or the second side of the fourth right view to obtain the second right view, so that the size of the second right view is consistent with that of the first right view;
the first width is equal to the parallax adjustment offset, the first side is one of the left side and the right side, the second side is the other of the left side and the right side, and the fourth left view and the fourth right view are spliced into a pure-color picture on the same side.
22. The apparatus according to any one of claims 13 to 18, wherein the processing unit is specifically configured to:
cutting off image content of a first width in a horizontal direction at a first side of the first left view and cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the first left view to obtain the second left view so that a ratio of a length of the second left view in the horizontal direction to the width in the vertical direction is consistent with the first left view;
cutting off image content of a first width in a horizontal direction at a second side of the first right view and cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the first left view to obtain the second right view, wherein a ratio of a length of the second right view in the horizontal direction to a width of the second right view in the vertical direction is consistent with the first right view;
the first width is equal to the parallax adjustment offset, the first side is one of the left side and the right side, the second side is the other of the left side and the right side, the third side is one of the upper side and the lower side, the second side is the other of the upper side and the lower side, and the first left view and the first right view cut off image content in the vertical direction at the same side.
23. The apparatus according to any one of claims 13 to 18, wherein the processing unit is specifically configured to:
cutting out image content of a first width in a horizontal direction at a first side of the first left view to obtain a fifth left view;
cutting off image content of a second width in a vertical direction at a third side and/or a fourth side of the fifth left view to obtain the second left view so that a ratio of a length of the second left view in a horizontal direction to a width of the second left view in a vertical direction is consistent with the first left view;
and
cutting off image content of a first width in a horizontal direction at a second side of the first right view to obtain a sixth right view;
cutting off image content of a second width in the vertical direction at a third side and/or a fourth side of the sixth right view to obtain the second right view, wherein the ratio of the length of the second right view in the horizontal direction to the width of the second right view in the vertical direction is consistent with the first right view;
the first width is equal to the parallax adjustment offset, the first side is one of the left side and the right side, the second side is the other of the left side and the right side, the third side is one of the upper side and the lower side, the second side is the other of the upper side and the lower side, and the sixth left view and the sixth right view have the same side from which the image content in the vertical direction is cut off.
24. The apparatus of claim 13, wherein the display unit comprises:
a synthesizing module, configured to synthesize the second left view and the second right view into a second stereoscopic image;
and the imaging module is used for carrying out naked eye three-dimensional display by utilizing the second three-dimensional image so as to realize three-dimensional imaging.
25. A stereoscopic display apparatus, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-12.
26. A computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform the method of any one of claims 1-12.
CN201711495534.6A 2017-12-31 2017-12-31 A kind of three-dimensional imaging processing method, device and stereoscopic display device Pending CN108093243A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711495534.6A CN108093243A (en) 2017-12-31 2017-12-31 A kind of three-dimensional imaging processing method, device and stereoscopic display device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711495534.6A CN108093243A (en) 2017-12-31 2017-12-31 A kind of three-dimensional imaging processing method, device and stereoscopic display device

Publications (1)

Publication Number Publication Date
CN108093243A true CN108093243A (en) 2018-05-29

Family

ID=62181263

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711495534.6A Pending CN108093243A (en) 2017-12-31 2017-12-31 A kind of three-dimensional imaging processing method, device and stereoscopic display device

Country Status (1)

Country Link
CN (1) CN108093243A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109584714A (en) * 2018-11-30 2019-04-05 Oppo广东移动通信有限公司 Display screen and electronic equipment
CN111225201A (en) * 2020-01-19 2020-06-02 深圳市商汤科技有限公司 Parallax correction method and device, and storage medium
CN112686865A (en) * 2020-12-31 2021-04-20 重庆西山科技股份有限公司 3D view auxiliary detection method, system, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101964918A (en) * 2009-07-21 2011-02-02 富士胶片株式会社 Image reproducing apparatus and image reproducing method
CN102959974A (en) * 2010-06-30 2013-03-06 富士胶片株式会社 Stereoscopic image playback device, parallax adjustment method of same, parallax adjustment program, and image capture device
CN104012087A (en) * 2011-12-28 2014-08-27 索尼公司 Visual disparity adjusting apparatus, image processing apparatus, and frame format
CN105049832A (en) * 2014-04-24 2015-11-11 Nlt科技股份有限公司 Stereoscopic image display device, stereoscopic image display method, and stereoscopic image display program
CN105872518A (en) * 2015-12-28 2016-08-17 乐视致新电子科技(天津)有限公司 Method and device for adjusting parallax through virtual reality

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101964918A (en) * 2009-07-21 2011-02-02 富士胶片株式会社 Image reproducing apparatus and image reproducing method
CN102959974A (en) * 2010-06-30 2013-03-06 富士胶片株式会社 Stereoscopic image playback device, parallax adjustment method of same, parallax adjustment program, and image capture device
CN104012087A (en) * 2011-12-28 2014-08-27 索尼公司 Visual disparity adjusting apparatus, image processing apparatus, and frame format
CN105049832A (en) * 2014-04-24 2015-11-11 Nlt科技股份有限公司 Stereoscopic image display device, stereoscopic image display method, and stereoscopic image display program
CN105872518A (en) * 2015-12-28 2016-08-17 乐视致新电子科技(天津)有限公司 Method and device for adjusting parallax through virtual reality

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109584714A (en) * 2018-11-30 2019-04-05 Oppo广东移动通信有限公司 Display screen and electronic equipment
CN109584714B (en) * 2018-11-30 2021-04-16 Oppo广东移动通信有限公司 Display screen and electronic equipment
CN111225201A (en) * 2020-01-19 2020-06-02 深圳市商汤科技有限公司 Parallax correction method and device, and storage medium
WO2021143127A1 (en) * 2020-01-19 2021-07-22 深圳市商汤科技有限公司 Parallax correction method and device, and storage medium
TWI764506B (en) * 2020-01-19 2022-05-11 大陸商深圳市商湯科技有限公司 Parallax correction method and device, computer-readable storage medium
CN112686865A (en) * 2020-12-31 2021-04-20 重庆西山科技股份有限公司 3D view auxiliary detection method, system, device and storage medium

Similar Documents

Publication Publication Date Title
US8760502B2 (en) Method for improving 3 dimensional effect and reducing visual fatigue and apparatus enabling the same
JP5140210B2 (en) Imaging apparatus and image processing method
US8436893B2 (en) Methods, systems, and computer-readable storage media for selecting image capture positions to generate three-dimensional (3D) images
JP5204350B2 (en) Imaging apparatus, playback apparatus, and image processing method
JP5320524B1 (en) Stereo camera
JP5204349B2 (en) Imaging apparatus, playback apparatus, and image processing method
CN103034330B (en) A kind of eye interaction method for video conference and system
CN106981078B (en) Sight line correction method and device, intelligent conference terminal and storage medium
CN108156437A (en) A kind of stereoscopic image processing method, device and electronic equipment
JPWO2013099169A1 (en) Stereo camera
KR20140108078A (en) Method, device, and apparatus for generating stereoscopic images using a non-stereoscopic camera
CN211128024U (en) 3D display device
CN104967837A (en) Device and method for adjusting three-dimensional display effect
CN106170086B (en) Method and device thereof, the system of drawing three-dimensional image
CN107545537A (en) A kind of method from dense point cloud generation 3D panoramic pictures
CN102006494A (en) Method and device for adjusting three-dimensional (3D) video signal
CN108093243A (en) A kind of three-dimensional imaging processing method, device and stereoscopic display device
CN108156442A (en) A kind of three-dimensional imaging processing method, device and electronic equipment
CN108259881A (en) 3D synthetic methods and its system based on parallax estimation
CN112929636A (en) 3D display device and 3D image display method
US20130215237A1 (en) Image processing apparatus capable of generating three-dimensional image and image pickup apparatus, and display apparatus capable of displaying three-dimensional image
CN107820071A (en) Mobile terminal and its stereoscopic imaging method, device and computer-readable recording medium
GB2585197A (en) Method and system for obtaining depth data
CN105072433B (en) Depth perception mapping method applied to head track virtual reality system
TWI536832B (en) System, methods and software product for embedding stereo imagery

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: 20180529