gpt4 book ai didi

iphone - 由于 CIDetector 或 CIImage 导致 UIImage 倒置(转换问题)

转载 作者:行者123 更新时间:2023-12-01 19:17:47 30 4
gpt4 key购买 nike

我正在做的是通过 CIDetector 检测面部,我的图像来自 UIImagePickerController(从后置摄像头捕获图像)。我可以检测到人脸..但我的问题是我的人脸图像倒置(从上到下)。这是我的CODE .

我的问题

enter image description here

最佳答案

在第 83 行和第 88 行之间。您正在翻转 View 而不是将其翻转回来,因为您已将代码注释掉。

编辑添加

我看到您正在使用 http://maniacdev.com/2011/11/tutorial-easy-face-detection-with-core-image-in-ios-5/ 中的示例项目

您正在翻转 ImageView ,但您并没有翻转窗口来解释这种翻转。

编辑再次添加

好的 - 多看一下您正在使用的教程和示例代码,这是您不想要的窗口翻转。但是您需要以不同的方式编写代码。

http://www.bobmccune.com/2012/03/22/ios-5-face-detection-with-core-image/ 提供了一个更好的示例。使用 drawInRect: 显示图像以及为绘制面部特征而翻译的上下文。

关于iphone - 由于 CIDetector 或 CIImage 导致 UIImage 倒置(转换问题),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12073583/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com