selecting bricks from image
Let me suggest a simple solution , however if you want to go for a more robust solution let me know.

So first I would look for a way to enhance the signal. In my experience red objects appear even stronger if you look at red-green

diff = im(:,:,1) - im(:,:,2);
figure;imshow(diff,[]);




Than I would use simple thresholding (choose threshold value manually ) to get a blackwhite image.
To make it more robust I would use some morphology operations like opening and filling. (If you dont know what that is I would look at  matlab help.
Than finally you can select the brick with bwselect and take its perimeter with bwpeim.

Viola:

diff = im(:,:,1) - im(:,:,2) ;
bw = diff &gt; 35;
bw = imopen( bw , ones(1,5) );
bw = imopen( bw , ones(5,1) );
bw = imfill(bw , 'holes');
brick = bwselect(bw);
brick = bwperim(brick);


and you can see a simple output here:
Please note that this is quite specific for this image but that's a good simple way to get you started.