opencv calib3d 模块 usac magsac Gamma 查表值验证

cpp 复制代码
void inflateGammaValues(
	std::vector<double>& gamma_complete_anchor,
	std::vector<double>& gamma_incomplete_anchor,
	std::vector<double>& gamma_anchor,
	double max_thr=7.5, double gamma_quantile = 3.04, double DOF=2,int number_of_anchor_points=50)
{
	//上不完全gamma
	gamma_complete_anchor= std::vector<double>(number_of_anchor_points),
	//下不完全gamma
	gamma_incomplete_anchor= std::vector<double>(number_of_anchor_points),
	//上不完全gamma
	gamma_anchor= std::vector<double>(number_of_anchor_points);

	const double step0 = max_thr / (number_of_anchor_points-1);
	const double step1 = max_thr* gamma_quantile / (number_of_anchor_points - 1);

	const double n_plus_1_div_2 = (DOF + 1.0) / 2.0;
	const double n_minus_1_div_2 = (DOF - 1.0) / 2.0;

	const double gamma_n_plus = boost::math::tgamma(n_plus_1_div_2);
	const double gamma_n_minus = boost::math::tgamma(n_minus_1_div_2);
	for (int i = 0; i < number_of_anchor_points; ++i)
	{
		gamma_complete_anchor[i]= boost::math::gamma_q(n_minus_1_div_2, step0 * i) * gamma_n_minus;
		gamma_incomplete_anchor[i] = boost::math::gamma_p(n_plus_1_div_2, step0 * i) * gamma_n_plus;
		gamma_anchor[i] = boost::math::gamma_q(n_minus_1_div_2, step1 * i) * gamma_n_minus;
	}
}
相关推荐
小豆庄25 分钟前
本地视频打码:多模型检测、帧间追踪与18种模糊的选型
opencv·目标检测·ai·自然语言处理·音视频·视频
爱聊灵光的维C2 小时前
从看见世界到重构认知:在视觉与硬件的交汇处,寻找我们这代人的北极星
c语言·物联网·计算机视觉·重构·硬件工程·射频工程
爱吃火鸡面呀11 小时前
OpenCV 颜色识别实战:从 HSV 原理到摄像头实时检测
人工智能·opencv·计算机视觉
会议咨询11 小时前
2027年神经网络、计算机视觉与信息工程国际会议(NCVIE 2027)
人工智能·神经网络·计算机视觉
ahccqw15 小时前
OpenCV 缩放 与 位移
人工智能·opencv·计算机视觉
原子延迟1 天前
Smallpdf免费次数用完了(2026),4款工具避坑
图像处理·人工智能·计算机视觉
Keep_Trying_Go1 天前
Consistent-Point半监督人群计数算法详解
人工智能·深度学习·算法·计算机视觉·人群计数
大雾的小屋1 天前
卷积神经网络原理解析:从1989年手写邮编识别到现代计算机视觉
人工智能·计算机视觉·cnn
AI的探索之旅1 天前
OpenCV Day40 —— K-means 聚类与 EM 高斯混合
opencv·kmeans·聚类
城南皮卡丘1 天前
苹果果实成熟度检测数据集 4195张+YOLO格式
深度学习·yolo·目标检测·计算机视觉·数据集