Friday 5 April 2013

Horizontal Flip,vertical Flip and Reflection about origin in 24-bit color Image

Horizontal Flip:-Horizontal flip is an exchange of pixels in an image which shift the image left pixels into the right of the image and right pixels in left of the image.We need to traverse the whole image column wise and put all left most pixels into the right most side .Thus we move in each row and the image we get after traversing each row is a horizontally flipped image.Here is an input and output image for the horizontal flip program:-



Input Image
Output Image
 Vertical Flip:-Vertical flip shifts the topmost pixels to the bottom most pixels thus the whole pixels from top to bottom traverse and the pixels which are at the top in the input image goes to the bottom in the output image .In this we move row wise and traverse whole image .Here is the input and output image for the blog.


Input Image
Output Image
  Reflection about origin:-In this algorithms we move pixels diagonally .Thus the pixels which are located at the top left in the input image move to the bottom right in the output image and the output image is reflection about origin .We can say that this the combination of horizontal flip and vertical flip.Here is the input image and  image for the program:-

Input Image

Output Image

No comments:

Post a Comment