I have an smartphone device with a camera. I would like to obtain and process this image data in MATLAB.
(Specifically, I have an Android device).
No products are associated with this question.
The general solution would need two parts, one to broadcast the data from the device and another part to read this data into MATLAB.
A specific solution for Android:
url = 'http://<ip address>/shot.jpg'; ss = imread(url);
fh = image(ss);
while(1)
ss = imread(url);
set(fh,'CData',ss);
drawnow;
end
Example:

(If you find faster ways/solutions for other devices, post it here!)
http://itunes.apple.com/us/app/ip-cam/id333208495?mt=8 appears close enough. Care to try and post another answer?
hi, i want to know that can we change this rgb image into grayscale or binary image. i have tried but failed. so any suggestion plz
set(fh, 'CData', rgb2gra(ss));
And be sure that you have done
colormap(gray(256))
after the original image() call.
With the iPhone, using the App suggested by Ashish above (IP Cam), you can achieve the same pretty easily! The code is exactly the same:
url = 'http://<ipaddress>:8020/image.jpg';
ss = imread(url);
fh = image(ss);
while(1)
ss = imread(url);
set(fh,'CData',ss);
drawnow;
end
Hi, Excuse me for my bad English. I'm using IP webcam for Android.I used
url = 'http://158.124.30.101:8080/shot.jpg';
ss = imread(url);
fh = image(ss);
The video is excellent but my problem is that I want to use a bounding box to sellect a red object in the video. I don't know if it's possible. Can anyone help me?thanks
Francisco, you'll get a better answer if you ask this as a new question: http://www.mathworks.com/matlabcentral/answers/questions/new
(also look at http://www.mathworks.com/matlabcentral/fileexchange/28512-simple-color-detection-by-hue for example)
0 Comments