【问题标题】:Get pixel RGB value from video - Objective-C Mac从视频中获取像素 RGB 值 - Objective-C Mac
【发布时间】:2013-07-02 14:40:52
【问题描述】:

我想使用视频文件中的 X/Y 坐标获取特定像素的 RGB 值。

例如,浏览视频并打印当前时间码 (+fps) 和 X/Y 坐标处像素的 RGB 值。

谁能给我一个起点?

我见过一些在 iOS 上使用 AVCaptureSession 的例子

- (void)captureOutput:(AVCaptureOutput *)captureOutput
didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
       fromConnection:(AVCaptureConnection *)connection

要将 sampleBuffer 转换为 CIImage 并从任何地方获取像素值...

是否可以使用播放预先存在的视频文件来实现相同的技术?

【问题讨论】:

    标签: objective-c macos avfoundation pixel rgb


    【解决方案1】:

    看看使用AVAssetImageGenerator,它可以让你直接从后台的视频中生成图像。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-14
      • 1970-01-01
      • 2016-03-13
      • 2012-03-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-10
      相关资源
      最近更新 更多