JeVoisBase  1.22
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
Loading...
Searching...
No Matches
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.
 
 hsvcue (unsigned char h, unsigned char hsig, unsigned char s, unsigned char ssig, unsigned char v, unsigned char vsig)
 Constructor.
 
void fix ()
 Fix ranges so they don't go out of bounds.
 
cv::Scalar rmin () const
 Get minimum triplet for use by cv::inRange()
 
cv::Scalar rmax () const
 Get maximum triplet for use by cv::inRange()
 

Public Attributes

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

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 305 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 308 of file FirstVision.C.

References fix(), and h.

◆ 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 312 of file FirstVision.C.

References fix(), and h.

Member Function Documentation

◆ fix()

void FirstVision::hsvcue::fix ( )
inline

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

Definition at line 317 of file FirstVision.C.

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

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

◆ rmax()

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

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

Definition at line 329 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 325 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 332 of file FirstVision.C.

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

◆ mus

float FirstVision::hsvcue::mus

Definition at line 333 of file FirstVision.C.

Referenced by fix(), and rmin().

◆ muv

float FirstVision::hsvcue::muv

Definition at line 334 of file FirstVision.C.

Referenced by fix(), and rmin().

◆ sih

float FirstVision::hsvcue::sih

Mean and sigma for H.

Definition at line 332 of file FirstVision.C.

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

◆ sis

float FirstVision::hsvcue::sis

Mean and sigma for S.

Definition at line 333 of file FirstVision.C.

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

◆ siv

float FirstVision::hsvcue::siv

Mean and sigma for V.

Definition at line 334 of file FirstVision.C.

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


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