VART-X  0.4.0
vart::InferResScaleInfo Struct Reference

Geometry consumed by InferResult::transform() to map results to the original input frame. More...

#include <vart_inferresult_types.hpp>

Public Attributes

uint32_t model_input_width = 0
 
uint32_t model_input_height = 0
 
uint32_t input_frame_width = 0
 
uint32_t input_frame_height = 0
 
float scale_x = 0.0f
 
float scale_y = 0.0f
 
int32_t crop_x = 0
 
int32_t crop_y = 0
 
int32_t pad_x = 0
 
int32_t pad_y = 0
 

Detailed Description

Geometry consumed by InferResult::transform() to map results to the original input frame.

Inverse applied by transform(): orig = crop + (model - pad) / scale

When scale_x and scale_y are 0, transform() uses the legacy dimension-ratio path from the four size fields (uniform stretch).

Member Data Documentation

◆ crop_x

vart::InferResScaleInfo::crop_x = 0

Source crop origin on the input frame (e.g. PANSCAN)

◆ crop_y

vart::InferResScaleInfo::crop_y = 0

Source crop origin on the input frame (e.g. PANSCAN)

◆ input_frame_height

vart::InferResScaleInfo::input_frame_height = 0

Height of the input frame

◆ input_frame_width

vart::InferResScaleInfo::input_frame_width = 0

Width of the input frame

◆ model_input_height

vart::InferResScaleInfo::model_input_height = 0

Height of the model input tensor

◆ model_input_width

vart::InferResScaleInfo::model_input_width = 0

Width of the model input tensor

◆ pad_x

vart::InferResScaleInfo::pad_x = 0

Letterbox padding offset on the model input (content start X)

◆ pad_y

vart::InferResScaleInfo::pad_y = 0

Letterbox padding offset on the model input (content start Y)

◆ scale_x

vart::InferResScaleInfo::scale_x = 0.0f

Model pixels per original pixel on X; 0 selects dimension-ratio fallback

◆ scale_y

vart::InferResScaleInfo::scale_y = 0.0f

Model pixels per original pixel on Y; 0 selects dimension-ratio fallback


The documentation for this struct was generated from the following file: