使用Imagemagick Chebyshev查找最大的矩形

时间:2012-05-13 04:20:29

标签: image-processing imagemagick

我有以下Chebyshev(ed)图片:

enter image description here

enter image description here

我使用以下imagemagick命令生成了这些:

convert imagein.jpeg -virtual-pixel black  -morphology Distance Chebyshev -auto-level imageout.jpeg

现在,我需要获取最大矩形的x,y位置和高度/宽度。我已按照此处的说明操作:http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=20269#p81610和此处http://www.imagemagick.org/Usage/morphology/#chebyshev。我尝试了以下命令(我不完全理解):

convert imagein.jpeg -virtual-pixel black  -morphology Distance Chebyshev \
     \( +clone -auto-level -fill black +opaque white \) \
     -compose multiply -composite -depth 16 txt: |\
  grep -v black

这会产生以下输出(我也不完全理解):

# ImageMagick pixel enumeration: 2272,1704,65535,srgb
1154,437: (43700,43700,43700)  #AAB4AAB4AAB4  srgb(66.6819%,66.6819%,66.6819%)
...

我的理解:2272,1704 =图像的宽度/高度。 1154,437 =最亮像素的像素位置(最大内核的中心)。 43700/100 =内核的像素径(我不明白为什么重复三次)。

0 个答案:

没有答案
相关问题