diff --git a/Video-condition.md b/Video-condition.md index 883fb4e..aa9a0a4 100644 --- a/Video-condition.md +++ b/Video-condition.md @@ -85,11 +85,32 @@ An example of a video source having no output would be if all instances of the s ### Matches pattern -TODO +This condition type is used if an exact matching of the video sources output is not possible. + +![Pattern](https://user-images.githubusercontent.com/19472752/158242536-899bc7f4-01ee-4e74-a6fe-ca377fcda296.PNG) + +You can specify how similar the video source needs to be to the provided pattern by changing the threshold using the slider. (1) +If you want to match non-rectangle shaped areas of the video source you have the option to use the alpha channel of the provided input image as mask for areas of the pattern which should be ignored. (2) +Depending on the size of the pattern and the video sources resolution the checks might become rather resource expensive. In this case it might be worth it to reduce the frequency at which the checks are performed using (4). +You can press the "Show match" button for a preview of whether or not the provided pattern can be found in the video source. (3) ### Contains object -TODO +This condition type can be used to detect certain objects in the video source using haar cascade models. + +![ObjectMatch](https://user-images.githubusercontent.com/19472752/158244220-1a1825d7-fb85-4c61-aef7-d6901c532cf5.PNG) + +You can specify which model to use using the file selection at (1). +By default a face recognition model will be used. +The "Scale factor" can be used to control the accuracy of the object detection in relation to the CPU resources used. (2) +The "Minimum neighbors" parameter can be used to control the quality of the matches. +So if you get a lot of false positive matches it might be worth increasing its value and if you get too few match it might be worth testing if lowering it leads to better results. (3) +The minimum and maximum size parameters let you control how large the object can be to be considered a match. (4) +If the value is left at 0 it will be ignored and any size will be accepted. +Increasing the minimum size might increase the performance of the object detection. +If you want to preview whether or not objects are successfully being detected you can press the "Show match" button. (5) +As the object detection can be very resource intensive it might be worth considering to decrease the frequency at which the condition is checked. (6) +Limiting the area which is to be check can also drastically improve the performance of this condition type. ## Example (output has not changed)