ImageJ API: how to change the framerate when writing AVI

∥☆過路亽.° 提交于 2019-12-25 02:55:09

问题


I would like to use the AVI_Writer from the ImageJ API in my java program. However, even though I can automate the movie writing, I haven't found out how to change the framerate when using the method:

writeImage(ImagePlus imp, java.lang.String path, int compression, int jpegQuality)

Any idea?

Thanks.


回答1:


If you look at the menu command for saving as AVI, it has an option to set the frame rate, which is taken from a setting hidden in Image > Stacks > Tools > Animation Options... in the menu.

Using the command finder, which you can invoke by typing [L], you find the sources for these two commands:

  • File > Save As > AVI... => ij.plugin.filter.AVI_Writer
  • Image > Stacks > Tools > Animation Options... => ij.plugin.Animator("options")

The command finder provides a handy button that directly links to the source files, have a look here and here. You'll find that the frame rate setting is stored as fps in the Calibration of the ImagePlus.



来源:https://stackoverflow.com/questions/21636173/imagej-api-how-to-change-the-framerate-when-writing-avi

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!