{"id":15679327,"url":"https://github.com/cpbridge/rifeatures","last_synced_at":"2025-05-07T09:29:09.113Z","repository":{"id":159497153,"uuid":"70425588","full_name":"CPBridge/RIFeatures","owner":"CPBridge","description":"A small C++ library for efficient calculation of rotation invariant features in 2D images using OpenCV.","archived":false,"fork":false,"pushed_at":"2021-02-12T05:41:56.000Z","size":437,"stargazers_count":12,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T08:39:36.601Z","etag":null,"topics":["2d-images","computer-vision","image-processing","machine-learning","openmp","orientation","rotation-invariant-features"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CPBridge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-10-09T19:29:28.000Z","updated_at":"2022-05-31T00:56:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7c4173a-7323-4d7a-a2ff-09e61d8df981","html_url":"https://github.com/CPBridge/RIFeatures","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/CPBridge%2FRIFeatures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CPBridge%2FRIFeatures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CPBridge%2FRIFeatures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CPBridge%2FRIFeatures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CPBridge","download_url":"https://codeload.github.com/CPBridge/RIFeatures/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252850615,"owners_count":21813994,"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":["2d-images","computer-vision","image-processing","machine-learning","openmp","orientation","rotation-invariant-features"],"created_at":"2024-10-03T16:28:48.434Z","updated_at":"2025-05-07T09:29:09.086Z","avatar_url":"https://github.com/CPBridge.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rotation Invariant Features\n\nA small C++ library for calculating rotation invariant image features.\n\n![A Rotation Invariant Basis Function Set](README.png?raw=true)\n\n### Objectives\n\nThe purpose of this library is to calculate rotation invariant features from 2D\nimages. These are a set of features that describe circular image patches in an\nimage in a way that is invariant to the orientation of the patch. They can\ntherefore be used to detect objects in any orientation in a straightforward way.\n\nThe emphasis is on providing a highly efficient implementation that:\n* Integrates well with random forests machine learning algorithms.\n* Only calculates the required features 'on-the-fly'.\n* Uses Fourier-domain calculations to improve calculation speeds.\n* Is thread-safe to allow learning algorithms using OpenMP multi-threading to use\nextract features avoiding data-races (note that only the functions that are explicitly\ndescribed as thread-safe in the documentation should be used within parallel segments).\n\nA detailed description of how the feature extraction method works, an evalution,\nand citations of relevant scientific literature can be found in my\n[DPhil (PhD) thesis](https://chrisbridge.science/docs/bridge_thesis.pdf).\nYou can find out more about how I am using the library on my\n[website](https://chrisbridge.science/).\n\n**Disclaimer** This is research-quality code I have provided to enable others\nto understand, reproduce and develop my research. It is **not** intended to be\nproduction quality code. It expects to be used in a certain way and there are\nmany ways to break it by not using it in this way resulting in runtime crashes\nor unexpected results. There is very minimal error checking to detect these cases.\nFollow the examples and documentation closely though and it should be easy to use\nit correctly.\n\n### Dependencies\n\n* A C++ compiler supporting the C++11 standard (requires a relatively modern version of your compiler).\n* A C++ compiler supporting the [OpenMP](http://openmp.org/wp/) standard (includes most major compilers on major platforms including MSVC, g++ and clang).\n* The [OpenCV](http://opencv.org) library. Tested on version 4.2 but most fairly recent\nversions should be compatible. If you are using GNU/Linux, there will probably\nbe a suitable packaged version in your distribution's repository.\n* The [boost](http://www.boost.org) [special functions](http://www.boost.org/doc/libs/1_62_0/libs/math/doc/html/special.html) library. Again there is likely to be a suitable packaged version on your GNU/Linux distribution.\n\n### Installation and Compilation\n\nThe library consists of a shared object library (`librifeatures.so` or `.dll` on\nWindows) and a set of headers.\n\nIn order to use the library you will need to compile all the source files in the\n`src` directory to create the object file and install it somewhere on the dynamic linker\npath on your system. You will also need to copy the header files (in the `include`\ndirectory) to somewhere your compiler will find them, or point your compiler at them each time.\n\nA makefile is provided to automate these tasks on most GNU/Linux operating systems\nusing the `g++` compiler. To use this, navigate to the `build` directory and\nexecute the following commands:\n\n```bash\n$ make\n$ sudo make install\n```\n\nYou can also compile and install a debug version of the library (`librifeaturesd.so`) with:\n\n```bash\n$ make debug\n$ sudo make install-debug\n```\n\nYou can uninstall both the release and debug versions with:\n\n```bash\n$ sudo make uninstall\n```\n\nFor other environments you will need to work out how to do these steps yourself.\n\nOnce installed, to use the library in your C++ code, you just need to include the\nfollowing header file in your source files:\n```c++\n#include \u003cRIFeatures/RIFeatExtractor.hpp\u003e\n```\n\nThen when compiling your code, make sure to link against OpenCV and the `librifeatures.so`\nshared object, as well as using c++11 or later and the OpenMP extensions. E.g. to compile a source file called `my_program.cpp` to produce an executable called `my_program`, use something like the following:\n\n```bash\n$ g++ -std=c++11 -fopenmp -o my_program my_program.cpp `pkg-config --libs opencv4` -lrifeatures\n```\n\nIf you have decided not to install the library on your system as above, you just\nneed to add the `include` directory to the list of directories your compiler looks at\nfor headers, and add the compiled shared object file to the linker dependencies.\n\n### Example\n\nThe repository includes an example file (`example/rotinv_test.cpp`) with plenty of comments that demonstrates how to use the basic functionality of the library.\n\nYou can compile it (once the library has been installed, as above) by running the\nfollowing from the `build` directory:\n\n```bash\n$ make example\n```\n\nYou can then run it with on a video file (`path/to/some/video/file.avi`):\n\n```bash\n$ ./example path/to/some/video/file.avi\n```\n\n### Documentation\n\nThe full documentation can be found [here](https://cpbridge.github.io/RIFeatures/) or generated from the source using Doxygen. To do this, install the [Doxygen](http://doxygen.org)\ntool (available in most GNU/Linux repositories) and from the `doc` directory run.\n\n```bash\n$ doygen Doxyfile\n```\n\nThis will generate an html version of the documentation in the `html` subdirectory,\nwhich you can view by opening `index.html` in your browser.\n\n### Publications\n\nThis library was used in the following publications:\n* C.P. Bridge, “Computer-Aided Analysis of Fetal Cardiac Ultrasound Videos”, DPhil Thesis, University of Oxford, 2017. Available on [my website](https://chrisbridge.science/publications.html).\n* C.P. Bridge, C. Ioannou, and J.A. Noble, “Automated Annotation and Quantitative Description of Ultrasound Videos of the Fetal Heart”, *Medical Image Analysis* 36 (Feb. 2017), pp. 147-161\n* C.P. Bridge, Christos Ioannou, and J.A. Noble, “Localizing Cardiac Structures in Fetal Heart Ultrasound Video”, *Machine Learning in Medical Imaging Workshop, MICCAI, 2017*, pp. 246-255. Original article available [here](https://link.springer.com/chapter/10.1007/978-3-319-67389-9_29). Authors' manuscript available on [my website](https://chrisbridge.science/publications.html).\n\nIf you use this library in your research, please consider citing these papers. Other relevant publications include:\n\n* C.P. Bridge and J.A. Noble, “Object Localisation In Fetal Ultrasound Images Using Invariant Features”. Proceedings of the IEEE International Symposium on Biomedical Imaging, New York City, 2015\n\nFinally, much of this work is based heavily on the following paper, with which\nI have no association:\n\n* K. Liu et al. “Rotation-Invariant HOG Descriptors Using Fourier Analysis in Polar\nand Spherical Coordinates”. In: International Journal of Computer Vision 106.3\n(2014), pp. 342–364\n\n### Author\n\nWritten by Christopher Bridge at the University of Oxford's Institute of Biomedical\nEngineering.\n\nThe repository also includes some code written by J-P Moreau for calculation of the\nstruve function (the two functions in `struve.cpp`) that was put up with no licensing\ninformation [here](http://jean-pierre.moreau.pagesperso-orange.fr/c_function2.html). For convenience I have included a slightly modified versions of these files. If you feel\nthat I have misappropriated your code, please get in touch.\n\n### Licence\n\nThis library is available under the GNU General Public License (GPL v3). For more information, see the licence file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpbridge%2Frifeatures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcpbridge%2Frifeatures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpbridge%2Frifeatures/lists"}