https://github.com/chordizm/rxcv
RxCV provide Rust programming experience to OpenCV.
https://github.com/chordizm/rxcv
computer-vision opencv rust
Last synced: 8 months ago
JSON representation
RxCV provide Rust programming experience to OpenCV.
- Host: GitHub
- URL: https://github.com/chordizm/rxcv
- Owner: chordizm
- License: apache-2.0
- Created: 2023-01-19T07:01:15.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-05T23:33:53.000Z (about 3 years ago)
- Last Synced: 2024-10-01T05:09:42.539Z (over 1 year ago)
- Topics: computer-vision, opencv, rust
- Language: Rust
- Homepage: https://docs.rs/rxcv
- Size: 565 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# RxCV
RxCV provide Rust programming experience to OpenCV.
| Platform | Arch | Status |
| :------- | :------ | :----- |
| Linux | x86_64 | 0.1.0 |
| Linux | aarch64 | 0.1.0 |
| Windows | All | TBA |
| macOS | All | TBA |
Currently support opencv installed from apt.
# Modules
| Module | Status |
| :--------- | :--------- |
| core | [WIP]0.1.0 |
| imgproc | [WIP]0.1.0 |
| imgcodecs | [WIP]0.1.0 |
| videoio | TBA |
| calib3d | TBA |
| features2d | TBA |
| objdetect | TBA |
| dnn | TBA |
| ml | TBA |
| flann | TBA |
| photo | TBA |
| stiching | TBA |
| gapi | TBA |
# Get started
```c
std::vector data = /* Some binary */;
cv::Mat src = cv::imdecode(data, cv::IMREAD_COLOR), dst;
// Execution time error.
auto thresh = cv::threshold(src, dst, 0, 255, cv::THRESH_BINARY | cv::THRESH_OTSU);
```
```rust,ignore
use rxcv::{
imgproc::{Threshold, ThresholdTypes},
Mat,
};
let data:&[u8] = &[1, 2, 3, 4, 5, 6];
let src = Mat::::decode(data).unwrap();
/**
Not implemented threshold on Mat::
let (thresh, dst) = src.threshold(
0,
255,
ThresholdTypes::THRESH_BINARY | ThresholdTypes::THRESH_OTSU
);
*/
// Convert Color;
let src = src.cvt_color_bgr2gray().unwrap();
let (thresh, dst) = src.threshold(
0,
255,
ThresholdTypes::THRESH_BINARY | ThresholdTypes::THRESH_OTSU
).unwrap();
```
# Example
```c
std::vector data = /* Some binary */;
cv::Mat src = cv::imdecode(data);
```
```rust,ignore
use rxcv::Mat;
let data:&[u8] = &[1, 2, 3, 4, 5, 6];
let src = Mat::::decode(data).unwrap();
```
# License
This project is licensed under either of [Apache License, Version 2.0](./LICENSE-APACHE) or [MIT license](./LICENSE-MIT) at your option.