With the Video Sensing extension, you can enable a sprite to interact with a camera.

:::info Note: To use the Cognitive Services extension, ensure that your PC is equipped with a camera or connected to an external one and that the camera is working properly.
If your camera doesn’t work properly, refer to “What If My Camera or Microphone Doesn’t Work Properly When I Use mBlock 5?“ to solve the problem. :::

Add the Video Sensing extension

  1. Click the Sprites tab and click + extension at the bottom of the blocks area.
    image.png
    2. On the Extension center page that appears, click + Add at the bottom of Video Sensing.
    image.png
    After being added, the extension and its block are displayed in the blocks area.
    image.png

    Use the Video Sensing blocks

(1) Executes the subsequent script when the video motion is greater than the specified value.

Video Sensing - 图4

(2) Motion value of the video relative to the sprite.

Video Sensing - 图5

(3) Turns the video on, off, or on flipped.

Video Sensing - 图6

(4) Sets the transparency of the video.

Video Sensing - 图7