Hexagon Cell  v.1.1.1
Introduction

Hexagon Cells (hCell)

is a C++ dynamic link library, which allows representing raster images with hexagonical paches. In contrast to the state-of-the-art quadratic representation, it does not suffer from washer-shaped objects paradox, described in A. Rosenfeld, "Connectivity in Digital Pictures", Journal of the ACM, Vol 17, pp 146-160, 1970. An additional disadvantage of the square pixel is that the 8 neighbors around the center pixel are not equidistant, which causes the accuracy for the diagonal and off diagonal directions to be reduced in their magnitude.

The hexagonocal representation is definied by the hexagon outer radius \( R \) and must be larger than 1 pixel. The inner hexagon radius is calculated as follows: \( r = \frac{\sqrt{3}}{2}R \). Thus the hexagon area \(S = 3rR = \frac{3\sqrt{3}}{2}R^2\). For additional information please refere to Regular hexagon.

The library consists of the following classes:

Installation

Installing OpenCV

This library is based on OpenCV library v.2.4.11. In order to use the DGM library, the OpenCV library should be also installed.

  1. Download the OpenCV library from sourcefourge
  2. Install the OpenCV library. You may follow the installation guide

Installing hCell

  1. Download the DGM library from Project X Research
  2. Unzip it to your local folder (for example to disk C:\, so the library path will be C:\hCell\)
  3. In case you want to rebuild the library from the "Win32" / "x64" packages or you use the "Source" package follow these instructions, otherwise - skip this step
    1. Configure the paths in the hCell Visual Studio solution to match your installed OpenCV paths
    2. Perform Build -> Batch Build
    3. If you want to run the demo applications, you may need to copy OpenCV dll files to the C:\hCell\bin\Release and/or C:\hCell\bin\Debug folders
  4. Specify the following paths and library
    1. Add to Configuration Properties -> C/C++ -> General -> Additional Include Directories the path C:\hCell\include\
    2. Add to Configuration Properties -> Linker -> General -> Additional Library Directories the path C:\hCell\lib\Release\ and C:\hCell\lib\Debug\ for Release and Debug configurations accordingly
    3. Add to Configuration Properties -> Linker -> Input -> Additional Dependencies the libraries hCell111.lib and hCell111d.lib for Release and Debug configurations accordingly
  5. Copy the DGM dll files hCell111.dlll from C:\hCell\bin\Release and hCell111d.dll from C:\hCell\bin\Debug to your project's Relese and Debug folders.

How to use the code

The documentation for hCell consists of one demo, introducing the basic functionality of the library:

  • Demo Code : An introduction to hCell library.
Author
Sergey G. Kosov, serge.nosp@m.y.ko.nosp@m.sov@p.nosp@m.roje.nosp@m.ct-10.nosp@m..de