Page 1 of 1

Flickering around masks with static video?

PostPosted: Tue May 24, 2016 11:22 pm
by OpusMcN

I'm using masks in APG to remove chunks of our tripod, and I'm getting weird flickering at the boundaries between two videos in AVP, even though the cameras are perfectly still, and there's very little change in the videos.

This show's how I've set the mask up in APG for the tripod
How the masks are set up in APG

And this video shows the flickering at the blending. I would have though that with images this still and constant (really on camera grain/noise changing much) that very little would change on the blending.

Any ideas how to get this blend to be smooth and constant through the animation?



Re: Flickering around masks with static video?

PostPosted: Thu May 26, 2016 2:23 pm
by ClaireM

In the blending panel, can you remove the multiband (pick linear blending or no blending at all), render and let me know if this solves your issue?

Also, if it works but it downgrades the results at other seems of your video, you can turn the multiband to its lower level by moving the slider on the right part.

NOTE : Given the visual results, we guess that this is caused by the multiband algorithm using points that are located to closely to the edges of the input videos. Indeed, with the masks you set, you force the stitch to use points that are located really close to the edges of the central video and this can result in those kind of artifacts. We are currently working on this to find a way to reduce this.

Hope this helps,


Re: Flickering around masks with static video?

PostPosted: Thu May 26, 2016 10:38 pm
by OpusMcN
Hi Claire,

Unfortunately neither of those improves the situation. Both "linear" and "none" blend types just leave a black gap where the mask kicks in :


And setting the multiblend lower (to a value of 3) just makes the blend very blocky, but still shows flickering artifacts :


Setting the blend type to "smooth" gets rid of the flickering, but also gets rid of almost all the effect of the mask and the tripod appears back in shot :


It does seem a bit unpredictable, some of these panos rendering with much less flickering than others, despite the videos being almost identical for all (same camera rig, just set up at different places), and the mask points being placed in pretty much the same position for each one.



Re: Flickering around masks with static video?

PostPosted: Fri May 27, 2016 9:43 pm
by LoicB
Hi Craig,

As Claire told you, the flickering is due to the fact that you push the overlapping area right to the edge of your video file. Sadly, right now the only solution is to mask the tripod using a patch and deleting the masks you are using right now so that the cuts between your different videos are further from the edge.

It's normal that the smooth blending cancels the effects of the masking, since masks only work with sharp blending (iso in APG).

You can use this method : ... r_patching
So, rotate your image in APG so that the tripod is right in the center, export the part of your image that contains your tripod and make it disappear using the content aware filling in photoshop (it's gonna work perfectly with grass like in your shot). Re-import the patched image into APG, rotate the whole pano back to the normal position, save and your tripod should be patched in AVP.

Re: Flickering around masks with static video?

PostPosted: Sun May 29, 2016 11:16 pm
by OpusMcN
Thanks, I will give that a try. Unfortunately we're on a very fast turnaround for these shots, so any additional work makes life a bit more difficult. It still does seem odd that any sort of masking between two essentially static bits of video shouldn't blend in a consistent way between frames?

Re: Flickering around masks with static video?

PostPosted: Mon May 30, 2016 12:13 am
by OpusMcN
I've rendered out some tests using the patching as you suggested, and while it works in some cases it's also introducing another problem. We have people moving behind the tripod, and there's good footage of their feet and legs from a side camera that doesn't see the tripod. With the masks it brings that footage into play, and they look reasonable. With the patching, the painted-in grass appears over the top of everything, and feet and legs disappear when they pass under the patch. This is much more disconcerting than having the tripod in shot, and worse than the flickering.



Re: Flickering around masks with static video?

PostPosted: Mon May 30, 2016 2:24 pm
by LoicB

regarding the flickering, it's the way the multiband works at the moment that causes the problem (it tries to get pixels that are as far of the center of the image as possible instead of trying to get as far from the border as possible), and it's something that the dev team is looking at for a future release of AVP / APG. For the time being though, you will always get these kind of flickering artefacts if you push too much the boundaries of the overlapping areas.

For your immediate problem, what you can do is use a slightly different method (I will do a video tutorial very soon for this, but for the time being), here is a step by step.

Open APG and move the Pano to put your tripod in the middle.

Adjust the color correction to auto so that your can adjust everything together afterwards in post. Select the crop zone (centered, and ideally a square to make the import as easy as possible) and write the values.

Here, it's -40 / 40, so we know for later that the field of view is gonna be 80. If your tripod is smaller, it might be -30 / 30, so a FOV of 60. Switch to planar view so you have a flat picture to export. Render the croped zone.

Edit it in Photoshop to make the tripod disappear (select the tripod, content-aware fill).

Back in APG import your patch back into the pano, using "add image". Your patch should be centered over the previous image. Expand the group and change the FOV of your patch so that it matches what you wrote down earlier.

Get back to a spherical projection and to a full sphere in the crop menu.

Now you can go to the masking tool and put markers on the patch image and the images from your cameras so that only the place where the tripod used to be is kept from the patch.

This will allow you to keep the feets and everything else into your final video. You can now save (do it regularly during the process anyway :) ), go back to AVP and get your horizon straight again.

Hope this solves your problem. When you are used to it, you will find that it is a pretty quick process that works very well when the camera is static.

Let me know if you have other questions.