Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Please Help! Unable to perform assignment because the left and right sides have a different number of elements. Assignment is to color the inside of the star a random color.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
img2=imread(''wingding-star.jpg');
subplot(1,2,1);imshow(img2);
red=img2(:,:,1);
green=img2(:,:,2);
blue=img2(:,:,3);
%Task 1A take white pixels and make them into random color
%Generate random number
rng(0,'twister');
a=0;
b=255;
random=(b-a).*rand(1000,1)+a;
%capture all white pixels
wpixels=red==255&green==255&blue==255;
%make white pixels random
red(wpixels)=random;
blue(wpixels)=random;
green(wpixels)=random;
rgbImage=cat(3,red,green,blue);
subplot(1,2,2);imshow(rgbImage);
1 commentaire
Réponses (0)
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!