Custom Image Filters

I’m building a camera app using SwiftUI and UIKit (with UIViewControllerRepsrwsentable). My app already is able to capture photos, but I also want to implement the important feature - apply my custom image filter to the image for live preview in camera and when this image is saving to the photo library (like in the default Apple camera app with Photographic styles).

My image filter must be pretty advanced because I’m a photographer and I trying to achieve the same colours as I have with my custom image preset in Lightroom. I want to control the image parameters such as basic (exposure, contrast, shadows, etc.), tone curves for each channel (Red, Green, Blue channels separately), HSL (for Red, Orange, Yellow, Green, Blue, Aqua, Purple and Magenta), apply colour grading and more.

Currently I’m straggling with implementation of this. I tried to create a custom image filter using Metal (it works with saturation) but I’m not sure if it is the best approach. I need help and recommendations of how developers implement this complex thing in their apps (what technologies should I use and etc.)

Answered by DTS Engineer in 817331022

Hello @Nikita129873,

Many of the filters you are looking for are already provided to you as CIFilters in CoreImage. I recommend that you familiarize yourself with the filters that are available to you there, before you try to implement custom image kernels for your app.

Best regards,

Greg

Accepted Answer

Hello @Nikita129873,

Many of the filters you are looking for are already provided to you as CIFilters in CoreImage. I recommend that you familiarize yourself with the filters that are available to you there, before you try to implement custom image kernels for your app.

Best regards,

Greg

Dear iPhone developers. My name is Natalia. I have always had Android phones. And recently I bought an iPhone 14 pro. My joy had no limit until I made selfies. I haven't experienced such disappointment in a long time. From the photo, I was looking at a woman 20 years older than me, from my age, with spots all over her face, an enlarged nose, and generally not looking like me at all. I took a few more selfies with different lighting, but alas nothing helped. My face in the photo was still blotchy. I pulled out my simple Chinese Xiaomi and realized that there was nothing wrong with me, it was a problem with the iPhone's camera! I have a question, why do you make a lot of different program improvements and make the camera worse? I have to carry around my old Xiaomi now to take selfies. Why did I buy an iPhone?

Now I understand why all the girls who take pictures with an iPhone in their hand cover their face with it! To avoid looking like a crocodile with a two-meter nose and a skewed face!

Can't your developers do the opposite to improve the photo? To smooth out the irregularities, the oval of the face. So that not to resort then to correction of the face in other programs.

Please release an update for the camera of all versions of iPhones, so that people do not look ugly with your camera.

And one more request, make an update that when you take a video, there was a pause button. Well, you can not do so primitive camera that even pause is not there. I really hope that you will hear me and as soon as possible.

With respect for your work Natali

Custom Image Filters
 
 
Q