- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在使用本教程:https://github.com/BradLarson/GPUImage在 iOS 中创建视频捕获应用程序。
应用程序已启动并正在运行。我有一个问题...
我们使用此代码启动实时视频捕获 session :
GPUImageVideoCamera *videoCamera = [[GPUImageVideoCamera alloc]
initWithSessionPreset:AVCaptureSessionPreset640x480
cameraPosition:AVCaptureDevicePositionBack];
videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait;
GPUImageFilter *customFilter = [[GPUImageFilter alloc]
initWithFragmentShaderFromFile:@"CustomShader"];
GPUImageView *filteredVideoView = [[GPUImageView alloc] initWithFrame:CGRectMake(0.0,
0.0, viewWidth, viewHeight)];
[videoCamera addTarget:customFilter];
[customFilter addTarget:filteredVideoView];
[videoCamera startCameraCapture];
但是如何在这个框架中启用“图像选择器”风格的“点击聚焦”和点击曝光校正功能。
这可能吗?你能给我指出正确的方向吗?
请帮忙。
提前致谢。
最佳答案
部分了解:
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint touchPoint = [touch locationInView:self.view];
if([videoCamera.inputCamera isFocusPointOfInterestSupported]&&[videoCamera.inputCamera isFocusModeSupported:AVCaptureFocusModeAutoFocus])
{
if([videoCamera.inputCamera lockForConfiguration :nil])
{
[videoCamera.inputCamera setFocusPointOfInterest :touchPoint];
[videoCamera.inputCamera setFocusMode :AVCaptureFocusModeLocked];
if([videoCamera.inputCamera isExposurePointOfInterestSupported])
{
[videoCamera.inputCamera setExposurePointOfInterest:touchPoint];
[videoCamera.inputCamera setExposureMode:AVCaptureExposureModeLocked];
}
[videoCamera.inputCamera unlockForConfiguration];
}
}
}
曝光和焦点正在锁定,但过了一段时间就卡住了...
正在努力。
关于iphone - 使用 'tap-to-focus' 和曝光控制的 GPUImage 视频捕获,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17986661/
已关闭。这个问题是 not reproducible or was caused by typos 。目前不接受答案。 这个问题是由拼写错误或无法再重现的问题引起的。虽然类似的问题可能是 on-top
我一直在尝试使用 Bootstrap 的表单样式处理 AngularJS 的电子邮件验证,并遇到了这个 CSS block 。 input:focus:required:invalid, textar
我在 bootstrap 中查看 dropdown.js 的历史,并在 git 上发现了以下更改历史文件,here : $this.focus() // focus() being changed
在不考虑性能的情况下,我总是认为 $(":focus") 返回的 jquery 对象等同于 $(document.activeElement)。 但是,如果您闯入浏览器调试器并评估 $(":focus
我使用 datatables from fluent kit和分页,当点击时(:active)突出显示: box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25); 我
我的目标是在单击 span(带有 Show Me 文本)时显示带有 show 类的 p 标签。我曾尝试使用 :focus 伪选择器来执行此操作,但使用此方法使得 p 标记仅在单击其他位置之前显示,其中
result 我想让图片保持点击状态。 我为每个图标使用了两个图像。一个是什么时候没有被点击。另一个是何时单击。悬停工作正常。但焦点根本不起作用。 我没有看到任何错误或错误。请帮帮我! 这是 body
我在表格布局中嵌套了编辑文本,然后在 ScrollView 中嵌套了表格布局,触摸模式下的可聚焦/可聚焦在真实设备中不起作用,但令人惊讶的是它在模拟器中起作用。 请问能否提供一些替代解决方案? 最佳答
我使用 Backbone.js 的代码的 View 部分是这样的: var myView = Backbone.View.extend({ events: { 'focus .
我有一个行为类似于选项卡控件的用户控件。选项卡标题是 UserControl 实例,它们重写 Paint 事件以使它们看起来是自定义的。 为了利用选项卡页上各种控件上的验证事件,当用户单击选项卡标题时
我遇到了一个麻烦的网页,其结构很复杂。如果用鼠标单击一个DIV,则一切正常。但是,如果它是通过 javascript 获得焦点的(即 divElement.focus)。布局变得凌乱。这只发生在 IE
这是一个代码笔来演示我所看到的: https://codepen.io/anon/pen/zMvxPy HTML: JS: $('input').on('focus', () => { cons
问题: PrimeFaces“p:focus”标签不是聚焦。 - 即,当 xhtml 页面呈现给用户时,没有输入字段处于焦点。 问题: 为什么不呢?如何让“p:focus”在这个简单的应用程序中正常工
我有一个 只有当第一个子元素获得焦点而不是第二个子元素时,我才想在其中设置焦点的元素。我尝试使用 :not伪类,但没有成功。 值得注意的是,我仍然需要关注第二个元素,只是不想有两个焦点元素(父 + 子
我正在尝试用纯 CSS 创建一个可访问的下拉菜单,但我不太确定该怎么做。 如果 anchor 处于事件状态,我可以获得下一个 UL(子菜单),但是一旦进入子菜单,聚焦第一个链接,我不确定如何告诉 an
我在 jQuery UI 代码库中看到 .focus(1),但我无法弄清楚该参数的用途。 它与.focus()有何不同?我阅读了 jQuery 网站上的 .focus 文档,但仍然一无所知。 谢谢。
在 WPF 中,有两种方法可以将焦点设置到元素上。 您可以调用 input 元素的 .Focus() 方法,也可以使用 input 元素作为参数调用 Keyboard.Focus() 。 // fir
我有一个可以获得焦点的父组件。它使用这个焦点来提供键盘控制。该父组件可以生成一个子组件,该子组件同样可以获取焦点,以便它可以响应键盘事件。子组件监听的键盘事件之一是 这会导致子组件被卸载。 当子组件卸
我有一个可以获得焦点的父组件。它使用这个焦点来提供键盘控制。该父组件可以生成一个子组件,该子组件同样可以获取焦点,以便它可以响应键盘事件。子组件监听的键盘事件之一是 这会导致子组件被卸载。 当子组件卸
我试图突出焦点 秒。 我添加了 -1 的标签索引给他们每个人,并确认调用some_tr.focus()套document.activeElement那个some_tr .然而,由于某种原因some_t
我是一名优秀的程序员,十分优秀!