【发布时间】:2016-07-07 14:13:21
【问题描述】:
我是初学者,想将现有的 ImageProcessor 图片 (RGB) 转换为 8 位灰度图片(在 ImageJ 中)。
我尝试了不同的方法,但没有任何效果:
ImageProcessor binaer = copy.getProcessor().convertToByte(false);
...不起作用
..所以我想将处理器类型从 ImageProcessor 更改为 ImagePlus..
ImagePlus imp = copy.getProcessor();
但这也没有用。
我在网上找到了这个:
导入 ij.ImagePlus; 导入 ij.process.ImageConverter;
// ...
ImagePlus imp = IJ.getImage();
ImageConverter ic = new ImageConverter(imp);
ic.convertToGray8();
imp.updateAndDraw();
但我不想使用原始图片,我想使用编辑后的 ImageProcessor 图片。
谁能帮帮我
【问题讨论】: