Our supervised streamline segmentation algorithm allows the extraction of user-defined flow features. For each data set, users are required to manually segment only a small number of streamlines in order to define what flow features they want to extract from the flow field. The user-picked segmentation points along a streamline will be used to generate positive training examples, whereas the remaining ones are used to generate negative training examples. Multi-scale feature vectors are computed for each positive and negative example, and fed into a binary support vector machine (SVM) trainer. Finally, we use the trained classifier to determine the segmentation points for all the streamlines in the data set. A post-processing step is required for grouping nearby segmentation points detected by the classifier.
Given an input pool of streamlines (left), we first segment each streamline using our previously learned classifier for segmentation points (middle, the red point is the segmentation point found by our algorithm). Partial streamline features specified by users will be clustered based on their similarities (right).
We provide the source code of the important steps in our approach. These important steps include generating representative streamlines for training, streamline simplification, feature vector computation, and the training algorithm. The source code has been compiled successfully on Windows 7 using Visual Studio 2013 Express. The source code makes use of the following three external libraries:
- Eigen library used to compute minimum volume bounding ellipsoid
- libSVM library used to perform supervised training
- Affinity Propagation binary used for clustering
- Click here to download the source code: src.zip
Yifei Li, Chaoli Wang, and Ching-Kuang Shene. Extracting Flow Features via Supervised Streamline Segmentation. Computers & Graphics, 52:79-92, Nov 2015. [PDF]