Step 1: make a green/red composite image in Matlab. Note: you need to use your favorite microarray image analysis software to inspect all polony images, and select a pair of images. I usually use the images in my last scan.
>>C3=imread('S3-CD36-04993-C-Cy3-bg.tif','tiff');
>>C5=imread('S3-CD36-04993-U-Cy5-bg.tif','tiff');
>>size(C3)   % we need to know the dimension of the image

ans =

2389 1659

>>composite = zeros(2389,1659,3);
>>composite(:,:,2)=(double(C3)+1)/65535;
>>composite(:,:,1)=(double(C5)+1)/65535;
>>imwrite(composite,'S3-04993.jpg','jpg');

Step 2: Now you have a color image to work with, open the image with an image editor (ie. MS PhotoEditor)
Step 3: Adjust the contrast so that polony and debris can be seen easily.
Step 4: Convert to 8-bit gray-scale image, adjust the contrast again if necessary, so that the background is not complete black.
Step 5: Resize the image to ~25~50% of the original size, save as a BMP image.
Step 6: Open the BMP image with an image editor that provide tools such as “Erasor” and “Brush” (ie.  MS Paint), use the "Erasor" to remove the area you don't want, then fill the area with black color, save the image (S3-4994-bw.bmp).
Step 7: In matlab, open the processed image, and create the mask:
>>mask = imread('S3-04993-s.bmp','bmp');
>>bw_mask = (mask>0);
>>imwrite(imresize(bw_mask,size(C3)),'S3_gel_mask.tif','tif');