1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

fixed ~200 warnings for windows

minor build system changes (now cuda code in opencv_core is compiled using CUDA_ARCH* cmake variables)
This commit is contained in:
Anatoly Baksheev
2012-02-14 10:22:34 +00:00
parent 8f4d63913a
commit 84db4eb6fa
29 changed files with 126 additions and 66 deletions
+5 -5
View File
@@ -401,7 +401,7 @@ double CvCapture_OpenNI::getDepthGeneratorProperty( int propIdx )
res = baseline;
break;
case CV_CAP_PROP_OPENNI_FOCAL_LENGTH :
res = depthFocalLength_VGA;
res = (double)depthFocalLength_VGA;
break;
case CV_CAP_PROP_OPENNI_REGISTRATION :
res = depthGenerator.GetAlternativeViewPointCap().IsViewPointAs(imageGenerator) ? 1.0 : 0.0;
@@ -552,7 +552,7 @@ inline void getDepthMapFromMetaData( const xn::DepthMetaData& depthMetaData, cv:
// CV_Assert( sizeof(unsigned short) == sizeof(XnDepthPixel) );
memcpy( depthMap.data, pDepthMap, cols*rows*sizeof(XnDepthPixel) );
cv::Mat badMask = (depthMap == noSampleValue) | (depthMap == shadowValue) | (depthMap == 0);
cv::Mat badMask = (depthMap == (double)noSampleValue) | (depthMap == (double)shadowValue) | (depthMap == 0);
// mask the pixels with invalid depth
depthMap.setTo( cv::Scalar::all( CvCapture_OpenNI::INVALID_PIXEL_VAL ), badMask );
@@ -588,8 +588,8 @@ IplImage* CvCapture_OpenNI::retrievePointCloudMap()
for( int x = 0; x < cols; x++ )
{
int ind = y*cols+x;
proj[ind].X = x;
proj[ind].Y = y;
proj[ind].X = (float)x;
proj[ind].Y = (float)y;
proj[ind].Z = depth.at<unsigned short>(y, x);
}
}
@@ -625,7 +625,7 @@ void computeDisparity_32F( const xn::DepthMetaData& depthMetaData, cv::Mat& disp
// disparity = baseline * F / z;
float mult = baseline /*mm*/ * F /*pixels*/;
float mult = (float)(baseline /*mm*/ * F /*pixels*/);
disp.create( depth.size(), CV_32FC1);
disp = cv::Scalar::all( CvCapture_OpenNI::INVALID_PIXEL_VAL );
+7
View File
@@ -393,6 +393,9 @@ void cv::pointCloudShow(const string& winname, const GlCamera& camera, const GlA
{
#ifndef HAVE_OPENGL
CV_Error(CV_OpenGlNotSupported, "The library is compiled without OpenGL support");
(void)winname;
(void)camera;
(void)arr;
#else
namedWindow(winname, WINDOW_OPENGL);
@@ -436,6 +439,10 @@ void cv::pointCloudShow(const string& winname, const GlCamera& camera, const GlA
void cv::pointCloudShow(const std::string& winname, const cv::GlCamera& camera, InputArray points, InputArray colors)
{
#ifndef HAVE_OPENGL
(void)winname;
(void)camera;
(void)points;
(void)colors;
CV_Error(CV_OpenGlNotSupported, "The library is compiled without OpenGL support");
#else
namedWindow(winname, WINDOW_OPENGL);
+1
View File
@@ -560,6 +560,7 @@ double cvGetOpenGlProp_W32(const char* name)
__END__;
#endif
(void)name;
return result;
}