zoukankan      html  css  js  c++  java
  • SR4000(二)

    返回相位(用于测距离,一个全相位代表5m)  D=3*10^8/2f(60M)=5m full-phase(0xffff)

    返回LED反射光的振幅和背景光均值

    无效数据:

    1. B太大 幅度(也是16bits表示)最高位设为1     距离设置为0
    2. A太大(SR4000中设置了阈值来检测) 幅度最高位设为1    距离设为0

    绝对精度可达到<1cm

    反射率的影响大:

    以下说明如何测量物体反射率,考虑2种反射光线:

    1. 直反射和漫反射与入射光的能量比例
    2. 直反射和漫反射强度的角度分布

    漫反射材料:反射系数为0%(全吸收与穿透)—100%(白纸)

    测距有采样的4个相位决定,所以连续输出4个相位才能获得一个距离值,如果物体在输出时移动了,就会发生系统错误。

    测距是依据这样的一个假设:LED发射的光经过目标物体发射后直接被接收而没有多重反射。

    28

    多次反射影响例子:

    橘黄色的线为测量得到的数据重建的墙

    蓝色为期望测量数据重建的墙

    调节工作频率从而调节工作距离(5m或10m(对应一个相位))

    在cw5下

    物体在7m被测出来为2m,9m为4m,13m为3m

    在cw10

    物体在12m为2m,22m为2m

    当背景没有限制时,远距离的高亮物体会对数据造成很大影响。解决方法:

    通过设置幅度阈值(不消耗主机CPU资源)来滤除强光远背景。(该滤波器在cw10工作最佳,实践证明大多数处于10外的物体的光强度低)

    焦距调节:

    默认SR4000出厂调节设置焦距为1.6m

    逆时针减小焦距,顺时针增大焦距

    大概4ms输出一帧图像。

    获取图像模式:

    1. 连续获取模式
    2. 触发获取模式(软触发和硬触发)

    trigger in 触发开始获取图像和数据输出

    trigger out 输出同步外部设备的信号

    29

    trigger modes枚举类型

    AM_HW_TRIGGER     hardware trigger mode
    AM_SW_TRIGGER     software trigger mode

     

    连续模式:

    当读取sensor数据时,前一帧图像在内部FPGA中处理,当驱动得到Acquire()命令时,FPGA处理完的最近的一张图像传送给主机

    硬件驱动

    The hardware trigger output consists of a pulse of 1-2ms length that starts at the beginning of each new
    acquisition.

    30

    连续模式流程图

     

    Important Notes: 
    In ‘Continuous’ Mode, because of the 1-frame latency, any changes in mode, integration time or
    modulation frequency setting do not affect the first acquired frame after the setting change, since this
    frame would have been acquired before the setting change.
    For very small integration times, the data transfer may not start until the beginning of the second
    subsequent (N+2) frame.

    软件触发模式

    相机等待Acquire命令

    When the command is received the image capture commences.Once acquisition is complete the image is processed in the FPGA and then transferred to the host computer. On completion of the transfer the command completes.  The aquired image is then available. A new acquisition will only start when the data transfer has been
    completed.

     

    31

    硬件触发模式

    32

    注意:

    1. 如果后一张图像处理完之前没有收到Acquire()命令的话,前一幅图像就会丢失掉。
    2. 只有在处理完前一张图像后第二个触发信号才能开始触发后一副图像开始获取和处理。
    3. 如果前一幅图像传给主机还没结束的话,如果后一副图像已经处理好了(网络不好,延时大),第二幅图图像会丢失。

    SetMode()可以设置获取图像的模式。

    SR_GetMode()获取以前使用的图像模式。

    AM_Denoise ANF: 开启硬件去噪(5*5领域,不占用主机CPU)默认是开启的

    AM_SW_ANF:(7*7领域的软滤波)

    AM_Median:(3*3中值滤波)

    AM_Confidence Map: 产生Confidence Map(关闭可以节省大量主机的CPU资源)

    AM_Short Range:焦距里的坐标变换

    33

    34

    驱动提供坐标变换函数

    which converts the raw 16-bit radial distances to Cartesian(笛卡尔) coordinates(右手坐标系) expressed in meters.

    Y垂直

    X水平

    Z相机镜头方向

    Distance Image

    Depending on whether the ‘Coord Transf’ checkbox is checked, this is either radial distance from the camera, or the distance along the Z axis.

    The Z value (and X and Y), computed by the Coordinate Transform function of the driver, is expressed in meters.

    In the SampleGUI application however, for simplicity, the Z distance is represented on the same scale as the raw distance, i.e. 0 – 0xFFFF;

    Grayscale Image

    信号幅度随距离增加而衰减 使用‘Convert Gray’ 模式可以减轻这种影响

    工作频率30M:0-2.5米时,无调整。2.5-5米有调整

    工作频率15M:0-5米时,无调整。5-10米有调整

    When ‘Conv Gray’ (produces a distance-adjusted grayscale image)mode is off, this image is simply the Amplitude signal.  The raw Amplitude signal is in the
    range 0 – 0x7FFF,  with the Most Significant Bit (MSB)reserved to indicate saturation of the signal.(MSB位保留用作指明信号时候饱和A太大或B太大)

    image0  Distance images

    image1  Grayscale images

    Solid/Wire Frame/Point      

    List  Methods of display of the 3D measured points


    Color/Amplitude     

    Color coded distance, or grayscale signal Amplitude

    Cross Section        

    Draws a red line through a single row and column of the data.  The postion
    of the line coresponding to Point A may be selected by clicking on the
    Distance or Grayscale image. The position of point B may be selected by
    using the right button.


    Background     

    Background color can be selected from the pallette.

    Confidence Map

    combination of Distance and Amplitude measurements and their temporal variations to compute a measure of probability or ‘confidence’ that the distance measurement for each pixel is correct. 

    greater values representing higher confidence.

    输出文件(3D point coordinates and Amplitude data)格式:

    沿着照相机的视角向左X增加,向上Y增加,向前Z增加。

    X坐标144*176    144行 ,176个tab

    Y坐标144*176    144行 ,176个tab

    Z坐标144*176    144行 ,176个tab

    观察数据:

    35

    下图中用176个数据(浮点数),之间用TAB键隔开,共144个(2到145)

    距离数据

    36

    37

    38

    39

    40

    41

     

    单帧图像可以导出为STL or DXF 格式

    按stop按钮冻结数据,然后FILE MENU 选择导出格式。

    对于实时的应用,照相机的数据必须在飞秒内处理完。

    自己开发

    Swissranger API for the SR4000

    API以.dll格式的动态链接库提供给windows开发者和.so格式FOR LINUX,同时提供C++头文件。

    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    web前端网站收藏
    wordpress安装(ubuntu+nginx+php+mariadb)
    硬盘分区表知识——详解硬盘MBR
    useradd添加用户
    闭包closure this
    什么是同步加载与异步加载
    css 两个span标签在同一行,高度不一样
    CSS label之间存在间距
    JS中如何跳出循环/结束遍历
    el-checkbox-group 无法选中
  • 原文地址:https://www.cnblogs.com/yuliyang/p/3392372.html
Copyright © 2011-2022 走看看