MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / ExportOpHQResize

Function ExportOpHQResize

python/mod_cvcuda/operators/OpHQResize.cpp:549–759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547} // namespace
548
549void ExportOpHQResize(py::module &m)
550{
551 using namespace pybind11::literals;
552
553 m.def("hq_resize", &TensorHQResize, "src"_a, "out_size"_a, py::kw_only(), "antialias"_a = false, "roi"_a = nullptr,
554 "interpolation"_a = nullptr, "min_interpolation"_a = nullptr, "mag_interpolation"_a = nullptr,
555 "stream"_a = nullptr, R"pbdoc(
556 Executes the HQ Resize operation on the given cuda stream. The operator
557 supports resampling for 2D (images) and 3D volumetric samples.
558
559 See also:
560 Refer to the CV-CUDA C API reference for the HQ Resize operator
561 for more details and usage examples.
562
563 Args:
564 src (cvcuda.Tensor): Input tensor containing one or more images.
565 The tensor layout must match: (N)(D)HW(C).
566 out_size (tuple): Tuple of 2 or 3 ints describing the output shape in (D)HW layout.
567 antialias (bool): If set to true, an antialiasing is enabled for scaling down.
568 roi (Tuple): Optional bounding box describing the input's region of interest.
569 For 2D resampling it should be (lowH, lowW, highH, highW),
570 for 3D: (lowD, lowH, lowW, highD, highH, highW).
571 If, for some axis, the low bound is bigger than the high bound,
572 the image is flipped across the axis.
573 interpolation (cvcuda.Interp): Interpolation type used. Used both for scaling down and up,
574 cannot be specified together with (min_interpolation or mag_interpolation).
575 min_interpolation (cvcuda.Interp): Interpolation type used for scaling down.
576 mag_interpolation (cvcuda.Interp): Interpolation type used for scaling up.
577 stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation.
578
579 Returns:
580 cvcuda.Tensor: The output tensor.
581
582 Caution:
583 Restrictions to several arguments may apply. Check the C
584 API references of the CV-CUDA operator.
585 )pbdoc");
586 m.def("hq_resize", &VarShapeHQResize, "src"_a, "out_size"_a, py::kw_only(), "antialias"_a = false,
587 "roi"_a = nullptr, "interpolation"_a = nullptr, "min_interpolation"_a = nullptr,
588 "mag_interpolation"_a = nullptr, "stream"_a = nullptr, R"pbdoc(
589 Executes the HQ Resize operation on the given cuda stream.
590
591 See also:
592 Refer to the CV-CUDA C API reference for the HQ Resize operator
593 for more details and usage examples.
594
595 Args:
596 src (cvcuda.ImageBatchVarShape): Input batch of images.
597 out_size (tuple): Tuple of 2 ints describing the output shape in HW layout.
598 antialias (bool): If set to true, an antialiasing is enabled for scaling down.
599 roi (List[Tuple[int]]): Optional bounding boxes describing the input's region of interest.
600 It should be a list of tuples. The list length must match the number
601 of input tensors or be 1 (so that the same ROI is used for all samples).
602 Each tuple must be of the form (lowH, lowW, highH, highW).
603 If, for some axis, the low bound is bigger than the high bound,
604 the image is flipped across the axis.
605 interpolation (cvcuda.Interp): Interpolation type used. Used both for scaling down and up,
606 cannot be specified together with (min_interpolation or mag_interpolation).

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected