fixed warnings under windows

This commit is contained in:
Vladislav Vinogradov
2012-12-18 18:03:54 +04:00
parent ab25fe9e37
commit 41c9377db0
10 changed files with 30 additions and 30 deletions

View File

@@ -623,7 +623,7 @@ private:
}
// copy data structures on gpu
stage_mat.upload(cv::Mat(1, stages.size() * sizeof(Stage), CV_8UC1, (uchar*)&(stages[0]) ));
stage_mat.upload(cv::Mat(1, (int) (stages.size() * sizeof(Stage)), CV_8UC1, (uchar*)&(stages[0]) ));
trees_mat.upload(cv::Mat(cl_trees).reshape(1,1));
nodes_mat.upload(cv::Mat(cl_nodes).reshape(1,1));
leaves_mat.upload(cv::Mat(cl_leaves).reshape(1,1));

View File

@@ -2086,7 +2086,7 @@ void cv::gpu::bitwise_not(const GpuMat& src, GpuMat& dst, const GpuMat& mask, St
cudaStream_t stream = StreamAccessor::getStream(s);
const int bcols = src.cols * src.elemSize();
const int bcols = (int) (src.cols * src.elemSize());
if ((bcols & 3) == 0)
{
@@ -2139,7 +2139,7 @@ void cv::gpu::bitwise_and(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, c
cudaStream_t stream = StreamAccessor::getStream(s);
const int bcols = src1.cols * src1.elemSize();
const int bcols = (int) (src1.cols * src1.elemSize());
if ((bcols & 3) == 0)
{
@@ -2186,7 +2186,7 @@ void cv::gpu::bitwise_or(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, co
cudaStream_t stream = StreamAccessor::getStream(s);
const int bcols = src1.cols * src1.elemSize();
const int bcols = (int) (src1.cols * src1.elemSize());
if ((bcols & 3) == 0)
{
@@ -2233,7 +2233,7 @@ void cv::gpu::bitwise_xor(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, c
cudaStream_t stream = StreamAccessor::getStream(s);
const int bcols = src1.cols * src1.elemSize();
const int bcols = (int) (src1.cols * src1.elemSize());
if ((bcols & 3) == 0)
{

View File

@@ -523,15 +523,15 @@ namespace
size_t total = all_contours.size();
_contours.create(total, 1, 0, -1, true);
_contours.create((int) total, 1, 0, -1, true);
cv::SeqIterator<CvSeq*> it = all_contours.begin();
for (size_t i = 0; i < total; ++i, ++it)
{
CvSeq* c = *it;
((CvContour*)c)->color = (int)i;
_contours.create((int)c->total, 1, CV_32SC2, i, true);
cv::Mat ci = _contours.getMat(i);
_contours.create((int)c->total, 1, CV_32SC2, (int)i, true);
cv::Mat ci = _contours.getMat((int)i);
CV_Assert( ci.isContinuous() );
cvCvtSeqToArray(c, ci.data);
}

View File

@@ -579,7 +579,7 @@ namespace
const func_t func = funcs[dx.depth()];
CV_Assert(func != 0);
edgePointList.cols = edgePointList.step / sizeof(int);
edgePointList.cols = (int) (edgePointList.step / sizeof(int));
ensureSizeIsEnough(2, edges.size().area(), CV_32SC1, edgePointList);
edgePointList.cols = func(edges, dx, dy, edgePointList.ptr<unsigned int>(0), edgePointList.ptr<float>(1));

View File

@@ -235,13 +235,13 @@ struct cv::gpu::SCascade::Fields
++octIndex;
}
cv::Mat hoctaves(1, voctaves.size() * sizeof(Octave), CV_8UC1, (uchar*)&(voctaves[0]));
cv::Mat hoctaves(1, (int) (voctaves.size() * sizeof(Octave)), CV_8UC1, (uchar*)&(voctaves[0]));
CV_Assert(!hoctaves.empty());
cv::Mat hstages(cv::Mat(vstages).reshape(1,1));
CV_Assert(!hstages.empty());
cv::Mat hnodes(1, vnodes.size() * sizeof(Node), CV_8UC1, (uchar*)&(vnodes[0]) );
cv::Mat hnodes(1, (int) (vnodes.size() * sizeof(Node)), CV_8UC1, (uchar*)&(vnodes[0]) );
CV_Assert(!hnodes.empty());
cv::Mat hleaves(cv::Mat(vleaves).reshape(1,1));
@@ -296,7 +296,7 @@ struct cv::gpu::SCascade::Fields
scale = ::std::min(maxScale, ::expf(::log(scale) + logFactor));
}
cv::Mat hlevels = cv::Mat(1, vlevels.size() * sizeof(Level), CV_8UC1, (uchar*)&(vlevels[0]) );
cv::Mat hlevels = cv::Mat(1, (int) (vlevels.size() * sizeof(Level)), CV_8UC1, (uchar*)&(vlevels[0]) );
CV_Assert(!hlevels.empty());
levels.upload(hlevels);
downscales = dcs;

View File

@@ -89,7 +89,7 @@ TEST_P(HoughLines, Accuracy)
const bool useRoi = GET_PARAM(2);
const float rho = 1.0f;
const float theta = 1.5f * CV_PI / 180.0f;
const float theta = (float) (1.5 * CV_PI / 180.0);
const int threshold = 100;
cv::Mat src(size, CV_8UC1);

View File

@@ -82,7 +82,7 @@ namespace {
int cc = -1;
int* dist_labels = (int*)labels.data;
int pitch = labels.step1();
int pitch = (int) labels.step1();
unsigned char* source = (unsigned char*)image.data;
int width = image.cols;

View File

@@ -606,8 +606,8 @@ static void FastOpticalFlowBM_gold(const cv::Mat_<uchar>& I0, const cv::Mat_<uch
}
}
velx(y, x) = bestDx;
vely(y, x) = bestDy;
velx(y, x) = (float) bestDx;
vely(y, x) = (float) bestDy;
}
}
}