The MistikaVR "Optical Flow" objective is to identify each small feature of the scene on two overlapping images, establishing the pixel correspondence between them.  Knowing this information MistikaVR can provide a very precise stitching, by rebuilding the borders of both images to make those features to coincide.


This is a complex calculation also involving several frames before/after the analysed frame, tracking each small feature of the image over the time and calculating motion vectors for even the smallest features of the images. 


Our recommendation is to only change the default values if you find noticeable artifacts on the result.


The behaviour of the algorithm is controlled with these parameters (they appear in the recommended order to adjust):


Parameters:


Range


Improves precision by telling the algorithm to concentrate on features of smaller or bigger sizes (or "none" for similar priority). 


- Select the size that better represent the content of the stitching areas with visible artifacts. For example, if the image content is a stadium with thousands of little spectators of few pixels each one and you appreciate artifacts on them, selecting the "Small" setting should make a significant improvement. In other example, if the artifacts are visible in areas with big buildings or other big elements then select a larger setting. 


Smoothness


Tells the algorithm if the features that are moving are following smooth paths or if they can experience abrupt changes in direction. In that way, in case of doubt the solver will choose motion vectors more parallel rather than solutions producing motion vectors that are crossing with each other. 


Example: Imagine two similar persons wearing identical clothes and walking on collision course.  From the algorithm perspective, an action where the two persons crash into each other and rebound may produce very similar images to one where they avoid collision and simply pass behind each other.  In a situation like this the Mistika OF algorithm could be confused  and choose the wrong solution, thus creating artifacts like warped limbs from the first person sticking to the second person for some frames (the algorithm may find similar limbs without knowing which one is from which person).  In these situations you can help the Mistika solver by telling it to expect smoother movements (persons passing in front of each other in the example) or to permit abrupt changes (persons rebounding in the example).



MinLevel


Resolution factor. The higher the value, the lower the resolution of the smallest features to track, thus accelerating the processing at the potential cost of precision. A value 0 will track at pixel level, bigger values will half the resolution.


- Decreasing it to 0 may provide some extra accuracy,  but it is only indicated for images with excellent focus, little movement and very little noise. Otherwise it can be counter productive.


- Increasing it will provide faster processing, but some artifacts may appear. 


Levels


Refines the calculation of the direction of motion vectors. 


- Increase it in case of complex movements with multiple features crossing their paths.


Iterations


Revises movement in areas with little detail. If there is not enough texture or  details in the images then the algorithm may fail to track each little feature correctly. Increasing this parameter will force to calculate more iterations to try more possible solutions of the solver equations, then comparing the accuracy of each one to find the optimal solution.