Singular value decomposition watermark implementation C++