I’m using the NPP library (1.0) under Ubuntu 9.10. I’m experiencing some strange results when using the nppiCopyConstBorder_8u_C1R() function to create a border around my picture.
If I use a nLeftBorderWidth parameter to the function that is a multiple of 4 and a image with a width that is a multiple of 4 the first nTopBorderHeight rows in the new picture, except for the left and right pixels also in the left and right borders, which should contain the borders are the same as the top row in the original image. They are not the color which I specify with the nValue parameter.
If this wasn’t clear I have included 3 pictures, one which is the original 100x100, one which should have a 4 pixel border around the picture, and one that has a five pixel border on the sides and 4 pixel ontop and in the bottom. They where both created the same way except for changing the nLeftBorderWidth parameter.
Original picture (100x100)
Image supposed to have a 4 pixel border (108x108):
Image created exactly the same way expect for the 5 pixels to left and right instead of 4 pixels (110x108):
Has anyone experienced the same results or is it just me that is using this function in the wrong way?