clustering image segments in opencv

后端 未结 4 1663
遥遥无期
遥遥无期 2021-02-06 02:11

I am working on motion detection with non-static camera using opencv. I am using a pretty basic background subtraction and thresholding approach to get a broad sense of all that

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-06 02:58

    I agree with Sebastian Schmitz: you probably shouldn't be looking for clustering.

    Don't expect an uninformed method such as k-means to work magic for you. In particular one that is as crude a heuristic as k-means, and which lives in an idealized mathematical world, not in messy, real data.

    You have a good understanding of what you want. Try to put this intuition into code. In your case, you seem to be looking for connected components.

    Consider downsampling your image to a lower resolution, then rerunning the same process! Or running it on the lower resolution right away (to reduce compression artifacts, and improve performance). Or adding filters, such as blurring.

    I'd expect best and fastest results by looking at connected components in the downsampled/filtered image.

提交回复
热议问题