Process Android phone live stream using OpenCV and Python

Process Android phone live stream using OpenCV and Python

my-portfolio

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. Ex

Trying out Adobe Dreamweaver for the First Time in 13 Years!
아이유 잼잼♪ 잘나가면 형님이지 아이유 형님! | 놀라운 토요일 2부 – 도레미 마켓 amazingsaturday 190907 EP.75
Hướng dẫn cập nhật iOS 13 GM- Không khác gì chính thức



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/

COMMENTS

WORDPRESS: 32
  • comment-avatar

    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()

  • comment-avatar

    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()

  • comment-avatar

    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?

  • comment-avatar

    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

  • comment-avatar

    Hii how this program can be use with html

  • comment-avatar

    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

  • comment-avatar

    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

  • comment-avatar

    Which OS are you using? Ubuntu version?

  • comment-avatar

    How to make cmd like your's?

  • comment-avatar

    I liked the part "np.are" 😂😂

  • comment-avatar

    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")

  • comment-avatar

    Hey Dude. "Thanks" is a very small word for your video. It is incredibly helpful.

  • comment-avatar
  • comment-avatar

    Is it possible to do this with audio instead? or gather audio from the video?

  • comment-avatar

    thank you a lot , this is incredibly helpful

  • comment-avatar

    This is incredible! Thank you for sharing this

  • comment-avatar

    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

  • comment-avatar

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

    could you help me?

  • comment-avatar

    very helpful video..thanks

  • comment-avatar

    working! 😀 thanks!

  • comment-avatar

    Very Very well done!

  • comment-avatar

    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.

  • comment-avatar

    great video. Would this work with iphone with some changes?

  • comment-avatar

    Hello sir i need your help please provide me your contact details

  • comment-avatar
  • comment-avatar

    What is the program that you used for programming in python?

  • comment-avatar

    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)

  • comment-avatar

    What's the option for iphone?

  • comment-avatar

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

  • comment-avatar

    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

  • comment-avatar

    Thank you so much for making this tutorial. It was very helpful.

  • comment-avatar

    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

  • DISQUS: