OpenCVForUnity
OpenCVForUnity copied to clipboard
Save mat to disk.
Hello, I would like to save a Mat instance to the disk. More specifically this instance is the result of the dnn forward operation, model.foward() .
I tried to use Imgcodecs.imwrite() or use the Unity's build-in binary formatter but the class Mat is not serializable so it won't work.
Any ideas ?
Thank you in advance
Since OpenCVForUnity is a clone of OpenCV Java, you are able to use the same API as OpenCV Java 4.2.0(https://docs.opencv.org/master/javadoc/). FileStorage class has not been implemented.
I think this post is very helpful. https://answers.opencv.org/question/8873/best-way-to-store-a-mat-object-in-android/