Skip to content

therijalsam/image_coordinates

Repository files navigation

Image Click Coordinates Tracker

The Image Click Coordinates Tracker is a lightweight desktop application built with C++, SDL2, and Dear ImGui. It allows users to upload an image, click on any point to mark it, and save the relative coordinates to a text file. This tool is especially useful for annotation, game development, or any task requiring precise coordinate mapping.


✨ Features

  • Click to Mark Coordinates – Upload an image and click to track positions relative to the image center.
  • Auto-Numbered Points – Each click is labeled (1, 2, 3...) for clarity.
  • Axes + Origin Marker – Displays horizontal and vertical lines with a center dot.
  • Save to Text File – Press Finish to export all coordinates to details.txt.
  • File Dialog Support – Easily select and load images using an ImGui-based file picker.
  • Docker Compatible – Run the app on any Linux device without setting up dependencies.

🔧 Technologies Used

  • C++ – Core programming language.
  • SDL2 & SDL2_image – For rendering the window and loading images.
  • Dear ImGui – For GUI interface and coordinate overlays.
  • ImGuiFileDialog – Custom image file selection dialog.
  • CMake – Cross-platform build system.
  • Docker – Containerization for portability.

🚀 Getting Started

✅ Prerequisites

Make sure the following are installed on your system:

sudo apt update
sudo apt install libsdl2-dev libsdl2-image-dev cmake g++ -y

🔨 Installation

  1. Clone the repository
git clone https://github.com/therijalsam/image_coordinates.git
cd image_coordinates
  1. Build the project
rm -rf build
mkdir build && cd build
cmake ..
make
./ImageClickViewer

✅ Output file: Coordinates are saved to ../details.txt after clicking Finish.


🐳 Docker Support

  1. Build the Docker image
./build.sh
  1. Run the Docker container
./run.sh

The app will launch with GUI support and save details.txt in your project folder.

--

💡 Usage

  • Load Image – Click the Load Image button to upload an image.

  • Click to Mark – Click anywhere to place a point. It will be auto-labeled.

  • Finish – When done, click Finish to save the points to details.txt.


🤝 Contributing

We welcome contributions! To contribute:

  1. Fork the repository

  2. Create a new branch (feature/your-feature-name)

  3. Commit your changes

  4. Open a pull request


📄 License

This project is licensed under the MIT License.


🔮 What's Coming Next?

We're actively working on improving the app! Planned features include:

  • Export to .csv or .json

  • Separate output files per image

  • Undo/Reset buttons

  • Zoom and pan support

  • AI-powered annotation suggestions

Stay tuned for updates!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages