 Ilya Lavrenov
					Ilya Lavrenov
				
			
				
					committed by
					
						 Alexander Smorkalov
						Alexander Smorkalov
					
				
			
			
				
	
			
			
			 Alexander Smorkalov
						Alexander Smorkalov
					
				
			
						parent
						
							27a8bb471b
						
					
				
				
					commit
					5e986f3347
				
			| @@ -129,12 +129,14 @@ template<typename T> struct OpMax | |||||||
|  |  | ||||||
| inline Size getContinuousSize( const Mat& m1, int widthScale=1 ) | inline Size getContinuousSize( const Mat& m1, int widthScale=1 ) | ||||||
| { | { | ||||||
|  |     CV_Assert(m1.dims <= 2); | ||||||
|     return m1.isContinuous() ? Size(m1.cols*m1.rows*widthScale, 1) : |     return m1.isContinuous() ? Size(m1.cols*m1.rows*widthScale, 1) : | ||||||
|         Size(m1.cols*widthScale, m1.rows); |         Size(m1.cols*widthScale, m1.rows); | ||||||
| } | } | ||||||
|  |  | ||||||
| inline Size getContinuousSize( const Mat& m1, const Mat& m2, int widthScale=1 ) | inline Size getContinuousSize( const Mat& m1, const Mat& m2, int widthScale=1 ) | ||||||
| { | { | ||||||
|  |     CV_Assert(m1.dims <= 2 && m1.size() == m2.size()); | ||||||
|     return (m1.flags & m2.flags & Mat::CONTINUOUS_FLAG) != 0 ? |     return (m1.flags & m2.flags & Mat::CONTINUOUS_FLAG) != 0 ? | ||||||
|         Size(m1.cols*m1.rows*widthScale, 1) : Size(m1.cols*widthScale, m1.rows); |         Size(m1.cols*m1.rows*widthScale, 1) : Size(m1.cols*widthScale, m1.rows); | ||||||
| } | } | ||||||
| @@ -142,6 +144,7 @@ inline Size getContinuousSize( const Mat& m1, const Mat& m2, int widthScale=1 ) | |||||||
| inline Size getContinuousSize( const Mat& m1, const Mat& m2, | inline Size getContinuousSize( const Mat& m1, const Mat& m2, | ||||||
|                                const Mat& m3, int widthScale=1 ) |                                const Mat& m3, int widthScale=1 ) | ||||||
| { | { | ||||||
|  |     CV_Assert(m1.dims <= 2 && m1.size() == m2.size() && m1.size() == m3.size()); | ||||||
|     return (m1.flags & m2.flags & m3.flags & Mat::CONTINUOUS_FLAG) != 0 ? |     return (m1.flags & m2.flags & m3.flags & Mat::CONTINUOUS_FLAG) != 0 ? | ||||||
|         Size(m1.cols*m1.rows*widthScale, 1) : Size(m1.cols*widthScale, m1.rows); |         Size(m1.cols*m1.rows*widthScale, 1) : Size(m1.cols*widthScale, m1.rows); | ||||||
| } | } | ||||||
| @@ -150,6 +153,7 @@ inline Size getContinuousSize( const Mat& m1, const Mat& m2, | |||||||
|                                const Mat& m3, const Mat& m4, |                                const Mat& m3, const Mat& m4, | ||||||
|                                int widthScale=1 ) |                                int widthScale=1 ) | ||||||
| { | { | ||||||
|  |     CV_Assert(m1.dims <= 2 && m1.size() == m2.size() && m1.size() == m3.size() && m1.size() == m4.size()); | ||||||
|     return (m1.flags & m2.flags & m3.flags & m4.flags & Mat::CONTINUOUS_FLAG) != 0 ? |     return (m1.flags & m2.flags & m3.flags & m4.flags & Mat::CONTINUOUS_FLAG) != 0 ? | ||||||
|         Size(m1.cols*m1.rows*widthScale, 1) : Size(m1.cols*widthScale, m1.rows); |         Size(m1.cols*m1.rows*widthScale, 1) : Size(m1.cols*widthScale, m1.rows); | ||||||
| } | } | ||||||
| @@ -158,6 +162,7 @@ inline Size getContinuousSize( const Mat& m1, const Mat& m2, | |||||||
|                                const Mat& m3, const Mat& m4, |                                const Mat& m3, const Mat& m4, | ||||||
|                                const Mat& m5, int widthScale=1 ) |                                const Mat& m5, int widthScale=1 ) | ||||||
| { | { | ||||||
|  |     CV_Assert(m1.dims <= 2 && m1.size() == m2.size() && m1.size() == m3.size() && m1.size() == m4.size() && m1.size() == m5.size()); | ||||||
|     return (m1.flags & m2.flags & m3.flags & m4.flags & m5.flags & Mat::CONTINUOUS_FLAG) != 0 ? |     return (m1.flags & m2.flags & m3.flags & m4.flags & m5.flags & Mat::CONTINUOUS_FLAG) != 0 ? | ||||||
|         Size(m1.cols*m1.rows*widthScale, 1) : Size(m1.cols*widthScale, m1.rows); |         Size(m1.cols*m1.rows*widthScale, 1) : Size(m1.cols*widthScale, m1.rows); | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user