read_image(Image, 'C:/Users/Administrator/Downloads/scratch.png')
decompose3(Image, Image1, Image2,Image3)
emphasize(Image2,ImageEmphasize, 3, 3, 1)
calculate_lines_gauss_parameters(2, 15, Sigma, Low, High)
lines_gauss(Image2,Lines,Sigma,Low,High,'dark','true', 'bar-shaped', 'true')
select_contours_xld(Lines, SelectedContours, 'contour_length', 10, 200, -0.5, 0.5)
union_adjacent_contours_xld(SelectedContours, UnionContours, 45, 1, 'attr_keep')
select_contours_xld(UnionContours, SelectedContours1, 'contour_length', 0.5, 45, -0.5, 0.5)
gen_region_contour_xld(SelectedContours1, Region, 'margin')
dev_display(Image)
dev_display(Region) |