2

I'm trying to process an image iteratively. I have an order of operations, specifically a series of effects. This process loops until I'm satisfied with the result. To showcase how the process ends up at the final result I'm making a little video, snapping a frame after each iteration.

Just one of effects is a slight zoom, say 5%. I'm running into an issue where after a few frames an obvious cross/seam begins to appear at the center of the zoom point. If I bump up the zoom to 30% the issue is nonexistent. I think there's some type of rounding error building up over time.

I'm doing this in python with OpenCV. But, I just tested Photoshop and it produced the same result. So, it seems this may be an issue someone else has run into. Yet, I cannot find any solutions in my research. I'm not certain this can be fully mitigated. Any ideas would be greatly appreciated.

Note: This is an iterative process. I am running multiple effects on the image with each run of the process. The order of the operations matters. Therefore I need the previous frame to exist so I cannot simply re-reference the original image and scale to the appropriate size for any given frame.

Python example:

python example

Photoshop example:

photoshop example

8
  • Careful manual Clone Stamp and repair. There's no automated method here due to the intricacy of the artwork.
    – Scott
    Commented Sep 6, 2021 at 20:16
  • Now that you mention it I'm thinking about automatically inpainting the area every x num of frames. Commented Sep 6, 2021 at 20:28
  • Thing is, that looks like a possible wallpaper pattern. If it is, one could define the actual pattern tile and then use that. Your repeat isn't actually aligned in many areas, especially on the horizontal seam. This is just guessing without seems the full, original, untiled, art.
    – Scott
    Commented Sep 6, 2021 at 20:36
  • Is your image one flattened image or does it consist of multiple pieces? If it's the latter, flattening could work. (Although I don't fully understand what we are seeing here.)
    – Wolff
    Commented Sep 6, 2021 at 20:59
  • 1
    Clearly, repeated resampling is the cause of the problem. To be honest, perhaps you should use some video editing software instead to create a zoom effect. I think you could probably do it in AfterEffects or Blender, without the need to resample at all. Note that video editing questions belong on Video Production Stack Exchange and are off-topic here.
    – Billy Kerr
    Commented Sep 7, 2021 at 10:14

1 Answer 1

0

Some mitigations I've found:

  • Rotate the image slightly as part of the "effects." Since the seams only appear after multiple passes of the scale effect this should prevent them from appearing by stopping any build-up of errors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.