cmps_segment_plot | R Documentation |
This function plots the selected basis segment with the comparison signature. One can visualize the
scaled segment and its corresponding cross-correlation curve. The number of marked correlation peaks
at each segment scale is determined by npeaks_set
of extract_feature_cmps
. The red vertical dashed
line indicates the congruent registration position for all segments; the green vertical dashed line
indicates the position of the consistent correlation peak (if any); the blue vertical dashed line
indicates the tolerance zone (determined by Tx
)
cmps_segment_plot(cmps_result, seg_idx = 1)
cmps_result |
a list generated by |
seg_idx |
an integer. The index of a basis segment that we want to plot for. |
a list of n elements, where n is the length of npeaks_set
, i.e. the number of scales for
each basis segment. And each one of these n elements is also a list, a list of two plots:
segment_plot
: The basis segment of current scale is plotted at different positions where the
segment obtains correlation peak. The comparison signature is also plotted.
scale_ccf_plot
: This is the plot of the cross-correlation curve between the comparison signature
and the segment of the current scale.
library(cmpsR) library(ggpubr) data("bullets") land2_3 <- bullets$sigs[bullets$bulletland == "2-3"][[1]] land1_2 <- bullets$sigs[bullets$bulletland == "1-2"][[1]] # compute cmps # algorithm with multi-peak insepction at three different segment scales cmps_with_multi_scale <- extract_feature_cmps(land2_3$sig, land1_2$sig, include = "full_result" ) # generate plots using cmps_signature_plot seg_plot <- cmps_segment_plot(cmps_with_multi_scale, seg_idx = 3) pp <- ggarrange(plotlist = unlist(seg_plot, recursive = FALSE), nrow = 3, ncol = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.