|
想用BF533做人脸检测,因为ADI开发了类似OpenCV的图像处理工具箱ImageProcessingToolbox。
刚刚装上ImageProcessingToolbox时,看着那一堆文件发愁,脑子一团乱麻,不知道从哪下手。
这东西虽说是ADI开发,免费提供给我们的,可是你不写个简单易懂的教程(哪怕是英文的),叫我这种菜鸟如何是好。
没办法,慢慢看产品手册吧。
…………
N久之后,仍然不知所云。再看
…………
终于找到有用的了,BLACKFIN IMAGE PROCESSING TOOLBOX PRODUCT REFERENCE GUIDE,24页,Quick Start:
 1、Include adi_image_tool_box.h file. This has declarations of all the APIs supported by Blackfin Image Processing Toolbox library
 2、Include adi_image_tool_box_defines.h file. This has declarations of all the MACROs and object data types provided by Blackfin Image Processing Toolbox library.
 3、Include adi_tool_chain.h file. This has tool specific macros defined.
 4、Include Blackfin Image Processing Toolbox library (libadi_image_tool_box.dlb)
 5、Include corresponding OpenCV API implementation file
 6、OpenCV APIs take input through objects like IplImage, CvMat etc. Include source and header files that have the code to populate these objects. (Refer to Files)
 7、Include OpenCV header files
 8、Allocate L3 memory for input and output image buffer
 9、Add appropriate memory sections in LDF. (Refer Memory Sections)
 10、Read the input into input L3 buffer
 11、Call initialization APIs to populate required OpenCV objects like IplImage, CvMat etc. (Refer APIs for Initialization of OpenCV objects)
 12、Call the required primitive through OpenCV like APIs with appropriate arguments
 13、Output is available in the output L3 buffer that is sent as an argument
将相应文件复制到工程目录即可,什么是相应文件,最少应该有一下文件(我新建一个只有IplImage变量的工程,试的):
libadi_image_tool_box.dlb
cxtypes.h
adi_tool_chain.h
adi_image_tool_box_defines.h
adi_image_tool_box.h
adi_cv_ipl_loadimage.h
adi_cv_ipl_loadimage.c
adi_contour_mem_alloc.h
再说一下,IplImage的建立,再PRODUCT REFERENCE GUIDE上可以看到有两个函数
adi_cv_LoadIplImageInit()
adi_cv_LoadIplImage()
先调用adi_cv_LoadIplImageInit()初始化,然后再用adi_cv_LoadIplImage()建立了IplImage变量,可以参考adi_cv_ipl_loadimage.c,就明白了,
菜菜的我竟然为这个发了半天的愁。
只为想我一样的菜鸟学Blackfin容易些 |
|