I've written some software that allows the removal of an image slice, available on my github. It's a Qt application that makes use of a number of other projects, specifically Graphcut Textures as implemented by Nghia Ho.
How it works
A 360 panorama is essentially a sphere. The viewer is at the centre of this sphere, onto which the image is mapped. If we wanted to remove an element of the panorama, we could remove a slice of the sphere and then stretch the remaining content to fill the hole. The issue here is that a hard edge will be seen at the cut point.
For example here's the original image, viewed as a rectilinear:
If we perform a simple rectangular cut on the equirectangular, we'll end up with a very noticeable, hard line where the cut took place:
Instead, we can specify a region we want to remove and then let graphcuts find a good seam to disguise this removal. In the tool (available above), we specify a region to remove as well as an amount we're willing to lose in order to find a decent cut:
The red region indicates the section to be removed from the panorama. The "overlap size" specifies how many additional columns can be used to find a good cut. Specifying more here means losing more columns, but provides more flexibility as the algorithm looks for a good cut. Here's the cut (in green) for the overlap in the above image:
This is the 400 columns to the left of the cut, overlaid with the 400 columns to the right of the cut. Max-flow/min-cut is then used to find the best seam between them, as described in the graphcut textures paper. Here's the result of the above cut in the original panorama, viewed as rectilinear:
This is the 400 columns to the left of the cut, overlaid with the 400 columns to the right of the cut. Max-flow/min-cut is then used to find the best seam between them, as described in the graphcut textures paper. Here's the result of the above cut in the original panorama, viewed as rectilinear:
This cut is fairly impressive. Some artefacts can be seen, for example the branch at the centre top of the image ends abruptly where the cut has taken place. However overall the effect is fairly good.
An issue is that a cut results in a stretching of the rest of the content. We've removed a fairly large amount of the sphere, so the rest of the image must stretch to avoid having a missing slice. In a forest scene, this doesn't introduce too many issues - the trees could plausibly be more squat than in the original. However in certain circumstances, for example if a person was in the scene, this may not be acceptable. In such cases, techniques such as non-homogeneous stretching or additive seam carving could be used to avoid scaling the salient elements.
8bet - Thakasino
ReplyDelete8bet is the first online casino that accepts bitcoins, therefore making jeetwin it one of the most reliable 10bet online casino games. Play with real money! Rating: 5 · 12bet 1 vote
Make the most of mainly premium substances - you will find him or her for: clipping path serivce company
ReplyDeleteI recommend only good and reliable information, so see it: how to remove background in illustrator
ReplyDeleteWhile every effort has been made to observe quotation type rules, there could also be} some discrepancies. Please 카지노 사이트 check with the suitable type handbook or other sources in case you have any questions. If they complain, then you'll know what kind of|what sort of} folks you might be} dealing with.
ReplyDelete