OpenEV
Extending OpenCV to event-based vision
Loading...
Searching...
No Matches
ev::Circ_< T > Struct Template Reference

This class defines a circle given its center and radius. More...

#include <types.hpp>

Public Member Functions

 Circ_ ()
 Circ_ (const cv::Point_< T > center, const T radius)
bool empty () const
 Check if empty.
template<typename Te>
bool contains (const Event_< Te > &e) const
 Check if the circle contains an event.
cv::Size size () const
 Bounding square of the circle as a cv::Size (radius × radius).
double area () const
 Compute the area of the circle.

Public Attributes

cv::Point_< T > center
radius

Detailed Description

template<typename T>
struct ev::Circ_< T >

This class defines a circle given its center and radius.

Analogously to OpenCV library, the following aliases are defined for convenience:

using Circi = Circ_<int>;
using Circ = Circi;
Circ_()
Definition types.hpp:510
Circ_< long > Circl
Definition types.hpp:556
Circ_< double > Circd
Definition types.hpp:558
Circ_< int > Circi
Definition types.hpp:555
Circ_< float > Circf
Definition types.hpp:557
Circi Circ
Definition types.hpp:559

Constructor & Destructor Documentation

◆ Circ_() [1/2]

template<typename T>
ev::Circ_< T >::Circ_ ( )
inline

Default constructor.

◆ Circ_() [2/2]

template<typename T>
ev::Circ_< T >::Circ_ ( const cv::Point_< T > center,
const T radius )
inline

Constructor using center and radius.

Parameters
centerCenter
radiusRadius

Member Function Documentation

◆ area()

template<typename T>
double ev::Circ_< T >::area ( ) const
inlinenodiscard

Compute the area of the circle.

Area is computed as \( \pi r^2 \).

Returns
Area

◆ contains()

template<typename T>
template<typename Te>
bool ev::Circ_< T >::contains ( const Event_< Te > & e) const
inlinenodiscard

Check if the circle contains an event.

Parameters
eEvent to check
Returns
True if the event is inside
Warning
This function assumes that the boundary of the circle is inclusive.

◆ empty()

template<typename T>
bool ev::Circ_< T >::empty ( ) const
inlinenodiscard

Check if empty.

Returns
True if empty

◆ size()

template<typename T>
cv::Size ev::Circ_< T >::size ( ) const
inlinenodiscard

Bounding square of the circle as a cv::Size (radius × radius).

Returns
Size with width and height equal to the radius.

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