Background subtraction Image Processing

0
39

Background subtraction Image Processing

Background subtraction Image Processing Background subtraction is an important pre-processing step in computer vision. Background should be removed so that the system only performs calculations on the object of interest. Background removal can save a lot of processing power later and also reduces the complexities in features extraction. All background pixels were set to zero based on the assumption that the background was black. Since the back ground was black, pixels having intensity close to zero were set to zero. Some pixel had intensity in the range of 50 due to reflection of imperfection but even for higher value pixels the black back ground assumption worked. It was noted that the bright spots on the background produced only shades of grey and not a colour. The pixel value for background in all three channels (RGB) was almost equal therefor the difference of two channels was used to check whether the pixel belonged to background. For this purpose, the blue channel was subtracted from red channel and absolute difference was calculated. If the difference exceeded a value of 30, the pixel certainly belonged to fruit and not the background. The difference in the red and blue value in the pixels belonging to the fruit was always more than 60. It was simple and efficient approach.

BLOB is the isolated object in binary image. In image processing, blobs are used to compute shape-related features, in some operations, such as calculating Mean Value, the binary image is passed to function to compute the Mean Value of the image area highlighted by the binary image.

After pre-processing operations described previously, the blob was isolated (Figure 4-6). A simple thresholding operation was enough for this purpose. An image was first converted to greyscale followed by a thresholding operation. Thresholding is an operation in which the pixel value less than a set threshold is set to zero and all other pixels are set to one (binary). The threshold value used was 30. To suppress sharp edges in the binary image (also referred as a binary mask) a morphological closing operation was performed.

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.