Effacer les filtres
Effacer les filtres

Create a triangular image with height of 200 pixels and the base of 200 pixels and color the image in any two colors.

1 vue (au cours des 30 derniers jours)
Create a triangular image with height of 200 pixels and the base of 200 pixels and color the image in any two colors.

Réponses (1)

Image Analyst
Image Analyst le 13 Fév 2013
Hint: use poly2mask() and logical indexing.
yourImage = zeros(rows, columns, 'uint8'); % Initialize.
% Assign values to triangle defined by "mask" image.
yourImage(mask) = someValue;
  30 commentaires
Cesar
Cesar le 18 Fév 2013
Using fill(X,Y,C). The fill function creates colored polygons.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by