gosift

package module
v0.0.0-...-a1c7fc9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2014 License: MIT Imports: 6 Imported by: 0

README

gosift

SIFT algorithm implementation for golang

Documentation

Overview

* * Functions for detecting SIFT image features.

Index

Constants

View Source
const (
	/** default number of sampled intervals per octave. */
	SIFT_INTVLS = 3
	/** assumed gaussian blur for input image */
	SIFT_INIT_SIGMA = 0.5
	/** default sigma for initial guassian smoothing */
	SIFT_SIGMA = 1.6
	/** double image size before pyramid construction */
	SIFT_IMG_DBL = true
	/** default threshold on keypoint contrast |D(x)| */
	SIFT_CONTR_THR = 0.04
	/** default threshold on keypoint ratio of principle curvatures */
	SIFT_CURV_THR = 10
	/* width of border in which to ignore keypoints */
	SIFT_IMG_BORDER = 5
	/* maximum steps of keypoint interpolation before failure */
	SIFT_MAX_INTERP_STEPS = 5
)

Variables

This section is empty.

Functions

func ClampUint8

func ClampUint8(in int) uint8

Keep value in [0,255] range.

func ConvertImageToRGBA

func ConvertImageToRGBA(srcImg image.Image) *image.RGBA

func GrayImage

func GrayImage(srcImg image.Image) image.Image

*

  • Convert an image into gray color.
  • @param srcImage
  • @return A new image with the given dimensions will be returned.

func ResizeImageDouble

func ResizeImageDouble(srcImg image.Image) image.Image

func ResizeImageHalf

func ResizeImageHalf(srcImg image.Image) image.Image

func Sift

func Sift(srcImg image.Image)

Types

type SiftImage

type SiftImage struct {
	// Pix holds the image's pixels, in red, green, blue, alpha order. The pixel at
	// (x, y) starts at Pix[(y-Rect.Min.Y)*Stride + (x-Rect.Min.X)*4].
	Pix []int
	// Stride is the Pix stride (in bytes) between vertically adjacent pixels.
	Stride int
	// Rect is the image's bounds.
	Rect image.Rectangle
}

SiftImage is an in memory RGBA image. The red, green, blue, alpha samples are held in a single slice to increase resizing performance.

func SubstractImage

func SubstractImage(src1, src2 image.Image) *SiftImage

*

  • Substract two images. src1 - src2, the dimensions of src1, src2 must be same.
  • @param src1
  • @param src2
  • @return A new image with the given dimensions will be returned.

func (*SiftImage) At

func (p *SiftImage) At(x, y int) color.Color

func (*SiftImage) Bounds

func (p *SiftImage) Bounds() image.Rectangle

func (*SiftImage) ColorModel

func (p *SiftImage) ColorModel() color.Model

func (*SiftImage) Opaque

func (p *SiftImage) Opaque() bool

func (*SiftImage) PixOffset

func (p *SiftImage) PixOffset(x, y int) int

PixOffset returns the index of the first element of Pix that corresponds to the pixel at (x, y).

func (*SiftImage) SubImage

func (p *SiftImage) SubImage(r image.Rectangle) image.Image

SubImage returns an image representing the portion of the image p visible through r. The returned value shares pixels with the original image.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL