Ask Your Question

Revision history [back]

I made this hconcat function, I hope it helps.

void custom_hconcat(const cv::cuda::GpuMat src1, const cv::cuda::GpuMat src2, cv::cuda::GpuMat& result) {

int size_cols = src1.cols + src2.cols;
int size_rows = std::max(src1.rows, src2.rows);
cv::cuda::GpuMat hconcat(size_rows, size_cols, src1.type());
src2.copyTo(hconcat(cv::Rect(0, 0, src2.cols, src2.rows)));
src1.copyTo(hconcat(cv::Rect(src1.cols, 0, src1.cols, src1.rows)));

result = hconcat.clone();

}

I made this hconcat function, I hope it helps.

void custom_hconcat(const cv::cuda::GpuMat src1, const cv::cuda::GpuMat src2, cv::cuda::GpuMat& result) {

int size_cols = src1.cols + src2.cols;
int size_rows = std::max(src1.rows, src2.rows);
cv::cuda::GpuMat hconcat(size_rows, size_cols, src1.type());
src2.copyTo(hconcat(cv::Rect(0, 0, src2.cols, src2.rows)));
src1.copyTo(hconcat(cv::Rect(src1.cols, src1.copyTo(hconcat(cv::Rect(src2.cols, 0, src1.cols, src1.rows)));

result = hconcat.clone();

}

click to hide/show revision 3
No.3 Revision

updated 2020-10-01 09:05:48 -0600

berak gravatar image

I made this hconcat function, I hope it helps.

void custom_hconcat(const cv::cuda::GpuMat src1, const cv::cuda::GpuMat src2, cv::cuda::GpuMat& result) {

{
 int size_cols = src1.cols + src2.cols;
 int size_rows = std::max(src1.rows, src2.rows);
 cv::cuda::GpuMat hconcat(size_rows, size_cols, src1.type());
 src2.copyTo(hconcat(cv::Rect(0, 0, src2.cols, src2.rows)));
 src1.copyTo(hconcat(cv::Rect(src2.cols, 0, src1.cols, src1.rows)));

 result = hconcat.clone();
}

}