【Mathematica】怎么把Graphics转化为Image

 时间:2024-10-14 05:02:49

1、通过ArrayPlot得到一幅图片fig:

【Mathematica】怎么把Graphics转化为Image

2、直接对fig进行倍数运算是行不通的,因为fig是Graphics:

【Mathematica】怎么把Graphics转化为Image

3、把fig转化为Image格式的图片img:

【Mathematica】怎么把Graphics转化为Image

4、对img执行倍数运算:

【Mathematica】怎么把Graphics转化为Image

5、执行一个大倍数:

【Mathematica】怎么把Graphics转化为Image

6、申明一下,对图片进行倍数运算的一个作用。先看原图fig的边界图:1 - EdgeDetect[fig, 2, 0.001]

【Mathematica】怎么把Graphics转化为Image

7、再看img的边界图:1 - EdgeDetect[img, 2, 0.001]

【Mathematica】怎么把Graphics转化为Image

8、对比于img的大倍数:1 - EdgeDetect[img*2000, 2, 0.001]似乎没什么变化。

【Mathematica】怎么把Graphics转化为Image

9、需要对img的大倍数执行栅格化操作,磨消过大的亮度的影响:1 - EdgeDetect[Rasterize[img*2000, RasterSize -> 1000], 2, 0.001]看,边界变得很清晰了。

【Mathematica】怎么把Graphics转化为Image

10、不同的倍数,往往得到不同的边界:

【Mathematica】怎么把Graphics转化为Image【Mathematica】怎么把Graphics转化为Image【Mathematica】怎么把Graphics转化为Image【Mathematica】怎么把Graphics转化为Image

11、小于1的倍数,需要调整检测边界的阈值,且与大倍数边界仍有很大差别:

【Mathematica】怎么把Graphics转化为Image【Mathematica】怎么把Graphics转化为Image

12、把原图与边界图叠加到一起:

【Mathematica】怎么把Graphics转化为Image【Mathematica】怎么把Graphics转化为Image【Mathematica】怎么把Graphics转化为Image【Mathematica】怎么把Graphics转化为Image
  • 怎么在word中输入根号?
  • wps中如何设置图片的弹簧动画(124)
  • MathType怎么加长水平箭头
  • 如何编辑复杂的数学公式
  • Word2016如何调整分组工具栏的位置
  • 热门搜索
    亚丹衣柜怎么样 说明文的说明方法 ps怎么做印章 养龟的方法 炸茄盒的家常做法 怎么看隐藏文件夹 家常素菜100道 山东农业大学怎么样 巧克力哪个牌子好吃 糖醋蒜怎么腌制最好吃