In Simulink, I have a user-defined function block whose main purpose is to read an image from a URL and output to a video viewer block. However, the imread(url) throws an error as follows:
Caused by: Cannot open file "https://cdn.star.nesdis.noaa.gov/GOES16/ABI/SECTOR/mex/GEOCOLOR/1000x1000.jpg"
for reading. FILENAME must be the absolute or relative path to the file.
The same imread works fine in the MATLAB terminal. Below is the full code in the function block. The objective of the function is to get a satellite image from a URL and send it to a video viewer block to view.
The input is the value of a constant block and the output (y) should be an image.
URL = 'https://cdn.star.nesdis.noaa.gov/GOES16/ABI/SECTOR/gm/GEOCOLOR/1000x1000.jpg';
URL = 'https://cdn.star.nesdis.noaa.gov/GOES16/ABI/SECTOR/se/GEOCOLOR/1200x1200.jpg';
URL = 'https://cdn.star.nesdis.noaa.gov/GOES16/ABI/SECTOR/eus/GEOCOLOR/1000x1000.jpg';
I'm unable to figure out what is going wrong or how to get my code working, I would appreciate any input and help.