Detect Plants in a grass Image

前端 未结 3 916
隐瞒了意图╮
隐瞒了意图╮ 2021-01-13 17:34

I\'m new in the Computer Vision. I would like to detect some kind of plants in a grass images.

Original Image

Canny Edge Detection Algorithmus

Houg

相关标签:
3条回答
  • 2021-01-13 18:09

    I implemented Humam's approach.

    But added some Steps after the Otsu algorithm:

    1. Fulfill every black connected component
    2. extract the mask with a matrix subtraction
    3. Store the mask in a vector
    4. sort it by area size (= sum(mask))
    5. pick the biggest mask (=plant)
    6. on the plant mask: do Step 1 -3 again
    7. remove all small masks from the plant mask

    I have some old and bad images from the plant, i'm going to test the algorithm the next days on these images. unfortunately it's winter in my country and the grass is covered with snow. so i have to wait a couple of weeks to make some proper image from this plant.

    Result of extraction.

    The next step is to detect if the extracted image is the desired plant.

    0 讨论(0)
  • 2021-01-13 18:12

    Just for fun, and very similar to Humam's answer, just done using standard deviation instead of density, and making the image transparent where it doesn't think there are leaves. I used ImageMagick straight at the command line:

    convert weed.jpg \( +clone -canny 0x1+10%+30% -statistic standarddeviation 10x10 -blur 0x8 -normalize -negate \) -compose copyopacity -composite result.png
    

    0 讨论(0)
  • 2021-01-13 18:27

    Dummy solution came in my mind. Since the grass is more detailed that the plant itself:

    1. Apply Canny or any other edge detector.
    2. Pass through the image using a window (let us say 10*10). For each window:
      • Compute the Density (number of white pixel if using Canny)
      • store it in array
    3. Threshold the values in the array using Otsu algorithm. The less values represent the windows that are part of the plant.
    4. Remap all needed window to the original picutre.
    5. if a window is computed as not part of the object but in the same time it is surrouned by windows of the object, it is part of it.
    0 讨论(0)
提交回复
热议问题