imwrite a Mat_float keeping the image.
I at moment trying to save a Mat which is given the type Mat_<float>.. When i try to save it, the image which it saves becomes black, but imshow shows that the image isn't black at all. Is there a way to save the image even though it has the type Mat_float?
How do you save your image ? I think only yml format can save float image
as jpg, but i could try yml. It could not write to specified extension.
You have to do something like this :
It's a text format so it's not very efficiency in size but it's readable with a text editor. You can add tgz extension and it would be compressed.
You can use this technique too
what is
Mat m=acos(-1)*Mat::ones(256,256,CV_32FC1);
?Could you explain what you are doing?
It's only an example : an image 256 rows by 256 column of type float(32F) with one channel (C1). All pixel values are equal to 3.14159274
'fs<<"Image"<<m'< p="">
fs
is the file"image"
? i don't get andm
is theMat_<float>
?If you prefer :
to read you can do :
you can read this example
So i can't save as an viewable image and then process it again?
That's another question you can just changed name file
both save it as black images.