i am new at matlab and i want Create color checkerboard

23 views (last 30 days)
abory kikla
abory kikla on 6 Mar 2016
Commented: Image Analyst on 29 Dec 2020
Please help me solve this Lab-
Coursework1 :
1 Create checkerboard image using MATLAB
1 Use the matrix manipulation to implement a color chessboard image size 1024* 1024, where each stone size 32 * 32 without any loop statement.
2 Create checkerboard image using MATLAB
1 Use the matrix manipulation to implement a color chessboard image size 1024* 1024 ,where each stone size 32 * 32 based on loop statement.  Use checkerboard/kron function to implement a color chessboard image size 1024* 1024 ,where each stone size 32 * 32.?
[Merged from duplicate question]
I want to create a chess colored using the random function and displayed using the command Amco >> Can you do it
  2 Comments
Jan
Jan on 6 Mar 2016
The link does work now. Please, abory kikla, show us what you have tried so far and ask a specific question. The forum will not solve your homework, because this would not be constructive.

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 6 Mar 2016
Try using the checkerboard function. Then threshold and call bwlabel() to assign every square a unique ID number. Then make up a colormap long enough so that you get a color for every square (this is where you could use rand()). Then apply the colormap with ind2rgb(), and finally show the RGB image with imshow(). That should be enough hints. Now, lets see your code that carries out those steps. You should get a checkerboard where the "black" squares are black and the "white" squares each have a unique color.
  30 Comments
Image Analyst
Image Analyst on 29 Dec 2020
Make it easy to help you, not hard. Supply us with a list of the RGB values of the various colors that you want. I don't want to type those in - I'd rather have you do that. After that, just use indexing to set the colors for each square - nothing magic or tricky about it.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!