This blog shows the details of using QP to change a smartphone into a wireless mouse.
1. A computer installing Linux and with WIFI available, the faster, the better. My laptop has Kubuntu 10.04, 64-bit installed and its CPU is i330, 2.13GHz. I tried QP win version and smartphone but failed. After searching on the web, it is said that the ffmepg of opencv has some problem on windows, so win version has no such function.
2. I compiled OPENCV with my configuration, including options of TBB for multi-core and FFMPEG for video processing and so on. I also installed those libraries.
3. A smartphone with IpWebcam or similar installed. I am using an Android phone. IpWebcam can make it as a stream server which changes the video taken by its camera into a motion jpeg stream and send out. I don’t have an IPhone but I think there must be some similar apps in APPStore, so IPhone should be OK with the corresponding apps.
Now, I do the following steps to change the phone into a non-touch wireless webcam.
1. Connecting the phone and the PC by WIFI. I’ve tried two methods, one is using the phone as an AP and PC to connect it; the other is using a wireless router as an AP and connecting the phone and the PC to the router by WIFI. Both are OK.
2. Running IpWebcam on the phone to start the video strem server.
3. Running QP on PC with server address as a parameter. Then QP can receive the video stream and process it. Now I can use it as a wireless mouse to control the cursor.🙂
Here is a not-so-good video:
For better visual effect, please watch this one:
It’s really not easy to draw the smile. The configuration process is a little difficult. Some time, you need to guess where is the problem and how to solve it. WIFI is slower and longer delay than USB, which degrades user experience very much. And my smartphone is a cheap one, which has a camera with low resolution and not so clear. In addition, holding a phone is much more clumsy than a webcam. Anyway, I’ve done that!😛