from __future__ import annotations from typing import Any, TypeAlias from numpy.typing import NDArray ImageLike: TypeAlias = NDArray[Any] class PointBLH: """地理坐标系(单位:度).""" B: float L: float H: float def __init__(self) -> None: ... class EulerRPY: """RPY 姿态角(单位:度).""" fRoll: float fPitch: float fYaw: float def __init__(self) -> None: ... class AirCraftInfo: """载体信息.""" nPlaneID: int stPos: PointBLH stAtt: EulerRPY def __init__(self) -> None: ... class CamInfo: """相机信息.""" nFocus: int fPixelSize: float unVideoType: int dCamx: float dCamy: float fAglReso: float def __init__(self) -> None: ... class ServoInfo: """伺服状态.""" fServoAz: float fServoPt: float fServoAzSpeed: float fServoPtSpeed: float def __init__(self) -> None: ... class FrameInfo: """帧内外方位元素.""" nFrmID: int craft: AirCraftInfo camInfo: CamInfo servoInfo: ServoInfo nEvHeight: int nWidth: int nHeight: int def __init__(self) -> None: ... class UPanInfo: """下视全景图配置.""" m_pan_width: int m_pan_height: int scale: float map_shiftX: float map_shiftY: float def __init__(self) -> None: ... class UPanConfig: """下视拼接参数控制.""" bUseBA: bool bOutFrameTile: bool bOutGoogleTile: bool def __init__(self) -> None: ... class API_UnderStitch: """视频帧下视地理拼接.""" def Init(self, info: FrameInfo) -> UPanInfo: """初始化拼接,返回全景图配置.""" ... def SetOutput(self, name: str, outdir: str) -> None: """配置输出标识和目录.""" ... def Run(self, img: ImageLike, para: FrameInfo) -> int: """运行拼接流程(cv::Mat/numpy.ndarray).""" ... def Stop(self) -> None: """中止拼接流程.""" ... def SetConfig(self, config: UPanConfig) -> None: """更新运行参数.""" ... def OptAndOutCurrPan(self) -> int: """立即优化并输出当前全景图.""" ... def ExportPanMat(self) -> ImageLike: """获取当前全景图像.""" ... def getHomography(self, info: FrameInfo) -> ImageLike: """根据帧信息返回单应性矩阵.""" ... @staticmethod def Create(cachedir: str = "./cache") -> API_UnderStitch: """创建 API_UnderStitch 实例.""" ... @staticmethod def Destroy(obj: API_UnderStitch) -> None: """销毁 API_UnderStitch 实例.""" ... __all__ = [ "API_UnderStitch", "AirCraftInfo", "CamInfo", "EulerRPY", "FrameInfo", "ImageLike", "PointBLH", "ServoInfo", "UPanConfig", "UPanInfo", ]