.. SPDX-FileCopyrightText: 2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 .. _resize_bicubic: Resize with Bicubic Interpolation ================================== Changes an image size using interpolation with two-parameter cubic filters. .. rubric:: Description :class: sectiontitle This function changes an image size using interpolation with two-parameter cubic filters. The image size may be either reduced or increased in each direction, depending on the destination image size. This method must use source image intensities at sixteen pixels in the neighborhood of the point in the source image. Cubic filter parameters must be set through the ``resize_bicubic_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_bicubic.hpp`` .. rubric:: Syntax :class: sectiontitle .. doxygenfunction:: oneapi::ipl::resize_bicubic(sycl::queue&, image&, image&, const resize_bicubic_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. * - bicubic filter parameters support - b and c factors. Possible values are: ``b_factor = 0, c_factor = 0.5`` - Catmull-Rome spline. .. _resize_bicubic_spec: .. doxygenclass:: oneapi::ipl::resize_bicubic_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. * - ``unimplemented`` exception - Indicates an error when bicubic filter factors are not supported. The code example below demonstrates how to use the ``oneapi::ipl::resize_bicubic``: .. 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_bicubic(queue, src_image, dst_image);