Group Abstract Group Abstract

Message Boards Message Boards

Improving marksmanship with smooth kernel distribution

Posted 10 years ago
POSTED BY: Diego Zviovich
8 Replies

Nice post! Instead of finding Mean you could try local maxima. Also there are many ways of overlapping images, like ImageMultiply or Overlay.

tutorial = Import["https://wolfr.am/cEj2VscY"];
heatmap = Import["https://wolfr.am/cEj0rqGj"];
cropT = ImageResize[ImageTake[tutorial, {100, 765}, {1, 665}], 600];
cropH = ImageReflect[ImageResize[ImageTake[heatmap, {10, 550}, {25, 570}], 610], Left -> Right];
ImageMultiply[cropH, cropT]

enter image description here

POSTED BY: Vitaliy Kaurov

Really interesting -- thanks for sharing!

Do you have timestamps associated with the shooting images? It would be interesting to do temporal-spatial mining of shooting performance.

Another set of data and questions come from the idea to cross-correlate with the traffic landscapes while driving to the shooting range.

POSTED BY: Anton Antonov
Posted 10 years ago

Hi Sjoerd, I've only shown one of the targets. There are seven targets that were scanned and used to create the distribution.

files = FileNames[
   "C:\\Users\\Diego\\Documents\\Documents\\Shooting\\10 yds\\scan*.jpg"];
imgs = Import[#] & /@ files;
Export["pics.png", Rasterize[Multicolumn[imgs, 4], 600]]

enter image description here

173 shots in total are used for the calculation of the distribution. Let's overlap all the shots on top of the first image.

s = Flatten[shots[#, kern] & /@ imgs, 1];
Length@s
(*173*)
centers = findCenter[#, kern] & /@ imgs;
Show[imgs[[1]],  Graphics[{Yellow, EdgeForm[Blue], 
   Disk[100 # + centers[[1]], 10] & /@ s}]];
Export["160513.png", Show[imgs[[1]],   Graphics[{Yellow, EdgeForm[Blue], 
Disk[100 # + centers[[1]], 10] & /@ s}], ImageSize ->  400]]

enter image description here

We can overlay the 173 shots against the contourplot. The contourplot now makes more sense.

Show[ContourPlot[PDF[kde, {x, y}], {x, -5, 5}, {y, -5, 5}], 
Graphics[{Dashed, Line[{{0, -5}, {0, 5}}], Line[{{-5, 0}, {5, 0}}], 
Circle[{0, 0}, #] & /@ {1, 2, 3}, Red, PointSize[0.03], 
Point@Mean@kde, Black, PointSize[0.01], Point[results]}], 
ImageSize -> Large, PlotTheme -> "Detailed"]

enter image description here

POSTED BY: Diego Zviovich

Because of Diego's self-proclaimed left-handedness we have to reflect the density plot accordingly. Or come up with a left handed version of the shooting-diagnosis breakdown stencil.

POSTED BY: Anton Antonov

This is a really nice plot, but there is one thing that I don't really get: why is the DensityPlot the brightest in the lower-left quadrant even though by far the most shots landed in the upper-right one (8, compared to only 3 in the lower-left)? Are you sure you didn't flip the data somewhere in the code?

POSTED BY: Sjoerd Smit

True! I did not notice his lefty comment. I corrected with ImageReflect, thanks.

POSTED BY: Vitaliy Kaurov

enter image description here - another post of yours has been selected for the Staff Picks group, congratulations !

We are happy to see you at the tops of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

POSTED BY: EDITORIAL BOARD

I still have a lot to learn... Awesome work!

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard