This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

dlp_nirscan 源码疑问

Other Parts Discussed in Thread: DLPC350

您好,

      我用网上提供的dlp_nirscan源码进行二次开发,但是,其中暂时有几个地方看的不是很明白,麻烦您帮忙解释一下或帮我找到其开发过程中的手册:

     1.  上面截图中,fr_upd.frames_per_image=(25 + pats_per_frame -1)/pats_per_frame;这条代码的详细意义,即为什么要这样定义frames_per_image,尤其是其中的25和减1,及再除pats_per_frame,都分别是什么意思?

     2.  上图中的frame_update结构体中每一项的意义及其用法?以及FB_NUM_BUFFERS定义为什么是46?

    3.  上图中,pat_reorder_lut这个数组中每个数字的含义及其为何如此定义,麻烦告诉我一下

    此外,还有很多莫名给出的许多数字定义,都没太解释清楚,就拿来用了,导致很多都看不懂源码是什么意思。

  谢谢。

  • 找到一些软件开发资料和关于代码的说明文档,如何发给你?

  • 我的邮箱是 guwz2014@163.com,麻烦你发我邮箱吧,谢谢

  •  看发给你文档资料之外,关于这些代码说明:

    1. 

    25 是 RGB(24BITS)再插一个黑色的. (24-bit image + 1 black bit). 因此 num_pats_per_image=25.

    在一帧中能够保持多少PATTERN(曝光实践和帧率)用pats_per_frame.

    对于这两个参数: num_pats_per_image 和 pats_per_frame, 我们可以计算显示25个PATTERN(一个图片),需要多少video(RGB)帧

    (Num_pats_per_image + pats_per_frame -1)/pats_per_frame. 对应上面代码.

     

         2. 为了支持针对每个PATTERN可变曝光时间这个特性, 应用程序维持 frame_update 结构来控制哪一个图片(24个1BIT图案)

     dlpspectro_upate_frames() function 详细展示了 frames_per_image 和 frame_iter如何用来图片流的时序.

    /**

    * This function runs in a thread separate from the main thread and manages the timing of the images being streamed out

    *

    * @param   upd_struct->frames_per_image - I - Number of frames for which each image is displayed. After that many framees,

    *                                               next buffer is to be displayed

    * @param   upd_struct->frame_iter - I - Number of frames already counted/elapsed before entering this function

    *

    * @return   none

    *

    */

    所有到RGB video的图片流首先, 再根据上面的时序条件, 周期性装载到Sitara RAM中. FB_NUM_BUFFERS=46根据图片大小和连续的RAM大小确定的图片数目.

    3.  根据SITARA和DLPC350之间的连接, 是使用RGB(Video stream), 因此图片需要根据查找表从新排序.