To add more fun, users can also customize a wallpaper using the default background feature or a video background and you can also use a virtual green screen and if you need a video background make sure it's in mp4 format and if you don't want to use a default background you can simply darken it. This app can easily remove background noise in live chats or streams in order to make your voice clearer as unstoppable background noises such as air conditioning unit, electric fan hum, remote dog barking or room echoes are filtered using artificial intelligence. This technique can easily be combined with the previous article on Real-time Face detection on Jetson Nano using OpenCV to stream the processed image with face-detection and shapes on the image and viewed remotely.It is an application developed for Windows 10 in order to improve the audio and video capabilities of RTX GPUs. This is a very simple technique to stream real-time camera feed over the network and view it on other machines. Seeing the camera operations in real-time is essentially critical when the Jetson Nano board is deployed on remotely operational platforms like robots or monitoring sites. For example, type in 192.168.1.2:8000 and you can see the live stream. You can access the video feed in a browser window on any device connected on the same network by accessing the IP address. Run ifconfig to obtain the IP address of the Jetson Nano Developer Kit.This launches the Flask app and starts the video stream. Save the application shown above as web_streaming.py and run it as python web_streaming.py.The application is written with thread-safe implementations of video frame capture and display to avoid data corruption. The important sections of the code are commented with explanations. # the host machine's localhost and is discoverable by other machines on the same network # While it can be run on any feasible IP, IP = 0.0.0.0 renders the web app on Process_thread = threading.Thread(target=captureFrames) # Create a thread and attach the method that captures the image frames, to it # check to see if this is the main thread of execution Return Response(encodeFrame(), mimetype = "multipart/x-mixed-replace boundary=frame") Yield(b'-frame\r\n' b'Content-Type: image/jpeg\r\n\r\n' +īytearray(encoded_image) + streamFrames(): Return_key, encoded_image = cv2.imencode(".jpg", video_frame) # Acquire thread_lock to access the global video_frame object # Create a copy of the frame and store it in the global variable, Video_capture = cv2.VideoCapture(GSTREAMER_PIPELINE, cv2.CAP_GSTREAMER) # Create the Flask object for the application GSTREAMER_PIPELINE = 'nvarguscamerasrc ! video/x-raw(memory:NVMM), width=3280, height=2464, format=(string)NV12, framerate=21/1 ! nvvidconv flip-method=0 ! video/x-raw, width=960, height=616, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink wait-on-eos=false max-buffers=1 drop=True' # GStreamer Pipeline to access the Raspberry Pi camera # Use locks for thread-safe viewing of frames in multiple browsers Install Flask on Jetson Nano and confirm its version: Users can deploy third-party extensions for authentication, data format validation, SQL management, request handling, and user permissions. Its data-abstraction or data-validation layer are found in other frameworks. It is more flexible than Django and allows users to include different plug-ins and/or extensions. Django, Flask, and Pyramid are the most common frameworks.įlask is a microframework that doesn’t need external libraries or tools. Python has several web-development frameworks used to create reliable and high-performance web applications. Once everything is set up, we create a simple Python application that uses OpenCV to capture the video feed from the camera, resize each frame, and stream it to an HTML webpage using the Python Flask framework. The steps to connect the Raspberry Pi camera to the board, confirm its operation and setting up OpenCV are already covered in the previous article on Real-time Face Detection on Jetson Nano using OpenCV. This article shows how to live stream a video from a Raspberry Pi camera to a web browser and access the stream on any other device connected on the same network. It may be needed to view the real-time camera feed and manipulations the software is making, without necessarily having a display monitor tethered to the board. It is ideal for use without peripherals like display monitors or keyboards connected to it. Jetson Nano is an edge computing platform meant for low-power, unmonitored and standalone use.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |