mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-06-17 07:36:52 +00:00

* 🔥 Removes octopress.js * 🔥 Removes use of root_url var * 🔥 Removes Octopress generator reference from feed * 🔥 Removes delicious support * 🔥 Removes support for Pinboard * 🔥 Removes support for Disqus * 🔥 Removes support for Google Plus * ↩️ Migrate custom after_footer to default template * ↩️ Migrate custom footer to default template * ↩️ Migrate custom header to default template * 🔥 Removes unused template files * 🚀 Places time to read directly in post template * 🚀 Removes unneeded capture from archive_post.html template * 🔥 🚀 Removes unused, but heaving sorting call in component page * 🚀 Merged javascripts into a single file * 🔥 Removes more uses of root_url * 🚀 Removal of unneeded captures from head * 🔥 🚀 Removal of expensive liquid HTML compressor * 🔥 Removes unneeded templates * 🚀 Replaces kramdown with GitHub's CommonMark 🚀 * 💄 Adds Prism code syntax highlighting * ✨ Adds support for redirect in Netlify * ↩️ 🔥 Let Netlify handle all developer doc redirects * ✏️ Fixes typo in redirects file: Netify -> Netlify * 🔥 Removes unused .themes folder * 🔥 Removes unused aside.html template * 🔥 Removes Disqus config leftover * 🔥 Removes rouge highlighter config * 🔥 Removes Octopress 🎉 * 💄 Adjust code block font size and adds soft wraps * 💄 Adds styling for inline code blocks * 💄 Improve styling of note/warning/info boxes + div support * 🔨 Rewrites all note/warning/info boxes
79 lines
2.5 KiB
Markdown
79 lines
2.5 KiB
Markdown
---
|
|
title: "Image Processing"
|
|
description: "Instructions on how to setup image processing with Home Assistant."
|
|
ha_release: 0.36
|
|
---
|
|
|
|
Image processing enables Home Assistant to process images from [cameras](/components/#camera). Only camera entities are supported as sources.
|
|
|
|
<div class='note'>
|
|
|
|
If you are running Home Assistant over SSL or from within a container, you will have to setup a base URL (`base_url`) inside the [http component](/components/http/).
|
|
|
|
</div>
|
|
|
|
## ALPR
|
|
|
|
ALPR entities have a vehicle counter attribute `vehicles` and all found plates are stored in the `plates` attribute.
|
|
|
|
The `found_plate` event is triggered after OpenALPR has found a new license plate.
|
|
|
|
```yaml
|
|
# Example configuration.yaml automation entry
|
|
automation:
|
|
- alias: Open garage door
|
|
trigger:
|
|
platform: event
|
|
event_type: image_processing.found_plate
|
|
event_data:
|
|
entity_id: openalpr.camera_garage_1
|
|
plate: BE2183423
|
|
...
|
|
```
|
|
|
|
The following event attributes will be present (platform-dependent): `entity_id`, `plate`, `confidence`
|
|
|
|
## Face
|
|
|
|
Face entities have a face counter attribute `total_faces` and all face data is stored in the `faces` attribute.
|
|
|
|
The `detect_face` event is triggered after a Face entity has found a face.
|
|
|
|
```yaml
|
|
# Example configuration.yaml automation entry
|
|
automation:
|
|
- alias: Known person in front of my door
|
|
trigger:
|
|
platform: event
|
|
event_type: image_processing.detect_face
|
|
event_data:
|
|
entity_id: image_processing.door
|
|
name: 'Hans Maier'
|
|
...
|
|
```
|
|
|
|
The following event attributes will be present (platform-dependent): `entity_id`, `name`, `confidence`, `age`, `gender`, `motion`, `glasses`
|
|
|
|
## scan_interval and Optimising Resources
|
|
|
|
Image processing integrations process the image from a camera at a fixed period given by the `scan_interval`. This leads to excessive processing if the image on the camera hasn't changed, as the default `scan_interval` is 10 seconds. You can override this by adding to your config `scan_interval: 10000` (setting the interval to 10,000 seconds), and then call the `image_processing.scan` service when you actually want to perform processing.
|
|
|
|
```yaml
|
|
# Example configuration.yaml
|
|
sensor:
|
|
- platform: _AN_IMAGE_PROCESSING_PLATFORM_
|
|
scan_interval: 10000
|
|
...
|
|
automation:
|
|
- alias: Scan for faces when motion detected
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.door_motion_sensor
|
|
to: 'on'
|
|
action:
|
|
- service: image_processing.scan
|
|
data:
|
|
entity_id: image_processing.door
|
|
...
|
|
```
|