The purpose of this project is to develop an OpenCV + Python script to automatically score trap shooting competitions. In a trap shooting competition, five people stand around in a semi-circle. One at a time they yell “pull”, which releases an orange clay disk out of the house at a random angle. They get one shot to try to hit the target. If the disk breaks, it counts as a hit. There is one score keeper that keeps track of each shooters’ hits and misses.
Below is an example of such a trap shooting match:
The goal of this project is to detect if and how a shooter broke the target using OpenCV, Python, and a Raspberry Pi. The script should be able to detect when the trap is thrown followed by if the target is hit.
In my early attempts, I used Python to analyze a video clip and take a snapshot image before and after the sound of the gunshot. Then I analyzed the difference in pixels from the snapshots to determine if there was a hit (significantly less pixels or multiple chunks) or a miss (one big chunk, just slightly smaller in pixel size as the trap is travel farther away).
Below is an example of a “Hit Example” (a link to the input video can be found here):
On the left we the intact trap is it is released. On the right we can see the trap has been hit, breaking it into multiple pieces.
A “Miss Example” can be seen below (original video here):
Notice how the targets are approximately the same size in both the left and right frames.
In my initial attempt to solve this problem, I ran into two problems:
- I could never get the sound from the microphone to consistently sync with the Raspberry Pi camera module, therefore the before and after frames varied substantially.
- If there were too many changes in the background (e.x., passing clouds or tree branches blowing in the wind), my script would falsely detect these regions as well.
For this project I need a more robust background subtraction/motion detection method that can accurately monitor for traps without false-positive detections.
In order to be successful with this project, you should:
- Have experience working with OpenCV + Python.
- Have worked with the Raspberry Pi in previous projects and understand its hardware limitations.
- Have successfully applied motion detection/background subtraction.
While ideal (but not required), it would be helpful if you:
- Have worked with syncing multiple sensors (i.e., microphone + camera).
- Understand trap shooting competitions.
Compensation will be based on experience and prior projects similar to this one.
To apply for this job:
Please click the “Apply to this Job” button below.