# Processing face detection?

**URL:** <https://discourse.processing.org/t/processing-face-detection/10544>\
**Category:** Libraries\
**Tags:** homework\
**Created:** [April 22, 2019, 3:45pm UTC](https://discourse.processing.org/t/processing-face-detection/10544 "2019-04-22T15:45:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nothingnew](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@nothingnew](https://discourse.processing.org/u/nothingnew)\
**Post date:** [April 22, 2019, 3:45pm UTC](https://discourse.processing.org/t/processing-face-detection/10544/1 "2019-04-22T15:45:59Z")

</div>

Hello! I am working on my school project and thinking of using face (mouth) detection in processing.  
I have searched few days, but I am not sure if processing can do **mouth open and close** detection.  
Is there any way to do it?

thanks!

---

<div class="post-metadata">

**Author:** ![peachman](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peachman](https://discourse.processing.org/u/peachman)\
**Post date:** [April 22, 2019, 8:09pm UTC](https://discourse.processing.org/t/processing-face-detection/10544/2 "2019-04-22T20:09:09Z")

</div>

Hi nothingnew,

I’ve done some looking about, I’d start with OpenCV

See the examples, you should be able to get something working with that

> **[atduskgreg/opencv-processing](https://github.com/atduskgreg/opencv-processing)**
>
> OpenCV for Processing. A creative coding computer vision library based on the official OpenCV Java API - atduskgreg/opencv-processing

---

<div class="post-metadata">

**Author:** ![janglee](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/janglee/32/4035_2.png) [@janglee](https://discourse.processing.org/u/janglee)\
**Post date:** [April 23, 2019, 4:29am UTC](https://discourse.processing.org/t/processing-face-detection/10544/3 "2019-04-23T04:29:26Z")

</div>

Don’t know about Processing Java but you can easily do it in p5.js. Use [clmtrackr](https://github.com/auduno/clmtrackr) to detect mouth and check distance between points around mouth to decide mouth is open or not. Here is example [code](https://github.com/Janglee123/face-detection-p5js/blob/master/sketch.js).

---

<div class="post-metadata">

**Author:** ![Gus\_Fermin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gus_fermin/32/5851_2.png) [@Gus\_Fermin](https://discourse.processing.org/u/Gus_Fermin)\
**Post date:** [August 2, 2019, 2:20am UTC](https://discourse.processing.org/t/processing-face-detection/10544/4 "2019-08-02T02:20:36Z")

</div>

Hi there, I wanted to ask, is OpenCV for processing as precise as this `clmtrackr` that you suggest? OpenCV draws rectangle, but this is, I think more precise because of the control points around the features?

Thanks
