diff --git a/README.md b/README.md index 975ded0..2f16e95 100644 --- a/README.md +++ b/README.md @@ -15,4 +15,7 @@ Run `slouchy.py` to have a system tray icon that alerts you when you're slouchin If it complains about multiple faces run `main.py` and you should get an output image showing everything that looks like a face to the program. # License -This software is released under the GNU GPL version 3 except for the `haarscascade_frontalface_default.xml` file which is released under the Intel License Agreement For Open Source Computer Vision Library \ No newline at end of file +This software is released under the GNU GPL version 3 except for the `haarscascade_frontalface_default.xml` file which is released under the Intel License Agreement For Open Source Computer Vision Library + +# Disclaimer +This software is not intended to diagnosis, cure, or prevent diseases in any way. No warranties are made or implied for its efficacy. It's simply a little program the author wanted and decided to share. \ No newline at end of file diff --git a/setup.py b/setup.py index 11cb7da..f2cc578 100644 --- a/setup.py +++ b/setup.py @@ -1,19 +1,19 @@ from configobj import ConfigObj -from main import calculate_c_squared, take_picture, detect_face +from main import video_device, calculate_c_squared, take_picture, detect_face # Set initial values def setup(): config = ConfigObj('slouchy.ini') - #video_device can be an int or a string, so try int, and if not assume string - try: - video_device = int(config['MAIN']['video_device']) - except ValueError: - video_device = str(config['MAIN']['video_device']) + # #video_device can be an int or a string, so try int, and if not assume string + # try: + # video_device = int(config['MAIN']['video_device']) + # except ValueError: + # video_device = str(config['MAIN']['video_device']) - maybe_image = take_picture(video_device) - maybe_face = detect_face(maybe_image) + maybe_image = take_picture(video_device) + maybe_face = detect_face(maybe_image) maybe_c_squared = calculate_c_squared(maybe_face) if maybe_c_squared.success: @@ -25,4 +25,5 @@ def setup(): config.write() -setup() \ No newline at end of file +if __name__ == '__main__': + setup() \ No newline at end of file diff --git a/slouchy.ini b/slouchy.ini index b4c15a1..e6f456a 100644 --- a/slouchy.ini +++ b/slouchy.ini @@ -23,9 +23,10 @@ # How long the tray_icon.py slouching alert should be shown (in secs) [MAIN] -c_squared_reference = 299377 -allowed_variance = 0.035 +c_squared_reference = 300730 +allowed_variance = 0.0365 cascade_path = /usr/share/opencv/haarcascades/haarcascade_frontalface_default.xml +;cascade_path = haarcascade_frontalface_default.xml video_device = -1 check_frequency = 30 ; alert_duration = 5# Not implemented yet...