In a digital photo, how can I detect if a mountain is obscured by clouds?

前端 未结 3 811
说谎
说谎 2021-01-31 09:39

The problem

I have a collection of digital photos of a mountain in Japan. However the mountain is often obscured by clouds or fog.

What techniqu

相关标签:
3条回答
  • 2021-01-31 10:05

    I think you are working on too low a level. A quick pass through an edge detection filter partitioned the image set very distinctly into (1, 3) and (2, 4). Especially if these images come from a fixed camera viewpoint, finding a match against the prototypical shape in (1) would be relatively easy algorithmically. Even your case of (4) could give you a domain of partial matching which you could heuristically determine if there was enough mountain there to consider.

    0 讨论(0)
  • 2021-01-31 10:05

    The answer depends on how specific the problem is. If it's the same mountain from the same POV, run and edge detection against a known good image, and use it as a baseline for convolving against edge-detected images from the corpus. If it's only the edge of the mountain that you're interested in, manually remove other features from the baseline.

    0 讨论(0)
  • 2021-01-31 10:23

    A few specific recommendations, building upon what you've got already:

    1. Take your best image (something like image 1), run it through edge detection, open the result in any graphic editor (MS Paint will do) and clean everything except the mountain top boundary (the "chinese hat" line). This is you convolution kernel. You can crop it (not resize!) from above and below to save some time in the next step.
    2. Use the Convolve function from PerlMagick (you seem already comfortable with Perl and ImageMagick) to convolve the kernel with a few images. On the resulting image you should see a sharp spike corresponding to the "correct" position of the kernel (coinciding with the mountain in the image).
    3. The relative (to the level of surrounding noise) height of this spike will be larger when the mountain is better visible. By taking several representative images you might be able to determine a threshold that will separate good images from the bad ones.
    4. Whatever you do, there will be false positives and false negatives. Be prepared.
    0 讨论(0)
提交回复
热议问题