Ask Your Question

Revision history [back]

Well it depends what your SVM is outputting. If it is pure binary labels, then it is simply checking which values are returned by your model and replace the corresponding pixels with black or white value. If the class output is a range, between -1 and +1 for example, then you will need to threshold.

If I am correct, for SVM it is the second case. So basically if you have the classification results in a matrix, apply a threshold on the matrix, using the middle value (for example 0) as threshold on the resulting scores. This will result in a binary mask image, where white pixels present one class and black pixels the other.