Matlab code for extracting random subwindows/subimages

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 7K views
amus
Messages
1
Reaction score
0
hi,

I am doing project related to object recognition using decision trees and random subwindows.For which i nee d MATLAB code for extracting random subwindows/subimages(size is 16x16) from the image files and after that i need to get the gray values of the subimages.
 
Physics news on Phys.org
Welcome to PhysicsForums!

I can't supply that code mostly because I don't have any, nor have I done much image processing in the MATLAB environment. I suspect that, for what you're doing, you're going to need to write some code. (i.e. no free lunch, but you never know what the Google is able to turn up)

If you're just starting out, I recommend looking at the following MATLAB page to see how MATLAB deals with image data:
http://www.mathworks.com/access/helpdesk/help/techdoc/creating_plots/f2-145.html

The page I linked to gives an example of how to extract one pixel from a raster image, you should be able to extend this to randomly extract 16x16 pixels out of your image.
 
Last edited by a moderator: