Gestro
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
GestureDetection::Capture Class Reference

runs a thread to start camera and capture image More...

#include <Capture.h>

Collaboration diagram for GestureDetection::Capture:
Collaboration graph

Public Member Functions

 Capture ()
 
void init (Gestro::CaptureAndDetectCallbackInterface *, int, int)
 
void start ()
 
void stop ()
 

Public Attributes

bool running = false
 boolean to check if cmaera is running More...
 

Private Member Functions

void imageCap ()
 

Private Attributes

thread uthread
 thread to start image capture More...
 
Gestro::CaptureAndDetectCallbackInterfacecallback
 callback to capture and detect More...
 
int height
 resolution height More...
 
int width
 resolution width More...
 
Mat frame
 captured frame More...
 
VideoCapture * capture
 pointer to VideoCapture More...
 

Detailed Description

runs a thread to start camera and capture image

A class that captures images from the webcam and calls the callback function with the image.

Definition at line 18 of file Capture.h.

Constructor & Destructor Documentation

◆ Capture()

Capture::Capture ( )

The constructor for the class.

Definition at line 3 of file Capture.cpp.

Member Function Documentation

◆ imageCap()

void Capture::imageCap ( )
private

It captures an image from the webcam, and then calls the callback function with the image

Definition at line 32 of file Capture.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

void Capture::init ( Gestro::CaptureAndDetectCallbackInterface interface,
int  width,
int  height 
)

It initializes the Capture class with the width and height of the image to be captured, and a pointer to the DetectInterface class

Parameters
interfaceThe interface that will be called when a new frame is available.
widthThe width of the image to be captured.
heightThe height of the image to be captured.

Definition at line 5 of file Capture.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start()

void Capture::start ( )

It starts a thread that runs the imageCap function to read Images

Definition at line 22 of file Capture.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop()

void Capture::stop ( )

It stops the capture thread by setting the running flag to false, and then waits for the thread to finish

Definition at line 27 of file Capture.cpp.

Member Data Documentation

◆ callback

Gestro::CaptureAndDetectCallbackInterface* GestureDetection::Capture::callback
private

callback to capture and detect

Definition at line 55 of file Capture.h.

◆ capture

VideoCapture* GestureDetection::Capture::capture
private

pointer to VideoCapture

Definition at line 67 of file Capture.h.

◆ frame

Mat GestureDetection::Capture::frame
private

captured frame

Definition at line 64 of file Capture.h.

◆ height

int GestureDetection::Capture::height
private

resolution height

Definition at line 58 of file Capture.h.

◆ running

bool GestureDetection::Capture::running = false

boolean to check if cmaera is running

Definition at line 22 of file Capture.h.

◆ uthread

thread GestureDetection::Capture::uthread
private

thread to start image capture

Definition at line 52 of file Capture.h.

◆ width

int GestureDetection::Capture::width
private

resolution width

Definition at line 61 of file Capture.h.


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