The MistikaVR "Optical Flow" objective is to identify each small feature of the scene on two overlapping images, establishing the exact 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.

In case of artifacts, before starting tweaking Optical Flow parameters it is recommended to try to find an optimal Convergence value. Adjust this parameter to avoid the need for optical flow warping  at  the most problematic depth, leaving

 the optical flow warping for less problematic areas.

Please also note that the Edge points are the primary tool to avoid artifacts, as in general they are much easier to adjust.

Said that, the behaviour of the Optical Flow algorithm is controlled with these parameters (they appear in the recommended order to adjust):


Gamma curve

This is not strictly an optical flow parameter (in fact it is in a separate location in the options tab), but it has a lot of influence in optical flow algorithms, and it should be always the first setting to check. 

This parameter is also part of the source clip import settings, and it will tell Mistika what is gamma curve of the source images (check for it in your camera documentation, or if the source images have been pre-processed ask the originator). Setting the correct value is specially important for accurate colour matching.


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, then 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 you should select a larger setting. 


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 between them 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 one 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 a few 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 crashing into each other and rebounding in this example).


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 for each unit increment.

- Decreasing it to 0 may provide some extra accuracy or small features and fine textures,  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. 


Refines the calculation of the direction of motion vectors. 

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


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 solution to find the optimal one.