Skip to content

Latest commit

 

History

History
executable file
·
36 lines (27 loc) · 1.38 KB

README.md

File metadata and controls

executable file
·
36 lines (27 loc) · 1.38 KB

MMM-Smile

This is a module for the MagicMirror. It displays a random funny GIF on the magic mirror, then conducts smiling test for the current user by detecting smiling faces on camera using Haar Cascades, and saves the images in the log folder.

Reference: REAL-TIME SMILE DETECTION IN PYTHON OPENCV.

Usage

The entry in config.js can look like the following. (NOTE: You only have to add the variables to config if you want to change its standard value.)

{
	module: 'MMM-Smile',
    position: "middle_center",
	config: {
        // recognition interval in ms, default to 8 hours
        interval: 8 * 60 * 60 * 1000,
        // total test running time in seconds
        testRunTime: 120,
        // the smiling period in seconds in order to pass the test
        smileLength: 5,
        // use pi camera by default; set it to false for laptop camera
        usePiCam: true
	}
}

Dependencies

  • python-shell (installed via npm install)
  • OpenCV
    • Mac: brew install opencv
    • Linux: sudo apt-get install libopencv-dev python-opencv
    • Raspberry Pi: follow this guide, will take few hours