Image Processing Toolbox User's Guide Previous page   Next Page
checkerboard

Create checkerboard image

Syntax

Description

I = checkerboard creates an 8-by-8 square checkerboard image that has four identifiable corners. Each square has 10 pixels per side. The light squares on the left half of the checkerboard are white. The light squares on the right half of the checkerboard are gray.

I = checkerboard(N) creates a checkerboard image where each square has N pixels per side.

I = checkerboard(N,P,Q) creates a rectangular checkerboard where P specifies the number of rows and Q specifies the number of columns. If you omit Q, it defaults to P and the checkerboard is square.

Each row and column is made up of tiles. Each tile contains four squares, N pixels per side, defined as

The light squares on the left half of the checkerboard are white. The light squares on the right half of the checkerboard are gray.

Example

Create a checkerboard where the side of every square is 20 pixels in length.

Create a rectangular checkerboard that is 2 tiles in height and 3 tiles wide.

Create a black and white checkerboard.

See Also

cp2tform, imtransform, maketform


Previous page  bwunpack cmpermute Next page

© 1994-2005 The MathWorks, Inc.