Coder Social home page Coder Social logo

erickong1985 / send-image-android-to-pc-via-bluetooth Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rahuldevadiga/send-image-android-to-pc-via-bluetooth

0.0 0.0 0.0 131 KB

It is often required to send images captured by the mobile camera to a device like laptop or Raspberry pi for further processing of images. Now a days, android mobiles have a very high quality camera at a very low price. Such images can be made use of for processing of images in real time. This project consists of an Android application which captu

Python 11.92% Java 88.08%

send-image-android-to-pc-via-bluetooth's Introduction

Send-image-Android-to-PC-via-bluetooth

It is often required to send images captured by the mobile camera to a device like laptop or Raspberry PI for its further processing. Now a days, android mobiles come with a very high quality camera at a low price which can smartly be made use of, if you are able to connect your device to android phone via bluetooth programmatically by establishing a bluetooth socket connection and then sending the image.

The Python file bluetoothReceiveImg.py should first run on the server device which may be a device with Windows, Ubuntu, Mac OS or Raspbian OS. The Python code makes use of open source Pybluez library. The server will advertise its service so that client can listen and accept the connection.

This project consists of an Android application which captures the image in real time and then converts the image into a base64 string which is then sent to the device connected. This code gives flexibility to the user of selecting the receiving device from a list of paired devices displayed. Once clicked on "CONNECT TO DEVICE" button, a bluetooth socket connection is established. Once connection is established, the user may click the "CLICK IMAGE" button which opens your Android camera. Transmission starts as soon as the image is clicked. Further the transmission time can be reduced by compromising on quality or using a lossless compression techniques.

Installation

#Receiving device Install pybluez and matlotlib by the following command pip install pybluez matplotlib

Instructions

  1. Make sure that the sending and receiving devices are paired.

  2. First run bluetoothReceiveImg.py in receiving device.

  3. Make sure bluetooth of Android device is swithed on, visible and paired to the receiving device.

  4. In the Android app, select your device from the list of devices and click "CONNECT TO DEVICE" button. On successful establishment of connection, "Connection Established" will be displayed on text view.

  5. Click the "CLICK IMAGE" button which will open a custom camera and allow you to capture image.

  6. After the transfer is successful, it will be notified in the text view of the app.

  7. The image will be displayed on the receiving device by using Matplotlib library.

send-image-android-to-pc-via-bluetooth's People

Contributors

rahuldevadiga avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.