How do I use my smart phone camera as a webcam in MATLAB?
61 次查看(过去 30 天)
显示 更早的评论
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).
3 个评论
keerthana potharaj
2019-1-29
移动:DGM
2023-2-22
how do we interface mobile camera for deep learning?
P.S we don't have web cam. pls help us.
kundan surse
2020-1-21
移动:DGM
2023-2-22
I want to take the screenshot of my mobile screen form matlab to use it for further prossesing how can i do that ?
采纳的回答
Ashish Uthama
2011-7-20
18 个评论
Walter Roberson
2023-5-16
编辑:Walter Roberson
2024-11-7,1:39
If you happen to use the same product as was discussed in the link on instructables then the vendor site says that exposure is adjustable. https://www.e2esoft.com/ivcam-camera-settings/
Dominik
2024-11-6,22:52
Hi, tip from me - a bit quicker than taking jpg files is to use video. Using the mentioned app the link is simpy:
url_cam = 'http://<ip_address>/video';
cam = ipcam(url_cam)
更多回答(12 个)
Soham Bhattacharyya
2016-5-16
You can use DroidCam if you are using an android phone. You'll need to install OS Generic Video Interface driver.
Hope it helps. :)
2 个评论
elfodd
2017-5-15
编辑:elfodd
2017-5-15
for anyone that can't find the correct address for droidcam simply connect to droidcam using your browser and click on the i button. It should look like this
http://192.168.1.61:4747/mjpegfeed?640x480
and then
camera = ipcam('http://ipaddress:port/mjpegfeed?640x480')
Chirag Gupta
2011-7-20
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
5 个评论
Joshua
2013-7-22
is the IP address for the android webcam streaming live video or simply a single image or series of saved images?
Tiwa Romuald
2015-10-15
hi, please how can i save the video from this function? thank you best regard
amro
2014-5-10
url=('http://192.168.43.1:8080/shot.jpg?rnd=350264');
hVideoIn = vision.VideoPlayer('Name', 'Final Video');
while(1)
ss=imread(url);
step(hVideoIn,ss)
end
3 个评论
Walter Roberson
2015-9-6
ipcam() was not introduced until R2015a, a year after amro posted their Answer.
Tiwa Romuald
2015-10-8
Hi Hauder Ali, please can you explain how it work on IP camera Image Acquisition. I new in Matlab. thx
PIYUSH KUMAR
2015-9-14
Here's the working code for color detection using android camera:
url = 'http://192.168.0.100:8080/shot.jpg';
framesAcquired = 0;
while (framesAcquired <= 50) % the vedio will work till the 50 video frames, after that the vedio will stop. You can use while(1) for infinite loop
data = imread(url);
framesAcquired = framesAcquired + 1;
diff_im = imsubtract(data(:,:,1), rgb2gray(data)); % subtracting red component from the gray image
diff_im = medfilt2(diff_im, [3 3]); % used in image processing to reduce noise and for filtering
diff_im = im2bw(diff_im,0.18); % convert image to binary image
stats = regionprops(diff_im, 'BoundingBox', 'Centroid'); % measures a set of properties for each connected component in the binary image
drawnow;
imshow(data);
hold on
for object = 1:length(stats)
bb = stats(object).BoundingBox;
bc = stats(object).Centroid;
rectangle('Position',bb,'EdgeColor','b','LineWidth',2)
plot(bc(1),bc(2), '-m+')
end
hold off
end
%stop(vid); % to stop the video
%flushdata(vid); % erase the data video
clear all
1 个评论
Tiwa Romuald
2015-10-14
编辑:Tiwa Romuald
2015-10-15
hi PIYUSH KUMAR please this function it's just for a snaphot or video? i would like to have video and save it from my smarphone into matlab. how can I save directly as a AVI video? please help me. thank you
Amrinder Brar
2015-3-25
编辑:Amrinder Brar
2015-3-25
Is there any simple solution to this problem in iphone(i.e. without having to install any third party apps) ?
1 个评论
Walter Roberson
2015-9-6
saras
2016-7-1
I am not sure if this is exactly what you are looking for. However, you can use 'Simulink Support Package for Samsung GALAXY Android Devices' or 'Simulink Support Package for Apple iOS Devices' to access the appropriate smartphone camera. Both these support packages come with a Camera block that allow you to get the Camera data inside MATLAB. You can subsequently connect the Camera block to a Video Viewer block if you would like to visualize the data in Simulink.
1 个评论
Cristian David Jimenez Bedoya
2016-12-5
编辑:Walter Roberson
2016-12-5
buenas, este programa funciona bien pero no he logrado capturar una imagen a partir de este mismo, como puedo obtener una captura de imagen y almacenarla ?
url = "http: // <dirección IP> /shot.jpg ';
ss = imread (url);
fh = imagen (ss);
mientras que (1)
ss = imread (url);
conjunto (FH, 'programable CData', ss);
drawNow;
fin
2 个评论
Walter Roberson
2016-12-5
Approximate translation:
Good, this program works fine but I have not managed to capture an image from this same, how can I get an image capture and store it?
MARIA JAVED
2017-2-4
can anybody tell me that how we can do face detection through Android phone pls help??? i need that code?
1 个评论
Walter Roberson
2017-2-6
You would either have to write the code in MATLAB and use MATLAB Coder, or else you would have to create a Simulink model and deploy that to Android.
Jonathan berry
2017-4-10
Hello guys,
I keep having this error:
Error using imread (line 350) Can't read URL "http://MY_IP /shot.jpg".
any help will be appreciated
2 个评论
Walter Roberson
2018-4-29
You need to replace he "MY_IP " part by your actual IP address, such as http://192.168.0.10/shot.jpg
Dilip Dubey
2018-4-29
How can I read other sensors from IP webcam app in Matlab?
Beril Sirmacek
2018-4-29
Hi All,
I found out that;
imread('http://MY_IP /shot.jpg');
works only on secured network for me. If I am on a public network, then it gives error.
2 个评论
Walter Roberson
2018-9-6
"On Windows platforms, this parameter supports URLs that point to MMS (Microsoft Media Server) streams."
Akram
2023-12-11
Hi, there is a new feature on Apple devices (Continuity Camera) where we can directly use our phone's camera as our mac's webcam. With this feature activated, when using the command imaqhwinfo, i only see my mac's webcam and not my iPhone camera. Is there a way to acquire video (live) with my iPhone's camera ?
0 个评论
另请参阅
类别
Test and Measurement
Image Acquisition Toolbox
Image Acquisition Toolbox Supported Hardware
Point Grey Hardware
在 Help Center 和 File Exchange 中查找有关 Point Grey Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!