import os import sys # 1. 定义您的 DLL 目录 DLL_DIR = r"D:\wangchongwu_gitea_2023\StitchVideo\Bin" CV_DIR = r"C:\Lib\opencv455\build\x64\vc14\bin" CUDA_DIR = r"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin" # path os.add_dll_directory(DLL_DIR) os.add_dll_directory(CV_DIR) os.add_dll_directory(CUDA_DIR) sys.path.append(DLL_DIR) sys.path.append(CV_DIR) sys.path.append(CUDA_DIR) # 4. 导入 from UStitcher import API_UnderStitch,FrameInfo input("sssss") frame_info = FrameInfo() frame_info.nFrmID = 1 frame_info.craft.stPos.B = 39 frame_info.craft.stPos.L = 120 frame_info.craft.stPos.H = 1000 frame_info.camInfo.nFocus = 40 frame_info.camInfo.fPixelSize = 12 frame_info.servoInfo.fServoAz = 90 frame_info.servoInfo.fServoPt = -45 frame_info.nEvHeight = 1200 frame_info.nWidth = 1280 frame_info.nHeight = 1024 stitcher = API_UnderStitch.Create() #H = stitcher.getHomography(frame_info) print("done")