MATLAB: How to extract features from a satellite image will all feature matrices having same size

Deep Learning Toolboxfeature extractionimage classificationpatternnet

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

Best 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