.. SPDX-FileCopyrightText: 2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 .. _mirror: Mirror ====== Mirrors an image about the specified axis. .. rubric:: Description :class: sectiontitle This function mirrors the source image about the axis defined in ``mirror_spec`` class. This function supports only vertical axis and uses it by default. This function can operate with ROI (see :ref:`image-regions-of-interest`). .. rubric:: Headers :class: sectiontitle ``oneapi/ipl/transform/mirror.hpp`` .. rubric:: Syntax :class: sectiontitle .. doxygenfunction:: oneapi::ipl::mirror :project: oneIPL .. rubric:: Parameters :class: sectiontitle .. list-table:: :header-rows: 0 * - axis type support - Type of axis. Possible values are: ``vertical`` - Specifies the vertical axis to mirror the image about. .. doxygenclass:: oneapi::ipl::mirror_spec :project: oneIPL :members: .. 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:: 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 ROI sizes of the source image and the destination image are not equal. * - ``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 axis defined in mirror specification class has an illegal value. The code example below demonstrates how to use the ``oneapi::ipl::mirror``: .. code-block:: cpp // Create queue sycl::queue queue{}; // Create source and destination images image src_image{ src_data_pointer, size }; image dst_image{ size }; // Create mirror image. Axis of mirror is vertical by default (void)mirror(queue, src_image, dst_image);