Home / IOS Development / ios – ARKit – Apply CIFilter to specific corners of ARFaceAnchor

ios – ARKit – Apply CIFilter to specific corners of ARFaceAnchor



I’m trying to use one CIFilter to a specific group of corners from ARFaceAnchor. I gained access to the peaks using:

let vertices = faceAnchor.geometry.vertices 

let relevantVertices = [vertices[580], 
                        vertices[1
019], vertices[1017], vertices[660]]

But I can not understand how I use it with a node (not sure if that is the solution) to keep the vertices continuous updated with CIFilter when the face moves.

For example, I selected some vertices and applied a black and white filter to the selected corners (hardcoded) using Photoshop for demonstration. Imagine there are no lines 🙂

enter image description here

Any help will be highly appreciated!


Source link