jjzjj

VNImageHomographicAlignmentObserv

全部标签

ios - 如何应用iOS VNImageHomographicAlignmentObservation warpTransform?

我正在测试Apple的VisionAlignmentAPI,对VNHomographicImageRegistrationRequest有疑问。有人让它工作吗?我可以从中获取warpTransform,但我还没有看到有意义的矩阵,这意味着,我无法获得将图像扭曲回源图像的结果。我正在使用OpencvwarpPerspective来处理变形。我调用它来获取转换:classfunchomography(_cgImage0:CGImage!,_cgImage1:CGImage!,_orientation:CGImagePropertyOrientation,completion:(matrix

swift - 使用 "VNImageHomographicAlignmentObservation"类合并图像

我正在尝试使用VNImageHomographicAlignmentObservation合并两个图像,我目前得到一个如下所示的3d矩阵:simd_float3x3([[0.99229,-0.00451023,-4.32607e-07)],[0.00431724,0.993118,2.38839e-07)],[-72.2425,-67.9966,0.999288)]],)但我不知道如何使用这些值来合并成一张图像。似乎没有关于这些值甚至意味着什么的任何文档。我在这里找到了一些关于变换矩阵的信息:Workingwithmatrices.但到目前为止,没有任何其他帮助我...有什么建议吗?我