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

6 ビュー (過去 30 日間)
Vishakha Mohanty
Vishakha Mohanty 2015 年 12 月 6 日
コメント済み: Walter Roberson 2015 年 12 月 7 日
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

回答 (2 件)

Walter Roberson
Walter Roberson 2015 年 12 月 6 日
Create an axes, such as "ax". Then
fh = image(ss, 'Parent', ax);
will tell the image() to place the image in the axes.

Vishakha Mohanty
Vishakha Mohanty 2015 年 12 月 7 日
This comand didn't work. I am getting an error. I have attached a screenshot of the error.
  1 件のコメント
Walter Roberson
Walter Roberson 2015 年 12 月 7 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMATLAB Support Package for IP Cameras についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by