Question

I have RGB face images of size 60x60. They are matrices of size 60x60x3 in Matlab.

I need to apply some algorithms to these data. But first I need to create training examples for the images. Given one image of size 60x60x3 I will need to create a vector of size 1x10800. I am not sure, should I interleave the R, G and B values for the pixels, should I go column by column or row by row?

Thanks

Was it helpful?

Solution

Usually, it does not matter. For instance, SVM classifier or neural network perceptron are invariant to any permutations of the input. If your image is im, just use im(:) to transform it into a column.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top