In simple order manner it would be like this
image - preprocessing - data reduction - feature analysis
ASSUMPTION:
i. Image must be exact front view side for better result.
ii. No other entity should be in the image such as the train driver, passenger, traffic lamp, buildings and so on.
iii. The distance of the train image taken must not be too far.
iv. The picture quality must be in uniform brightness and contrast.
v. It is best to not include shadows in the picture.
vi. The focused image should only be the train, not merged with surroundings.
vii. Unique colors of the body part are helpful too.
Here is the result of my test script:
Result is read from left to right then follows down to final picture showing the results.
i. Original image
ii. Grayscale image +( imadjust increases the contrast of the image by mapping the values of the input intensity image to new values such that, by default, 1% of the data is saturated at low and high intensities of the input data) + median filter where it remove noise but preserve edges.
iii. Edge detection of sobel operator + dilation(linear gaps will disappear if the Sobel image is dilated using linear structuring elements)
iv. The dilated gradient mask shows the outline of the cell quite nicely, but there are still holes in the interior of the cell. To fill these holes we use the imfill function.
v. Using morphology functions, remove pixels which do not belong to the objects of interest.
vi. Estimate each object's area and perimeter. Use these results to form a simple metric indicating the roundness of an object. When the thinness ratio 0.9 less than metric less than 1 we classify it as locomotive train.
Refer to step i. to v. But for our final result the thinness ratio is 0.70 less than metric less than 0.76(Square like shape often to have this range of values). Which we classify it as a KTM Malaysia.
Refer to step i. to v. But for our final result the thinness ratio is 0.76 less than metric less than 0.81(Square and circle like shape often to have this range of values). Which we classify it as a Singapore MRT.
5 April 2011
fareed
No comments:
Post a Comment