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
8ebff41c
Commit
8ebff41c
authored
May 07, 2011
by
Anatoly Baksheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more warnings fixed. +some warnings in examples
parent
927dccb4
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
22 additions
and
18 deletions
+22
-18
calibinit.cpp
modules/calib3d/src/calibinit.cpp
+2
-2
svm.cpp
modules/ml/src/svm.cpp
+1
-0
adaptiveskindetector.cpp
samples/c/adaptiveskindetector.cpp
+1
-1
find_obj_ferns.cpp
samples/c/find_obj_ferns.cpp
+1
-1
one_way_sample.cpp
samples/c/one_way_sample.cpp
+1
-1
polar_transforms.c
samples/c/polar_transforms.c
+2
-0
pyramid_segmentation.c
samples/c/pyramid_segmentation.c
+1
-0
bagofwords_classification.cpp
samples/cpp/bagofwords_classification.cpp
+4
-4
kinect_maps.cpp
samples/cpp/kinect_maps.cpp
+2
-2
letter_recog.cpp
samples/cpp/letter_recog.cpp
+5
-5
multicascadeclassifier.cpp
samples/cpp/multicascadeclassifier.cpp
+1
-1
points_classifier.cpp
samples/cpp/points_classifier.cpp
+1
-1
No files found.
modules/calib3d/src/calibinit.cpp
View file @
8ebff41c
...
...
@@ -1929,8 +1929,8 @@ void cv::drawChessboardCorners( InputOutputArray _image, Size patternSize,
bool
cv
::
findCirclesGrid
(
const
InputArray
&
_image
,
Size
patternSize
,
OutputArray
_centers
,
int
flags
,
const
Ptr
<
FeatureDetector
>
&
blobDetector
)
{
bool
isAsymmetricGrid
=
(
bool
)(
flags
&
CALIB_CB_ASYMMETRIC_GRID
)
;
bool
isSymmetricGrid
=
(
bool
)(
flags
&
CALIB_CB_SYMMETRIC_GRID
)
;
bool
isAsymmetricGrid
=
(
flags
&
CALIB_CB_ASYMMETRIC_GRID
)
?
true
:
false
;
bool
isSymmetricGrid
=
(
flags
&
CALIB_CB_SYMMETRIC_GRID
)
?
true
:
false
;
CV_Assert
(
isAsymmetricGrid
^
isSymmetricGrid
);
Mat
image
=
_image
.
getMat
();
...
...
modules/ml/src/svm.cpp
View file @
8ebff41c
...
...
@@ -2001,6 +2001,7 @@ float CvSVM::predict( const float* row_sample, int row_len, bool returnDFVal ) c
int
var_count
=
get_var_count
();
assert
(
row_len
==
var_count
);
(
void
)
row_len
;
int
class_count
=
class_labels
?
class_labels
->
cols
:
params
.
svm_type
==
ONE_CLASS
?
1
:
0
;
...
...
samples/c/adaptiveskindetector.cpp
View file @
8ebff41c
...
...
@@ -180,7 +180,7 @@ bool ASDFrameSequencer::isOpen()
return
false
;
};
void
ASDFrameSequencer
::
getFrameCaption
(
char
*
caption
)
{
void
ASDFrameSequencer
::
getFrameCaption
(
char
*
/*caption*/
)
{
return
;
};
...
...
samples/c/find_obj_ferns.cpp
View file @
8ebff41c
...
...
@@ -120,7 +120,7 @@ int main(int argc, char** argv)
for
(
i
=
0
;
i
<
(
int
)
pairs
.
size
();
i
+=
2
)
{
line
(
correspond
,
objKeypoints
[
pairs
[
i
]].
pt
,
imgKeypoints
[
pairs
[
i
+
1
]].
pt
+
Point2f
(
0
,
object
.
rows
),
imgKeypoints
[
pairs
[
i
+
1
]].
pt
+
Point2f
(
0
,
(
float
)
object
.
rows
),
Scalar
(
0
,
255
,
0
)
);
}
...
...
samples/c/one_way_sample.cpp
View file @
8ebff41c
...
...
@@ -108,7 +108,7 @@ IplImage* DrawCorrespondences(IplImage* img1, const vector<KeyPoint>& features1,
for
(
size_t
i
=
0
;
i
<
features2
.
size
();
i
++
)
{
CvPoint
pt
=
cvPoint
(
features2
[
i
].
pt
.
x
+
img1
->
width
,
features2
[
i
].
pt
.
y
);
CvPoint
pt
=
cvPoint
(
(
int
)
features2
[
i
].
pt
.
x
+
img1
->
width
,
(
int
)
features2
[
i
].
pt
.
y
);
cvCircle
(
img_corr
,
pt
,
3
,
CV_RGB
(
255
,
0
,
0
));
cvLine
(
img_corr
,
features1
[
desc_idx
[
i
]].
pt
,
pt
,
CV_RGB
(
0
,
255
,
0
));
}
...
...
samples/c/polar_transforms.c
View file @
8ebff41c
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include <ctype.h>
#include <stdio.h>
...
...
samples/c/pyramid_segmentation.c
View file @
8ebff41c
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include <stdio.h>
void
help
()
...
...
samples/cpp/bagofwords_classification.cpp
View file @
8ebff41c
...
...
@@ -855,7 +855,7 @@ void VocData::calcPrecRecall_impl(const vector<char>& ground_truth, const vector
{
recall_norm
=
recall_normalization
;
}
else
{
recall_norm
=
(
int
)
std
::
count_if
(
ground_truth
.
begin
(),
ground_truth
.
end
(),
std
::
bind2nd
(
std
::
equal_to
<
bool
>
(),
true
));
recall_norm
=
(
int
)
std
::
count_if
(
ground_truth
.
begin
(),
ground_truth
.
end
(),
std
::
bind2nd
(
std
::
equal_to
<
char
>
(),(
char
)
1
));
}
ap
=
0
;
...
...
@@ -985,7 +985,7 @@ void VocData::calcClassifierConfMatRow(const string& obj_class, const vector<Obd
/* in order to calculate the total number of relevant images for normalization of recall
it's necessary to extract the ground truth for the images under consideration */
getClassifierGroundTruth
(
obj_class
,
images
,
ground_truth
);
total_relevant
=
std
::
count_if
(
ground_truth
.
begin
(),
ground_truth
.
end
(),
std
::
bind2nd
(
std
::
equal_to
<
bool
>
(),
true
));
total_relevant
=
std
::
count_if
(
ground_truth
.
begin
(),
ground_truth
.
end
(),
std
::
bind2nd
(
std
::
equal_to
<
char
>
(),(
char
)
1
));
}
/* iterate through images */
...
...
@@ -2292,8 +2292,8 @@ void removeBowImageDescriptorsByCount( vector<ObdImage>& images, vector<Mat> bow
const
SVMTrainParamsExt
&
svmParamsExt
,
int
descsToDelete
)
{
RNG
&
rng
=
theRNG
();
int
pos_ex
=
std
::
count
(
objectPresent
.
begin
(),
objectPresent
.
end
(),
true
);
int
neg_ex
=
std
::
count
(
objectPresent
.
begin
(),
objectPresent
.
end
(),
false
);
int
pos_ex
=
std
::
count
(
objectPresent
.
begin
(),
objectPresent
.
end
(),
(
char
)
1
);
int
neg_ex
=
std
::
count
(
objectPresent
.
begin
(),
objectPresent
.
end
(),
(
char
)
0
);
while
(
descsToDelete
!=
0
)
{
...
...
samples/cpp/kinect_maps.cpp
View file @
8ebff41c
...
...
@@ -79,8 +79,8 @@ void colorizeDisparity( const Mat& gray, Mat& rgb, double maxDisp=-1.f, float S=
float
getMaxDisparity
(
VideoCapture
&
capture
)
{
const
int
minDistance
=
400
;
// mm
float
b
=
capture
.
get
(
CV_CAP_OPENNI_DEPTH_GENERATOR_BASELINE
);
// mm
float
F
=
capture
.
get
(
CV_CAP_OPENNI_DEPTH_GENERATOR_FOCAL_LENGTH
);
// pixels
float
b
=
(
float
)
capture
.
get
(
CV_CAP_OPENNI_DEPTH_GENERATOR_BASELINE
);
// mm
float
F
=
(
float
)
capture
.
get
(
CV_CAP_OPENNI_DEPTH_GENERATOR_FOCAL_LENGTH
);
// pixels
return
b
*
F
/
minDistance
;
}
...
...
samples/cpp/letter_recog.cpp
View file @
8ebff41c
...
...
@@ -495,8 +495,8 @@ int build_knearest_classifier( char* data_filename, int K )
int
ok
=
read_num_class_data
(
data_filename
,
16
,
&
data
,
&
responses
);
int
nsamples_all
=
0
,
ntrain_samples
=
0
;
int
i
,
j
;
double
train_hr
=
0
,
test_hr
=
0
;
//
int i, j;
//double /*train_hr = 0,*/
test_hr = 0;
CvANN_MLP
mlp
;
if
(
!
ok
)
...
...
@@ -572,8 +572,8 @@ int build_nbayes_classifier( char* data_filename )
int
ok
=
read_num_class_data
(
data_filename
,
16
,
&
data
,
&
responses
);
int
nsamples_all
=
0
,
ntrain_samples
=
0
;
int
i
,
j
;
double
train_hr
=
0
,
test_hr
=
0
;
//
int i, j;
//double /*train_hr = 0, */
test_hr = 0;
CvANN_MLP
mlp
;
if
(
!
ok
)
...
...
@@ -612,7 +612,7 @@ int build_nbayes_classifier( char* data_filename )
CvMat
*
result
=
cvCreateMat
(
1
,
nsamples_all
-
ntrain_samples
,
CV_32FC1
);
(
int
)
nbayes
.
predict
(
&
sample
,
result
);
int
true_resp
=
0
;
int
accuracy
=
0
;
//
int accuracy = 0;
for
(
int
i
=
0
;
i
<
nsamples_all
-
ntrain_samples
;
i
++
)
{
if
(
result
->
data
.
fl
[
i
]
==
true_results
[
i
])
...
...
samples/cpp/multicascadeclassifier.cpp
View file @
8ebff41c
...
...
@@ -155,7 +155,7 @@ void DetectAndDraw( Mat& img, CascadeClassifier& cascade)
int
radius
;
center
.
x
=
cvRound
(
r
->
x
+
r
->
width
*
0.5
);
center
.
y
=
cvRound
(
r
->
y
+
r
->
height
*
0.5
);
radius
=
cvRound
(
r
->
width
+
r
->
height
)
*
0.25
;
radius
=
(
int
)(
cvRound
(
r
->
width
+
r
->
height
)
*
0.25
)
;
circle
(
img
,
center
,
radius
,
color
,
3
,
8
,
0
);
}
...
...
samples/cpp/points_classifier.cpp
View file @
8ebff41c
...
...
@@ -493,7 +493,7 @@ int main()
for
(;;)
{
uchar
key
=
waitKey
();
uchar
key
=
(
uchar
)
waitKey
();
if
(
key
==
27
)
break
;
...
...
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