Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asc11Converter ¶
type Asc11Converter interface {
// convert gray img to ascii
Convert()
CharMap() [][]string
}
func NewAsc11Converter ¶ added in v1.0.2
func NewAsc11Converter(grey *image.Gray, yukkuriVer bool) Asc11Converter
yukkuriVer : true -> 更倾向油库里风格,输出矩阵更小,但更容易失真
type Ascii ¶
type Ascii struct {
X int
Y int
GreyImg *image.Gray
AsciiMap [][]string
Ch0369 string
Ch903 string
Ch036 string
Ch369 string
Ch690 string
Ch93 string
Ch06 string
Ch03 string
Ch36 string
Ch69 string
Ch90 string
}
转出来的ascii字符画较普通,基本上是一个像素点对应一个字符。 因此完整还原一幅图像需要较大的空间
type AsciiYukkuri ¶ added in v1.0.2
type AsciiYukkuri struct {
*Ascii
}
还原风格应当更趋近于油库里风,输入的图像大小应当小于50*50. 输出更可能会变得不可辨认. 将会使用与Ascii不同的字符集.
func NewAsciiYukkuri ¶ added in v1.0.2
func NewAsciiYukkuri(grey *image.Gray) *AsciiYukkuri
type GreyFunction ¶
type GreyHandler ¶
type GreyHandler struct {
// contains filtered or unexported fields
}
func NewGreyHandler ¶
func NewGreyHandler() GreyHandler
func (GreyHandler) GreyFunc ¶
function:gray= (max - mid) * ratio_max + (mid - min) * ratio_max_mid + min.
max,mid,min: point [max,mid,min] value in R.G.B. ratio_max: max color ratio. ratio_max_mid: max and mid color ratio
if threshold > -1 ,means grey == 0(<t) or (>t)255 ,decided by threshold
return current x ,y and grey value
type Yukkuri ¶
func NewYukkuri ¶
func (*Yukkuri) TransImgToAsc ¶
func (ykr *Yukkuri) TransImgToAsc(converter Asc11Converter)
Click to show internal directories.
Click to hide internal directories.