ug1233中的编程方法

for(int pyr_comp=0;pyr_comp(mat_imagepyr1[pyr_com
p], mat_imagepyr1[pyr_comp+1]);
 #pragma SDS async(2)
 #pragma SDS resource(2)
 
xf::pyrDown(mat_imagepyr2[pyr_com
p], mat_imagepyr2[pyr_comp+1]);
 #pragma SDS wait(1)
 #pragma SDS wait(2) 
 }
for (int l=NUM_LEVELS-1; l>=0; l--) {
     //compute current level height
 int curr_height = pyr_h[l];
 int curr_width = pyr_w[l];
 
 //compute the flow vectors for the current pyramid level iteratively
 for(int iterations=0;iterations init_flag = ((iterations==0) && (l==NUM_LEVELS-1))? 
1 : 0;
 if(flag_flowin)
 {
 flow.rows = pyr_h[l];
 flow.cols = pyr_w[l];
 flow.size = pyr_h[l]*pyr_w[l];
 pyr_dense_optical_flow_accel(mat_imagepyr1[l], 
mat_imagepyr2[l], flow_iter, flow, l, scale_up_flag, scale_in, init_flag);
 flag_flowin = 0;
 }
 else
 {
 flow_iter.rows = pyr_h[l];
 flow_iter.cols = pyr_w[l];
 flow_iter.size = pyr_h[l]*pyr_w[l];
 pyr_dense_optical_flow_accel(mat_imagepyr1[l], 
mat_imagepyr2[l], flow, flow_iter, l, scale_up_flag, scale_in, init_flag);
 flag_flowin = 1;
 }
 }//end iterative coptical flow computation
 } // end pyramidal iterative optical flow HLS computation

 

你可能感兴趣的:(fpga)