In matlab i have hue plane in a matrix and the most common colors(top 5% of the hues) in an another matrix(L). I want to create a binary image where only rare colors are present.
Hue plane is 253X320 matrix the L matrix is 6X1.
for l = 1 : size(HuePlane,1)
for m = 1 : size(HuePlane,2)
for n = 1:size(L,1)
if L(n,1) == HuePlane(l,m)
H(l,m) = 0;
else
H(l,m) = 1;
end
end
end
end
This results in a matrix of only 1s.