# How can i capture face recognition image?

**URL:** <https://discourse.processing.org/t/how-can-i-capture-face-recognition-image/39869>\
**Category:** Libraries\
**Created:** [November 25, 2022, 2:46pm UTC](https://discourse.processing.org/t/how-can-i-capture-face-recognition-image/39869 "2022-11-25T14:46:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaotic.rabbit](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chaotic.rabbit/32/14034_2.png) [@chaotic.rabbit](https://discourse.processing.org/u/chaotic.rabbit)\
**Post date:** [November 25, 2022, 2:46pm UTC](https://discourse.processing.org/t/how-can-i-capture-face-recognition-image/39869/1 "2022-11-25T14:46:16Z")

</div>

Hi, I have managed to set up a live video cam in my code and I used OpenCV for face detection. Ellipses are drawn on detected faces. Now how can I take that ellipse and display a still image of that when I press enter? I have no idea how i can get the still pixels in that ellipse. thanks!

---

<div class="post-metadata">

**Author:** ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)\
**Post date:** [November 25, 2022, 4:36pm UTC](https://discourse.processing.org/t/how-can-i-capture-face-recognition-image/39869/2 "2022-11-25T16:36:53Z")

</div>

Hi @chaotic.rabbit,

as you already have the centerpoint and the ellipse radii you can use this and get all the pixels inside the ellipse…

> **[Check if a point is inside, outside or on the ellipse - GeeksforGeeks](https://www.geeksforgeeks.org/check-if-a-point-is-inside-outside-or-on-the-ellipse/)**
>
> A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.

Maybe you should before grep the rectangular area around the ellipse to not iterating through all the pixels.

Give it a try and see how far you get it. Come back if you need further assistance…

Cheers  
— mnse
