Code regarding connect any android or Iphone mobile camera with computer for python and openCV.
Some time you have to do live streaming or have to run object detection model with camera and you don't have high quality camera, well solution is here.
Clone repo to your computer
git clone https://github.com/ravirajsinh45/connect_mobile_camera_with_computer_using_python.git
change directory
cd connect_mobile_camera_with_computer_using_python
Now install require libraries.
pip install -r requirements.txt
Their are two way to connect camera with pc
- Using USB cable
- Using WIFI
-
Download Droidcam app on your IOS device from app store
-
Download and install Dev47app setup on your pc for ios devices.
-
Plug the device with PC and open Droidcam on your iphone you will get screen like this
-
open Droidcam app on pc and click on USB button, you will get screen like this
-
Hit first refresh button and will get your device id in box than after hit start button and you will get camera input on your computer screen.
-
From using_USB folder open camera_input_for_IOS_device and run the code.
here is documantation by Droidcam
-
Download droidcam app on your Android device from play store
-
Download and install Dev47app setup on your pc.
-
On the phone, go to Settings -> Developer Options, and enable “USB Debugging”.
- (In case) On most phones the Developer options screen is hidden by default. To make it visible, go to Settings > About phone and tap “Build number” 7 times. Return to the previous screen to find “Developer options” at the bottom.
-
Plug the device into computer over USB and open Droidcam app.
-
open Droidcam app on pc and click on USB logo and press refreash button, you will get your device name or some random string(unique id).
-
Add port which is showing in your mobile screen(generally 4747).
-
Hit start button and you will get camera input on your computer screen.
-
Open this notebook run the code and you will get your mobile camera input(make sure you installed all libraries using requirements.txt).
-
Download IP Webcam application from play store
-
connect both mobile and computer with same Internet
- If you have wifi than connect both computer and mobile with wifi
- If you do not have wifi than turn on mobile hotspot and connect PC with it.
-
Open Ip Webcam app
-
scroll down to bottom than click on start server button
-
From
using_wifi
folder open this notebook and follow along.
Update soon