Import Image from Specified Location
This example shows how to import an image from a file in the specified location to Simulink workspace by using the Image
From
File
block.
Example Model
Open the simulink model.
open('ex_readcolorimage');
The model imports a color image to the Simulink workspace and displays the R, G, and B color components of the image by using the Video
Viewer
block. The Image Signal parameter of the Image
From
File
block is set to Separate
color
signals
inorder to import the RGB color components separately.
Simulate and Display Results
sim('ex_readcolorimage');