Skip to main content

Interactive GUI tool to record clicked pixel coordinates on images

Project description

Python Coordinates Recoder for Sequence Images (PyCorec)
Version 2.1.2 (2025-11-28)
PyCorec is a python GUI application that can read images with sequential numbers in the same file name, display them in numerical order, and record the coordinate points on the image using mouse operations.
gui

Installation: how to install PyCorec

pycorec is available on PyPI. You can install it with pip
pip install pycorec

Update

pycorec is available on PyPI. You can update it with pip
pip install --upgrade pycorec

How to use

Naming of image data🖼️

  • When using sequential images in a time series, please add a sequential number to the end of the file name of the image data.

  • This is not necessary when loading a video file.

  • It is recommended that the images to be analyzed be placed under a single directory to be loaded at a time.

  • Supports .jpg, .png, .tiff, .bmp image extensions.

  • If the file name contains “Bkg” and “Sub”, the image will not be loaded.

  • For time-series images, prepare files with the same file name followed by a number, so that the images with the lowest number are read in order.

    Example:

    • picture_001.jpg, picture_002.jpg, …

    • pic-1.jpg, pic-2.jpg, …

    • syashin1.jpg, syashin2.jpg, …

    • mov_202308231159.jpg, mov_202308231201.jpg, …

    • e 43.jpg, e 47.jpg, …

    • Shashin (1).jpg, Shashin (2).jpg, …

Launch the application💻

Enter pycorec or python -m pycorec in a terminal in a python environment where pycorec is installed.
pycorec
python -m pycorec

Loading data📥

  • Select one of the modes from the buttons on the right

    • Video capture (reads frames in the video)

    • Directory Selection (reads all images in a directory)

    • Bounded Selection (selects a range of images to load)

    • Click Selection (selectively load images)

    open directory
  • In the above three modes, a dialog box for setting the frame interval appears.

    • 1 for sequential loading, 2 for skipping one.

    interval
  • Optional settings

    • Entering “fps” (frames per second, the reciprocal of the frame interval) creates a column of relative time (s).

    fps
    • If you enter cm/px (value at 100% image size), which indicates how many centimeters one px on the image corresponds to in reality, a value converted to the coordinate cm will be output.

      • If there is an object of known size on the image, it can be calculated by first reading only one image, taking a point, and dividing the distance between the two points (cm) by the difference in coordinates (px) for each x and y.

    cmpx

Change the screen display size📺

  • By default, the image is displayed at the largest size that fits the screen.

  • 🔍 Zoom

    • Mouse wheel up: zoom in

    • Mouse wheel down: zoom out

    • Zoom centers on the mouse cursor

  • 🖱️ Pan

    • Hold Space + drag: pan the image

    • Cursor changes to a fleur during panning

  • Press “Reset to Window Size” to return to the initial size and position.

  • Press “Fit image to Actual size” to display the image at 100% of its original size.

  • Press “Toggle Fullscreen” to switch between fullscreen and windowed mode.

  • The zoomed state is maintained and the image is moved to the next image.

  • Image coordinates are converted to the value at 100% image size no matter what size the image is displayed.

size

Record the coordinates 🖱️

  • Left-click to record coordinates.

  • Right-click to cancel the previous record in the same image.

  • When you press Shift + Left-click, NaN coordinates are recorded as missing values, and the next point in the same image can be recorded.

  • The point where the coordinates were acquired is displayed as a red dot.

  • The number of points recorded in the image is displayed as “Record Points” in the bar at the bottom.

  • When the recording of coordinates in an image is finished, press the right arrow key (→) to move to the next image.

  • Press the left arrow key (←) to go back to the previous image.

  • The title bar at the top displays the image number / total number of images and the name of the image file currently being displayed.

  • The coordinates of the mouse position and other information are displayed at any time at the bottom of the screen.

record

Save the coordinate data 💾

  • When recording is finished with the last image, press → again to open the file save screen.

  • Or press “Save as…” in the lower right corner to save the data up to that point.

  • To interrupt coordinate recording, press “Save as…” to output the coordinate recording file, and when resuming, press “Resume Recording” to read the file you have just output.

  • If the path to the image file changes, it cannot be loaded. In the case of video, the output image file is referenced. Please correct the Filepath column in the coordinate record file using the Replace function, etc., and then read the file again.

  • Output file can be selected from xlsx or csv.

    save dialog
  • Image coordinate px is the origin at the upper left of the image, x-axis is positive rightward, and y-axis is positive downward as per the standard.

  • When outputting in physical coordinates cm, the origin is the upper left corner of the image, the x-axis is positive rightward, and the y-axis is positive upward.

    • For the position on the image, x: positive value (cm), y: negative value (cm).

coordinates

Release

See the full changelog here: https://github.com/tnku10/pycorec/blob/main/CHANGELOG.md

Future update

(Planned features will be documented here in future releases.)

Credits

Programmed by Yuto Tanaka

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycorec-2.1.2.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycorec-2.1.2-py2.py3-none-any.whl (13.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pycorec-2.1.2.tar.gz.

File metadata

  • Download URL: pycorec-2.1.2.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pycorec-2.1.2.tar.gz
Algorithm Hash digest
SHA256 34932a7e3a53a0c119fad8e6dc455a3820c23255a3212461562a8526a9c02db4
MD5 47185fbc8bff85b112b208101675d3e9
BLAKE2b-256 fced9fc040ad53b99e966eec8c44c8d5cc8991d8d3b180aa72cbc460ca29f407

See more details on using hashes here.

File details

Details for the file pycorec-2.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: pycorec-2.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pycorec-2.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cad7e10ac3673a400af36e955852b2e29e905cbf167639ce03b4f81598aa7ebe
MD5 ee2f4d644f1c45f5242db8330b3f5c7b
BLAKE2b-256 ed0102fe1350fdfc2539c0762c60b0f99a231a48fa6a66242ea477a55f204a29

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page