findPrimer: Read cartridge case image and find primer region

Description Usage Arguments Details Value Examples

Description

Images must be of the standard format as provided in the NIST Ballistics and Research Toolmark Database. The dimensions are 1944 x 2592 pixels (1944 is the height), and images are on a 255-grayscale. Here we use ring light images. This function finds the primer region, which is the circular region containing the breechface marks and firing pin impression. By default images are cropped to 1919 x 1919 pixels. For more information on the steps involved in finding this region, refer to the GitHub page.

Usage

1
findPrimer(fileName)

Arguments

fileName

location of image file. This function has been tested on png files.

Details

This function uses the EBImage package, which stores the image as a 2592 x 1944 matrix. The primer region that is returned is similarly an EBImage image, where the primer region is stored in a matrix with binary values. If using this matrix directly on the image matrix in the original orientation (1944 x 2592), note that the should first be transposed.

Value

A 1919 x 1919 binary image in EBImage format. Values 1 indicate the primer region.

Examples

1
2
3
4
## Not run: 
primerExample <- findPrimer(system.file("extdata", "NBIDE R BF 118.png", package = "cartridges"))

## End(Not run)

xhtai/cartridges documentation built on June 1, 2019, 2:58 p.m.