The basic idea of valley edge detection is that the
lowest intensity points along certain direction can be detected when the illumination causes the formation of
profile contours like valley. This method is irrelevant to
real intensity value. The only need is to detect the lowest
valley points and mark the location and direction as
candidate edge points. The bubble edges can finally be
identified by directly applying logical inequations to
make judgment.