How to read image in web browser

조회 수: 13 (최근 30일)
Ihab El-Sayed
Ihab El-Sayed 2011년 7월 15일
Hello, I am new in image processing, I manage to to get the image I need from the D-Link IP Camera by : using the following in Matlab. 'web http://l1.yimg.com/i/i/ab-mk/metro/polic11.jpg' I am trying now to use the command "imread" I tried the following, My question is very simple , I will really appreciate your prompt reply on this issue, How to read the image in the above web link as a variable "I"? The following is my guess but it did not succeed. Many thanks in advance for your help and support Ihab
web http://192.168.1.3/image.jpg local address or www address >> web http://l1.yimg.com/i/i/ab-mk/metro/polic11.jpg >> ImageURL=web http://l1.yimg.com/i/i/ab-mk/metro/polic11.jpg ??? ImageURL=web http://l1.yimg.com/i/i/ab-mk/metro/polic11.jpg | Error: Unexpected MATLAB expression.
ImageURL =
ImageURL =
>> edit web >> strmatch(fname, ['netscape';'Netscape']) ??? Undefined function or variable 'fname'.
>> fname=polic11.jpg ??? Undefined variable "polic11" or class "polic11.jpg".
>> fname='polic11.jpg'
fname =
polic11.jpg
>> strmatch(fname, ['netscape';'Netscape'])
ans =
[]
>> strmatch(fname, ['netscape';'Netscape'])
ans =
[]
>> I=strmatch(fname, ['netscape';'Netscape'])
I =
[]
>> imshow(I) >> I=strmatch(fname, ['web http://l1.yimg.com/i/i/ab-mk/metro/polic11.jpg'])
I =
[]
>> imshow(I) >> I=getimage(strmatch(fname,['web http://l1.yimg.com/i/i/ab-mk/metro/polic11.jpg'])) ??? Error using ==> imhandles at 81 The handle must be a valid graphics handle.
Error in ==> getimage>parseInputs at 223 him = imhandles(h);
Error in ==> getimage at 86 him = parseInputs(varargin{:});
>> I=getimage(strmatch(fname,['web http://l1.yimg.com/i/i/ab-mk/metro/polic11.jpg']))(strmatch(fname,['web http://l1.yimg.com/i/i/ab-mk/metro/polic11.jpg'])) ??? Error: ()-indexing must appear last in an index expression.
>> I=getimage(fname) ??? Error using ==> getimage>parseInputs at 217 GETIMAGE: Invalid handle H.
Error in ==> getimage at 86 him = parseInputs(varargin{:});
>> I =imread(['web http://l1.yimg.com/i/i/ab-mk/metro/polic11.jpg']) ??? Error using ==> imread at 293 Can't read URL "web <http://l1.yimg.com/i/i/ab-mk/metro/polic11.jpg >.
>> web http://l1.yimg.com/i/i/ab-mk/metro/polic11.jpg >> I=imread('web http://l1.yimg.com/i/i/ab-mk/metro/polic11.jpg') ??? Error using ==> imread at 293 Can't read URL "web <http://l1.yimg.com/i/i/ab-mk/metro/polic11.jpg >.
All the above trials were unsuccessful , Please try to find a way for reading the image as a variable from the browser. Your prompt reply will be very highly appreciated Best regards, Ihab El-Sayed

채택된 답변

Sean de Wolski
Sean de Wolski 2011년 7월 15일
I = imread('http://l1.yimg.com/i/i/ab-mk/metro/polic11.jpg');
works fine for me... no reason for web
  댓글 수: 1
Ihab El-Sayed
Ihab El-Sayed 2011년 7월 15일
Hi Sean de,
Thank you very much.
It works fine.
Many thanks again for your prompt reply.
Ihab

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB 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