Lab 6
Lab 6
for i = 1:x
for j = 1:y
for k = 1:c
if im(i,j,k) > threshold
oim(i,j,k) = 0;
else
oim(i,j,k) = 255;
end
end
end
end
end
Number of region in first image is so big because I used original 12M pixel image.
Task 2.
Salt and pepper noise and LUM filter that I implemented on previous labs.
Gaussian noise and the same LUM filter. This filter didn’t cope well with gaussian noise so filtered
image have more single pixel regions.
Task 3.
For rgb it was not hard to find proper threshold as background is white – the only consideration is
shadow below objects.
- we want all of the hue as 0 represents red but can also represent white – as we could see on
histogram
- saturation should be low to not detect white background and shadow below objects, but the
problem is gray brick – it is not detected as it has low saturation
- we want all of the values as on picture we have many sharp colors