I would like to read a simple black/white picture in png format into R. I need 3 information for each pixel, the x, y coordinates and color information(0 for white, 1 for black).
I need this information to run a function that checks if there are any closed white elements in the picture or not.
Any tips will be more than welcome. Thanks!