本文解决了该系列09篇中的一个显著bug,同时也是对多核写作图像处理OMP示例的扩充。
本系列10篇:CCS+C6678LE开发记录10:(图像)数据处理与传输框架
本文根据...\mcsdk_2_01_02_06\demos\image_processing\openmp\c6678l示例进行修改。
原示例是DSP通过HTTP网页服务和PC连接传输数据,修改之后进行了“瘦身”,移除所有webpages,改为UDP数据包方式传送数据。
关于UDP传输可以参考这篇文章CCS+C6678LE开发记录03:常规入门HeloWorld
综合之后完成的项目已经上传到GitHub仓库(因为一些原因,暂不公开,如有需要请私信)
DSP端(CCSv6) NA
PC端(VS2013) NA
测试结果如下
首先连接EVM等待Network初始化完成
...
PC端发送数据
发布了动态图,只能发几张独立的
DSP端发回处理结果数据
原始图片比较大,网络传输消耗了大部分时间。
以下是CCS调试输出
- [C66xx_0]
- Multicore Image Processing using OpenMP
-
- Execute Task_create...
- Waiting for the start of the network...
- Execute NC_SystemOpen...
- Execute CfgNew...
- EVM in StaticIP mode at 192.168.2.100
- Set IP address of PC to 192.168.2.101
- PASS successfully initialized
- Ethernet subsystem successfully initialized
- Ethernet eventId : 48 and vectId (Interrupt) : 7
- Verify_Init: Expected 0 entry count for Queue number = 899, found 498 entries
- Registration of the EMAC Successful, waiting for link up ..
- IP Addr(1):192.168.2.100
- Execute NetworkOpen...
- ------------------- TASK execution 1 -------------------
- ImageSize[Width(1920) * Height(1080)] = 2073600
- #WARNING# Exception may occur in the first loop.
- ERROR: Data transfer is incomplete (0/2073600)!
- ------------------- TASK execution 2 -------------------
- ImageSize[Width(1920) * Height(1080)] = 2073600
- MSP: Send message: SRCIMG_RECEIVED.
- MSM: Recv message: SRCIMG_RECEIVED
- Image processing...Done.
- MSM: Send message: IMGPROC_FINISHED
- MSP: Recv message: IMGPROC_FINISHED.
- ------------------- TASK execution 3 -------------------
- ImageSize[Width(2640) * Height(1210)] = 3194400
- MSP: Send message: SRCIMG_RECEIVED.
- MSM: Recv message: SRCIMG_RECEIVED
- Image processing...Done.
- MSM: Send message: IMGPROC_FINISHED
- MSP: Recv message: IMGPROC_FINISHED.
- ------------------- TASK execution 4 -------------------
- ImageSize[Width(2336) * Height(4160)] = 9717760
- MSP: Send message: SRCIMG_RECEIVED.
- MSM: Recv message: SRCIMG_RECEIVED
- Image processing...Done.
- MSM: Send message: IMGPROC_FINISHED
- MSP: Recv message: IMGPROC_FINISHED.
- ------------------- TASK execution 5 -------------------
- ImageSize[Width(2336) * Height(4160)] = 9717760
- MSP: Send message: SRCIMG_RECEIVED.
- MSM: Recv message: SRCIMG_RECEIVED
- Image processing...Done.
- MSM: Send message: IMGPROC_FINISHED
- MSP: Recv message: IMGPROC_FINISHED.
复制代码为了进行对比,下面将原始图片及结果图片放在一起(原图已缩小以便于页面浏览体验)
原图1(1920*1080)
结果
原图2(2640*1210)
结果
原图3(2336*4160)
结果
代码分析请参见后续博文。