Create a triangular image with height of 200 pixels and the base of 200 pixels and color the image in any two colors.
Hint: use poly2mask() and logical indexing.
yourImage = zeros(rows, columns, 'uint8'); % Initialize. % Assign values to triangle defined by "mask" image. yourImage(mask) = someValue;
Play games and win prizes!Learn more