MazeImager

Instagram 始めました. MazeImager の出力例がご覧になれます.  Instagram

MazeImagerサンプル迷路画像     MazeImagerサンプル迷路画像

Hokusai     Sharaku


概要 Abstract

MazeImager画像

MazeImager は画像から曲線迷路を全自動で生成するアプリです. 画像を2値化して,暗部または明部領域内にその輪郭に沿った年輪状の曲線を生成し,これを元に迷路画像を作成します. 2値画像を得る前にノイズ除去を行い,大津の方法で閾値を決定します.このため,写真など自然物の画像からも良好な迷路画像が得られます.

MazeImager is a full automatic curve maze generator that converts a maze from a bitmap image. After an original bitmap is binarized, curves like annual rings are generated along the outline of dark or light domain on binarized image, then a maze is created from the curves. Since noise is erased before binarization and the threshold is decided with Otsu's method, high quality maze image can be given from photo image of natural objects.


出力画像・データについて About Expored Image/Data

画像サイズ Size of Image


Ver.1.1 よりエクスポートされる画像のサイズは以下のようになります.
・JPEG, SVG, PDF — 縦横の長い方の辺が 1024 ドットになるようスケーリング
・PNG — 変換元画像と同一
PDF に含まれる背景画像の解像度は変換元画像と変わりません.

The size of exported image will be as following from Ver.1.1.
・JPEG, SVG, PDF
   — be scaled as that the size of longer of the horizontal and vertical side becomes equal to 1024.
・PNG — same as original image
The resolution of the background image in PDF is equal to the original image.


CSV データフォーマット CSV Data Format


迷路データの CSV 出力フォーマットを以下に示します.
The followings are the CSV data format of maze.


・画像サイズは縦と横の長い方が 1024 ドットに固定されます(Ver.1.1より).
・原点は左上隅.
・Y 座標は下方向が正.

[W] - 迷路画像の幅(整数)
[H] - 迷路画像の高さ(整数)
[FC] - 迷路領域(多角形)の個数(整数)
[FID] - 迷路領域ID(整数,最小値:0)
[WC] - 壁面(連続線)の個数
[WID] -壁面ID(整数,最小値:0)
[PC] - 頂点数(整数)
[X] - 頂点の X 座標(実数,書式:%.1f)
[Y] - 頂点の Y 座標(実数,書式:%.1f)

MazeImager CSV Data
Ver, 1.0
Width, [W], Height, [H]
Field Count, [FC]
Field, [FID]
Point Count, [PC]
[X],[Y]
 .
 .
 .
Wall Count, [WC]
Wall, [WID]
Point Count, [PC]
[X],[Y]
 .
 .
 .

-----------------------------------------------------------

・The size of the longer of the horizontal and vertical direction of maze area is fixed to 1024 (from ver.1.1).
・The location of origin is the left-top corner.
・The positive direction of Y coordinate is the direction of lower.

[W] - Width of maze image (Integer)
[H] - Height of maze image (Integer)
[FC] - Maze field count (Polygon, Integer)
[FID] - Maze field identifier (Integer, minimum:0)
[WC] - Wall count (Polyline, Integer)
[WID] -Wall identifire (Integer, minimum:0)
[PC] - Vertex count (Integer)
[X] - X coordinate of vertex (Real, Format:%.1f)
[Y] - Y coordinate of vertex (Real, Format:%.1f)

MazeImager CSV Data
Ver, 1.0
Width, [W], Height, [H]
Field Count, [FC]
Field, [FID]
Point Count, [PC]
[X],[Y]
 .
 .
 .
Wall Count, [WC]
Wall, [WID]
Point Count, [PC]
[X],[Y]
 .
 .
 .