Esempio n. 1
0
Point CylindricalWarperGpu::warp(const cuda::GpuMat & src, InputArray K, InputArray R, int interp_mode, int border_mode,
                                 cuda::GpuMat & dst)
{
    Rect dst_roi = buildMaps(src.size(), K, R, d_xmap_, d_ymap_);
    dst.create(dst_roi.height + 1, dst_roi.width + 1, src.type());
    cuda::remap(src, dst, d_xmap_, d_ymap_, interp_mode, border_mode);
    return dst_roi.tl();
}
Esempio n. 2
0
Point SphericalWarperGpu::warp(const gpu::GpuMat &src, const Mat &K, const Mat &R, int interp_mode, int border_mode,
                               gpu::GpuMat &dst)
{
    Rect dst_roi = buildMaps(src.size(), K, R, d_xmap_, d_ymap_);
    dst.create(dst_roi.height + 1, dst_roi.width + 1, src.type());
    gpu::remap(src, dst, d_xmap_, d_ymap_, interp_mode, border_mode);
    return dst_roi.tl();
}
Esempio n. 3
0
Point CylindricalWarper::warp(InputArray src, InputArray K, InputArray R, int interp_mode, int border_mode, OutputArray dst)
{
    UMat uxmap, uymap;
    Rect dst_roi = buildMaps(src.size(), K, R, uxmap, uymap);

    dst.create(dst_roi.height + 1, dst_roi.width + 1, src.type());
    remap(src, dst, uxmap, uymap, interp_mode, border_mode);

    return dst_roi.tl();
}
Esempio n. 4
0
        Point TranslationWarperBase<P>::warp(InputArray src, InputArray K, InputArray R, InputArray t, int interp_mode,
                                             int border_mode,
                                             OutputArray dst) {
            UMat xmap, ymap;
            Rect dst_roi = buildMaps(src.size(), K, R, t, xmap, ymap);

            dst.create(dst_roi.height + 1, dst_roi.width + 1, src.type());
            remap(src, dst, xmap, ymap, interp_mode, border_mode);

            return dst_roi.tl();
        }
Esempio n. 5
0
Point PlaneWarperOcl::warp(InputArray src, InputArray K, InputArray R, InputArray T, int interp_mode, int border_mode, OutputArray dst)
{
    UMat uxmap, uymap;
    Rect dst_roi = buildMaps(src.size(), K, R, T, uxmap, uymap);

    dst.create(dst_roi.height + 1, dst_roi.width + 1, src.type());
    UMat udst = dst.getUMat();
    remap(src, udst, uxmap, uymap, interp_mode, border_mode);

    return dst_roi.tl();
}
Esempio n. 6
0
Point PlaneWarper::warp(const Mat &src, const Mat &K, const Mat &R, const Mat &T, int interp_mode, int border_mode,
                        Mat &dst)
{
    Mat xmap, ymap;
    Rect dst_roi = buildMaps(src.size(), K, R, T, xmap, ymap);

    dst.create(dst_roi.height + 1, dst_roi.width + 1, src.type());
    remap(src, dst, xmap, ymap, interp_mode, border_mode);

    return dst_roi.tl();
}
Esempio n. 7
0
MarkovAlgorithm::MarkovAlgorithm()
{
	fillInputText();
	buildMaps();
	writeRandom();
}
Esempio n. 8
0
Rect PlaneWarperGpu::buildMaps(Size src_size, InputArray K, InputArray R, cuda::GpuMat & xmap, cuda::GpuMat & ymap)
{
    return buildMaps(src_size, K, R, Mat::zeros(3, 1, CV_32F), xmap, ymap);
}
Esempio n. 9
0
Rect PlaneWarperGpu::buildMaps(Size src_size, const Mat &K, const Mat &R, gpu::GpuMat &xmap, gpu::GpuMat &ymap)
{
    return buildMaps(src_size, K, R, Mat::zeros(3, 1, CV_32F), xmap, ymap);
}