This toolbox can resize the face and then rotate the face. I’m working on a function that can automatically crop the face and then do the luminance balance work.
Here is the source code:
How to use:
Just feed face images into the source_face folder (1 arrow) and then open and run the ‘pupil_face.m’ file (3 arrow) in the current directory. Remember to connect to the internet as I use some online face analysis tools. After computation, just go to the output_face folder to pick up processed face images (3 arrow).
![](https://jianch.github.io/wp-content/uploads/2021/02/2.jpg)
Run the pupil_face.m file, then it will automatically recognise the pupil position and resize the face to a grayscale pupil-distance constant face. Remember to connect to the Internet cause I use some online source.
Results showing as below:
![](https://jianch.github.io/wp-content/uploads/2021/02/1.png)
![](https://jianch.github.io/wp-content/uploads/2021/02/3.jpg)
![](https://jianch.github.io/wp-content/uploads/2021/02/4.jpg)
![](https://jianch.github.io/wp-content/uploads/2021/02/5-1024x638.jpg)
![](https://jianch.github.io/wp-content/uploads/2021/02/6-1024x731.png)