Process Android phone live stream using OpenCV and Python



This video demonstrates how to easily fetch a live video stream from your Android phone to your PC and then process it using OpenCV and Python.

Explore my tutorials:

More awesome topics covered here:
WhatsApp Bot using Twilio and Python:
Discovering Hidden APIs:
RegEx in Python:
Introduction to Numpy:
Introduction to Matplotlib:
Introduction to Pandas:
Intermediate Python:
Functional Programming in Python:
Python Package Publishing:
Multithreading in Python:
Multiprocessing in Python:
Parallel Programming in Python:
Concurrent Programming in Python:
Dataclasses in Python:
Exploring YouTube Data API:
Jupyter Notebook (Tips, Tricks and Hacks):
Decorators in Python:
Inside Python:
Exploring datetime:
Computer Vision for noobs:
Python for web:
Awesome Linux Terminal:
Tips, tricks, hacks and APIs:
Optical Character Recognition:
Facebook Messenger Bot Tutorial:

Facebook:
Github:
Twitter:

#python #opencv #android

Nguồn: https://hdwallpaperslovely.com

Xem thêm bài viết khác: https://hdwallpaperslovely.com/cong-nghe/

Related Posts

Realme 5 Pro xách tay GIÁ QUÁ RẺ: Snapdragon 712, 5 Camera, pin trâu

March 15, 2020

March 15, 2020 8

Realme 5 Pro chính hãng chưa về Việt Nam nhưng Realme 5 Pro xách tay là Realme Q được đánh...

How To: Install a Driver using a DLL File (Windows 10, 8, 7, XP & more)

March 12, 2020

March 12, 2020 8

This video shows you how to install a Driver from a .DLL file, on Windows 10, Windows 8, Windows 7,...

How To Remove Frp By ADB MODE [TOOL FREE ]

February 28, 2020

February 28, 2020 7

How To Remove Frp By ADB MODE [TOOL FREE ] 1. IST FLASH ADB OR COMBINATION FILE WITH ODIN ADB...

adblock plus apk || How to Stop ads on android phone home screen

April 27, 2020

April 27, 2020

adblock plus apk || How to Stop ads on android phone home screen In this video I have shown very...

Hướng dẫn cách chèn video vào Powerpoint, chèn clip vào Powerpoint

April 8, 2020

April 8, 2020 3

Hướng dẫn cách chèn video vào Powerpoint, chèn clip vào Powerpoint và các thao tác định dạng, thiết lập phát...

Huawei P8 Lite 2017: Some Secret Codes (Phone Test)

March 2, 2020

March 2, 2020 18

With this video, I want to show you some secret hidden codes at the Huawei P8 Lite (2017). Test your...

Push files to emulator Android Studio

March 17, 2020

March 17, 2020 11

***PLEASE NOTE You need to add: ‘uses-permission android:name=”android.permission.WRITE_EXTERNAL_STORAGE” /’ to your Android Manifest (file named AndroidManifest.xml) below the manifest tag...

(Săn Hàng) Giá Chỉ 6000đ Trên TiKi | Từ Ngày 6.9 đến 9.9 Săn Ngay nào

March 6, 2020

March 6, 2020 2

Chào anh em hôm nay mình xin chia sẻ với anh em chương trình săn hàng trên tiki từ ngày...

March 2019 Bypass FRP Lock All Samsung Phones ADB Bluetooth Method

February 4, 2020

February 4, 2020 9

Steps & FRP Unlock Files: ADB_FRP_Unlock.zip: March 2019 Bypass FRP Lock All Samsung Phones ADB Bluetooth Method Nguồn:https://hdwallpaperslovely.com/ Xem Thêm...

Hướng dẫn đồng bộ dữ liệu Smartphone Android sang OPPO mới cực đơn giản

March 15, 2020

March 15, 2020 3

Video hướng dẫn đồng bộ | sao lưu | backup | Restore dữ liệu từ điện thoại Android như Samsung,...

Nexus 9 Hard Factory Reset HBOOT Mode

March 15, 2020

March 15, 2020 38

How to hard factory reset/restore in hboot fastboot/bootloader recovery mode Google HTC Nexus 9 android lollipop 5.0 tablet. Can’t unlock...

Tuyệt chiêu thoát Fastboot Xiaomi hiệu quả với các thao tác đơn giản

August 21, 2020

August 21, 2020 44

Bạn đang sử dụng điện thoại Xiaomi để thỏa sức chơi game giải trí, xả stress. Tuy nhiên bạn bối...

Como Remover Conta Google Lenovo Vibe K6, K6 Plus, DESBLOQUEIO COMPLETO

March 28, 2020

March 28, 2020 27

Como Remover Conta Google Lenovo Vib K6, K6 Plus, DESBLOQUEIO COMPLETO, Procedimento Completo SEM USAR COMPUTADOR, MAIS INFORMAÇÕES ABAIXO!!! LENOVO...

Samsung J7 Prime (Sm-G610F) Google Account Bypass/Reset Frp 2020

February 29, 2020

February 29, 2020

How to remove google account lock on Samsung J7 Prime help and feedback option no available on talkback setting solved...

FIX oppo unauthorized cannot download (Only For Windows 7 32 and 64 bit)

March 2, 2020

March 2, 2020

oppo unauthorized can not download please check internet connection solved Link:- = Miracle Box 2.58 Crack Link:- GSM Aladdin V2.1.42...

Comments
  • import kivy.app import App

    from kivy.uix.label import Label

    class myApp(App)

    def build(self):

    return Label(text"hello world ")

    if __name__=='__main__'

    myApp().run()

  • import kivy.app import App

    from kivy.uix.label import Label

    class myApp(App)

    def build(self):

    return Label(text"hello world ")

    if __name__=='__main__'

    myApp().run()

  • Hi,
    Thank you for this tutorial. I did get the code to run on spyder but video streaming is not happening. Just the image is showing when I run the file. Can you help me with this?

  • Oh amn you are a life saver. I would have wasted hours trying to do what you explained in 6 minutes man. I what other contexts can i do that /shot.jpg?? Is this something you can do in every webpage or this is different?? Any way, thanks lot man

  • but you say what about to go with video. I am not able anything with this. please send me how i am read this stuf

  • Code in video:

    import cv2

    import numpy as np

    import requests

    url="http://192.168.1.3:8080/shot.jpg"

    while (1):

    img_resp=requests.get(url)

    img_arr=np.array(bytearray(img_resp.content), dtype=np.uint8)

    img=cv2.imdecode(img_arr,-1)

    cv2.imshow("android cam",img)

    if cv2.waitKey(1)==27:

    break

  • Solid Effort, but you don't need all of this. just add the ip address in normal video capture syntax instead of 0. cap = cv2.VideoCapture("http://192.168.0.88:8080/video")

  • import cv2
    # Load the cascade
    face_cascade = cv2.CascadeClassifier('cascade.xml')
    # To capture video from webcam.
    cap = cv2.VideoCapture(0)
    # To use a video file as input
    # cap = cv2.VideoCapture('filename.mp4')
    while True:
    # Read the frame
    _, img = cap.read()
    # Convert to grayscale
    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
    # Detect the faces
    faces = face_cascade.detectMultiScale(gray, 1.5, 4)
    # Draw the rectangle around each face
    for (x, y, w, h) in faces:
    cv2.rectangle(img, (x, y), (x+w, y+h), (0,180, 0), 2)
    # Display
    font = cv2.FONT_HERSHEY_SIMPLEX
    cv2.putText(img,'bottle',(x,y),font,1,(0,0,0),2)
    cv2.imshow('img', img)
    # Stop if escape key is pressed
    if cv2.waitKey(1) & 0xff == ord('q'):
    break
    # Release the VideoCapture object
    cap.release()
    cap.destroyAllWindows()

    This is my Python opencv code I am using videocapture() where this url paste in this how to open webcam for this

  • Hey, i'm using pycharm on windows, and it gives me an error that says ModuleNotFoundError: No module named 'requests'

    could you help me?

  • Hi Indian Pythonista,

    I love your tutorials, but I've got a little tricky question: It's about an Android phone, a USB-C camera and a calculator.

    The camera hangs on the smartphone and is detected at the address / dev / bus / usb / 001/003 ~ the question now:

    How can i make a video with this config on the o.g. Stream computers as much as possible in real time? On the machine is a Debian-based distro & the data consumption via LTE does not matter.

    If you or someone else has an idea I would be very grateful.

  • Great tutorial…Can you give me suggestion related to this. I want to playback that live stream from server to android app. Can you tell me how to get stream into android app. (exact same thing in android application instead of python as you did)

  • You can also create a VideoCapture like this:
    phoneCam = cv2.VideoCapture("http://<Phone address>:8080/video")

  • Dude, do you know how to make an Android app(java based) but the process is python but in the web? Something like what you've done

  • thank you for your great work Mr. The thing is i need to access my inbuild webcam from my machine to other machine. can you please clarify it. and one more how can i access from different servers

Leave a Reply

Your email address will not be published. Required fields are marked *