1. How to detect an object in an image?
Determining the features from the object that you want to detect is the key. The feature in this case is something that differentiates the object from others, such as color, shape, size, etc…
2. What are the techniques for object detection?
2. What are the techniques for object detection?
The image processing techniques such as morphology or color processing usually did this job. A simple example in Scilab of detecting ‘white rabbit’ is shown as follow, in this case, ‘color’ is the feature used to distinguish the white rabbit from other:
// Gray scale image
S2 = rgb2gray(S);
ShowImage(S2,'0');
// Morphology technique, image erosion to erase the unwanted components
se = CreateStructureElement('vertical_line', 10);
S4 = ErodeImage(S3, se);
se = CreateStructureElement('horizontal_line', 10);
S4 = ErodeImage(S4, se);
ShowImage(S4,'0');
// Labeled the component(s), and plot the centroid on the original image
// Gray scale image
S2 = rgb2gray(S);
ShowImage(S2,'0');
// Morphology technique, image erosion to erase the unwanted components
se = CreateStructureElement('vertical_line', 10);
S4 = ErodeImage(S3, se);
se = CreateStructureElement('horizontal_line', 10);
S4 = ErodeImage(S4, se);
ShowImage(S4,'0');
// Labeled the component(s), and plot the centroid on the original image