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.

6678 image processing中的guard_height



6678中的demo image processing已经可以运行了。查看代码时,有点疑问。

在对图像分片前,首先是计算height,这里得到height的代码如下:

slice_height = bmp_header.dib.image_height / number_of_cores;

rgb[0] = &(pixel_array_rgb[0]);  

height[0] = slice_height + guard_height;

后面在for循环中,有height[i] = slice_height + (2 * guard_height);

其中的这个guard_height当核数量大于1时,设置为DEFAULT_SLICE_OVERLAP_SIZE,该值宏定义为2。

请问这个guard_height具体有什么作用?