You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.7 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include "stdafx.h"
// OpenCV
#include <opencv2\opencv.hpp>
using namespace cv;
// 情报数据通用结构
#include "QBStru.h"
// 作者:王家星 2014/11/02
// 修订2015/03/11
//功能:基于地面控制点的几何精校正
//输入: 1. srcImg 输入图像数据
// 2. GCP_XY 控制点(像素坐标)
// 3. GCP_LonLat 控制点(经纬度坐标)
// 4. type: 变换类型 -1自适应 0线性 1二次多项式
//输出: 1. dstImg 输出图像数据
// 2. 返回值处理成功返回true失败返回false
bool GCPGeoCorrectImg( ImgStru *dstImg,
const ImgStru *srcImg,
const std::vector<cv::Point2d>& GCP_XY,
const std::vector<cv::Point2d>& GCP_LonLat,
int type = -1);
//功能OpenCV图像格式基于地面控制点的几何精校正
//输入: 1. srcImg 输入图像数据
// 2. GCP_XY 控制点(像素坐标)
// 3. GCP_LonLat 控制点(经纬度坐标)
// 4. type: 变换类型 -1自适应 0线性 1二次多项式
//输出: 1. dstImg 输出图像数据
// 2. LBbox 经纬度边界
// 3. 返回值处理成功返回true失败返回false
bool GCPGeoCorrectImg( cv::Mat& dstImg, GeoBoundingBox& LBbox,
const cv::Mat& srcImg,
const std::vector<cv::Point2d>& GCP_XY,
const std::vector<cv::Point2d>& GCP_LonLat,
int type = -1);
//功能:基于控制点的几何校正
//输入: 1. srcImg 输入图像数据
// 2. GCP_xy 控制点(畸变像素坐标)
// 3. GCP_XY 控制点(参考图像像素坐标)
//输出: 1. dstImg 输出图像数据
// 2. 返回值处理成功返回true失败返回false
bool CPBasedImgCorrect( cv::Mat &dstImg,
const cv::Mat &srcImg,
const std::vector<cv::Point2d>& GCP_xy,
const std::vector<cv::Point2d>& GCP_XY);