Migrated ComponentLabeling to cv::Mat