Compare commits

...

1 Commits

8 changed files with 16 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

11
notes.md Normal file
View File

@ -0,0 +1,11 @@
# Snapshot url
http://192.168.0.16:8765/picture/1/current/?_username=admin&_signature=4c839a546045ccf433f24e6cd62ec7e1e5334f7a
# Brightness function reference
https://stackoverflow.com/questions/3490727/what-are-some-methods-to-analyze-image-brightness-using-python
# Functions To-do List
- [ ] Grab snapshot from camera stream
- [ ] Calculate brightness from camera stream
- [ ] output brightness to terminal
- [ ] interface brightness to node-red/home-assistant system

5
test.py Normal file
View File

@ -0,0 +1,5 @@
def brightness( im_file ):
im = Image.open(im_file)
stat = ImageStat.Stat(im)
r,g,b = stat.mean
return math.sqrt(0.241*(r**2) + 0.691*(g**2) + 0.068*(b**2))