Skip to content

Commit 5f795ef

Browse files
committed
Cleanup
1 parent 6693895 commit 5f795ef

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Experimental Rust bindings for OpenCV 3 and 4.
88

99
The API is usable, but unstable and not very battle-tested; use at your own risk.
1010

11-
[Changelog](https://github.com/twistedfall/opencv-rust/blob/master/CHANGES.md)
12-
[Troubleshooting](https://github.com/twistedfall/opencv-rust/blob/master/TROUBLESHOOTING.md)
11+
[Changelog](https://github.com/twistedfall/opencv-rust/blob/master/CHANGES.md) |
12+
[Troubleshooting](https://github.com/twistedfall/opencv-rust/blob/master/TROUBLESHOOTING.md) |
1313
[Support the project](https://github.com/sponsors/twistedfall)
1414

1515
## Quickstart
@@ -18,11 +18,13 @@ Make sure the supported OpenCV version (3.4 or 4.x) and Clang (part of LLVM, nee
1818
generation) are installed in your system.
1919

2020
Update your Cargo.toml
21+
2122
```toml
2223
opencv = "0.91.2"
2324
```
2425

2526
Import prelude
27+
2628
```rust
2729
use opencv::prelude::*;
2830
```
@@ -124,12 +126,13 @@ The following variables affect the building the of the `opencv` crate, but belon
124126
* `PATH`
125127
Windows searches for `*.dll`s in `PATH` among other places, be sure to set it up, or copy required OpenCV
126128
`*.dll`s next to your binary. Be sure to specify paths in UNIX style (/C/Program Files/Dir) because colon
127-
in `PATH` might be interpreted as the entry separator. Summary [here](https://stackoverflow.com/a/6546427).
129+
in `PATH` might be interpreted as the entry separator. Summary [here](https://stackoverflow.com/a/6546427).
128130

129131
* clang crate environment variables
130132
See crate's [README](https://github.com/KyleMayes/clang-sys/blob/master/README.md#environment-variables)
131133

132134
## Cargo features
135+
133136
* There is a feature named after each OpenCV module (e.g. `imgproc`, `highgui`, etc.). They are all enabled by
134137
default, but if a corresponding module is not found then it will silently be ignored. If you need to select a
135138
specific set of modules be sure to disable the default features and provide the required feature set:
@@ -147,6 +150,7 @@ as well.
147150
### OpenCV version support
148151

149152
The following OpenCV versions are supported at the moment:
153+
150154
* 3.4
151155
* 4.x
152156

@@ -183,14 +187,17 @@ or functions that are marked CV_NOEXCEPT in the OpenCV headers are infallible an
183187

184188
`CV_MAKETYPE` and related `CV_MAT_DEPTH` constant functions are available to replace the corresponding OpenCV macros.
185189
Yet it's usually easier to call `::opencv_type()` function on the corresponding Rust type. E.g.:
190+
186191
```rust
187192
let t = u16::opencv_type(); // equivalent to CV_MAKETYPE(CV_16U, 1)
188193
let t = Vec2f::opencv_type(); // equivalent to CV_MAKETYPE(CV_32F, 2)
189194
```
190195

191196
### C++ operators
197+
192198
Some C++ operators are supported, they are converted to the corresponding functions on Rust side. Here is the
193199
list with the corresponding function name:
200+
194201
* `[]``get()` or `get_mut()`
195202
* `+`, `-``add()`, `sub()`
196203
* `*`, `/``mul()`, `div()`
@@ -257,6 +264,7 @@ values, but they are reported in the API documentation.
257264
Overloaded methods have been mostly manually given different names or automatically renamed to *_1, *_2, etc.
258265

259266
## Older OpenCV branches support
267+
260268
### OpenCV 2
261269

262270
If you can't use OpenCV 3.x or higher, the (no longer maintained) `0.2.4` version of this crate is known to

0 commit comments

Comments
 (0)