Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3c8e92e

Browse files
author
paul-shuvo
committedOct 28, 2020
updated with appropriate opencv4 method names
1 parent 0e2c5f6 commit 3c8e92e

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed
 

‎kinect2_bridge/src/kinect2_bridge.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,12 @@ class Kinect2Bridge
461461
void initCompression(const int32_t jpegQuality, const int32_t pngLevel, const bool use_png)
462462
{
463463
compressionParams.resize(7, 0);
464-
compressionParams[0] = CV_IMWRITE_JPEG_QUALITY;
464+
compressionParams[0] = cv::IMWRITE_JPEG_QUALITY;
465465
compressionParams[1] = jpegQuality;
466-
compressionParams[2] = CV_IMWRITE_PNG_COMPRESSION;
466+
compressionParams[2] = cv::IMWRITE_PNG_COMPRESSION;
467467
compressionParams[3] = pngLevel;
468-
compressionParams[4] = CV_IMWRITE_PNG_STRATEGY;
469-
compressionParams[5] = CV_IMWRITE_PNG_STRATEGY_RLE;
468+
compressionParams[4] = cv::IMWRITE_PNG_STRATEGY;
469+
compressionParams[5] = cv::IMWRITE_PNG_STRATEGY_RLE;
470470
compressionParams[6] = 0;
471471

472472
if(use_png)
@@ -1100,11 +1100,11 @@ class Kinect2Bridge
11001100
cv::flip(color, tmp, 1);
11011101
if(colorFrame->format == libfreenect2::Frame::BGRX)
11021102
{
1103-
cv::cvtColor(tmp, images[COLOR_HD], CV_BGRA2BGR);
1103+
cv::cvtColor(tmp, images[COLOR_HD], cv::COLOR_BGRA2BGR);
11041104
}
11051105
else
11061106
{
1107-
cv::cvtColor(tmp, images[COLOR_HD], CV_RGBA2BGR);
1107+
cv::cvtColor(tmp, images[COLOR_HD], cv::COLOR_RGBA2BGR);
11081108
}
11091109
}
11101110

@@ -1180,11 +1180,11 @@ class Kinect2Bridge
11801180
cv::flip(cv::Mat(sizeIr, CV_8UC4, registered.data), tmp, 1);
11811181
if(color.format == libfreenect2::Frame::BGRX)
11821182
{
1183-
cv::cvtColor(tmp, images[COLOR_SD_RECT], CV_BGRA2BGR);
1183+
cv::cvtColor(tmp, images[COLOR_SD_RECT], cv::COLOR_BGRA2BGR);
11841184
}
11851185
else
11861186
{
1187-
cv::cvtColor(tmp, images[COLOR_SD_RECT], CV_RGBA2BGR);
1187+
cv::cvtColor(tmp, images[COLOR_SD_RECT], cv::COLOR_RGBA2BGR);
11881188
}
11891189
}
11901190

@@ -1247,19 +1247,19 @@ class Kinect2Bridge
12471247
// MONO
12481248
if(status[MONO_HD])
12491249
{
1250-
cv::cvtColor(images[COLOR_HD], images[MONO_HD], CV_BGR2GRAY);
1250+
cv::cvtColor(images[COLOR_HD], images[MONO_HD], cv::COLOR_BGR2GRAY);
12511251
}
12521252
if(status[MONO_HD_RECT])
12531253
{
1254-
cv::cvtColor(images[COLOR_HD_RECT], images[MONO_HD_RECT], CV_BGR2GRAY);
1254+
cv::cvtColor(images[COLOR_HD_RECT], images[MONO_HD_RECT], cv::COLOR_BGR2GRAY);
12551255
}
12561256
if(status[MONO_QHD])
12571257
{
1258-
cv::cvtColor(images[COLOR_QHD], images[MONO_QHD], CV_BGR2GRAY);
1258+
cv::cvtColor(images[COLOR_QHD], images[MONO_QHD], cv::COLOR_BGR2GRAY);
12591259
}
12601260
if(status[MONO_QHD_RECT])
12611261
{
1262-
cv::cvtColor(images[COLOR_QHD_RECT], images[MONO_QHD_RECT], CV_BGR2GRAY);
1262+
cv::cvtColor(images[COLOR_QHD_RECT], images[MONO_QHD_RECT], cv::COLOR_BGR2GRAY);
12631263
}
12641264
}
12651265

‎kinect2_calibration/src/kinect2_calibration.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class Recorder
110110
circleFlags = cv::CALIB_CB_ASYMMETRIC_GRID + cv::CALIB_CB_CLUSTERING;
111111
}
112112

113-
params.push_back(CV_IMWRITE_PNG_COMPRESSION);
113+
params.push_back(cv::IMWRITE_PNG_COMPRESSION);
114114
params.push_back(9);
115115

116116
board.resize(boardDims.width * boardDims.height);

‎kinect2_viewer/src/viewer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ class Receiver
276276
combine(color, depthDisp, combined);
277277
//combined = color;
278278

279-
cv::putText(combined, oss.str(), pos, font, sizeText, colorText, lineText, CV_AA);
279+
cv::putText(combined, oss.str(), pos, font, sizeText, colorText, lineText, cv::LINE_AA);
280280
cv::imshow("Image Viewer", combined);
281281
}
282282

0 commit comments

Comments
 (0)
Please sign in to comment.