mirror of
https://github.com/opencv/opencv.git
synced 2024-11-28 05:06:29 +08:00
build: fix MSVS2017 warning
This commit is contained in:
parent
a9effeeb35
commit
1f18282f04
@ -928,7 +928,7 @@ double cv::fisheye::stereoCalibrate(InputArrayOfArrays objectPoints, InputArrayO
|
||||
intrinsicRight_errors.isEstimate = intrinsicRight.isEstimate;
|
||||
|
||||
std::vector<uchar> selectedParams;
|
||||
std::vector<int> tmp(6 * (n_images + 1), 1);
|
||||
std::vector<uchar> tmp(6 * (n_images + 1), 1);
|
||||
selectedParams.insert(selectedParams.end(), intrinsicLeft.isEstimate.begin(), intrinsicLeft.isEstimate.end());
|
||||
selectedParams.insert(selectedParams.end(), intrinsicRight.isEstimate.begin(), intrinsicRight.isEstimate.end());
|
||||
selectedParams.insert(selectedParams.end(), tmp.begin(), tmp.end());
|
||||
|
@ -69,9 +69,14 @@ static const char* get_type_name(int type)
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
// std::tolower is int->int
|
||||
static char char_tolower(char ch)
|
||||
{
|
||||
return (char)std::tolower((int)ch);
|
||||
}
|
||||
static bool parse_bool(std::string str)
|
||||
{
|
||||
std::transform(str.begin(), str.end(), str.begin(), ::tolower);
|
||||
std::transform(str.begin(), str.end(), str.begin(), char_tolower);
|
||||
std::istringstream is(str);
|
||||
bool b;
|
||||
is >> (str.size() > 1 ? std::boolalpha : std::noboolalpha) >> b;
|
||||
|
@ -993,6 +993,11 @@ static cl_device_id selectOpenCLDevice()
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
// std::tolower is int->int
|
||||
static char char_tolower(char ch)
|
||||
{
|
||||
return (char)std::tolower((int)ch);
|
||||
}
|
||||
static cl_device_id selectOpenCLDevice()
|
||||
{
|
||||
std::string platform, deviceName;
|
||||
@ -1077,7 +1082,7 @@ static cl_device_id selectOpenCLDevice()
|
||||
{
|
||||
int deviceType = 0;
|
||||
std::string tempStrDeviceType = deviceTypes[t];
|
||||
std::transform( tempStrDeviceType.begin(), tempStrDeviceType.end(), tempStrDeviceType.begin(), tolower );
|
||||
std::transform(tempStrDeviceType.begin(), tempStrDeviceType.end(), tempStrDeviceType.begin(), char_tolower);
|
||||
|
||||
if (tempStrDeviceType == "gpu" || tempStrDeviceType == "dgpu" || tempStrDeviceType == "igpu")
|
||||
deviceType = Device::TYPE_GPU;
|
||||
|
@ -63,7 +63,7 @@ void ExposureCompensator::feed(const std::vector<Point> &corners, const std::vec
|
||||
{
|
||||
std::vector<std::pair<UMat,uchar> > level_masks;
|
||||
for (size_t i = 0; i < masks.size(); ++i)
|
||||
level_masks.push_back(std::make_pair(masks[i], 255));
|
||||
level_masks.push_back(std::make_pair(masks[i], (uchar)255));
|
||||
feed(corners, images, level_masks);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user