-
Notifications
You must be signed in to change notification settings - Fork 3
Read and write an image
Romain Milbert edited this page May 24, 2017
·
2 revisions
As of now, ArcV works with matrices of the type float. A matrix is defined by:
Arcv::Matrix<T> mat;
You should then work with Arcv::Matrix<float>
, though an alternative is available:
Arcv::Matrix<> mat; // Default template parameter is set to float
Arcv::Mat mat; // Mat is typedef'd to Matrix<>
Now, back to business. To read an image, you simply have to call:
Arcv::Mat mat = Arcv::Image::read("input.png");
Then, after your modifications are made, simply do the following:
Arcv::Image::write(mat, "output.png");
And you're done, your image is now saved!