func (win *Window) Resize(width, height int) {
	C.cvResizeWindow(win.name_c, C.int(width), C.int(height))
}
/* resize/move window
package opencv
import "C"
import (
	"runtime"
	"unsafe"
)
func initSystem(args []string) int {
	argc := C.int(len(args))
	argv := make([]*C.char, len(args))
	for i := 0; i < len(args); i++ {
		argv[i] = C.CString(args[i])
	}
	rv := C.cvInitSystem(argc, (**C.char)(unsafe.Pointer(&argv)))
	return int(rv)
}
func StartWindowThread() int {
	return int(C.cvStartWindowThread())
}
func WaitKey(delay int) int {
	key := C.cvWaitKey(C.int(delay))
	return int(key)
}
type MouseFunc interface{}
type MouseFuncA func(event, x, y, flags int)
type MouseFuncB func(event, x, y, flags int, param ...interface{})
type TrackbarFunc interface{}
type TrackbarFuncA func(pos int)
type TrackbarFuncB func(pos int, param ...interface{})
type Window struct {
	name   string
	name_c *C.char
	flags  C.int
	mouseHandle MouseFunc
	param       []interface{}
	trackbarHandle map[string]TrackbarFunc
	trackbarMax    map[string]int
	trackbarVal    map[string]int
	trackbarName   map[string](*C.char)
	trackbarParam  map[string]([]interface{})
	image    *IplImage
	refCount int
}
var allWindows = make(map[string]*Window, 1000)
const (
	CV_WINDOW_AUTOSIZE = C.CV_WINDOW_AUTOSIZE
)
func NewWindow(name string, flags ...int) *Window {
	win_flags := C.int(CV_WINDOW_AUTOSIZE)
	if len(flags) > 0 {
		win_flags = C.int(flags[0])
	}
	win := &Window{
		name:   name,
		name_c: C.CString(name),
		flags:  win_flags,
		trackbarHandle: make(map[string]TrackbarFunc, 50),
		trackbarMax:    make(map[string]int, 50),
		trackbarVal:    make(map[string]int, 50),
		trackbarName:   make(map[string](*C.char), 50),
		trackbarParam:  make(map[string]([]interface{}), 50),
	}
	C.cvNamedWindow(win.name_c, win.flags)
	C.GoOpenCV_SetMouseCallback(win.name_c)
	allWindows[win.name] = win
	return win
}
func (win *Window) ShowImage(image *IplImage) {
	win.image = image
	C.cvShowImage(win.name_c, unsafe.Pointer(image))
}