如何通过编码创建垂直线强度剖面(线投影)?
How to create a vertical line intensity profile (line projection) by coding?
如何通过编码创建垂直线强度分布图(线投影)?
下面显示的代码从图像生成水平线强度剖面。
是否有任何代码可以获取垂直线强度分布图?
(或者我们应该先旋转图像,然后再水平旋转?)
而且,我知道“half Minor”是生成强度分布的线的长度,但我不知道“1”是什么意思?
而且,有没有数字或字符尊重行的宽度?
另外,下面代码生成的线强曲线无法显示为“home display”,Y坐标起点不为0,请问是什么原因?
line_projection := CreateFloatImage ( "line projection", halfMinor, 1 )
line_projection = 0
line_projection[icol,0] += imgFlat
line_projection /= samples
一般提示:
When you are unsure about the meaning of parameters in a command, try typing the command in a separate script but with incorrect parameters. You get an error, but the results-window gives you the full signature with often more meaningful parameter names.
如果您使用 CreateFloatImage
执行此操作,您将获得:
RealImage createfloatimage( String title, RealNumber width, RealNumber height )
如您所见,第二个参数指定了二维图像的高度,因此您的脚本代码创建了一个尺寸为 [halfMinor x 1] 的二维图像。
投影:
以下脚本生成垂直和水平方向的投影强度(平均值):
image front := GetFrontImage()
number sx,sy
front.GetSize(sx,sy)
image vProj := RealImage( "Vertical", 4, sx )
vProj[icol,0] += front
vProj *= 1/sy
vProj.ShowImage()
image hProj := RealImage( "Horizontal", 4, sy )
hProj[irow,0] += front
hProj *= 1/sx
hProj.ShowImage()
如何通过编码创建垂直线强度分布图(线投影)?
下面显示的代码从图像生成水平线强度剖面。
是否有任何代码可以获取垂直线强度分布图?
(或者我们应该先旋转图像,然后再水平旋转?)
而且,我知道“half Minor”是生成强度分布的线的长度,但我不知道“1”是什么意思?
而且,有没有数字或字符尊重行的宽度?
另外,下面代码生成的线强曲线无法显示为“home display”,Y坐标起点不为0,请问是什么原因?
line_projection := CreateFloatImage ( "line projection", halfMinor, 1 )
line_projection = 0
line_projection[icol,0] += imgFlat
line_projection /= samples
一般提示:
When you are unsure about the meaning of parameters in a command, try typing the command in a separate script but with incorrect parameters. You get an error, but the results-window gives you the full signature with often more meaningful parameter names.
如果您使用 CreateFloatImage
执行此操作,您将获得:
RealImage createfloatimage( String title, RealNumber width, RealNumber height )
如您所见,第二个参数指定了二维图像的高度,因此您的脚本代码创建了一个尺寸为 [halfMinor x 1] 的二维图像。
投影:
以下脚本生成垂直和水平方向的投影强度(平均值):
image front := GetFrontImage()
number sx,sy
front.GetSize(sx,sy)
image vProj := RealImage( "Vertical", 4, sx )
vProj[icol,0] += front
vProj *= 1/sy
vProj.ShowImage()
image hProj := RealImage( "Horizontal", 4, sy )
hProj[irow,0] += front
hProj *= 1/sx
hProj.ShowImage()