how to give path to save my result data in a directory

1 view (last 30 days)
hi, I'm new in matlab. please I would like to save the result of this function in a precilly directory. so that i could take it's this is have a this function:
url = 'http://192.168.0.3:8080/shot.jpg';
ss=imread(url);
fh = imshow(ss, 'Parent', handles.axes1);
while(1)
ss=imread(url);
set(fh,'CData',ss);
drawnow;
end

Accepted Answer

Star Strider
Star Strider on 24 Sep 2015
Try this:
url = 'http://192.168.0.3:8080/shot.jpg';
file_name = 'shot.jpg';
status = urlwrite(url, file_name);
ss=imread(filename);
This is inadvertently untested. I got the error:
Error using urlreadwrite (line 98)
Error downloading URL. Your network connection may be down or your proxy settings improperly
configured.
However you may be able to access it.
  4 Comments
Tiwa Romuald
Tiwa Romuald on 2 Oct 2015
Hi,now iwould like to have Video stream from my same ipcam. please escuse my english because i'm speak french language Thank you
Star Strider
Star Strider on 2 Oct 2015
My pleasure.
Please begin a new Question about the video stream from your ipcam. That is not an area of my expertise. Others here are likely better able to Answer it.
In your new Question, describe what you want to do, including the details of your ipcam network connectivity and protocols, what you have already attempted (please include or attach the relevant parts of your code), and what you have done that has or has not worked. If your code has thrown an error, please also copy all the red text from the Command Window and include it in your Question. Also, mention what relevant Toolboxes you have (for example, the ‘Computer Vision System Toolbox’ if you have it).
You need not apologise. Your English is almost infinitely better than my French!

Sign in to comment.

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!