hexgon

Tool to transform an image from square to hexagonal lattice.

https://github.com/crimson1ce/hexgon

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: ieee.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Tool to transform an image from square to hexagonal lattice.

Basic Info
  • Host: GitHub
  • Owner: Crimson1ce
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Size: 608 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 2 years ago · Last pushed about 2 years ago
Metadata Files
Readme License Citation

README.md

Hexgon

Tool to transform an image from square to hexagonal lattice.

Theory

This tool uses the method described in A Framework for Hexagonal Image Processing: Using Hexagonal Pixel-Perfect Approximations in Subpixel Resolution.

One small correction to the paper was included: formula (37) (and, by extension, formulas (48) and (49)) shows an incorrect value for the upper bound of delta x for the given case(s). This follows from the use of an incorrect value of q when deriving the upper bound ($\dfrac{1}{\sqrt{3}}$ instead of $\dfrac{1}{2\sqrt{3}}$).

How to use

Run python main.py FILEPATH

FILEPATH should be the path to an image file.

Requirements

  • Numpy
  • Pillow
  • Matplotlib

Notes

  • Currently, the conversion to hexagonal image only works with grayscale images. A method for converting an RGB image to grayscale is provided. In the future, I will add support for RGB images.
  • In the future, I will try to implement an automatic marker size detection, but for now the marker size needs to be manually changed for every image. Additionally, the required marker size might change depending on the image resolution and aspect ratio.

Owner

  • Login: Crimson1ce
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.0.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Fernandez
    given-names: Josue
title: "Hexgon"
version: 1.0.2
date-released: 2024-01-14

GitHub Events

Total
Last Year