Skip to content

Commit f539862

Browse files
committed
Corrected ffi signatures vison header functions
1 parent 5fafe50 commit f539862

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/vision/mod.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,28 @@ type Feat = *const self::libc::c_void;
1212

1313
#[allow(dead_code)]
1414
extern {
15-
fn af_create_features(feat: MutFeat, num: DimT);
16-
fn af_retain_features(feat: MutFeat, feat: Feat);
17-
fn af_get_features_num(num: *mut DimT, feat: Feat);
18-
fn af_get_features_xpos(out: MutAfArray, feat: Feat);
19-
fn af_get_features_ypos(out: MutAfArray, feat: Feat);
20-
fn af_get_features_score(out: MutAfArray, feat: Feat);
21-
fn af_get_features_orientation(out: MutAfArray, feat: Feat);
22-
fn af_get_features_size(out: MutAfArray, feat: Feat);
23-
fn af_release_features(feat: *mut c_void);
15+
fn af_create_features(feat: MutFeat, num: DimT) -> c_int;
16+
fn af_retain_features(feat: MutFeat, feat: Feat) -> c_int;
17+
fn af_get_features_num(num: *mut DimT, feat: Feat) -> c_int;
18+
fn af_get_features_xpos(out: MutAfArray, feat: Feat) -> c_int;
19+
fn af_get_features_ypos(out: MutAfArray, feat: Feat) -> c_int;
20+
fn af_get_features_score(out: MutAfArray, feat: Feat) -> c_int;
21+
fn af_get_features_orientation(out: MutAfArray, feat: Feat) -> c_int;
22+
fn af_get_features_size(out: MutAfArray, feat: Feat) -> c_int;
23+
fn af_release_features(feat: *mut c_void) -> c_int;
2424

2525
fn af_fast(out: MutFeat, input: AfArray, thr: c_float, arc_len: c_uint, non_max: c_int,
26-
feature_ratio: c_float, edge: c_uint);
26+
feature_ratio: c_float, edge: c_uint) -> c_int;
2727

2828
fn af_orb(out: MutFeat, desc: MutAfArray, arr: AfArray, fast_thr: c_float, max_feat: c_uint,
29-
scl_fctr: c_float, levels: c_uint, blur_img: c_int);
29+
scl_fctr: c_float, levels: c_uint, blur_img: c_int) -> c_int;
3030

3131
fn af_hamming_matcher(idx: MutAfArray, dist: MutAfArray,
3232
query: AfArray, train: AfArray,
33-
dist_dim: DimT, n_dist: c_uint);
33+
dist_dim: DimT, n_dist: c_uint) -> c_int;
3434

3535
fn af_match_template(out: MutAfArray, search_img: AfArray, template_img: AfArray,
36-
mtype: uint8_t);
36+
mtype: uint8_t) -> c_int;
3737
}
3838

3939
pub struct Features {

0 commit comments

Comments
 (0)