Output image with alternate reverse rows

asked Jan 15 '14

Summer gravatar image

updated Jan 15 '14

Would it be possible to do fast process to get a "snake" effect, I mean when you go to a new row, not to start from left of the new row but from the right. this is the input image:

   A[ ROW.1 = 0 , 1 , 2 , 3
      ROW.2 = 0 , 1 , 2 , 3
      ROW.3 = 0 , 1 , 2 , 3 ]

this should be the output

 B[ ROW.1 = 0 , 1 , 2 , 3 
    ROW.2 = 3 , 2 , 1 , 0 
    ROW.3 = 0 , 1 , 2 , 3 ]

if this can be done, can you please advice me on how this can be done?

Preview: (hide)

Comments

I've looked at numpy.roll() but this do a shift, I need a reverse function.

Summer gravatar imageSummer (Jan 15 '14)edit