.. SPDX-FileCopyrightText: 2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 .. _resize_lanczos: Resize with Lanczos Interpolation ================================== Changes an image size using interpolation with the Lanczos filter. .. rubric:: Description :class: sectiontitle This function changes an image size using interpolation with the Lanczos filter. The image size may be either reduced or increased in each direction, depending on the destination image size. This method is based on the 3-lobed Lanczos window function as an interpolation function. Algorithm parameters must be set through the ``resize_lanczos_spec`` class. The border pixels are processed in accordance with the border type. This function can operate with ROI (see :ref:`image-regions-of-interest`). .. rubric:: Headers :class: sectiontitle ``oneapi/ipl/transform/resize_lanczos.hpp`` .. rubric:: Syntax :class: sectiontitle .. doxygenfunction:: oneapi::ipl::resize_lanczos(sycl::queue&, image&, image&, const resize_lanczos_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** v,v .. rubric:: Parameters :class: sectiontitle .. list-table:: :header-rows: 0 * - border type support - Type of border. Possible values are: ``repl`` - Border is replicated from the edge pixels. .. doxygenclass:: oneapi::ipl::resize_lanczos_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 one of the pitch values is not divisible by size of component data type in bytes. * - ``unimplemented`` exception - Indicates an error when border type is not supported. The code example below demonstrates how to use the ``oneapi::ipl::resize_lanczos``: .. code-block:: cpp // Create queue sycl::queue queue{}; // Source rgba image data (image_image) image src_image{ src_data_pointer, src_size }; // Destination rgba image data (image_image) image dst_image{ dst_size }; (void)resize_lanczos(queue, src_image, dst_image);