Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Most efficient way to create a contrast on swimmers in a pool considering noise

I want to calculate the number of people in a pool, for a statistic usage. I will use artificial intelligence and image processing on the images generated by a security camera located on the ceiling of a pool. The camera is static, so it has no axis of rotation.

For the image processing step, 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 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 sparation corridors.

Here is an example of what the images look like. The real images will just be in better quality, because this example is taken from a picture of the output using my cellphone.

Capture of an image

  • What is the most efficient way of removing sunrays/light rays on my images? Maybe using a filter?
  • how I can create a high contrast between the swimmers and the background, considering the black lines in the bottom of the water?

Because the camera does not move, I can obtain other images, with the same background (excepts for the sunrays) and maybe I could use the differences on the images to extract swimmers?

I am looking for any ideas/filters/references.

like image 842
Pier-Alexandre Bouchard Avatar asked Oct 25 '12 15:10

Pier-Alexandre Bouchard


Video Answer


1 Answers

My suggestion is to analyse the image into HSV space. For information H (hue) corresponds to the colors. S (saturation) is the purity of the color.

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

Here is a little experiment I have done on your image. I have converted the image to HSV space. and I have posted the false color map of it. Now with this what u may do is clustering something like k-means to identify the people. enter image description here

exact commands to regenerate it in octave/matlab is:

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

Hope this is helpful, let me know if u need any more help. your problem seems interesting to work upon.

like image 106
mkuse Avatar answered Nov 15 '22 07:11

mkuse