Re: How do I mirror a image vertically?




"akira32.comp.soft-sys.matlab" <rikcuo32@xxxxxxxxxxxx> wrote in message
news:1175325895.804240.53570@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
How do I mirror a image vertically?

Why not generate a 2D transformation matrix A, and apply that on the image?
A=[0 -1;1 0] will reflect points using the x-axis as the 'mirror' side,
where the x-axis in this case is horizontal straight line though your image
half way in between.

If you want to flip the image using its top edge as the mirror, then
assuming the origin is at the lower left corner of the image, then replace
(x,y) by (x,h-y), where h is the height of the image.

I did not try it, but I think this should work :)

Nasser




.



Relevant Pages

  • Re: How do I mirror a image vertically?
    ... Why not generate a 2D transformation matrix A, and apply that on the image? ... where the x-axis in this case is horizontal straight line though your image half way in between. ...
    (comp.soft-sys.matlab)
  • Re: How do I mirror a image vertically?
    ... Why not generate a 2D transformation matrix A, ... where the x-axis in this case is horizontal straight line though your ... Just did help on flipud, it looks like it should work. ...
    (comp.soft-sys.matlab)
  • Re: How do I mirror a image vertically?
    ... Nasser Abbasi wrote: ... where the x-axis in this case is horizontal straight line though your image half way in between. ... If you want to flip the image using its top edge as the mirror, then assuming the origin is at the lower left corner of the image, then replace by, where h is the height of the image. ...
    (comp.soft-sys.matlab)