Reading system, reading method, program, storage medium, and mobile object
By introducing the design of the extraction unit, the thin liner, the setting unit and the recognition unit in the reading system, the problem of low character reading accuracy in segmented displays is solved, and high-precision recognition of characters is achieved.
Patent Information
- Application Number
- CN201980060157.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-11-16
- Filing Date
- 2019-09-24
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2039-09-24
AI Technical Summary
The prior art is difficult to improve the reading accuracy of characters displayed in segment displays.
A reading system is designed, including an extraction unit, a thin liner, a setting unit and an identification unit. The system extracts part of the image from the input image, performs fine-line processing, and sets a plurality of determination areas in the image to identify characters by detecting the number of pixels in the determination area.
Through the thinning process and the setting of multiple determination areas, characters displayed in the segment display can be recognized with high accuracy regardless of the thickness of the characters.
Smart Images

Figure CN112703507B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to a reading system, a reading method, a program, a storage medium, and a mobile object. Background Art
[0002] There is a system for reading characters (such as numbers) displayed on a segment display. In this system, it is desired that the accuracy of reading characters is high.
[0003] Prior art literature
[0004] Patent Literature
[0005] Patent Document 1: Japanese Patent Application Publication No. 2016-177655 Summary of the invention
[0006] Technical problem to be solved by the invention
[0007] The technical problem to be solved by the present invention is to provide a reading system, a reading method, a program, a storage medium and a mobile body capable of improving the reading accuracy of characters displayed on a segment display.
[0008] Means for solving technical problems
[0009] The reading system of the embodiment includes a processing device. The processing device includes an extraction unit, a thinning unit, a setting unit, and a recognition unit. The extraction unit extracts a partial image from an input image, the partial image being an image of a character of a segment display including a plurality of segments. The thinning unit thins a set of pixels representing the character in the partial image. The setting unit sets a plurality of determination areas corresponding to the plurality of segments, respectively, in the partial image. The recognition unit detects the number of pixels included in the thinned set in each of the plurality of determination areas, and recognizes the character based on the detection result. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 It is a block diagram showing the structure of the reading system according to the first embodiment.
[0011] Figure 2 It is a diagram illustrating the processing of the reading system according to the first embodiment.
[0012] Figure 3 It is a diagram illustrating the processing of the reading system according to the first embodiment.
[0013] Figure 4 This is a table showing the correspondence between combinations of determination results and numbers.
[0014] Figure 5 It is a diagram illustrating the processing of the reading system according to the first embodiment.
[0015] Figure 6 This is a flowchart showing the processing of the reading system according to the first embodiment.
[0016] Figure 7 It is a schematic diagram illustrating the setting of a segment display and a determination area.
[0017] Figure 8 This is a block diagram showing the configuration of a reading system according to a first modification example of the first embodiment.
[0018] Fig. 9 It is a block diagram showing the structure of a reading system according to a second modification example of the first embodiment.
[0019] Fig.10 It is a block diagram showing the structure of the reading system according to the second embodiment.
[0020] Fig.11 It is a block diagram showing the structure of the reading system according to the third embodiment.
[0021] Fig.12 It is a schematic diagram for explaining the operation of the reading system according to the third embodiment.
[0022] Fig.13 It is a block diagram showing the hardware structure of the reading system according to the embodiment. DETAILED DESCRIPTION
[0023] Hereinafter, each embodiment of the present invention will be described with reference to the drawings. In the present specification and each drawing, the same reference numerals are given to the same elements as those already described, and detailed descriptions thereof are appropriately omitted.
[0024] (First Embodiment)
[0025] Figure 1 It is a block diagram showing the structure of the reading system according to the first embodiment.
[0026] The reading system of the embodiment is used to read characters displayed on a segment display from an image captured of the segment display. In the segment display, one character is displayed by a plurality of segments. The character is displayed by at least a portion of the plurality of segments emitting light and the remaining segments extinguishing light. The reading system of the embodiment recognizes the character from the image.
[0027] The number of segments included in the segment display of the reading object is arbitrary. For example, the segment display of the reading object is a so-called 7-segment display that displays one character by 7 segments. The 7-segment display displays characters (numbers) representing numbers. A 14-segment display or a 16-segment display that displays letters can also be a reading object. Here, the case of reading a number displayed on a 7-segment display by the reading system of the embodiment is mainly described.
[0028] like Figure 1 As shown, the reading system 1 of the first embodiment includes a processing device 10 and a storage device 20. The processing device 10 includes, for example, a receiving unit 11, a preprocessing unit 12, an extracting unit 13, a thinning unit 14, a setting unit 15, and a recognizing unit 16.
[0029] Figure 2 (a)~ Figure 2 (d) Figure 3 (a) Figure 3 (b) Figure 5 (a)~ Figure 5 (e) is a diagram illustrating the processing of the reading system according to the first embodiment.
[0030] Figure 4 This is a table showing the correspondence between combinations of determination results and numbers.
[0031] Reference Figures 2 to 5 The processing of the reading system according to the first embodiment will be described.
[0032] An image of a segment display is input to the processing device 10. The receiving unit 11 receives the input image. For example, an external camera captures the segment display to generate an image. The camera sends the image to the processing device 10. Alternatively, the image may be sent from an external storage device to the processing device 10. The receiving unit 11 receives the image sent to the processing device 10. Objects other than the segment display may also be reflected in the image. Here, the image received by the receiving unit 11 is referred to as an input image.
[0033] Figure 2 (a) is an example of an input image A sent to the processing device 10. Figure 2 In the example (a) of FIG. 1 , a plurality of numbers are displayed on a segment display. Each number is displayed by a plurality of segments.
[0034] The preprocessing unit 12 performs preprocessing on the input image before recognizing the digits displayed on the segment display. The preprocessing can improve the accuracy of digit recognition. For example, the preprocessing unit 12 includes a binarization unit 12a, an expansion processing unit 12b, and a contraction processing unit 12c.
[0035] The binarization unit 12a binarizes the input image. The binarized input image is expressed by two different colors (a first color and a second color). Here, the case where the first color is white and the second color is black is described.
[0036] For example, the background of a segment display is dark. The illuminated segments are brighter than the background. Therefore, in the binarized input image, the illuminated segments are represented by white. The extinguished segments and the background are represented by black. That is, in the binarized input image, numbers are represented by white pixels.
[0037] Alternatively, in a segment display using a liquid crystal display, characters are represented by a color darker than the background. In this case, the color of each pixel in the binarized input image is inverted. By inverting it, a number is represented by a white pixel as in the above case. The following describes a case where a lighted segment is represented by white and an unlit segment and the background are represented by black.
[0038] For example, the input image is converted into an RGB color model represented by the three primary colors of red, green, and blue. In the binarization process, first, the input image is converted into data represented by the HSV color space consisting of three components: hue, saturation, and value. Next, the histogram of the data in the HSV color space is analyzed. Next, a threshold is calculated based on the histogram of each pixel. Based on the threshold and the histogram of each pixel, each pixel is binarized into white and black.
[0039] The expansion processing unit 12b expands the white pixels in the binary image. For example, the expansion processing unit 12b changes the pixels adjacent to the white pixels to white. When the adjacent pixels are originally white, they are not changed. For example, due to the influence of noise, etc., black pixels are sometimes scattered in the part where white pixels gather. Through the expansion processing, the scattered black pixels are changed to white pixels. In this way, the influence of noise, etc. can be reduced, and the reading accuracy of the numbers can be improved. Through the expansion processing, the sets of close white pixels can be connected to each other. By connecting the sets of close white pixels to each other, a set of pixels corresponding to one number is generated. As a result, the extraction of the partial image described later becomes easy.
[0040] The contraction processing unit 12c contracts white pixels in the binary image. For example, the contraction processing unit 12c changes pixels adjacent to black pixels to black. If the adjacent pixels are originally black, they are not changed. Through the contraction processing, the number of expanded white pixels is reduced.
[0041] Figure 2(b) is an example of input image A after preprocessing (binarization, dilation and contraction). Figure 2 As shown in (b), through these preprocessing, a set of white pixels corresponding to each number is generated.
[0042] The preprocessing unit 12 may also perform the above-mentioned expansion process and contraction process multiple times. For example, the preprocessing unit 12 may perform the contraction process more than two times after performing the expansion process more than two times. The preprocessing unit 12 may also perform the expansion process more than two times after performing the contraction process more than two times. For example, the number of executions of the expansion process and the number of executions of the contraction process are set to be the same. Alternatively, the number of executions of the expansion process may be different from the number of executions of the contraction process. For example, the number of executions of the expansion process is set to be greater than the number of executions of the contraction process.
[0043] The pre-processing unit 12 may perform a processing group including one expansion processing and one contraction processing multiple times. In one processing group, after performing one of the expansion processing and the contraction processing, the other is performed. The order of the expansion processing and the contraction processing in one processing group may be different from the order of the expansion processing and the contraction processing in other processing groups.
[0044] The preprocessing unit 12 may further perform other processing. For example, when the input image includes an object other than the segment display, the preprocessing unit 12 may cut out the portion where the segment display is captured from the input image. When the input image is distorted, the preprocessing unit 12 may correct the distortion.
[0045] The preprocessing unit 12 outputs the processed input image to the extracting unit 13. The extracting unit 13 extracts a partial image from the input image. The partial image is a part of the input image, including a part where the numerals of the segment display are captured.
[0046] For example, the extraction unit 13 includes a labeling unit 13a and a cutting unit 13b. The input image after binarization is output from the preprocessing unit 12 to the extraction unit 13. The labeling unit 13a assigns a label (value) to a set of white pixels. "A set of white pixels" refers to a portion where white pixels are adjacent to each other and form a white block. In the set of white pixels, a certain white pixel is adjacent to at least one white pixel. One set of white pixels corresponds to one number displayed on the segment display. When there are multiple sets of white pixels, the labeling unit 13a assigns a label to each set of white pixels.
[0047] The cutting unit 13b cuts out a portion including a marked set from the input image. The cut portion becomes a partial image. When there are multiple marked sets, the cutting unit 13b cuts out multiple partial images. The multiple partial images respectively include multiple marked sets. For example, the partial image is a quadrilateral. The partial image includes multiple pixels arranged in a first direction and a second direction intersecting the first direction. For example, the partial image is cut out in a manner such that each side is connected to the outer edge of the set and the area (number of pixels) is minimized.
[0048] Figure 2 (c) shows the input image A and the partial images B1 to B4 cut out by the cutout unit 13b. The sides of the partial images B1 to B4 are in contact with the outer edge of the set of white pixels. Therefore, the size of each partial image varies according to the size of the set.
[0049] The extraction unit 13 outputs the extracted (cut) partial image to the line thinning unit 14. The line thinning unit 14 performs line thinning processing on the partial image. That is, the line thinning unit 14 processes a set of white pixels included in the partial image so that the line width becomes 1 pixel.
[0050] Figure 2 (d) means Figure 2 The result of thinning the partial images B1 to B4 shown in (c). Figure 2 In the state of (c), the side of the partial image is in contact with the outer edge of the group of white pixels. By performing line thinning, the group of white pixels is separated from the side of the partial images B1 to B4.
[0051] The thinning unit 14 may also thin the binary image output from the preprocessing unit 12. For example, if the cutting unit 13b cuts out a portion of the image, it saves the cutout position. The thinning unit 14 outputs the thinned binary image to the extraction unit 13. The cutting unit 13b cuts out a portion of the thinned binary image at the saved cutout position. Thus, Figure 2 (d) shows the thinned portion of the image.
[0052] The setting unit 15 sets a plurality of determination areas in the thinned partial image. The number of determination areas set only needs to be greater than the number of segments used in the display of one character. For example, the number of determination areas set is the same as the number of segments used to display one number. For example, in the case of reading a number displayed on a 7-segment display, seven determination areas are set in one partial image. The position of each determination area is determined based on the size of the extracted partial image. For example, the storage device 20 stores information related to the set position of the determination area. The setting unit 15 determines the position of the determination area based on the information stored in the storage device 20 and the size of the partial image.
[0053] Figure 3 (a) is a schematic diagram for explaining a method of setting a determination area. Figure 3 The partial image C shown in (a) is composed of a plurality of pixels P. Determination areas DR1 to DR7 are set in the partial image C. Determination areas DR1 and DR2 are arranged along the first direction D1. Determination areas DR3 and DR4 are arranged along the first direction D1. Determination areas DR1 and DR2 are separated from determination areas DR3 and DR4 in the second direction D2. Determination areas DR5 to DR7 are arranged along the second direction D2.
[0054] like Figure 3 Like the determination areas DR5 to DR7 shown in (a), the arrangement direction of a part of the determination areas may not be parallel to the second direction D2 but may be inclined relative to the second direction D2. For example, the angle between the arrangement direction of a part of the determination areas and the second direction D2 is set to be greater than 0 degrees and less than 20 degrees. Similarly, the arrangement direction of another part of the determination areas may be inclined relative to the first direction D1. For example, the angle between the arrangement direction of another part of the determination areas and the first direction D1 is set to be greater than 0 degrees and less than 20 degrees. Such an arrangement is also included in the case where multiple determination areas are arranged along the first direction D1 or the second direction D2.
[0055] Will Figure 3 The length (number of pixels) of the partial image C shown in (a) in the first direction D1 is set to L1. The length of the partial image B in the second direction D2 is set to L2. The partial image C has a first side S1 to a fourth side S4. The first side S1 and the second side S2 are parallel to the first direction D1. The third side S3 and the fourth side S4 are parallel to the second direction D2.
[0056] For example, the determination areas DR1 and DR2 are set based on the position separated from the first side S1 by L2 / 4. For example, the determination areas DR3 and DR4 are set based on the position separated from the second side S2 by L2 / 4. For example, the determination areas DR5 to DR7 are set based on the middle position of the third side S3 and the fourth side S4. For example, the determination areas DR5 and DR7 are set at positions deviated from the middle position in the first direction D1. For example, the length of each of the determination areas DR5 to DR7 in the second direction D2 is set to L2 / 3. Information related to these reference positions is stored in the storage device 20, for example. The determination area is set not to overlap with other determination areas. Each determination area includes a pixel P at the reference position and pixels P around it. The size of each determination area is set according to the size of the partial image C, for example.
[0057] The position that serves as a reference for setting the determination area relative to the size of the partial image and the size of the determination area relative to the size of the partial image can be appropriately changed according to the segment display to be read, the characteristics of the input image, and the like.
[0058] In this way, the positions of the plurality of determination areas are determined based on the size of the partial image (the length in the first direction and the length in the second direction). The setting unit 15 outputs the set determination area to the recognition unit 16 .
[0059] The recognition unit 16 recognizes the number based on the number of pixels constituting the thinned number in each determination area. For example, the recognition unit 16 includes a determination unit 16a and a comparison unit 16b.
[0060] The determination unit 16a detects the number of pixels included in the thinned set in each determination area. When the light-emitting segment is represented by white, the determination unit 16a detects the number of white pixels in each determination area. The determination unit 16a compares the detected number of pixels with a preset threshold value to determine whether a part of a number exists in each determination area. Specifically, if the detected number of pixels is greater than the threshold value, the determination unit 16a determines that a part of a number exists in the determination area. The threshold value is set to 1, for example.
[0061] The determination unit 16a indicates the determination result in each determination area by, for example, "0" or "1." "0" indicates that a part of a number does not exist in the determination area. "1" indicates that a part of a number exists in the determination area.
[0062] Figure 3 (b) is Figure 2 One of the multiple partial images shown in (d). Figure 3 As shown in (b), the determination areas DR1 to DR7 are set based on the size of the partial image B2. Figure 3 In the example of (b), it is determined that a part of a number exists in the determination areas DR2, DR3, and DR5 to DR7. This result is expressed as "0110111" using 0 and 1, for example.
[0063] The comparison unit 16b refers to the storage device 20. The storage device 20 stores in advance the correspondence between the combination of the determination results in each determination area and the number. Figure 4 The comparison unit 16b searches for a combination of determination results that matches the combination of determination results of the determination unit 16a based on the combination of determination results stored in the storage device 20. The comparison unit 16b recognizes the number corresponding to the combination of determination results that matches as the number shown in the partial image.
[0064] For example, in Figure 3In the example of (b), the combination of the determination results is represented as "0110111". The comparison unit 16b searches for a combination that matches this combination. As a result of the search, the combination of the determination results of the determination unit 16a matches the combination of the determination results corresponding to the number "2". Therefore, the comparison unit 16b recognizes that the number shown in the partial image is "2".
[0065] Furthermore, as long as the combinations of the determination results and the searched combinations are arranged according to the same rule, the form of the combinations of the determination results can be changed as appropriate.
[0066] Figure 5 (a)~ Figure 5 (e) shows a setting example of partial images representing other numbers and a determination area in each partial image. Figure 5 (a)~ Figure 5 As shown in (e), the position and size of the setting area are set according to the size of the partial image.
[0067] When a plurality of partial images are extracted by the extracting unit 13, the setting unit 15 and the recognizing unit 16 set a determination area and recognize a number for each partial image. The recognizing unit 16 outputs the recognized number.
[0068] The processing device 10 outputs information based on the read numbers to an external output device, for example. For example, the information includes the read numbers. The information may also include a result calculated based on the read numbers. The processing device 10 may also calculate other numbers based on multiple read numbers and output the calculation results. The processing device 10 may further output information such as the read time. Alternatively, the processing device 10 may also output a file including the read numbers and the read time information in a specified format such as CSV. The processing device 10 may also use FTP (File Transfer Protocol) to send data to an external server. Alternatively, the processing device 10 may also perform database communication and insert data into an external database server using ODBC (Open Database Connectivity).
[0069] The processing device 10 includes, for example, a processing circuit composed of a central processing unit. The storage device 20 includes, for example, at least one of a hard disk drive (HDD), a network-attached hard disk (NAS), an embedded multimedia card (eMMC), a solid-state drive (SSD), and a solid-state hybrid drive (SSHD). The processing device 10 and the storage device 20 are connected by wire or wirelessly. Alternatively, the processing device 10 and the storage device 20 may also be connected to each other via a network.
[0070] Figure 6This is a flowchart showing the processing of the reading system 1 according to the first embodiment.
[0071] The receiving unit 11 receives the input image sent to the processing device 10 (step St11). The binarization unit 12a binarizes the input image (step St12a). The dilation processing unit 12b dilates the binarized input image (step St12b). The contraction processing unit 12c contracts the binarized and dilated input image (step St12c). The labeling processing unit 13a assigns a label to a set of white pixels included in the input image (step St13a). The cutting unit 13b cuts out a partial image including the labeled set of white pixels from the input image (step St13b). The thinning unit 14 thins the set of white pixels in the input image or the partial image (step St14). The setting unit 15 sets a plurality of determination areas in one partial image (step St15). The determination unit 16a detects the number of pixels included in the thinned set in each determination area. The determination unit 16a determines whether a part of a number exists in each determination area based on the number (step St16a). The comparison unit 16b compares the combination of the determination results of the determination unit 16a with a pre-registered table (step St16b). The comparison unit 16b sets the number corresponding to the combination of the determination results of the determination unit 16a as the number included in the partial image.
[0072] Repeat steps St15 to St16b until i becomes the same as the number of labels. That is, initially, i is set to 0. When the recognition of a number is completed for a set of one white pixel, i is increased by 1. Steps St15 to St16b are repeated while i is less than the number of labels. Therefore, when there are multiple sets of labeled white pixels, the number is recognized for each set. When the recognition of the number is completed for all sets, the number is output (step St16c).
[0073] The effects of the first embodiment will be described with reference to the reading method of the reference example.
[0074] In the reading method of the reference example, the peak of the histogram on a specific line segment is detected from an image of a number on a segment display. Then, based on the number and position of the peak, the number on the segment display is identified. In this reading method, if the thickness (line width) of the number on the segment display is large, it is difficult to correctly detect the peak. The position of the peak varies depending on the font of the number and the size of the image. In the case where the position of the peak is different from the position that serves as a reference, it is difficult to correctly identify the number.
[0075] In the reading system 1 of the first embodiment, when reading characters displayed on a segment display, a thinning process is performed. In the thinning process, a set of pixels representing characters is thinned. Thus, regardless of the thickness of the characters of the segment display in the input image, the width of the set of pixels representing the characters can be made uniform. Therefore, regardless of the thickness of the characters of the segment display, the characters can be recognized with high accuracy.
[0076] In the reading system 1 of the first embodiment, a plurality of determination areas are set in a partial image in which characters of a segment display are photographed. The positions of the plurality of determination areas are determined based on the size of the partial image. Furthermore, the characters of the segment display are identified in each of the plurality of determination areas based on the detection result of the number of pixels representing the characters. By using the detection result of the number of pixels representing the characters, the characters can be identified regardless of the font of the characters. Furthermore, by determining the positions of the plurality of determination areas based on the size of the partial image, the characters can be identified with high accuracy regardless of the size of the partial image.
[0077] In the reading system 1 of the first embodiment, the thinning unit 14 is optional. By combining the thinning process performed by the thinning unit 14 and the setting of multiple determination areas based on the size of the partial image performed by the setting unit 15, characters can be recognized with higher accuracy. The set of pixels representing the characters is thinned so that the line width of the set can be made uniform. Regardless of the thickness of the characters, the characters can be recognized with higher accuracy based on the determination result of the number of pixels.
[0078] Figure 7 (a)~ Figure 7 (d) is a schematic diagram illustrating the setting of a segment display and a determination area.
[0079] The reading system 1 of the first embodiment can also be applied to displays other than the 7-segment display. For example, characters can be read by the same process as the above process also for a 14-segment display or a 16-segment display.
[0080] Figure 7 (a) shows an example of a 14-segment display. In a 14-segment display, one character is displayed by 14 segments. In this case, the setting unit 15 sets 14 or more determination areas for the partial image. The setting unit 15 is, for example, Figure 7 As shown in (b) of FIG. 1 , 14 determination areas DR are set for the partial image C. The storage device 20 stores a table indicating the correspondence between the determination results in the 14 areas and the characters. The determination unit 16a determines whether a part of the character exists in each determination area DR. The comparison unit 16b refers to the table in the storage device 20 and retrieves a number corresponding to the determination result. Thus, the character displayed on the 14-segment display is recognized.
[0081] Figure 7 (c) shows an example of a 16-segment display. In a 16-segment display, one character is displayed by 16 segments. In this case, the setting unit 15 sets 16 or more determination areas for the partial image. The setting unit 15 is, for example, Figure 7 As shown in (d) of FIG. 16 , 16 determination areas DR are set for the partial image C. Thereafter, similarly to the above example, characters displayed on the 16-segment display are recognized based on the determination result of the determination unit 16 a .
[0082] (First Modification)
[0083] Figure 8 This is a block diagram showing the configuration of a reading system according to a first modification example of the first embodiment.
[0084] In the reading system 1a of the first modified example, the extraction unit 13 performs cutting before preprocessing. For example, the cutting position in the input image is pre-stored in the storage device 20. The cutting unit 13b accesses the storage device 20 and refers to the stored cutting position. The cutting unit 13b cuts out a part of the input image at the cutting position. The extraction unit 13 sends the cut-out part of the input image to the preprocessing unit 12 as a partial image.
[0085] In the preprocessing unit 12, the partial image is binarized by the binarization unit 12a. The preprocessing unit 12 sends the binarized input image to the line thinning unit 14. In the preprocessing unit 12, the binarized input image may be dilated or contracted.
[0086] In the reading system 1a of the first variant, characters displayed on the segment display can also be read with higher accuracy. According to the reading system 1a, marking processing becomes unnecessary. In the case where marking processing is used in the extraction of partial images, if a set of white pixels representing one character is divided into two or more, the divided sets are respectively extracted as partial images. Therefore, the numbers displayed on the segment display cannot be correctly read. If marking processing is not required, the two or more divided sets can be extracted as partial images for identifying one character.
[0087] However, if a portion of the input image is cut out at a predetermined cut-out position, there is a possibility that a portion of the character is cut off or the character becomes smaller in the partial image. Figure 1 Extraction of partial images using labeling as shown is preferred.
[0088] (Second Modification)
[0089] Fig. 9It is a block diagram showing the structure of a reading system according to a second modification example of the first embodiment.
[0090] In the reading system 1b of the second variant, the preprocessing unit 12 includes a threshold calculation unit 12d and a pixel extraction unit 12e. The threshold calculation unit 12d calculates the threshold based on the input image. For example, the storage device 20 stores the formula for calculating the threshold. The threshold calculation unit 12d accesses the storage device 20 and refers to the formula. The threshold calculation unit 12d calculates the adaptive threshold. That is, the threshold calculation unit 12d calculates the threshold for one pixel using the brightness or luminance of the pixel and the formula. The threshold calculation unit 12d calculates the threshold of each pixel and sends it to the pixel extraction unit 12e.
[0091] The pixel extraction unit 12e compares the brightness or luminance of each pixel constituting the input image with a threshold value. For example, the pixel extraction unit 12e extracts only pixels whose brightness or luminance is above the threshold value. Thus, for example, only the portion of the lit segment is extracted. That is, only pixels representing numbers are extracted. For example, points where pixels are not extracted are set to black. The pixel extraction unit 12e sends the processed input image to the extraction unit 13.
[0092] After the extraction unit 13, the execution Figure 1 Alternatively, the same processing as that of the reading system 1 shown in FIG. 1a may be performed in the extraction unit 13 of the reading system 1b. Figure 8 The extraction unit 13 of the reading system 1a shown in the figure performs the same process.
[0093] (Second Embodiment)
[0094] Fig.10 It is a block diagram showing the configuration of a reading system according to the second embodiment.
[0095] The reading system 2 of the second embodiment further includes an imaging device 30. The imaging device 30 captures the segment display and generates an image. The imaging device 30 sends the generated image to the processing device 10. Alternatively, the imaging device 30 may store the image in the storage device 20. The processing device 10 accesses the storage device 20 and refers to the stored image. When the imaging device 30 obtains a dynamic image, the imaging device 30 extracts a static image from the dynamic image and sends it to the processing device 10. The imaging device 30 includes, for example, a camera.
[0096] The processing device 10 transmits information based on the recognized and read characters to the output device 40. The output device 40 outputs the information received from the processing device 10 in a manner recognizable to the user. The output device 40 includes, for example, at least one of a monitor, a printer, and a speaker.
[0097] The processing device 10, the storage device 20, the camera device 30, and the output device 40 are connected to each other, for example, by wire or wireless. Alternatively, they may be connected to each other via a network. Alternatively, at least two of the processing device 10, the storage device 20, the camera device 30, and the output device 40 may be assembled into one device. For example, the processing device 10 may be assembled integrally with the image processing unit of the camera device 30.
[0098] (Third Embodiment)
[0099] Fig.11 It is a block diagram showing the structure of the reading system according to the third embodiment.
[0100] The reading system 3 of the third embodiment further includes a moving body 50. The moving body 50 moves within a specified area. A segment display is provided in the area where the moving body 50 moves. The moving body 50 is, for example, an unmanned guided vehicle (AGV). The moving body 50 may also be a flying object such as a drone. The moving body 50 may also be an autonomous walking robot. The moving body 50 may also be a forklift, a crane, etc. that performs specified operations in an unmanned manner.
[0101] For example, the processing device 10 and the imaging device 30 are mounted on the mobile body 50. The processing device 10 may be provided separately from the mobile body 50 and connected to the mobile body 50 via a network. When the mobile body 50 moves to a position where the segment display can be imaged, the imaging device 30 images the segment display to generate an image.
[0102] like Fig.11 As shown, the reading system 3 may further include an acquisition device 60. The acquisition device 60 is mounted on the mobile body 50. For example, an identifier having unique identification information is provided corresponding to a segment display. The acquisition device 60 acquires the identification information of the identifier.
[0103] like Fig.11 As shown, the reading system 3 may also include a control device 70. The control device 70 controls the moving body 50. The moving body 50 moves within a predetermined area based on a command sent from the control device 70. The control device 70 may be mounted on the moving body 50 or may be provided separately from the moving body 50. The control device 70 includes, for example, a processing circuit composed of a central processing unit. One processing circuit may also function as both the processing device 10 and the control device 70.
[0104] For example, the identifier is a radio frequency (RF) tag having ID information. The identifier emits an electromagnetic field or radio wave containing the ID information. The acquisition device 60 receives the electromagnetic field or radio wave emitted from the identifier and acquires the ID information.
[0105] Alternatively, the identifier may be a one-dimensional or two-dimensional barcode. The acquisition device 60 is a barcode reader. The acquisition device 60 acquires the identification information of the barcode by reading the barcode.
[0106] like Fig.11 As shown, the processing device 10 may further include an associating unit 17. For example, when the acquiring device 60 acquires the identification information, it sends it to the processing device 10. The associating unit 17 associates the sent identification information with the read character and stores it in the storage device 20.
[0107] Fig.12 It is a schematic diagram for explaining the operation of the reading system according to the third embodiment.
[0108] For example, the moving body 50 moves along a predetermined track T. The moving body 50 is equipped with the imaging device 30 and the acquisition device 60. The processing device 10 may be mounted on the moving body 50 or may be provided separately from the moving body 50. The track T is provided so that the moving body 50 passes between the segment displays SD1 and SD2.
[0109] For example, when the moving body 50 moves along the track T and reaches a position where the segment display SD1 or SD2 can be photographed by the camera device 30, it decelerates or stops. For example, when the moving body 50 decelerates or stops, a command to photograph is sent to the camera device 30. Alternatively, a command to photograph may be sent from the control device 70 to the camera device 30. When receiving the command, the camera device 30 photographs the segment display SD1 or SD2 while the moving body 50 decelerates or stops.
[0110] Alternatively, the moving body 50 moves along the track T at a speed such that the camera device 30 can capture the segment display SD1 or SD2 without shaking. When the moving body 50 reaches a position where the camera device 30 can capture the segment display SD1 or SD2, a command for capturing images is sent from the moving body 50 or the control device. Upon receiving the command, the camera device 30 captures the segment display SD1 or SD2. When the camera device 30 captures and generates an image, it sends the image to the processing device 10 mounted on the moving body 50 or provided separately from the moving body 50.
[0111] The identifier ID1 is provided near the segment display SD1. The identifier ID2 is provided near the segment display SD2. For example, the acquisition device 60 acquires the identification information of the identifier ID1 or ID2 while the moving body 50 is decelerating or stopped.
[0112] For example, the moving body 50 moves in front of the segment display SD1. The camera 30 captures the segment display SD1 to generate an image. The processing device 10 recognizes characters displayed on the segment display SD1 from the image. The acquisition device 60 acquires identification information of the identification body ID1 corresponding to the segment display SD1. The processing device 10 associates the recognized characters with the identification information.
[0113] Alternatively, before the mobile body 50 moves to the segment display, the identification information of the identification body may be first obtained by the acquisition device 60. For example, an instruction is sent to the mobile body 50 to read the characters of a specific segment display. The instruction includes information indicating the position of the segment display. In the storage device 20, each piece of identification information and the position of each identification body are stored in association. When the acquisition device 60 acquires the identification information, the mobile body 50 accesses the storage device 20. The mobile body 50 refers to the position of the identification body associated with the identification information. The mobile body 50 determines whether the position of the referenced identification body is consistent with the position of the segment display to which the instruction to read the characters is issued. In the case of consistency, the mobile body 50 captures the segment display SD1 through the camera device 30. That is, in this method, the reading of the identification information functions as an interlock when reading the characters of the segment display.
[0114] Fig.13 It is a block diagram showing the hardware configuration of the reading system according to the embodiment.
[0115] For example, the processing device 10 of the reading systems 1, 1a, 1b, 2 and 3 is a computer having a ROM (Read Only Memory) 10a, a RAM (Random Access Memory) 10b, a CPU (Central Processing Unit) 10c and a HDD (Hard Disk Drive) 10d.
[0116] The ROM 10 a stores a program for controlling the operation of the computer. The ROM 10 a stores a program necessary for the computer to function as the control unit 10 .
[0117] RAM10b functions as a storage area for expanding the program stored in ROM10a. CPU10c includes a processing circuit. CPU10c reads the control program stored in ROM10a and controls the operation of the computer according to the control program. CPU10c expands various data obtained by the operation of the computer in RAM10b. HDD10d stores information required for reading and information obtained during reading. HDD10d can be used as Figure 1 The storage device 20 shown is functional.
[0118] The control unit 10 may include an eMMC (embedded Multi Media Card), an SSD (Solid State Drive), an SSHD (Solid State Hybrid Drive), or the like instead of the HDD 10 d.
[0119] The control unit 10 may also be connected to an input device 10e and an output device 10f. The input device 10e is used by the user to input information to the control unit 10. The input device 10e includes at least one of a microphone, a keyboard, a mouse (sound input), and a touch panel. Information sent from the control unit 10 is output to the output device 10f. The output device 10f includes at least one of a monitor, a speaker, a printer, and a projector. A device having the functions of both the input device 10e and the output device 10f, such as a touch panel, may also be used.
[0120] The control device 70 in the reading system 3 can also be applied with Fig.13 Alternatively, in the reading system 3, one computer may function as the processing device 10 and the control device 70. The processing and functions of the processing device 10 and the control device 70 may be realized by the cooperation of more computers.
[0121] By using the reading system, reading method and moving body of the above-described embodiment, it is possible to read numbers displayed on a segment display with higher accuracy. Similarly, by using a program for causing a computer to operate as a reading system, it is possible to cause the computer to read numbers displayed on a segment display with higher accuracy.
[0122] The processing of the above-mentioned various data is performed based on, for example, a program (software). For example, a computer stores the program and reads the program to perform the processing of the above-mentioned various information.
[0123] The processing of the above-mentioned various information can also be recorded as a program that can be executed by a computer and recorded on a disk (floppy disk and hard disk, etc.), an optical disk (CD-ROM, CD-R, CD-RW, DVD-ROM, DVD±R, DVD±RW, etc.), a semiconductor memory or other recording media.
[0124] For example, the information recorded in the recording medium can be read by a computer (or embedded system). In the recording medium, the recording format (storage format) is arbitrary. For example, the computer reads out a program from the recording medium and causes the CPU to execute instructions recorded in the program based on the program. In the computer, the acquisition (or reading) of the program can also be performed through a network.
[0125] The processing device and control device of the embodiment include one or more devices (for example, a personal computer, etc.) The processing device and control device of the embodiment may include a plurality of devices connected via a network.
[0126] Several embodiments of the present invention are illustrated above, but these embodiments are presented as examples and are not intended to limit the scope of the invention. These new embodiments can be implemented in various other ways, and various omissions, substitutions, changes, etc. can be made without departing from the scope of the main purpose of the invention. These embodiments and their modifications are included in the scope or main purpose of the invention, and are included in the invention described in the claims and the scope of their equivalents. The aforementioned embodiments can be implemented in combination with each other.
Claims
1. A reading system, comprising a processing device, the processing device comprising: a receiving unit receiving an input image, the input image showing a segment display including a plurality of segments and displaying characters through at least a part of the plurality of segments; A preprocessing unit, performing preprocessing on the input image, wherein the preprocessing includes binarizing the input image and representing the input image with a first color and a second color; an extraction unit, which assigns a value to a set of pixels of the first color for the binarized input image, cuts out the set from the input image, and thereby extracts a partial image representing the character, wherein the partial image is a quadrilateral image consisting of a plurality of pixels arranged in a first direction and in a second direction intersecting the first direction; and a thinning unit, which thins the set of pixels representing the character in the partial image; A setting unit, which sets a plurality of determination areas corresponding to the plurality of segments in the partial image, and sets a part of the plurality of determination areas to be arranged along the first direction and another part of the plurality of determination areas to be arranged along the second direction, wherein the number of the plurality of determination areas is the same as the number of the segments used in the segment display when displaying one character; and a recognition unit, which detects the number of pixels included in the thinned set in each of the plurality of determination areas and recognizes the character based on the detection result.
2. The reading system according to claim 1, wherein: The setting unit determines the positions of the plurality of determination areas based on the size of the partial image.
3. A reading system, comprising a processing device, the processing device comprising: a receiving unit receiving an input image, the input image showing a segment display including a plurality of segments and displaying characters through at least a part of the plurality of segments; A preprocessing unit, performing preprocessing on the input image, wherein the preprocessing includes binarizing the input image and representing the input image with a first color and a second color; an extracting unit, which assigns a value to a set of pixels of the first color for the binarized input image, cuts out the set from the input image, and thereby extracts a partial image representing the character, wherein the partial image is a quadrilateral image consisting of a plurality of pixels arranged in a first direction and in a second direction intersecting the first direction; a setting unit that sets a plurality of determination areas corresponding to the plurality of segments, respectively, in the partial image, and sets a part of the plurality of determination areas to be arranged along the first direction, and sets another part of the plurality of determination areas to be arranged along the second direction, the number of the plurality of determination areas being the same as the number of the plurality of segments used when displaying one character in the segment display, and the positions of the plurality of determination areas being determined based on the size of the partial image; and a recognition unit that determines the number of pixels representing the character in each of the plurality of determination areas and recognizes the character based on the determination result.
4. The reading system according to claim 3, wherein: The processing device also includes a thinning unit that thins a set of pixels representing the character in the partial image, and the recognition unit recognizes the character based on the judgment result of the number of the thinned pixels in each of the multiple judgment areas.
5. The reading system according to claim 4, wherein: The multiple determination areas include: a first determination area and a second determination area, which are arranged along the first direction and each extends in the first direction; a third determination area and a fourth determination area, which are separated from the first determination area and the second determination area in the second direction, arranged along the first direction, and each extends in the first direction; and a fifth determination area, a sixth determination area, and a seventh determination area, which are arranged along the second direction and each extends in the second direction.
6. The reading system according to any one of claims 1 to 5, wherein: The extraction unit assigns a label to the set of pixels of the first color and cuts out the set assigned the label, thereby extracting the partial image from the input image.
7. The reading system according to claim 6, wherein: The preprocessing further includes the following processing: a processing of changing pixels adjacent to pixels of the first color in the input image to the first color, and a processing of changing pixels adjacent to pixels of the second color in the input image to the second color.
8. The reading system according to any one of claims 1 to 5, wherein: An imaging device is further provided, the imaging device capturing an image of the segment display and generating the input image.
9. The reading system according to claim 8, wherein: The camera device captures a dynamic image and extracts the input image on which the segment display is reflected from the dynamic image.
10. The reading system according to claim 8, wherein: The device further includes a moving body that carries the imaging device and moves within a predetermined area.
11. The reading system according to claim 10, wherein: The mobile object is an unmanned transport device, a drone or a robot.
12. The reading system according to claim 10, wherein: The moving body decelerates or stops at a position where the image pickup device can capture an image of the segment display, and the image pickup device captures an image of the segment display while the moving body is decelerating or stopping.
13. The reading system according to any one of claims 1 to 5, wherein: The processor further comprises an acquisition device for acquiring the identification information from an identifier having unique identification information and transmitting the identification information to the processing device. The processing device further comprises an association unit for associating the identification information with the recognized character.
14. The reading system according to claim 13, wherein: The device further includes a moving body that moves in a predetermined area where the segment display and the identification body are installed and that carries the acquisition device.
15. The reading system according to any one of claims 1 to 5, wherein: An output device is also included, and the processing device sends information based on the recognized and read characters to the output device, and the output device outputs the information.
16. A reading method, comprising: obtaining an input image, the input image showing a segment display including a plurality of segments and displaying characters by at least a portion of the plurality of segments, performing preprocessing on the input image, the preprocessing including binarizing the input image and representing the input image with a first color and a second color, assigning a value to a set of pixels of the first color for the binarized input image, cutting out the set from the input image, thereby extracting a partial image representing the character, the partial image being a quadrilateral image consisting of a plurality of pixels arranged in a first direction and a second direction intersecting the first direction, thinning the set of pixels representing the character in the partial image, setting a plurality of determination areas corresponding to the plurality of segments in the partial image, setting a portion of the plurality of determination areas to be arranged along the first direction, and setting another portion of the plurality of determination areas to be arranged along the second direction, the number of the plurality of determination areas being the same as the number of the segments used in displaying one character in the segment display, determining the number of pixels included in the thinned set in each of the plurality of determination areas, and recognizing the character based on the determination result.
17. The reading method according to claim 16, wherein: The positions of the plurality of determination areas are determined based on the size of the partial image.
18. A reading method, comprising: obtaining an input image, the input image showing a segment display including a plurality of segments and displaying characters by at least a portion of the plurality of segments, performing preprocessing on the input image, the preprocessing including binarizing the input image and representing the input image with a first color and a second color, assigning a value to a set of pixels of the first color for the binarized input image, cutting out the set from the input image, thereby extracting a partial image representing the character, the partial image being a quadrilateral image consisting of a plurality of pixels arranged in a first direction and a second direction intersecting the first direction, setting a plurality of determination areas corresponding to the plurality of segments respectively in the partial image, setting a portion of the plurality of determination areas to be arranged along the first direction, and setting another portion of the plurality of determination areas to be arranged along the second direction, the number of the plurality of determination areas being the same as the number of the plurality of segments used when displaying one character in the segment display, the positions of the plurality of determination areas being determined based on the size of the partial image, determining the number of pixels representing the character in each of the plurality of determination areas, and recognizing the character based on the determination result.
19. The reading method according to claim 18, wherein: In the extracted partial image, the set of pixels representing the character is thinned, and in each of the plurality of determination areas, the character is recognized based on the determination result of the number of the thinned pixels.
20. The reading method according to claim 19, wherein: The multiple determination areas include: a first determination area and a second determination area, which are arranged along the first direction and each extends in the first direction; a third determination area and a fourth determination area, which are separated from the first determination area and the second determination area in the second direction, arranged along the first direction, and each extends in the first direction; and a fifth determination area, a sixth determination area, and a seventh determination area, which are arranged along the second direction and each extends in the second direction.
21. The reading method according to any one of claims 16 to 20, wherein: A label is assigned to the set of pixels of the first color, and the set assigned with the label is cut out, thereby extracting the partial image from the input image.
22. The reading method according to any one of claims 16 to 20, wherein: The moving body equipped with the imaging device is moved to a region where the segment display is installed, and the input image is acquired by imaging the segment display with the imaging device.
23. A storage medium storing a program for causing a processing device to perform the following processing: receiving an input image, the input image reflecting a segment display including a plurality of segments and displaying characters through at least a portion of the plurality of segments, performing preprocessing on the input image, the preprocessing comprising binarizing the input image and representing the input image with a first color and a second color, assigning a value to a set of pixels of the first color for the binarized input image, cutting out the set from the input image, thereby extracting a partial image representing the character, the partial image being arranged in a first direction and in a second direction intersecting the first direction A quadrilateral image composed of a plurality of pixels in a column, in the partial image, a set of pixels representing the character is thinned, a plurality of determination areas corresponding to the plurality of segments are set in the partial image, a part of the plurality of determination areas is set to be arranged along the first direction, and another part of the plurality of determination areas is set to be arranged along the second direction, the number of the plurality of determination areas is the same as the number of the segments used in the segment display when displaying one character, in each of the plurality of determination areas, the number of pixels included in the thinned set is determined, and the character is recognized based on the determination result.
24. The storage medium according to claim 23, wherein: The processing device determines the positions of the plurality of determination areas based on the size of the partial image.
25. A storage medium storing a program causing a processing device to perform the following processing: receiving an input image, the input image showing a segment display including a plurality of segments and displaying characters by at least a portion of the plurality of segments, performing preprocessing on the input image, the preprocessing including binarizing the input image and representing the input image with a first color and a second color, assigning a value to a set of pixels of the first color for the binarized input image, cutting out the set from the input image, thereby extracting a partial image representing the character, the partial image being a quadrilateral image consisting of a plurality of pixels arranged in a first direction and in a second direction intersecting the first direction, setting a plurality of determination areas corresponding to the plurality of segments, respectively, in the partial image, the positions of the plurality of determination areas being determined based on the size of the partial image, setting a portion of the plurality of determination areas so as to be arranged along the first direction, and setting another portion of the plurality of determination areas so as to be arranged along the second direction, the number of the plurality of determination areas being the same as the number of the plurality of segments used when displaying one character in the segment display, determining the number of pixels representing the character in each of the plurality of determination areas, and recognizing the character based on the determination result.
26. The storage medium according to claim 25, wherein: The processing device is caused to perform the following processing: in the extracted partial image, the set of pixels representing the character is thinned, and in each of the multiple judgment areas, the character is recognized based on the judgment result of the number of the thinned pixels.
27. The storage medium according to claim 26, wherein: The multiple determination areas include: a first determination area and a second determination area, which are arranged along the first direction and each extends in the first direction; a third determination area and a fourth determination area, which are separated from the first determination area and the second determination area in the second direction, arranged along the first direction, and each extends in the first direction; and a fifth determination area, a sixth determination area, and a seventh determination area, which are arranged along the second direction and each extends in the second direction.
28. The storage medium according to any one of claims 23 to 27, wherein: The processing device is caused to perform the following processing: assigning a label to the set of pixels of the first color, cutting out the set assigned the label, and thereby extracting the partial image from the input image.
29. A mobile body that moves within a predetermined area where a segment display including a plurality of segments and displaying characters by at least a part of the plurality of segments is provided, and is equipped with an imaging device, the mobile body comprising a processing device that receives an image of the segment display captured by the imaging device, the processing device comprising: A receiving unit, receiving the input image; A preprocessing unit performs preprocessing on the image, the preprocessing includes binarizing the image and representing the image with a first color and a second color; an extraction unit assigns a value to a set of pixels of the first color for the binarized image, cuts out the set from the image, and thereby extracts a partial image representing the character, wherein the partial image is a quadrilateral image consisting of a plurality of pixels arranged in a first direction and in a second direction intersecting the first direction; a thinning unit thins the set of pixels representing the character in the partial image; A setting unit, which sets a plurality of determination areas corresponding to the plurality of segments in the partial image, and sets a part of the plurality of determination areas to be arranged along the first direction and another part of the plurality of determination areas to be arranged along the second direction, wherein the number of the plurality of determination areas is the same as the number of the segments used in the segment display when displaying one character; and a recognition unit, which detects the number of pixels included in the thinned set in each of the plurality of determination areas and recognizes the character based on the detection result.
30. A mobile body that moves within a predetermined area where a segment display including a plurality of segments and displaying characters by at least a part of the plurality of segments is provided, and is equipped with an imaging device, the mobile body comprising a processing device that receives an image of the segment display captured by the imaging device, the processing device comprising: A receiving unit, receiving the input image; A preprocessing unit performs preprocessing on the image, the preprocessing includes binarizing the image and representing the image with a first color and a second color; an extraction unit assigns a value to a set of pixels of the first color for the binarized image, cuts out the set from the image, and thereby extracts a partial image representing the character, wherein the partial image is a quadrilateral image consisting of a plurality of pixels arranged in a first direction and a second direction intersecting the first direction; a setting unit that sets a plurality of determination areas corresponding to the plurality of segments, respectively, in the partial image, and sets a part of the plurality of determination areas to be arranged along the first direction, and sets another part of the plurality of determination areas to be arranged along the second direction, the number of the plurality of determination areas being the same as the number of the plurality of segments used when displaying one character in the segment display, and the positions of the plurality of determination areas being determined based on the size of the partial image; and a recognition unit that determines the number of pixels representing the character in each of the plurality of determination areas and recognizes the character based on the determination result.
31. The mobile body according to claim 30, wherein: The processing device also includes a thinning unit that thins a set of pixels representing the character in the partial image, and the recognition unit recognizes the character based on the judgment result of the number of the thinned pixels in each of the multiple judgment areas.
32. The mobile body according to claim 31, wherein: The multiple determination areas include: a first determination area and a second determination area, which are arranged along the first direction and each extends in the first direction; a third determination area and a fourth determination area, which are separated from the first determination area and the second determination area in the second direction, arranged along the first direction, and each extends in the first direction; and a fifth determination area, a sixth determination area, and a seventh determination area, which are arranged along the second direction and each extends in the second direction.
33. The moving body according to any one of claims 29 to 32, wherein: The extraction unit assigns a label to the set of pixels of the first color and cuts out the set assigned the label, thereby extracting the partial image from the input image.
34. The moving body according to any one of claims 29 to 32, wherein: The camera device captures a dynamic image and extracts the input image on which the segment display is reflected from the dynamic image.
35. The moving body according to any one of claims 29 to 32, wherein: The invention further includes a control device that controls the moving body and the camera device. When the moving body moves to a position where the camera device can capture the image of the segment display, the control device causes the camera device to capture the image of the segment display.
Citation Information
Patent Citations
Date identification device
JP2016177655A
Text region detection system and method
US20120224765A1
Image processing apparatus, method, and storage medium
US20150181077A1
Computer Implemented System and Method for Extracting and Recognizing Alphanumeric Characters from Traffic Signs
US20160224851A1
Method and apparatus for extracting and processing price text from an image set
US20180315065A1