Ask Your Question
0

Tracking an object outside

asked 2013-07-11 17:51:57 -0500

oetroc gravatar image

updated 2013-07-11 17:53:16 -0500

I am attempting to find and track an object in my yard (flat, mostly short grass). For testing, I am trying to locate a spherical object (usually a ball) placed within the grass lawn. My camera is currently mounted at about 10 ft. above the ground. So far my efforts have been in vain, since the camera has been having trouble using the color/hueDistance segmentation technique as well as using geometric shapes for detection.

Any tips would be greatly appreciated.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-07-14 11:27:53 -0500

updated 2013-08-04 00:21:40 -0500

Please give more details like a few images taken by the camera, colour of the ball, etc. I am trying to do something similar although inside a room.

Edit :

Sorry for being so late. This is how I have tried to solve the problem. I will try to include some tips on how to distinguish objects. Please note that I am also new to image processing and so dont take them as absolute. These are just a few things I found out by experimentation and I am not sure they will always just work. There maybe a lot of better ways.

  1. Think about how you identify it by your eyes. That would give you some high-level idea on how to solve the problem. For eg. in case of the ball, it looks yellow, it is round, the color is kind of different from its surrounding, there is only one yellow ball in the image.
  2. Now try to convert them to simple algorithms or try using the related functions.
  3. Now you might feel a impulse to use all the introspection at the same time. For eg, it is yellow as well as round. After all, that is how our brain processes this things. But it usually harder to use all of them. Try to pick up the most interesting, unique ones which will be easy to implement. Remember there is always a trade-off in image processing. Usually it doesnt need to be perfect covering all the possible scenarios, it just needs to be good enough. For eg. as you can see later I only managed to extract half part of the ball. I think its a somewhat acceptable tradeoff here because there is no other yellow thing in the view. Even if there are some, you can always work on your code to remove them (usually it is not that hard) by size or something else. Also it is easier to ask questions in the forum when you have managed a basic detection, but you want to improve it based on some other property, basically because you can understand what you really want.
  4. Always try to keep things simple and remember, in most cases, looping through all the pixels is a bad idea. Most probably, there already are optimised functions or algorithms for doing it.
  5. Ok, so I thought that the color of the ball looks a prominent feature. Lets try hueDistance, but it turns out that half of the ball doesnt even get detected (far away from yellow). But atleast the other half gets detected. hueDistance

  6. Also, the shade of the the detected half (in greyscale) looks kind of different from the rest of the image. Lets focus on that. Open up your favourite image editor like Gimp or Photoshop and detect the range of r or g or b (because they all will have the same value for a given pixel of a greyscale image) values in the darker half of the ball. It looks like it varies from 35 ...

(more)
edit flag offensive delete link more
0

answered 2013-07-16 20:34:25 -0500

oetroc gravatar image

Here is an image captured by the webcam (MS Lifecam 5000 HD) from about 5 ft off the ground, but the concept is still the same. I am simply trying to detect the ball within the image and track it as it moves. I've used a variety of different methods in terms of attempting to segment the image (most notably hueDistance and binarize). However it detects a great amount of noise during its implementation.

I have used a combination of erode/dilate/morphOpen/morphClose with some degrees of success. However the program isn't robust at all, generating many false positives with even the most minute of lighting changes.

I'm looking for a general guideline as to good segmentation practices in outdoor environments that are insensitive to light changes (I have read the SimpleCV pdf in its entirety, however all of the examples are good for indoor scenarios but very poor for outdoor).

Any suggestions are welcome. Thank you.

edit flag offensive delete link more

Comments

Have you try ViBe background subtraction, the example in http://tommesani.com/index.php/video/comparing-background-subtraction-algorithms/bgs-vibe.html and http://www2.ulg.ac.be/telecom/research/vibe/ said good to reduce noise in outdoor scene.. But ViBe is patented.. Hope it help

Andrew1108 gravatar imageAndrew1108 ( 2014-09-22 11:03:38 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-07-11 17:51:57 -0500

Seen: 427 times

Last updated: Aug 04 '13