Calculate slope and bias of linear decision function [SVM]

Hi all,

for my project I need to get the exact parameters of the decision function calculated by the SVM.

Right now, I’m struggling to understand the output of the methods getDecisionFunction() and getUncompressedSupportVectors() and how to calculate the hyperplane from this data.

My problem is 2D and the classes are linearly separable.

I found this solution already, but the values don’t make any sense, as I get way to high values for the slope.
(c++ - How to get the separating hyperplane in OpenCV SVM? - Stack Overflow).

Can maybe someone confirm, that this is the correct solution?

Thanks a lot in advance!