The most effective way to create noise contrast for swimmers in the pool

I want to calculate the number of people in the pool for statistical use. I will use artificial intelligence and image processing on images created by a security camera located on the pool ceiling. The camera is static, so it does not have an axis of rotation.

For the image processing phase, I would like to focus on the swimmers and try to remove the rest of the pool. I need a good contrast between the background and the swimmers.

The problem is that the output images of the camera have a lot of β€œnoise” such as sunlight, rays of light, black lines at the bottom of the water, flags in the air and cables for dividing corridors.

Here is an example of how the images look. Real images will only be in the best quality, because this example is taken from the output image using my mobile phone.

Capture of an image

  • What is the most effective way to remove sun rays / light rays on my images? Maybe using a filter?
  • How can I create a high contrast between the swimmers and the background, given the black lines at the bottom of the water?

Since the camera does not move, can I get other images with the same background (except for sunlight), and maybe I could use the differences in the images to extract the swimmers?

I am looking for any ideas / filters / links.

+6
source share
1 answer

My suggestion is to analyze the image in HSV space. For information, H (hue) matches the colors. S (saturation) is the purity of the color.

If you use Matlab, use the rgb2hsv () function in opencv, using cvCvtColor () to convert the color space.

Here is a little experiment that I did on your image. I converted the image to HSV space. and I published a false color map. Now with this, what you can do is clustering something like k-means to identify people. enter image description here

Precise octave / matlab regeneration commands:

>> im = imread( '9Nd5s.png' ); >> hsv = rgb2hsv( im ); >> imagesc( hsv(:,:,1) ), colormap( hot ) 

Hope this is helpful let me know if you need more help. Your problem seems interesting for work.

+4
source

All Articles