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 最新加入

  • hokurikustr

  • refrain

New comments 最新评论

test123: aasdas Details Apr 13 16:39
admin: Thanks! Details Apr 09 11:46
admin: Google map api Details Apr 09 11:46
lqj12: cooooooooool Details Apr 08 21:34
Yunhan Huang: 这个功能是如何实现的? Details Apr 08 13:23