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/
Xem thêm Bài Viết:
- Đọc ngay hướng dẫn cài twrp Recovery hiệu quả trên thiết bị Android
- Bỏ túi cách thêm IDM vào Chrome tiện lợi không phải ai cũng biết
- Bỏ túi thông tin hướng dẫn sử dụng adb fastboot zenfone 5 flash Asus
- Hướng dẫn cài đặt và sử dụng Adobe Audition 1.5 chi tiết nhất
- Khắc phục lỗi ‘adb’ is not recognized as an internal or external command
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
Hii how this program can be use with html
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
Which OS are you using? Ubuntu version?
How to make cmd like your's?
I liked the part "np.are" 😂😂
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")
Hey Dude. "Thanks" is a very small word for your video. It is incredibly helpful.
Amazing
Is it possible to do this with audio instead? or gather audio from the video?
thank you a lot , this is incredibly helpful
This is incredible! Thank you for sharing this
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?
very helpful video..thanks
working! 😀 thanks!
Very Very well done!
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 video. Would this work with iphone with some changes?
Hello sir i need your help please provide me your contact details
it's really cool…
What is the program that you used for programming in python?
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)
What's the option for iphone?
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 so much for making this tutorial. It was very helpful.
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