imshow(I) displays the image I in a Handle Graphics® figure, where I is a grayscale, RGB (truecolor), or binary image. For binary images, imshow displays pixels with the value 0 (zero) as black and 1 as white. imshow(I,RI) displays the image I with associated 2-D spatial referencing object RI.

You can build and run a system on today’s hot new hardware in no time at all, without writing low-level code. Simply download free support packages for I/O with MATLAB and automatic programming with Simulink, and you’re ready to go.

This example shows you how to build a motion sensor camera using MATLAB® Support Package for Raspberry Pi® Hardware. In this example you combine a passive infrared (PIR) sensor with a Raspberry Pi Camera Board to build a motion sensor camera. A PIR sensor measures infrared light radiating from objects. The sensor detects the change in the infrared radiation and triggers an alarm if the gradient of the change is higher than a predefined value. You connect the PIR sensor to one of the digital input pins of the Raspberry Pi hardware and monitor the output of the PIR sensor. When PIR sensor detects motion it outputs a logic high value. When you detect a logic high value on the digital input pin, you take a picture and save it on the host computer.

This example shows you how to use MATLAB to process images captured from a Raspberry Pi Camera Board module to track a green ball. The Raspberry Pi Camera Board is a custom designed add-on module for Raspberry Pi hardware. The MATLAB Support Package for Raspberry Pi Hardware allows you to capture images from the Raspberry Pi Camera Board and bring those right into MATLAB for processing. Using this capability we will develop an ball tracking algorithm.

This example shows how to create a connection to the web camera and capture still images. Connect the Raspberry Pi™ board to your host computer. Note: If you have not previously configured your Raspberry Pi board, see Complete Additional Setup Tasks.

This example shows how to use Fuzzy Logic Toolbox software for image processing. Specifically, this example shows how to detect edges in an image.

An edge is a boundary between two uniform regions. You can detect an edge by comparing the intensity of neighboring pixels. However, because uniform regions are not crisply defined, small intensity differences between two neighboring pixels do not always represent an edge. Instead, the intensity difference might represent a shading effect.

The fuzzy logic approach for image processing allows you to use membership functions to define the degree to which a pixel belongs to an edge or a uniform region.

You can use MATLAB to communicate with a Raspberry Pi board and its peripheral devices using MATLAB Support Package for Raspberry Pi. You can program Raspberry Pi boards to run your algorithms using Simulink Support Package for Raspberry Pi Hardware. The support package generates code from your Simulink model in a click of a button that then runs on the Raspberry Pi board.

Embedded Coder Support Package for BeagleBone Black Hardware enables you to create and run Simulink models on BeagleBone Black hardware. The support package includes a library of Simulink blocks for configuring and accessing BeagleBone Black peripherals and communication interfaces.

In this example you will learn how to configure a simple Simulink model to generate code for BeagleBone Black hardware and run the generated code on the board to periodically turn and LED on and off.

You can add support for BeagleBone Black hardware to the Embedded Coder® product by installing the Embedded Coder Support Package for BeagleBone Black Hardware. Installation puts the following items on your host computer:

The MATLAB Support Package for Raspberry Pi Hardware enables you to communicate with Raspberry Pi hardware remotely from a computer running MATLAB. The support package includes a MATLAB command line interface for accessing Raspberry Pi hardware’s I/O peripherals and communication interfaces. Using this command line interface, you can collect data from sensors connected to Raspberry Pi hardware and actuate devices attached to Raspberry Pi hardware.

In this example you learn how to create a raspi object to connect to Raspberry Pi hardware from within MATLAB. You examine the properties and methods of this object to learn about the status of basic peripherals such as digital I/O pins (also known as GPIO), SPI, I2C, and Serial. Using this object, you execute shell commands on your Raspberry Pi hardware and manipulate files on the Raspberry Pi hardware.