yanjinhui
2025-06-12 95ac5296182b763d12125c1d47f53c00632ffc41
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.IO;
using System.Collections;
using System.Runtime.InteropServices;
using System.Collections.Generic;
 
namespace FaceAI
{
    class HjimiCamera
    {
        // 华杰艾米 获取摄像头设备对象
        [DllImport("AimiCamera.dll", EntryPoint = "new_hjimi", CharSet = CharSet.Ansi
           , CallingConvention = CallingConvention.Cdecl)]
        public static extern IntPtr new_hjimi();
        // 华杰艾米 释放摄像头设备对象
        [DllImport("AimiCamera.dll", EntryPoint = "hjimi_release", CharSet = CharSet.Ansi
           , CallingConvention = CallingConvention.Cdecl)]
        public static extern void hjimi_release(IntPtr hjimi);       
        // 华杰艾米 打开摄像头设备对象  传入opencv视频帧rgb和depth的mat
        [DllImport("AimiCamera.dll", EntryPoint = "open_hjimimat", CharSet = CharSet.Ansi
           , CallingConvention = CallingConvention.Cdecl)]
        public static extern bool open_hjimimat(IntPtr hjimi, IntPtr rgb_mat, IntPtr depth_mat);
    }
}