I have already extracted the shape descriptor chain code which is in the format CvChain* now I have to feed that into SVM for training. I need to convert CvChain* into Mat. Any idea on how to do this? Anyone who has used chain code as a feature extraction method can you tell me the approach you have used?