Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

The Display

As much fun as loading and saving images may be, at some point it is also nice to see the images. The SimpleCV framework has two basic approaches to showing images:

  • Displaying them directly in a window

  • Opening a web browser to display the image

The first approach, showing the image in a window, has been previously demonstrated with the show() command. Displaying the image in a web browser is similar:

from SimpleCV import Image

img = Image("logo")

# This will show the logo image in a web browser
img.show(type="browser")

Notice that it uses the same show() function, but requires the argument: type="browser". The major difference between the browser and the window is that the window can capture events, such as a signal to close the window. So far, the examples in this chapter have assumed that the window should remain open until the program completes. For larger and more complex programs, however, this might not be the case.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial