Detect water in a static image of an oil-water flow experiment.
A gray-scale image of an oil-water flow experiment is processed. This image is composed of a top-lateral view of a transparent pipe containing water, in the center, and oil, around the water. This procedure detects the region where the water is by using connected filtering, thresholding and shape smoothing.
The gray-scale image of the water-oil flow experiment is read.
1. a = adreadgray('flow.tif') 2. adshow(a)
Dark region enhancement
The dark region of the image is enhanced by the close top-hat operator.
1. import ia870 as mm 2. 3. b=mm.iacloseth(a,mm.iaseline(50,90)) 4. adshow(b)
A connected filtering is applied to remove small artifacts present in the image.
1. c=mm.iacloserec(b,mm.iasebox(5)) 2. adshow(c)
An alternated sequential filtering is used for shape smoothing.
1. d=mm.iaasf(c,'co',mm.iasecross()) 2. adshow(d)
The original and thresholded image overlayed on the original are presented successively.
1. e = d >= 100 2. adshow(a) 3. adshow(mm.iagshow(a,e))