一 椭圆
方差的概念:
例1 两人的5次测验成绩如下:X: 50,100,100,60,50 E(X)=72;Y: 73, 70, 75,72,70 E(Y)=72。平均成绩相同,但X 不稳定,对平均值的偏离大。方差描述随机变量对于数学期望的偏离程度.
方差公式:
平均数:
在这里插入代码片
read_image(Image,'progres')
get_image_size(Image,Width,Height)
dev_close_window()
dev_open_window(0,0,Width,Height, 'black', WindowHandle)
dev_display(Image)
dev_set_color('red')
dev_set_draw('margin')
gen_rectangle1(Rectangle,260,90,360,350)
reduce_domain(Image,Rectangle,ImageReduced)
threshold(ImageReduced,Dark,0,150)
connection(Dark,ConnectedRegions)
select_shape(ConnectedRegions,SelectedRegions,'area','and',10,100)
elliptic_axis(SelectedRegions,Ra,Rb,Phi)
area_center(SelectedRegions,Area,Row, Column)
dev_display(Image)
dev_set_color('green')
dev_display(SelectedRegions)
MeanRadius:=sum(Ra)/|Ra|
VarianceRadius:=sum((Ra-MeanRadius)*(Ra-MeanRadius))/(|Ra|)