how to use cv::Mat class to save 3 dimensions data

asked 2017-06-14 09:52:43 -0500

《learningOpencv》 tells me "The cv::Mat class can be used for arrays of any number of dimensions.".My question is "how to use cv::Mat class to save 3 dimensions data"? many thanks.

edit retag flag offensive close merge delete

Comments

You have to use FileStorage class. This example can help you

LBerger gravatar imageLBerger ( 2017-06-14 10:06:33 -0500 )edit

thanks.But I want to use Mat like "3D array",how can i do this?

jsxyhelu gravatar imagejsxyhelu ( 2017-06-14 10:24:04 -0500 )edit

opencv is an image processing library. It is 2d dimensional data. You can use answer in this post (and check it)

An alternative is vector<mat> or use CV_8UC(256)

LBerger gravatar imageLBerger ( 2017-06-14 10:29:46 -0500 )edit
1

I get it,many thanks.OK,I will use something like int[255,255,255],like before.

jsxyhelu gravatar imagejsxyhelu ( 2017-06-14 21:18:25 -0500 )edit