-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
guidance for OpenCV cv::Mat support #60
Comments
Thanks for the interest! Can you tell me the relationship between cv::Mat, cvMat_? |
The type most the time is definitely |
To explain more, Raw data can be accessed with the data pointer Type of data stored is accessed with |
Thanks, will take a look at it in a week or so -- I am up for a presentation, then a workshop. A copy (you call it deep copy) may be prohibitively expensive with a large matrix, or in cases when the matrix is half the size of the available memory -- erroneous. The 'continuous' case is relatively easy to handle. I am interested in learning more about the cases where |
I am just a regular user of OpenCV. I store most data in Eigen arrays but for some (computer-vision related) algorithms, I map the data to cv::Mat. Dumping those directly to hdf5 would be elegant, but it is mostly a convenience for me. Non-continuous matrix is a submatrix, yes. Algorithms operate on matrix or sub-matrix (they call it image and region, or region of interest or ROI) without necessarily making the distinction. The non-continuous case could just fail for now, that would be fair enough. Maybe later some expert (don't think that is me) might write a routine converting ROI information obtained from cv::Mat::locateROI into HDF5 hyperslab specification. |
An update: thanks for the input! Maybe we could have an online chat on suitable day? I live in Toronto -- time zone wise. The alternative is to make it happen for the current version, and then forward propagate it to the new internal type system. Either way, for an efficient zero copy solution I need to have a good understanding of use case, and behaviour of OpenCV. And perhaps you could help me with that. best: steve |
No problem waiting a few weeks for the next type system. I will contact you for a chat, I am Europe-based but we will find some overlap for sure. |
Hi, I would like to add support for OpenCV matrices (
cv::Mat
). All supported matrix classes inH5M*
are templated based on scalar type (plus other things);cv::Mat
, on the other hand, stores its datatype internally. I usually use a simple switch/case function to map OpenCV type constants to HDF5 constants and vice verse.Could I get some guidance how to hook that into h5cpp? I appreciate very much compactness of the code, esthetically and as programmer, but need a bit of help at first :)
The text was updated successfully, but these errors were encountered: