我曾经对微观图表进行这种分析,并最终把我所需要的一切纳入由Tcl公司驱动的C版图像处理和分析包。 (只有512×512张图像,这解释了为什么有512种作物经常生长的原因。) 分布有各种大小的图象,但大部分工作都是用八轨制成的,这解释了为什么有0xff的生意,而且最大程度有254个图像。
简言之,Tcl突击队的开端,将其余部分派到包裹中,这就要求适当的C例行处理特定论点。 表面之后,是表明指挥投入和产出的论点。 (可以是多种投入,但只有一个产出。) r 显示512×512×8轨道图像。 第三字是将要援引的指挥名称;图表显示如下文所述的形象。 因此,粗略的图表意味着呼唤ZZ教区教区;对图象的图像进行输入,并重新树立形象。 Tcl指挥线的其余部分具体规定了哪一种预定使用的图像。 (图象是ROI,即利益区、图像;几乎所有ZZZ机会都在ROI控制之下。) 因此,r1 r1 g8系指将第1号用作投入,将第1号用作产出(即标明输入形象本身),以及无论图像8——即第8号,用作ROI-,第0号;
我认为,在任何地方都可以上网,但如果你希望通过源码或甚至汇编整个大草坪,我很乐意将其寄给你。 这本手册摘录(但我认为,本手册中有一些错误——令人难忘......):
<Example 6. 标识特征:
问题
计数是一项共同的任务。 计算出的物品称为“名称”,通常必须仔细制作图像,以便特征以一种一对一的方式与实际物体对应。 然而,在这方面,我们忽视了图像制作,而是考虑计算机械。 第一次计票工作是查明在名录上有多少特征?
方法
First, let us define “feature”. A feature is the largest group of “set” (non-zero) pixels all of which can be reached by travelling from one set pixel to another along north-south-east-west (up-down-right-left) routes, starting from a given set pixel. The zz command that detects and marks such features on an image is “zz rr graphs R:src R:dest G:ROI”, so called because the mathematical term for such a feature is a “graph”. If all the pixels on an image are set, then there is only a single graph on the image, but it contains 262144 pixels (512 * 512). If pixels are set and clear (equal to zero) in a checkerboard pattern,
then there will be 131072 (512 * 512 / 2) graphs, but each will containing only one pixel.
Briefly explained, “zz rr graphs” starts in the upper-left corner of an image and scans each
succeeding row left to right until it finds a set pixel, then finds all the set pixels attached to that through north, south, east, or west borders (“4-connected”). It then sets all pixels in that graph to 1 (0x01). After finding and marking graph 1, it starts scanning again at the pixel after the one where it first discovered graph 1, this time ignoring any pixels that already belong to a graph. The first 254 graphs that it finds will be marked uniquely; all graphs found after that, however, will be marked with the value 255 (0xff)
and so cannot be distinguished from each other. The key to being able to count any number of graphs accurately is to process each image in stages, that is, find the number of graphs on an image and, if the number is greater than 254, erase the 254 graphs just found, repeating the process until 254 or fewer graphs are found. The Tcl language provides the means to set up control of this operation.
让我们开始建立必要的指挥系统,把ZZ图像文档读成R形象,探测和标识图表。 在处理周期之前,我们宣布图像系列中的所有特征为零,而变数为零。 在处理缝.中,我们首先将图像档案读为R图像,探测和标识图表。
zz ur to $inDir/$img r1
zz rr graphs r1 r1 g8
其次,我们没有一些变数来追踪计数,然后使用“最大”指挥来查明是否发现了254多幅图表。
set nGraphs [ zz ra max r1 a1 g1 ]
如果NGraphs 等于255,那么在总数中应加上254个准确的图表,则应删除1至254的图表,重复计算的次数要少于255。
while {$nGraphs == 255} {
incr sumGraphs 254
zz rbr lt r1 155 r1 g1 0 255
set sumGraphs 0
zz rr graphs r1 r1 g8
set nGraphs [ zz ra max r1 a1 g8 ]
}
当“同时”休息室出走时,变异的梯度必须持有少于255个的数字,即一些准确的计算图;这又增加了图像系列中特征的总数。
incr sumGraphs $nGraphs
经过处理,印刷了该系列中发现的特征总数。
puts “Total number of features in $inDir
images $beginImg through $endImg is $sumGraphs.”
经过处理,印刷了该系列中发现的特征总数。