It had some trouble with the glasses. So for now, let's turn off the landmark part because for an AR filter, you don't want to know where all the eyes are, the mouth is. So now the lighting is a bit different, but over here, now I have my glasses on. It also follows my eyes. It's a bit janky because now it takes the average of every frame. You are able to take the average of multiple frames, and with that, you are easy to just smooth it out. It is able to turn somewhat, so it also does that. And it stops detecting at some point.
So this is very fun, where you can also do this live. For when you take a picture using your device. And the last thing I wanted to show, which is basically the more easy version of this, where you have this pre-recorded video. So this pre-recorded video, and over here, it's also detecting the faces in real-time. So, I do the same thing, where I have these glasses again, and I'm just putting all the data into that video element. I'm also recording it here, so I can export it with the glasses on. Let me get to the part where I apply the images. So, here I've got that drawLandmark function I created again, which I can turn off. So, now it's only showing the glasses. And I can go back and stop adding the glasses, but only show the landmarks for example. So, this is the data where you can go wild with. So, you have the eyes, the mouth, the nose, and you are free to do anything with that. It's nice that you have this very small part of the API, which you can use to get the landmarks, and from that you are able to do more stuff with it. This is just one showcase, I think, which is nice, that you are able to do something with it, which is some lines of code, some calculations, and if you show this on a birthday for example, like this is what I created with some text and numbers. I think people can be amazed that they know this stuff from social media, know how those filters look like, but if you are able to recreate them just yourself, that's really great.
So, with that, there is this fun part of coding, which is this is maybe less functional. There are possibilities, use cases for it, but definitely with a feature flag right now, it's not that useful in production. But this is where the fun part interests you. This passion about getting code to do fun things helps you understand more and more what the subject is about and how the coding works. And that passion for problem solving, for creating something with code, that can go together with fun. And some things don't make sense other than just being fun, just being nice, and that is the fundamental thing of passion, I think. And when you let that mental part go, then that's where the fun starts.
Comments