How to get a video input from an IP Camera to MATLAB GUI?

I am using an Android app 'IP Camera' to get a video input and I am displaying the video in MATLAB. I want to create a MATLAB GUI, how can I input the video input from the app?
Following is my code to display the video in MATLAB from the app -
url = 'http://<ip - address>/shot.jpg';
ss = imread(url);
fh = image(ss);
while(1)
ss = imread(url);
set(fh,'CData',ss);
drawnow;
end

Answers (2)

Create an axes, such as "ax". Then
fh = image(ss, 'Parent', ax);
will tell the image() to place the image in the axes.
This comand didn't work. I am getting an error. I have attached a screenshot of the error.

1 Comment

Are you able to get even a single frame? You appear to have found the posting http://www.mathworks.com/matlabcentral/answers/12036-how-do-i-use-my-smart-phone-camera-as-a-webcam-in-matlab that discusses use of IP Camera app, and which also talks about using ipcam() with newer MATLAB.
The IP address I see in your URL is a public IP address. Typically you would be wanting to use the arrangement with a private IP address accessed by WiFi -- for security if no other reason. Using a public IP address is by no means prohibited, but you also need to take into account how Mobile IP works, and while you can find your public IP address by visiting http://www.whatip.com, you might have to worry about IPv4 versus IPv6.

Sign in to comment.

Categories

Find more on MATLAB Support Package for IP Cameras in Help Center and File Exchange

Asked:

on 6 Dec 2015

Commented:

on 7 Dec 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!