如何旋转大型图像数据库,并将每个旋转存储为新图像?

时间:2021-07-29 00:21:07

I am trying to take a database of images, rotate them 1 degree at a time, and then save each tilt as a new picture. Does anyone know how I can do this? I am on a Mac.

我试图获取图像数据库,一次旋转1度,然后将每个倾斜保存为新图片。有谁知道我怎么做到这一点?我在Mac上。

1 个解决方案

#1


2  

You can use the built-in sips command in the Terminal:

您可以在终端中使用内置sips命令:

sips -r 10 input.jpg --out output.jpg

The above will rotate input.jpg 10 degrees clockwise and save the result as output.jpg.

以上将顺时针旋转input.jpg 10度并将结果保存为output.jpg。

I would start from zero each time and rotate by 1 degree, then by 2 degrees, then by 3 degrees rather than keep doing 1 degree increments otherwise errors will probably accumulate.

我会从零开始每次旋转1度,然后旋转2度,然后旋转3度而不是继续增加1度,否则错误可能会累积。

You can get help on sips by typing

您可以通过输入获得啜饮的帮助

man sips

Spacebar advances a page, q will quit.

空格键前进一页,q将退出。

Online help.

#1


2  

You can use the built-in sips command in the Terminal:

您可以在终端中使用内置sips命令:

sips -r 10 input.jpg --out output.jpg

The above will rotate input.jpg 10 degrees clockwise and save the result as output.jpg.

以上将顺时针旋转input.jpg 10度并将结果保存为output.jpg。

I would start from zero each time and rotate by 1 degree, then by 2 degrees, then by 3 degrees rather than keep doing 1 degree increments otherwise errors will probably accumulate.

我会从零开始每次旋转1度,然后旋转2度,然后旋转3度而不是继续增加1度,否则错误可能会累积。

You can get help on sips by typing

您可以通过输入获得啜饮的帮助

man sips

Spacebar advances a page, q will quit.

空格键前进一页,q将退出。

Online help.