read_image (Image11, 'C:/Users/86131/Desktop/11.jpg')
decompose3 (Image11, R, G, B)
trans_from_rgb (R, G, B, H, S, V, 'hsv')
threshold (H, Region, 128, 255)
closing_rectangle1 (Region, RegionClosing, 10, 10)
dilation_circle (RegionClosing, RegionDilation, 3.5)
get_image_size (Image11, Width, Height)
gen_rectangle1 (Rectangle, 0, 0, Height-10, Width-10)
difference (Rectangle, RegionDilation, RegionComplement)
reduce_domain (R, RegionComplement, ImageReduced)
scale_image_max (ImageReduced, ImageScaleMax)
calculate_lines_gauss_parameters (10, 40, Sigma, Low, High)
lines_gauss (ImageScaleMax, Lines, Sigma, Low, High, 'dark', 'true', 'bar-shaped', 'true')
union_collinear_contours_xld (Lines, UnionContours, 200, 1, 5, 0.6, 'attr_keep')
select_shape_xld (UnionContours, SelectedXLD, 'contlength', 'and', 200, 99999)
fit_line_contour_xld (SelectedXLD, 'tukey', -1, 0, 5, 2, RowBegin, ColBegin, RowEnd, ColEnd, Nr, Nc, Dist)
gen_region_line (lin_0, RowBegin[0], ColBegin[0], RowEnd[0], ColEnd[0])
gen_region_line (lin_1, RowBegin[1], ColBegin[1], RowEnd[1], ColEnd[1])
distance_ss (RowBegin[0], ColBegin[0], RowEnd[0], ColEnd[0], RowBegin[1], ColBegin[1], RowEnd[1], ColEnd[1], DistanceMin, DistanceMax)
dev_get_window (WindowHandle)
disp_message (WindowHandle, DistanceMin, 'image', 100, 400, 'red', 'true')
|