gpt4 book ai didi

iphone - Reverse facetime 摄像头是倒置的

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:58:51 25 4
gpt4 key购买 nike

我使用 gpuimage 构建了一个摄影应用程序。但是当我选择前置摄像头时,背面出现的摄像头画面是相反的(左,右)代码在这里:

 stillCamera = [[GPUImageStillCamera alloc] initWithSessionPreset:AVCaptureSessionPreset640x480 cameraPosition:AVCaptureDevicePositionBack]; 
stillCamera.outputImageOrientation = UIInterfaceOrientationPortrait;
filter = [[GPUImageRGBFilter alloc] init];

[stillCamera addTarget:filter];
GPUImageView *filterView = (GPUImageView *)self.view;
[filter addTarget:filterView];

[stillCamera startCameraCapture];

谁能告诉我我遇到了什么问题?非常感谢!

最佳答案

试试这个...

stillCamera = [[GPUImageStillCamera alloc] initWithSessionPreset:AVCaptureSessionPreset640x480 cameraPosition:AVCaptureDevicePositionBack]; 
stillCamera.outputImageOrientation = UIInterfaceOrientationPortrait;
stillCamera.horizontallyMirrorFrontFacingCamera = NO;
stillCamera.horizontallyMirrorRearFacingCamera = NO;

filter = [[GPUImageRGBFilter alloc] init];

[stillCamera addTarget:filter];
GPUImageView *filterView = (GPUImageView *)self.view;
[filter addTarget:filterView];

[stillCamera startCameraCapture];

关于iphone - Reverse facetime 摄像头是倒置的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17314643/

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