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
a51a8ad5
Commit
a51a8ad5
authored
Aug 14, 2011
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed tickets #1301, #1303, #1305
parent
4c74b28e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
21 deletions
+38
-21
matchers.cpp
modules/features2d/src/matchers.cpp
+2
-2
miniflann.hpp
modules/flann/include/opencv2/flann/miniflann.hpp
+2
-2
miniflann.cpp
modules/flann/src/miniflann.cpp
+6
-3
objdetect.hpp
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
+5
-5
hog.cpp
modules/objdetect/src/hog.cpp
+2
-2
cv2.cpp
modules/python/src2/cv2.cpp
+18
-4
gen2.py
modules/python/src2/gen2.py
+3
-3
No files found.
modules/features2d/src/matchers.cpp
View file @
a51a8ad5
...
...
@@ -616,7 +616,7 @@ void FlannBasedMatcher::read( const FileNode& fn)
indexParams
->
setBool
(
name
,
(
int
)
ip
[
i
][
"value"
]);
break
;
case
CV_MAKETYPE
(
CV_USRTYPE1
,
3
):
indexParams
->
setAlgorithm
(
name
,
(
int
)
ip
[
i
][
"value"
]);
indexParams
->
setAlgorithm
((
int
)
ip
[
i
][
"value"
]);
break
;
};
}
...
...
@@ -655,7 +655,7 @@ void FlannBasedMatcher::read( const FileNode& fn)
searchParams
->
setBool
(
name
,
(
int
)
ip
[
i
][
"value"
]);
break
;
case
CV_MAKETYPE
(
CV_USRTYPE1
,
3
):
searchParams
->
setAlgorithm
(
name
,
(
int
)
ip
[
i
][
"value"
]);
searchParams
->
setAlgorithm
((
int
)
ip
[
i
][
"value"
]);
break
;
};
}
...
...
modules/flann/include/opencv2/flann/miniflann.hpp
View file @
a51a8ad5
...
...
@@ -53,8 +53,8 @@ namespace cv
namespace
flann
{
using
namespace
cvflann
;
using
namespace
cvflann
;
struct
CV_EXPORTS
IndexParams
{
...
...
@@ -70,7 +70,7 @@ struct CV_EXPORTS IndexParams
void
setDouble
(
const
std
::
string
&
key
,
double
value
);
void
setFloat
(
const
std
::
string
&
key
,
float
value
);
void
setBool
(
const
std
::
string
&
key
,
bool
value
);
void
setAlgorithm
(
const
std
::
string
&
key
,
int
value
);
void
setAlgorithm
(
int
value
);
void
getAll
(
std
::
vector
<
std
::
string
>&
names
,
std
::
vector
<
int
>&
types
,
...
...
modules/flann/src/miniflann.cpp
View file @
a51a8ad5
...
...
@@ -81,9 +81,9 @@ void IndexParams::setBool(const std::string& key, bool value)
setParam
(
*
this
,
key
,
value
);
}
void
IndexParams
::
setAlgorithm
(
const
std
::
string
&
key
,
int
value
)
void
IndexParams
::
setAlgorithm
(
int
value
)
{
setParam
(
*
this
,
key
,
(
cvflann
::
flann_algorithm_t
)
value
);
setParam
(
*
this
,
"algorithm"
,
(
cvflann
::
flann_algorithm_t
)
value
);
}
void
IndexParams
::
getAll
(
std
::
vector
<
std
::
string
>&
names
,
...
...
@@ -293,7 +293,10 @@ template<typename Distance, typename IndexType> void
buildIndex_
(
void
*&
index
,
const
Mat
&
data
,
const
IndexParams
&
params
,
const
Distance
&
dist
=
Distance
())
{
typedef
typename
Distance
::
ElementType
ElementType
;
CV_Assert
(
DataType
<
ElementType
>::
type
==
data
.
type
()
&&
data
.
isContinuous
());
if
(
DataType
<
ElementType
>::
type
!=
data
.
type
())
CV_Error_
(
CV_StsUnsupportedFormat
,
(
"type=%d
\n
"
,
data
.
type
()));
if
(
!
data
.
isContinuous
())
CV_Error
(
CV_StsBadArg
,
"Only continuous arrays are supported"
);
::
cvflann
::
Matrix
<
ElementType
>
dataset
((
ElementType
*
)
data
.
data
,
data
.
rows
,
data
.
cols
);
IndexType
*
_index
=
new
IndexType
(
dataset
,
get_params
(
params
),
dist
);
...
...
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
View file @
a51a8ad5
...
...
@@ -286,8 +286,9 @@ namespace cv
///////////////////////////// Object Detection ////////////////////////////
CV_EXPORTS_W
void
groupRectangles
(
CV_IN_OUT
vector
<
Rect
>&
rectList
,
int
groupThreshold
,
double
eps
=
0.2
);
CV_EXPORTS_W
void
groupRectangles
(
CV_IN_OUT
vector
<
Rect
>&
rectList
,
CV_OUT
vector
<
int
>&
weights
,
int
groupThreshold
,
double
eps
=
0.2
);
CV_EXPORTS
void
groupRectangles
(
CV_OUT
CV_IN_OUT
vector
<
Rect
>&
rectList
,
int
groupThreshold
,
double
eps
=
0.2
);
CV_EXPORTS_W
void
groupRectangles
(
CV_OUT
CV_IN_OUT
vector
<
Rect
>&
rectList
,
CV_OUT
vector
<
int
>&
weights
,
int
groupThreshold
,
double
eps
=
0.2
);
CV_EXPORTS
void
groupRectangles
(
vector
<
Rect
>&
rectList
,
int
groupThreshold
,
double
eps
,
vector
<
int
>*
weights
,
vector
<
double
>*
levelWeights
);
CV_EXPORTS
void
groupRectangles
(
vector
<
Rect
>&
rectList
,
vector
<
int
>&
rejectLevels
,
vector
<
double
>&
levelWeights
,
int
groupThreshold
,
double
eps
=
0.2
);
CV_EXPORTS
void
groupRectangles_meanshift
(
vector
<
Rect
>&
rectList
,
vector
<
double
>&
foundWeights
,
vector
<
double
>&
foundScales
,
...
...
@@ -430,8 +431,7 @@ protected:
Ptr
<
CvHaarClassifierCascade
>
oldCascade
;
};
void
CV_EXPORTS_W
groupRectangles
(
vector
<
Rect
>&
rectList
,
int
groupThreshold
,
double
eps
,
vector
<
int
>*
weights
,
vector
<
double
>*
levelWeights
);
//////////////// HOG (Histogram-of-Oriented-Gradients) Descriptor and Object Detector //////////////
struct
CV_EXPORTS_W
HOGDescriptor
...
...
@@ -473,7 +473,7 @@ public:
CV_WRAP
bool
checkDetectorSize
()
const
;
CV_WRAP
double
getWinSigma
()
const
;
CV_WRAP
virtual
void
setSVMDetector
(
const
vector
<
float
>&
_svmdetector
);
CV_WRAP
virtual
void
setSVMDetector
(
InputArray
_svmdetector
);
virtual
bool
read
(
FileNode
&
fn
);
virtual
void
write
(
FileStorage
&
fs
,
const
String
&
objname
)
const
;
...
...
modules/objdetect/src/hog.cpp
View file @
a51a8ad5
...
...
@@ -83,9 +83,9 @@ bool HOGDescriptor::checkDetectorSize() const
detectorSize
==
descriptorSize
+
1
;
}
void
HOGDescriptor
::
setSVMDetector
(
const
vector
<
float
>&
_svmDetector
)
void
HOGDescriptor
::
setSVMDetector
(
InputArray
_svmDetector
)
{
svmDetector
=
_svmDetector
;
_svmDetector
.
getMat
().
convertTo
(
svmDetector
,
CV_32F
)
;
CV_Assert
(
checkDetectorSize
()
);
}
...
...
modules/python/src2/cv2.cpp
View file @
a51a8ad5
...
...
@@ -762,11 +762,25 @@ static bool pyopencv_to(PyObject *o, cv::flann::IndexParams& p, const char *name
break
;
std
::
string
k
=
PyString_AsString
(
key
);
if
(
PyString_Check
(
item
)
)
p
.
setString
(
k
,
PyString_AsString
(
item
));
{
const
char
*
value
=
PyString_AsString
(
item
);
p
.
setString
(
k
,
value
);
}
else
if
(
PyBool_Check
(
item
)
)
p
.
setBool
(
k
,
item
==
Py_True
);
else
if
(
PyInt_Check
(
item
)
)
p
.
setInt
(
k
,
PyInt_AsLong
(
item
));
{
int
value
=
(
int
)
PyInt_AsLong
(
item
);
if
(
strcmp
(
k
.
c_str
(),
"algorithm"
)
==
0
)
p
.
setAlgorithm
(
value
);
else
p
.
setInt
(
k
,
value
);
}
else
if
(
PyFloat_Check
(
item
)
)
p
.
setDouble
(
k
,
PyFloat_AsDouble
(
item
));
{
double
value
=
PyFloat_AsDouble
(
item
);
p
.
setDouble
(
k
,
value
);
}
else
break
;
}
...
...
@@ -780,7 +794,7 @@ static bool pyopencv_to(PyObject *o, cv::flann::IndexParams& p, const char *name
static
bool
pyopencv_to
(
PyObject
*
o
,
cvflann
::
flann_distance_t
&
dist
,
const
char
*
name
=
"<unknown>"
)
{
int
d
=
0
;
int
d
=
(
int
)
dist
;
bool
ok
=
pyopencv_to
(
o
,
d
,
name
);
dist
=
(
cvflann
::
flann_distance_t
)
d
;
return
ok
;
...
...
modules/python/src2/gen2.py
View file @
a51a8ad5
...
...
@@ -357,9 +357,9 @@ class FuncVariant(object):
continue
if
a
.
returnarg
:
outlist
.
append
((
a
.
name
,
argno
))
if
not
a
.
inputarg
or
a
.
returnarg
:
if
a
.
isbig
():
outarr_list
.
append
((
a
.
name
,
argno
))
if
(
not
a
.
inputarg
or
a
.
returnarg
)
and
a
.
isbig
()
:
outarr_list
.
append
((
a
.
name
,
argno
))
if
not
a
.
inputarg
:
continue
if
not
a
.
defval
:
arglist
.
append
((
a
.
name
,
argno
))
...
...
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