# How to get X, Y of the face with open cv?

**URL:** <https://discourse.processing.org/t/how-to-get-x-y-of-the-face-with-open-cv/27183>\
**Category:** Libraries\
**Created:** [January 19, 2021, 12:44am UTC](https://discourse.processing.org/t/how-to-get-x-y-of-the-face-with-open-cv/27183 "2021-01-19T00:44:54Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [January 19, 2021, 11:38am UTC](https://discourse.processing.org/t/how-to-get-x-y-of-the-face-with-open-cv/27183/3 "2021-01-19T11:38:14Z")

</div>

> [@LoneFalconer](#):
>
> for a way to get the x and y chords of a face detected with OpenCV

I’m not sure what you mean by chords, but since you used the beginner’s tag maybe you only need to study the example file of the FaceDetection example file of the OpenCV for Processing library, where you can see that x and y are obtained in the faces array. (faces[i].x, faces[i].y).  
However, if you mean by chords the individual facial features (mouth eyes etc.) this library can’t do that. But I’ve explained [in this link](https://discourse.processing.org/t/opencv-update-heaviside-step-function-deriving-parametric-functions-of-shapes-sobel-filter/21931/50), how Processing can use the latest OpenCV library. Then you need to study the [Haar Cascade Classifiers in OpenCV](https://medium.com/swlh/haar-cascade-classifiers-in-opencv-explained-visually-f608086fc42c) and use them as explained in [this tutorial.](https://fivedots.coe.psu.ac.th/~ad/jg/nui086/index.html)

---

_[View the full topic](https://discourse.processing.org/t/how-to-get-x-y-of-the-face-with-open-cv/27183)._
