PhotonVision C++ dev-v2025.0.0-beta-8-2-gbd1c5c03
Loading...
Searching...
No Matches
photon::VideoSimUtil Namespace Reference

Functions

static cv::Mat Get36h11TagImage (int id)
 
static std::unordered_map< int, cv::Mat > LoadAprilTagImages ()
 
static std::vector< cv::Point2f > GetImageCorners (const cv::Size &size)
 
static std::vector< cv::Point2f > Get36h11MarkerPts (int scale)
 
static std::vector< cv::Point2f > Get36h11MarkerPts ()
 
static void UpdateVideoProp (cs::CvSource &video, const SimCameraProperties &prop)
 
static void Warp165h5TagImage (int tagId, const std::vector< cv::Point2f > &dstPoints, bool antialiasing, cv::Mat &destination)
 
static double GetScaledThickness (double thickness480p, const cv::Mat &destinationMat)
 
static void DrawInscribedEllipse (const std::vector< cv::Point2f > &dstPoints, const cv::Scalar &color, cv::Mat &destination)
 
static void DrawPoly (const std::vector< cv::Point2f > &dstPoints, int thickness, const cv::Scalar &color, bool isClosed, cv::Mat &destination)
 
static void DrawTagDetection (int id, const std::vector< cv::Point2f > &dstPoints, cv::Mat &destination)
 
static std::vector< std::vector< frc::Translation3d > > GetFieldWallLines ()
 
static std::vector< std::vector< frc::Translation3d > > GetFieldFloorLines (int subdivisions)
 
static std::vector< std::vector< cv::Point2f > > PolyFrom3dLines (const RotTrlTransform3d &camRt, const SimCameraProperties &prop, const std::vector< frc::Translation3d > &trls, double resolution, bool isClosed, cv::Mat &destination)
 
static void DrawFieldWireFrame (const RotTrlTransform3d &camRt, const SimCameraProperties &prop, double resolution, double wallThickness, const cv::Scalar &wallColor, int floorSubdivisions, double floorThickness, const cv::Scalar &floorColor, cv::Mat &destination)
 

Variables

static constexpr int kNumTags36h11 = 30
 
static constexpr units::meter_t fieldLength {16.54175_m}
 
static constexpr units::meter_t fieldWidth {8.0137_m}
 
static const std::unordered_map< int, cv::Mat > kTag36h11Images
 
static const std::vector< cv::Point2f > kTag36h11MarkPts = Get36h11MarkerPts()
 

Function Documentation

◆ DrawFieldWireFrame()

static void photon::VideoSimUtil::DrawFieldWireFrame ( const RotTrlTransform3d & camRt,
const SimCameraProperties & prop,
double resolution,
double wallThickness,
const cv::Scalar & wallColor,
int floorSubdivisions,
double floorThickness,
const cv::Scalar & floorColor,
cv::Mat & destination )
static

◆ DrawInscribedEllipse()

static void photon::VideoSimUtil::DrawInscribedEllipse ( const std::vector< cv::Point2f > & dstPoints,
const cv::Scalar & color,
cv::Mat & destination )
static

◆ DrawPoly()

static void photon::VideoSimUtil::DrawPoly ( const std::vector< cv::Point2f > & dstPoints,
int thickness,
const cv::Scalar & color,
bool isClosed,
cv::Mat & destination )
static

◆ DrawTagDetection()

static void photon::VideoSimUtil::DrawTagDetection ( int id,
const std::vector< cv::Point2f > & dstPoints,
cv::Mat & destination )
static

◆ Get36h11MarkerPts() [1/2]

static std::vector< cv::Point2f > photon::VideoSimUtil::Get36h11MarkerPts ( )
static

◆ Get36h11MarkerPts() [2/2]

static std::vector< cv::Point2f > photon::VideoSimUtil::Get36h11MarkerPts ( int scale)
static

◆ Get36h11TagImage()

static cv::Mat photon::VideoSimUtil::Get36h11TagImage ( int id)
static

◆ GetFieldFloorLines()

static std::vector< std::vector< frc::Translation3d > > photon::VideoSimUtil::GetFieldFloorLines ( int subdivisions)
static

◆ GetFieldWallLines()

static std::vector< std::vector< frc::Translation3d > > photon::VideoSimUtil::GetFieldWallLines ( )
static

◆ GetImageCorners()

static std::vector< cv::Point2f > photon::VideoSimUtil::GetImageCorners ( const cv::Size & size)
static

◆ GetScaledThickness()

static double photon::VideoSimUtil::GetScaledThickness ( double thickness480p,
const cv::Mat & destinationMat )
static

◆ LoadAprilTagImages()

static std::unordered_map< int, cv::Mat > photon::VideoSimUtil::LoadAprilTagImages ( )
static

◆ PolyFrom3dLines()

static std::vector< std::vector< cv::Point2f > > photon::VideoSimUtil::PolyFrom3dLines ( const RotTrlTransform3d & camRt,
const SimCameraProperties & prop,
const std::vector< frc::Translation3d > & trls,
double resolution,
bool isClosed,
cv::Mat & destination )
static

◆ UpdateVideoProp()

static void photon::VideoSimUtil::UpdateVideoProp ( cs::CvSource & video,
const SimCameraProperties & prop )
static

◆ Warp165h5TagImage()

static void photon::VideoSimUtil::Warp165h5TagImage ( int tagId,
const std::vector< cv::Point2f > & dstPoints,
bool antialiasing,
cv::Mat & destination )
static

Variable Documentation

◆ fieldLength

units::meter_t photon::VideoSimUtil::fieldLength {16.54175_m}
staticconstexpr

◆ fieldWidth

units::meter_t photon::VideoSimUtil::fieldWidth {8.0137_m}
staticconstexpr

◆ kNumTags36h11

int photon::VideoSimUtil::kNumTags36h11 = 30
staticconstexpr

◆ kTag36h11Images

const std::unordered_map<int, cv::Mat> photon::VideoSimUtil::kTag36h11Images
static
Initial value:
=
static std::unordered_map< int, cv::Mat > LoadAprilTagImages()
Definition VideoSimUtil.h:68

◆ kTag36h11MarkPts

const std::vector<cv::Point2f> photon::VideoSimUtil::kTag36h11MarkPts = Get36h11MarkerPts()
static