Building a 3 column vector results in a 157 column vector instead?
In my for loop I am trying to build a vector from local variables. But something weird is happening. When I build my vector I expect it to contain 3 doubles (1x3). But instead it contains hundreds doubles (1x1XX). What the heck is going wrong? Am I misunderstanding m's scope or vector building? for i=0:ncols for j=0:nrows ... roi = imcrop(img, [cx, cy, cw, ch]); %Extract 3 channels red = roi(:,:,1); green = roi(:,:,2); blue = roi(:,:,3); %Get most frequent colour [freqR, f, c] = mode(red); [freqG, f, c] = mode(green); [freqB, f, c] = mode(blue); freqR = double(freqR) / 255; freqG = double(freq
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.