---
title: "init(CVPixelBuffer:properties:options:)"
framework: coreimage
role: symbol
role_heading: Initializer
path: "coreimage/cifilter-swift.class/init(cvpixelbuffer:properties:options:)-7qpsv"
---

# init(CVPixelBuffer:properties:options:)

Creates a filter from a Core Video pixel buffer.

## Declaration

```swift
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 doc://com.apple.coreimage/documentation/CoreImage/raw-image-options.

## Return Value

Return Value A CIFilter object.

## Discussion

Discussion The first step when working with RAW images in Core Image is to process the image using either init(imageData:options:) or init(imageURL:options:). These initializers create a CIFilter object with an outputImage which is a CIImage representation of the supplied RAW image. important: Core Image doesn’t process the supplied RAW image until the filter’s 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 outputImage will be nil.

## See Also

### Deprecated

- [init(imageData:options:)](coreimage/cifilter-swift.class/init(imagedata:options:).md)
- [init(imageURL:options:)](coreimage/cifilter-swift.class/init(imageurl:options:).md)
- [CIRAWFilterOption](coreimage/cirawfilteroption.md)
- [serializedXMP(from:inputImageExtent:)](coreimage/cifilter-swift.class/serializedxmp(from:inputimageextent:).md)
- [filterArray(fromSerializedXMP:inputImageExtent:error:)](coreimage/cifilter-swift.class/filterarray(fromserializedxmp:inputimageextent:error:).md)
- [supportedRawCameraModels()](coreimage/cifilter-swift.class/supportedrawcameramodels().md)
