Critical Link MityCam SoC Firmware  1.0
Critical Link MityCam SoC Firmware
SocCamera::ROI Class Reference

#include <ROI.h>

Collaboration diagram for SocCamera::ROI:

Public Member Functions

 ROI (int32_t anStartRow, int32_t anStartColumn, int32_t anWidth, int32_t anHeight)
 ROI. More...
 
 ROI ()
 ROI Make an invalid ROI. More...
 
int32_t x () const
 
int32_t y () const
 
int32_t width () const
 
int32_t height () const
 
int32_t getEndRow () const
 getEndRow Get the end row coordinate. Related to the y-axis (vertical) More...
 
int32_t getEndColumn () const
 getEndColumn Get the end column coordinate. Related to the x-axis (horizontal) More...
 
std::string toString () const
 toString Create printable string to describe this ROI for debug More...
 
bool validateNonZero () const
 validateNonZero Validate that all the parameters are positive and width/height are non-zero More...
 
bool validateBounds (int32_t anMaxWidth, int32_t anMaxHeight) const
 validateBounds Validate that selected ROI is within sensor width/height More...
 
bool validateWidthIsMultiple (int32_t anStartColumnMultiple, int32_t anWidthMultiple) const
 validateWidthIsMultiple Validate if width and start column is a multiple of provided parameters More...
 
bool validateWidthIsMultiple (int32_t anMultiple) const
 validateWidthIsMultiple Validate if width and start column is a multiple of anMultiple More...
 
bool validateHeightIsMultiple (int32_t anStartRowMultiple, int32_t anHeightMultiple) const
 validateHeightIsMultiple Validate if height and start row is a multiple of provided parameters More...
 
bool validateHeightIsMultiple (int32_t anMultiple) const
 validateHeightIsMultiple Validate if height and start row is a multiple of anMultiple More...
 
bool validateWidthIsCentered (int32_t anMaxWidth) const
 validateWidthIsCentered Validate if ROI is horizontally centered More...
 
bool validateHeightIsCentered (int32_t anMaxHeight) const
 validateHeightIsCentered Validate if ROI is vertically centered More...
 

Public Attributes

int32 mnStartRow
 
int32 mnStartColumn
 
int32 mnWidth
 
int32 mnHeight
 

Constructor & Destructor Documentation

◆ ROI() [1/2]

ROI::ROI ( int32_t  anStartRow,
int32_t  anStartColumn,
int32_t  anWidth,
int32_t  anHeight 
)

ROI.

Parameters
anStartRow
anStartColumn
anWidth
anHeight

◆ ROI() [2/2]

ROI::ROI ( )

ROI Make an invalid ROI.

Member Function Documentation

◆ getEndColumn()

int32_t SocCamera::ROI::getEndColumn ( ) const
inline

getEndColumn Get the end column coordinate. Related to the x-axis (horizontal)

Returns

◆ getEndRow()

int32_t SocCamera::ROI::getEndRow ( ) const
inline

getEndRow Get the end row coordinate. Related to the y-axis (vertical)

Returns

◆ height()

int32_t SocCamera::ROI::height ( ) const
inline

◆ toString()

std::string ROI::toString ( ) const

toString Create printable string to describe this ROI for debug

Returns

◆ validateBounds()

bool SocCamera::ROI::validateBounds ( int32_t  anMaxWidth,
int32_t  anMaxHeight 
) const
inline

validateBounds Validate that selected ROI is within sensor width/height

Parameters
anMaxWidthLargest width of sensor
anMaxHeightLargest height of sensor
Returns
True if valid

◆ validateHeightIsCentered()

bool SocCamera::ROI::validateHeightIsCentered ( int32_t  anMaxHeight) const
inline

validateHeightIsCentered Validate if ROI is vertically centered

Parameters
anMaxHeightLargest height of Sensor
Returns
True if valid

◆ validateHeightIsMultiple() [1/2]

bool SocCamera::ROI::validateHeightIsMultiple ( int32_t  anMultiple) const
inline

validateHeightIsMultiple Validate if height and start row is a multiple of anMultiple

Parameters
anMultipleEnsure height and row are multiples of this number
Returns
True if valid

◆ validateHeightIsMultiple() [2/2]

bool SocCamera::ROI::validateHeightIsMultiple ( int32_t  anStartRowMultiple,
int32_t  anHeightMultiple 
) const
inline

validateHeightIsMultiple Validate if height and start row is a multiple of provided parameters

Parameters
anStartRowMultipleEnsure start row is multiple of this number
anHeightMultipleEnsure height is multiple of this number
Returns
True if valid

◆ validateNonZero()

bool SocCamera::ROI::validateNonZero ( ) const
inline

validateNonZero Validate that all the parameters are positive and width/height are non-zero

Returns
True if valid

◆ validateWidthIsCentered()

bool SocCamera::ROI::validateWidthIsCentered ( int32_t  anMaxWidth) const
inline

validateWidthIsCentered Validate if ROI is horizontally centered

Parameters
anMaxWidthLargest width of Sensor
Returns
True if valid

◆ validateWidthIsMultiple() [1/2]

bool SocCamera::ROI::validateWidthIsMultiple ( int32_t  anMultiple) const
inline

validateWidthIsMultiple Validate if width and start column is a multiple of anMultiple

Parameters
anMultipleEnsure width and column are multiples of this number
Returns
True if valid

◆ validateWidthIsMultiple() [2/2]

bool SocCamera::ROI::validateWidthIsMultiple ( int32_t  anStartColumnMultiple,
int32_t  anWidthMultiple 
) const
inline

validateWidthIsMultiple Validate if width and start column is a multiple of provided parameters

Parameters
anStartColumnMultipleEnsure start column is multiple of this number
anWidthMultipleEnsure width is multiple of this number
Returns
True if valid

◆ width()

int32_t SocCamera::ROI::width ( ) const
inline

◆ x()

int32_t SocCamera::ROI::x ( ) const
inline

◆ y()

int32_t SocCamera::ROI::y ( ) const
inline

Member Data Documentation

◆ mnHeight

int32 SocCamera::ROI::mnHeight

◆ mnStartColumn

int32 SocCamera::ROI::mnStartColumn

◆ mnStartRow

int32 SocCamera::ROI::mnStartRow

◆ mnWidth

int32 SocCamera::ROI::mnWidth

The documentation for this class was generated from the following files: