my code goes something like this:
rgbImage = imread ('bunny.png'); %black text image saying "bunny"
rgbImage2 = imread ('dragon.png'); %black text image saying dragon
theWord = rgbImage;theWord2 = rgbImage2; %% block of code to change the color of bunny image (1) % turn black text image to cyan
theWord(:,:,3)=255; theWord(:,:,2)=255; %turn black text to red (2)
theWord(:,:,1)=255; theWord(:,:,2)=0; %% repeat for dragon image
theWord2(:,:,3)=255;theWord2(:,:,2)=255;theWord2(:,:,1)=255;theWord2(:,:,1) = 0;
I want to create a loop using randi where when whatever image is presented, it assigns a random (color) effect to it. I should I go about it so that I can use randi?
I am having a hard time since the images I am using are actually a bit more "messy" so because I have to play around with the colors, the actual text block I wrote to change the color is around 5 lines. I just shortened them a bit for simplicity.
Best Answer