OpenCV
OpenCV is an open source computer vision image and video processing library.
Some pre-defined classifiers can be found here.
To setup OpenCV with Home Assistant, add the following section to your configuration.yaml
file:
# Example configuration.yaml entry
image_processing:
- platform: opencv
name: Front Door Faces
source:
- entity_id: camera.front_door
classifier:
mom: /path/to/classifier.xml
- name (Required): The name of the OpenCV image processor.
- source array (Required): List of image sources.
- entity_id (Required): A camera entity id to get picture from.
- name (Optional): This parameter allows you to override the name of your
image_processing
entity.
- name (Optional): This parameter allows you to override the name of your
- entity_id (Required): A camera entity id to get picture from.
- classifier (Optional): Dictionary of name to path to the classifier xml file. If this field is not provided, a face classifier will be downloaded from OpenCV’s Github repo.
classifier may also be defined as a dictionary of names to classifier configurations:
mom:
file: /path/to/classifier/xml
neighbors: 4
min_size: (40, 40)
scale: 1.1f
- file (Required): The path to the classifier xml file.
- scale (Optional): The scale to perform when processing, this is a
float
value that must be greater than or equal to1.0
, default is1.1
. - neighbors (Optional): The minimum number of neighbors required for a match, default is
4
. The higher this number, the more picky the matching will be; lower the number, the more false positives you may experience.
If you would like to see the regions that OpenCV has detected, add this OpenCV camera to your config’s custom_components/camera
directory: https://gist.github.com/Teagan42/bf4b941b34a79a3e184e149ff1efd82f