summaryrefslogtreecommitdiff
path: root/macros/geometricshearer.sci
blob: 8d8e72a77647d9237cf0984a49f77bf24204621d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
function [out] = GeometricShearer(inputimage,direction,value)
// Shear the image
//
// Calling Sequence 
// output_image = GeometricShearer(inputimage,direction,value);
//
// Parameters
//
// inputimage : image matrix on which geometric shear has to be applied
// direction : An input string that like. 'Horizontal' to shear the image in horizontal direction or 'Vertical' to shear the image in vertical direction
// value : A scalar value i.e amount to want shift the pixel of image
// output_image : sheared image
//
// Description
// This function returns the sheared image.It shears the image by shifting the rows or columns of image.
//
// Examples
// a = imread('lena.jpeg');
// b = GeometricShearer(a,'Horzontal',5);
// imshow(b);
//
// Authors:
//
//Diwakar Bhardwaj

          inputimage1=mattolist(inputimage);
          a = opencv_GeometricShearer(inputimage1,direction,value);
          dimension=size(a)
          for i = 1:dimension
              out(:,:,i)=a(i);
          end

endfunction;