Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
62adc019
Commit
62adc019
authored
Mar 26, 2013
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move cv::Rect_
parent
addf0309
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
73 additions
and
73 deletions
+73
-73
core.hpp
modules/core/include/opencv2/core.hpp
+0
-52
operations.hpp
modules/core/include/opencv2/core/operations.hpp
+0
-4
types.hpp
modules/core/include/opencv2/core/types.hpp
+48
-0
types_c.h
modules/core/include/opencv2/core/types_c.h
+8
-0
array.cpp
modules/core/src/array.cpp
+1
-1
convhull.cpp
modules/imgproc/src/convhull.cpp
+4
-4
shapedescr.cpp
modules/imgproc/src/shapedescr.cpp
+1
-1
oneway.cpp
modules/legacy/src/oneway.cpp
+1
-1
snakes.cpp
modules/legacy/src/snakes.cpp
+2
-2
test_pyrsegmentation.cpp
modules/legacy/test/test_pyrsegmentation.cpp
+1
-1
haar.cpp
modules/objdetect/src/haar.cpp
+4
-4
latentsvmdetector.cpp
modules/objdetect/src/latentsvmdetector.cpp
+2
-2
ts_arrtest.cpp
modules/ts/src/ts_arrtest.cpp
+1
-1
No files found.
modules/core/include/opencv2/core.hpp
View file @
62adc019
...
@@ -524,58 +524,6 @@ typedef Vec<double, 4> Vec4d;
...
@@ -524,58 +524,6 @@ typedef Vec<double, 4> Vec4d;
typedef
Vec
<
double
,
6
>
Vec6d
;
typedef
Vec
<
double
,
6
>
Vec6d
;
//////////////////////////////// Rect_ ////////////////////////////////
/*!
The 2D up-right rectangle class
The class represents a 2D rectangle with coordinates of the specified data type.
Normally, cv::Rect ~ cv::Rect_<int> is used.
*/
template
<
typename
_Tp
>
class
CV_EXPORTS
Rect_
{
public
:
typedef
_Tp
value_type
;
//! various constructors
Rect_
();
Rect_
(
_Tp
_x
,
_Tp
_y
,
_Tp
_width
,
_Tp
_height
);
Rect_
(
const
Rect_
&
r
);
Rect_
(
const
CvRect
&
r
);
Rect_
(
const
Point_
<
_Tp
>&
org
,
const
Size_
<
_Tp
>&
sz
);
Rect_
(
const
Point_
<
_Tp
>&
pt1
,
const
Point_
<
_Tp
>&
pt2
);
Rect_
&
operator
=
(
const
Rect_
&
r
);
//! the top-left corner
Point_
<
_Tp
>
tl
()
const
;
//! the bottom-right corner
Point_
<
_Tp
>
br
()
const
;
//! size (width, height) of the rectangle
Size_
<
_Tp
>
size
()
const
;
//! area (width*height) of the rectangle
_Tp
area
()
const
;
//! conversion to another data type
template
<
typename
_Tp2
>
operator
Rect_
<
_Tp2
>
()
const
;
//! conversion to the old-style CvRect
operator
CvRect
()
const
;
//! checks whether the rectangle contains the point
bool
contains
(
const
Point_
<
_Tp
>&
pt
)
const
;
_Tp
x
,
y
,
width
,
height
;
//< the top-left corner, as well as width and height of the rectangle
};
/*!
\typedef
shorter aliases for the most popular cv::Point_<>, cv::Size_<> and cv::Rect_<> specializations
*/
typedef
Rect_
<
int
>
Rect
;
/*!
/*!
The rotated 2D rectangle.
The rotated 2D rectangle.
...
...
modules/core/include/opencv2/core/operations.hpp
View file @
62adc019
...
@@ -1785,7 +1785,6 @@ template<typename _Tp> static inline bool operator != (const Size_<_Tp>& a, cons
...
@@ -1785,7 +1785,6 @@ template<typename _Tp> static inline bool operator != (const Size_<_Tp>& a, cons
template
<
typename
_Tp
>
inline
Rect_
<
_Tp
>::
Rect_
()
:
x
(
0
),
y
(
0
),
width
(
0
),
height
(
0
)
{}
template
<
typename
_Tp
>
inline
Rect_
<
_Tp
>::
Rect_
()
:
x
(
0
),
y
(
0
),
width
(
0
),
height
(
0
)
{}
template
<
typename
_Tp
>
inline
Rect_
<
_Tp
>::
Rect_
(
_Tp
_x
,
_Tp
_y
,
_Tp
_width
,
_Tp
_height
)
:
x
(
_x
),
y
(
_y
),
width
(
_width
),
height
(
_height
)
{}
template
<
typename
_Tp
>
inline
Rect_
<
_Tp
>::
Rect_
(
_Tp
_x
,
_Tp
_y
,
_Tp
_width
,
_Tp
_height
)
:
x
(
_x
),
y
(
_y
),
width
(
_width
),
height
(
_height
)
{}
template
<
typename
_Tp
>
inline
Rect_
<
_Tp
>::
Rect_
(
const
Rect_
<
_Tp
>&
r
)
:
x
(
r
.
x
),
y
(
r
.
y
),
width
(
r
.
width
),
height
(
r
.
height
)
{}
template
<
typename
_Tp
>
inline
Rect_
<
_Tp
>::
Rect_
(
const
Rect_
<
_Tp
>&
r
)
:
x
(
r
.
x
),
y
(
r
.
y
),
width
(
r
.
width
),
height
(
r
.
height
)
{}
template
<
typename
_Tp
>
inline
Rect_
<
_Tp
>::
Rect_
(
const
CvRect
&
r
)
:
x
((
_Tp
)
r
.
x
),
y
((
_Tp
)
r
.
y
),
width
((
_Tp
)
r
.
width
),
height
((
_Tp
)
r
.
height
)
{}
template
<
typename
_Tp
>
inline
Rect_
<
_Tp
>::
Rect_
(
const
Point_
<
_Tp
>&
org
,
const
Size_
<
_Tp
>&
sz
)
:
template
<
typename
_Tp
>
inline
Rect_
<
_Tp
>::
Rect_
(
const
Point_
<
_Tp
>&
org
,
const
Size_
<
_Tp
>&
sz
)
:
x
(
org
.
x
),
y
(
org
.
y
),
width
(
sz
.
width
),
height
(
sz
.
height
)
{}
x
(
org
.
x
),
y
(
org
.
y
),
width
(
sz
.
width
),
height
(
sz
.
height
)
{}
template
<
typename
_Tp
>
inline
Rect_
<
_Tp
>::
Rect_
(
const
Point_
<
_Tp
>&
pt1
,
const
Point_
<
_Tp
>&
pt2
)
template
<
typename
_Tp
>
inline
Rect_
<
_Tp
>::
Rect_
(
const
Point_
<
_Tp
>&
pt1
,
const
Point_
<
_Tp
>&
pt2
)
...
@@ -1836,9 +1835,6 @@ template<typename _Tp> inline _Tp Rect_<_Tp>::area() const { return width*height
...
@@ -1836,9 +1835,6 @@ template<typename _Tp> inline _Tp Rect_<_Tp>::area() const { return width*height
template
<
typename
_Tp
>
template
<
typename
_Tp2
>
inline
Rect_
<
_Tp
>::
operator
Rect_
<
_Tp2
>
()
const
template
<
typename
_Tp
>
template
<
typename
_Tp2
>
inline
Rect_
<
_Tp
>::
operator
Rect_
<
_Tp2
>
()
const
{
return
Rect_
<
_Tp2
>
(
saturate_cast
<
_Tp2
>
(
x
),
saturate_cast
<
_Tp2
>
(
y
),
{
return
Rect_
<
_Tp2
>
(
saturate_cast
<
_Tp2
>
(
x
),
saturate_cast
<
_Tp2
>
(
y
),
saturate_cast
<
_Tp2
>
(
width
),
saturate_cast
<
_Tp2
>
(
height
));
}
saturate_cast
<
_Tp2
>
(
width
),
saturate_cast
<
_Tp2
>
(
height
));
}
template
<
typename
_Tp
>
inline
Rect_
<
_Tp
>::
operator
CvRect
()
const
{
return
cvRect
(
saturate_cast
<
int
>
(
x
),
saturate_cast
<
int
>
(
y
),
saturate_cast
<
int
>
(
width
),
saturate_cast
<
int
>
(
height
));
}
template
<
typename
_Tp
>
inline
bool
Rect_
<
_Tp
>::
contains
(
const
Point_
<
_Tp
>&
pt
)
const
template
<
typename
_Tp
>
inline
bool
Rect_
<
_Tp
>::
contains
(
const
Point_
<
_Tp
>&
pt
)
const
{
return
x
<=
pt
.
x
&&
pt
.
x
<
x
+
width
&&
y
<=
pt
.
y
&&
pt
.
y
<
y
+
height
;
}
{
return
x
<=
pt
.
x
&&
pt
.
x
<
x
+
width
&&
y
<=
pt
.
y
&&
pt
.
y
<
y
+
height
;
}
...
...
modules/core/include/opencv2/core/types.hpp
View file @
62adc019
...
@@ -284,6 +284,53 @@ typedef Size_<int> Size2i;
...
@@ -284,6 +284,53 @@ typedef Size_<int> Size2i;
typedef
Size_
<
float
>
Size2f
;
typedef
Size_
<
float
>
Size2f
;
typedef
Size2i
Size
;
typedef
Size2i
Size
;
//////////////////////////////// Rect_ ////////////////////////////////
/*!
The 2D up-right rectangle class
The class represents a 2D rectangle with coordinates of the specified data type.
Normally, cv::Rect ~ cv::Rect_<int> is used.
*/
template
<
typename
_Tp
>
class
CV_EXPORTS
Rect_
{
public
:
typedef
_Tp
value_type
;
//! various constructors
Rect_
();
Rect_
(
_Tp
_x
,
_Tp
_y
,
_Tp
_width
,
_Tp
_height
);
Rect_
(
const
Rect_
&
r
);
Rect_
(
const
Point_
<
_Tp
>&
org
,
const
Size_
<
_Tp
>&
sz
);
Rect_
(
const
Point_
<
_Tp
>&
pt1
,
const
Point_
<
_Tp
>&
pt2
);
Rect_
&
operator
=
(
const
Rect_
&
r
);
//! the top-left corner
Point_
<
_Tp
>
tl
()
const
;
//! the bottom-right corner
Point_
<
_Tp
>
br
()
const
;
//! size (width, height) of the rectangle
Size_
<
_Tp
>
size
()
const
;
//! area (width*height) of the rectangle
_Tp
area
()
const
;
//! conversion to another data type
template
<
typename
_Tp2
>
operator
Rect_
<
_Tp2
>
()
const
;
//! checks whether the rectangle contains the point
bool
contains
(
const
Point_
<
_Tp
>&
pt
)
const
;
_Tp
x
,
y
,
width
,
height
;
//< the top-left corner, as well as width and height of the rectangle
};
/*!
\typedef
*/
typedef
Rect_
<
int
>
Rect
;
}
// cv
}
// cv
#endif //__OPENCV_CORE_TYPES_HPP__
#endif //__OPENCV_CORE_TYPES_HPP__
\ No newline at end of file
modules/core/include/opencv2/core/types_c.h
View file @
62adc019
...
@@ -685,6 +685,14 @@ typedef struct CvRect
...
@@ -685,6 +685,14 @@ typedef struct CvRect
int
y
;
int
y
;
int
width
;
int
width
;
int
height
;
int
height
;
#ifdef __cplusplus
CvRect
(
int
_x
=
0
,
int
_y
=
0
,
int
w
=
0
,
int
h
=
0
)
:
x
(
_x
),
y
(
_y
),
width
(
w
),
height
(
h
)
{}
template
<
typename
_Tp
>
CvRect
(
const
cv
::
Rect_
<
_Tp
>&
r
)
:
x
(
cv
::
saturate_cast
<
int
>
(
r
.
x
)),
y
(
cv
::
saturate_cast
<
int
>
(
r
.
y
)),
width
(
cv
::
saturate_cast
<
int
>
(
r
.
width
)),
height
(
cv
::
saturate_cast
<
int
>
(
r
.
height
))
{}
template
<
typename
_Tp
>
operator
cv
::
Rect_
<
_Tp
>
()
const
{
return
cv
::
Rect_
<
_Tp
>
((
_Tp
)
x
,
(
_Tp
)
y
,
(
_Tp
)
width
,
(
_Tp
)
height
);
}
#endif
}
}
CvRect
;
CvRect
;
...
...
modules/core/src/array.cpp
View file @
62adc019
...
@@ -3052,7 +3052,7 @@ cvResetImageROI( IplImage* image )
...
@@ -3052,7 +3052,7 @@ cvResetImageROI( IplImage* image )
CV_IMPL
CvRect
CV_IMPL
CvRect
cvGetImageROI
(
const
IplImage
*
img
)
cvGetImageROI
(
const
IplImage
*
img
)
{
{
CvRect
rect
=
{
0
,
0
,
0
,
0
}
;
CvRect
rect
;
if
(
!
img
)
if
(
!
img
)
CV_Error
(
CV_StsNullPtr
,
"Null pointer to image"
);
CV_Error
(
CV_StsNullPtr
,
"Null pointer to image"
);
...
...
modules/imgproc/src/convhull.cpp
View file @
62adc019
...
@@ -400,7 +400,7 @@ cvConvexHull2( const CvArr* array, void* hull_storage,
...
@@ -400,7 +400,7 @@ cvConvexHull2( const CvArr* array, void* hull_storage,
CvMat
*
mat
=
0
;
CvMat
*
mat
=
0
;
CvContour
contour_header
;
CvContour
contour_header
;
union
{
CvContour
c
;
CvSeq
s
;
}
hull_header
;
CvSeq
hull_header
;
CvSeqBlock
block
,
hullblock
;
CvSeqBlock
block
,
hullblock
;
CvSeq
*
ptseq
=
0
;
CvSeq
*
ptseq
=
0
;
CvSeq
*
hullseq
=
0
;
CvSeq
*
hullseq
=
0
;
...
@@ -456,7 +456,7 @@ cvConvexHull2( const CvArr* array, void* hull_storage,
...
@@ -456,7 +456,7 @@ cvConvexHull2( const CvArr* array, void* hull_storage,
hullseq
=
cvMakeSeqHeaderForArray
(
hullseq
=
cvMakeSeqHeaderForArray
(
CV_SEQ_KIND_CURVE
|
CV_MAT_TYPE
(
mat
->
type
)
|
CV_SEQ_FLAG_CLOSED
,
CV_SEQ_KIND_CURVE
|
CV_MAT_TYPE
(
mat
->
type
)
|
CV_SEQ_FLAG_CLOSED
,
sizeof
(
contour_header
),
CV_ELEM_SIZE
(
mat
->
type
),
mat
->
data
.
ptr
,
sizeof
(
contour_header
),
CV_ELEM_SIZE
(
mat
->
type
),
mat
->
data
.
ptr
,
mat
->
cols
+
mat
->
rows
-
1
,
&
hull_header
.
s
,
&
hullblock
);
mat
->
cols
+
mat
->
rows
-
1
,
&
hull_header
,
&
hullblock
);
cvClearSeq
(
hullseq
);
cvClearSeq
(
hullseq
);
}
}
...
@@ -522,7 +522,7 @@ CV_IMPL CvSeq* cvConvexityDefects( const CvArr* array,
...
@@ -522,7 +522,7 @@ CV_IMPL CvSeq* cvConvexityDefects( const CvArr* array,
int
rev_orientation
;
int
rev_orientation
;
CvContour
contour_header
;
CvContour
contour_header
;
union
{
CvContour
c
;
CvSeq
s
;
}
hull_header
;
CvSeq
hull_header
;
CvSeqBlock
block
,
hullblock
;
CvSeqBlock
block
,
hullblock
;
CvSeq
*
ptseq
=
(
CvSeq
*
)
array
,
*
hull
=
(
CvSeq
*
)
hullarray
;
CvSeq
*
ptseq
=
(
CvSeq
*
)
array
,
*
hull
=
(
CvSeq
*
)
hullarray
;
...
@@ -575,7 +575,7 @@ CV_IMPL CvSeq* cvConvexityDefects( const CvArr* array,
...
@@ -575,7 +575,7 @@ CV_IMPL CvSeq* cvConvexityDefects( const CvArr* array,
hull
=
cvMakeSeqHeaderForArray
(
hull
=
cvMakeSeqHeaderForArray
(
CV_SEQ_KIND_CURVE
|
CV_MAT_TYPE
(
mat
->
type
)
|
CV_SEQ_FLAG_CLOSED
,
CV_SEQ_KIND_CURVE
|
CV_MAT_TYPE
(
mat
->
type
)
|
CV_SEQ_FLAG_CLOSED
,
sizeof
(
CvContour
),
CV_ELEM_SIZE
(
mat
->
type
),
mat
->
data
.
ptr
,
sizeof
(
CvContour
),
CV_ELEM_SIZE
(
mat
->
type
),
mat
->
data
.
ptr
,
mat
->
cols
+
mat
->
rows
-
1
,
&
hull_header
.
s
,
&
hullblock
);
mat
->
cols
+
mat
->
rows
-
1
,
&
hull_header
,
&
hullblock
);
}
}
is_index
=
CV_SEQ_ELTYPE
(
hull
)
==
CV_SEQ_ELTYPE_INDEX
;
is_index
=
CV_SEQ_ELTYPE
(
hull
)
==
CV_SEQ_ELTYPE_INDEX
;
...
...
modules/imgproc/src/shapedescr.cpp
View file @
62adc019
...
@@ -1046,7 +1046,7 @@ cvFitEllipse2( const CvArr* array )
...
@@ -1046,7 +1046,7 @@ cvFitEllipse2( const CvArr* array )
CV_IMPL
CvRect
CV_IMPL
CvRect
cvBoundingRect
(
CvArr
*
array
,
int
update
)
cvBoundingRect
(
CvArr
*
array
,
int
update
)
{
{
CvRect
rect
=
{
0
,
0
,
0
,
0
}
;
CvRect
rect
;
CvContour
contour_header
;
CvContour
contour_header
;
CvSeq
*
ptseq
=
0
;
CvSeq
*
ptseq
=
0
;
CvSeqBlock
block
;
CvSeqBlock
block
;
...
...
modules/legacy/src/oneway.cpp
View file @
62adc019
...
@@ -529,7 +529,7 @@ namespace cv{
...
@@ -529,7 +529,7 @@ namespace cv{
}
}
return
;
return
;
}
}
CvRect
roi
=
{
0
,
0
,
0
,
0
}
;
CvRect
roi
;
if
(
!
CV_IS_MAT
(
patch
))
if
(
!
CV_IS_MAT
(
patch
))
{
{
roi
=
cvGetImageROI
((
IplImage
*
)
patch
);
roi
=
cvGetImageROI
((
IplImage
*
)
patch
);
...
...
modules/legacy/src/snakes.cpp
View file @
62adc019
...
@@ -292,8 +292,8 @@ icvSnake8uC1R( unsigned char *src,
...
@@ -292,8 +292,8 @@ icvSnake8uC1R( unsigned char *src,
int
leftshift
=
x
?
1
:
0
;
int
leftshift
=
x
?
1
:
0
;
int
bottomshift
=
MIN
(
1
,
roi
.
height
-
(
y
+
1
)
*
WTILE_SIZE
);
int
bottomshift
=
MIN
(
1
,
roi
.
height
-
(
y
+
1
)
*
WTILE_SIZE
);
int
rightshift
=
MIN
(
1
,
roi
.
width
-
(
x
+
1
)
*
WTILE_SIZE
);
int
rightshift
=
MIN
(
1
,
roi
.
width
-
(
x
+
1
)
*
WTILE_SIZE
);
CvRect
g_roi
=
{
x
*
WTILE_SIZE
-
leftshift
,
y
*
WTILE_SIZE
-
upshift
,
CvRect
g_roi
(
x
*
WTILE_SIZE
-
leftshift
,
y
*
WTILE_SIZE
-
upshift
,
leftshift
+
WTILE_SIZE
+
rightshift
,
upshift
+
WTILE_SIZE
+
bottomshift
}
;
leftshift
+
WTILE_SIZE
+
rightshift
,
upshift
+
WTILE_SIZE
+
bottomshift
)
;
CvMat
_src1
;
CvMat
_src1
;
cvGetSubArr
(
&
_src
,
&
_src1
,
g_roi
);
cvGetSubArr
(
&
_src
,
&
_src1
,
g_roi
);
...
...
modules/legacy/test/test_pyrsegmentation.cpp
View file @
62adc019
...
@@ -71,7 +71,7 @@ void CV_PyrSegmentationTest::run( int /*start_from*/ )
...
@@ -71,7 +71,7 @@ void CV_PyrSegmentationTest::run( int /*start_from*/ )
CvPoint
*
cp
=
_cp
;
CvPoint
*
cp
=
_cp
;
CvPoint
*
cp2
=
_cp2
;
CvPoint
*
cp2
=
_cp2
;
CvConnectedComp
*
dst_comp
[
3
];
CvConnectedComp
*
dst_comp
[
3
];
CvRect
rect
[
3
]
=
{
{
50
,
50
,
21
,
21
},
{
0
,
0
,
128
,
128
},
{
33
,
33
,
11
,
11
}
};
CvRect
rect
[
3
]
=
{
CvRect
(
50
,
50
,
21
,
21
),
CvRect
(
0
,
0
,
128
,
128
),
CvRect
(
33
,
33
,
11
,
11
)
};
double
a
[
3
]
=
{
441.0
,
15822.0
,
121.0
};
double
a
[
3
]
=
{
441.0
,
15822.0
,
121.0
};
/* ippiPoint cp3[] ={130,130, 150,130, 150,150, 130,150}; */
/* ippiPoint cp3[] ={130,130, 150,130, 150,150, 130,150}; */
...
...
modules/objdetect/src/haar.cpp
View file @
62adc019
...
@@ -1574,9 +1574,9 @@ cvHaarDetectObjectsForROC( const CvArr* _img,
...
@@ -1574,9 +1574,9 @@ cvHaarDetectObjectsForROC( const CvArr* _img,
CvSize
sz
(
cvRound
(
img
->
cols
/
factor
),
cvRound
(
img
->
rows
/
factor
));
CvSize
sz
(
cvRound
(
img
->
cols
/
factor
),
cvRound
(
img
->
rows
/
factor
));
CvSize
sz1
(
sz
.
width
-
winSize0
.
width
+
1
,
sz
.
height
-
winSize0
.
height
+
1
);
CvSize
sz1
(
sz
.
width
-
winSize0
.
width
+
1
,
sz
.
height
-
winSize0
.
height
+
1
);
CvRect
equRect
=
{
icv_object_win_border
,
icv_object_win_border
,
CvRect
equRect
(
icv_object_win_border
,
icv_object_win_border
,
winSize0
.
width
-
icv_object_win_border
*
2
,
winSize0
.
width
-
icv_object_win_border
*
2
,
winSize0
.
height
-
icv_object_win_border
*
2
}
;
winSize0
.
height
-
icv_object_win_border
*
2
)
;
CvMat
img1
,
sum1
,
sqsum1
,
norm1
,
tilted1
,
mask1
;
CvMat
img1
,
sum1
,
sqsum1
,
norm1
,
tilted1
,
mask1
;
CvMat
*
_tilted
=
0
;
CvMat
*
_tilted
=
0
;
...
@@ -1658,7 +1658,7 @@ cvHaarDetectObjectsForROC( const CvArr* _img,
...
@@ -1658,7 +1658,7 @@ cvHaarDetectObjectsForROC( const CvArr* _img,
const
double
ystep
=
std
::
max
(
2.
,
factor
);
const
double
ystep
=
std
::
max
(
2.
,
factor
);
CvSize
winSize
(
cvRound
(
cascade
->
orig_window_size
.
width
*
factor
),
CvSize
winSize
(
cvRound
(
cascade
->
orig_window_size
.
width
*
factor
),
cvRound
(
cascade
->
orig_window_size
.
height
*
factor
));
cvRound
(
cascade
->
orig_window_size
.
height
*
factor
));
CvRect
equRect
=
{
0
,
0
,
0
,
0
}
;
CvRect
equRect
;
int
*
p
[
4
]
=
{
0
,
0
,
0
,
0
};
int
*
p
[
4
]
=
{
0
,
0
,
0
,
0
};
int
*
pq
[
4
]
=
{
0
,
0
,
0
,
0
};
int
*
pq
[
4
]
=
{
0
,
0
,
0
,
0
};
int
startX
=
0
,
startY
=
0
;
int
startX
=
0
,
startY
=
0
;
...
@@ -1775,7 +1775,7 @@ cvHaarDetectObjectsForROC( const CvArr* _img,
...
@@ -1775,7 +1775,7 @@ cvHaarDetectObjectsForROC( const CvArr* _img,
if
(
findBiggestObject
&&
rectList
.
size
()
)
if
(
findBiggestObject
&&
rectList
.
size
()
)
{
{
CvAvgComp
result_comp
=
{
{
0
,
0
,
0
,
0
}
,
0
};
CvAvgComp
result_comp
=
{
CvRect
()
,
0
};
for
(
size_t
i
=
0
;
i
<
rectList
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
rectList
.
size
();
i
++
)
{
{
...
...
modules/objdetect/src/latentsvmdetector.cpp
View file @
62adc019
...
@@ -124,9 +124,9 @@ CvSeq* cvLatentSvmDetectObjects(IplImage* image,
...
@@ -124,9 +124,9 @@ CvSeq* cvLatentSvmDetectObjects(IplImage* image,
for
(
int
i
=
0
;
i
<
numBoxesOut
;
i
++
)
for
(
int
i
=
0
;
i
<
numBoxesOut
;
i
++
)
{
{
CvObjectDetection
detection
=
{
{
0
,
0
,
0
,
0
}
,
0
};
CvObjectDetection
detection
=
{
CvRect
()
,
0
};
detection
.
score
=
scoreOut
[
i
];
detection
.
score
=
scoreOut
[
i
];
CvRect
bounding_box
=
{
0
,
0
,
0
,
0
}
;
CvRect
bounding_box
;
bounding_box
.
x
=
pointsOut
[
i
].
x
;
bounding_box
.
x
=
pointsOut
[
i
].
x
;
bounding_box
.
y
=
pointsOut
[
i
].
y
;
bounding_box
.
y
=
pointsOut
[
i
].
y
;
bounding_box
.
width
=
oppPointsOut
[
i
].
x
-
pointsOut
[
i
].
x
;
bounding_box
.
width
=
oppPointsOut
[
i
].
x
-
pointsOut
[
i
].
x
;
...
...
modules/ts/src/ts_arrtest.cpp
View file @
62adc019
...
@@ -158,7 +158,7 @@ int ArrayTest::prepare_test_case( int test_case_idx )
...
@@ -158,7 +158,7 @@ int ArrayTest::prepare_test_case( int test_case_idx )
unsigned
t
=
randInt
(
rng
);
unsigned
t
=
randInt
(
rng
);
bool
create_mask
=
true
,
use_roi
=
false
;
bool
create_mask
=
true
,
use_roi
=
false
;
CvSize
size
=
sizes
[
i
][
j
],
whole_size
=
size
;
CvSize
size
=
sizes
[
i
][
j
],
whole_size
=
size
;
CvRect
roi
=
{
0
,
0
,
0
,
0
}
;
CvRect
roi
;
is_image
=
!
cvmat_allowed
?
true
:
iplimage_allowed
?
(
t
&
1
)
!=
0
:
false
;
is_image
=
!
cvmat_allowed
?
true
:
iplimage_allowed
?
(
t
&
1
)
!=
0
:
false
;
create_mask
=
(
t
&
6
)
==
0
;
// ~ each of 3 tests will use mask
create_mask
=
(
t
&
6
)
==
0
;
// ~ each of 3 tests will use mask
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment