FlexCase

Vision Systems

  • Get a USB camera system streaming video

Working with a UVC camera can be done in multiple environments. This guide will walk through Simulink, but OpenCV will work as well.

Prerequisites:

  • Install the Raspberry Pi toolbox as explained here.
  • Connect a USB camera to the FlexCase. You will need an exposed USB port, as shown below. If you need a cutout case, please contact us.

Build, Configure, and Run

Open the provided model MPU_Camera.slx from the software downloads section. Ensure the model is configured (Hardware Settings) for your use case as explained in the Simulink on MPU guide.

Run the model in external mode (Monitor & Tune) and a camera feed should open as SDL Video Display.

If that was unsuccessful, please try the following debugging tips:

  • In the Simulink model you may need to change the V42L Video Capture device name to /dev/video1 if /dev/video0 doesn’t work.
  • If you see the error referencing “SDL.h” you may need to install the Simple Direct Media Layer 2 on the MPU by running the following command while connected to the internet. Please see the SSH guide for information on how to connect to the FlexCase and supply it with internet through your computer.
Copy to Clipboard

Success!

You have successfully connected to the camera. You can now try adding more complex camera analysis like object tracking and frame captures.

Next Steps

You are now prepared to begin building your own projects. Use the provided template Simulink models and start adding your own code.