Sunday, 23 May 2021

OpenCV & Python - How does one filter noise from an irregular shaped polygon detected by OpenCV using a Kalman filter?

I have a small tracking project that I am working on. I have my frame by frame detection scheme setup and working. When I run I get a fair amount of noise in the polygon that I extract even if the scene is static. Since I want this run in real time, it seems Kalman filtering is the best way to solve this problem; however implementation details are sparse. I have seen some examples via google, but they typically deal with bounding boxes or regular shapes, which are described with only a few bits of info. I am not sure that approach would work.

I am interested in tracking the evolution of a more irregular geometry below. It takes ~100 points or more to describe the polygon. How can I adapt the OpenCV kalman tools to handle this task?

Thanks in advance.

** Update **

So additional details. I need to have an accurate profile of the object for downstream analysis so a bounding box is not an option. My camera can produce frames at 30 fps, but I do not need to process that fast, though I do not want to only process 1 a second either. Doing a fast de-noising operation is too slow. My images are 4024x3036 monochrome images. I attached jpeg versions of six shots of my scene. The sample is the small chunk in the center of the two plates in the bottom third of the image. I also attached what I am looking to pull from each frame an irregular polygon that matches the 2d profile of the shape accurately. I will favor accuracy and stability over speed but I would like to process a few frames per second.

I will go capture some representative images or small movie and will post shortly.

Thanks in advance.

Sample Images

Shot 1

Shot 2

Shot 3

Shot 4

Shot 5

Shot 6

The goal

Example of what I am looking for



from OpenCV & Python - How does one filter noise from an irregular shaped polygon detected by OpenCV using a Kalman filter?

No comments:

Post a Comment