Shear instead of Rotate to fix horizon

Discussion in 'Image Processing' started by Ian., Dec 17, 2013.

  1. Ian.

    Ian. Mu-43 All-Pro

    Mar 13, 2013
    Munich
    Ian
    If I have a picture where the horizon is nearly, but not perfectly horizontal, I want to straighten it. If I rotate the image by a very small angle, the image loses sharpness slightly yet noticeably. This is understandable as it has to re-render the sloping pixels in a horizontal grid again. (16mp image)

    Question 1: Am I being too fussy? Or does this annoy you?

    It occurred to me today to use the "shear" function to level the horizon. "Transform - Shear" in the Gimp for example. This shifts blocks of pixels up and down, levelling the horizon. Yet not needing to re-render inside the blocks.

    Question 2: Does anyone else use this technique? It this well known? Or is this unnecessary or not effective. Am I chasing rainbows?
     
  2. dwig

    dwig Mu-43 Top Veteran

    624
    Jun 26, 2010
    Key West FL
    no

    I abhor very visible horizons that are not accurately (+/-0.5 degrees) leveled. When large portions of a horizon are lost in the trees (literally or figuratively) I don't mind a small error.

    I use LR and PS but not GIMP. I usually use a rotate function in either LR or PS but have occasionally used a shear transform in PS. When the error is small and when there are not any long obviously vertical lines in the image I find that shear works very well. When there is both a long visible horizon and a long clearly vertical edge then rotate is the only decent approach.
     
  3. Rudy

    Rudy Mu-43 Veteran

    449
    Jan 24, 2013
    Oakland, CA
    The pixels are re-render with shear as well, just in the vertical though as pixels will have to be shifted up or down by fractional values.
    The loss of image quality will be less than for a rotation, but it's not zero.
    Rudy
     
  4. Ian.

    Ian. Mu-43 All-Pro

    Mar 13, 2013
    Munich
    Ian
    Ah. So this is not new territory. Except shear tools 'should' be able to transform by whole pixels. Thus avoiding the re-render.
    For example, divide your image into say 10 equal width vertical strips. Nudge up strip 6 by 1 pixel, strip 7 by 2. 8 by 3 etc. up to 10. And the reverse nudge for strips 5 down to 1. No re-render required for a 10 pixel shear. To increase the effective rotation, divide the image into more, thinner strips.
     
  5. Rudy

    Rudy Mu-43 Veteran

    449
    Jan 24, 2013
    Oakland, CA
    Except this would look really bad as you would see the steps being generated unless you either downsize the image or it is pretty fuzzy to begin with.
     
  6. Cruzan80

    Cruzan80 Mu-43 All-Pro

    Aug 23, 2012
    Denver, Co
    Sean Rastsmith
    You may be chasing a while, as all the rainbows I see here are curved, not level.:tongue::rolleyes:
     
  7. FastCorner

    FastCorner Mu-43 Veteran

    310
    May 28, 2011
    QFT.
     
  8. Ian.

    Ian. Mu-43 All-Pro

    Mar 13, 2013
    Munich
    Ian
    A series of one pixel steps seem to be completely invisible on the 16MP images that I tested. Maybe you could find a scene where it is noticeable? But still worth the benefit of not fuzzing up all the pixels.
     
  9. Ian.

    Ian. Mu-43 All-Pro

    Mar 13, 2013
    Munich
    Ian
    The reason for this interest is that the "short leg effect" of having a sloping horizon is equally important to IQ as ISO, Focus, Sensor, Lens quality etc.
    The problem goes away when you take the picture correctly in the first place. I hear you say. However there are several reasons that contribute to it cause. My biggest annoyance is that the spirit level display always switches itself off for some reason. I find myself regularly switching it back on. But I've never switched it off. Any ideas?
    Other reasons being, not able to see the viewfinder properly. For example, shots so low that it's difficult to look through the EVF. I struggle to hold a steady pose for long when crouching down. I also can only see the screen with reading glasses on and the EVF with them off. Does anybody use those hot shoe spirit levels? Are they accurate enough? Hmmmm.
     
  10. Iconindustries

    Iconindustries Mu-43 Hall of Famer

    When using the straighten tool in Aperture I found that it doesn't render as sharp as the original until you press enter. After enter is pressed the image clarity returns.
     
  11. Ian.

    Ian. Mu-43 All-Pro

    Mar 13, 2013
    Munich
    Ian
    I guess that's the preview being based on a reduced resolution for speed.
    The rotated version has to be slightly fuzzed up though. But does that matter?