Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadGrayFrom ¶
LoadGrayFrom loads ANY image, and convert it to a Gray image. File name extension is expected.
func NewASG ¶
NewASG constructs a new AutoStereoGram from the provided pattern and the provided depth map. The size of the resulting image is the size of the depth map image.
Example ¶
// Create a random pattern pat := NewPatternRandom2(200, 100) // Load a depth map from an existing png dmap := LoadGrayFrom("Symbol.png") // comput ethe result image asg := NewASG(pat, dmap) // save result as png file SaveAs(asg, "example")
Output:
Types ¶
type Pattern ¶
type Pattern struct { image.Image // The image that is repeated // contains filtered or unexported fields }
Pattern provide a color for each point, and repeats itself horizontally and vertically. A Pattern is also an image.Image.
func NewPatternImage ¶
NewPatternImage generate a Pattern from the provided image.
func NewPatternRandom1 ¶
NewPatternRandom1 generates a random Pattern of given period.
func NewPatternRandom2 ¶
NewPatternRandom2 generate another random pattern of given period.
Click to show internal directories.
Click to hide internal directories.