cmpsR-vignette

The cmpsR package is an implementation of the Congruent Matching Profile Segments (CMPS) method (Chen et al. 2019). In general, it can be used for objective comparison of striated tool marks, but in our examples, we mainly use it for bullet signatures comparison. The CMPS score is expected to be large if two signatures are similar. So it can also be considered as a feature that measures the similarity of two bullet signatures.

Installation

You can install the released version of cmpsR from CRAN with:

install.packages("cmpsR")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("willju-wangqian/cmpsR")

Example and Summary of the Algorithm

In this section we use a known match (KM) compasison (of two bullets) to illustrate the main ideas of CMPS algorithm and to showcase the cmpsR implementation. The cmpsR package includes a simple data set of 12 bullet signatures generated from two bullets (each bullet has 6 bullet signatures). These bullet data come from the James Hamby Consecutively Rifled Ruger Barrel Study (Brundage 1998; Hamby, Brundage, and Thorpe 2009; Hamby et al. 2019), and the two bullets included in cmpsR are just a subset of Hamby set 252. These bullet data in their original format can also be found in Chapter 3.5 of Open Forensic Science in R.

library(cmpsR)
data("bullets")

A comparison of two bullets is considered as a match if two bullets are fired from the same barrel (come from the same source). The gun barrel used in the Hamby study has 6 lands, and during the firing process striation marks will be engraved on the bullet by these lands. A bullet signature is a numerical representation of the striation marks engraved by a land. This is why each bullet can generate 6 bullet signatures. Two bullet signatures are a match if they are originally engraved by the same land in a gun barrel. Therefore, two bullets of a known-match comparison will have 36 pairwise bullet signature comparisons, and 6 of them are matching bullet signature comparisons while 30 of them are non-matching bullet signature comparisons.

Here we plot the twelve bullet signatures of the two bullets. The bullet signatures are aligned so that the top figure and the bottom figure of the same column are a matching bullet signature comparison.

To further illustrate the idea of the CMPS algorithm, let’s consider one matching bullet signature comparison: bullet signature of bullet 1 land 2 and bullet signature of bullet 2 land 3 (the second column), and compute the CMPS score of this comparison:

library(cmpsR)
data("bullets")

x <- bullets$sigs[bullets$bulletland == "2-3"][[1]]$sig
y <- bullets$sigs[bullets$bulletland == "1-2"][[1]]$sig

cmps <- extract_feature_cmps(x, y, include = "full_result")
cmps$CMPS_score
#> [1] 18

And we have the plot of x and y.

A KM Comparison, x and y

A KM Comparison, x and y

Main Idea

The main idea of the CMPS method is that:

  1. we take the first signature as the comparison signature (x or bullet signature of “2-3”) and cut it into consecutive and non-overlapping basis segments of the same length. In this case, we set the length of a basis segment to be 50 units, and we have 22 basis segments in total for bullet signature x.
Cut x into consecutive and non-overlapping basis segments of the same length. Only 4 basis segments are shown here

Cut x into consecutive and non-overlapping basis segments of the same length. Only 4 basis segments are shown here

  1. for each basis segment, we compute the cross-correlation function (ccf) between the basis segment and the reference signature (y or bullet signature of “1-2”)
y and 7th basis segment

y and 7th basis segment

the cross-correlation function (ccf) between y and segment 7

the cross-correlation function (ccf) between y and segment 7

  1. If two signatures are from a KM comparison, most of the basis segments should agree with each other on the position of the best fit. Then these segments are called the “Congruent Matching Profile Segments (CMPS)”.

Ideally, if two signatures are identical, we are expecting the position of the highest peak in the ccf curve remains the same across all ccf curves (we only show 7 segments here);

ideal case: compare x to itself. The highest peak has value 1 and is marked by the blue dot

ideal case: compare x to itself. The highest peak has value 1 and is marked by the blue dot

But in the real case, the basis segments might not achieve a final agreement, but we have the majority;

real case: compare x to y. The 5 highest peaks are marked by the blue dots

real case: compare x to y. The 5 highest peaks are marked by the blue dots

We mark the 5 highest peaks for each ccf curve because the position of the “highest peak” might not be the best one.

  1. each ccf curve votes for 5 candidate positions, then we ask two questions in order to obtain the CMPS number/score:
  1. false positive: how can the segments vote more wisely? -> Multi Segment Lengths Strategy
Multi Segment Lengths Strategy - increasing the segment length could decrease the number of false positive peaks in ccf curves

Multi Segment Lengths Strategy - increasing the segment length could decrease the number of false positive peaks in ccf curves

Multi Segment Lengths Strategy - increasing the segment length could decrease the number of false positive peaks in ccf curves

Multi Segment Lengths Strategy - increasing the segment length could decrease the number of false positive peaks in ccf curves