#[allow(dead_code)]
pub mod wasm {
#[allow(dead_code)]
pub mod cv {
#[allow(dead_code, clippy::all)]
pub mod types {
#[used]
#[doc(hidden)]
static __FORCE_SECTION_REF: fn() =
super::super::super::__link_custom_section_describing_imports;
#[repr(C)]
#[derive(Clone, Copy)]
pub struct Size {
pub x: i32,
pub y: i32,
}
impl ::core::fmt::Debug for Size {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("Size").field("x", &self.x).field("y", &self.y).finish()
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct Scalar {
pub val1: f32,
pub val2: f32,
pub val3: f32,
pub val4: f32,
}
impl ::core::fmt::Debug for Scalar {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("Scalar").field("val1", &self.val1).field("val2", &self.val2).field("val3", &self.val3).field("val4", &self.val4).finish()
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct Rect {
pub min: Size,
pub max: Size,
}
impl ::core::fmt::Debug for Rect {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("Rect").field("min", &self.min).field("max", &self.max).finish()
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct Rgba {
pub r: u8,
pub g: u8,
pub b: u8,
pub a: u8,
}
impl ::core::fmt::Debug for Rgba {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("Rgba").field("r", &self.r).field("g", &self.g).field("b", &self.b).field("a", &self.a).finish()
}
}
#[repr(u8)]
#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)]
pub enum BorderType {
BorderConstant,
BorderReplicate,
BorderReflect,
BorderWrap,
BorderReflect101,
BorderTransparent,
BorderDefault,
BorderIsolated,
}
impl ::core::fmt::Debug for BorderType {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
BorderType::BorderConstant => {
f.debug_tuple("BorderType::BorderConstant").finish()
}
BorderType::BorderReplicate => {
f.debug_tuple("BorderType::BorderReplicate").finish()
}
BorderType::BorderReflect => {
f.debug_tuple("BorderType::BorderReflect").finish()
}
BorderType::BorderWrap => {
f.debug_tuple("BorderType::BorderWrap").finish()
}
BorderType::BorderReflect101 => {
f.debug_tuple("BorderType::BorderReflect101").finish()
}
BorderType::BorderTransparent => {
f.debug_tuple("BorderType::BorderTransparent").finish()
}
BorderType::BorderDefault => {
f.debug_tuple("BorderType::BorderDefault").finish()
}
BorderType::BorderIsolated => {
f.debug_tuple("BorderType::BorderIsolated").finish()
}
}
}
}
impl BorderType{
#[doc(hidden)]
pub unsafe fn _lift(val: u8) -> BorderType{
if !cfg!(debug_assertions) {
return ::core::mem::transmute(val);
}
match val {
0 => BorderType::BorderConstant,
1 => BorderType::BorderReplicate,
2 => BorderType::BorderReflect,
3 => BorderType::BorderWrap,
4 => BorderType::BorderReflect101,
5 => BorderType::BorderTransparent,
6 => BorderType::BorderDefault,
7 => BorderType::BorderIsolated,
_ => panic!("invalid enum discriminant"),
}
}
}
#[repr(u8)]
#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)]
pub enum AdaptiveThresholdType {
AdaptiveThresholdMean,
AdaptiveThresholdGaussian,
}
impl ::core::fmt::Debug for AdaptiveThresholdType {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
AdaptiveThresholdType::AdaptiveThresholdMean => {
f.debug_tuple("AdaptiveThresholdType::AdaptiveThresholdMean").finish()
}
AdaptiveThresholdType::AdaptiveThresholdGaussian => {
f.debug_tuple("AdaptiveThresholdType::AdaptiveThresholdGaussian").finish()
}
}
}
}
impl AdaptiveThresholdType{
#[doc(hidden)]
pub unsafe fn _lift(val: u8) -> AdaptiveThresholdType{
if !cfg!(debug_assertions) {
return ::core::mem::transmute(val);
}
match val {
0 => AdaptiveThresholdType::AdaptiveThresholdMean,
1 => AdaptiveThresholdType::AdaptiveThresholdGaussian,
_ => panic!("invalid enum discriminant"),
}
}
}
#[repr(u8)]
#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)]
pub enum ThresholdType {
ThresholdBinary,
ThresholdBinaryInv,
ThresholdTrunc,
ThresholdToZero,
ThresholdToZeroInv,
ThresholdMask,
ThresholdOtsu,
TthresholdTriangle,
}
impl ::core::fmt::Debug for ThresholdType {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
ThresholdType::ThresholdBinary => {
f.debug_tuple("ThresholdType::ThresholdBinary").finish()
}
ThresholdType::ThresholdBinaryInv => {
f.debug_tuple("ThresholdType::ThresholdBinaryInv").finish()
}
ThresholdType::ThresholdTrunc => {
f.debug_tuple("ThresholdType::ThresholdTrunc").finish()
}
ThresholdType::ThresholdToZero => {
f.debug_tuple("ThresholdType::ThresholdToZero").finish()
}
ThresholdType::ThresholdToZeroInv => {
f.debug_tuple("ThresholdType::ThresholdToZeroInv").finish()
}
ThresholdType::ThresholdMask => {
f.debug_tuple("ThresholdType::ThresholdMask").finish()
}
ThresholdType::ThresholdOtsu => {
f.debug_tuple("ThresholdType::ThresholdOtsu").finish()
}
ThresholdType::TthresholdTriangle => {
f.debug_tuple("ThresholdType::TthresholdTriangle").finish()
}
}
}
}
impl ThresholdType{
#[doc(hidden)]
pub unsafe fn _lift(val: u8) -> ThresholdType{
if !cfg!(debug_assertions) {
return ::core::mem::transmute(val);
}
match val {
0 => ThresholdType::ThresholdBinary,
1 => ThresholdType::ThresholdBinaryInv,
2 => ThresholdType::ThresholdTrunc,
3 => ThresholdType::ThresholdToZero,
4 => ThresholdType::ThresholdToZeroInv,
5 => ThresholdType::ThresholdMask,
6 => ThresholdType::ThresholdOtsu,
7 => ThresholdType::TthresholdTriangle,
_ => panic!("invalid enum discriminant"),
}
}
}
#[repr(u8)]
#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)]
pub enum DataLayoutType {
DataLayoutUnknown,
DataLayoutNd,
DataLayoutNchw,
DataLayoutNcdhw,
DataLayoutNhwc,
DataLayoutNdhwc,
DataLayoutPlanar,
}
impl ::core::fmt::Debug for DataLayoutType {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
DataLayoutType::DataLayoutUnknown => {
f.debug_tuple("DataLayoutType::DataLayoutUnknown").finish()
}
DataLayoutType::DataLayoutNd => {
f.debug_tuple("DataLayoutType::DataLayoutNd").finish()
}
DataLayoutType::DataLayoutNchw => {
f.debug_tuple("DataLayoutType::DataLayoutNchw").finish()
}
DataLayoutType::DataLayoutNcdhw => {
f.debug_tuple("DataLayoutType::DataLayoutNcdhw").finish()
}
DataLayoutType::DataLayoutNhwc => {
f.debug_tuple("DataLayoutType::DataLayoutNhwc").finish()
}
DataLayoutType::DataLayoutNdhwc => {
f.debug_tuple("DataLayoutType::DataLayoutNdhwc").finish()
}
DataLayoutType::DataLayoutPlanar => {
f.debug_tuple("DataLayoutType::DataLayoutPlanar").finish()
}
}
}
}
impl DataLayoutType{
#[doc(hidden)]
pub unsafe fn _lift(val: u8) -> DataLayoutType{
if !cfg!(debug_assertions) {
return ::core::mem::transmute(val);
}
match val {
0 => DataLayoutType::DataLayoutUnknown,
1 => DataLayoutType::DataLayoutNd,
2 => DataLayoutType::DataLayoutNchw,
3 => DataLayoutType::DataLayoutNcdhw,
4 => DataLayoutType::DataLayoutNhwc,
5 => DataLayoutType::DataLayoutNdhwc,
6 => DataLayoutType::DataLayoutPlanar,
_ => panic!("invalid enum discriminant"),
}
}
}
#[repr(u8)]
#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)]
pub enum PaddingModeType {
PaddingModeNull,
PaddingModeCropCenter,
PaddingModeLetterbox,
}
impl ::core::fmt::Debug for PaddingModeType {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
PaddingModeType::PaddingModeNull => {
f.debug_tuple("PaddingModeType::PaddingModeNull").finish()
}
PaddingModeType::PaddingModeCropCenter => {
f.debug_tuple("PaddingModeType::PaddingModeCropCenter").finish()
}
PaddingModeType::PaddingModeLetterbox => {
f.debug_tuple("PaddingModeType::PaddingModeLetterbox").finish()
}
}
}
}
impl PaddingModeType{
#[doc(hidden)]
pub unsafe fn _lift(val: u8) -> PaddingModeType{
if !cfg!(debug_assertions) {
return ::core::mem::transmute(val);
}
match val {
0 => PaddingModeType::PaddingModeNull,
1 => PaddingModeType::PaddingModeCropCenter,
2 => PaddingModeType::PaddingModeLetterbox,
_ => panic!("invalid enum discriminant"),
}
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct BlobParams {
pub scale_factor: f32,
pub size: Size,
pub mean: Scalar,
pub swap_rb: bool,
pub ddepth: u8,
pub data_layout: DataLayoutType,
pub padding_mode: PaddingModeType,
pub border: Scalar,
}
impl ::core::fmt::Debug for BlobParams {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("BlobParams").field("scale-factor", &self.scale_factor).field("size", &self.size).field("mean", &self.mean).field("swap-RB", &self.swap_rb).field("ddepth", &self.ddepth).field("data-layout", &self.data_layout).field("padding-mode", &self.padding_mode).field("border", &self.border).finish()
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct MixMaxLocResult {
pub min_val: f32,
pub max_val: f32,
pub min_loc: Size,
pub max_loc: Size,
}
impl ::core::fmt::Debug for MixMaxLocResult {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("MixMaxLocResult").field("min-val", &self.min_val).field("max-val", &self.max_val).field("min-loc", &self.min_loc).field("max-loc", &self.max_loc).finish()
}
}
#[repr(u8)]
#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)]
pub enum HersheyFontType {
HersheyFontSimplex,
HersheyFontPlain,
HersheyFontDuplex,
HersheyFontComplex,
HersheyFontTriplex,
HersheyFontComplexSmall,
HersheyFontScriptSimplex,
HersheyFontScriptComplex,
HersheyFontItalic,
}
impl ::core::fmt::Debug for HersheyFontType {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
HersheyFontType::HersheyFontSimplex => {
f.debug_tuple("HersheyFontType::HersheyFontSimplex").finish()
}
HersheyFontType::HersheyFontPlain => {
f.debug_tuple("HersheyFontType::HersheyFontPlain").finish()
}
HersheyFontType::HersheyFontDuplex => {
f.debug_tuple("HersheyFontType::HersheyFontDuplex").finish()
}
HersheyFontType::HersheyFontComplex => {
f.debug_tuple("HersheyFontType::HersheyFontComplex").finish()
}
HersheyFontType::HersheyFontTriplex => {
f.debug_tuple("HersheyFontType::HersheyFontTriplex").finish()
}
HersheyFontType::HersheyFontComplexSmall => {
f.debug_tuple("HersheyFontType::HersheyFontComplexSmall").finish()
}
HersheyFontType::HersheyFontScriptSimplex => {
f.debug_tuple("HersheyFontType::HersheyFontScriptSimplex").finish()
}
HersheyFontType::HersheyFontScriptComplex => {
f.debug_tuple("HersheyFontType::HersheyFontScriptComplex").finish()
}
HersheyFontType::HersheyFontItalic => {
f.debug_tuple("HersheyFontType::HersheyFontItalic").finish()
}
}
}
}
impl HersheyFontType{
#[doc(hidden)]
pub unsafe fn _lift(val: u8) -> HersheyFontType{
if !cfg!(debug_assertions) {
return ::core::mem::transmute(val);
}
match val {
0 => HersheyFontType::HersheyFontSimplex,
1 => HersheyFontType::HersheyFontPlain,
2 => HersheyFontType::HersheyFontDuplex,
3 => HersheyFontType::HersheyFontComplex,
4 => HersheyFontType::HersheyFontTriplex,
5 => HersheyFontType::HersheyFontComplexSmall,
6 => HersheyFontType::HersheyFontScriptSimplex,
7 => HersheyFontType::HersheyFontScriptComplex,
8 => HersheyFontType::HersheyFontItalic,
_ => panic!("invalid enum discriminant"),
}
}
}
#[repr(u8)]
#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)]
pub enum InterpolationType {
InterpolationNearest,
InterpolationLinear,
InterpolationCubic,
InterpolationArea,
InterpolationLanczos4,
}
impl ::core::fmt::Debug for InterpolationType {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
InterpolationType::InterpolationNearest => {
f.debug_tuple("InterpolationType::InterpolationNearest").finish()
}
InterpolationType::InterpolationLinear => {
f.debug_tuple("InterpolationType::InterpolationLinear").finish()
}
InterpolationType::InterpolationCubic => {
f.debug_tuple("InterpolationType::InterpolationCubic").finish()
}
InterpolationType::InterpolationArea => {
f.debug_tuple("InterpolationType::InterpolationArea").finish()
}
InterpolationType::InterpolationLanczos4 => {
f.debug_tuple("InterpolationType::InterpolationLanczos4").finish()
}
}
}
}
impl InterpolationType{
#[doc(hidden)]
pub unsafe fn _lift(val: u8) -> InterpolationType{
if !cfg!(debug_assertions) {
return ::core::mem::transmute(val);
}
match val {
0 => InterpolationType::InterpolationNearest,
1 => InterpolationType::InterpolationLinear,
2 => InterpolationType::InterpolationCubic,
3 => InterpolationType::InterpolationArea,
4 => InterpolationType::InterpolationLanczos4,
_ => panic!("invalid enum discriminant"),
}
}
}
#[repr(u8)]
#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)]
pub enum ColorCoversionType {
ColorBgrToBgra,
ColorRgbToRgba,
ColorBgraToBgr,
ColorRgbaToRgb,
ColorBgrToRgba,
ColorRgbToBgra,
ColorRgbaToBgr,
ColorBgraToRgb,
ColorBgrToRgb,
ColorRgbToBgr,
ColorBgraToRgba,
ColorRgbaToBgra,
ColorBgrToGray,
ColorRgbToGray,
ColorGrayToBgr,
ColorGrayToRgb,
ColorGrayToBgra,
ColorGrayToRgba,
ColorBgraToGray,
ColorRgbaToGray,
}
impl ::core::fmt::Debug for ColorCoversionType {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
ColorCoversionType::ColorBgrToBgra => {
f.debug_tuple("ColorCoversionType::ColorBgrToBgra").finish()
}
ColorCoversionType::ColorRgbToRgba => {
f.debug_tuple("ColorCoversionType::ColorRgbToRgba").finish()
}
ColorCoversionType::ColorBgraToBgr => {
f.debug_tuple("ColorCoversionType::ColorBgraToBgr").finish()
}
ColorCoversionType::ColorRgbaToRgb => {
f.debug_tuple("ColorCoversionType::ColorRgbaToRgb").finish()
}
ColorCoversionType::ColorBgrToRgba => {
f.debug_tuple("ColorCoversionType::ColorBgrToRgba").finish()
}
ColorCoversionType::ColorRgbToBgra => {
f.debug_tuple("ColorCoversionType::ColorRgbToBgra").finish()
}
ColorCoversionType::ColorRgbaToBgr => {
f.debug_tuple("ColorCoversionType::ColorRgbaToBgr").finish()
}
ColorCoversionType::ColorBgraToRgb => {
f.debug_tuple("ColorCoversionType::ColorBgraToRgb").finish()
}
ColorCoversionType::ColorBgrToRgb => {
f.debug_tuple("ColorCoversionType::ColorBgrToRgb").finish()
}
ColorCoversionType::ColorRgbToBgr => {
f.debug_tuple("ColorCoversionType::ColorRgbToBgr").finish()
}
ColorCoversionType::ColorBgraToRgba => {
f.debug_tuple("ColorCoversionType::ColorBgraToRgba").finish()
}
ColorCoversionType::ColorRgbaToBgra => {
f.debug_tuple("ColorCoversionType::ColorRgbaToBgra").finish()
}
ColorCoversionType::ColorBgrToGray => {
f.debug_tuple("ColorCoversionType::ColorBgrToGray").finish()
}
ColorCoversionType::ColorRgbToGray => {
f.debug_tuple("ColorCoversionType::ColorRgbToGray").finish()
}
ColorCoversionType::ColorGrayToBgr => {
f.debug_tuple("ColorCoversionType::ColorGrayToBgr").finish()
}
ColorCoversionType::ColorGrayToRgb => {
f.debug_tuple("ColorCoversionType::ColorGrayToRgb").finish()
}
ColorCoversionType::ColorGrayToBgra => {
f.debug_tuple("ColorCoversionType::ColorGrayToBgra").finish()
}
ColorCoversionType::ColorGrayToRgba => {
f.debug_tuple("ColorCoversionType::ColorGrayToRgba").finish()
}
ColorCoversionType::ColorBgraToGray => {
f.debug_tuple("ColorCoversionType::ColorBgraToGray").finish()
}
ColorCoversionType::ColorRgbaToGray => {
f.debug_tuple("ColorCoversionType::ColorRgbaToGray").finish()
}
}
}
}
impl ColorCoversionType{
#[doc(hidden)]
pub unsafe fn _lift(val: u8) -> ColorCoversionType{
if !cfg!(debug_assertions) {
return ::core::mem::transmute(val);
}
match val {
0 => ColorCoversionType::ColorBgrToBgra,
1 => ColorCoversionType::ColorRgbToRgba,
2 => ColorCoversionType::ColorBgraToBgr,
3 => ColorCoversionType::ColorRgbaToRgb,
4 => ColorCoversionType::ColorBgrToRgba,
5 => ColorCoversionType::ColorRgbToBgra,
6 => ColorCoversionType::ColorRgbaToBgr,
7 => ColorCoversionType::ColorBgraToRgb,
8 => ColorCoversionType::ColorBgrToRgb,
9 => ColorCoversionType::ColorRgbToBgr,
10 => ColorCoversionType::ColorBgraToRgba,
11 => ColorCoversionType::ColorRgbaToBgra,
12 => ColorCoversionType::ColorBgrToGray,
13 => ColorCoversionType::ColorRgbToGray,
14 => ColorCoversionType::ColorGrayToBgr,
15 => ColorCoversionType::ColorGrayToRgb,
16 => ColorCoversionType::ColorGrayToBgra,
17 => ColorCoversionType::ColorGrayToRgba,
18 => ColorCoversionType::ColorBgraToGray,
19 => ColorCoversionType::ColorRgbaToGray,
_ => panic!("invalid enum discriminant"),
}
}
}
}
#[allow(dead_code, clippy::all)]
pub mod mat {
#[used]
#[doc(hidden)]
static __FORCE_SECTION_REF: fn() =
super::super::super::__link_custom_section_describing_imports;
use super::super::super::_rt;
pub type MixMaxLocResult = super::super::super::wasm::cv::types::MixMaxLocResult;
pub type Rect = super::super::super::wasm::cv::types::Rect;
#[repr(u8)]
#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)]
pub enum Mattype {
Cv8u,
Cv8s,
Cv16u,
Cv16s,
Cv32s,
Cv32f,
Cv64f,
}
impl ::core::fmt::Debug for Mattype {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
Mattype::Cv8u => {
f.debug_tuple("Mattype::Cv8u").finish()
}
Mattype::Cv8s => {
f.debug_tuple("Mattype::Cv8s").finish()
}
Mattype::Cv16u => {
f.debug_tuple("Mattype::Cv16u").finish()
}
Mattype::Cv16s => {
f.debug_tuple("Mattype::Cv16s").finish()
}
Mattype::Cv32s => {
f.debug_tuple("Mattype::Cv32s").finish()
}
Mattype::Cv32f => {
f.debug_tuple("Mattype::Cv32f").finish()
}
Mattype::Cv64f => {
f.debug_tuple("Mattype::Cv64f").finish()
}
}
}
}
impl Mattype{
#[doc(hidden)]
pub unsafe fn _lift(val: u8) -> Mattype{
if !cfg!(debug_assertions) {
return ::core::mem::transmute(val);
}
match val {
0 => Mattype::Cv8u,
1 => Mattype::Cv8s,
2 => Mattype::Cv16u,
3 => Mattype::Cv16s,
4 => Mattype::Cv32s,
5 => Mattype::Cv32f,
6 => Mattype::Cv64f,
_ => panic!("invalid enum discriminant"),
}
}
}
#[derive(Debug)]
#[repr(transparent)]
pub struct Mat{
handle: _rt::Resource<Mat>,
}
impl Mat{
#[doc(hidden)]
pub unsafe fn from_handle(handle: u32) -> Self {
Self {
handle: _rt::Resource::from_handle(handle),
}
}
#[doc(hidden)]
pub fn take_handle(&self) -> u32 {
_rt::Resource::take_handle(&self.handle)
}
#[doc(hidden)]
pub fn handle(&self) -> u32 {
_rt::Resource::handle(&self.handle)
}
}
unsafe impl _rt::WasmResource for Mat{
#[inline]
unsafe fn drop(_handle: u32) {
#[cfg(not(target_arch = "wasm32"))]
unreachable!();
#[cfg(target_arch = "wasm32")]
{
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[resource-drop]mat"]
fn drop(_: u32);
}
drop(_handle);
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn new() -> Self{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[constructor]mat"]
fn wit_import() -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import() -> i32{ unreachable!() }
let ret = wit_import();
Mat::from_handle(ret as u32)
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn new_with_size(cols: u32,rows: u32,mattype: Mattype,) -> Mat{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[static]mat.new-with-size"]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import(_rt::as_i32(&cols), _rt::as_i32(&rows), mattype.clone() as i32);
Mat::from_handle(ret as u32)
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn clone(&self,) -> Mat{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.clone"]
fn wit_import(_: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32);
Mat::from_handle(ret as u32)
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn close(&self,){
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.close"]
fn wit_import(_: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, ){ unreachable!() }
wit_import((self).handle() as i32);
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn cols(&self,) -> u32{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.cols"]
fn wit_import(_: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32);
ret as u32
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn rows(&self,) -> u32{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.rows"]
fn wit_import(_: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32);
ret as u32
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn region(&self,rect: Rect,) -> Mat{
unsafe {
let super::super::super::wasm::cv::types::Rect{ min:min0, max:max0, } = rect;
let super::super::super::wasm::cv::types::Size{ x:x1, y:y1, } = min0;
let super::super::super::wasm::cv::types::Size{ x:x2, y:y2, } = max0;
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.region"]
fn wit_import(_: i32, _: i32, _: i32, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32, _rt::as_i32(x1), _rt::as_i32(y1), _rt::as_i32(x2), _rt::as_i32(y2));
Mat::from_handle(ret as u32)
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn copy_to(&self,dst: Mat,){
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.copy-to"]
fn wit_import(_: i32, _: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, ){ unreachable!() }
wit_import((self).handle() as i32, (&dst).take_handle() as i32);
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn mattype(&self,) -> Mattype{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.mattype"]
fn wit_import(_: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32);
Mattype::_lift(ret as u8)
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn size(&self,) -> _rt::Vec::<u32>{
unsafe {
#[repr(align(4))]
struct RetArea([::core::mem::MaybeUninit::<u8>; 8]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]);
let ptr0 = ret_area.0.as_mut_ptr().cast::<u8>();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.size"]
fn wit_import(_: i32, _: *mut u8, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: *mut u8, ){ unreachable!() }
wit_import((self).handle() as i32, ptr0);
let l1 = *ptr0.add(0).cast::<*mut u8>();
let l2 = *ptr0.add(4).cast::<usize>();
let len3 = l2;
_rt::Vec::from_raw_parts(l1.cast(), len3, len3)
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn empty(&self,) -> bool{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.empty"]
fn wit_import(_: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32);
_rt::bool_lift(ret as u8)
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn get_float_at(&self,row: u32,col: u32,) -> f32{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.get-float-at"]
fn wit_import(_: i32, _: i32, _: i32, ) -> f32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, ) -> f32{ unreachable!() }
let ret = wit_import((self).handle() as i32, _rt::as_i32(&row), _rt::as_i32(&col));
ret
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn set_float_at(&self,row: u32,col: u32,val: f32,){
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.set-float-at"]
fn wit_import(_: i32, _: i32, _: i32, _: f32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: f32, ){ unreachable!() }
wit_import((self).handle() as i32, _rt::as_i32(&row), _rt::as_i32(&col), _rt::as_f32(&val));
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn get_uchar_at(&self,row: u32,col: u32,) -> u8{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.get-uchar-at"]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32, _rt::as_i32(&row), _rt::as_i32(&col));
ret as u8
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn set_uchar_at(&self,row: u32,col: u32,val: u8,){
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.set-uchar-at"]
fn wit_import(_: i32, _: i32, _: i32, _: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: i32, ){ unreachable!() }
wit_import((self).handle() as i32, _rt::as_i32(&row), _rt::as_i32(&col), _rt::as_i32(&val));
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn get_int_at(&self,row: u32,col: u32,) -> i32{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.get-int-at"]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32, _rt::as_i32(&row), _rt::as_i32(&col));
ret
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn set_int_at(&self,row: u32,col: u32,val: i32,){
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.set-int-at"]
fn wit_import(_: i32, _: i32, _: i32, _: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: i32, ){ unreachable!() }
wit_import((self).handle() as i32, _rt::as_i32(&row), _rt::as_i32(&col), _rt::as_i32(&val));
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn get_float_at3(&self,x: u32,y: u32,z: u32,) -> f32{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.get-float-at3"]
fn wit_import(_: i32, _: i32, _: i32, _: i32, ) -> f32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: i32, ) -> f32{ unreachable!() }
let ret = wit_import((self).handle() as i32, _rt::as_i32(&x), _rt::as_i32(&y), _rt::as_i32(&z));
ret
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn set_float_at3(&self,x: u32,y: u32,z: u32,val: f32,){
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.set-float-at3"]
fn wit_import(_: i32, _: i32, _: i32, _: i32, _: f32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: i32, _: f32, ){ unreachable!() }
wit_import((self).handle() as i32, _rt::as_i32(&x), _rt::as_i32(&y), _rt::as_i32(&z), _rt::as_f32(&val));
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn get_uchar_at3(&self,x: u32,y: u32,z: u32,) -> u8{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.get-uchar-at3"]
fn wit_import(_: i32, _: i32, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32, _rt::as_i32(&x), _rt::as_i32(&y), _rt::as_i32(&z));
ret as u8
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn set_uchar_at3(&self,x: u32,y: u32,z: u32,val: u8,){
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.set-uchar-at3"]
fn wit_import(_: i32, _: i32, _: i32, _: i32, _: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: i32, _: i32, ){ unreachable!() }
wit_import((self).handle() as i32, _rt::as_i32(&x), _rt::as_i32(&y), _rt::as_i32(&z), _rt::as_i32(&val));
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn get_int_at3(&self,x: u32,y: u32,z: u32,) -> i32{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.get-int-at3"]
fn wit_import(_: i32, _: i32, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32, _rt::as_i32(&x), _rt::as_i32(&y), _rt::as_i32(&z));
ret
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn set_int_at3(&self,x: u32,y: u32,z: u32,val: i32,){
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.set-int-at3"]
fn wit_import(_: i32, _: i32, _: i32, _: i32, _: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: i32, _: i32, ){ unreachable!() }
wit_import((self).handle() as i32, _rt::as_i32(&x), _rt::as_i32(&y), _rt::as_i32(&z), _rt::as_i32(&val));
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn get_vecb_at(&self,row: u32,col: u32,) -> _rt::Vec::<u8>{
unsafe {
#[repr(align(4))]
struct RetArea([::core::mem::MaybeUninit::<u8>; 8]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]);
let ptr0 = ret_area.0.as_mut_ptr().cast::<u8>();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.get-vecb-at"]
fn wit_import(_: i32, _: i32, _: i32, _: *mut u8, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: *mut u8, ){ unreachable!() }
wit_import((self).handle() as i32, _rt::as_i32(&row), _rt::as_i32(&col), ptr0);
let l1 = *ptr0.add(0).cast::<*mut u8>();
let l2 = *ptr0.add(4).cast::<usize>();
let len3 = l2;
_rt::Vec::from_raw_parts(l1.cast(), len3, len3)
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn get_vecf_at(&self,row: u32,col: u32,) -> _rt::Vec::<f32>{
unsafe {
#[repr(align(4))]
struct RetArea([::core::mem::MaybeUninit::<u8>; 8]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]);
let ptr0 = ret_area.0.as_mut_ptr().cast::<u8>();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.get-vecf-at"]
fn wit_import(_: i32, _: i32, _: i32, _: *mut u8, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: *mut u8, ){ unreachable!() }
wit_import((self).handle() as i32, _rt::as_i32(&row), _rt::as_i32(&col), ptr0);
let l1 = *ptr0.add(0).cast::<*mut u8>();
let l2 = *ptr0.add(4).cast::<usize>();
let len3 = l2;
_rt::Vec::from_raw_parts(l1.cast(), len3, len3)
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn get_veci_at(&self,row: u32,col: u32,) -> _rt::Vec::<i32>{
unsafe {
#[repr(align(4))]
struct RetArea([::core::mem::MaybeUninit::<u8>; 8]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]);
let ptr0 = ret_area.0.as_mut_ptr().cast::<u8>();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.get-veci-at"]
fn wit_import(_: i32, _: i32, _: i32, _: *mut u8, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: *mut u8, ){ unreachable!() }
wit_import((self).handle() as i32, _rt::as_i32(&row), _rt::as_i32(&col), ptr0);
let l1 = *ptr0.add(0).cast::<*mut u8>();
let l2 = *ptr0.add(4).cast::<usize>();
let len3 = l2;
_rt::Vec::from_raw_parts(l1.cast(), len3, len3)
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn reshape(&self,channels: u32,rows: u32,) -> Mat{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.reshape"]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32, _rt::as_i32(&channels), _rt::as_i32(&rows));
Mat::from_handle(ret as u32)
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn row_range(&self,start: u32,end: u32,) -> Mat{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.row-range"]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32, _rt::as_i32(&start), _rt::as_i32(&end));
Mat::from_handle(ret as u32)
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn col_range(&self,start: u32,end: u32,) -> Mat{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.col-range"]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32, _rt::as_i32(&start), _rt::as_i32(&end));
Mat::from_handle(ret as u32)
}
}
}
impl Mat {
#[allow(unused_unsafe, clippy::all)]
pub fn min_max_loc(&self,) -> MixMaxLocResult{
unsafe {
#[repr(align(4))]
struct RetArea([::core::mem::MaybeUninit::<u8>; 24]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 24]);
let ptr0 = ret_area.0.as_mut_ptr().cast::<u8>();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/mat")]
extern "C" {
#[link_name = "[method]mat.min-max-loc"]
fn wit_import(_: i32, _: *mut u8, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: *mut u8, ){ unreachable!() }
wit_import((self).handle() as i32, ptr0);
let l1 = *ptr0.add(0).cast::<f32>();
let l2 = *ptr0.add(4).cast::<f32>();
let l3 = *ptr0.add(8).cast::<i32>();
let l4 = *ptr0.add(12).cast::<i32>();
let l5 = *ptr0.add(16).cast::<i32>();
let l6 = *ptr0.add(20).cast::<i32>();
super::super::super::wasm::cv::types::MixMaxLocResult{
min_val: l1,
max_val: l2,
min_loc: super::super::super::wasm::cv::types::Size{
x: l3,
y: l4,
},
max_loc: super::super::super::wasm::cv::types::Size{
x: l5,
y: l6,
},
}
}
}
}
}
#[allow(dead_code, clippy::all)]
pub mod cv {
#[used]
#[doc(hidden)]
static __FORCE_SECTION_REF: fn() =
super::super::super::__link_custom_section_describing_imports;
use super::super::super::_rt;
pub type BorderType = super::super::super::wasm::cv::types::BorderType;
pub type Size = super::super::super::wasm::cv::types::Size;
pub type AdaptiveThresholdType = super::super::super::wasm::cv::types::AdaptiveThresholdType;
pub type ThresholdType = super::super::super::wasm::cv::types::ThresholdType;
pub type Rect = super::super::super::wasm::cv::types::Rect;
pub type Rgba = super::super::super::wasm::cv::types::Rgba;
pub type HersheyFontType = super::super::super::wasm::cv::types::HersheyFontType;
pub type InterpolationType = super::super::super::wasm::cv::types::InterpolationType;
pub type ColorCoversionType = super::super::super::wasm::cv::types::ColorCoversionType;
pub type Mat = super::super::super::wasm::cv::mat::Mat;
#[allow(unused_unsafe, clippy::all)]
pub fn arrowed_line(img: Mat,point1: Size,point2: Size,c: Rgba,thickness: u8,){
unsafe {
let super::super::super::wasm::cv::types::Size{ x:x0, y:y0, } = point1;
let super::super::super::wasm::cv::types::Size{ x:x1, y:y1, } = point2;
let super::super::super::wasm::cv::types::Rgba{ r:r2, g:g2, b:b2, a:a2, } = c;
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/cv")]
extern "C" {
#[link_name = "arrowed-line"]
fn wit_import(_: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, ){ unreachable!() }
wit_import((&img).take_handle() as i32, _rt::as_i32(x0), _rt::as_i32(y0), _rt::as_i32(x1), _rt::as_i32(y1), _rt::as_i32(r2), _rt::as_i32(g2), _rt::as_i32(b2), _rt::as_i32(a2), _rt::as_i32(&thickness));
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn rectangle(img: Mat,r: Rect,c: Rgba,thickness: u8,){
unsafe {
let super::super::super::wasm::cv::types::Rect{ min:min0, max:max0, } = r;
let super::super::super::wasm::cv::types::Size{ x:x1, y:y1, } = min0;
let super::super::super::wasm::cv::types::Size{ x:x2, y:y2, } = max0;
let super::super::super::wasm::cv::types::Rgba{ r:r3, g:g3, b:b3, a:a3, } = c;
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/cv")]
extern "C" {
#[link_name = "rectangle"]
fn wit_import(_: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, ){ unreachable!() }
wit_import((&img).take_handle() as i32, _rt::as_i32(x1), _rt::as_i32(y1), _rt::as_i32(x2), _rt::as_i32(y2), _rt::as_i32(r3), _rt::as_i32(g3), _rt::as_i32(b3), _rt::as_i32(a3), _rt::as_i32(&thickness));
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn circle(img: Mat,center: Size,radius: u32,c: Rgba,thickness: u8,){
unsafe {
let super::super::super::wasm::cv::types::Size{ x:x0, y:y0, } = center;
let super::super::super::wasm::cv::types::Rgba{ r:r1, g:g1, b:b1, a:a1, } = c;
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/cv")]
extern "C" {
#[link_name = "circle"]
fn wit_import(_: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, ){ unreachable!() }
wit_import((&img).take_handle() as i32, _rt::as_i32(x0), _rt::as_i32(y0), _rt::as_i32(&radius), _rt::as_i32(r1), _rt::as_i32(g1), _rt::as_i32(b1), _rt::as_i32(a1), _rt::as_i32(&thickness));
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn line(img: Mat,point1: Size,point2: Size,c: Rgba,thickness: u8,){
unsafe {
let super::super::super::wasm::cv::types::Size{ x:x0, y:y0, } = point1;
let super::super::super::wasm::cv::types::Size{ x:x1, y:y1, } = point2;
let super::super::super::wasm::cv::types::Rgba{ r:r2, g:g2, b:b2, a:a2, } = c;
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/cv")]
extern "C" {
#[link_name = "line"]
fn wit_import(_: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, ){ unreachable!() }
wit_import((&img).take_handle() as i32, _rt::as_i32(x0), _rt::as_i32(y0), _rt::as_i32(x1), _rt::as_i32(y1), _rt::as_i32(r2), _rt::as_i32(g2), _rt::as_i32(b2), _rt::as_i32(a2), _rt::as_i32(&thickness));
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn put_text(img: Mat,text: &str,org: Size,font_face: HersheyFontType,font_scale: f64,c: Rgba,thickness: i32,){
unsafe {
let vec0 = text;
let ptr0 = vec0.as_ptr().cast::<u8>();
let len0 = vec0.len();
let super::super::super::wasm::cv::types::Size{ x:x1, y:y1, } = org;
let super::super::super::wasm::cv::types::Rgba{ r:r2, g:g2, b:b2, a:a2, } = c;
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/cv")]
extern "C" {
#[link_name = "put-text"]
fn wit_import(_: i32, _: *mut u8, _: usize, _: i32, _: i32, _: i32, _: f64, _: i32, _: i32, _: i32, _: i32, _: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: *mut u8, _: usize, _: i32, _: i32, _: i32, _: f64, _: i32, _: i32, _: i32, _: i32, _: i32, ){ unreachable!() }
wit_import((&img).take_handle() as i32, ptr0.cast_mut(), len0, _rt::as_i32(x1), _rt::as_i32(y1), font_face.clone() as i32, _rt::as_f64(&font_scale), _rt::as_i32(r2), _rt::as_i32(g2), _rt::as_i32(b2), _rt::as_i32(a2), _rt::as_i32(&thickness));
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn adaptive_threshold(src: Mat,max_value: f32,adaptive_type: AdaptiveThresholdType,threshold_type: ThresholdType,block_size: u32,c: f32,) -> Mat{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/cv")]
extern "C" {
#[link_name = "adaptive-threshold"]
fn wit_import(_: i32, _: f32, _: i32, _: i32, _: i32, _: f32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: f32, _: i32, _: i32, _: i32, _: f32, ) -> i32{ unreachable!() }
let ret = wit_import((&src).take_handle() as i32, _rt::as_f32(&max_value), adaptive_type.clone() as i32, threshold_type.clone() as i32, _rt::as_i32(&block_size), _rt::as_f32(&c));
super::super::super::wasm::cv::mat::Mat::from_handle(ret as u32)
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn blur(src: Mat,k_size: Size,) -> Mat{
unsafe {
let super::super::super::wasm::cv::types::Size{ x:x0, y:y0, } = k_size;
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/cv")]
extern "C" {
#[link_name = "blur"]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((&src).take_handle() as i32, _rt::as_i32(x0), _rt::as_i32(y0));
super::super::super::wasm::cv::mat::Mat::from_handle(ret as u32)
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn box_filter(src: Mat,depth: u32,k_size: Size,) -> Mat{
unsafe {
let super::super::super::wasm::cv::types::Size{ x:x0, y:y0, } = k_size;
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/cv")]
extern "C" {
#[link_name = "box-filter"]
fn wit_import(_: i32, _: i32, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((&src).take_handle() as i32, _rt::as_i32(&depth), _rt::as_i32(x0), _rt::as_i32(y0));
super::super::super::wasm::cv::mat::Mat::from_handle(ret as u32)
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn gaussian_blur(src: Mat,size: Size,sigma_x: f32,sigma_y: f32,border: BorderType,) -> Mat{
unsafe {
let super::super::super::wasm::cv::types::Size{ x:x0, y:y0, } = size;
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/cv")]
extern "C" {
#[link_name = "gaussian-blur"]
fn wit_import(_: i32, _: i32, _: i32, _: f32, _: f32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: f32, _: f32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((&src).take_handle() as i32, _rt::as_i32(x0), _rt::as_i32(y0), _rt::as_f32(&sigma_x), _rt::as_f32(&sigma_y), border.clone() as i32);
super::super::super::wasm::cv::mat::Mat::from_handle(ret as u32)
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn median_blur(src: Mat,k_size: Size,) -> Mat{
unsafe {
let super::super::super::wasm::cv::types::Size{ x:x0, y:y0, } = k_size;
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/cv")]
extern "C" {
#[link_name = "median-blur"]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((&src).take_handle() as i32, _rt::as_i32(x0), _rt::as_i32(y0));
super::super::super::wasm::cv::mat::Mat::from_handle(ret as u32)
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn threshold(src: Mat,thresh: f32,max_value: f32,threshold_type: ThresholdType,) -> Mat{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/cv")]
extern "C" {
#[link_name = "threshold"]
fn wit_import(_: i32, _: f32, _: f32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: f32, _: f32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((&src).take_handle() as i32, _rt::as_f32(&thresh), _rt::as_f32(&max_value), threshold_type.clone() as i32);
super::super::super::wasm::cv::mat::Mat::from_handle(ret as u32)
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn cvt_color(src: Mat,code: ColorCoversionType,) -> Mat{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/cv")]
extern "C" {
#[link_name = "cvt-color"]
fn wit_import(_: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((&src).take_handle() as i32, code.clone() as i32);
super::super::super::wasm::cv::mat::Mat::from_handle(ret as u32)
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn transpose_nd(src: Mat,order: &[i32],) -> Mat{
unsafe {
let vec0 = order;
let ptr0 = vec0.as_ptr().cast::<u8>();
let len0 = vec0.len();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/cv")]
extern "C" {
#[link_name = "transpose-ND"]
fn wit_import(_: i32, _: *mut u8, _: usize, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: *mut u8, _: usize, ) -> i32{ unreachable!() }
let ret = wit_import((&src).take_handle() as i32, ptr0.cast_mut(), len0);
super::super::super::wasm::cv::mat::Mat::from_handle(ret as u32)
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn resize(src: Mat,size: Size,fx: f32,fy: f32,interp: InterpolationType,) -> Mat{
unsafe {
let super::super::super::wasm::cv::types::Size{ x:x0, y:y0, } = size;
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/cv")]
extern "C" {
#[link_name = "resize"]
fn wit_import(_: i32, _: i32, _: i32, _: f32, _: f32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: f32, _: f32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((&src).take_handle() as i32, _rt::as_i32(x0), _rt::as_i32(y0), _rt::as_f32(&fx), _rt::as_f32(&fy), interp.clone() as i32);
super::super::super::wasm::cv::mat::Mat::from_handle(ret as u32)
}
}
}
#[allow(dead_code, clippy::all)]
pub mod dnn {
#[used]
#[doc(hidden)]
static __FORCE_SECTION_REF: fn() =
super::super::super::__link_custom_section_describing_imports;
use super::super::super::_rt;
pub type Mat = super::super::super::wasm::cv::mat::Mat;
pub type Size = super::super::super::wasm::cv::types::Size;
pub type Scalar = super::super::super::wasm::cv::types::Scalar;
pub type Rect = super::super::super::wasm::cv::types::Rect;
pub type BlobParams = super::super::super::wasm::cv::types::BlobParams;
#[repr(u8)]
#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)]
pub enum NetBackendType {
NetBackendDefault,
NetBackendHalide,
NetBackendOpenvino,
NetBackendOpencv,
NetBackendVkcom,
NetBackendCuda,
}
impl ::core::fmt::Debug for NetBackendType {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
NetBackendType::NetBackendDefault => {
f.debug_tuple("NetBackendType::NetBackendDefault").finish()
}
NetBackendType::NetBackendHalide => {
f.debug_tuple("NetBackendType::NetBackendHalide").finish()
}
NetBackendType::NetBackendOpenvino => {
f.debug_tuple("NetBackendType::NetBackendOpenvino").finish()
}
NetBackendType::NetBackendOpencv => {
f.debug_tuple("NetBackendType::NetBackendOpencv").finish()
}
NetBackendType::NetBackendVkcom => {
f.debug_tuple("NetBackendType::NetBackendVkcom").finish()
}
NetBackendType::NetBackendCuda => {
f.debug_tuple("NetBackendType::NetBackendCuda").finish()
}
}
}
}
impl NetBackendType{
#[doc(hidden)]
pub unsafe fn _lift(val: u8) -> NetBackendType{
if !cfg!(debug_assertions) {
return ::core::mem::transmute(val);
}
match val {
0 => NetBackendType::NetBackendDefault,
1 => NetBackendType::NetBackendHalide,
2 => NetBackendType::NetBackendOpenvino,
3 => NetBackendType::NetBackendOpencv,
4 => NetBackendType::NetBackendVkcom,
5 => NetBackendType::NetBackendCuda,
_ => panic!("invalid enum discriminant"),
}
}
}
#[repr(u8)]
#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)]
pub enum NetTargetType {
NetTargetCpu,
NetTargetFp32,
NetTargetFp16,
NetTargetVpu,
NetTargetVulkan,
NetTargetFpga,
NetTargetCuda,
NetTargetCudaFp16,
}
impl ::core::fmt::Debug for NetTargetType {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
NetTargetType::NetTargetCpu => {
f.debug_tuple("NetTargetType::NetTargetCpu").finish()
}
NetTargetType::NetTargetFp32 => {
f.debug_tuple("NetTargetType::NetTargetFp32").finish()
}
NetTargetType::NetTargetFp16 => {
f.debug_tuple("NetTargetType::NetTargetFp16").finish()
}
NetTargetType::NetTargetVpu => {
f.debug_tuple("NetTargetType::NetTargetVpu").finish()
}
NetTargetType::NetTargetVulkan => {
f.debug_tuple("NetTargetType::NetTargetVulkan").finish()
}
NetTargetType::NetTargetFpga => {
f.debug_tuple("NetTargetType::NetTargetFpga").finish()
}
NetTargetType::NetTargetCuda => {
f.debug_tuple("NetTargetType::NetTargetCuda").finish()
}
NetTargetType::NetTargetCudaFp16 => {
f.debug_tuple("NetTargetType::NetTargetCudaFp16").finish()
}
}
}
}
impl NetTargetType{
#[doc(hidden)]
pub unsafe fn _lift(val: u8) -> NetTargetType{
if !cfg!(debug_assertions) {
return ::core::mem::transmute(val);
}
match val {
0 => NetTargetType::NetTargetCpu,
1 => NetTargetType::NetTargetFp32,
2 => NetTargetType::NetTargetFp16,
3 => NetTargetType::NetTargetVpu,
4 => NetTargetType::NetTargetVulkan,
5 => NetTargetType::NetTargetFpga,
6 => NetTargetType::NetTargetCuda,
7 => NetTargetType::NetTargetCudaFp16,
_ => panic!("invalid enum discriminant"),
}
}
}
#[repr(u8)]
#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)]
pub enum DataLayoutType {
DataLayoutUnknown,
DataLayoutNd,
DataLayoutNchw,
DataLayoutNhwc,
DataLayoutNdhwc,
DataLayoutPlanar,
}
impl ::core::fmt::Debug for DataLayoutType {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
DataLayoutType::DataLayoutUnknown => {
f.debug_tuple("DataLayoutType::DataLayoutUnknown").finish()
}
DataLayoutType::DataLayoutNd => {
f.debug_tuple("DataLayoutType::DataLayoutNd").finish()
}
DataLayoutType::DataLayoutNchw => {
f.debug_tuple("DataLayoutType::DataLayoutNchw").finish()
}
DataLayoutType::DataLayoutNhwc => {
f.debug_tuple("DataLayoutType::DataLayoutNhwc").finish()
}
DataLayoutType::DataLayoutNdhwc => {
f.debug_tuple("DataLayoutType::DataLayoutNdhwc").finish()
}
DataLayoutType::DataLayoutPlanar => {
f.debug_tuple("DataLayoutType::DataLayoutPlanar").finish()
}
}
}
}
impl DataLayoutType{
#[doc(hidden)]
pub unsafe fn _lift(val: u8) -> DataLayoutType{
if !cfg!(debug_assertions) {
return ::core::mem::transmute(val);
}
match val {
0 => DataLayoutType::DataLayoutUnknown,
1 => DataLayoutType::DataLayoutNd,
2 => DataLayoutType::DataLayoutNchw,
3 => DataLayoutType::DataLayoutNhwc,
4 => DataLayoutType::DataLayoutNdhwc,
5 => DataLayoutType::DataLayoutPlanar,
_ => panic!("invalid enum discriminant"),
}
}
}
#[repr(u8)]
#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)]
pub enum PaddingModeType {
PaddingModeNull,
PaddingModeCropCenter,
PaddingModeLetterbox,
}
impl ::core::fmt::Debug for PaddingModeType {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
PaddingModeType::PaddingModeNull => {
f.debug_tuple("PaddingModeType::PaddingModeNull").finish()
}
PaddingModeType::PaddingModeCropCenter => {
f.debug_tuple("PaddingModeType::PaddingModeCropCenter").finish()
}
PaddingModeType::PaddingModeLetterbox => {
f.debug_tuple("PaddingModeType::PaddingModeLetterbox").finish()
}
}
}
}
impl PaddingModeType{
#[doc(hidden)]
pub unsafe fn _lift(val: u8) -> PaddingModeType{
if !cfg!(debug_assertions) {
return ::core::mem::transmute(val);
}
match val {
0 => PaddingModeType::PaddingModeNull,
1 => PaddingModeType::PaddingModeCropCenter,
2 => PaddingModeType::PaddingModeLetterbox,
_ => panic!("invalid enum discriminant"),
}
}
}
#[derive(Debug)]
#[repr(transparent)]
pub struct Layer{
handle: _rt::Resource<Layer>,
}
impl Layer{
#[doc(hidden)]
pub unsafe fn from_handle(handle: u32) -> Self {
Self {
handle: _rt::Resource::from_handle(handle),
}
}
#[doc(hidden)]
pub fn take_handle(&self) -> u32 {
_rt::Resource::take_handle(&self.handle)
}
#[doc(hidden)]
pub fn handle(&self) -> u32 {
_rt::Resource::handle(&self.handle)
}
}
unsafe impl _rt::WasmResource for Layer{
#[inline]
unsafe fn drop(_handle: u32) {
#[cfg(not(target_arch = "wasm32"))]
unreachable!();
#[cfg(target_arch = "wasm32")]
{
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "[resource-drop]layer"]
fn drop(_: u32);
}
drop(_handle);
}
}
}
#[derive(Debug)]
#[repr(transparent)]
pub struct Net{
handle: _rt::Resource<Net>,
}
impl Net{
#[doc(hidden)]
pub unsafe fn from_handle(handle: u32) -> Self {
Self {
handle: _rt::Resource::from_handle(handle),
}
}
#[doc(hidden)]
pub fn take_handle(&self) -> u32 {
_rt::Resource::take_handle(&self.handle)
}
#[doc(hidden)]
pub fn handle(&self) -> u32 {
_rt::Resource::handle(&self.handle)
}
}
unsafe impl _rt::WasmResource for Net{
#[inline]
unsafe fn drop(_handle: u32) {
#[cfg(not(target_arch = "wasm32"))]
unreachable!();
#[cfg(target_arch = "wasm32")]
{
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "[resource-drop]net"]
fn drop(_: u32);
}
drop(_handle);
}
}
}
impl Layer {
#[allow(unused_unsafe, clippy::all)]
pub fn new() -> Self{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "[constructor]layer"]
fn wit_import() -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import() -> i32{ unreachable!() }
let ret = wit_import();
Layer::from_handle(ret as u32)
}
}
}
impl Layer {
#[allow(unused_unsafe, clippy::all)]
pub fn get_name(&self,) -> _rt::String{
unsafe {
#[repr(align(4))]
struct RetArea([::core::mem::MaybeUninit::<u8>; 8]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]);
let ptr0 = ret_area.0.as_mut_ptr().cast::<u8>();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "[method]layer.get-name"]
fn wit_import(_: i32, _: *mut u8, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: *mut u8, ){ unreachable!() }
wit_import((self).handle() as i32, ptr0);
let l1 = *ptr0.add(0).cast::<*mut u8>();
let l2 = *ptr0.add(4).cast::<usize>();
let len3 = l2;
let bytes3 = _rt::Vec::from_raw_parts(l1.cast(), len3, len3);
_rt::string_lift(bytes3)
}
}
}
impl Net {
#[allow(unused_unsafe, clippy::all)]
pub fn read(model: &str,config: &str,) -> Net{
unsafe {
let vec0 = model;
let ptr0 = vec0.as_ptr().cast::<u8>();
let len0 = vec0.len();
let vec1 = config;
let ptr1 = vec1.as_ptr().cast::<u8>();
let len1 = vec1.len();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "[static]net.read"]
fn wit_import(_: *mut u8, _: usize, _: *mut u8, _: usize, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: *mut u8, _: usize, _: *mut u8, _: usize, ) -> i32{ unreachable!() }
let ret = wit_import(ptr0.cast_mut(), len0, ptr1.cast_mut(), len1);
Net::from_handle(ret as u32)
}
}
}
impl Net {
#[allow(unused_unsafe, clippy::all)]
pub fn read_from_onnx(model: &str,) -> Net{
unsafe {
let vec0 = model;
let ptr0 = vec0.as_ptr().cast::<u8>();
let len0 = vec0.len();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "[static]net.read-from-ONNX"]
fn wit_import(_: *mut u8, _: usize, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: *mut u8, _: usize, ) -> i32{ unreachable!() }
let ret = wit_import(ptr0.cast_mut(), len0);
Net::from_handle(ret as u32)
}
}
}
impl Net {
#[allow(unused_unsafe, clippy::all)]
pub fn close(&self,){
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "[method]net.close"]
fn wit_import(_: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, ){ unreachable!() }
wit_import((self).handle() as i32);
}
}
}
impl Net {
#[allow(unused_unsafe, clippy::all)]
pub fn empty(&self,) -> bool{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "[method]net.empty"]
fn wit_import(_: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32);
_rt::bool_lift(ret as u8)
}
}
}
impl Net {
#[allow(unused_unsafe, clippy::all)]
pub fn set_input(&self,input: Mat,name: &str,){
unsafe {
let vec0 = name;
let ptr0 = vec0.as_ptr().cast::<u8>();
let len0 = vec0.len();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "[method]net.set-input"]
fn wit_import(_: i32, _: i32, _: *mut u8, _: usize, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: *mut u8, _: usize, ){ unreachable!() }
wit_import((self).handle() as i32, (&input).take_handle() as i32, ptr0.cast_mut(), len0);
}
}
}
impl Net {
#[allow(unused_unsafe, clippy::all)]
pub fn forward(&self,output_name: &str,) -> Mat{
unsafe {
let vec0 = output_name;
let ptr0 = vec0.as_ptr().cast::<u8>();
let len0 = vec0.len();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "[method]net.forward"]
fn wit_import(_: i32, _: *mut u8, _: usize, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: *mut u8, _: usize, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32, ptr0.cast_mut(), len0);
super::super::super::wasm::cv::mat::Mat::from_handle(ret as u32)
}
}
}
impl Net {
#[allow(unused_unsafe, clippy::all)]
pub fn forward_layers(&self,output_names: &[_rt::String],) -> _rt::Vec::<Mat>{
unsafe {
#[repr(align(4))]
struct RetArea([::core::mem::MaybeUninit::<u8>; 8]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]);
let vec1 = output_names;
let len1 = vec1.len();
let layout1 = _rt::alloc::Layout::from_size_align_unchecked(vec1.len() * 8, 4);
let result1 = if layout1.size() != 0 {
let ptr = _rt::alloc::alloc(layout1).cast::<u8>();
if ptr.is_null()
{
_rt::alloc::handle_alloc_error(layout1);
}
ptr
}else {
::core::ptr::null_mut()
};
for (i, e) in vec1.into_iter().enumerate() {
let base = result1.add(i * 8);
{
let vec0 = e;
let ptr0 = vec0.as_ptr().cast::<u8>();
let len0 = vec0.len();
*base.add(4).cast::<usize>() = len0;
*base.add(0).cast::<*mut u8>() = ptr0.cast_mut();
}
}
let ptr2 = ret_area.0.as_mut_ptr().cast::<u8>();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "[method]net.forward-layers"]
fn wit_import(_: i32, _: *mut u8, _: usize, _: *mut u8, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: *mut u8, _: usize, _: *mut u8, ){ unreachable!() }
wit_import((self).handle() as i32, result1, len1, ptr2);
let l3 = *ptr2.add(0).cast::<*mut u8>();
let l4 = *ptr2.add(4).cast::<usize>();
let base6 = l3;
let len6 = l4;
let mut result6 = _rt::Vec::with_capacity(len6);
for i in 0..len6 {
let base = base6.add(i * 4);
let e6 = {
let l5 = *base.add(0).cast::<i32>();
super::super::super::wasm::cv::mat::Mat::from_handle(l5 as u32)
};
result6.push(e6);
}
_rt::cabi_dealloc(base6, len6 * 4, 4);
if layout1.size() != 0 {
_rt::alloc::dealloc(result1.cast(), layout1);
}
result6
}
}
}
impl Net {
#[allow(unused_unsafe, clippy::all)]
pub fn get_unconnected_out_layers(&self,) -> _rt::Vec::<u32>{
unsafe {
#[repr(align(4))]
struct RetArea([::core::mem::MaybeUninit::<u8>; 8]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]);
let ptr0 = ret_area.0.as_mut_ptr().cast::<u8>();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "[method]net.get-unconnected-out-layers"]
fn wit_import(_: i32, _: *mut u8, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: *mut u8, ){ unreachable!() }
wit_import((self).handle() as i32, ptr0);
let l1 = *ptr0.add(0).cast::<*mut u8>();
let l2 = *ptr0.add(4).cast::<usize>();
let len3 = l2;
_rt::Vec::from_raw_parts(l1.cast(), len3, len3)
}
}
}
impl Net {
#[allow(unused_unsafe, clippy::all)]
pub fn get_layer_names(&self,) -> _rt::Vec::<_rt::String>{
unsafe {
#[repr(align(4))]
struct RetArea([::core::mem::MaybeUninit::<u8>; 8]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]);
let ptr0 = ret_area.0.as_mut_ptr().cast::<u8>();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "[method]net.get-layer-names"]
fn wit_import(_: i32, _: *mut u8, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: *mut u8, ){ unreachable!() }
wit_import((self).handle() as i32, ptr0);
let l1 = *ptr0.add(0).cast::<*mut u8>();
let l2 = *ptr0.add(4).cast::<usize>();
let base6 = l1;
let len6 = l2;
let mut result6 = _rt::Vec::with_capacity(len6);
for i in 0..len6 {
let base = base6.add(i * 8);
let e6 = {
let l3 = *base.add(0).cast::<*mut u8>();
let l4 = *base.add(4).cast::<usize>();
let len5 = l4;
let bytes5 = _rt::Vec::from_raw_parts(l3.cast(), len5, len5);
_rt::string_lift(bytes5)
};
result6.push(e6);
}
_rt::cabi_dealloc(base6, len6 * 8, 4);
result6
}
}
}
impl Net {
#[allow(unused_unsafe, clippy::all)]
pub fn get_layer(&self,id: u32,) -> Layer{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "[method]net.get-layer"]
fn wit_import(_: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32, _rt::as_i32(&id));
Layer::from_handle(ret as u32)
}
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn blob_from_image(image: Mat,scale_factor: f32,size: Size,mean: Scalar,swap_rb: bool,crop: bool,) -> Mat{
unsafe {
let super::super::super::wasm::cv::types::Size{ x:x0, y:y0, } = size;
let super::super::super::wasm::cv::types::Scalar{ val1:val11, val2:val21, val3:val31, val4:val41, } = mean;
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "blob-from-image"]
fn wit_import(_: i32, _: f32, _: i32, _: i32, _: f32, _: f32, _: f32, _: f32, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: f32, _: i32, _: i32, _: f32, _: f32, _: f32, _: f32, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((&image).take_handle() as i32, _rt::as_f32(&scale_factor), _rt::as_i32(x0), _rt::as_i32(y0), _rt::as_f32(val11), _rt::as_f32(val21), _rt::as_f32(val31), _rt::as_f32(val41), match &swap_rb { true => 1, false => 0 }, match &crop { true => 1, false => 0 });
super::super::super::wasm::cv::mat::Mat::from_handle(ret as u32)
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn blob_from_image_with_params(image: Mat,params: BlobParams,) -> Mat{
unsafe {
let super::super::super::wasm::cv::types::BlobParams{ scale_factor:scale_factor0, size:size0, mean:mean0, swap_rb:swap_rb0, ddepth:ddepth0, data_layout:data_layout0, padding_mode:padding_mode0, border:border0, } = params;
let super::super::super::wasm::cv::types::Size{ x:x1, y:y1, } = size0;
let super::super::super::wasm::cv::types::Scalar{ val1:val12, val2:val22, val3:val32, val4:val42, } = mean0;
let super::super::super::wasm::cv::types::Scalar{ val1:val13, val2:val23, val3:val33, val4:val43, } = border0;
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "blob-from-image-with-params"]
fn wit_import(_: i32, _: f32, _: i32, _: i32, _: f32, _: f32, _: f32, _: f32, _: i32, _: i32, _: i32, _: i32, _: f32, _: f32, _: f32, _: f32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: f32, _: i32, _: i32, _: f32, _: f32, _: f32, _: f32, _: i32, _: i32, _: i32, _: i32, _: f32, _: f32, _: f32, _: f32, ) -> i32{ unreachable!() }
let ret = wit_import((&image).take_handle() as i32, _rt::as_f32(scale_factor0), _rt::as_i32(x1), _rt::as_i32(y1), _rt::as_f32(val12), _rt::as_f32(val22), _rt::as_f32(val32), _rt::as_f32(val42), match swap_rb0 { true => 1, false => 0 }, _rt::as_i32(ddepth0), data_layout0.clone() as i32, padding_mode0.clone() as i32, _rt::as_f32(val13), _rt::as_f32(val23), _rt::as_f32(val33), _rt::as_f32(val43));
super::super::super::wasm::cv::mat::Mat::from_handle(ret as u32)
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn blob_rects_to_image_rects(params: BlobParams,blob_rects: &[Rect],image_size: Size,) -> _rt::Vec::<Rect>{
unsafe {
#[repr(align(4))]
struct RetArea([::core::mem::MaybeUninit::<u8>; 64]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 64]);
let ptr0 = ret_area.0.as_mut_ptr().cast::<u8>();let super::super::super::wasm::cv::types::BlobParams{ scale_factor:scale_factor1, size:size1, mean:mean1, swap_rb:swap_rb1, ddepth:ddepth1, data_layout:data_layout1, padding_mode:padding_mode1, border:border1, } = params;
*ptr0.add(0).cast::<f32>() = _rt::as_f32(scale_factor1);
let super::super::super::wasm::cv::types::Size{ x:x2, y:y2, } = size1;
*ptr0.add(4).cast::<i32>() = _rt::as_i32(x2);
*ptr0.add(8).cast::<i32>() = _rt::as_i32(y2);
let super::super::super::wasm::cv::types::Scalar{ val1:val13, val2:val23, val3:val33, val4:val43, } = mean1;
*ptr0.add(12).cast::<f32>() = _rt::as_f32(val13);
*ptr0.add(16).cast::<f32>() = _rt::as_f32(val23);
*ptr0.add(20).cast::<f32>() = _rt::as_f32(val33);
*ptr0.add(24).cast::<f32>() = _rt::as_f32(val43);
*ptr0.add(28).cast::<u8>() = (match swap_rb1 { true => 1, false => 0 }) as u8;
*ptr0.add(29).cast::<u8>() = (_rt::as_i32(ddepth1)) as u8;
*ptr0.add(30).cast::<u8>() = (data_layout1.clone() as i32) as u8;
*ptr0.add(31).cast::<u8>() = (padding_mode1.clone() as i32) as u8;
let super::super::super::wasm::cv::types::Scalar{ val1:val14, val2:val24, val3:val34, val4:val44, } = border1;
*ptr0.add(32).cast::<f32>() = _rt::as_f32(val14);
*ptr0.add(36).cast::<f32>() = _rt::as_f32(val24);
*ptr0.add(40).cast::<f32>() = _rt::as_f32(val34);
*ptr0.add(44).cast::<f32>() = _rt::as_f32(val44);
let vec5 = blob_rects;
let ptr5 = vec5.as_ptr().cast::<u8>();
let len5 = vec5.len();
*ptr0.add(52).cast::<usize>() = len5;
*ptr0.add(48).cast::<*mut u8>() = ptr5.cast_mut();
let super::super::super::wasm::cv::types::Size{ x:x6, y:y6, } = image_size;
*ptr0.add(56).cast::<i32>() = _rt::as_i32(x6);
*ptr0.add(60).cast::<i32>() = _rt::as_i32(y6);
let ptr7 = ret_area.0.as_mut_ptr().cast::<u8>();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "blob-rects-to-image-rects"]
fn wit_import(_: *mut u8, _: *mut u8, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: *mut u8, _: *mut u8, ){ unreachable!() }
wit_import(ptr0, ptr7);
let l8 = *ptr7.add(0).cast::<*mut u8>();
let l9 = *ptr7.add(4).cast::<usize>();
let len10 = l9;
_rt::Vec::from_raw_parts(l8.cast(), len10, len10)
}
}
#[allow(unused_unsafe, clippy::all)]
pub fn nms_boxes(bboxes: &[Rect],scores: &[f32],score_threshold: f32,nms_threshold: f32,) -> _rt::Vec::<i32>{
unsafe {
#[repr(align(4))]
struct RetArea([::core::mem::MaybeUninit::<u8>; 8]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]);
let vec0 = bboxes;
let ptr0 = vec0.as_ptr().cast::<u8>();
let len0 = vec0.len();
let vec1 = scores;
let ptr1 = vec1.as_ptr().cast::<u8>();
let len1 = vec1.len();
let ptr2 = ret_area.0.as_mut_ptr().cast::<u8>();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/dnn")]
extern "C" {
#[link_name = "NMS-boxes"]
fn wit_import(_: *mut u8, _: usize, _: *mut u8, _: usize, _: f32, _: f32, _: *mut u8, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: *mut u8, _: usize, _: *mut u8, _: usize, _: f32, _: f32, _: *mut u8, ){ unreachable!() }
wit_import(ptr0.cast_mut(), len0, ptr1.cast_mut(), len1, _rt::as_f32(&score_threshold), _rt::as_f32(&nms_threshold), ptr2);
let l3 = *ptr2.add(0).cast::<*mut u8>();
let l4 = *ptr2.add(4).cast::<usize>();
let len5 = l4;
_rt::Vec::from_raw_parts(l3.cast(), len5, len5)
}
}
}
#[allow(dead_code, clippy::all)]
pub mod objdetect {
#[used]
#[doc(hidden)]
static __FORCE_SECTION_REF: fn() =
super::super::super::__link_custom_section_describing_imports;
use super::super::super::_rt;
pub type Mat = super::super::super::wasm::cv::mat::Mat;
pub type Size = super::super::super::wasm::cv::types::Size;
pub type Rect = super::super::super::wasm::cv::types::Rect;
#[derive(Debug)]
#[repr(transparent)]
pub struct CascadeClassifier{
handle: _rt::Resource<CascadeClassifier>,
}
impl CascadeClassifier{
#[doc(hidden)]
pub unsafe fn from_handle(handle: u32) -> Self {
Self {
handle: _rt::Resource::from_handle(handle),
}
}
#[doc(hidden)]
pub fn take_handle(&self) -> u32 {
_rt::Resource::take_handle(&self.handle)
}
#[doc(hidden)]
pub fn handle(&self) -> u32 {
_rt::Resource::handle(&self.handle)
}
}
unsafe impl _rt::WasmResource for CascadeClassifier{
#[inline]
unsafe fn drop(_handle: u32) {
#[cfg(not(target_arch = "wasm32"))]
unreachable!();
#[cfg(target_arch = "wasm32")]
{
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[resource-drop]cascade-classifier"]
fn drop(_: u32);
}
drop(_handle);
}
}
}
#[derive(Debug)]
#[repr(transparent)]
pub struct HogDescriptor{
handle: _rt::Resource<HogDescriptor>,
}
impl HogDescriptor{
#[doc(hidden)]
pub unsafe fn from_handle(handle: u32) -> Self {
Self {
handle: _rt::Resource::from_handle(handle),
}
}
#[doc(hidden)]
pub fn take_handle(&self) -> u32 {
_rt::Resource::take_handle(&self.handle)
}
#[doc(hidden)]
pub fn handle(&self) -> u32 {
_rt::Resource::handle(&self.handle)
}
}
unsafe impl _rt::WasmResource for HogDescriptor{
#[inline]
unsafe fn drop(_handle: u32) {
#[cfg(not(target_arch = "wasm32"))]
unreachable!();
#[cfg(target_arch = "wasm32")]
{
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[resource-drop]HOG-descriptor"]
fn drop(_: u32);
}
drop(_handle);
}
}
}
#[derive(Debug)]
#[repr(transparent)]
pub struct FaceDetectorYn{
handle: _rt::Resource<FaceDetectorYn>,
}
impl FaceDetectorYn{
#[doc(hidden)]
pub unsafe fn from_handle(handle: u32) -> Self {
Self {
handle: _rt::Resource::from_handle(handle),
}
}
#[doc(hidden)]
pub fn take_handle(&self) -> u32 {
_rt::Resource::take_handle(&self.handle)
}
#[doc(hidden)]
pub fn handle(&self) -> u32 {
_rt::Resource::handle(&self.handle)
}
}
unsafe impl _rt::WasmResource for FaceDetectorYn{
#[inline]
unsafe fn drop(_handle: u32) {
#[cfg(not(target_arch = "wasm32"))]
unreachable!();
#[cfg(target_arch = "wasm32")]
{
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[resource-drop]face-detector-YN"]
fn drop(_: u32);
}
drop(_handle);
}
}
}
#[repr(u8)]
#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)]
pub enum FaceDistanceType {
FaceDistanceTypeCosine,
FaceDistanceNormL2,
}
impl ::core::fmt::Debug for FaceDistanceType {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
FaceDistanceType::FaceDistanceTypeCosine => {
f.debug_tuple("FaceDistanceType::FaceDistanceTypeCosine").finish()
}
FaceDistanceType::FaceDistanceNormL2 => {
f.debug_tuple("FaceDistanceType::FaceDistanceNormL2").finish()
}
}
}
}
impl FaceDistanceType{
#[doc(hidden)]
pub unsafe fn _lift(val: u8) -> FaceDistanceType{
if !cfg!(debug_assertions) {
return ::core::mem::transmute(val);
}
match val {
0 => FaceDistanceType::FaceDistanceTypeCosine,
1 => FaceDistanceType::FaceDistanceNormL2,
_ => panic!("invalid enum discriminant"),
}
}
}
#[derive(Debug)]
#[repr(transparent)]
pub struct FaceRecognizerSf{
handle: _rt::Resource<FaceRecognizerSf>,
}
impl FaceRecognizerSf{
#[doc(hidden)]
pub unsafe fn from_handle(handle: u32) -> Self {
Self {
handle: _rt::Resource::from_handle(handle),
}
}
#[doc(hidden)]
pub fn take_handle(&self) -> u32 {
_rt::Resource::take_handle(&self.handle)
}
#[doc(hidden)]
pub fn handle(&self) -> u32 {
_rt::Resource::handle(&self.handle)
}
}
unsafe impl _rt::WasmResource for FaceRecognizerSf{
#[inline]
unsafe fn drop(_handle: u32) {
#[cfg(not(target_arch = "wasm32"))]
unreachable!();
#[cfg(target_arch = "wasm32")]
{
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[resource-drop]face-recognizer-SF"]
fn drop(_: u32);
}
drop(_handle);
}
}
}
impl CascadeClassifier {
#[allow(unused_unsafe, clippy::all)]
pub fn new() -> Self{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[constructor]cascade-classifier"]
fn wit_import() -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import() -> i32{ unreachable!() }
let ret = wit_import();
CascadeClassifier::from_handle(ret as u32)
}
}
}
impl CascadeClassifier {
#[allow(unused_unsafe, clippy::all)]
pub fn close(&self,){
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]cascade-classifier.close"]
fn wit_import(_: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, ){ unreachable!() }
wit_import((self).handle() as i32);
}
}
}
impl CascadeClassifier {
#[allow(unused_unsafe, clippy::all)]
pub fn load(&self,file: &str,) -> bool{
unsafe {
let vec0 = file;
let ptr0 = vec0.as_ptr().cast::<u8>();
let len0 = vec0.len();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]cascade-classifier.load"]
fn wit_import(_: i32, _: *mut u8, _: usize, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: *mut u8, _: usize, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32, ptr0.cast_mut(), len0);
_rt::bool_lift(ret as u8)
}
}
}
impl CascadeClassifier {
#[allow(unused_unsafe, clippy::all)]
pub fn detect_multi_scale(&self,image: Mat,) -> _rt::Vec::<Rect>{
unsafe {
#[repr(align(4))]
struct RetArea([::core::mem::MaybeUninit::<u8>; 8]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]);
let ptr0 = ret_area.0.as_mut_ptr().cast::<u8>();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]cascade-classifier.detect-multi-scale"]
fn wit_import(_: i32, _: i32, _: *mut u8, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: *mut u8, ){ unreachable!() }
wit_import((self).handle() as i32, (&image).take_handle() as i32, ptr0);
let l1 = *ptr0.add(0).cast::<*mut u8>();
let l2 = *ptr0.add(4).cast::<usize>();
let len3 = l2;
_rt::Vec::from_raw_parts(l1.cast(), len3, len3)
}
}
}
impl CascadeClassifier {
#[allow(unused_unsafe, clippy::all)]
pub fn detect_multi_scale_with_params(&self,image: Mat,scale: f64,min_neighbors: u32,flags: u32,min_size: Size,max_size: Size,) -> _rt::Vec::<Rect>{
unsafe {
#[repr(align(4))]
struct RetArea([::core::mem::MaybeUninit::<u8>; 8]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]);
let super::super::super::wasm::cv::types::Size{ x:x0, y:y0, } = min_size;
let super::super::super::wasm::cv::types::Size{ x:x1, y:y1, } = max_size;
let ptr2 = ret_area.0.as_mut_ptr().cast::<u8>();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]cascade-classifier.detect-multi-scale-with-params"]
fn wit_import(_: i32, _: i32, _: f64, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: *mut u8, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: f64, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: *mut u8, ){ unreachable!() }
wit_import((self).handle() as i32, (&image).take_handle() as i32, _rt::as_f64(&scale), _rt::as_i32(&min_neighbors), _rt::as_i32(&flags), _rt::as_i32(x0), _rt::as_i32(y0), _rt::as_i32(x1), _rt::as_i32(y1), ptr2);
let l3 = *ptr2.add(0).cast::<*mut u8>();
let l4 = *ptr2.add(4).cast::<usize>();
let len5 = l4;
_rt::Vec::from_raw_parts(l3.cast(), len5, len5)
}
}
}
impl HogDescriptor {
#[allow(unused_unsafe, clippy::all)]
pub fn new() -> Self{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[constructor]HOG-descriptor"]
fn wit_import() -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import() -> i32{ unreachable!() }
let ret = wit_import();
HogDescriptor::from_handle(ret as u32)
}
}
}
impl HogDescriptor {
#[allow(unused_unsafe, clippy::all)]
pub fn close(&self,){
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]HOG-descriptor.close"]
fn wit_import(_: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, ){ unreachable!() }
wit_import((self).handle() as i32);
}
}
}
impl HogDescriptor {
#[allow(unused_unsafe, clippy::all)]
pub fn detect_multi_scale(&self,image: Mat,) -> _rt::Vec::<Rect>{
unsafe {
#[repr(align(4))]
struct RetArea([::core::mem::MaybeUninit::<u8>; 8]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]);
let ptr0 = ret_area.0.as_mut_ptr().cast::<u8>();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]HOG-descriptor.detect-multi-scale"]
fn wit_import(_: i32, _: i32, _: *mut u8, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: *mut u8, ){ unreachable!() }
wit_import((self).handle() as i32, (&image).take_handle() as i32, ptr0);
let l1 = *ptr0.add(0).cast::<*mut u8>();
let l2 = *ptr0.add(4).cast::<usize>();
let len3 = l2;
_rt::Vec::from_raw_parts(l1.cast(), len3, len3)
}
}
}
impl HogDescriptor {
#[allow(unused_unsafe, clippy::all)]
pub fn detect_multi_scale_with_params(&self,image: Mat,hit_threshold: f64,win_stride: Size,padding: Size,scale: f64,final_threshold: f64,use_meanshift_grouping: bool,) -> _rt::Vec::<Rect>{
unsafe {
#[repr(align(4))]
struct RetArea([::core::mem::MaybeUninit::<u8>; 8]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]);
let super::super::super::wasm::cv::types::Size{ x:x0, y:y0, } = win_stride;
let super::super::super::wasm::cv::types::Size{ x:x1, y:y1, } = padding;
let ptr2 = ret_area.0.as_mut_ptr().cast::<u8>();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]HOG-descriptor.detect-multi-scale-with-params"]
fn wit_import(_: i32, _: i32, _: f64, _: i32, _: i32, _: i32, _: i32, _: f64, _: f64, _: i32, _: *mut u8, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: f64, _: i32, _: i32, _: i32, _: i32, _: f64, _: f64, _: i32, _: *mut u8, ){ unreachable!() }
wit_import((self).handle() as i32, (&image).take_handle() as i32, _rt::as_f64(&hit_threshold), _rt::as_i32(x0), _rt::as_i32(y0), _rt::as_i32(x1), _rt::as_i32(y1), _rt::as_f64(&scale), _rt::as_f64(&final_threshold), match &use_meanshift_grouping { true => 1, false => 0 }, ptr2);
let l3 = *ptr2.add(0).cast::<*mut u8>();
let l4 = *ptr2.add(4).cast::<usize>();
let len5 = l4;
_rt::Vec::from_raw_parts(l3.cast(), len5, len5)
}
}
}
impl FaceDetectorYn {
#[allow(unused_unsafe, clippy::all)]
pub fn new(model: &str,config: &str,input_size: Size,) -> Self{
unsafe {
let vec0 = model;
let ptr0 = vec0.as_ptr().cast::<u8>();
let len0 = vec0.len();
let vec1 = config;
let ptr1 = vec1.as_ptr().cast::<u8>();
let len1 = vec1.len();
let super::super::super::wasm::cv::types::Size{ x:x2, y:y2, } = input_size;
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[constructor]face-detector-YN"]
fn wit_import(_: *mut u8, _: usize, _: *mut u8, _: usize, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: *mut u8, _: usize, _: *mut u8, _: usize, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import(ptr0.cast_mut(), len0, ptr1.cast_mut(), len1, _rt::as_i32(x2), _rt::as_i32(y2));
FaceDetectorYn::from_handle(ret as u32)
}
}
}
impl FaceDetectorYn {
#[allow(unused_unsafe, clippy::all)]
pub fn new_with_params(model: &str,config: &str,input_size: Size,score_threshold: f32,nms_threshold: f32,top_k: u32,backend_id: u32,target_id: u32,) -> FaceDetectorYn{
unsafe {
let vec0 = model;
let ptr0 = vec0.as_ptr().cast::<u8>();
let len0 = vec0.len();
let vec1 = config;
let ptr1 = vec1.as_ptr().cast::<u8>();
let len1 = vec1.len();
let super::super::super::wasm::cv::types::Size{ x:x2, y:y2, } = input_size;
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[static]face-detector-YN.new-with-params"]
fn wit_import(_: *mut u8, _: usize, _: *mut u8, _: usize, _: i32, _: i32, _: f32, _: f32, _: i32, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: *mut u8, _: usize, _: *mut u8, _: usize, _: i32, _: i32, _: f32, _: f32, _: i32, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import(ptr0.cast_mut(), len0, ptr1.cast_mut(), len1, _rt::as_i32(x2), _rt::as_i32(y2), _rt::as_f32(&score_threshold), _rt::as_f32(&nms_threshold), _rt::as_i32(&top_k), _rt::as_i32(&backend_id), _rt::as_i32(&target_id));
FaceDetectorYn::from_handle(ret as u32)
}
}
}
impl FaceDetectorYn {
#[allow(unused_unsafe, clippy::all)]
pub fn close(&self,){
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]face-detector-YN.close"]
fn wit_import(_: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, ){ unreachable!() }
wit_import((self).handle() as i32);
}
}
}
impl FaceDetectorYn {
#[allow(unused_unsafe, clippy::all)]
pub fn detect(&self,input: &str,) -> Mat{
unsafe {
let vec0 = input;
let ptr0 = vec0.as_ptr().cast::<u8>();
let len0 = vec0.len();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]face-detector-YN.detect"]
fn wit_import(_: i32, _: *mut u8, _: usize, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: *mut u8, _: usize, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32, ptr0.cast_mut(), len0);
super::super::super::wasm::cv::mat::Mat::from_handle(ret as u32)
}
}
}
impl FaceDetectorYn {
#[allow(unused_unsafe, clippy::all)]
pub fn get_input_size(&self,) -> Size{
unsafe {
#[repr(align(4))]
struct RetArea([::core::mem::MaybeUninit::<u8>; 8]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]);
let ptr0 = ret_area.0.as_mut_ptr().cast::<u8>();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]face-detector-YN.get-input-size"]
fn wit_import(_: i32, _: *mut u8, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: *mut u8, ){ unreachable!() }
wit_import((self).handle() as i32, ptr0);
let l1 = *ptr0.add(0).cast::<i32>();
let l2 = *ptr0.add(4).cast::<i32>();
super::super::super::wasm::cv::types::Size{
x: l1,
y: l2,
}
}
}
}
impl FaceDetectorYn {
#[allow(unused_unsafe, clippy::all)]
pub fn get_nms_threshold(&self,) -> f32{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]face-detector-YN.get-nms-threshold"]
fn wit_import(_: i32, ) -> f32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, ) -> f32{ unreachable!() }
let ret = wit_import((self).handle() as i32);
ret
}
}
}
impl FaceDetectorYn {
#[allow(unused_unsafe, clippy::all)]
pub fn get_score_threshold(&self,) -> f32{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]face-detector-YN.get-score-threshold"]
fn wit_import(_: i32, ) -> f32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, ) -> f32{ unreachable!() }
let ret = wit_import((self).handle() as i32);
ret
}
}
}
impl FaceDetectorYn {
#[allow(unused_unsafe, clippy::all)]
pub fn get_topk(&self,) -> u32{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]face-detector-YN.get-topk"]
fn wit_import(_: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32);
ret as u32
}
}
}
impl FaceDetectorYn {
#[allow(unused_unsafe, clippy::all)]
pub fn set_input_size(&self,size: Size,){
unsafe {
let super::super::super::wasm::cv::types::Size{ x:x0, y:y0, } = size;
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]face-detector-YN.set-input-size"]
fn wit_import(_: i32, _: i32, _: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, ){ unreachable!() }
wit_import((self).handle() as i32, _rt::as_i32(x0), _rt::as_i32(y0));
}
}
}
impl FaceDetectorYn {
#[allow(unused_unsafe, clippy::all)]
pub fn set_nms_threshold(&self,threshold: f32,){
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]face-detector-YN.set-nms-threshold"]
fn wit_import(_: i32, _: f32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: f32, ){ unreachable!() }
wit_import((self).handle() as i32, _rt::as_f32(&threshold));
}
}
}
impl FaceDetectorYn {
#[allow(unused_unsafe, clippy::all)]
pub fn set_score_threshold(&self,threshold: f32,){
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]face-detector-YN.set-score-threshold"]
fn wit_import(_: i32, _: f32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: f32, ){ unreachable!() }
wit_import((self).handle() as i32, _rt::as_f32(&threshold));
}
}
}
impl FaceDetectorYn {
#[allow(unused_unsafe, clippy::all)]
pub fn set_topk(&self,topk: u32,){
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]face-detector-YN.set-topk"]
fn wit_import(_: i32, _: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, ){ unreachable!() }
wit_import((self).handle() as i32, _rt::as_i32(&topk));
}
}
}
impl FaceRecognizerSf {
#[allow(unused_unsafe, clippy::all)]
pub fn new(model: &str,config: &str,) -> Self{
unsafe {
let vec0 = model;
let ptr0 = vec0.as_ptr().cast::<u8>();
let len0 = vec0.len();
let vec1 = config;
let ptr1 = vec1.as_ptr().cast::<u8>();
let len1 = vec1.len();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[constructor]face-recognizer-SF"]
fn wit_import(_: *mut u8, _: usize, _: *mut u8, _: usize, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: *mut u8, _: usize, _: *mut u8, _: usize, ) -> i32{ unreachable!() }
let ret = wit_import(ptr0.cast_mut(), len0, ptr1.cast_mut(), len1);
FaceRecognizerSf::from_handle(ret as u32)
}
}
}
impl FaceRecognizerSf {
#[allow(unused_unsafe, clippy::all)]
pub fn new_with_params(model: &str,config: &str,backend_id: u32,target_id: u32,) -> FaceRecognizerSf{
unsafe {
let vec0 = model;
let ptr0 = vec0.as_ptr().cast::<u8>();
let len0 = vec0.len();
let vec1 = config;
let ptr1 = vec1.as_ptr().cast::<u8>();
let len1 = vec1.len();
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[static]face-recognizer-SF.new-with-params"]
fn wit_import(_: *mut u8, _: usize, _: *mut u8, _: usize, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: *mut u8, _: usize, _: *mut u8, _: usize, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import(ptr0.cast_mut(), len0, ptr1.cast_mut(), len1, _rt::as_i32(&backend_id), _rt::as_i32(&target_id));
FaceRecognizerSf::from_handle(ret as u32)
}
}
}
impl FaceRecognizerSf {
#[allow(unused_unsafe, clippy::all)]
pub fn close(&self,){
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]face-recognizer-SF.close"]
fn wit_import(_: i32, );
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, ){ unreachable!() }
wit_import((self).handle() as i32);
}
}
}
impl FaceRecognizerSf {
#[allow(unused_unsafe, clippy::all)]
pub fn align_crop(&self,src: Mat,face_box: Mat,) -> Mat{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]face-recognizer-SF.align-crop"]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32, (&src).take_handle() as i32, (&face_box).take_handle() as i32);
super::super::super::wasm::cv::mat::Mat::from_handle(ret as u32)
}
}
}
impl FaceRecognizerSf {
#[allow(unused_unsafe, clippy::all)]
pub fn feature(&self,aligned: Mat,) -> Mat{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]face-recognizer-SF.feature"]
fn wit_import(_: i32, _: i32, ) -> i32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, ) -> i32{ unreachable!() }
let ret = wit_import((self).handle() as i32, (&aligned).take_handle() as i32);
super::super::super::wasm::cv::mat::Mat::from_handle(ret as u32)
}
}
}
impl FaceRecognizerSf {
#[allow(unused_unsafe, clippy::all)]
pub fn match_(&self,face1: Mat,face2: Mat,) -> f32{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]face-recognizer-SF.match"]
fn wit_import(_: i32, _: i32, _: i32, ) -> f32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, ) -> f32{ unreachable!() }
let ret = wit_import((self).handle() as i32, (&face1).take_handle() as i32, (&face2).take_handle() as i32);
ret
}
}
}
impl FaceRecognizerSf {
#[allow(unused_unsafe, clippy::all)]
pub fn match_with_params(&self,face1: Mat,face2: Mat,distance: FaceDistanceType,) -> f32{
unsafe {
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "wasm:cv/objdetect")]
extern "C" {
#[link_name = "[method]face-recognizer-SF.match-with-params"]
fn wit_import(_: i32, _: i32, _: i32, _: i32, ) -> f32;
}
#[cfg(not(target_arch = "wasm32"))]
fn wit_import(_: i32, _: i32, _: i32, _: i32, ) -> f32{ unreachable!() }
let ret = wit_import((self).handle() as i32, (&face1).take_handle() as i32, (&face2).take_handle() as i32, distance.clone() as i32);
ret
}
}
}
}
}
}
#[allow(dead_code)]
pub mod exports {
#[allow(dead_code)]
pub mod wasm {
#[allow(dead_code)]
pub mod cv {
#[allow(dead_code, clippy::all)]
pub mod request {
#[used]
#[doc(hidden)]
static __FORCE_SECTION_REF: fn() =
super::super::super::super::__link_custom_section_describing_imports;
use super::super::super::super::_rt;
pub type Mat = super::super::super::super::wasm::cv::mat::Mat;
#[doc(hidden)]
#[allow(non_snake_case)]
pub unsafe fn _export_process_cabi<T: Guest>(arg0: i32,) -> i32 {#[cfg(target_arch="wasm32")]
_rt::run_ctors_once();let result0 = T::process(super::super::super::super::wasm::cv::mat::Mat::from_handle(arg0 as u32));
(result0).take_handle() as i32
}
pub trait Guest {
fn process(image: Mat,) -> Mat;
}
#[doc(hidden)]
macro_rules! __export_wasm_cv_request_cabi{
($ty:ident with_types_in $($path_to_types:tt)*) => (const _: () = {
#[export_name = "wasm:cv/request#process"]
unsafe extern "C" fn export_process(arg0: i32,) -> i32 {
$($path_to_types)*::_export_process_cabi::<$ty>(arg0)
}
};);
}
#[doc(hidden)]
pub(crate) use __export_wasm_cv_request_cabi;
}
}
}
}
mod _rt {
use core::fmt;
use core::marker;
use core::sync::atomic::{AtomicU32, Ordering::Relaxed};
#[repr(transparent)]
pub struct Resource<T: WasmResource> {
handle: AtomicU32,
_marker: marker::PhantomData<T>,
}
#[allow(clippy::missing_safety_doc)]
pub unsafe trait WasmResource {
unsafe fn drop(handle: u32);
}
impl<T: WasmResource> Resource<T> {
#[doc(hidden)]
pub unsafe fn from_handle(handle: u32) -> Self {
debug_assert!(handle != u32::MAX);
Self {
handle: AtomicU32::new(handle),
_marker: marker::PhantomData,
}
}
#[doc(hidden)]
pub fn take_handle(resource: &Resource<T>) -> u32 {
resource.handle.swap(u32::MAX, Relaxed)
}
#[doc(hidden)]
pub fn handle(resource: &Resource<T>) -> u32 {
resource.handle.load(Relaxed)
}
}
impl<T: WasmResource> fmt::Debug for Resource<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Resource")
.field("handle", &self.handle)
.finish()
}
}
impl<T: WasmResource> Drop for Resource<T> {
fn drop(&mut self) {
unsafe {
match self.handle.load(Relaxed) {
u32::MAX => {}
other => T::drop(other),
}
}
}
}
pub fn as_i32<T: AsI32>(t: T) -> i32 {
t.as_i32()
}
pub trait AsI32 {
fn as_i32(self) -> i32;
}
impl<'a, T: Copy + AsI32> AsI32 for &'a T {
fn as_i32(self) -> i32 {
(*self).as_i32()
}
}
impl AsI32 for i32 {
#[inline]
fn as_i32(self) -> i32 {
self as i32
}
}
impl AsI32 for u32 {
#[inline]
fn as_i32(self) -> i32 {
self as i32
}
}
impl AsI32 for i16 {
#[inline]
fn as_i32(self) -> i32 {
self as i32
}
}
impl AsI32 for u16 {
#[inline]
fn as_i32(self) -> i32 {
self as i32
}
}
impl AsI32 for i8 {
#[inline]
fn as_i32(self) -> i32 {
self as i32
}
}
impl AsI32 for u8 {
#[inline]
fn as_i32(self) -> i32 {
self as i32
}
}
impl AsI32 for char {
#[inline]
fn as_i32(self) -> i32 {
self as i32
}
}
impl AsI32 for usize {
#[inline]
fn as_i32(self) -> i32 {
self as i32
}
}
pub use alloc_crate::vec::Vec;
pub unsafe fn bool_lift(val: u8) -> bool {
if cfg!(debug_assertions) {
match val {
0 => false,
1 => true,
_ => panic!("invalid bool discriminant"),
}
} else {
val != 0
}
}
pub fn as_f32<T: AsF32>(t: T) -> f32 {
t.as_f32()
}
pub trait AsF32 {
fn as_f32(self) -> f32;
}
impl<'a, T: Copy + AsF32> AsF32 for &'a T {
fn as_f32(self) -> f32 {
(*self).as_f32()
}
}
impl AsF32 for f32 {
#[inline]
fn as_f32(self) -> f32 {
self as f32
}
}
pub fn as_f64<T: AsF64>(t: T) -> f64 {
t.as_f64()
}
pub trait AsF64 {
fn as_f64(self) -> f64;
}
impl<'a, T: Copy + AsF64> AsF64 for &'a T {
fn as_f64(self) -> f64 {
(*self).as_f64()
}
}
impl AsF64 for f64 {
#[inline]
fn as_f64(self) -> f64 {
self as f64
}
}
pub use alloc_crate::string::String;
pub unsafe fn string_lift(bytes: Vec<u8>) -> String {
if cfg!(debug_assertions) {
String::from_utf8(bytes).unwrap()
} else {
String::from_utf8_unchecked(bytes)
}
}
pub use alloc_crate::alloc;
pub unsafe fn cabi_dealloc(ptr: *mut u8, size: usize, align: usize) {
if size == 0 {
return;
}
let layout = alloc::Layout::from_size_align_unchecked(size, align);
alloc::dealloc(ptr, layout);
}
#[cfg(target_arch = "wasm32")]
pub fn run_ctors_once() {
wit_bindgen::rt::run_ctors_once();
}
extern crate alloc as alloc_crate;
}
#[allow(unused_macros)]
#[doc(hidden)]
macro_rules! __export_imports_impl {
($ty:ident) => (self::export!($ty with_types_in self););
($ty:ident with_types_in $($path_to_types_root:tt)*) => (
$($path_to_types_root)*::exports::wasm::cv::request::__export_wasm_cv_request_cabi!($ty with_types_in $($path_to_types_root)*::exports::wasm::cv::request);
)
}
#[doc(inline)]
pub(crate) use __export_imports_impl as export;
#[cfg(target_arch = "wasm32")]
#[link_section = "component-type:wit-bindgen:0.32.0:wasm:cv:imports:encoded world"]
#[doc(hidden)]
pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 8065] = *b"\
\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\x83>\x01A\x02\x01A\x1a\
\x01B\x1c\x01r\x02\x01xz\x01yz\x04\0\x04size\x03\0\0\x01r\x04\x04val1v\x04val2v\x04\
val3v\x04val4v\x04\0\x06scalar\x03\0\x02\x01r\x02\x03min\x01\x03max\x01\x04\0\x04\
rect\x03\0\x04\x01r\x04\x01r}\x01g}\x01b}\x01a}\x04\0\x04RGBA\x03\0\x06\x01m\x08\
\x0fborder-constant\x10border-replicate\x0eborder-reflect\x0bborder-wrap\x11bord\
er-reflect101\x12border-transparent\x0eborder-default\x0fborder-isolated\x04\0\x0b\
border-type\x03\0\x08\x01m\x02\x17adaptive-threshold-mean\x1badaptive-threshold-\
gaussian\x04\0\x17adaptive-threshold-type\x03\0\x0a\x01m\x08\x10threshold-binary\
\x14threshold-binary-inv\x0fthreshold-trunc\x11threshold-to-zero\x15threshold-to\
-zero-inv\x0ethreshold-mask\x0ethreshold-otsu\x13tthreshold-triangle\x04\0\x0eth\
reshold-type\x03\0\x0c\x01m\x07\x13data-layout-unknown\x0edata-layout-nd\x10data\
-layout-nchw\x11data-layout-ncdhw\x10data-layout-nhwc\x11data-layout-ndhwc\x12da\
ta-layout-planar\x04\0\x10data-layout-type\x03\0\x0e\x01m\x03\x11padding-mode-nu\
ll\x18padding-mode-crop-center\x16padding-mode-letterbox\x04\0\x11padding-mode-t\
ype\x03\0\x10\x01r\x08\x0cscale-factorv\x04size\x01\x04mean\x03\x07swap-RB\x7f\x06\
ddepth}\x0bdata-layout\x0f\x0cpadding-mode\x11\x06border\x03\x04\0\x0bblob-param\
s\x03\0\x12\x01r\x04\x07min-valv\x07max-valv\x07min-loc\x01\x07max-loc\x01\x04\0\
\x12mix-max-loc-result\x03\0\x14\x01m\x09\x14hershey-font-simplex\x12hershey-fon\
t-plain\x13hershey-font-duplex\x14hershey-font-complex\x14hershey-font-triplex\x1a\
hershey-font-complex-small\x1bhershey-font-script-simplex\x1bhershey-font-script\
-complex\x13hershey-font-italic\x04\0\x11hershey-font-type\x03\0\x16\x01m\x05\x15\
interpolation-nearest\x14interpolation-linear\x13interpolation-cubic\x12interpol\
ation-area\x16interpolation-lanczos4\x04\0\x12interpolation-type\x03\0\x18\x01m\x14\
\x11color-BGR-to-BGRA\x11color-RGB-to-RGBA\x11color-BGRA-to-BGR\x11color-RGBA-to\
-RGB\x11color-BGR-to-RGBA\x11color-RGB-to-BGRA\x11color-RGBA-to-BGR\x11color-BGR\
A-to-RGB\x10color-BGR-to-RGB\x10color-RGB-to-BGR\x12color-BGRA-to-RGBA\x12color-\
RGBA-to-BGRA\x11color-BGR-to-gray\x11color-RGB-to-gray\x11color-gray-to-BGR\x11c\
olor-gray-to-RGB\x12color-gray-to-BGRA\x12color-gray-to-RGBA\x12color-BGRA-to-gr\
ay\x12color-RGBA-to-gray\x04\0\x14color-coversion-type\x03\0\x1a\x03\0\x0dwasm:c\
v/types\x05\0\x02\x03\0\0\x12mix-max-loc-result\x02\x03\0\0\x04rect\x01BG\x02\x03\
\x02\x01\x01\x04\0\x12mix-max-loc-result\x03\0\0\x02\x03\x02\x01\x02\x04\0\x04re\
ct\x03\0\x02\x01m\x07\x04cv8u\x04cv8s\x05cv16u\x05cv16s\x05cv32s\x05cv32f\x05cv6\
4f\x04\0\x07mattype\x03\0\x04\x04\0\x03mat\x03\x01\x01i\x06\x01@\0\0\x07\x04\0\x10\
[constructor]mat\x01\x08\x01@\x03\x04colsy\x04rowsy\x07mattype\x05\0\x07\x04\0\x19\
[static]mat.new-with-size\x01\x09\x01h\x06\x01@\x01\x04self\x0a\0\x07\x04\0\x11[\
method]mat.clone\x01\x0b\x01@\x01\x04self\x0a\x01\0\x04\0\x11[method]mat.close\x01\
\x0c\x01@\x01\x04self\x0a\0y\x04\0\x10[method]mat.cols\x01\x0d\x04\0\x10[method]\
mat.rows\x01\x0d\x01@\x02\x04self\x0a\x04rect\x03\0\x07\x04\0\x12[method]mat.reg\
ion\x01\x0e\x01@\x02\x04self\x0a\x03dst\x07\x01\0\x04\0\x13[method]mat.copy-to\x01\
\x0f\x01@\x01\x04self\x0a\0\x05\x04\0\x13[method]mat.mattype\x01\x10\x01py\x01@\x01\
\x04self\x0a\0\x11\x04\0\x10[method]mat.size\x01\x12\x01@\x01\x04self\x0a\0\x7f\x04\
\0\x11[method]mat.empty\x01\x13\x01@\x03\x04self\x0a\x03rowy\x03coly\0v\x04\0\x18\
[method]mat.get-float-at\x01\x14\x01@\x04\x04self\x0a\x03rowy\x03coly\x03valv\x01\
\0\x04\0\x18[method]mat.set-float-at\x01\x15\x01@\x03\x04self\x0a\x03rowy\x03col\
y\0}\x04\0\x18[method]mat.get-uchar-at\x01\x16\x01@\x04\x04self\x0a\x03rowy\x03c\
oly\x03val}\x01\0\x04\0\x18[method]mat.set-uchar-at\x01\x17\x01@\x03\x04self\x0a\
\x03rowy\x03coly\0z\x04\0\x16[method]mat.get-int-at\x01\x18\x01@\x04\x04self\x0a\
\x03rowy\x03coly\x03valz\x01\0\x04\0\x16[method]mat.set-int-at\x01\x19\x01@\x04\x04\
self\x0a\x01xy\x01yy\x01zy\0v\x04\0\x19[method]mat.get-float-at3\x01\x1a\x01@\x05\
\x04self\x0a\x01xy\x01yy\x01zy\x03valv\x01\0\x04\0\x19[method]mat.set-float-at3\x01\
\x1b\x01@\x04\x04self\x0a\x01xy\x01yy\x01zy\0}\x04\0\x19[method]mat.get-uchar-at\
3\x01\x1c\x01@\x05\x04self\x0a\x01xy\x01yy\x01zy\x03val}\x01\0\x04\0\x19[method]\
mat.set-uchar-at3\x01\x1d\x01@\x04\x04self\x0a\x01xy\x01yy\x01zy\0z\x04\0\x17[me\
thod]mat.get-int-at3\x01\x1e\x01@\x05\x04self\x0a\x01xy\x01yy\x01zy\x03valz\x01\0\
\x04\0\x17[method]mat.set-int-at3\x01\x1f\x01p}\x01@\x03\x04self\x0a\x03rowy\x03\
coly\0\x20\x04\0\x17[method]mat.get-vecb-at\x01!\x01pv\x01@\x03\x04self\x0a\x03r\
owy\x03coly\0\"\x04\0\x17[method]mat.get-vecf-at\x01#\x01pz\x01@\x03\x04self\x0a\
\x03rowy\x03coly\0$\x04\0\x17[method]mat.get-veci-at\x01%\x01@\x03\x04self\x0a\x08\
channelsy\x04rowsy\0\x07\x04\0\x13[method]mat.reshape\x01&\x01@\x03\x04self\x0a\x05\
starty\x03endy\0\x07\x04\0\x15[method]mat.row-range\x01'\x04\0\x15[method]mat.co\
l-range\x01'\x01@\x01\x04self\x0a\0\x01\x04\0\x17[method]mat.min-max-loc\x01(\x03\
\0\x0bwasm:cv/mat\x05\x03\x02\x03\0\0\x0bborder-type\x02\x03\0\0\x04size\x02\x03\
\0\0\x17adaptive-threshold-type\x02\x03\0\0\x0ethreshold-type\x02\x03\0\0\x06sca\
lar\x02\x03\0\0\x04RGBA\x02\x03\0\0\x11hershey-font-type\x02\x03\0\0\x12interpol\
ation-type\x02\x03\0\0\x14color-coversion-type\x02\x03\0\x01\x03mat\x02\x03\0\x01\
\x07mattype\x01B4\x02\x03\x02\x01\x04\x04\0\x0bborder-type\x03\0\0\x02\x03\x02\x01\
\x05\x04\0\x04size\x03\0\x02\x02\x03\x02\x01\x06\x04\0\x17adaptive-threshold-typ\
e\x03\0\x04\x02\x03\x02\x01\x07\x04\0\x0ethreshold-type\x03\0\x06\x02\x03\x02\x01\
\x08\x04\0\x06scalar\x03\0\x08\x02\x03\x02\x01\x02\x04\0\x04rect\x03\0\x0a\x02\x03\
\x02\x01\x09\x04\0\x04RGBA\x03\0\x0c\x02\x03\x02\x01\x0a\x04\0\x11hershey-font-t\
ype\x03\0\x0e\x02\x03\x02\x01\x0b\x04\0\x12interpolation-type\x03\0\x10\x02\x03\x02\
\x01\x0c\x04\0\x14color-coversion-type\x03\0\x12\x02\x03\x02\x01\x0d\x04\0\x03ma\
t\x03\0\x14\x02\x03\x02\x01\x0e\x04\0\x07mattype\x03\0\x16\x01i\x15\x01@\x05\x03\
img\x18\x06point1\x03\x06point2\x03\x01c\x0d\x09thickness}\x01\0\x04\0\x0carrowe\
d-line\x01\x19\x01@\x04\x03img\x18\x01r\x0b\x01c\x0d\x09thickness}\x01\0\x04\0\x09\
rectangle\x01\x1a\x01@\x05\x03img\x18\x06center\x03\x06radiusy\x01c\x0d\x09thick\
ness}\x01\0\x04\0\x06circle\x01\x1b\x04\0\x04line\x01\x19\x01@\x07\x03img\x18\x04\
texts\x03org\x03\x09font-face\x0f\x0afont-scaleu\x01c\x0d\x09thicknessz\x01\0\x04\
\0\x08put-text\x01\x1c\x01@\x06\x03src\x18\x09max-valuev\x0dadaptive-type\x05\x0e\
threshold-type\x07\x0ablock-sizey\x01cv\0\x18\x04\0\x12adaptive-threshold\x01\x1d\
\x01@\x02\x03src\x18\x06k-size\x03\0\x18\x04\0\x04blur\x01\x1e\x01@\x03\x03src\x18\
\x05depthy\x06k-size\x03\0\x18\x04\0\x0abox-filter\x01\x1f\x01@\x05\x03src\x18\x04\
size\x03\x07sigma-xv\x07sigma-yv\x06border\x01\0\x18\x04\0\x0dgaussian-blur\x01\x20\
\x04\0\x0bmedian-blur\x01\x1e\x01@\x04\x03src\x18\x06threshv\x09max-valuev\x0eth\
reshold-type\x07\0\x18\x04\0\x09threshold\x01!\x01@\x02\x03src\x18\x04code\x13\0\
\x18\x04\0\x09cvt-color\x01\"\x01pz\x01@\x02\x03src\x18\x05order#\0\x18\x04\0\x0c\
transpose-ND\x01$\x01@\x05\x03src\x18\x04size\x03\x02fxv\x02fyv\x06interp\x11\0\x18\
\x04\0\x06resize\x01%\x03\0\x0awasm:cv/cv\x05\x0f\x02\x03\0\0\x0bblob-params\x01\
B?\x02\x03\x02\x01\x0d\x04\0\x03mat\x03\0\0\x02\x03\x02\x01\x05\x04\0\x04size\x03\
\0\x02\x02\x03\x02\x01\x08\x04\0\x06scalar\x03\0\x04\x02\x03\x02\x01\x02\x04\0\x04\
rect\x03\0\x06\x02\x03\x02\x01\x10\x04\0\x0bblob-params\x03\0\x08\x01m\x06\x13ne\
t-backend-default\x12net-backend-halide\x14net-backend-openvino\x12net-backend-o\
pencv\x11net-backend-vkcom\x10net-backend-cuda\x04\0\x10net-backend-type\x03\0\x0a\
\x01m\x08\x0enet-target-cpu\x0fnet-target-fp32\x0fnet-target-fp16\x0enet-target-\
vpu\x11net-target-vulkan\x0fnet-target-fpga\x0fnet-target-cuda\x14net-target-cud\
a-fp16\x04\0\x0fnet-target-type\x03\0\x0c\x01m\x06\x13data-layout-unknown\x0edat\
a-layout-nd\x10data-layout-nchw\x10data-layout-nhwc\x11data-layout-ndhwc\x12data\
-layout-planar\x04\0\x10data-layout-type\x03\0\x0e\x01m\x03\x11padding-mode-null\
\x18padding-mode-crop-center\x16padding-mode-letterbox\x04\0\x11padding-mode-typ\
e\x03\0\x10\x04\0\x05layer\x03\x01\x04\0\x03net\x03\x01\x01i\x12\x01@\0\0\x14\x04\
\0\x12[constructor]layer\x01\x15\x01h\x12\x01@\x01\x04self\x16\0s\x04\0\x16[meth\
od]layer.get-name\x01\x17\x01i\x13\x01@\x02\x05models\x06configs\0\x18\x04\0\x10\
[static]net.read\x01\x19\x01@\x01\x05models\0\x18\x04\0\x1a[static]net.read-from\
-ONNX\x01\x1a\x01h\x13\x01@\x01\x04self\x1b\x01\0\x04\0\x11[method]net.close\x01\
\x1c\x01@\x01\x04self\x1b\0\x7f\x04\0\x11[method]net.empty\x01\x1d\x01i\x01\x01@\
\x03\x04self\x1b\x05input\x1e\x04names\x01\0\x04\0\x15[method]net.set-input\x01\x1f\
\x01@\x02\x04self\x1b\x0boutput-names\0\x1e\x04\0\x13[method]net.forward\x01\x20\
\x01ps\x01p\x1e\x01@\x02\x04self\x1b\x0coutput-names!\0\"\x04\0\x1a[method]net.f\
orward-layers\x01#\x01py\x01@\x01\x04self\x1b\0$\x04\0&[method]net.get-unconnect\
ed-out-layers\x01%\x01@\x01\x04self\x1b\0!\x04\0\x1b[method]net.get-layer-names\x01\
&\x01@\x02\x04self\x1b\x02idy\0\x14\x04\0\x15[method]net.get-layer\x01'\x01@\x06\
\x05image\x1e\x0cscale-factorv\x04size\x03\x04mean\x05\x07swap-rb\x7f\x04crop\x7f\
\0\x1e\x04\0\x0fblob-from-image\x01(\x01@\x02\x05image\x1e\x06params\x09\0\x1e\x04\
\0\x1bblob-from-image-with-params\x01)\x01p\x07\x01@\x03\x06params\x09\x0ablob-r\
ects*\x0aimage-size\x03\0*\x04\0\x19blob-rects-to-image-rects\x01+\x01pv\x01pz\x01\
@\x04\x06bboxes*\x06scores,\x0fscore-thresholdv\x0dnms-thresholdv\0-\x04\0\x09NM\
S-boxes\x01.\x03\0\x0bwasm:cv/dnn\x05\x11\x01BL\x02\x03\x02\x01\x0d\x04\0\x03mat\
\x03\0\0\x02\x03\x02\x01\x05\x04\0\x04size\x03\0\x02\x02\x03\x02\x01\x02\x04\0\x04\
rect\x03\0\x04\x04\0\x12cascade-classifier\x03\x01\x04\0\x0eHOG-descriptor\x03\x01\
\x04\0\x10face-detector-YN\x03\x01\x01m\x02\x19face-distance-type-cosine\x15face\
-distance-norm-l2\x04\0\x12face-distance-type\x03\0\x09\x04\0\x12face-recognizer\
-SF\x03\x01\x01i\x06\x01@\0\0\x0c\x04\0\x1f[constructor]cascade-classifier\x01\x0d\
\x01h\x06\x01@\x01\x04self\x0e\x01\0\x04\0\x20[method]cascade-classifier.close\x01\
\x0f\x01@\x02\x04self\x0e\x04files\0\x7f\x04\0\x1f[method]cascade-classifier.loa\
d\x01\x10\x01i\x01\x01p\x05\x01@\x02\x04self\x0e\x05image\x11\0\x12\x04\0-[metho\
d]cascade-classifier.detect-multi-scale\x01\x13\x01@\x07\x04self\x0e\x05image\x11\
\x05scaleu\x0dmin-neighborsy\x05flagsy\x08min-size\x03\x08max-size\x03\0\x12\x04\
\09[method]cascade-classifier.detect-multi-scale-with-params\x01\x14\x01i\x07\x01\
@\0\0\x15\x04\0\x1b[constructor]HOG-descriptor\x01\x16\x01h\x07\x01@\x01\x04self\
\x17\x01\0\x04\0\x1c[method]HOG-descriptor.close\x01\x18\x01@\x02\x04self\x17\x05\
image\x11\0\x12\x04\0)[method]HOG-descriptor.detect-multi-scale\x01\x19\x01@\x08\
\x04self\x17\x05image\x11\x0dhit-thresholdu\x0awin-stride\x03\x07padding\x03\x05\
scaleu\x0ffinal-thresholdu\x16use-meanshift-grouping\x7f\0\x12\x04\05[method]HOG\
-descriptor.detect-multi-scale-with-params\x01\x1a\x01i\x08\x01@\x03\x05models\x06\
configs\x0ainput-size\x03\0\x1b\x04\0\x1d[constructor]face-detector-YN\x01\x1c\x01\
@\x08\x05models\x06configs\x0ainput-size\x03\x0fscore-thresholdv\x0dnms-threshol\
dv\x05top-ky\x0abackend-idy\x09target-idy\0\x1b\x04\0([static]face-detector-YN.n\
ew-with-params\x01\x1d\x01h\x08\x01@\x01\x04self\x1e\x01\0\x04\0\x1e[method]face\
-detector-YN.close\x01\x1f\x01@\x02\x04self\x1e\x05inputs\0\x11\x04\0\x1f[method\
]face-detector-YN.detect\x01\x20\x01@\x01\x04self\x1e\0\x03\x04\0'[method]face-d\
etector-YN.get-input-size\x01!\x01@\x01\x04self\x1e\0v\x04\0*[method]face-detect\
or-YN.get-nms-threshold\x01\"\x04\0,[method]face-detector-YN.get-score-threshold\
\x01\"\x01@\x01\x04self\x1e\0y\x04\0![method]face-detector-YN.get-topk\x01#\x01@\
\x02\x04self\x1e\x04size\x03\x01\0\x04\0'[method]face-detector-YN.set-input-size\
\x01$\x01@\x02\x04self\x1e\x09thresholdv\x01\0\x04\0*[method]face-detector-YN.se\
t-nms-threshold\x01%\x04\0,[method]face-detector-YN.set-score-threshold\x01%\x01\
@\x02\x04self\x1e\x04topky\x01\0\x04\0![method]face-detector-YN.set-topk\x01&\x01\
i\x0b\x01@\x02\x05models\x06configs\0'\x04\0\x1f[constructor]face-recognizer-SF\x01\
(\x01@\x04\x05models\x06configs\x0abackend-idy\x09target-idy\0'\x04\0*[static]fa\
ce-recognizer-SF.new-with-params\x01)\x01h\x0b\x01@\x01\x04self*\x01\0\x04\0\x20\
[method]face-recognizer-SF.close\x01+\x01@\x03\x04self*\x03src\x11\x08face-box\x11\
\0\x11\x04\0%[method]face-recognizer-SF.align-crop\x01,\x01@\x02\x04self*\x07ali\
gned\x11\0\x11\x04\0\"[method]face-recognizer-SF.feature\x01-\x01@\x03\x04self*\x05\
face1\x11\x05face2\x11\0v\x04\0\x20[method]face-recognizer-SF.match\x01.\x01@\x04\
\x04self*\x05face1\x11\x05face2\x11\x08distance\x0a\0v\x04\0,[method]face-recogn\
izer-SF.match-with-params\x01/\x03\0\x11wasm:cv/objdetect\x05\x12\x01B\x05\x02\x03\
\x02\x01\x0d\x04\0\x03mat\x03\0\0\x01i\x01\x01@\x01\x05image\x02\0\x02\x04\0\x07\
process\x01\x03\x04\0\x0fwasm:cv/request\x05\x13\x04\0\x0fwasm:cv/imports\x04\0\x0b\
\x0d\x01\0\x07imports\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-com\
ponent\x070.217.0\x10wit-bindgen-rust\x060.32.0";
#[inline(never)]
#[doc(hidden)]
pub fn __link_custom_section_describing_imports() {
wit_bindgen::rt::maybe_link_cabi_realloc();
}