这段代码是对边界做什么处理呀
for(unsigned int y = 0; y < pOutput->Height; y++){
unsigned int xMin = 0, xMax = pOutput->Width-1;
unsigned char pixelVal = 0;
pixelVal = pInput->getValue( xMin, y );
pOutput->setValue( pixelVal, xMin, y );
pixelVal = pInput->getValue( xMax, y );
pOutput->setValue( pixelVal, xMax, y );
}
for(unsigned int x = 1; x < pOutput->Width-1; x++)
{
unsigned int yMin = 0, yMax = pOutput->Height-1;
unsigned char pixelVal = 0;
pixelVal = pInput->getValue(x, yMin );
pOutput->setValue( pixelVal, x, yMin );
pixelVal = pInput->getValue( x, yMax );
pOutput->setValue( pixelVal, x, yMax );
}
这是对图像的边界做什么处理? 把pInput的四条边复制到pOutput的四条边,而且pInput和pOutput长宽必须相等,要不越界
页:
[1]