PhotonVision C++ dev-v2025.0.0-beta-8-2-gbd1c5c03
Loading...
Searching...
No Matches
VideoSimUtil.h File Reference
#include <cscore_cv.h>
#include <algorithm>
#include <numeric>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#include <frc/apriltag/AprilTag.h>
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/objdetect.hpp>
#include <units/length.h>
#include "SimCameraProperties.h"
#include "photon/estimation/RotTrlTransform3d.h"

Go to the source code of this file.

Namespaces

namespace  mathutil
 
namespace  photon
 
namespace  photon::VideoSimUtil
 

Functions

template<typename T >
int mathutil::sgn (T val)
 
static cv::Mat photon::VideoSimUtil::Get36h11TagImage (int id)
 
static std::unordered_map< int, cv::Mat > photon::VideoSimUtil::LoadAprilTagImages ()
 
static std::vector< cv::Point2f > photon::VideoSimUtil::GetImageCorners (const cv::Size &size)
 
static std::vector< cv::Point2f > photon::VideoSimUtil::Get36h11MarkerPts (int scale)
 
static std::vector< cv::Point2f > photon::VideoSimUtil::Get36h11MarkerPts ()
 
static void photon::VideoSimUtil::UpdateVideoProp (cs::CvSource &video, const SimCameraProperties &prop)
 
static void photon::VideoSimUtil::Warp165h5TagImage (int tagId, const std::vector< cv::Point2f > &dstPoints, bool antialiasing, cv::Mat &destination)
 
static double photon::VideoSimUtil::GetScaledThickness (double thickness480p, const cv::Mat &destinationMat)
 
static void photon::VideoSimUtil::DrawInscribedEllipse (const std::vector< cv::Point2f > &dstPoints, const cv::Scalar &color, cv::Mat &destination)
 
static void photon::VideoSimUtil::DrawPoly (const std::vector< cv::Point2f > &dstPoints, int thickness, const cv::Scalar &color, bool isClosed, cv::Mat &destination)
 
static void photon::VideoSimUtil::DrawTagDetection (int id, const std::vector< cv::Point2f > &dstPoints, cv::Mat &destination)
 
static std::vector< std::vector< frc::Translation3d > > photon::VideoSimUtil::GetFieldWallLines ()
 
static std::vector< std::vector< frc::Translation3d > > photon::VideoSimUtil::GetFieldFloorLines (int subdivisions)
 
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 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)
 

Variables

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