Coder Social home page Coder Social logo

calib's Introduction

Pixel2World

Pixel2World is a project that allows you to convert pixel coordinates in an image to real-world coordinates using camera calibration and a mouse event handler.

Dependencies

  • OpenCV
  • PyYAML
  • typing

Usage

  1. Install the required dependencies.
  2. Modify the config_path variable in the main.py file or use the -c argument to specify a custom configuration file.
  3. Run the main.py script.
bash
python main.py
python main.py -c /path/to/your/config.yaml

Configuration

The configuration file (YAML format) should include the following fields:

  • calib_filename: Path to the camera calibration file.
  • camera_position: Position of the camera in the real world.
  • towards_direction: Direction the camera is pointing towards.
  • camera_index: Index of the camera device.

Code Structure

The main components of the project are:

  • Calib: A class to handle camera calibration.
  • MouseEventHandler: A class to handle mouse events and coordinate conversion.
  • Renderer: A class to render the grid and undistorted image (commented out in main.py). The main loop of the application captures video frames from the camera, handles mouse events, and displays the processed image in a window. Press 'q' to exit the loop and close the application.

calib's People

Contributors

pinkpanther-ny avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.