Skip to content

Instantly share code, notes, and snippets.

@kali
Created April 14, 2015 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kali/484052e7742109dee6ef to your computer and use it in GitHub Desktop.
Save kali/484052e7742109dee6ef to your computer and use it in GitHub Desktop.
//
// This file is auto-generated, please don't edit!
//
use core::*;
extern "C" {
pub fn cv_core_getBuildInformation() -> *const libc::types::os::arch::c95::c_char;
pub fn cv_core_getTickCount() -> i64;
pub fn cv_core_getTickFrequency() -> f64;
pub fn cv_core_getCPUTickCount() -> i64;
pub fn cv_core_checkHardwareSupport_I(feature: u32) -> bool;
pub fn cv_core_getNumberOfCPUs() -> u32;
pub fn cv_core_setUseOptimized_B(onoff: bool) -> ();
pub fn cv_core_useOptimized() -> bool;
pub fn cv_core_add_MMMMI(src1: Mat, src2: Mat, dst: Mat, mask: Mat, dtype: u32) -> ();
pub fn cv_core_subtract_MMMMI(src1: Mat, src2: Mat, dst: Mat, mask: Mat, dtype: u32) -> ();
pub fn cv_core_multiply_MMMDI(src1: Mat, src2: Mat, dst: Mat, scale: f64, dtype: u32) -> ();
pub fn cv_core_divide_MMMDI(src1: Mat, src2: Mat, dst: Mat, scale: f64, dtype: u32) -> ();
pub fn cv_core_divide_DMMI(scale: f64, src2: Mat, dst: Mat, dtype: u32) -> ();
pub fn cv_core_scaleAdd_MDMM(src1: Mat, alpha: f64, src2: Mat, dst: Mat) -> ();
pub fn cv_core_addWeighted_MDMDDMI(src1: Mat, alpha: f64, src2: Mat, beta: f64, gamma: f64, dst: Mat, dtype: u32) -> ();
pub fn cv_core_convertScaleAbs_MMDD(src: Mat, dst: Mat, alpha: f64, beta: f64) -> ();
pub fn cv_core_LUT_MMMI(src: Mat, lut: Mat, dst: Mat, interpolation: u32) -> ();
pub fn cv_core_sum_M(src: Mat) -> Scalar;
pub fn cv_core_countNonZero_M(src: Mat) -> u32;
pub fn cv_core_findNonZero_MM(src: Mat, idx: Mat) -> ();
pub fn cv_core_mean_MM(src: Mat, mask: Mat) -> Scalar;
pub fn cv_core_meanStdDev_MMMM(src: Mat, mean: Mat, stddev: Mat, mask: Mat) -> ();
pub fn cv_core_norm_MIM(src1: Mat, normType: u32, mask: Mat) -> f64;
pub fn cv_core_norm_MMIM(src1: Mat, src2: Mat, normType: u32, mask: Mat) -> f64;
pub fn cv_core_batchDistance_MMMIMIIMIB(src1: Mat, src2: Mat, dist: Mat, dtype: u32, nidx: Mat, normType: u32, K: u32, mask: Mat, update: u32, crosscheck: bool) -> ();
pub fn cv_core_normalize_MMDDIIM(src: Mat, dst: Mat, alpha: f64, beta: f64, norm_type: u32, dtype: u32, mask: Mat) -> ();
pub fn cv_core_minMaxLoc_MDDPPM(src: Mat, minVal: f64, maxVal: f64, minLoc: Point, maxLoc: Point, mask: Mat) -> ();
pub fn cv_core_reduce_MMIII(src: Mat, dst: Mat, dim: u32, rtype: u32, dtype: u32) -> ();
pub fn cv_core_extractChannel_MMI(src: Mat, dst: Mat, coi: u32) -> ();
pub fn cv_core_insertChannel_MMI(src: Mat, dst: Mat, coi: u32) -> ();
pub fn cv_core_flip_MMI(src: Mat, dst: Mat, flipCode: u32) -> ();
pub fn cv_core_repeat_MIIM(src: Mat, ny: u32, nx: u32, dst: Mat) -> ();
pub fn cv_core_bitwise_and_MMMM(src1: Mat, src2: Mat, dst: Mat, mask: Mat) -> ();
pub fn cv_core_bitwise_or_MMMM(src1: Mat, src2: Mat, dst: Mat, mask: Mat) -> ();
pub fn cv_core_bitwise_xor_MMMM(src1: Mat, src2: Mat, dst: Mat, mask: Mat) -> ();
pub fn cv_core_bitwise_not_MMM(src: Mat, dst: Mat, mask: Mat) -> ();
pub fn cv_core_absdiff_MMM(src1: Mat, src2: Mat, dst: Mat) -> ();
pub fn cv_core_inRange_MMMM(src: Mat, lowerb: Mat, upperb: Mat, dst: Mat) -> ();
pub fn cv_core_compare_MMMI(src1: Mat, src2: Mat, dst: Mat, cmpop: u32) -> ();
pub fn cv_core_min_MMM(src1: Mat, src2: Mat, dst: Mat) -> ();
pub fn cv_core_max_MMM(src1: Mat, src2: Mat, dst: Mat) -> ();
pub fn cv_core_sqrt_MM(src: Mat, dst: Mat) -> ();
pub fn cv_core_pow_MDM(src: Mat, power: f64, dst: Mat) -> ();
pub fn cv_core_exp_MM(src: Mat, dst: Mat) -> ();
pub fn cv_core_log_MM(src: Mat, dst: Mat) -> ();
pub fn cv_core_cubeRoot_F(val: f32) -> f32;
pub fn cv_core_fastAtan2_FF(y: f32, x: f32) -> f32;
pub fn cv_core_polarToCart_MMMMB(magnitude: Mat, angle: Mat, x: Mat, y: Mat, angleInDegrees: bool) -> ();
pub fn cv_core_cartToPolar_MMMMB(x: Mat, y: Mat, magnitude: Mat, angle: Mat, angleInDegrees: bool) -> ();
pub fn cv_core_phase_MMMB(x: Mat, y: Mat, angle: Mat, angleInDegrees: bool) -> ();
pub fn cv_core_magnitude_MMM(x: Mat, y: Mat, magnitude: Mat) -> ();
pub fn cv_core_checkRange_MBPDD(a: Mat, quiet: bool, pos: Point, minVal: f64, maxVal: f64) -> bool;
pub fn cv_core_patchNaNs_MD(a: Mat, val: f64) -> ();
pub fn cv_core_gemm_MMDMDMI(src1: Mat, src2: Mat, alpha: f64, src3: Mat, beta: f64, dst: Mat, flags: u32) -> ();
pub fn cv_core_mulTransposed_MMBMDI(src: Mat, dst: Mat, aTa: bool, delta: Mat, scale: f64, dtype: u32) -> ();
pub fn cv_core_transpose_MM(src: Mat, dst: Mat) -> ();
pub fn cv_core_transform_MMM(src: Mat, dst: Mat, m: Mat) -> ();
pub fn cv_core_perspectiveTransform_MMM(src: Mat, dst: Mat, m: Mat) -> ();
pub fn cv_core_completeSymm_MB(mtx: Mat, lowerToUpper: bool) -> ();
pub fn cv_core_setIdentity_MS(mtx: Mat, s: Scalar) -> ();
pub fn cv_core_determinant_M(mtx: Mat) -> f64;
pub fn cv_core_trace_M(mtx: Mat) -> Scalar;
pub fn cv_core_invert_MMI(src: Mat, dst: Mat, flags: u32) -> f64;
pub fn cv_core_solve_MMMI(src1: Mat, src2: Mat, dst: Mat, flags: u32) -> bool;
pub fn cv_core_sort_MMI(src: Mat, dst: Mat, flags: u32) -> ();
pub fn cv_core_sortIdx_MMI(src: Mat, dst: Mat, flags: u32) -> ();
pub fn cv_core_solveCubic_MM(coeffs: Mat, roots: Mat) -> u32;
pub fn cv_core_solvePoly_MMI(coeffs: Mat, roots: Mat, maxIters: u32) -> f64;
pub fn cv_core_eigen_MBMM(src: Mat, computeEigenvectors: bool, eigenvalues: Mat, eigenvectors: Mat) -> bool;
pub fn cv_core_calcCovarMatrix_MMMII(samples: Mat, covar: Mat, mean: Mat, flags: u32, ctype: u32) -> ();
pub fn cv_core_PCACompute_MMMI(data: Mat, mean: Mat, eigenvectors: Mat, maxComponents: u32) -> ();
pub fn cv_core_PCAComputeVar_MMMD(data: Mat, mean: Mat, eigenvectors: Mat, retainedVariance: f64) -> ();
pub fn cv_core_PCAProject_MMMM(data: Mat, mean: Mat, eigenvectors: Mat, result: Mat) -> ();
pub fn cv_core_PCABackProject_MMMM(data: Mat, mean: Mat, eigenvectors: Mat, result: Mat) -> ();
pub fn cv_core_SVDecomp_MMMMI(src: Mat, w: Mat, u: Mat, vt: Mat, flags: u32) -> ();
pub fn cv_core_SVBackSubst_MMMMM(w: Mat, u: Mat, vt: Mat, rhs: Mat, dst: Mat) -> ();
pub fn cv_core_Mahalanobis_MMM(v1: Mat, v2: Mat, icovar: Mat) -> f64;
pub fn cv_core_dft_MMII(src: Mat, dst: Mat, flags: u32, nonzeroRows: u32) -> ();
pub fn cv_core_idft_MMII(src: Mat, dst: Mat, flags: u32, nonzeroRows: u32) -> ();
pub fn cv_core_dct_MMI(src: Mat, dst: Mat, flags: u32) -> ();
pub fn cv_core_idct_MMI(src: Mat, dst: Mat, flags: u32) -> ();
pub fn cv_core_mulSpectrums_MMMIB(a: Mat, b: Mat, c: Mat, flags: u32, conjB: bool) -> ();
pub fn cv_core_getOptimalDFTSize_I(vecsize: u32) -> u32;
pub fn cv_core_kmeans_MIMTIIM(data: Mat, K: u32, bestLabels: Mat, criteria: TermCriteria, attempts: u32, flags: u32, centers: Mat) -> f64;
pub fn cv_core_randu_MMM(dst: Mat, low: Mat, high: Mat) -> ();
pub fn cv_core_randn_MMM(dst: Mat, mean: Mat, stddev: Mat) -> ();
pub fn cv_core_randShuffle__MD(dst: Mat, iterFactor: f64) -> ();
pub fn cv_core_line_MPPSIII(img: Mat, pt1: Point, pt2: Point, color: Scalar, thickness: u32, lineType: u32, shift: u32) -> ();
pub fn cv_core_arrowedLine_MPPSIIID(img: Mat, pt1: Point, pt2: Point, color: Scalar, thickness: u32, line_type: u32, shift: u32, tipLength: f64) -> ();
pub fn cv_core_rectangle_MPPSIII(img: Mat, pt1: Point, pt2: Point, color: Scalar, thickness: u32, lineType: u32, shift: u32) -> ();
pub fn cv_core_circle_MPISIII(img: Mat, center: Point, radius: u32, color: Scalar, thickness: u32, lineType: u32, shift: u32) -> ();
pub fn cv_core_ellipse_MPSDDDSIII(img: Mat, center: Point, axes: Size, angle: f64, startAngle: f64, endAngle: f64, color: Scalar, thickness: u32, lineType: u32, shift: u32) -> ();
pub fn cv_core_ellipse_MRSII(img: Mat, _box: RotatedRect, color: Scalar, thickness: u32, lineType: u32) -> ();
pub fn cv_core_fillConvexPoly_MMSII(img: Mat, points: Mat, color: Scalar, lineType: u32, shift: u32) -> ();
pub fn cv_core_clipLine_RPP(imgRect: Rect, pt1: Point, pt2: Point) -> bool;
pub fn cv_core_putText_MSPIDSIIB(img: Mat, text: *const libc::types::os::arch::c95::c_char, org: Point, fontFace: u32, fontScale: f64, color: Scalar, thickness: u32, lineType: u32, bottomLeftOrigin: bool) -> ();
pub fn cv_core_getTextSize_SIDII(text: *const libc::types::os::arch::c95::c_char, fontFace: u32, fontScale: f64, thickness: u32, baseLine: u32) -> Size;
pub fn cv_core_delete_Mat(ptr : *mut i8);
pub fn cv_core_delete_Algorithm(ptr : *mut i8);
pub fn cv_core_Algorithm_paramHelp_S(name: *const libc::types::os::arch::c95::c_char) -> *const libc::types::os::arch::c95::c_char;
pub fn cv_core_Algorithm_paramType_S(name: *const libc::types::os::arch::c95::c_char) -> u32;
pub fn cv_core_Algorithm_getDouble_S(name: *const libc::types::os::arch::c95::c_char) -> f64;
pub fn cv_core_Algorithm_getInt_S(name: *const libc::types::os::arch::c95::c_char) -> u32;
pub fn cv_core_Algorithm_getBool_S(name: *const libc::types::os::arch::c95::c_char) -> bool;
pub fn cv_core_Algorithm_getString_S(name: *const libc::types::os::arch::c95::c_char) -> *const libc::types::os::arch::c95::c_char;
pub fn cv_core_Algorithm_getMat_S(name: *const libc::types::os::arch::c95::c_char) -> Mat;
pub fn cv_core_Algorithm_setInt_SI(name: *const libc::types::os::arch::c95::c_char, value: u32) -> ();
pub fn cv_core_Algorithm_setDouble_SD(name: *const libc::types::os::arch::c95::c_char, value: f64) -> ();
pub fn cv_core_Algorithm_setBool_SB(name: *const libc::types::os::arch::c95::c_char, value: bool) -> ();
pub fn cv_core_Algorithm_setString_SS(name: *const libc::types::os::arch::c95::c_char, value: *const libc::types::os::arch::c95::c_char) -> ();
pub fn cv_core_Algorithm_setMat_SM(name: *const libc::types::os::arch::c95::c_char, value: Mat) -> ();
} // extern "C"
mod core {
#[repr(C)] pub struct Vec4d {
data: [f64;4],
}
#[repr(C)] pub struct Vec6f {
data: [f32;6],
}
#[repr(C)] pub struct RotatedRect {
x: f32,
y: f32,
width: f32,
height: f32,
angle: f32,
}
#[repr(C)] pub struct TermCriteria {
_type: u32,
maxCount: u32,
epsilon: f64,
}
#[repr(C)] pub struct Vec3f {
data: [f32;3],
}
#[repr(C)] pub struct Vec6b {
data: [u8;6],
}
#[repr(C)] pub struct Scalar {
data: [f64;4],
}
#[repr(C)] pub struct Vec3s {
data: [u16;3],
}
#[repr(C)] pub struct Vec6i {
data: [u32;6],
}
#[repr(C)] pub struct Vec2i {
data: [u32;2],
}
#[repr(C)] pub struct Point {
x: u32,
y: u32,
}
#[repr(C)] pub struct Vec6s {
data: [u16;6],
}
#[repr(C)] pub struct Point2f {
x: f32,
y: f32,
}
#[repr(C)] pub struct Rect {
x: u32,
y: u32,
width: u32,
height: u32,
}
#[repr(C)] pub struct Vec6d {
data: [f64;6],
}
#[repr(C)] pub struct Vec4s {
data: [u16;4],
}
#[repr(C)] pub struct Point2d {
x: f64,
y: f64,
}
#[repr(C)] pub struct Vec3d {
data: [f64;3],
}
#[repr(C)] pub struct Vec2b {
data: [u8;2],
}
#[repr(C)] pub struct Vec4i {
data: [u32;4],
}
#[repr(C)] pub struct Vec2d {
data: [f64;2],
}
#[repr(C)] pub struct Vec4b {
data: [u8;4],
}
#[repr(C)] pub struct Vec2f {
data: [f32;2],
}
#[repr(C)] pub struct Size2i {
width: u32,
height: u32,
}
#[repr(C)] pub struct Size2f {
width: f32,
height: f32,
}
#[repr(C)] pub struct Vec2s {
data: [u16;2],
}
#[repr(C)] pub struct Vec3i {
data: [u32;3],
}
#[repr(C)] pub struct Vec4f {
data: [f32;4],
}
#[repr(C)] pub struct Vec3b {
data: [u8;3],
}
#[repr(C)] pub struct Size {
width: u32,
height: u32,
}
#[repr(C)]#[allow(dead_code)] pub struct Mat { ptr: *mut i8 }
impl Drop for Mat {
fn drop(&mut self) { unsafe { ::cv_core_delete_Mat(self.ptr) }; }
}
#[repr(C)]#[allow(dead_code)] pub struct Algorithm { ptr: *mut i8 }
impl Drop for Algorithm {
fn drop(&mut self) { unsafe { ::cv_core_delete_Algorithm(self.ptr) }; }
}
}
include!(concat!(env!("OUT_DIR"), "/core.rs"));
include!(concat!(env!("OUT_DIR"), "/imgproc.rs"));
include!(concat!(env!("OUT_DIR"), "/highgui.rs"));
include!(concat!(env!("OUT_DIR"), "/features2d.rs"));
include!(concat!(env!("OUT_DIR"), "/photo.rs"));
include!(concat!(env!("OUT_DIR"), "/video.rs"));
include!(concat!(env!("OUT_DIR"), "/objdetect.rs"));
include!(concat!(env!("OUT_DIR"), "/calib3d.rs"));
#![allow(unused_imports,non_snake_case,dead_code)]
extern crate libc;
include!(concat!(env!("OUT_DIR"), "/hub.rs"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment