PhotonVision C++ dev-v2025.0.0-beta-8-2-gbd1c5c03
Loading...
Searching...
No Matches
OpenCVHelp.h File Reference
#include <utility>
#include <vector>
#include <Eigen/Core>
#include <opencv2/calib3d.hpp>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include "RotTrlTransform3d.h"
#include <opencv2/core/eigen.hpp>
#include "photon/targeting/PnpResult.h"
#include "photon/targeting/MultiTargetPNPResult.h"
#include "photon/targeting/TargetCorner.h"

Go to the source code of this file.

Namespaces

namespace  photon
 
namespace  photon::OpenCVHelp
 

Macros

#define OPENCV_DISABLE_EIGEN_TENSOR_SUPPORT
 

Functions

static std::vector< cv::Point2f > photon::OpenCVHelp::GetConvexHull (const std::vector< cv::Point2f > &points)
 
static cv::RotatedRect photon::OpenCVHelp::GetMinAreaRect (const std::vector< cv::Point2f > &points)
 
static frc::Translation3d photon::OpenCVHelp::TranslationNWUtoEDN (const frc::Translation3d &trl)
 
static frc::Rotation3d photon::OpenCVHelp::RotationNWUtoEDN (const frc::Rotation3d &rot)
 
static std::vector< cv::Point3f > photon::OpenCVHelp::TranslationToTVec (const std::vector< frc::Translation3d > &translations)
 
static std::vector< cv::Point3f > photon::OpenCVHelp::RotationToRVec (const frc::Rotation3d &rotation)
 
static cv::Point2f photon::OpenCVHelp::AvgPoint (std::vector< cv::Point2f > points)
 
static std::vector< photon::TargetCornerphoton::OpenCVHelp::PointsToTargetCorners (const std::vector< cv::Point2f > &points)
 
static std::vector< std::pair< float, float > > photon::OpenCVHelp::PointsToCorners (const std::vector< cv::Point2f > &points)
 
static std::vector< cv::Point2f > photon::OpenCVHelp::CornersToPoints (const std::vector< std::pair< float, float > > &corners)
 
static std::vector< cv::Point2f > photon::OpenCVHelp::CornersToPoints (const std::vector< photon::TargetCorner > &corners)
 
static cv::Rect photon::OpenCVHelp::GetBoundingRect (const std::vector< cv::Point2f > &points)
 
static std::vector< cv::Point2f > photon::OpenCVHelp::ProjectPoints (const Eigen::Matrix< double, 3, 3 > &cameraMatrix, const Eigen::Matrix< double, 8, 1 > &distCoeffs, const RotTrlTransform3d &camRt, const std::vector< frc::Translation3d > &objectTranslations)
 
template<typename T >
static std::vector< T > photon::OpenCVHelp::ReorderCircular (const std::vector< T > elements, bool backwards, int shiftStart)
 
static frc::Translation3d photon::OpenCVHelp::TranslationEDNToNWU (const frc::Translation3d &trl)
 
static frc::Rotation3d photon::OpenCVHelp::RotationEDNToNWU (const frc::Rotation3d &rot)
 
static frc::Translation3d photon::OpenCVHelp::TVecToTranslation (const cv::Mat &tvecInput)
 
static frc::Rotation3d photon::OpenCVHelp::RVecToRotation (const cv::Mat &rvecInput)
 
static std::optional< photon::PnpResultphoton::OpenCVHelp::SolvePNP_Square (const Eigen::Matrix< double, 3, 3 > &cameraMatrix, const Eigen::Matrix< double, 8, 1 > &distCoeffs, std::vector< frc::Translation3d > modelTrls, std::vector< cv::Point2f > imagePoints)
 
static std::optional< photon::PnpResultphoton::OpenCVHelp::SolvePNP_SQPNP (const Eigen::Matrix< double, 3, 3 > &cameraMatrix, const Eigen::Matrix< double, 8, 1 > &distCoeffs, std::vector< frc::Translation3d > modelTrls, std::vector< cv::Point2f > imagePoints)
 

Variables

static frc::Rotation3d photon::OpenCVHelp::NWU_TO_EDN
 
static frc::Rotation3d photon::OpenCVHelp::EDN_TO_NWU
 

Macro Definition Documentation

◆ OPENCV_DISABLE_EIGEN_TENSOR_SUPPORT

#define OPENCV_DISABLE_EIGEN_TENSOR_SUPPORT