【Mathematica】Graphics和Image的一些区别

2024-10-15 15:21:38

1、先画图:a={0., 0.0833333, 0.166667, 0.333333, 0.5, 0.666667, 0.833333, 1};

【Mathematica】Graphics和Image的一些区别

2、看看img是什么:Head[img]发现img是Graphics。

【Mathematica】Graphics和Image的一些区别

3、再操作一下:pic = ImageCrop[img]

【Mathematica】Graphics和Image的一些区别

4、pic是什么?Head[pic]pic是Image。

【Mathematica】Graphics和Image的一些区别

5、img是Graphics,那么,img乘以一个正整数,效果如下:img*2000

【Mathematica】Graphics和Image的一些区别

6、pic是Image,它乘以一个正整数,会怎么样呢?pic*2000

【Mathematica】Graphics和Image的一些区别

7、Graphics经过栅格化,可以变成Image:

【Mathematica】Graphics和Image的一些区别

8、对fig进行倍数运算:fig*2000

【Mathematica】Graphics和Image的一些区别

9、检测img的边界:

【Mathematica】Graphics和Image的一些区别

10、检测pic的边界:EdgeDetect[pic]

【Mathematica】Graphics和Image的一些区别

11、与fig的边界图对比一下:EdgeDetect[fig]

【Mathematica】Graphics和Image的一些区别
猜你喜欢