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
cbe132ca
Commit
cbe132ca
authored
Nov 27, 2010
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
several small fixes; added overloaded variant of cv::drawChessboardCorners
parent
ee361824
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
13 deletions
+34
-13
calib3d.hpp
modules/calib3d/include/opencv2/calib3d/calib3d.hpp
+4
-0
calibinit.cpp
modules/calib3d/src/calibinit.cpp
+14
-3
mat.hpp
modules/core/include/opencv2/core/mat.hpp
+1
-1
contours.cpp
modules/imgproc/src/contours.cpp
+9
-6
histogram.cpp
modules/imgproc/src/histogram.cpp
+1
-1
compat.hpp
modules/legacy/include/opencv2/legacy/compat.hpp
+3
-0
lsvmparser.cpp
modules/objdetect/src/lsvmparser.cpp
+2
-2
No files found.
modules/calib3d/include/opencv2/calib3d/calib3d.hpp
View file @
cbe132ca
...
...
@@ -531,6 +531,10 @@ CV_EXPORTS_W void drawChessboardCorners( Mat& image, Size patternSize,
const
Mat
&
corners
,
bool
patternWasFound
);
CV_EXPORTS
void
drawChessboardCorners
(
Mat
&
image
,
Size
patternSize
,
const
vector
<
Point2f
>&
corners
,
bool
patternWasFound
);
enum
{
CALIB_USE_INTRINSIC_GUESS
=
1
,
...
...
modules/calib3d/src/calibinit.cpp
View file @
cbe132ca
...
...
@@ -1916,10 +1916,21 @@ void drawChessboardCorners( Mat& image, Size patternSize,
if
(
corners
.
cols
==
0
||
corners
.
rows
==
0
)
return
;
CvMat
_image
=
image
;
CV_Assert
((
corners
.
cols
==
1
||
corners
.
rows
==
1
)
&&
corners
.
type
()
==
CV_32FC2
&&
corners
.
isContinuous
()
);
int
nelems
=
corners
.
checkVector
(
2
,
CV_32F
,
true
);
CV_Assert
(
nelems
>=
0
);
cvDrawChessboardCorners
(
&
_image
,
patternSize
,
(
CvPoint2D32f
*
)
corners
.
data
,
corners
.
cols
+
corners
.
rows
-
1
,
patternWasFound
);
nelems
,
patternWasFound
);
}
void
drawChessboardCorners
(
Mat
&
image
,
Size
patternSize
,
const
vector
<
Point2f
>&
corners
,
bool
patternWasFound
)
{
if
(
corners
.
empty
()
)
return
;
CvMat
_image
=
image
;
cvDrawChessboardCorners
(
&
_image
,
patternSize
,
(
CvPoint2D32f
*
)
&
corners
[
0
],
(
int
)
corners
.
size
(),
patternWasFound
);
}
}
...
...
modules/core/include/opencv2/core/mat.hpp
View file @
cbe132ca
...
...
@@ -408,7 +408,7 @@ inline Mat::operator CvMat() const
inline
bool
Mat
::
isContinuous
()
const
{
return
(
flags
&
CONTINUOUS_FLAG
)
!=
0
;
}
inline
bool
Mat
::
isSubmatrix
()
const
{
return
(
flags
&
SUBMATRIX_FLAG
)
!=
0
;
}
inline
size_t
Mat
::
elemSize
()
const
{
return
step
.
p
[
dims
-
1
]
;
}
inline
size_t
Mat
::
elemSize
()
const
{
return
dims
>
0
?
step
.
p
[
dims
-
1
]
:
0
;
}
inline
size_t
Mat
::
elemSize1
()
const
{
return
CV_ELEM_SIZE1
(
flags
);
}
inline
int
Mat
::
type
()
const
{
return
CV_MAT_TYPE
(
flags
);
}
inline
int
Mat
::
depth
()
const
{
return
CV_MAT_DEPTH
(
flags
);
}
...
...
modules/imgproc/src/contours.cpp
View file @
cbe132ca
...
...
@@ -1704,8 +1704,9 @@ double cv::matchShapes( const Mat& contour1,
void
cv
::
convexHull
(
const
Mat
&
points
,
vector
<
int
>&
hull
,
bool
clockwise
)
{
CV_Assert
(
points
.
checkVector
(
2
)
>=
0
&&
(
points
.
depth
()
==
CV_32F
||
points
.
depth
()
==
CV_32S
));
hull
.
resize
(
points
.
cols
*
points
.
rows
*
points
.
channels
()
/
2
);
int
nelems
=
points
.
checkVector
(
2
);
CV_Assert
(
nelems
>=
0
&&
(
points
.
depth
()
==
CV_32F
||
points
.
depth
()
==
CV_32S
));
hull
.
resize
(
nelems
);
CvMat
_points
=
Mat
(
points
),
_hull
=
Mat
(
hull
);
cvConvexHull2
(
&
_points
,
&
_hull
,
clockwise
?
CV_CLOCKWISE
:
CV_COUNTER_CLOCKWISE
,
0
);
hull
.
resize
(
_hull
.
cols
+
_hull
.
rows
-
1
);
...
...
@@ -1715,8 +1716,9 @@ void cv::convexHull( const Mat& points, vector<int>& hull, bool clockwise )
void
cv
::
convexHull
(
const
Mat
&
points
,
vector
<
Point
>&
hull
,
bool
clockwise
)
{
CV_Assert
(
points
.
checkVector
(
2
,
CV_32S
)
>=
0
);
hull
.
resize
(
points
.
cols
*
points
.
rows
*
points
.
channels
()
/
2
);
int
nelems
=
points
.
checkVector
(
2
,
CV_32S
);
CV_Assert
(
nelems
>=
0
);
hull
.
resize
(
nelems
);
CvMat
_points
=
Mat
(
points
),
_hull
=
Mat
(
hull
);
cvConvexHull2
(
&
_points
,
&
_hull
,
clockwise
?
CV_CLOCKWISE
:
CV_COUNTER_CLOCKWISE
,
1
);
hull
.
resize
(
_hull
.
cols
+
_hull
.
rows
-
1
);
...
...
@@ -1726,8 +1728,9 @@ void cv::convexHull( const Mat& points,
void
cv
::
convexHull
(
const
Mat
&
points
,
vector
<
Point2f
>&
hull
,
bool
clockwise
)
{
CV_Assert
(
points
.
checkVector
(
2
,
CV_32F
)
>=
0
);
hull
.
resize
(
points
.
cols
*
points
.
rows
*
points
.
channels
()
/
2
);
int
nelems
=
points
.
checkVector
(
2
,
CV_32S
);
CV_Assert
(
nelems
>=
0
);
hull
.
resize
(
nelems
);
CvMat
_points
=
Mat
(
points
),
_hull
=
Mat
(
hull
);
cvConvexHull2
(
&
_points
,
&
_hull
,
clockwise
?
CV_CLOCKWISE
:
CV_COUNTER_CLOCKWISE
,
1
);
hull
.
resize
(
_hull
.
cols
+
_hull
.
rows
-
1
);
...
...
modules/imgproc/src/histogram.cpp
View file @
cbe132ca
...
...
@@ -174,7 +174,7 @@ static void histPrepareImages( const Mat* images, int nimages, const int* channe
uniranges
.
resize
(
dims
*
2
);
for
(
i
=
0
;
i
<
dims
;
i
++
)
{
uniranges
[
i
*
2
]
=
1
;
uniranges
[
i
*
2
]
=
histSize
[
i
]
/
256.
;
uniranges
[
i
*
2
+
1
]
=
0
;
}
}
...
...
modules/legacy/include/opencv2/legacy/compat.hpp
View file @
cbe132ca
...
...
@@ -50,6 +50,9 @@
#ifndef __OPENCV_COMPAT_HPP__
#define __OPENCV_COMPAT_HPP__
#include "opencv2/core/core_c.h"
#include "opencv2/imgproc/types_c.h"
#include <math.h>
#include <string.h>
...
...
modules/objdetect/src/lsvmparser.cpp
View file @
cbe132ca
...
...
@@ -181,7 +181,7 @@ void addFilter(CvLSVMFilterObject *** model, int *last, int *max){
void
parserRFilter
(
FILE
*
xmlf
,
int
p
,
CvLSVMFilterObject
*
model
,
float
*
b
){
int
st
=
0
;
int
sizeX
,
sizeY
;
int
sizeX
=
0
,
sizeY
=
0
;
int
tag
;
int
tagVal
;
char
ch
;
...
...
@@ -432,7 +432,7 @@ void parserD (FILE * xmlf, int /*p*/, CvLSVMFilterObject * model){
void
parserPFilter
(
FILE
*
xmlf
,
int
p
,
int
/*N_path*/
,
CvLSVMFilterObject
*
model
){
int
st
=
0
;
int
sizeX
,
sizeY
;
int
sizeX
=
0
,
sizeY
=
0
;
int
tag
;
int
tagVal
;
char
ch
;
...
...
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