JeVoisBase  1.9
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
FirstVision::hsvcue Struct Reference

Helper struct for an HSV range triplet, where each range is specified as a mean and sigma: More...

Public Member Functions

 hsvcue (unsigned char h, unsigned char s, unsigned char v)
 Constructor. More...
 
 hsvcue (unsigned char h, unsigned char hsig, unsigned char s, unsigned char ssig, unsigned char v, unsigned char vsig)
 Constructor. More...
 
void fix ()
 Fix ranges so they don't go out of bounds. More...
 
cv::Scalar rmin () const
 Get minimum triplet for use by cv::inRange() More...
 
cv::Scalar rmax () const
 Get maximum triplet for use by cv::inRange() More...
 

Public Attributes

float muh
 
float sih
 Mean and sigma for H. More...
 
float mus
 
float sis
 Mean and sigma for S. More...
 
float muv
 
float siv
 Mean and sigma for V. More...
 

Detailed Description

Helper struct for an HSV range triplet, where each range is specified as a mean and sigma:

Note that sigma is used differently for H, S, and V, under the assumption that we want to track a bright target: For H, the range is [mean-sigma .. mean+sigma]. For S and V, the range is [mean-sigma .. 255]. See rmin() and rmax() for details.

Definition at line 311 of file FirstVision.C.

Constructor & Destructor Documentation

◆ hsvcue() [1/2]

FirstVision::hsvcue::hsvcue ( unsigned char  h,
unsigned char  s,
unsigned char  v 
)
inline

Constructor.

Definition at line 314 of file FirstVision.C.

References fix().

◆ hsvcue() [2/2]

FirstVision::hsvcue::hsvcue ( unsigned char  h,
unsigned char  hsig,
unsigned char  s,
unsigned char  ssig,
unsigned char  v,
unsigned char  vsig 
)
inline

Constructor.

Definition at line 318 of file FirstVision.C.

References fix().

Member Function Documentation

◆ fix()

void FirstVision::hsvcue::fix ( )
inline

Fix ranges so they don't go out of bounds.

Definition at line 323 of file FirstVision.C.

References muh, mus, muv, sih, sis, and siv.

Referenced by hsvcue(), and FirstVision::updateHSV().

◆ rmax()

cv::Scalar FirstVision::hsvcue::rmax ( ) const
inline

Get maximum triplet for use by cv::inRange()

Definition at line 335 of file FirstVision.C.

References muh, and sih.

Referenced by FirstVision::detect().

◆ rmin()

cv::Scalar FirstVision::hsvcue::rmin ( ) const
inline

Get minimum triplet for use by cv::inRange()

Definition at line 331 of file FirstVision.C.

References muh, mus, muv, sih, sis, and siv.

Referenced by FirstVision::detect().

Member Data Documentation

◆ muh

float FirstVision::hsvcue::muh

Definition at line 338 of file FirstVision.C.

Referenced by fix(), rmax(), and rmin().

◆ mus

float FirstVision::hsvcue::mus

Definition at line 339 of file FirstVision.C.

Referenced by fix(), and rmin().

◆ muv

float FirstVision::hsvcue::muv

Definition at line 340 of file FirstVision.C.

Referenced by fix(), and rmin().

◆ sih

float FirstVision::hsvcue::sih

Mean and sigma for H.

Definition at line 338 of file FirstVision.C.

Referenced by fix(), FirstVision::learnHSV(), rmax(), rmin(), and FirstVision::updateHSV().

◆ sis

float FirstVision::hsvcue::sis

Mean and sigma for S.

Definition at line 339 of file FirstVision.C.

Referenced by fix(), FirstVision::learnHSV(), rmin(), and FirstVision::updateHSV().

◆ siv

float FirstVision::hsvcue::siv

Mean and sigma for V.

Definition at line 340 of file FirstVision.C.

Referenced by fix(), FirstVision::learnHSV(), rmin(), and FirstVision::updateHSV().


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