imshow is called in main thread