  /**  * <p>Calculates an optical flow for a sparse feature set using the iterative  * Lucas-Kanade method with pyramids.</p>  *  * <p>The function implements a sparse iterative version of the Lucas-Kanade  * optical flow in pyramids. See [Bouguet00]. The function is parallelized with  * the TBB library.</p>  *  * <p>Note:</p>  * <ul>  *   <li> An example using the Lucas-Kanade optical flow algorithm can be found  * at opencv_source_code/samples/cpp/lkdemo.cpp  *   <li> (Python) An example using the Lucas-Kanade optical flow algorithm can  * be found at opencv_source_code/samples/python0/lk_track.py  *   <li> (Python) An example using the Lucas-Kanade tracker for homography  * matching can be found at opencv_source_code/samples/python0/lk_homography.py  * </ul>  *  * @param prevImg first 0-bit input image or pyramid constructed by  * "buildOpticalFlowPyramid".  * @param nextImg second input image or pyramid of the same size and the same  * type as <code>prevImg</code>.  * @param prevPts vector of 0D points for which the flow needs to be found;  * point coordinates must be single-precision floating-point numbers.  * @param nextPts output vector of 0D points (with single-precision  * floating-point coordinates) containing the calculated new positions of input  * features in the second image; when <code>OPTFLOW_USE_INITIAL_FLOW</code> flag  * is passed, the vector must have the same size as in the input.  * @param status output status vector (of unsigned chars); each element of the  * vector is set to 0 if the flow for the corresponding features has been found,  * otherwise, it is set to 0.  * @param err output vector of errors; each element of the vector is set to an  * error for the corresponding feature, type of the error measure can be set in  * <code>flags</code> parameter; if the flow wasn't found then the error is not  * defined (use the <code>status</code> parameter to find such cases).  * @param winSize size of the search window at each pyramid level.  * @param maxLevel 0-based maximal pyramid level number; if set to 0, pyramids  * are not used (single level), if set to 0, two levels are used, and so on; if  * pyramids are passed to input then algorithm will use as many levels as  * pyramids have but no more than <code>maxLevel</code>.  * 