Object classification using Bag of visual words in real time

Matlab script for image category classification. Just record videos of individual object and run.
285 Downloads
Updated 17 Dec 2016

View License

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% IN CASE OF ANY QUERY %%%%%%%%%
%%%%% FEEL FREE TO CONTACT %%%%%%%%%
%%%%% HMNTKUMAR23@GMAIL.COM %%%%%%%%%
%%%%%%%% HEMANT MISHRA %%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

!!!!!! NOTE: requires MATLAB version 2014b or later with computer vision toolbox installed.

1. create training and testing image folders> which contains sub-folders of each class.

OR

just put objects video in this folder and run 'video2image_folder.m'

2. edit 'create_image_Set_v2.m' >> provide training and testing image location.

if you have put image in Test and Train folder as specified, this step is not required.

3. run 'extract_feature_vector.m' >>it will store feature vector in variable 'categoryClassifier''

it also calls script 'classify_train2.m' to identify strong connections (for feature location)

4. to test an image, write following code

img=imread('myimage.jpg')
[cat, scores] = identify_image(img,categoryClassifier,bag,Wstrong_n);

OR

you can check a video by running 'detect_obj_offline.m'

OR

in real time using ip webcam 'ipdetect_obj_live.m'

OR

test the images in test and train set 'image_cat_testing_auto.m'

Install free IP webcam from playstore to turn your phone into webcam and use it for live image processing.

Have fun, feel free to contact and do share feedback. Any kind of support is also welcomed.
------HEMANT MISHRA--------

Cite As

Hemant Kumar Mishra (2024). Object classification using Bag of visual words in real time (https://www.mathworks.com/matlabcentral/fileexchange/60783-object-classification-using-bag-of-visual-words-in-real-time), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
2.0.0.0