View source: R/remove_color_collisions.R
remove_color_collisions | R Documentation |
This function allows you to make automatic data entry more accurate by filtering out token color from the photo roster. Simply set a path to the main folder. Then supply the token color vectors and shift angles. It is recomended to use cool token colors (e.g., green, blue, and purple), and shift all token hues in the standized photos twoards warmer yellow, red, and orange hues. All photos in the StandardizedPhotos folder will be updated and saved in the PhotosToPrint folder. With token hues removed from the photo-roster, automatic token detection and classification is much more acurrate, as there a fewer false positives arising from background colors.
remove_color_collisions(
path = path,
mix_histogram = 0.8,
high_intensity_thresh = 0.8,
low_intensity_thresh = 0.2,
moderate_intensity = 0.8,
blur_intensity = 2,
blur_saturation = 2,
mean_intensity = 0.5,
mean_saturation = 0.15,
rotate_wheel = 30,
endpoint = 100,
lower_hue_threshold = 110,
upper_hue_threshold = 330,
saturation_limit_recolor = 0.2,
mode = "save",
verbose = TRUE
)
path |
Full path to main folder. |
mix_histogram |
A scalar on (0,1) to mix orginal intensity and balanced histogram of intensity. |
high_intensity_thresh |
Limit at which to moderate overexposed areas. |
low_intensity_thresh |
Limit at which to lighten underexposed areas. |
moderate_intensity |
Scale factor with which we correct high and low intensity areas. |
blur_intensity |
Blur applied to intensity layer to smooth out threshold artifacts. |
blur_saturation |
Blur applied to saturation layer to smooth out threshold artifacts. |
mean_intensity |
Average intensity in final image. |
mean_saturation |
Average saturation in final image. |
rotate_wheel |
Angle to rotate color wheel before removing token colors. Its beter to start at slightly purple than red. |
endpoint |
Upper limit of hues after mapping. |
lower_hue_threshold |
Any hue above this, but below the upper threshold, will get mapped to the interval between 0 and endpoint. |
upper_hue_threshold |
Any hue below this, but above the lower threshold, will get mapped to the interval between 0 and endpoint. |
saturation_limit_recolor |
Saturation limit above which token colors are rotated out of image. |
mode |
Set to "test", to check photos by hand. The "save" option is used only by remove_color_collisions. |
verbose |
Set to TRUE to plot orginal and processsed images |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.