Hi, I want to remove pixels with R value >100 and G value>100, here is my code:
[height width rgb] = size (I); % I is RGB image
for coloum = 1:width for row =1:height if (I(row,coloum,1)> 100 && I(row,coloum,2)> 100) I(row,coloum,1)= 0; I(row,coloum,2)= 0; I(row,coloum,3)= 0; end end
The error is "Index exceeds matrix dimensions". Does anyone have an idea about this? Thanks in advance.
Best Answer