1. 对比
2. 避坑
使用save()和saveFrame()保存的是整个sketch的截图(Figure 1 & Figure 2), 使用cam.save() (其中cam = new Capture(this, cameras[0])) 才会保存摄像头所拍的内容(Figure 3);而cam(Capture对象)不存在saveFrame()方法(Figure 4)。
Figure 1
Figure 2
Figure 3
Figure 4
----------------------------------------------------------------------------------------
Reference:
1. Processing save()
https://processing.org/reference/save_.html
2. Processing saveFrame()
https://processing.org/reference/saveFrame_.html