Add main func

samples and out an image