Unformatted text preview: %black. [r c clr] = size(arr); %determines the dimensions of the array num = [stru.number]; %gets the numbers needed for comparison numr = [stru.red]; % numg = [stru.green]; numb = [stru.blue]; arr1 = zeros(r,c); arr2 = zeros(r,c); arr3 = zeros(r,c); for ind = 1:length(num) arr1(arr==num(ind)) = numr(ind); arr2(arr==num(ind)) = numg(ind); arr3(arr==num(ind)) = numb(ind); end imarr(:,:,1) = arr1; imarr(:,:,2) = arr2; imarr(:,:,3) = arr3; i...
View Full Document
This note was uploaded on 10/21/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Tech.
- Spring '08