<!--
{
  "availability" : [
    "iOS: 10.0.0 - 27.2.0",
    "iPadOS: 10.0.0 - 27.2.0",
    "macCatalyst: 13.1.0 - 27.2.0",
    "macOS: 10.12.0 - 27.2.0",
    "swift: -",
    "tvOS: 10.0.0 - 27.2.0",
    "visionOS: 1.0.0 - 27.2.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIFilter-swift.class/init(CVPixelBuffer:properties:options:)-7qpsv",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:objc(cs)CIFilter(cm)filterWithCVPixelBuffer:properties:options:::SYNTHESIZED::c:objc(cs)CIFilter"
  },
  "title" : "init(CVPixelBuffer:properties:options:)"
}
-->

# init(CVPixelBuffer:properties:options:)

Creates a filter from a Core Video pixel buffer.

```
init!(CVPixelBuffer pixelBuffer: CVPixelBuffer!, properties: [AnyHashable : Any]!, options: [CIRAWFilterOption : Any]! = [:])
```

## Parameters

`pixelBuffer`

CVPixelBufferRef with one of the following RAW pixel format types:

    <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_14Bayer_GRBG>

    <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_14Bayer_RGGB>

    <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_14Bayer_BGGR>

    <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_14Bayer_GBRG>

`properties`

A properties dictionary. Defines the properties of the pixel buffer.

`options`

An options dictionary.  You can pass any of the keys defined in [RAW Image Options](/documentation/CoreImage/raw-image-options).

## Return Value

A [`CIFilter`](/documentation/CoreImage/CIFilter-swift.class) object.

## Discussion

The first step when working with RAW images in Core Image is to process the image using either [`init(imageData:options:)`](/documentation/CoreImage/CIFilter-swift.class/init(imageData:options:)) or [`init(imageURL:options:)`](/documentation/CoreImage/CIFilter-swift.class/init(imageURL:options:)). These initializers create a [`CIFilter`](/documentation/CoreImage/CIFilter-swift.class) object with an [`outputImage`](/documentation/CoreImage/CIFilter-swift.class/outputImage) which is a [`CIImage`](/documentation/CoreImage/CIImage) representation of the supplied RAW image.

> Important:
> Core Image doesn’t process the supplied RAW image until the filter’s ``doc://com.apple.coreimage/documentation/CoreImage/CIFilter-swift.class/outputImage`` is rendered. For this reason, if you supply this initializer with a RAW image of an unsupported format, the filter object will be initialized but its ``doc://com.apple.coreimage/documentation/CoreImage/CIFilter-swift.class/outputImage`` will be nil.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)