The only way that I have found to write a SparseMat is with : void write( FileStorage& fs, const String& name, const SparseMat& value ) from persistence.cpp line 5493. This writes it as a YAML document and does not accept a path but only the file name. The desired SparseMat is two-dimensional with Vec5f data.
I think I can use OpenEXR organized with 5 channels as it supports arbitrary channels, but it is looking for a dense matrix and I want to reduce formatting and transmission time for what would otherwise be a very large matrix. This would probably involve a sparse to dense on the one end and a dense to sparse on the other.
Is there an example of writing a binary SparseMat out there?
Thanks Ralph