Coder Social home page Coder Social logo

tingzhushaohua / sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from smarttofsdk/sdk

0.0 1.0 0.0 380.81 MB

SmartTof module software develop kit

Makefile 0.25% Batchfile 0.08% Java 5.15% Shell 0.30% CMake 6.81% C++ 21.35% C 60.54% C# 1.94% Python 3.59%

sdk's Introduction

SmartToF SDK使用说明


SmartToF SDK用户手册参考以下(网址链接)

1、SmartToF SDK简介

SmartToF TC系列模组是数迹公司采用TOF技术开发的3D视觉模组,采用业界领先的传感器芯片,具有测量精度高、抗干扰能力强、外观小巧等优点。模组可用于精确的人流统计、物流仓储、手势识别、机器人避障和车载控制等新兴技术领域。SmartToF SDK是配套SmartToF系列模组进行开发的软件工具包,支持windows、linux、Android等主流平台,SDK的总体架构图如下:

框图

SDK中架构中的主要部分说明和特点如下图所示:

架构图


2、最简采集和样例说明

2.1 最简化的采集数据例程

/*初始化*/
dmcam_init(NULL);
...
/*打开设备*/
dev = dmcam_dev_open(NULL);//打开第一个设备
/*采集设置*/
dmcam_cap_cfg_t cap_cfg = {
    .cache_frames_cnt = FRAME_BUF_FCNT, /* FRAME_BUF_FCNT frames can be cached in frame buffer*/
    .on_error = NULL,      /* No error callback */
    .on_frame_ready = NULL, /* No frame ready callback*/
    .en_save_replay = false, /* false save raw data stream to replay file */
    .en_save_dist_u16 = false, /* disable save dist stream into replay file */
    .en_save_gray_u16 = false, /* disable save gray stream into replay file*/
    .fname_replay = NULL, /* replay filename */
};
dmcam_cap_config_set(dev,&cap_cfg);
...
/*开始采集*/
dmcam_cap_start(dev);//开始采集
/*获得采集数据*/
fr_cnt = dmcam_cap_get_frames(dev,20,fbuf,FRAME_SIZE*20,&fbuf_info);//采集20帧数据
/*获得深度数据*/
dmcam_frame_get_dist_u16(dev,dist,dist_len,fbuf,fbuf_info.frame_info.frame_size, &fbuf_info.frame_info);//解析出一帧深度数据
/*获得灰度数据*/
dmcam_frame_get_gray_u16(dev,gray,gray_len,fbuf,fbuf_info.frame_info.frame_size, &fbuf_info.frame_info);//解析出一帧灰度数据
/*获取点云数据*/
dmcam_frame_get_pcl(dev,pcl,pcl_len,dist,dist_len,img_w,img_h,NULL);//将转换的深度数据转换成点云数据
/*停止采集*/
dmcam_cap_stop(dev);
...
dmcam_dev_close(dev);
dmcam_uninit();

2.2相关样例说明

SmartToF SDK提供的主要样例如下:

sdk's People

Contributors

frankfoxy avatar niph2018 avatar smarttof avatar yanxiaoying avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.