disparityToDepth()
Creates depth data from an image containing disparity data.
Declaration
class func disparityToDepth() -> any CIFilter & CIDisparityToDepthReturn Value
The modified image.
Discussion
The method generates the disparity-to-depth filter. The filter converts a depth data image to disparity data. You can combine with other filters to create more sophisticated images.
The disparity-to-depth filter uses the following property:
inputImageAn image with the type CIImage.
The following code creates a filter that generates a disparity depth map image:
func disparityToDepth(inputImage: CIImage) -> CIImage {
let disparityToDepthFilter = CIFilter.disparityToDepth()
disparityToDepthFilter.inputImage = inputImage
return disparityToDepthFilter.outputImage!
}[Image]