A kind of stereo-picture method for relocating
Technical field
The present invention relates to a kind of processing methods of picture signal, more particularly, to a kind of stereo-picture method for relocating.
Background technology
With the fast development of stereo display technique, the various terminal devices with different three-dimensional display functions also go out extensively
It is existing, but since stereoscopic display terminal kinds are various, width height ratio is diversified in specifications, if therefore the certain image of width height ratio is placed on not
It shows, then first picture size must be adjusted, to achieve the effect that stereoscopic display in same stereoscopic display terminal.Traditional
Image-scaling method is either zoomed in and out by fixed proportion by cutting, and is done so it is possible that the content in image subtracts
Less or lead to obvious object deformation.
For stereo-picture, stretching or diminution processing along the horizontal or vertical direction can severely impact three-dimensional effect
Fruit leads to the variation of binocular parallax, changes so as to cause stereoscopic depth of perception, vision can be caused uncomfortable when serious, therefore,
How the left view point image of stereo-picture and right visual point image are zoomed in and out to reduce image deformation;After how ensureing scaling
The consistency of left view point image and parallax/depth distribution of right visual point image, to reduce, vision is uncomfortable, enhances sense of depth;
How according to the user's choice adaptively the scaling of control object is all to carry out weight to stereo-picture with the notable content of protrusion
The problem of needing to research and solve in position fixing process.
Invention content
Technical problem to be solved by the invention is to provide one kind meeting notable semantic feature, and can effectively adjust vertical
The stereo-picture method for relocating of body picture size size.
Technical solution is used by the present invention solves above-mentioned technical problem:A kind of stereo-picture method for relocating, it is special
Sign is to include the following steps:
1. the left view point image for the stereo-picture that pending width is W and height is H, right visual point image and left view is poor
Image correspondence is denoted as { L (x, y) }, { R (x, y) } and { dL(x,y)};Wherein, 1≤x≤W, 1≤y≤H, W and H can be whole by 8
It removes, L (x, y) indicates that coordinate position is the pixel value of the pixel of (x, y) in { L (x, y) }, sits in R (x, y) expressions { R (x, y) }
Mark is set to the pixel value of the pixel of (x, y), dL(x, y) indicates { dL(x, y) } in coordinate position be (x, y) pixel
Pixel value;
2. { L (x, y) } is divided intoThe quadrilateral mesh that the size of a non-overlapping copies is 8 × 8;Then will
All quadrilateral mesh in { L (x, y) } constitute a set, are denoted as VL, VL={ UL,k|1≤k≤M};Wherein, UL,kIndicate { L
(x, y) } in k-th of quadrilateral mesh, with the upper left of quadrilateral mesh, lower-left, 4 grid vertexes of upper right and bottom right set
It describes,K is positive integer, and 1≤k≤M, M indicate the network of quadrilaterals for including in { L (x, y) }
The total number of lattice,It is corresponding to indicate UL,kThe upper left grid as the 1st grid vertex
Vertex, as the lower-left grid vertex of the 2nd grid vertex, as the upper right grid vertex of the 3rd grid vertex, as the 4th
The bottom right grid vertex of a grid vertex,WithHorizontal coordinate positionWith vertical coordinate positionIt describes,WithHorizontal coordinate positionWith vertical coordinate positionIt describes,WithHorizontal coordinate positionWith vertical coordinate positionIt describes,WithHorizontal coordinate positionWith vertical coordinate positionIt describes,
4. going out the notable figure of { L (x, y) } using the notable model extraction of vision based on graph theory, it is denoted as { SML(x,
y)};Then according to { SML(x, y) } and { dL(x, y) }, the visual saliency map of { L (x, y) } is obtained, { S is denoted asL(x,
Y) }, by { SL(x, y) } in coordinate position be that the pixel value of pixel of (x, y) is denoted as SL(x, y),Wherein, SML(x, y) indicates { SML(x, y) } in coordinate position be (x, y)
Pixel pixel value,Indicate SMLThe weight of (x, y),Indicate dLThe weight of (x, y),
5. the set that all object quadrangle grids of { L (x, y) } are constituted is denoted asAnd by upper left, lower-left, upper right and the right side of all object quadrangle grids of { L (x, y) }
The set that the depth value of lower grid vertex is constituted is denoted asThen according to the institute in { L (x, y) }
There is the corresponding object quadrangle grid of quadrilateral mesh, similarity transformation is carried out to each quadrilateral mesh in { L (x, y) }, is made
The mapping fault minimum for the object quadrangle grid that former quadrilateral mesh is obtained with former quadrilateral mesh after similarity transformation is obtained,
The similitude transformation matrix of the corresponding object quadrangle grid of each quadrilateral mesh in { L (x, y) } is obtained, by UL,kIt is corresponding
Object quadrangle gridSimilitude transformation matrix be denoted asWherein,It is corresponding to indicateThe upper left net as the 1st grid vertex
Lattice vertex, the lower-left grid vertex as the 2nd grid vertex, the upper right grid vertex as the 3rd grid vertex,
As the bottom right grid vertex of the 4th grid vertex,It indicatesI-th of grid vertex, i=1,2,3,4,It is corresponding to indicateRespective depth value,WithIt is corresponding to indicateHorizontal coordinate position and vertical sit
Cursor position,WithIt is corresponding to indicateHorizontal coordinate position and vertical coordinate position,WithIt is corresponding to indicate's
Horizontal coordinate position and vertical coordinate position,WithIt is corresponding to indicateHorizontal coordinate position and vertical coordinate position,
(AL,k)TFor AL,kTransposition, ((AL,k)TAL,k)-1For (AL,k)TAL,kIt is inverse;
6. according to the similitude transformation matrix of the corresponding object quadrangle grid of each quadrilateral mesh in { L (x, y) }, and
In conjunction with { SL(x, y) }, calculate the picture quality energy of the corresponding object quadrangle grid of all quadrilateral mesh in { L (x, y) }
Amount, is denoted as EQ;
According to every in the depth value of each grid vertex of each quadrilateral mesh in { L (x, y) } and { L (x, y) }
The depth value of each grid vertex of the corresponding object quadrangle grid of a quadrilateral mesh, calculates all four in { L (x, y) }
The three-dimensional mass-energy of the corresponding object quadrangle grid of side shape grid, is denoted as ES;
According to the size scaling ratio and depth scalability ratio of the important content of user's selection, the institute in { L (x, y) } is calculated
The important content energy for having the corresponding object quadrangle grid of quadrilateral mesh, is denoted as EI;
7. calculating the gross energy of the corresponding object quadrangle grid of all quadrilateral mesh in { L (x, y) }, it is denoted as
Etotal, Etotal=EQ+λS×ES+λI×EI;Then it is solved by Least-squares minimizationIt obtains in { L (x, y) }
All quadrilateral mesh in set that the corresponding optimum target quadrilateral mesh of all quadrilateral mesh is constituted and { L (x, y) }
The upper left of corresponding optimum target quadrilateral mesh, lower-left, upper right, the set that constitutes of depth value of bottom right grid vertex, it is corresponding
It is denoted asAndThen according toCalculate { L
(x, y) } in the corresponding optimum target quadrilateral mesh of each quadrilateral mesh similitude transformation matrix, by UL,kIt is corresponding most
Good object quadrangle gridSimilitude transformation matrix be denoted asAnd according toCalculate four sides each of { L (x, y) }
The depth conversion matrix of the corresponding optimum target quadrilateral mesh of shape grid, by UL,kCorresponding optimum target quadrilateral meshDepth conversion matrix be denoted asWherein, λSAnd λIIt is weighting ginseng
Number, min () are to be minimized function,Indicate UL,kCorresponding optimum target quadrilateral mesh,It indicatesUpper left,
Lower-left, upper right, bottom right grid vertex depth value constitute set,(BL,k)TFor BL,kTransposition,
((BL,k)TBL,k)-1For (BL,k)TBL,kIt is inverse, It is corresponding to indicateUpper left,
Lower-left, upper right and the respective depth value of bottom right grid vertex;
8. according to the similarity transformation square of the corresponding optimum target quadrilateral mesh of each quadrilateral mesh in { L (x, y) }
Battle array calculates horizontal coordinate of each pixel in each quadrilateral mesh in { L (x, y) } after similarity transformation rectangular transform
Position and vertical coordinate position, by UL,kMiddle horizontal coordinate position is x'L,kWith vertical coordinate position y'L,kPixel through similar
Horizontal coordinate position and vertical coordinate position after transformation matrix transformation, which correspond to, to be denoted asWith
Then the horizontal seat according to each pixel in each quadrilateral mesh in { L (x, y) } after similarity transformation rectangular transform
Cursor position and vertical coordinate position obtain the left view point image after reorientation, are denoted asWherein, 1≤x'L,k≤ W, 1
≤y'L,k≤ H,1≤x'≤W', 1≤y'≤H, W' indicate the stereo-picture after reorientation
Width, H also be reorientation after stereo-picture height,It indicatesMiddle coordinate position is (x', y''s)
The pixel value of pixel;
And according to the depth conversion square of the corresponding optimum target quadrilateral mesh of each quadrilateral mesh in { L (x, y) }
Battle array calculates the depth value of each pixel in each quadrilateral mesh in { L (x, y) } after depth conversion rectangular transform
Depth value, by UL,kMiddle horizontal coordinate position is x'L,kWith vertical coordinate position y'L,kPixel depth value z'L,kThrough too deep
Depth value after degree transformation matrix transformation is denoted asThen according to four sides each of { L (x, y) }
Depth value of the depth value of each pixel in shape grid after depth conversion rectangular transform obtains the left view point after reorientation
Depth map is denoted asThen according toThe left view difference image after reorientation is obtained, is denoted asIt willMiddle coordinate position is that the pixel value of the pixel of (x', y') is denoted as Wherein, B'L,k=[z'L,k1],It indicatesMiddle coordinate bit
It is set to the pixel value of the pixel of (x', y');
9. basisWithThe right visual point image after reorientation is obtained, is denoted asIt willMiddle coordinate position is that the pixel value of the pixel of (x', y') is denoted as Then willWithConstitute the stereo-picture after reorientation;Its
In, 1≤x'≤W', 1≤y'≤H, W' indicate that the width of the stereo-picture after reorientation, H are also the stereo-picture after reorientation
Height,It indicatesMiddle coordinate position isPixel pixel
Value.
The step 6. in EQCalculating process be:
6. the shape of the corresponding object quadrangle grid of all quadrilateral mesh in _ 1a, calculating { L (x, y) } protects energy
Amount, is denoted as ESD,Wherein, SL(k) U is indicatedL,kIn all pixels point vision it is aobvious
The mean value of work value, namely indicate { SL(x, y) } in UL,kThe mean value of the pixel value of all pixels point in corresponding region, symbol
Number " | | | | " it is to seek Euclidean distance symbol;
6. _ 2a, according to ESDAnd ELB, calculate the corresponding object quadrangle grid of all quadrilateral mesh in { L (x, y) }
Picture quality ENERGY EQ, EQ=ESD+λLBELB;Wherein, λLBFor weighting parameters.
The step 6. in ESCalculating process be:
6. the shape of the corresponding object quadrangle grid of all quadrilateral mesh in _ 1b, calculating { L (x, y) } scales energy
Amount, is denoted as ESC,Wherein, symbol " | | | | " is to seek Euclidean distance symbol,It indicates
All grid vertexes edge composition matrix,Indicate UL,kI-th of net
Lattice vertexDepth value,It indicatesDepth value, eL,kIndicate UL,kAll grid vertexes edge composition square
Battle array,
And the deep-controlled energy of the corresponding object quadrangle grid of all quadrilateral mesh in { L (x, y) } is calculated, remember
For EDC,
Wherein, exp () is indicated using natural radix e as the exponential function at bottom, symbol " | | " it is the symbol that takes absolute value, zmaxIndicate L (x,
Y) maximum depth value }, zminIndicate the minimum depth value of { L (x, y) }, CVZminIndicate minimum comfortable viewing areas range,E indicates the horizontal base line distance between the left view point of pending stereo-picture and right viewpoint, D tables
Show the viewing distance between the left view point of pending stereo-picture and right viewpoint and display, η1Indicate that minimum comfortable viewing regards
Angle, CVZmaxIndicate maximum comfortable viewing areas range,η2Indicate maximum comfortable viewing visual angle;
6. _ 2b, according to ESCAnd EDC, calculate the corresponding object quadrangle grid of all quadrilateral mesh in { L (x, y) }
Three-dimensional mass-energy ES, ES=ESC+λDCEDC;Wherein, λDCFor weighting parameters.
The step 6. in EICalculating process be:
Wherein,Indicate the rectangular area range where the important content of user's selection, xi,jIt is in the horizontal direction in expression { L (x, y) }
J-th and vertical direction be i-th grid vertex horizontal coordinate position, xi,j+1It indicates in { L (x, y) } in the horizontal direction
The horizontal coordinate position for the grid vertex for being i-th for jth+1 and in vertical direction, zi,jIt indicates in { L (x, y) } in level
Direction be j-th and be i-th in vertical direction grid vertex depth value,It is in the horizontal direction in expression { L (x, y) }
J-th and in the horizontal coordinate position that vertical direction is the grid vertex of i-th of grid vertex in object quadrangle grid,Indicate { L (x, y) } in be in the horizontal direction jth+1 and vertical direction be i-th grid vertex on four side of target
The horizontal coordinate position of grid vertex in shape grid,It indicates in { L (x, y) } in the horizontal direction for j-th and in Vertical Square
To the depth value of grid vertex of the grid vertex for i-th in object quadrangle grid, s'xIndicate the level that user specifies
Zoom factor, s'zIndicate the depth scalability factor that user specifies, λDSFor weighting parameters.
Compared with the prior art, the advantages of the present invention are as follows:
1) the method for the present invention is by extracting the corresponding picture quality energy of left view point image, three-dimensional mass-energy and important interior
Hold energy, and by optimization so that the corresponding gross energy minimum of left view point image, obtains best similitude transformation matrix and depth
Value set, so that the reorientation stereo-picture of acquisition can preferably retain important notable semantic information, keep vision
Comfort, and the scaling of important content can be adaptively controlled according to the user's choice.
2) the method for the present invention is carried out at the same time tune to the horizontal coordinate position, vertical coordinate position and depth value of stereo-picture
It is whole, to remain the important notable information of left view point image after reorientation, while can guarantee again with according to reorientation after
Right visual point image after the reorientation that left view difference image obtains is matched, so as to ensure the stereo-picture after reorientation
Comfort and sense of depth.
Description of the drawings
Fig. 1 is that the overall of the method for the present invention realizes block diagram;
Fig. 2 a are " red green " figure of the original three-dimensional image of " Image1 ";
Fig. 2 b are " red green " figure being reoriented to after the width 60% of original three-dimensional image of " Image1 ";
Fig. 3 a are " red green " figure of the original three-dimensional image of " Image2 ";
Fig. 3 b are " red green " figure being reoriented to after the width 60% of original three-dimensional image of " Image2 ";
Fig. 4 a are " red green " figure of the original three-dimensional image of " Image3 ";
Fig. 4 b are " red green " figure being reoriented to after the width 60% of original three-dimensional image of " Image3 ";
Fig. 5 a are " red green " figure of the original three-dimensional image of " Image4 ";
Fig. 5 b are " red green " figure being reoriented to after the width 60% of original three-dimensional image of " Image4 ".
Specific implementation mode
Below in conjunction with attached drawing embodiment, present invention is further described in detail.
A kind of stereo-picture method for relocating proposed by the present invention, it is overall to realize that block diagram is as shown in Figure 1 comprising following
Step:
1. the left view point image for the stereo-picture that pending width is W and height is H, right visual point image and left view is poor
Image correspondence is denoted as { L (x, y) }, { R (x, y) } and { dL(x,y)};Wherein, 1≤x≤W, 1≤y≤H, W and H can be whole by 8
It removes, L (x, y) indicates that coordinate position is the pixel value of the pixel of (x, y) in { L (x, y) }, sits in R (x, y) expressions { R (x, y) }
Mark is set to the pixel value of the pixel of (x, y), dL(x, y) indicates { dL(x, y) } in coordinate position be (x, y) pixel
Pixel value.
2. { L (x, y) } is divided intoThe quadrilateral mesh that the size of a non-overlapping copies is 8 × 8;Then will
All quadrilateral mesh in { L (x, y) } constitute a set, are denoted as VL, VL={ UL,k|1≤k≤M};Wherein, UL,kIndicate { L
(x, y) } in k-th of quadrilateral mesh, with the upper left of quadrilateral mesh, lower-left, 4 grid vertexes of upper right and bottom right set
It describes,K is positive integer, and 1≤k≤M, M indicate the network of quadrilaterals for including in { L (x, y) }
The total number of lattice,It is corresponding to indicate UL,kThe upper left grid as the 1st grid vertex
Vertex, as the lower-left grid vertex of the 2nd grid vertex, as the upper right grid vertex of the 3rd grid vertex, as the 4th
The bottom right grid vertex of a grid vertex,WithHorizontal coordinate positionWith vertical coordinate positionIt describes,WithHorizontal coordinate positionWith vertical coordinate positionIt describes,WithHorizontal coordinate positionWith vertical coordinate positionIt describes,WithHorizontal coordinate positionWith vertical coordinate positionIt describes,
4. using the existing vision based on graph theory significantly (Graph-Based Visual Saliency, GBVS) model
The notable figure for extracting { L (x, y) }, is denoted as { SML(x,y)};Then according to { SML(x, y) } and { dL(x, y) }, obtain L (x,
Y) visual saliency map }, is denoted as { SL(x, y) }, by { SL(x, y) } in coordinate position be that the pixel value of pixel of (x, y) is denoted as
SL(x, y),Wherein, SML(x, y) indicates { SML(x, y) } in coordinate bit
It is set to the pixel value of the pixel of (x, y),Indicate SMLThe weight of (x, y),Indicate dLThe weight of (x, y),
It takes in the present embodiment
5. the set that all object quadrangle grids of { L (x, y) } are constituted is denoted asAnd by upper left, lower-left, upper right and the right side of all object quadrangle grids of { L (x, y) }
The set that the depth value of lower grid vertex is constituted is denoted asThen according to the institute in { L (x, y) }
There is the corresponding object quadrangle grid of quadrilateral mesh, similarity transformation is carried out to each quadrilateral mesh in { L (x, y) }, is made
The mapping fault minimum for the object quadrangle grid that former quadrilateral mesh is obtained with former quadrilateral mesh after similarity transformation is obtained,
The similitude transformation matrix of the corresponding object quadrangle grid of each quadrilateral mesh in { L (x, y) } is obtained, by UL,kIt is corresponding
Object quadrangle gridSimilitude transformation matrix be denoted asWherein,It is corresponding to indicateThe upper left net as the 1st grid vertex
Lattice vertex, as the lower-left grid vertex of the 2nd grid vertex, as the upper right grid top of the 3rd grid vertex
Point, as the bottom right grid vertex of the 4th grid vertex,It indicatesI-th of grid vertex, i=1,2,3,4,It is corresponding to indicateRespective depth value,WithIt is corresponding to indicateHorizontal coordinate position and vertical sit
Cursor position,WithIt is corresponding to indicateHorizontal coordinate position and vertical coordinate position,WithIt is corresponding to indicate's
Horizontal coordinate position and vertical coordinate position,WithIt is corresponding to indicateHorizontal coordinate position and vertical coordinate position,
(AL,k)TFor AL,kTransposition, ((AL,k)TAL,k)-1For (AL,k)TAL,kIt is inverse.
6. when changing the size or the ratio of width to height of stereo-picture, in order to protect user's important object of concern not occur
Tensile deformation needs to keep picture quality as far as possible during grid deformation, therefore the present invention is according to every in { L (x, y) }
The similitude transformation matrix of the corresponding object quadrangle grid of a quadrilateral mesh, and combine { SL(x, y) }, it calculates in { L (x, y) }
The corresponding object quadrangle grid of all quadrilateral mesh picture quality energy, be denoted as EQ。
In this particular embodiment, step 6. in EQCalculating process be:
6. the shape of the corresponding object quadrangle grid of all quadrilateral mesh in _ 1a, calculating { L (x, y) } protects energy
Amount, is denoted as ESD,Wherein, SL(k) U is indicatedL,kIn all pixels point vision it is aobvious
The mean value of work value, namely indicate { SL(x, y) } in UL,kThe mean value of the pixel value of all pixels point in corresponding region, symbol
Number " | | | | " it is to seek Euclidean distance symbol.
6. _ 2a, according to ESDAnd ELB, calculate the corresponding object quadrangle grid of all quadrilateral mesh in { L (x, y) }
Picture quality ENERGY EQ, EQ=ESD+λLBELB;Wherein, λLBFor weighting parameters, λ is taken in the present embodimentLB=1.25.
In order to ensure to relocate the visual adaptability and sense of depth of stereo-picture, the present invention is according to each of { L (x, y) }
The corresponding object quadrangle of each quadrilateral mesh in the depth value of each grid vertex of quadrilateral mesh and { L (x, y) }
The depth value of each grid vertex of grid calculates the corresponding object quadrangle grid of all quadrilateral mesh in { L (x, y) }
Three-dimensional mass-energy, be denoted as ES。
In this particular embodiment, step 6. in ESCalculating process be:
6. the shape of the corresponding object quadrangle grid of all quadrilateral mesh in _ 1b, calculating { L (x, y) } scales energy
Amount, is denoted as ESC,Wherein, symbol " | | | | " is to seek Euclidean distance symbol,It indicates
All grid vertexes edge composition matrix,Indicate UL,kI-th of net
Lattice vertexDepth value,It indicatesDepth value, eL,kIndicate UL,kAll grid vertexes edge composition square
Battle array,
And the deep-controlled energy of the corresponding object quadrangle grid of all quadrilateral mesh in { L (x, y) } is calculated, remember
For EDC,
Wherein, exp () is indicated using natural radix e as the exponential function at bottom, e=2.71828183 ..., symbol " | | " it is to take absolute value
Symbol, zmaxIndicate the maximum depth value of { L (x, y) }, zminIndicate the minimum depth value of { L (x, y) }, CVZminIt indicates minimum to relax
Suitable viewing areas range,E indicates the water between the left view point of pending stereo-picture and right viewpoint
Flat parallax range, D indicate the viewing distance between the left view point of pending stereo-picture and right viewpoint and display, η1It indicates
Minimum comfortable viewing visual angle, takes η in the present embodiment1=-1 °, CVZmaxIndicate maximum comfortable viewing areas range,η2It indicates maximum comfortable viewing visual angle, takes η in the present embodiment2=1 °.
6. _ 2b, according to ESCAnd EDC, calculate the corresponding object quadrangle grid of all quadrilateral mesh in { L (x, y) }
Three-dimensional mass-energy ES, ES=ESC+λDCEDC;Wherein, λDCFor weighting parameters, λ is taken in the present embodimentDC=0.25.
In order to ensure to relocate the comfort and sense of depth of stereo-picture, the important content that the present invention is selected according to user
Size scaling ratio and depth scalability ratio calculate the corresponding object quadrangle grid of all quadrilateral mesh in { L (x, y) }
Important content energy, be denoted as EI。
In this particular embodiment, step 6. in EICalculating process be:Wherein,Indicate user's selection
Rectangular area range where important content, xi,jIt indicates in { L (x, y) } to be in the horizontal direction j-th and is the in vertical direction
The horizontal coordinate position of i grid vertexes, xi,j+1It indicates in { L (x, y) } in the horizontal direction for jth+1 and in vertical direction
For the horizontal coordinate position of i-th of grid vertex, zi,jIt indicates in { L (x, y) } in the horizontal direction for j-th and in Vertical Square
To the depth value of the grid vertex for i-th,It indicates in { L (x, y) } to be in the horizontal direction j-th and is the in vertical direction
The horizontal coordinate position of grid vertex of the i grid vertexes in object quadrangle grid,Indicate { L (x, y) } in
Horizontal direction be jth+1 and be i-th in vertical direction grid vertex of the grid vertex in object quadrangle grid
Horizontal coordinate position,Indicate { L (x, y) } in the horizontal direction be j-th and be i-th in vertical direction grid vertex exist
The depth value of grid vertex in object quadrangle grid, s'xIndicate the horizontal scaling factor that user specifies, s'zIndicate that user refers to
The fixed depth scalability factor, takes s' in the present embodimentx=1 and s'z=1, that is, the original size and depth of important content are kept,
λDSFor weighting parameters, λ is taken in the present embodimentDS=0.025.
7. calculating the gross energy of the corresponding object quadrangle grid of all quadrilateral mesh in { L (x, y) }, it is denoted as
Etotal, Etotal=EQ+λS×ES+λI×EI;Then it is solved by Least-squares minimizationIt obtains in { L (x, y) }
All quadrilateral mesh in set that the corresponding optimum target quadrilateral mesh of all quadrilateral mesh is constituted and { L (x, y) }
The upper left of corresponding optimum target quadrilateral mesh, lower-left, upper right, the set that constitutes of depth value of bottom right grid vertex, it is corresponding
It is denoted asAndThen according toCalculate { L
(x, y) } in the corresponding optimum target quadrilateral mesh of each quadrilateral mesh similitude transformation matrix, by UL,kIt is corresponding most
Good object quadrangle gridSimilitude transformation matrix be denoted asAnd according toCalculate four sides each of { L (x, y) }
The depth conversion matrix of the corresponding optimum target quadrilateral mesh of shape grid, by UL,kCorresponding optimum target quadrilateral meshDepth conversion matrix be denoted asWherein, λSAnd λIIt is weighting ginseng
Number, takes λ in the present embodimentS=1.5 and λI=1.25, min () are to be minimized function,Indicate UL,kIt is corresponding best
Object quadrangle grid,It indicatesUpper left, lower-left, upper right, bottom right grid vertex depth value constitute set,(BL,k)TFor BL,kTransposition, ((BL,k)TBL,k)-1For (BL,k)TBL,kIt is inverse,It is corresponding to indicateUpper left, lower-left, upper right and bottom right grid vertex it is each
From depth value.
8. according to the similarity transformation square of the corresponding optimum target quadrilateral mesh of each quadrilateral mesh in { L (x, y) }
Battle array calculates horizontal coordinate of each pixel in each quadrilateral mesh in { L (x, y) } after similarity transformation rectangular transform
Position and vertical coordinate position, by UL,kMiddle horizontal coordinate position is x'L,kWith vertical coordinate position y'L,kPixel through similar
Horizontal coordinate position and vertical coordinate position after transformation matrix transformation, which correspond to, to be denoted asWith
Then the horizontal seat according to each pixel in each quadrilateral mesh in { L (x, y) } after similarity transformation rectangular transform
Cursor position and vertical coordinate position obtain the left view point image after reorientation, are denoted asWherein, 1≤x'L,k≤ W, 1
≤y'L,k≤ H,1≤x'≤W', 1≤y'≤H, W' indicate the stereo-picture after reorientation
Width, H also be reorientation after stereo-picture height,It indicatesMiddle coordinate position is (x', y''s)
The pixel value of pixel.
And according to the depth conversion square of the corresponding optimum target quadrilateral mesh of each quadrilateral mesh in { L (x, y) }
Battle array calculates the depth value of each pixel in each quadrilateral mesh in { L (x, y) } after depth conversion rectangular transform
Depth value, by UL,kMiddle horizontal coordinate position is x'L,kWith vertical coordinate position y'L,kPixel depth value z'L,kThrough too deep
Depth value after degree transformation matrix transformation is denoted asThen according to four sides each of { L (x, y) }
Depth value of the depth value of each pixel in shape grid after depth conversion rectangular transform obtains the left view point after reorientation
Depth map is denoted asThen according toThe left view difference image after reorientation is obtained, is denoted asIt willMiddle coordinate position is that the pixel value of the pixel of (x', y') is denoted as Wherein, B'L,k=[z'L,k1],It indicatesMiddle coordinate bit
It is set to the pixel value of the pixel of (x', y').
9. basisWithThe right visual point image after reorientation is obtained, is denoted as
It willMiddle coordinate position is that the pixel value of the pixel of (x', y') is denoted as Then willWithConstitute the stereo-picture after reorientation;Its
In, 1≤x'≤W', 1≤y'≤H, W' indicate that the width of the stereo-picture after reorientation, H are also the stereo-picture after reorientation
Height,It indicatesMiddle coordinate position isPixel pixel
Value.
The feasibility and validity of method in order to further illustrate the present invention, tests the method for the present invention.
Weight just is carried out to tetra- width stereo-picture of Image1, Image2, Image3 and Image4 using the method for the present invention below
Positioning experiment." red green " figure, Fig. 2 b that Fig. 2 a give the original three-dimensional image of " Image1 " give resetting for " Image1 "
" red green " figure behind position to the width 60% of original three-dimensional image;Fig. 3 a give the original three-dimensional image of " Image2 "
" red green " figure, Fig. 3 b give " red green " figure being reoriented to after the width 60% of original three-dimensional image of " Image2 ";Figure
4a gives " red green " figure, Fig. 4 b of the original three-dimensional image of " Image3 ", and to give being reoriented to for " Image3 " original vertical
" red green " figure after the width 60% of body image;Fig. 5 a give " red green " figure, the figure of the original three-dimensional image of " Image4 "
5b gives " red green " figure being reoriented to after the width 60% of original three-dimensional image of " Image4 ".From Fig. 2 a to Fig. 5 b
As can be seen that the reorientation stereo-picture obtained using the method for the present invention can preferably retain important notable semantic information,
It can guarantee the consistency of left view point image and right visual point image again simultaneously.