How to convert a binary image (512x512) to a feature vector of one row. In matlab. Later I want to use this feature vector for pattern recognition using svm.
Use a suitable feature extraction algorithm (choice of the algorithm depends on what you want to do) and it would give a feature vector of one row as you require. If in case the feature extraction algorithm gives you a matrix and you want it as row vector, then, convert the matrix to a row vector using the following matlab command:
There is no pre-defined generic feature vector. Depending on your task, you can use different feature extraction methods, e.g. Histogram of Oriented Gradients (HOG), Local Binary Patterns (LBP) and even pre-trained Convolutional Neural Networks (CNN). For MATLAB, you should find the following libraries useful: