MCPcopy Create free account
hub / github.com/creatale/node-dv / convertTo

Method convertTo

deps/opencv/modules/core/src/gpumat.cpp:640–671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638}
639
640void cv::gpu::GpuMat::convertTo(GpuMat& dst, int rtype, double alpha, double beta) const
641{
642 bool noScale = fabs(alpha - 1) < numeric_limits<double>::epsilon() && fabs(beta) < numeric_limits<double>::epsilon();
643
644 if (rtype < 0)
645 rtype = type();
646 else
647 rtype = CV_MAKETYPE(CV_MAT_DEPTH(rtype), channels());
648
649 int sdepth = depth();
650 int ddepth = CV_MAT_DEPTH(rtype);
651 if (sdepth == ddepth && noScale)
652 {
653 copyTo(dst);
654 return;
655 }
656
657 GpuMat temp;
658 const GpuMat* psrc = this;
659 if (sdepth != ddepth && psrc == &dst)
660 {
661 temp = *this;
662 psrc = &temp;
663 }
664
665 dst.create(size(), rtype);
666
667 if (noScale)
668 cv::gpu::convertTo(*psrc, dst);
669 else
670 cv::gpu::convertTo(*psrc, dst, alpha, beta);
671}
672
673GpuMat& cv::gpu::GpuMat::setTo(Scalar s, const GpuMat& mask)
674{

Callers 15

convert.cppFile · 0.45
assignMethod · 0.45
cvEigenVVFunction · 0.45
fillMethod · 0.45
solvePolyMethod · 0.45
transformMethod · 0.45
perspectiveTransformMethod · 0.45
calcCovarMatrixMethod · 0.45
mulTransposedMethod · 0.45
matmul.cppFile · 0.45
projectMethod · 0.45
backProjectMethod · 0.45

Calls 6

convertToFunction · 0.70
typeFunction · 0.50
channelsFunction · 0.50
depthFunction · 0.50
sizeFunction · 0.50
createMethod · 0.45

Tested by

no test coverage detected