Hi, I have such problem, I have image and there are some white stripes around it and I don't know how get only image without this borders. This stripes can have different size and I have a lot of images where this stripes are present.Hi, I have such problem, I have image and there are some white stripes around it and I don't know how get only image without this borders. This stripes can have different size and I have a lot of images where this stripes are present.
PS Sorry for my English
If you want to process a region-of-interest of an image, you need to offset the starting pointer by the number of lines and columns of the border region, reduce the image width/height to the smaller size, and leave the step size of the original image along. Try something like the following:
[cpp]Ipp8u *pFullImg; // Assume this points to first pixel of the bordered image int wFull, hFull, sFull; // Width, height, and step size of the bordered image int borderRows, borderCols; // This is the number of rows and columns in the border you want to cut out Ipp8u *pRoiImg = pFullImg + (borderRows*sFull) + borderCols; // Offset to ROI image you want to process int wRoi = wFull - (2 * borderCols); // ROI width int hRoi = hFull - (2 * borderRows); // ROI height // Now use the IPP routines of interest using pRoiImg, wRoi, hRoi, and sFull. // Note that it's important to use the origonal step size so that the IPP // calls can get to the proper pixel in the next row
But I don't know border size it mast doing automatically. Is there are method like face detection but for images, like "image detection". The source image: The result must be:
where "0" is backgroud.