read_image (Image, 'circular_barcode')
threshold (Image, Region, 0, 100)
closing_circle (Region, RegionClosing, 3.5)
connection (RegionClosing, ConnectedRegions)
select_shape (ConnectedRegions, Ring, ['width','height'], 'and', [550,550], [750,750])
shape_trans (Ring, RegionTrans, 'outer_circle')
complement (Ring, RegionComplement)
connection (RegionComplement, ConnectedRegions1)
select_shape (ConnectedRegions1, InnerCircle, ['width','height'], 'and', [450,450], [650,650])
smallest_circle (InnerCircle, Row, Column, Radius)
smallest_circle (RegionTrans, Row1, Column1, Radius1)
mwidth := Radius1*3.14
mheigh := round(Radius1 - Radius -10)
polar_trans_image_ext (Image, PolarTransImage, Row, Column, rad(360), 0, Radius1-5, Radius+5, mwidth, mheigh, 'bilinear')