BinaryImageOpenCV how to use IMport OpenCV Framework in your project add both files in project Use below line of code in your controller to get a binary image let image_new = PHOpenCVWrapper.cvtColorBGR2GRAY(image)