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();
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;
return false;\r
};\r
\r
-void ASDFrameSequencer::getFrameCaption(char *caption) {\r
+void ASDFrameSequencer::getFrameCaption(char* /*caption*/) {\r
return;\r
};\r
\r
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) );
}
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));
}
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/imgproc/imgproc_c.h"
+
#include <ctype.h>
#include <stdio.h>
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/imgproc/imgproc_c.h"
#include <stdio.h>
void help()
{
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;
/* 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 */
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 )
{
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;
}
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 )
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 )
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])
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 );
}
for(;;)
{
- uchar key = waitKey();
+ uchar key = (uchar)waitKey();
if( key == 27 ) break;