how can i use matlab for scene recognition with bag of words

1 view (last 30 days)
Please i need some assistance in my project about scene recognition with bag of words, i want to use matlab for this project of mine but i don't know how to add the 100 images, how to extract features in all the images, how to apply kmeans to the feature centers, how to compute histogram of the images and finally to compare the histogram. I tried my possible best to do it but i still couldn't and time is against me, need an assistance from any one please, its my final project and have to be submitted latest on this coming Wednesday. my email address is aishasimple2013@gmail.com. Thank you

Answers (2)

Image Analyst
Image Analyst on 9 Jun 2014
Here's an example of kmeans with images.
To sum images, cast to double first.
How you extract the features (segment the image) depends on what your images look like and what the features are that you want to segment. For example, if you want red spots then that will take a different feature detection algorithm than if you want gray areas with honeycomb patterns on them. There is no universal "extract features" algorithm that works with all images in the universe, in case that's what you were thinking (which is what it sounds like).
I'm not sure what the difficulty in using histograms is - share your code and tell us where you're confused. In the meantime, to process a hundred images, see the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F

Dima Lisin
Dima Lisin on 20 Nov 2014
There is now support for image classification using the bag of words model in the Computer Vision System Toolbox. See this example.

Categories

Find more on Recognition, Object Detection, and Semantic Segmentation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!