> For the complete documentation index, see [llms.txt](https://sharinghub-eng.kittenbot.hk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sharinghub-eng.kittenbot.hk/programming-platforms/kittenblock/kittenblock-functions-and-features/kittenbot-extensions/video-sensing.md).

# Video Sensing

The Video & Detection Plug-in allows Kittenblock to use the webcam to produce various effects.

### Add the Video Sensing Extension

Open up the extension page.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/add.png)

Select Video Sensing.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/cam6.png)

New programming blocks will be added.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/cam1.png)

### Video Sensing

You can also use a USB webcam by enabling this option in settings.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/cam3.png)

We use this block to turn on or off the camera.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/cam2.png)

#### Face Detection

Example: Detecting a face and putting a mask on it.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/cam4.png)

Example: Tracking Facial Features

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/cam5.png)

#### Motion Detection

Example: Detecting movement

The threshold(0-100) determines how large the movement should be for the event to be triggered.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/cam7.png)

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/cam10.gif)

Example: The direction of movement can also be obtained(-180\~180).

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/cam8.png)

Example: Obtaining the velocity of the object in move.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/cam9.png)
