Let's say I have an image like this smiley face below:
I would like to write an R script that returns the pixel coordinates of the pixels that are blue. Ideally I'd want to specify the RGB/HEX/etc value of the blue when using this package/function, rather than using a threshold or a logic calculation where I'm looking at whether or not a pixel is 'white or not white'. I know there are tools and packages in Python and MATLAB but I was wondering if there was a suitable package in R I could use instead. Thanks!