Estimate the registration between two cartridge case scans using a cell-based or full scan comparison procedure
comparisonHelpers.Rd
The comparison_cellBased
function uses a cell-based comparison procedure
implemented in the cmcR::comparison_allTogether()
. The comparison_fullScan
estimates the registration by comparing the full scans.
Arguments
- reference
an x3p object
- target
another x3p object
- thetas
a numeric vector of arbitrary length containing rotation values to be considered in the registration procedure
- numCells
a numeric vector of length 2 containing the number of cells to divide the c(rows,cols) of a cartridge case surface matrix into.
- maxMissingProp
maximum proportion of missing values allowed for each cell/region.
- sideLengthMultiplier
ratio between the target region and reference cell side lengths. For example, sideLengthMultiplier = 3 implies each region will be 9 times larger than its paired reference cell.
- returnX3Ps
A Boolean to return the cellHeightValues and alignedTargetCells for each cell index. Note that setting this argument to TRUE is required to calculate the visual diagnostic features
Note
The distinction between the "reference" and "target" scans is arbitrary, yet necessary for keeping track of the comparison direction in which a particular observation was calculated.
Examples
data("K013sA1","K013sA2")
compData_cellBased <- comparison_cellBased(reference = K013sA1,
target = K013sA2,
thetas = c(-3,0,3))
#> Error in mutate(., direction = "reference_vs_target"): could not find function "mutate"
compData_cellBased
#> Error in eval(expr, envir, enclos): object 'compData_cellBased' not found
compData_fullScan <- comparison_fullScan(reference = K013sA1,
target = K013sA2,
thetas = c(-3,0,3))
compData_fullScan
#> # A tibble: 6 × 12
#> cellIndex x y fft_ccf pairwise…¹ theta refMi…² targM…³ joint…⁴ cellH…⁵
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <named>
#> 1 1, 1 -14 -8 0.0955 0.140 -3 126310 159739 113854 <x3p>
#> 2 1, 1 -8 0 0.137 0.187 0 126310 159717 116953 <x3p>
#> 3 1, 1 -11 12 0.270 0.400 3 126310 159722 117849 <x3p>
#> 4 1, 1 12 -12 0.272 0.410 -3 123397 167983 119276 <x3p>
#> 5 1, 1 8 0 0.137 0.187 0 123397 167958 119212 <x3p>
#> 6 1, 1 14 7 0.0950 0.138 3 123397 167970 116030 <x3p>
#> # … with 2 more variables: alignedTargetCell <named list>, direction <chr>, and
#> # abbreviated variable names ¹pairwiseCompCor, ²refMissingCount,
#> # ³targMissingCount, ⁴jointlyMissing, ⁵cellHeightValues