.. SPDX-FileCopyrightText: 2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 .. _resize_supersampling: Resize Supersampling ==================== Changes an image size using the super sampling interpolation method. .. rubric:: Description :class: sectiontitle This function changes an image size using the super sampling interpolation method. This method only reduces the image size. The interpolation algorithm applied uses only pixels of the source image origin that are inside of the image boundaries. This function can operate with ROI (see :ref:`image-regions-of-interest`). Before using the ``resize_supersampling`` function, implementation must initialize the ``resize_supersampling_spec``. .. rubric:: Headers :class: sectiontitle ``oneapi/ipl/transform/resize_supersampling.hpp`` .. rubric:: Syntax :class: sectiontitle .. doxygenfunction:: oneapi::ipl::resize_supersampling(sycl::queue&, image&, image&, const resize_supersampling_spec&, const std::vector&) :project: oneIPL .. rubric:: Supported values for ComputeT: :class: sectiontitle .. csv-table:: :align: center :header: **float**,**double**,**half** v,v,x .. rubric:: Supported combinations for DataT/Formats: :class: sectiontitle .. csv-table:: :align: center :header: **DataT/Formats**,**plane**,**rgb/bgr**,**rgba/bgra**,**rgbp** **std::uint8_t** ,v,v,v,x **std::int8_t** ,v,v,v,x **std::uint16_t**,v,v,v,x **std::int16_t** ,v,v,v,x **std::uint32_t**,v,v,v,x **std::int32_t** ,v,v,v,x **float** ,v,v,v,x **double** ,v,v,v,x .. rubric:: Supported values for subsampled Format (only for DataT = ``std::uint8_t``): :class: sectiontitle .. csv-table:: :align: center :header: **nv12**,**i420** x,x .. rubric:: Parameters :class: sectiontitle .. doxygenclass:: oneapi::ipl::resize_supersampling_spec :project: oneIPL :members: .. rubric:: Errors :class: sectiontitle .. list-table:: :header-rows: 0 * - compile-time format check - Indicates an error when image format is not supported. * - compile-time data type check - Indicates an error when image data type is not supported. * - compile-time compute data type check - Indicates an error when compute data type is not supported. * - ``invalid_argument`` exception - Indicates an error when the destination image ROI size is greater than the source image ROI size. * - ``invalid_argument`` exception - Indicates an error when one of the pitch values is not divisible by size of component data type in bytes. The code example below demonstrates how to use the ``oneapi::ipl::resize_supersampling``: .. code-block:: cpp // Create queue sycl::queue queue{}; // Source rgba image data image src_image{ src_data_pointer, src_size }; // Destination rgba image data (Format should be the same) image dst_image{ dst_size }; const float x_shift = 0.1f; const float y_shift = 0.1f; const bool smooth_edge = true; const resize_supersampling_spec spec{ x_shift, y_shift, smooth_edge }; (void)resize_supersampling(queue, src_image, dst_image, spec);