1

I'm trying to process an image into a video by apply effects to each frame. One effect 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.

Python example:

python example

I'm doing this in python with OpenCV. But, I just tested doing it with an action in 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: because I need the previous frame to exist I cannot simply re-reference the original image and scale to the appropriate size for any given frame.

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
    Sep 6 at 20:16
  • Now that you mention it I'm thinking about automatically inpainting the area every x num of frames. Sep 6 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
    Sep 6 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
    Sep 6 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
    Sep 7 at 10:14
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, privacy policy and cookie policy

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