I have a picture of 12 white to black patches with a gray background and I am trying to write a code in MATLAB to select these 12 patches. The problem I am facing is that so