Mamdasn / im2dhistgo

Calculate two dimensional histogram using go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

im2dhistgo

Introduction

im2dhistgo is a Go package designed for image processing. It provides functions to generate 1D and 2D histograms.

2D histogram

A moving window of WxW moves through out the given image, and as its center places on each pixel, number of encounters with same and other brightness intensities is counted seperately. How moving window works

Installation

To install im2dhistgo, use the following go get command:

go get github.com/yourusername/im2dhistgo

Usage

package main

import (
	"fmt"
	"os"
	"github.com/Mamdasn/im2dhistgo"

)

func main() {
	if len(os.Args) < 1 {
		fmt.Println("Usage: ./im2dhistgo <input>")
		os.Exit(1)
	}
	imagename := os.Args[1]

	twodhist := im2dhistgo.Im2dhist_file(imagename)

	fmt.Println(twodhist)
	fmt.Println("Done.")
}

About

Calculate two dimensional histogram using go

License:GNU General Public License v3.0


Languages

Language:Go 100.0%