Skip to content

Latest commit

 

History

History
162 lines (84 loc) · 5.01 KB

File metadata and controls

162 lines (84 loc) · 5.01 KB

Using Phone Camera for Computer Vision Program

Computer Vision

Project Overview

The "Using Phone Camera for Computer Vision Program" is a Python application designed to capture video frames from a phone's camera using a specified IP address. The program utilizes the IP Webcam server running on the phone, fetching image frames and displaying them in an OpenCV window. Users can exit the program by pressing the 'Esc' key.

Features

  • Video Frame Capture:

    • Captures video frames from the phone's camera using the specified IP address.
  • IP Webcam Server:

    • Utilizes the IP Webcam server running on the phone to fetch image frames.
  • Real-time Display:

    • Displays the captured frames in an OpenCV window in real-time.
  • User Exit:

    • Allows the user to exit the program by pressing the 'Esc' key.

Additional Steps

Connect Phone IP Camera to Laptop

  1. Download and Install IP Webcam Application:

    • Download and install the IP Webcam application on your mobile phone from the respective app store.
  2. Connect to the Same Network:

    • Ensure that both your PC and phone are connected to the same network.
  3. Start the Server:

    • Open the IP Webcam application on your phone and click on "Start Server" (usually found at the bottom).
  4. Get the URL:

    • Once the server is started, a URL will be displayed on your phone's screen. Make a note of this URL.
  5. Run the Python Script:

    • Execute the combined Python script on your PC and enter the IP address (URL) displayed on your phone when prompted.
  6. View the Camera Feed:

    • After entering the correct IP address, you should see the camera feed from your phone displayed on your PC screen using the OpenCV window.

How to Use

  1. Run the Program:

    • Execute the program to capture video frames from the phone's camera.
  2. Enter IP Address:

    • Enter the IP address where the phone camera server is running when prompted.
  3. Real-time Display:

    • Observe the real-time display of video frames from the phone's camera.
  4. Exit the Program:

    • Press the 'Esc' key to exit the program and close the OpenCV window.

Example

cd PhoneCameraProgram
python phone_camera_program.py

Features to be Added

  • Object Detection:

    • Integrate object detection algorithms to identify and draw bounding boxes around objects in the video feed.
  • Face Recognition:

    • Implement face recognition to identify and track faces in the camera stream.
  • Gesture Recognition:

    • Add the ability to recognize and interpret hand gestures captured by the phone camera.
  • Image Filters and Effects:

    • Allow users to apply real-time image filters or effects to the camera feed, such as grayscale, sepia, or edge detection.
  • Augmented Reality (AR):

    • Incorporate AR elements into the camera feed, such as virtual objects or information overlays.
  • Image Capturing and Saving:

    • Provide a feature to capture and save images from the camera feed.
  • Video Recording:

    • Extend the program to support video recording from the phone camera.
  • Multiple Camera Support:

    • Enable support for using multiple phone cameras simultaneously.
  • Camera Calibration:

    • Implement camera calibration techniques to correct distortions in the camera feed.
  • Background Subtraction:

    • Add background subtraction techniques to detect moving objects or people.
  • Motion Detection:

    • Incorporate motion detection algorithms to identify and highlight moving objects.
  • QR Code and Barcode Recognition:

    • Integrate QR code and barcode recognition to extract information from codes in the camera feed.
  • Pan and Tilt Control:

    • Provide controls to remotely adjust the pan and tilt of the phone camera.
  • Image Histogram:

    • Display real-time image histograms to visualize the distribution of pixel intensities.
  • Integration with Machine Learning Models:

    • If applicable, integrate pre-trained machine learning models for specific tasks, such as image classification or segmentation.
  • Voice Commands:

    • Add voice command recognition to control certain features of the program.
  • Settings Menu:

    • Implement a settings menu to allow users to configure parameters such as resolution, frame rate, or camera settings.
  • Cross-Platform Compatibility:

    • Ensure cross-platform compatibility so that the program works seamlessly on different operating systems.
  • User Authentication:

    • If necessary, implement user authentication mechanisms for secure access to the camera feed.
  • Error Handling and Logging:

    • Improve error handling and logging to provide users with meaningful messages in case of issues.

Contribution Guidelines

Contributions are welcome! If you have ideas for improvements or encounter any issues, please open an issue or refer to contribution guidelines for more details.