UH-OH

It looks like you don’t have access to that feature yet

Contact sales to get upgraded to the full DevStudio experience.

UH-OH

It looks like you don't have access to that feature yet.

to select
to navigate
escto close
Chimera Compute Library (CCL) API ReferenceImage ProcessingImage Transformations

Image Transformations

Crop

File: /src/image.hppLines 825–899
    /**
     * @brief Crops a sub-section of an image. Crop coordinates can be specified at runtime.
     *
     * ```
     *                                   Figure: Crop area with top-left corner unaligned
     *      --------------------------------------------------------------------------------------------------------
     *  TopLeftCorner:(xTopLeft, yTopLeft)                                                                         |
     *      |       \          !                                                                                   |
     *      |        \|<-----------------------Width of sub region---------------------------->|                   |
     *      |         *********!****************************************************************--                 |
     *      |         *        !                                                               * ^                 |
     *      |         *        !                                                               * |                 |
     *      |         *        !                                                               * |                 |
     *      |         *        !                                                               * |                 |
     *      |         *        !                                                               * |                 |
     *      |         *        !                     Crop Area                                 * Height            |
     *      |         *        !                                                               * of sub            |
     *      |         *        !                                                               * region            |
     *      |         *        !                                                               *                   |
     *      |         *        !                                                               * |                 |
     *      |         *        !                                                               * |                 |
     *      |         *        !                                                               * |                 |
     *      |         *        !                                                               * v                 |
     *      |         *********!****************************************************************--                 |
     *      |                  !                                                                                   |
     *      |                  !                                                                                   |
     *      |                  !                                                                                   |
     *      |                  !                                                                                   |
     *      |                  !                                                                                   |
     *      --------------------------------------------------------------------------------------------------------
     *      \_______  ________/
     *              \/
     *    core_array::coreDim * 4
     *
     *
     *                                   Figure: Crop area with top-left corner aligned
     *      --------------------------------------------------------------------------------------------------------
     *      | TopLeftCorner:(xTopLeft, yTopLeft)                                                                   |
     *      |                \ !                                                                                   |
     *      |                 \|<-----------------------Width of sub region---------------------------->|          |
     *      |                  **************************************************************************--        |
     *      |                  *                                                                        * ^        |
     *      |                  *                                                                        * |        |
     *      |                  *                                                                        * |        |
     *      |                  *                                                                        * |        |
     *      |                  *                                                                        * |        |
     *      |                  *                              Crop Area                                 * Height   |
     *      |                  *                                                                        * of sub   |
     *      |                  *                                                                        * region   |
     *      |                  *                                                                        *          |
     *      |                  *                                                                        * |        |
     *      |                  *                                                                        * |        |
     *      |                  *                                                                        * |        |
     *      |                  *                                                                        * v        |
     *      |                  **************************************************************************--        |
     *      |                  !                                                                                   |
     *      |                  !                                                                                   |
     *      |                  !                                                                                   |
     *      |                  !                                                                                   |
     *      |                  !                                                                                   |
     *      --------------------------------------------------------------------------------------------------------
     *      \_______  ________/
     *              \/
     *    core_array::coreDim * 4
     * ```
     *
     * @tparam DdrInTensor Input DDR tensor shape.
     * @tparam DdrOutTensor Output DDR tensor shape.
     * @param ddrInp Pointer to input DDR tensor.
     * @param xTopLeft x coordinate of top left corner of crop area.
     * @param yTopLeft y coordinate of top left corner of crop area.
     * @param ddrOut Pointer to output DDR tensor.
     */
    template <typename DdrInTensor, typename DdrOutTensor>
    INLINE void crop(DdrInTensor& ddrInp, std::uint32_t xTopLeft, std::uint32_t yTopLeft, DdrOutTensor& ddrOut) {

Resize

For the general-purpose tensor resize API (chimera::image::resize, including DDR/multicore variants), see Image Resize. The overload below resizes 3-channel planar images with optional fused color conversion.

File: /src/image.hppLines 2796–2825
    /**
     * @brief Resize a 3-channel planar image.
     *
     * Input tensor shape must be of form `(1, channels, height, width)`.
     * Output tensor shape must be of form `(1, channels, resized_height, num_channels)`.
     *
     * @tparam resizeMethod Selection of resize method.
     * @tparam coordinateTransform Selection of coordinate transform method.
     * @tparam convertMethod Color conversion method used is `ColorConversionMethod::NO_CONVERSION`.
     * @tparam OcmAllocatorType Type of ocm allocator.
     * @tparam OcmInputImageShape The shape of the input image.
     * @tparam OcmOutputImageShape The shape of the output image.
     * @param ocmInputImage The input image tensor.
     * @param ocmOutputImage The output image tensor.
     * @param ocmMemAlloc ocm allocator to be used locally.
     * @return void
     */
    template <ResizeMethod          resizeMethod,
              CoordinateTransform   coordinateTransform = CoordinateTransform::HALF_PIXEL,
              ColorConversionMethod convertMethod       = ColorConversionMethod::NO_CONVERSION,
              typename OcmAllocatorType                 = EmptyType,
              typename OcmInputImageShape,
              typename OcmOutputImageShape,
              std::enable_if_t<resizeMethod != ResizeMethod::BILINEAR_INTERPOLATION_MULTISTEP &&
                                 resizeMethod != ResizeMethod::BILINEAR_INTERPOLATION_ASYMMETRIC &&
                                 resizeMethod != ResizeMethod::BILINEAR_INTERPOLATION_HALF_PIXEL,
                               int> = 0>
    INLINE void resizeImage(OcmInputImageShape&     ocmInputImage,
                            OcmOutputImageShape&    ocmOutputImage,
                            const OcmAllocatorType& ocmMemAlloc = EmptyType()) {
Table of Contents


© Copyright 2026 Quadric All Rights Reserved • Privacy Policy
This documentation is preliminary and confidential. It is subject to change. Quadric does not give any warranty express or implied that the contents will be complete or accurate or up to date. The company shall not be liable for any loss, actions, claims, proceedings, demands or costs or damages whatsoever or howsoever caused arising directly or indirectly in connection with or arising out of the use of this material.

Sign in to your account

Don't have an account? Create an Account
By signing in, you are agreeing to our Terms of Use and Privacy Policy.

Develop.

Simulate.

Profile.

Collaborate.

We use cookies to enhance your browsing experience, and analyze our traffic.
By clicking "Accept All", you consent to our use of cookies.