I have implemented custom camera into my app. So, I am creating this camera using AVCaptureDevice
. Also I have set GrayScale on this custom camera using Set GrayScale on Output of AVCaptureDevice in iOS this.
Now I want to add over saturation effect on camera. "Oversaturation hint" should be calculated according to formula provided. (convert overexposure pixel (R,G,B >= 255) to yellow (RGB 255,255,0)).
I want exact effect which is showing in following Image.
I am creating GrayScale using following code:-
let sepiaColor = CIColor(
red: 1.0 / 0.30078125,
green: 1.0 / 0.5859375,
blue: 1.0 / 0.11328125
)
filter = CIFilter(
name: "CIColorMonochrome",
withInputParameters: [
"inputColor" : sepiaColor,
"inputIntensity" : 1.0
]
)
How can I create this over saturation effect using CIFilter
.? I have reviewed Core Image Filter Reference document for CIFilter
. But didn’t get idea about How to create this effect using this. May be
CIColorCrossPolynomial
or CIColorMap
are working for this.
Is there any way to create this effect on AVCaptureDevice
.?
Any Help would be appreciated. :)