-
Notifications
You must be signed in to change notification settings - Fork 761
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
Adding basic types for OpenCV #53
base: develop
Are you sure you want to change the base?
Conversation
Looks nice! We do need to be a little careful about not adding in serialization functions for every library out there, but I think OpenCV is of wide enough interest that it's probably worth having this support included in cereal. If we do accept the pull, then someone will need to go through and do a more thorough sweep of OpenCV to add in as much useful stuff as possible (e.g. cv::RotatedRect_, cv::Scalar_, cv::Range, etc, etc, etc). |
What about having some kind of easily accessible modules, such as OpenCV, Boost, etc, that people could download and plug into cereal? Things like this, even if we keep the number small, add more clutter if someone doesn't need it. We could potentially split things like that off to other repositories since I'm not sure if there is a great way to do this with git (but I'm no git guru). As far as the code goes, it's a good start but we need unit tests and fixed size types for any serialization, and definitely can't have any debug statements within the code by the time it reaches us. Basically it needs to look like one of our existing std type files. |
I guess I was a bit quick on the pull request button, this debug statement shouldn't be in there. Fixed. |
Some of the basic types for OpenCV The mat type is binary and won't archive well with non-binary archivers
I prefer modules personally. I don't plan on using OpenCV and haven't even heard of it until just now. Seems like cruft to add it directly to the project, but it could be exceptionally useful to people who use it if made available in a more independent way. But, cool to see development from others! It's exciting. |
Pushing this to a later release than 1.1 - this isn't something that'd be part of cereal anyway, but rather a module that would be compatible with cereal. My idea here is either to have a collection of repositories or a single repositories with the various modules available in it. |
I'd prefer modules, we use OpenCV here but I could then easily contribute and maintain my own open source bindings separate to the project. |
I also wrote cereal serialisation functions for OpenCV a few months ago and I have a few remarks regarding this PR: This pulls in all kinds of headers from OpenCV for OpenCV has a proxy type for its data structures, The serialisation for Seems to me like you shouldn't use Also, in my opinion, supporting XML serialisation for Interestingly, I believe in your implementation if you save a non-continuous matrix, it will have |
} | ||
} | ||
|
||
#endif // !CEREAL_TYPOS_OPENCV_HPP_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume TYPOS should be TYPES?
Some of the basic types for OpenCV
The mat type is binary and won't archive well with non-binary archivers
OpenCV's FileStorage api still might be a bit more convenient to use (supplying matrixes by hand)
But this can be useful.