CoreFlow 1.0.0
A modern orchestration and execution runtime
Loading...
Searching...
No Matches
_vx_imagepatch_addressing_t Struct Reference

The addressing image patch structure is used by the Host only to address pixels in an image patch. The fields of the structure are defined as: More...

#include <vx_types.h>

Public Attributes

vx_uint32 dim_x
 Width of patch in X dimension in pixels.
 
vx_uint32 dim_y
 Height of patch in Y dimension in pixels.
 
vx_int32 stride_x
 Stride in X dimension in bytes.
 
vx_int32 stride_y
 Stride in Y dimension in bytes.
 
vx_uint32 scale_x
 Scale of X dimension. For sub-sampled planes this is the scaling factor of the dimension of the plane in relation to the zero plane. Use VX_SCALE_UNITY in the numerator.
 
vx_uint32 scale_y
 Scale of Y dimension. For sub-sampled planes this is the scaling factor of the dimension of the plane in relation to the zero plane. Use VX_SCALE_UNITY in the numerator.
 
vx_uint32 step_x
 Step of X dimension in pixels.
 
vx_uint16 step_y
 Step of Y dimension in pixels.
 
vx_uint16 stride_x_bits
 Stride in X dimension in bits. Used when stride_x is not an integer number of bytes.
 

Detailed Description

The addressing image patch structure is used by the Host only to address pixels in an image patch. The fields of the structure are defined as:

  • dim - The dimensions of the image in logical pixel units in the x & y direction.
  • stride - The physical byte distance from a logical pixel to the next logically adjacent pixel in the positive x or y direction.
  • scale - The relationship of scaling from the primary plane (typically the zero indexed plane) to this plane. An integer down-scaling factor of \( f \) shall be set to a value equal to \( scale = \frac{unity}{f} \) and an integer up-scaling factor of \( f \) shall be set to a value of \( scale = unity * f \). \( unity \) is defined as VX_SCALE_UNITY.
  • step - The step is the number of logical pixel units to skip to arrive at the next physically unique pixel. For example, on a plane that is half-scaled in a dimension, the step in that dimension is 2 to indicate that every other pixel in that dimension is an alias. This is useful in situations where iteration over unique pixels is required, such as in serializing or de-serializing the image patch information.
    See also
    vxMapImagePatch
    Note
    For VX_DF_IMAGE_U1 images it is defined that stride_x == 0 since it is less than one byte. The least significant bit (bit number 0, value 1) in the first byte in the image, is the left-most pixel in the upper left corner, i.e. origo. A VX_DF_IMAGE_U1 image always start on a byte boundary and each row has a stride_y that is a multiple of whole bytes, which means padding bits of undefined value may be present at the end of each row. Imagepatches can only be accessed at a multiple of eight pixels: the x-coordinate must be a multiple of eight. Individual pixel access is also different: the byte at the imagepatch-calculated pointer value is a collection of eight pixels. Each byte can then be masked with the bit-mask 1 << (x % 8) to get individual pixel values (shifted x times). See ref sub_image_access for an example.

Member Data Documentation

◆ dim_x

vx_uint32 _vx_imagepatch_addressing_t::dim_x

Width of patch in X dimension in pixels.

◆ dim_y

vx_uint32 _vx_imagepatch_addressing_t::dim_y

Height of patch in Y dimension in pixels.

◆ scale_x

vx_uint32 _vx_imagepatch_addressing_t::scale_x

Scale of X dimension. For sub-sampled planes this is the scaling factor of the dimension of the plane in relation to the zero plane. Use VX_SCALE_UNITY in the numerator.

◆ scale_y

vx_uint32 _vx_imagepatch_addressing_t::scale_y

Scale of Y dimension. For sub-sampled planes this is the scaling factor of the dimension of the plane in relation to the zero plane. Use VX_SCALE_UNITY in the numerator.

◆ step_x

vx_uint32 _vx_imagepatch_addressing_t::step_x

Step of X dimension in pixels.

◆ step_y

vx_uint16 _vx_imagepatch_addressing_t::step_y

Step of Y dimension in pixels.

◆ stride_x

vx_int32 _vx_imagepatch_addressing_t::stride_x

Stride in X dimension in bytes.

Examples
canny.cpp, optical_flow.cpp, orb.cpp, and skinToneDetector.cpp.

◆ stride_x_bits

vx_uint16 _vx_imagepatch_addressing_t::stride_x_bits

Stride in X dimension in bits. Used when stride_x is not an integer number of bytes.

◆ stride_y

vx_int32 _vx_imagepatch_addressing_t::stride_y

Stride in Y dimension in bytes.

Examples
bubble_pop.cpp, canny.cpp, optical_flow.cpp, orb.cpp, and skinToneDetector.cpp.