Embodiments described herein relate generally to a reading system, a reading method, and a storage medium.
There is a system that reads a numerical value indicated by a meter. It is desirable for the system to have high accuracy of reading the numerical value.
According to one embodiment, a reading system includes an extractor, a generator, a corrector, and a reader. The extractor extracts a first candidate region from an input image. The first candidate region is of a candidate of a region in which a meter is imaged. The generator generates a rectangle around the first candidate region when an exterior form of the first candidate region is circular. The rectangle corresponds to the exterior form of the first candidate region. The corrector generates a second candidate region by using the generated rectangle to correct the exterior form of the first candidate region to approach a perfect circle. The reader reads, from the second candidate region, a numerical value indicated by the meter.
Various embodiments are described below with reference to the accompanying drawings.
In the specification and drawings, components similar to those described previously or illustrated in an antecedent drawing are marked with like reference numerals, and a detailed description is omitted as appropriate.
The reading system 1 according to the embodiment is used to read a numerical value indicated by a pointer in a meter from an image including the meter. The reading system 1 according to the embodiment is used favorably for a meter including a pointer rotating around a rotation axis, and multiple graduations arranged along a circumferential direction around the rotation axis. In the meter to be read, the multiple graduations may be arranged in a circular or circular arc-like configuration. The meter further includes a display panel on which the multiple graduations are marked, and numerical values marked to correspond to at least a portion of the multiple graduations. Typically, in such a meter, the outer rim, the outer frame, and the like of the display panel are a circle or circular (e.g., an ellipse, an oval, etc.). In the description of the embodiments hereinafter, such a meter is called a round meter.
As illustrated in
The imager 11 acquires a static image by imaging a round meter. The imager 11 outputs the acquired image to the extractor 12. When a video image is imaged by the imager 11, a static image is cut out from the video image and output to the extractor 12. An object other than a round meter may be imaged in the image.
The extractor 12 extracts, from the image that is input, a candidate of a region in which a round meter is imaged. Here, the image that is imaged by the imager 11 and input to the extractor 12 is called the input image. A region that is a portion of the input image and is a candidate of the round meter is called a first candidate region. The first candidate region is a portion of the input image in which the round meter is determined by the extractor 12 to be imaged. Multiple first candidate regions may be output from the extractor 12.
As one specific example, the extractor 12 includes a contour extractor 12a and a selector 12b.
For example, the contour extractor 12a extracts a contour included in the input image based on a brightness difference of the input image. The contour extractor 12a may perform additional processing of the input image as appropriate when extracting the contour. For example, the contour extractor 12a may convert the input image into a grayscale, subsequently binarize the image, and extract a contour of a region illustrated using white from the binary image.
The selector 12b calculates the surface area of the region surrounded with the contour. When multiple contours are extracted, the surface area of each region is calculated. The selector 12b compares each calculated surface area to a prescribed threshold and selects only the regions for which the surface area is not less than the threshold. Thereby, regions that have surface areas that are too small are excluded from the candidates.
The selector 12b detects the shape of the contour. The selector 12b excludes the contour from the candidates when the shape of the contour is not circular or rectangular.
Thereby, a region that includes a circular or rectangular contour and has not less than a prescribed surface area is selected as the first candidate region and output to the generator 13.
The generator 13 determines whether or not the exterior form of the first candidate region is circular or rectangular. When the exterior form of the first candidate region is rectangular, the first candidate region can be corrected (a projective transformation) by utilizing the exterior form. Therefore, for example, the generator 13 outputs the first candidate region as-is to the corrector 14. Circular means a shape such as an ellipse, an egg-like shape, an oval, or the like that is macroscopically rounded.
For example, the round meter may be disposed at a position separated from the imager 11 and may be tilted with respect to the lens surface of the imager 11. In such a case, the outer edge of the round meter in the image is substantially an ellipse. Or, the round meter may be disposed proximately to the imager 11 and tilted with respect to the lens surface of the imager 11. In such a case, the outer edge of the round meter in the image is egg-shaped according to the lens characteristics of the imager 11, etc.
When the exterior form of the first candidate region is circular, the generator 13 detects a rectangle that circumscribes the first candidate region. For example, as illustrated in
Then, the generator 13 extracts graduations S1 of the round meter based on, for example, the luminance difference in the first candidate region A1. Continuing, the generator 13 detects a central region that includes the center of the round meter by performing at least one of the following first method or second method.
In the first method, the generator 13 detects the density of the graduations S1 in each of multiple regions in the first candidate region A1. When the first candidate region A1 is distorted, fluctuation occurs in the density of the graduations S1. Specifically, as in a region B1 and a region B2 illustrated in
In the second method, the generator 13 generates extension lines E1 along the detected graduations S1. Then, as illustrated in
The generator 13 may narrow down the central region C by combining the first method and the second method.
Then, the generator 13 assumes a point O2 in the central region C at a location a distance x from the center point O1 to be the center point of the round meter. The direction of the distance x is the short-side direction of the rectangle R (the short-axis direction of the first candidate region A1). As illustrated in
The distance r1 is the distance between the point O2 and a point e on the outer edge of the first candidate region A1. The point e is the intersection between the outer edge of the first candidate region A1 and a line that is parallel to the short side of the rectangle R and passes through the point O2. The distance r2 is the distance between the point O2 and a point f on the outer edge of the first candidate region A1. The distance r3 is the distance between the point O2 and a point g on the outer edge of the first candidate region A1. The points f and g are at the intersections between the outer edge of the first candidate region A1 and a line that is parallel to the long side of the rectangle R and passes through the point O2.
Based on the distances r1 to r3 and the characteristics of the imager 11, the generator 13 generates a rectangle Q corresponding to the exterior form of the first candidate region A1 around the first candidate region A1. Favorably, the rectangle Q contacts the outer edge of the first candidate region A1. By using the circumscribing rectangle Q to perform a projective transformation described below, the first candidate region A1 can be corrected more accurately (caused to approach a more perfect circle).
An example of a method for generating the circumscribing rectangle Q will now be described. The focal length of the lens of the imager 11 is taken as f. The distance between the imager 11 and the point O2 is taken as SO. For example, the distance SO is calculated based on the focal position of the imager 11. The tilt of the round meter with respect to the optical axis of the imager 11 is taken as θ. The actual radius of the round meter is taken as R.
The following Formula (1) to Formula (3) hold for the distances r1 to r3, the focal length f, the distance SO, the tilt θ, and the radius R.
r1=R·f/SO (1)
r3=f·cos θ·(ln(R sin θ+SO)−ln(SO)) (2)
r2=f·cos θ·(−ln(−R sin θ+SO)+ln(SO)) (3)
The generator 13 calculates the radius R by substituting the focal length f and the distance SO acquired beforehand and the distance r1 in Formula (1). The generator 13 substitutes the radius R and the distance r2 in Formula (2) and substitutes the radius R and the distance r3 in Formula (3). The generator 13 calculates the tilt θ by solving these formulas. A length Le1 of the side between a vertex V1 and a vertex V2 of the rectangle Q is represented by the following Formula (4). A length Le2 of the side between a vertex V3 and a vertex V4 is represented by the following Formula (5).
Le1=f·R/(SO+R sin θ) (4)
Le2=f·R/(SO−R sin θ) (5)
The generator 13 calculates the lengths Le1 and Le2 by substituting the focal length f, the distance SO, the radius R, and the tilt θ in Formula (4) and Formula (5). The generator 13 uses, as the rectangle Q, the rectangle that includes the calculated lengths Le1 and Let and has the smallest surface area. The generator 13 outputs the rectangle Q to the corrector 14.
The corrector 14 performs a projective transformation of the rectangle Q to become a square. Thereby, the exterior form of the first candidate region A1 is corrected to approach a perfect circle; for example, a second candidate region A2 such as that illustrated in
For example, the corrector 14 outputs the generated second candidate region A2 to the reader 15. Or, the corrector 14 may perform the following determination for the second candidate region A2.
For example, the corrector 14 inverts a portion of the outer edge of the second candidate region A2 and overlays the portion and another portion of the outer edge of the second candidate region A2. The corrector 14 calculates the error amount between the portion of the outer edge of the second candidate region A2 and the other portion of the outer edge of the second candidate region A2 that are overlaid and compares the error amount to a preset first threshold.
For example, as illustrated in
Or, the corrector 14 approximates the outer edge of the second candidate region A2 as a circle. The corrector 14 calculates the error amount between the approximated circle and the outer edge of the second candidate region A2 and compares the error amount to the first threshold.
When the error amount is less than the first threshold, the corrector 14 outputs the second candidate region A2 to the reader 15. By performing the determination, only the second candidate regions A2 that are closer to a perfect circle (having a small distortion) can be output to the reader 15.
When the error amount is not less than the first threshold, for example, the reading system 1 ends the processing of reading the generated second candidate region A2 and the first candidate region A1 that is the basis for the generated second candidate region A2. Or, more desirably, the reading system 1 performs the following processing.
When the error amount is not less than the first threshold, the corrector 14 outputs the determination result to the generator 13. When the determination result from the corrector 14 is input, the generator 13 changes the distance x and sets another point O2 within the range of the central region C. The generator 13 generates another rectangle Q based on the other point O2. The corrector 14 generates another second candidate region A2 by using the other rectangle Q to correct the first candidate region A1. The corrector 14 calculates the error amount for the other second candidate region A2.
For example, the generation of the rectangle Q and the generation of the second candidate region A2 described above are repeated until the corrector 14 determines that the error amount is less than the first threshold. When it is determined that the error amount is less than the first threshold, the corrector 14 outputs the other second candidate region A2 to the reader 15.
Or, when the input image is unclear, etc., there is a possibility that no error amount will be less than the first threshold even when multiple others of the second candidate regions A2 are generated. In such a case, for example, the corrector 14 outputs the second candidate region A2 for which the minimum error amount is obtained to the reader 15.
The reader 15 reads the numerical value indicated by the round meter from the second candidate region A2.
Specifically, the reader 15 includes a subdivider 15a, a graduation recognizer 15b, a numeral recognizer 15c, a pointer recognizer 15d, a graduation joiner 15e, and a calculator 15f.
As illustrated in
For example, the subdivider 15a extracts line components from the second candidate region A2, and uses a Hough transform to extract the most circular line component. The region at the outer circumference portion of the extracted circle is used as the scale region F1. Typically, the background of the display panel is a relatively bright color (e.g., white), and the pointer and the numerals are a relatively dark color (e.g., black). Also, the pointer is provided more toward the center of the display panel than are the graduations and the numerals. By utilizing these aspects, the subdivider 15a extracts the numeral region F2 and the pointer region F3 from regions other than the scale region F1.
For example, the graduation recognizer 15b recognizes graduations S2 of the display panel as illustrated in
When the deviation amount is less than the second threshold, the processing continues to read the round meter. By performing the determination recited above, the read processing can be performed for only the display panel regions F having small distortions, and the reading accuracy of the value indicated by the round meter can be increased.
When the deviation amount is not less than the second threshold, for example, the reading system 1 ends the processing of the reading for the display panel region F. Or, more desirably, the reading system 1 performs the following processing.
When the deviation amount is not less than the second threshold, for example, the graduation recognizer 15b outputs the determination result and at least one of the deviation amounts recited above to the generator 13. When the determination result recited above is input, the generator 13 changes the distance x according to the deviation amount and sets another point O2 within the range of the central region C. The generator 13 generates another rectangle Q based on the other point O2. The corrector 14 generates another second candidate region A2 by using the other rectangle Q to correct the first candidate region A1. The graduation recognizer 15b recognizes the graduations S2 based on the other second candidate region A2 and calculates the deviation amount again.
For example, the generation of the rectangle Q, the generation of the second candidate region A2, and the recognition of the graduations S2 described above are repeated until the reader 15 determines that the deviation amount is less than the second threshold. When it is determined that the deviation amount is less than the second threshold, the reader 15 performs the read processing by using the scale region F1, the numeral region F2, and the pointer region F3 based on the display panel region F.
Or, there are cases where no deviation amount will be less than the second threshold even when multiple others of the second candidate regions A2 are generated. In such a case, for example, the reader 15 performs the read processing by using the scale region F1, the numeral region F2, and the pointer region F3 based on the display panel region F for which the minimum deviation amount is obtained.
When the graduation recognizer 15b determines that the deviation amount is less than the second threshold, the numeral recognizer 15c cuts out numerals from the numeral region F2. For example, as illustrated in
As illustrated in
The calculator 15f calculates the numerical value indicated by the pointer based on the position information of the graduations S2, the correspondence information of the graduations S2 and the numerals, and the angle of the pointer. For example, the reader 15 outputs the calculated numerical value to the outside.
The generator 13 may detect the center of the round meter by using the following third method. First, as illustrated in
For example, the generator 13 generates the straight line Lm by using the following method. First, the generator 13 uses the result of the Hough transform to extract one or more line segments having not less than a prescribed length based on the size of the first candidate region A1. Then, the generator 13 extends each of the extracted line segments, and extracts, as the straight line Lm, a straight line that passes through the region estimated to be the center of the circular meter. For example, the region that is estimated to be the center of the circular meter is set to the vicinity of the intersection O1 of the major axis ab and the minor axis cd of the circumscribing rectangle R illustrated in
When straight lines along the pointer I are generated by the method described above, there are cases where two straight lines Lm1 and Lm2 along two ends of the pointer I are generated as illustrated in
The generator 13 generates the rectangle Q by calculating the distances r1 to r3 illustrated in
As illustrated in
Then, a rectangle that circumscribes the first candidate region is generated (step S13), a second candidate region is generated (step S14), and an indicated value is read (step S15). Subsequently, it is determined whether or not another first candidate region exists (step S16). When another first candidate region exists, step S13 is performed for the other first candidate region.
In step S13 as illustrated in
In step S14 as illustrated in
The subdivider 15a extracts the display panel region of the round meter from the second candidate region and subdivides the display panel region into a scale region, a numeral region, and a pointer region (step S15a). The graduation recognizer 15b recognizes the graduations of the display panel (step S15b1). The graduation recognizer 15b calculates a deviation amount for the recognized graduations and compares the deviation amount to the second threshold (step S15b2). When the deviation amount is not less than the second threshold, the flow returns to step S13e, and another virtual center point is set.
The numeral recognizer 15c recognizes numerals from the numeral region (step S15c). The pointer recognizer 15d detects the angle of a pointer included in the pointer region (step S15d). The graduation joiner 15e extracts position information of the graduations and correspondence information of the graduations and the numerals (step S15e). The calculator 15f calculates a value indicated by the round meter from the position information of the graduations, the correspondence information of the graduations and the numerals, and the angle of the pointer (step S15f). Subsequently, it is determined whether or not another first candidate region exists (step S16). When another first candidate region exists, step S13a is performed for the other first candidate region.
Effects of the embodiments will now be described.
In a reading system for reading a numerical value of a round meter, when the round meter is distorted in the input image, for example, the image is corrected by utilizing a rectangular outer frame attached to the round meter. By appropriately correcting the distortion and/or the size of the image, the numerical value that is indicated by the round meter can be read with higher accuracy. However, there are round meters that do not have a rectangular outer frame. In such a case, in a conventional technique, the image cannot be corrected appropriately, and the reading accuracy of the indicated value of the round meter decreases.
For this problem, in the embodiment, the reading system 1 includes the generator 13. When the exterior form of the first candidate region is circular, the generator 13 generates a rectangle around the exterior form. Because the rectangle is generated by the generator 13, the first candidate region can be corrected using the circumscribing rectangle.
Accordingly, according to the embodiment, even when the round meter does not include a rectangular outer frame, the first candidate region can be corrected appropriately, and the numerical value that is indicated by the round meter can be read with higher accuracy.
In the reading system 1, the corrector 14 determines whether or not the first candidate region is corrected appropriately based on the error amount of the second candidate region. By performing the determination, the reading of the indicated value can be performed for an image having less distortion, and the reading accuracy is increased.
In the reading system 1, the reader 15 determines whether or not the first candidate region is corrected appropriately based on the deviation amount of the graduations extracted from the second candidate region. By performing the determination, similarly to the description recited above, the reading of the indicated value can be performed for an image having less distortion, and the reading accuracy is increased.
For example, the reading systems according to the embodiments include a reading device 5 and an imaging device 6 illustrated in
The ROM 51 stores programs controlling the operations of the computer. The ROM 51 stores programs necessary for causing the computer to function as the extractor, the converter, the corrector, the reader, etc., of the embodiments described above.
The RAM 52 functions as a memory region where the programs stored in the ROM 51 are loaded. The CPU 53 reads a control program stored in the ROM 51 and controls the operation of the computer according to the control program. The CPU 53 loads various data obtained by the operation of the computer into the RAM 52. The HDD 54 stores information necessary for reading and information obtained in the reading process.
Instead of the HDD 54, the reading device 5 may include an eMMC (embedded Multi Media Card), a SSD (Solid State Drive), a SSHD (Solid State Hybrid Drive), etc.
The imaging device 6 images the subject (the round meter) and transmits the acquired image to the reading device 5. The imaging device 6 is, for example, a camera.
An output device 7 outputs the data (the indicated value of the round meter that is read) output from the reading device 5 so that the user can recognize the data. The output device 7 is, for example, a monitor, a printer, a speaker, etc.
For example, the reading device 5, the imaging device 6, and the output device 7 are connected to each other by a wired or wireless technique. Or, these devices may be connected to each other via a network. Or, at least two of the reading device 5, the imaging device 6, or the output device 7 may be embedded in one device. For example, the reading device 5 may be embedded in an integral body with an image processor of the imaging device 6, etc.
An embodiment of the invention includes the following program.
A program causing a computer to:
By using the reading systems and the reading methods according to the embodiments described above, a numerical value that is indicated by a meter can be read with higher accuracy. Similarly, a numerical value that is indicated by a meter can be read by a computer with higher accuracy by using a program for causing the computer to operate as the reading system.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions, and changes in the form of the embodiments described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the invention. The above embodiments can be practiced in combination with each other.
Number | Date | Country | Kind |
---|---|---|---|
2018-056702 | Mar 2018 | JP | national |
2018-130053 | Jul 2018 | JP | national |
This is a divisional of U.S. patent application Ser. No. 17/020,282, filed on Sep. 14, 2020 (the entire contents of which are incorporated herein by reference), which is a continuation application of International Patent Application PCT/JP2019/006228, filed on Feb. 20, 2019, which claims priority to Japanese Patent Application No. 2018-056702, filed on Mar. 23, 2018 and Japanese Patent Application No. 2018-130053, filed on Jul. 9, 2018.
Number | Name | Date | Kind |
---|---|---|---|
4680704 | Konicek | Jul 1987 | A |
5673331 | Lewis | Sep 1997 | A |
5870140 | Gillberry | Feb 1999 | A |
8594365 | Derkalousdian | Nov 2013 | B2 |
20050219632 | Maki et al. | Oct 2005 | A1 |
20060045389 | Butterworth | Mar 2006 | A1 |
20060153458 | Butterworth | Jul 2006 | A1 |
20080148877 | Sim | Jun 2008 | A1 |
20100214130 | Weinmann | Aug 2010 | A1 |
20120201423 | Onai et al. | Aug 2012 | A1 |
20150272546 | Cheon | Oct 2015 | A1 |
20160086034 | Kennedy | Mar 2016 | A1 |
20160109263 | Dubs | Apr 2016 | A1 |
20180005044 | Olson | Jan 2018 | A1 |
20180129173 | Kusaka | May 2018 | A1 |
20190095739 | Gao | Mar 2019 | A1 |
20190180487 | Abe | Jun 2019 | A1 |
20200106933 | Lata | Apr 2020 | A1 |
20210012140 | Lin et al. | Jan 2021 | A1 |
Number | Date | Country |
---|---|---|
106529559 | Mar 2017 | CN |
107066998 | Aug 2017 | CN |
108629347 | Oct 2018 | CN |
107490398 | Jul 2019 | CN |
2005-341452 | Dec 2005 | JP |
2006-120133 | May 2006 | JP |
2007-114828 | May 2007 | JP |
2008-243103 | Oct 2008 | JP |
2011-90374 | May 2011 | JP |
5712801 | May 2015 | JP |
2017-126187 | Jul 2017 | JP |
2018-81668 | May 2018 | JP |
2019-169116 | Oct 2019 | JP |
2020-161188 | Oct 2020 | JP |
Entry |
---|
Harsh et al (“HMI-Guard: A Platform for Detecting Errors in Human-Machine Interfaces”, 2017 IEEE International Conference on Systems, Man, and Cybernetics (SMC) Banff Center, Banff, Canada, Oct. 5-8, 2017. (Year: 2017). |
Gellaboina et al (“Analog Dial Gauge Reader for Handheld Devices”, 2013 IEEE 8th Conference on Industrial Electronics and Applications (ICIEA)) (Year: 2013). |
International Search Report dated May 21, 2019 in PCT/JP2019/006228 filed Feb. 20, 2019 (with Engiish Transiation of Categories of Cited Documents). |
Harsh et al (“HM I-Guard: A Platform for Detecting Errors in Human-Machine Interfaces”. Department of Electrical. Computer and Software Engineering University of Ontario Institute of Technology, Oshawa, ON, Canada, Oct. 5-8, 2017). |
Zhang et al (“Research on the Pre-processing Method of Automatic Reading Water Meter System”. 2009 International Conference on Artificial Intelligence and Computational Intelligence). |
Decision to Grant issued May 9, 2024 in Chinese Patent Application No. 201980019593.7, with concise English translation, citing document 15 therein. |
Number | Date | Country | |
---|---|---|---|
20220284690 A1 | Sep 2022 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 17020282 | Sep 2020 | US |
Child | 17749771 | US |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/JP2019/006228 | Feb 2019 | WO |
Child | 17020282 | US |