{"id":19386291,"url":"https://github.com/davidstutz/flow-io-opencv","last_synced_at":"2025-04-23T22:32:30.867Z","repository":{"id":33945864,"uuid":"37671761","full_name":"davidstutz/flow-io-opencv","owner":"davidstutz","description":"Fork and OpenCV wrapper of the optical flow I/O and visualization code provided as part of the Sintel dataset [1].","archived":false,"fork":false,"pushed_at":"2016-08-22T20:48:32.000Z","size":31399,"stargazers_count":21,"open_issues_count":0,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T21:51:20.521Z","etag":null,"topics":["computer-vision","opencv","optical-flow"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidstutz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-18T16:41:04.000Z","updated_at":"2024-08-05T12:49:40.000Z","dependencies_parsed_at":"2022-07-13T18:20:38.799Z","dependency_job_id":null,"html_url":"https://github.com/davidstutz/flow-io-opencv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidstutz%2Fflow-io-opencv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidstutz%2Fflow-io-opencv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidstutz%2Fflow-io-opencv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidstutz%2Fflow-io-opencv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidstutz","download_url":"https://codeload.github.com/davidstutz/flow-io-opencv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250527309,"owners_count":21445351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","opencv","optical-flow"],"created_at":"2024-11-10T10:04:56.339Z","updated_at":"2025-04-23T22:32:25.850Z","avatar_url":"https://github.com/davidstutz.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flow IO OpenCV\n\n[![Build Status](https://travis-ci.org/davidstutz/flow-io-opencv.svg?branch=master)](https://travis-ci.org/davidstutz/flow-io-opencv)\n\nThis is a fork and [OpenCV](http://opencv.org/) wrapper of the optical flow input/output code provided as part of the [Sintel dataset](http://sintel.is.tue.mpg.de/) [1]. The code is based on `imageLib`, a small C++ library for multi-channel images based on the [StereoMatcher](http://research.microsoft.com/en-us/downloads/9bc7fd74-5953-4064-9732-76405573aaef/) [2] code by Daniel Scharstein and Richard Szeliski. We refer to:\n\n* [lib/README-FlowIO](lib/README-FlowIO.md): the original README shipped with the Sintel dataset.\n* [lib/imageLib/README](lib/imageLib/README.md): the original README of `imageLib` shipped with the Sintel dataset.\n* [lib/imageLib/README-StereoMatcher](lib/imageLib/README-StereoMatcher.md): the original README of the StereoMatcher.\n\n    [1] D. J. Butler, J. Wulff, G. B. Stanley, M. J. Black.\n        A naturalistic open source movie for optical flow evaluation.\n        In European Conference on Computer Vision, pages 611 - 625, 2012.\n    [2] D. Scharstein, R. Szeliski.\n        A taxonomy and evaluation of dense two-frame stereo correspondence algorithms.\n        Technical Report MSR-TR-2001-81, Microsoft Research, 2001.\n\n## Compile\n\nThe OpenCV wrapper is based on [CMake](http://www.cmake.org/) and (surprise!) OpenCV (for example, follow [Installing OpenCV on Linux](http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html#linux-installation) to install OpenCV). The code has been tested on Ubuntu 14.04 and 14.10.\n\n    $ sudo apt-get install cmake build-essential libboost-all-dev\n    $ mkdir build\n    $ cd build\n    $ cmake ..\n    $ make\n    $ ./cli/cli --help\n    Allowed options:\n      --help                produce help message\n      --input-dir arg       input directory\n      --output-dir arg      output directory\n      --vis-dir arg         visualize results in a separate directory\n\nThe provided command line tool can be used to convert `.flo` files to `.txt` files using the `cv::FileStorage` format. Additionally, the tool provides visualization capabilities. For example:\n\n    $ ./cli/cli ../alley_1_flow ../alley_1_cflow --vis-dir ../alley_1_flow_vis\n\nThe result is shown below:\n\n![Example: visualized flow of the alley_1 sequence.](screenshot.png?raw=true \"Example: visualized flow of the alley_1 sequence.\")\n\n## Usage\n\nA usage example is provided in `cli/main.cpp`:\n\n    // Define input file and output (visualization) path (or directly output file).\n    boost::filesystem::path in_file(...);\n    boost::filesystem::path out_dir(...);\n    boost::filesystem::path vis_dir(...);\n    \n    cv::Mat flow = FlowIOOpenCVWrapper::read(in_file.string());\n    \n    boost::filesystem::path txt_path = out_dir / in_file.filename();\n    IO::writeMat(txt_path.string() + \".txt\", flow);\n    \n    if (visualize) {\n        cv::Mat image = FlowIOOpenCVWrapper::flowToColor(flow);\n\n        boost::filesystem::path image_path = vis_dir / in_file.filename();\n        cv::imwrite(image_path.string() + \".png\", image);\n    }\n\n## License\n\nSee `lib/README-FlowIO.md` and `lib/imageLib/README.md` for license information. The OpenCV wrapper and the corresponding command line tool are licensed as follows:\n\nCopyright (c) 2015, David Stutz\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice,this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n* Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidstutz%2Fflow-io-opencv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidstutz%2Fflow-io-opencv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidstutz%2Fflow-io-opencv/lists"}