我有大量的图像,我想要绘制每个图像熵的密度图。我想把个人的图片叠加在密度图上,有没有人对什么是最好的软件包或程序有任何建议?我通常使用Python-3和R,但是如果更容易/更好的话,我会考虑其他的。
发布于 2022-08-19 10:11:12
下面是一个使用函数sinkr::addImg()的R选项。通过指定图像中心的x和y坐标以及所需的宽度(以x轴单位表示),可以将图像添加到现有的地块中:
library(sinkr) # https://github.com/marchtaylor/sinkr
library(png)
myurl <- paste0("https://upload.wikimedia.org/wikipedia/commons/thumb/",
"e/e1/Jupiter_%28transparent%29.png/242px-Jupiter_%28transparent%29.png")
z <- tempfile()
download.file(myurl,z,mode="wb")
pic <- readPNG(z)
file.remove(z) # cleanup
dim(pic)
image(volcano)
addImg(pic, x = 0.3, y = 0.5, width = 0.4)
addImg(pic, x = 0.4, y = 0.6, width = 0.1)

https://stackoverflow.com/questions/73376791
复制相似问题