First time here? Check out the FAQ!
answered 2013-04-22 12:50:06 -0600
you're missing:
waitKey(0); // wait forever
between imshow() and return