added implementation copyTo() with mask and added test for this method

This commit is contained in:
Andrey Morozov
2010-07-22 14:39:54 +00:00
parent 98c8ecf829
commit a0b1107b3c
4 changed files with 181 additions and 7 deletions

View File

@@ -99,9 +99,17 @@ void cv::gpu::GpuMat::copyTo( GpuMat& m ) const
cudaSafeCall( cudaThreadSynchronize() );
}
void cv::gpu::GpuMat::copyTo( GpuMat& /*m*/, const GpuMat&/* mask */) const
void cv::gpu::GpuMat::copyTo( GpuMat& mat, const GpuMat& mask ) const
{
CV_Assert(!"Not implemented");
if (mask.empty())
{
this->copyTo(mat);
}
else
{
mat.create(this->size(), this->type());
cv::gpu::impl::copy_to_with_mask(*this, mat, this->depth() , mask, this->channels());
}
}
void cv::gpu::GpuMat::convertTo( GpuMat& dst, int rtype, double alpha, double beta ) const