| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Image Processing Toolbox |
| Contents | Index |
| Learn more about Image Processing Toolbox |
I = checkerboard
I = checkerboard(n)
I = checkerboard(n,p,q)
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
TILE = [DARK LIGHT; LIGHT DARK]
![]()
The light squares on the left half of the checkerboard are white. The light squares on the right half of the checkerboard are gray.
Create a checkerboard where the side of every square is 20 pixels in length.
I = checkerboard(20);imshow(I)

Create a rectangular checkerboard that is 2 tiles in height and 3 tiles wide.
J = checkerboard(10,2,3); figure, imshow(J)

Create a black and white checkerboard.
K = (checkerboard > 0.5); figure, imshow(K)

cp2tform, imtransform, maketform
![]() | bwunpack | col2im | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |