Taking a jpg image and converting it to raster, getting pixelized data manipulation of the image and plot a scatter image.
Sound like another useless R function, that can produce a scatter plot in a shape of a logo with a smooth curve.
So the function is using the image manipulation part:
img % image_quantize(max=2, colorspace = 'gray', dither=TRUE) %>% image_scale(geometry = geometry_size_pixels(width=25, height=20, preserve_aspect=FALSE)) # Image manipulation mat 180)) mat_df
Second part consists of data transformation to dataframe:# Melt data dff
and last part is a simple ggplot scatter plot:# draw scatter g
As always, complete code is available at Github.
And some examples with famous logos:
And you can see the pattern
Happy R-ing! And stay healthy.