how to extract features from a satellite image will all feature matrices having same size?

i want to classify a satellite image based on its NDVI values. i have to classify the image in three classes: wheat, fodder and others. when i extract wheat (ndvi>0.5), fodder(ndvi<=0.5 and >0.3) and others(ndvi<=0.3) pixels from image, the three column matrices have different sizes due to which i cant apply patternnet to it. plz help me by telling some efficient way of feature extraction. plz also tell me if it is possible to train the neural network first for a sample of the image and then use it to classify the whole image? i would really b obliged if any one answer. badly need a quick response

 Accepted Answer

Since each pixel has a different classification, the rxc image is columninzed and transposed to an Nx1 row.
input = image(:)';
The corresponding Nx3 target matrix contains 3-dimensional columns fro the 3-dimensional unit matrix eye(3).
Hope this helps.
Thank you for formally accepting my answer
Greg

3 Comments

thanks a lot sir for clearing one of my confusions.
i have a 50 by 50 matrix. so according to ur suggestion i columnized it and i got 2500x1 row by:
input=image(:);
now i want to ask that should i arrange the pixels in input like first all the wheat pixels then fodder pixels and then others?
Also according to my input image, what will be the size of my target matrix? and how to create it?
how to assign each pixel its class?
plz answer so that i can carry out my research work.
sizes already given
help ind2vec
help vec2ind
For examples search using
greg ind2vec vec2ind
Thank u sooooooooo much respected sir, i have done the classification.
Really obliged and thankful.

Sign in to comment.

More Answers (1)

respected sir , i am working on satellite image classification using BBO with CS algorithm with Urban , vegetation, barren , water , rocky , can you pl help me image classification of its satellite image if you can pl : ashish88bhardwaj@gmail.com Thanking you.

Asked:

on 29 Mar 2014

Answered:

on 12 Aug 2015

Community Treasure Hunt

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

Start Hunting!