Shooting[Full Screenshot] [Full Screenshot] [Sourcecode] [Executable] DescriptionThis program takes a scanned in shooting target, and finds the centre of every bullet hole on it. It does this by collecting neighbouring black pixel's coordinates into an array of 'hole' structures. The problem with this is it treats two overlapping holes as one, so I needed another process to find the centres. For each pixel in the array, the distance to every other pixel in the array is calculated, and if it is <= the radius of a bullethole, then a running total for that first pixel is incremented. That is what the 'height' axis on the graphs represents. All it does is find the peaks of these graphs, and that is where the centres of a group of holes are. Why I did itI had already been keeping track of my scores in an MS Excel worksheet, so this seemed like the next logical step. I also thought that the local shooting club might appreciate it as well, if they ever got any computer equipment. Other infoThis program has no graphical output as such. The graphs were done by exporting
the array into excel and drawing a 3d graph. You can see it still needs a little work
as the white dots arent *quite* in the centre but other than that it works pretty well
in identifying close targets.
|