This commit is contained in:
cudawarped 2025-06-05 13:03:18 +03:00 committed by GitHub
commit 36456e26fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -240,6 +240,10 @@ public:
//! converts GpuMat to another datatype (Blocking call) //! converts GpuMat to another datatype (Blocking call)
void convertTo(OutputArray dst, int rtype) const; void convertTo(OutputArray dst, int rtype) const;
//! bindings overload which converts GpuMat to another datatype (Blocking call)
CV_WRAP void convertTo(CV_OUT GpuMat& dst, int rtype) const {
convertTo(static_cast<OutputArray>(dst), rtype);
}
//! converts GpuMat to another datatype (Non-Blocking call) //! converts GpuMat to another datatype (Non-Blocking call)
void convertTo(OutputArray dst, int rtype, Stream& stream) const; void convertTo(OutputArray dst, int rtype, Stream& stream) const;
@ -251,7 +255,7 @@ public:
//! converts GpuMat to another datatype with scaling (Blocking call) //! converts GpuMat to another datatype with scaling (Blocking call)
void convertTo(OutputArray dst, int rtype, double alpha, double beta = 0.0) const; void convertTo(OutputArray dst, int rtype, double alpha, double beta = 0.0) const;
//! bindings overload which converts GpuMat to another datatype with scaling(Blocking call) //! bindings overload which converts GpuMat to another datatype with scaling(Blocking call)
CV_WRAP void convertTo(CV_OUT GpuMat& dst, int rtype, double alpha = 1.0, double beta = 0.0) const { CV_WRAP void convertTo(CV_OUT GpuMat& dst, int rtype, double alpha, double beta = 0.0) const {
convertTo(static_cast<OutputArray>(dst), rtype, alpha, beta); convertTo(static_cast<OutputArray>(dst), rtype, alpha, beta);
} }

View File

@ -546,7 +546,7 @@ void cv::cuda::GpuMat::convertTo(OutputArray _dst, int rtype, Stream& stream) co
return; return;
} }
CV_DbgAssert( sdepth <= CV_64F && ddepth <= CV_64F ); CV_Assert( sdepth <= CV_64F && ddepth <= CV_64F );
GpuMat src = *this; GpuMat src = *this;
@ -578,6 +578,8 @@ void cv::cuda::GpuMat::convertTo(OutputArray _dst, int rtype, double alpha, doub
const int sdepth = depth(); const int sdepth = depth();
const int ddepth = CV_MAT_DEPTH(rtype); const int ddepth = CV_MAT_DEPTH(rtype);
CV_Assert(sdepth <= CV_64F && ddepth <= CV_64F);
GpuMat src = *this; GpuMat src = *this;
_dst.create(size(), rtype); _dst.create(size(), rtype);