Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
tensorflowobject Namespace Reference

Namespace containing functions related to tensorflow object detection operations on images. More...

Classes

struct  TensorflowObject
 Represents a single depth object detection from a tensorflow model. Stores all information about a specific object detection. More...
 

Functions

cv::Point2f FindObjectCenter (const TensorflowObject &stObject)
 Given an TensorflowObject struct find the center point of the corners.
 
std::vector< TensorflowObjectDetect (const cv::Mat &cvFrame)
 Detect objects in the given image using a tensorflow model.
 

Detailed Description

Namespace containing functions related to tensorflow object detection operations on images.

Author
clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
Date
2023-10-23

Function Documentation

◆ FindObjectCenter()

cv::Point2f tensorflowobject::FindObjectCenter ( const TensorflowObject stObject)
inline

Given an TensorflowObject struct find the center point of the corners.

Parameters
stObject- The object to find the center of.
Returns
cv::Point2f - The resultant center point within the image.
Author
jspencerpittman (jspen.nosp@m.cerp.nosp@m.ittma.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
Date
2023-10-07
69 {
70 // Average of the four corners
71 cv::Point2f cvCenter(0, 0);
72
73 // Loop through each corner of the object.
74 for (cv::Point2f* cvCorner : stObject.vCorners)
75 {
76 // Add each object x, y to the center x, y.
77 cvCenter.x += cvCorner->x;
78 cvCenter.y += cvCorner->y;
79 }
80 // Divide by number of corners.
81 cvCenter.x /= 4;
82 cvCenter.y /= 4;
83
84 // Return a copy of the center point of the object.
85 return cvCenter;
86 }

◆ Detect()

std::vector< TensorflowObject > tensorflowobject::Detect ( const cv::Mat cvFrame)
inline

Detect objects in the given image using a tensorflow model.

Parameters
cvFrame- The normal BGR or BGRA image from the camera.
tfNeuralNetwork- The tensorflow model to use for detection.
Returns
std::vector<TensorflowObject> - A vector containing all of the inferenced objects from the model.
Author
clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
Date
2023-10-23
100 {
101 // TODO: Write different util classes to easily open and inference new models. Then put object detection specific inferencing here.
102 cvFrame.empty();
103 return std::vector<TensorflowObject>();
104 }
bool empty() const
Here is the call graph for this function: