From: Sally on
Hello.

I have applied an alternating sequential filter on an image that contains a series of cells, and I am now looking to find z, which is a number that is always greater than the difference between the maximal graylevel on one cell and the maximal gray level in the surrounding valley. I know how to find maximal graylevels in general, but how do I find it in a particular area (the cells and the boundaries)?

Thank you for your help.

Sally
From: ImageAnalyst on
Sally, just mask your image. Here's one way, shown with two different
masks:

clc;
clear all;
close all;
workspace;

originalArray = magic(7)
meanOfOriginal = mean(mean(originalArray))

maskArray1 = zeros(7,7, 'int32');
maskArray1(3:5, 3:5) = 1
maskedArray = originalArray .* double(maskArray1)
mean1 = mean(originalArray(maskArray1>0))

maskArray2 = originalArray > 40;
maskedArray = originalArray .* double(maskArray2)
mean2 = mean(originalArray(maskArray2>0))
From: Sally on
ImageAnalyst:

Thank you for the demo. But I can't see how I can mask out the cells only to get the graylevel info unless I do it manually?
From: Sally on
Image Analyst:

A follow up question on this. I am looking for a method/algorithm to find the variable 'h' and im not sure if its actually possible:

h is:

The diff erence between the maximal gray-level on one cell and the maximal gray-level in the surrounding valley is always greater than a threshold h.

See page 4, at the top: www.vincent-net.com/92iamip_cornea.pdf

I would truly appreciate your help.

Thank you.

Sally
From: ImageAnalyst on
Sally:
You pick h. Try some h's and find one that works. If it works well,
then that's the h you use.
-ImageAnalyst