Rules for vegetation segmentation based on the HSI colour model and TSV pictures |
Comment: hue, saturation, and intensity are the three elements in the TSV picture |
Comment: vegetation is the vegetation segmentation results |
Step 1: Transform the colour space of the TSV images from RGB to HSI |
Step 2: Separate hue, saturation and intensity from the transformed image |
Step 3: Extract vegetation pixels from the image |
for each pixel [i, j] in hue: |
if hue [i, j] > 75 AND hue [i, j] < 170: |
Mark hue [i, j] as a green vegetation pixel huemark [i, j] |
Step 4: Reconstruct huemark, saturation and intensity as a mask |
Step 5: Mask out vegetation from the original image |