I am trying to estimate average total signal of objects and average background value using the image processing tools. Whilst this is the first time I have attempted, I have read many examples and have applied the following method.
z1=medfilt2(im,[2,2]);
sb_open=imopen(im,strel('disk',100));
level = graythresh(im)
z4_bw=im2bw(im,level);
z5 = imfill(z4_bw,'holes');
se = strel('disk',1);
I2 = imdilate(z5,se);
I have 4 questions.
1: If I am wanting to use this final processed binary image as a mask to project back onto the original image to obtain both the average intensities of the white area of the binary (i.e. the objects themselves), and then the black areas of the binary image to obtain the average background, is this a good approach?
2: How do I use this binary mask to obtain values corresponding to the white areas projected back to the original image
3: How do I use this binary mask to obtain the values corresponding to the black areas projected back to the original image?
4: The strel function for both imopen and dilate are manually entered. Are there any pointers to how this can be automated. I may have images where the same objects are represented by different numbe rof pixels (i.e. the magnification is changed upon image capture)
Thankyou for any assistance. Jason