Main Content

Getting Started with MIPI Sensor

This example shows how to get started with MIPI® CSI-2® video capture and processing by using SoC Blockset™ Support Package for Xilinx® Devices.

This example tests the data path from a MIPI CSI-2 camera board on your Zynq device to the host by capturing the camera output into a Simulink® model.


Before running this model, your hardware must be set up and connected to the host machine running Simulink. If you have not yet done so, run through the guided setup wizard portion of the SoC Blockset™ Support Package for Xilinx Devices installation. You might have already completed this step when you installed this support package.

On the MATLAB Home tab, in the Environment section of the toolstrip, click Add-Ons > Manage Add-Ons. Locate SoC Blockset Support Package for Xilinx Devices, and click Setup.

Live Video Capture from Target

The main purpose of this example is to check that the target development board has been set up correctly, and that it can communicate with the host platform.


The Video Capture MIPI block receives captured image data from the target hardware and imports it into Simulink as source data for simulation. The mask parameters allow you to configure the format of the captured data using the target hardware. The block is configured as shown.

These parameters specify:

  • A video source from the IMX274 camera board

  • A video frame size of 1280x720p (720p HDTV)

  • A video frame rate of 120fps

  • A pixel format of RGB

  • A separate output matrix for each color

The To Video Display block displays the video frames received by the Video Capture MIPI block. The block is configured to display frames in RGB format.

Running the Example

This example captures the camera input from the IMX274 board. When you run the simulation, the Captured Image Display scope opens. You should see the live video frames from the scene your camera is pointed at.

Next Steps

You have used this model to confirm your hardware setup and connection to Simulink. Next, see Corner Detection with Zynq-Based Hardware and MIPI Sensor.

See Also