ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

So I found the cause of the problem. The Size template has no operator <<. I changed the code to access the members width and height.

ROS_INFO_STREAM("Starting to record " << codec << " video at width " << size.width << " height " <<\ size.height << "@" << fps << "fps. Press Ctrl+C to stop recording." );

I am still confused how the Size type gets to use these methods in Size_. Is there some typedef elsewhere? //////////////////////////////// Size_ ////////////////////////////////

/*!
The 2D size class

The class represents the size of a 2D rectangle, image size, matrix size etc.
Normally, cv::Size ~ cv::Size_<int> is used.
*/ template<typename _tp=""> class CV_EXPORTS Size_ { public: typedef _Tp value_type;

//! various constructors                                                                                                  
Size_();
Size_(_Tp _width, _Tp _height);
Size_(const Size_& sz);
Size_(const CvSize& sz);
Size_(const CvSize2D32f& sz);
Size_(const Point_<_Tp>& pt);

Size_& operator = (const Size_& sz);
//! the area (width*height)                                                                                               
_Tp area() const;

//! conversion of another data type.                                                                                      
template<typename _Tp2> operator Size_<_Tp2>() const;

//! conversion to the old-style OpenCV types                                                                              
operator CvSize() const;
operator CvSize2D32f() const;

_Tp width, height; // the width and the height

};

I guess I do a patch now and submit to the maintainer?

So I found the cause of the problem. The Size template has no operator <<. I changed the code to access the members width and height.

ROS_INFO_STREAM("Starting to record " << codec << " video at width " << size.width << " height " <<\ size.height << "@" << fps << "fps. Press Ctrl+C to stop recording." );

I am still confused how the Size type gets to use these methods in Size_. Is there some typedef elsewhere? This is in /usr/include/opencv2/core/core.hpp //////////////////////////////// Size_ ////////////////////////////////

/*!
The 2D size class

The class represents the size of a 2D rectangle, image size, matrix size etc.
Normally, cv::Size ~ cv::Size_<int> is used.
*/ template<typename _tp=""> class CV_EXPORTS Size_ { public: typedef _Tp value_type;

//! various constructors                                                                                                  
Size_();
Size_(_Tp _width, _Tp _height);
Size_(const Size_& sz);
Size_(const CvSize& sz);
Size_(const CvSize2D32f& sz);
Size_(const Point_<_Tp>& pt);

Size_& operator = (const Size_& sz);
//! the area (width*height)                                                                                               
_Tp area() const;

//! conversion of another data type.                                                                                      
template<typename _Tp2> operator Size_<_Tp2>() const;

//! conversion to the old-style OpenCV types                                                                              
operator CvSize() const;
operator CvSize2D32f() const;

_Tp width, height; // the width and the height

};

I guess I do a patch now and submit to the maintainer?

So I found the cause of the problem. The Size template has no operator <<. I changed the code to access the members width and height.

ROS_INFO_STREAM("Starting to record " << codec << " video at width " << size.width << " height " <<\ size.height << "@" << fps << "fps. Press Ctrl+C to stop recording." );

I am still confused how the Size type gets to use these methods in Size_. Is there some typedef elsewhere? This is in /usr/include/opencv2/core/core.hpp /usr/include/opencv2/core/core.hpp

//////////////////////////////// Size_ ////////////////////////////////

/*!
The 2D size class

The class represents the size of a 2D rectangle, image size, matrix size etc.
Normally, cv::Size ~ cv::Size_<int> is used.
*/ template<typename _tp=""> class CV_EXPORTS Size_ { public: typedef _Tp value_type;

//! various constructors                                                                                                  
Size_();
Size_(_Tp _width, _Tp _height);
Size_(const Size_& sz);
Size_(const CvSize& sz);
Size_(const CvSize2D32f& sz);
Size_(const Point_<_Tp>& pt);

Size_& operator = (const Size_& sz);
//! the area (width*height)                                                                                               
_Tp area() const;

//! conversion of another data type.                                                                                      
template<typename _Tp2> operator Size_<_Tp2>() const;

//! conversion to the old-style OpenCV types                                                                              
operator CvSize() const;
operator CvSize2D32f() const;

_Tp width, height; // the width and the height

};

I guess I do a patch now and submit to the maintainer?