1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

cuda: Fix GpuMat::copyTo and GpuMat::converTo python bindings

This commit is contained in:
cudawarped
2023-08-01 15:09:37 +03:00
parent 6791284994
commit bea0c1b660
2 changed files with 105 additions and 9 deletions
+37 -9
View File
@@ -198,16 +198,32 @@ public:
CV_WRAP GpuMat clone() const;
//! copies the GpuMat content to device memory (Blocking call)
CV_WRAP void copyTo(OutputArray dst) const;
void copyTo(OutputArray dst) const;
//! bindings overload which copies the GpuMat content to device memory (Blocking call)
CV_WRAP void copyTo(CV_OUT GpuMat& dst) const {
copyTo(static_cast<OutputArray>(dst));
}
//! copies the GpuMat content to device memory (Non-Blocking call)
CV_WRAP void copyTo(OutputArray dst, Stream& stream) const;
void copyTo(OutputArray dst, Stream& stream) const;
//! bindings overload which copies the GpuMat content to device memory (Non-Blocking call)
CV_WRAP void copyTo(CV_OUT GpuMat& dst, Stream& stream) const {
copyTo(static_cast<OutputArray>(dst), stream);
}
//! copies those GpuMat elements to "m" that are marked with non-zero mask elements (Blocking call)
CV_WRAP void copyTo(OutputArray dst, InputArray mask) const;
void copyTo(OutputArray dst, InputArray mask) const;
//! bindings overload which copies those GpuMat elements to "m" that are marked with non-zero mask elements (Blocking call)
CV_WRAP void copyTo(CV_OUT GpuMat& dst, GpuMat& mask) const {
copyTo(static_cast<OutputArray>(dst), static_cast<InputArray>(mask));
}
//! copies those GpuMat elements to "m" that are marked with non-zero mask elements (Non-Blocking call)
CV_WRAP void copyTo(OutputArray dst, InputArray mask, Stream& stream) const;
void copyTo(OutputArray dst, InputArray mask, Stream& stream) const;
//! bindings overload which copies those GpuMat elements to "m" that are marked with non-zero mask elements (Non-Blocking call)
CV_WRAP void copyTo(CV_OUT GpuMat& dst, GpuMat& mask, Stream& stream) const {
copyTo(static_cast<OutputArray>(dst), static_cast<InputArray>(mask), stream);
}
//! sets some of the GpuMat elements to s (Blocking call)
CV_WRAP GpuMat& setTo(Scalar s);
@@ -222,19 +238,31 @@ public:
CV_WRAP GpuMat& setTo(Scalar s, InputArray mask, Stream& stream);
//! converts GpuMat to another datatype (Blocking call)
CV_WRAP void convertTo(OutputArray dst, int rtype) const;
void convertTo(OutputArray dst, int rtype) const;
//! converts GpuMat to another datatype (Non-Blocking call)
CV_WRAP void convertTo(OutputArray dst, int rtype, Stream& stream) const;
void convertTo(OutputArray dst, int rtype, Stream& stream) const;
//! bindings overload which converts GpuMat to another datatype (Non-Blocking call)
CV_WRAP void convertTo(CV_OUT GpuMat& dst, int rtype, Stream& stream) const {
convertTo(static_cast<OutputArray>(dst), rtype, stream);
}
//! converts GpuMat to another datatype with scaling (Blocking call)
CV_WRAP 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)
CV_WRAP void convertTo(CV_OUT GpuMat& dst, int rtype, double alpha = 1.0, double beta = 0.0) const {
convertTo(static_cast<OutputArray>(dst), rtype, alpha, beta);
}
//! converts GpuMat to another datatype with scaling (Non-Blocking call)
CV_WRAP void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
//! converts GpuMat to another datatype with scaling (Non-Blocking call)
CV_WRAP void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
//! bindings overload which converts GpuMat to another datatype with scaling (Non-Blocking call)
CV_WRAP void convertTo(CV_OUT GpuMat& dst, int rtype, double alpha, double beta, Stream& stream) const {
convertTo(static_cast<OutputArray>(dst), rtype, alpha, beta, stream);
}
CV_WRAP void assignTo(GpuMat& m, int type = -1) const;