Ask Your Question

Recognizing a tennis court on a satellite image

asked 2013-01-24 13:18:33 -0500

Andrew Skalkin gravatar image


To get familiar with OpenCV and image analysis in general, I decided to do a small pet project - find locations of outdoor tennis courts on satellite (google maps) images. Even though digging in the documentation and forums is fun (really - this site is very well organized, kudos to the community!), I would appreciate it if you nudge me in the right direction.

I read about feature 2d detection and Line-2D algorithm and it seems to me that either of them might do the trick. However, I wonder if there is a simpler/more efficient method for doing that? In my case, the courts on the images will have the same proportions, the only transformation applied will be rotation. Also, they have no texture.

Thanks a lot! -Andrew

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2013-02-13 10:27:56 -0500

Mahdi gravatar image

updated 2013-02-14 23:49:27 -0500

The project your are working on is not really a pet project and it is hard enough!:)

I recommend to go over the workshop site to address some new approaches in aerial vision:
But a here I explain an intuitive way for this special problem:
1. You have color cues [Green], so extract the green channel and do a color segmentation using watershed algorithm followed by a Connected Component (an Opencv example here). Then find the area and bounding box area of remaining connected components and they should approximate each other. So trees and green non court areas will be removed.
2. For finding court lines, isolate white pixcels(approx. R=G=B).

edit flag offensive delete link more

answered 2013-02-15 02:03:44 -0500

If you have a large enough number of court and non-court examples, maybe you can train a HAAR or LBP cascade classifier (similar to the ones used to detect faces) to do the job. The advantage against Mahdi's proposal (although his proposal is as valid as any other) is that you don't need to deal with color extraction (not all courts are green and the ones that are do not have the same tone of green, and all that) as you input the images in grayscale for feature detection. Also no explicit line detection is needed.

If the courts have always the same proportions in your images, what you can do to avoid having to train a different model for each orientation is to train a model in a standard orientation (longitudinal orientation for instance) and at test time rotate the same input image to different orientations and perform the detection against the standard-oriented court model.

I agree with Mahdi, this is no pet project AT ALL you'll see! hehehehe

Good luck!

edit flag offensive delete link more

answered 2013-12-23 16:52:22 -0500

This blog post has a decent run down of tennis court detection:

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2013-01-24 13:18:33 -0500

Seen: 2,673 times

Last updated: Dec 23 '13