Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
136 views
in Technique[技术] by (71.8m points)

Using R to extract a specific colour from an image

I'm new to both Stackoverflow and coding in general, but I hope I can find some answers here.

For an assignment in computational art history, I want to find a way in RStudio that can display a specific colour in an image, leaving the rest in greyscale. Like how this photo looks, only detecting the blue from the image

What I want to end up achieving is uploading an image of a painting, and showing that a specific type of blue (rgb(65,102,245) or 'ultramarine') was used by Johannes Vermeer and locating it on his Girl with the Pearl Earring. I can do it with .tif or any other format.

I've tried RGB rasters like described here but I ended up getting errors when I tried to perform it with my own photo (like "alpha level NA, not in [0,1]"). Perhaps I can try that again and show where I go wrong - but to be frank any help/support is welcome at this point!

Best, Doris

question from:https://stackoverflow.com/questions/66061199/using-r-to-extract-a-specific-colour-from-an-image

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...