Yes, ok, but i can't access or write in OpenCV source code.
How can i serialize however?
Marco Meoni - Sbaush wrote:
Hi all. I understood how to serialize correctly nested structures, defining serialize method inside all.ar & g.id <http://g.id>;
I've a problem with an attribute of a struct. The attribute is border of OpenCV CvSeq type.
Here is my code... what can i do to solve this?
struct Element{
unsigned int id;
double area; double perimeter;
CvRect bounding_box; CvSeq* border;
...
...
};
namespace boost {
namespace serialization {
template<class Archive>
void serialize(Archive & ar, Element & g, const unsigned int version)
{
ar & g.area ;
ar & g.perimeter ;
ar & g.bounding_box.width ;
ar & g.bounding_box.height ;
ar & g.bounding_box.x ;
ar & g.bounding_box.y ;
// ar & g.border; I CAN'T DO THIS...
You need to do the same for CvSeq that you did for Element:
template<class Archive>
void serialize(Archive& ar, CvSeq& aCvSeq , const unsigned int)
{
...
Jeff
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users