Matrix transform.  
More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "jabcode.h"
#include "detector.h"
|  | 
| jab_perspective_transform * | square2Quad (jab_float x0, jab_float y0, jab_float x1, jab_float y1, jab_float x2, jab_float y2, jab_float x3, jab_float y3) | 
|  | Calculate transformation matrix of square to quadrilateral.  More... 
 | 
|  | 
| jab_perspective_transform * | quad2Square (jab_float x0, jab_float y0, jab_float x1, jab_float y1, jab_float x2, jab_float y2, jab_float x3, jab_float y3) | 
|  | Calculate transformation matrix of quadrilateral to square.  More... 
 | 
|  | 
| jab_perspective_transform * | multiply (jab_perspective_transform *m1, jab_perspective_transform *m2) | 
|  | Calculate matrix multiplication.  More... 
 | 
|  | 
| jab_perspective_transform * | perspectiveTransform (jab_float x0, jab_float y0, jab_float x1, jab_float y1, jab_float x2, jab_float y2, jab_float x3, jab_float y3, jab_float x0p, jab_float y0p, jab_float x1p, jab_float y1p, jab_float x2p, jab_float y2p, jab_float x3p, jab_float y3p) | 
|  | Calculate transformation matrix of quadrilateral to quadrilateral.  More... 
 | 
|  | 
| jab_perspective_transform * | getPerspectiveTransform (jab_point p0, jab_point p1, jab_point p2, jab_point p3, jab_vector2d side_size) | 
|  | Get perspetive transformation matrix.  More... 
 | 
|  | 
| void | warpPoints (jab_perspective_transform *pt, jab_point *points, jab_int32 length) | 
|  | Warp points from source image to destination image in place.  More... 
 | 
|  | 
Matrix transform. 
libjabcode - JABCode Encoding/Decoding Library
Copyright 2016 by Fraunhofer SIT. All rights reserved. See LICENSE file for full terms of use and distribution.
Contact: Huajian Liu liu@s.nosp@m.it.f.nosp@m.raunh.nosp@m.ofer.nosp@m..de Waldemar Berchtold walde.nosp@m.mar..nosp@m.berch.nosp@m.told.nosp@m.@sit..nosp@m.frau.nosp@m.nhofe.nosp@m.r.de 
Get perspetive transformation matrix. 
- Parameters
- 
  
    | p0 | the coordinate of the 1st finder/alignment pattern |  | p1 | the coordinate of the 2nd finder/alignment pattern |  | p2 | the coordinate of the 3rd finder/alignment pattern |  | p3 | the coordinate of the 4th finder/alignment pattern |  | side_size | the side size of the symbol |  
 
- Returns
- the transformation matrix 
 
 
Calculate matrix multiplication. 
- Parameters
- 
  
    | m1 | the multiplicand |  | m2 | the multiplier |  
 
- Returns
- m1 x m2 
 
 
      
        
          | jab_perspective_transform* perspectiveTransform | ( | jab_float | x0, | 
        
          |  |  | jab_float | y0, | 
        
          |  |  | jab_float | x1, | 
        
          |  |  | jab_float | y1, | 
        
          |  |  | jab_float | x2, | 
        
          |  |  | jab_float | y2, | 
        
          |  |  | jab_float | x3, | 
        
          |  |  | jab_float | y3, | 
        
          |  |  | jab_float | x0p, | 
        
          |  |  | jab_float | y0p, | 
        
          |  |  | jab_float | x1p, | 
        
          |  |  | jab_float | y1p, | 
        
          |  |  | jab_float | x2p, | 
        
          |  |  | jab_float | y2p, | 
        
          |  |  | jab_float | x3p, | 
        
          |  |  | jab_float | y3p | 
        
          |  | ) |  |  | 
      
 
Calculate transformation matrix of quadrilateral to quadrilateral. 
- Parameters
- 
  
    | x0 | the x coordinate of the 1st source point |  | y0 | the y coordinate of the 1st source point |  | x1 | the x coordinate of the 2nd source point |  | y1 | the y coordinate of the 2nd source point |  | x2 | the x coordinate of the 3rd source point |  | y2 | the y coordinate of the 3rd source point |  | x3 | the x coordinate of the 4th source point |  | y3 | the y coordinate of the 4th source point |  | x0p | the x coordinate of the 1st destination point |  | y0p | the y coordinate of the 1st destination point |  | x1p | the x coordinate of the 2nd destination point |  | y1p | the y coordinate of the 2nd destination point |  | x2p | the x coordinate of the 3rd destination point |  | y2p | the y coordinate of the 3rd destination point |  | x3p | the x coordinate of the 4th destination point |  | y3p | the y coordinate of the 4th destination point |  
 
- Returns
- the transformation matrix 
 
 
      
        
          | jab_perspective_transform* quad2Square | ( | jab_float | x0, | 
        
          |  |  | jab_float | y0, | 
        
          |  |  | jab_float | x1, | 
        
          |  |  | jab_float | y1, | 
        
          |  |  | jab_float | x2, | 
        
          |  |  | jab_float | y2, | 
        
          |  |  | jab_float | x3, | 
        
          |  |  | jab_float | y3 | 
        
          |  | ) |  |  | 
      
 
Calculate transformation matrix of quadrilateral to square. 
- Parameters
- 
  
    | x0 | the x coordinate of the 1st source point |  | y0 | the y coordinate of the 1st source point |  | x1 | the x coordinate of the 2nd source point |  | y1 | the y coordinate of the 2nd source point |  | x2 | the x coordinate of the 3rd source point |  | y2 | the y coordinate of the 3rd source point |  | x3 | the x coordinate of the 4th source point |  | y3 | the y coordinate of the 4th source point |  
 
- Returns
- the transformation matrix 
 
 
      
        
          | jab_perspective_transform* square2Quad | ( | jab_float | x0, | 
        
          |  |  | jab_float | y0, | 
        
          |  |  | jab_float | x1, | 
        
          |  |  | jab_float | y1, | 
        
          |  |  | jab_float | x2, | 
        
          |  |  | jab_float | y2, | 
        
          |  |  | jab_float | x3, | 
        
          |  |  | jab_float | y3 | 
        
          |  | ) |  |  | 
      
 
Calculate transformation matrix of square to quadrilateral. 
- Parameters
- 
  
    | x0 | the x coordinate of the 1st destination point |  | y0 | the y coordinate of the 1st destination point |  | x1 | the x coordinate of the 2nd destination point |  | y1 | the y coordinate of the 2nd destination point |  | x2 | the x coordinate of the 3rd destination point |  | y2 | the y coordinate of the 3rd destination point |  | x3 | the x coordinate of the 4th destination point |  | y3 | the y coordinate of the 4th destination point |  
 
- Returns
- the transformation matrix 
 
 
Warp points from source image to destination image in place. 
- Parameters
- 
  
    | pt | the transformation matrix |  | points | the source points |  | length | the number of source points |