Mobile terminal, control method of mobile terminal, and program
The mobile terminal addresses the issue of inaccurate barcode readings due to document frame overlap by using a correction unit to replace non-corresponding code data with correction data, ensuring accurate barcode recognition.
Patent Information
- Application Number
- JP2023159362
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2025-04-04
AI Technical Summary
Conventional technologies fail to correct barcode readings affected by document frames, leading to inaccurate reading when barcodes overlap with the frame.
A mobile terminal with a reading unit and a correction unit that replaces code data in portions not corresponding to the pattern with correction data when specific characters cannot be detected, allowing for estimated patterns to correct the code data.
Enables normal barcode reading by correcting code data using correction data, effectively eliminating the influence of document frames on barcode recognition.
Smart Images

Figure 2025050519000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a mobile terminal, a control method for a mobile terminal, and a program. [Background technology]
[0002] When printing a barcode on a slip or the like, misalignment of the printing position can cause the barcode to overlap the frame of the slip or to be printed close to the frame of the slip, in which case the barcode may not be read accurately due to the influence of the frame of the slip. Furthermore, as a technique for correcting abnormalities in reading of a barcode, for example, Patent Document 1 describes a technique for inferring and correcting a bar that appears to be read as a single bar to be multiple bars. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2000-357205 A Summary of the Invention [Problem to be solved by the invention]
[0004] However, the conventional technology has a problem in that it does not support correction that can eliminate the influence of the frame of the slip, etc. Therefore, the conventional technology cannot read the barcode correctly when the barcode overlaps the frame of the slip, etc.
[0005] Therefore, in order to solve the above problem, the present invention aims to provide a mobile terminal, a control method for a mobile terminal, and a program for performing a predetermined correction process on a code so that the code can be read when the code cannot be read normally. [Means for solving the problem]
[0006] The portable terminal of the present invention is a portable terminal that reads an optically readable code in which a pattern is set for each character in a character string set corresponding to the code, and is equipped with a reading unit that performs a reading process of the code, and a correction unit that, when it is not possible to detect all of the patterns corresponding to a specific character from the code data acquired by the reading process of the code, but is able to detect a pattern corresponding to a part of the pattern from which the character can be estimated, corrects the code data by replacing the part of the code data that does not correspond to the pattern with correction data.
[0007] A control method for a mobile terminal according to the present invention is a control method for a mobile terminal that reads an optically readable code in which a pattern is set for each character in a character string set corresponding to the code, and includes a reading step of performing a reading process of the code, and a correction step of correcting the code data of a portion of the code data that does not correspond to the pattern by replacing the code data with correction data when it is not possible to detect all of the patterns corresponding to a specific character from the code data acquired by the code reading process but a pattern corresponding to a portion of the pattern from which the character can be estimated is detected.
[0008] The program of the present invention causes a computer as a portable terminal that reads an optically readable code in which a pattern is set for each character in a character string set corresponding to the code to function as a correction unit that, when it is not possible to detect all of the patterns corresponding to a specific character from the code data acquired by the code reading process but a pattern corresponding to a part of the pattern from which the character can be estimated is detected, corrects the code data by replacing the part of the code data that does not correspond to the pattern with correction data. Effect of the Invention
[0009] According to the present invention, the code data acquired by the reading process is corrected by replacing the code data in the portion that does not correspond to a pattern from which characters can be estimated with correction data, so that the barcode can be read normally. [Brief description of the drawings]
[0010] [Figure 1] FIG. 2 is a block diagram showing an example of a handheld terminal according to the embodiment; [Diagram 2] FIG. 1 is a diagram showing an example of the overall configuration of a barcode according to an embodiment of the present invention. [Diagram 3] 4 is a diagram showing an example of a correspondence relationship between characters and bar patterns of a barcode according to the embodiment; FIG. [Figure 4] 1A to 1C are diagrams illustrating an example of the use of a barcode printed on a shipping slip for a product or commodity such as a package according to the present embodiment. [Figure 5A] 13 is a diagram showing a slip to be attached to a commodity or product such as a package when the barcode is printed in the correct position. FIG. [Figure 5B] FIG. 13 is a diagram showing a slip attached to a product or commodity such as a package when the printing position of the barcode is misaligned. [Figure 6] 5 is a flowchart showing an example of an operation of the handheld terminal during a barcode reading process according to the embodiment. [Figure 7] 5 is a flowchart showing an example of an operation of the handheld terminal during a barcode reading process according to the embodiment. [Figure 8] This figure shows (A) the state of the barcode NW when the right end side of the barcode code symbol overlaps with the frame of the document, (B) the waveform when the barcode NW is read, and (C) the waveform after the barcode NW is corrected. [Figure 9] This figure shows (A) the state of the barcode NW when the left and right ends of the barcode code symbol overlap the frame of a document, (B) the waveform when the barcode NW is read, and (C) the waveform after correction of the barcode NW. [Figure 10]13 is a diagram showing an example of a selection screen for setting a start character and a stop character displayed on a display unit according to the present embodiment. FIG. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Preferred embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0012] [Example of Handheld Terminal 1 configuration] 1 shows an example of a block diagram of a handheld terminal 1 according to this embodiment. The handheld terminal 1 is used, for example, by a logistics company or other user, and manages goods by optically reading a barcode NW, which is a one-dimensional code printed on a slip for goods such as luggage. The barcode NW has a predetermined pattern consisting of a combination of bars and spaces set for each character in a character string set corresponding to the code.
[0013] The handheld terminal 1 is a mobile terminal type device that functions as a computer. The handheld terminal 1 includes a CPU 10, a RAM 11, an operation reception unit 12, a display unit 13, a storage unit 14, a scanner 15, a camera 16, an output unit 17, a wireless communication unit 18, and a battery 19.
[0014] The CPU 10 is a processor that controls each component and performs arithmetic processing of data, etc. The CPU 11 may be a single CPU or multiple CPUs. The CPU 10 may be not only a general-purpose processor, but also a microcomputer or an ASIC (Application Specific Integrated Circuit), etc. The CPU 10 executes a program 14a stored in the storage unit 14 to realize reading, analyzing, correcting, etc. of the barcode NW.
[0015] In this embodiment, the CPU 10 functions as a correction unit and a recognition unit. The CPU 10 realizes each function of the correction unit and the recognition unit by executing a program 14a stored in the storage unit 14. When the correction unit cannot detect all of the patterns corresponding to the start character N1 and the stop character N2, which are specific characters, from the code data acquired by the reading process of the barcode NW, and detects a pattern corresponding to a part of the pattern from which the character can be estimated, the correction unit corrects the code data by replacing the part of the code data that does not correspond to the pattern with correction data 14b. The recognition unit performs processing such as decoding on the code data corrected by the correction unit, and recognizes the character set corresponding to the barcode NW.
[0016] The RAM 11 temporarily stores the program 14a executed by the CPU 10 and data used for calculations by the CPU 10. The RAM 11 is, for example, a volatile semiconductor memory. Note that the handheld terminal 1 may use a type of volatile memory other than the RAM.
[0017] The operation reception unit 12 has a touch panel, physical keys, etc. The touch panel is an input device integrally combined with the display unit 13, and receives touch operations on the screen, etc. For example, a capacitance type, a resistive film type, or other known type can be adopted for the touch panel. The physical keys include buttons, switches, etc., and are provided on the front, side, etc. of the housing constituting the handheld terminal 1. The physical keys receive various inputs such as input for scanning, input of numbers and letters, etc. The operation reception unit 12 converts instructions received by user input operations into operation signals and outputs them to the CPU 10.
[0018] The display unit 13 is, for example, a display device such as a liquid crystal display or an organic EL (Electro Luminescence) display. The display unit 13 is provided on the front side of a housing constituting the handheld terminal 1. The display unit 13 displays a GUI (Graphical User Interface) for receiving various input operations from a user, a barcode NW photographed by the camera 16, an analysis result of the barcode, and the like.
[0019] The storage unit 14 includes any storage module, such as a hard disk drive (HDD), a solid state drive (SSD), and a read only memory (ROM). The storage unit 14 stores, for example, a system program, an application program, and various data. Specifically, the storage unit 14 stores a program 14a, correction data 14b, and the like. The program 14a is a program for executing a reading process, an analysis process, a correction process, and the like of the barcode NW. The correction data 14b is data for replacing a part of the code data of an unrecognized character when at least one of the start character N1 and the stop character N2 arranged on both ends of the barcode NW cannot be recognized.
[0020] The scanner 15 functions as a reading unit and reads the barcode NW generated according to a predetermined rule. The scanner 15 decodes code data corresponding to an image signal obtained by the reading process and outputs the decoded code data to the CPU 10. The code data is, for example, profile data corresponding to the intensity of light reflected by the barcode NW. A part or all of the decoding of the reading result of the barcode NW may be executed by the CPU 10. The reading method of the scanner 15 may be a type that reads the barcode NW by irradiating the reading surface with illumination and receiving the reflected light reflected by the reading surface with an imaging element such as a CCD (Charge Coupled Device) or a CMOS (Complementary Metal Oxide Semiconductor). In addition, as another reading method, for example, a type that reads the barcode NW by irradiating the reading surface with laser light and receiving the reflected light reflected by the reading surface with a sensor may be used.
[0021] The camera 16 is provided, for example, on the back surface of a housing constituting the handheld terminal 1, and has an optical system and an imaging element. The camera 16 captures an image of a subject such as a barcode NW to generate image data, and outputs the generated image data to the CPU 10.
[0022] The output unit 17 includes, for example, an LED (Light Emitting Diode), a speaker, etc. The LED may be a light source for checking operation or charging, or may be a light source for illuminating the barcode NW for reading. The speaker provides audio guidance on the results of reading the barcode NW, operation methods, etc.
[0023] The wireless communication unit 18 has antennas, modulation / demodulation circuits, signal processing circuits, etc. for various wireless communication methods, and performs wireless communication with a partner device. Examples of communication methods of the wireless communication unit 18 include Wi-Fi (registered trademark), wireless LAN (Local Area Network), wireless WAN (Wide Area Network), and NFC (near field communication).
[0024] The battery 19 is a rechargeable battery (secondary battery) such as a lithium ion battery, and supplies power to each component of the handheld terminal 1. The battery 19 turns off the supply of power to each component of the handheld terminal 1 (power off) under the control of the CPU 10.
[0025] [Barcode network configuration example] FIG. 2 shows an example of the overall configuration of a barcode NW according to this embodiment. In this embodiment, NW-7 (also called Codabar) is used as the type of barcode NW. The barcode NW has a code symbol N5 consisting of a start character N1, a stop character N2, data N3 and a check digit N4. The code symbol N5 is composed of a plurality of characters (character strings). Each character is an alphabet, a number or a symbol, and is composed of a combination of bars and spaces. The bars include narrow bars and wide bars. The spaces include narrow spaces and wide spaces.
[0026] The start character N1 is represented by a letter of the alphabet A through D and is placed at the beginning of the left side of the code symbol N5. The stop character N2 is represented by a letter of the alphabet A through D and is placed at the end of the right side of the code symbol N5. The start character N1 and the stop character N2 are configured in a predetermined combination according to rules for identifying the type of use of the barcode NW. For example, when the start character N1 is "D" and the stop character N2 is "D", the barcode NW means a waybill number for an item such as a package.
[0027] The data N3 is placed between the start character N1 and the check digit N4. The data N3 is composed of a plurality of characters (character strings) and is represented by numbers, letters, and symbols. The check digit N4 is placed between the data N3 and the stop character N2. The check digit N4 is data for checking whether there are any errors during the reading process, and is represented by, for example, a number.
[0028] The barcode NW further has margins N6, N7 provided on the left and right sides of the code symbol N5, respectively. The margins N6, N7 are areas for stably reading the barcode NW.
[0029] [Example of correspondence between barcode NW characters and bar patterns] Fig. 3 shows an example of the correspondence between the characters of the barcode NW and the bar pattern. In Fig. 3, as an example, among the multiple characters of the barcode NW, A, B, C, and D are shown. Any one of the characters A, B, C, and D is used as the start character N1 and the stop character N2.
[0030] In the barcode NW, specific characters are set in correspondence with the bars and spaces arranged in a predetermined pattern. That is, the bars and spaces arranged in a predetermined pattern are associated with each character. For example, the bar and space patterns associated with the character "A" are narrow bar, narrow space, wide bar, wide space, narrow bar, wide space, narrow bar from the left. The correspondence between the characters and the bar patterns of the barcode NW is stored in advance in, for example, the storage unit 14. Note that some or all of the bar and space patterns of each character shown in FIG. 3 may be used as the above-mentioned correction data 14b.
[0031] [Examples of using the barcode network] FIG. 4 shows an example of the use of a barcode NW printed on a slip S for an item such as luggage. The slip S affixed to the item such as luggage has a frame Sf indicating the area in which the barcode NW is printed. Multiple types of barcodes NW are printed at predetermined positions within the frame Sf of the slip S. For example, a barcode NW1 indicating the arrival store code, a barcode NW2 indicating the waybill number, and a barcode NW3 indicating the weight are printed within the frame Sf of the slip S. In the barcode NW1 indicating the arrival store code, the start character N1 is "C" and the stop character N2 is "D". In the barcode NW2 indicating the waybill number, the start character N1 is "D" and the stop character N2 is "D". In the barcode NW3 indicating the weight, the start character N1 is "D" and the stop character N2 is "B".
[0032] [Barcode NW printing example] Fig. 5A is a diagram showing a slip S that is attached to an article such as a package when the printing position of the barcode NW is correct, and Fig. 5B is a diagram showing a slip S that is attached to a commodity or product such as a package when the printing position of the barcode NW is misaligned.
[0033] 5A, when the barcode NW is printed in the correct position within the frame Sf of the slip S, sufficient blank spaces N6 and N7 are provided on both sides of the barcode NW, making it possible to recognize the start character N1 and the stop character N2 on the left and right. Therefore, the handheld terminal 1 can accurately read the barcode NW on the slip S.
[0034] In contrast, as shown in FIG. 5B, the print position of the barcode NW with respect to the frame Sf of the slip S may shift, causing a portion of the barcode NW to overlap the frame Sf. For example, some bars and spaces of the start character N1 and stop character N2 on the left and right ends of the barcode NW may overlap the frame Sf of the slip S. Here, the reflectance of the frame Sf of the slip S is assumed to be lower than the reflectance of the space of the barcode NW, and is, for example, approximately equal to the reflectance of the bars. In such a case, for example, the start character N1 at the left end, which does not have sufficient margin N6 on the left side, cannot be recognized. Therefore, the handheld terminal 1 cannot accurately read the barcode NW of the slip.
[0035] Therefore, in this embodiment, when a part of the start character N1 or stop character N2 of the barcode NW overlaps with the frame Sf of the slip S, the part that may be the start character N1 or the stop character N2 overlapping with the frame Sf is corrected using the correction data 14b. As a result, the part of the barcode NW that could not be recognized, such as a bar, can be recognized as the start character N1 or the stop character N2 by correcting it as the specified characters of the start character N1 and the stop character N2.
[0036] [Example of Handheld Terminal 1 operation] 6 and 7 are flowcharts showing an example of the operation of the handy terminal 1 during the reading process of the barcode NW according to the present embodiment. The CPU 10 realizes the control method of each step including the acquisition step and the correction step shown in Fig. 6 and Fig. 7 by executing the program 14a stored in the storage unit 14 or the like.
[0037] The CPU 10 acquires code data by reading the barcode NW and starts analyzing the acquired code data (step S1: acquisition step). Specifically, the CPU 10 receives light reflected by the barcode NW to acquire an analog waveform, and converts the analog waveform into a digital waveform to acquire the code data. The CPU 10 identifies a predetermined character from the combination of bars and spaces of the code symbol N5 included in the code data according to the barcode rules.
[0038] The CPU 10 judges whether or not the start character N1 has been recognized from the acquired code data (step S2). Specifically, the CPU 10 judges whether or not a pattern such as a bar corresponding to the letters A to D used in the start character N1 has been detected from the code data. If the CPU 10 judges that the start character N1 has been recognized (step S2: YES), that is, if all of the character patterns of the start character N1 have been detected, the process proceeds to step S3. Note that a case in which the start character N1 cannot be recognized will be described later.
[0039] The CPU 10 judges whether or not the stop character N2 has been recognized from the acquired code data (step S3). Specifically, the CPU 10 judges whether or not a pattern such as a bar corresponding to the letters A to D used in the stop character N2 has been detected from the code data. If the CPU 10 judges that the stop character N2 has been recognized (step S3: YES), that is, if all the character patterns of the stop character N2 have been detected, the CPU 10 proceeds to step S4. In this case, it means that both the start character N1 and the stop character N2 have been recognized in the barcode NW.
[0040] The CPU 10 recognizes the type of the barcode NW as NW-7 based on the recognition results of the start character N1 and the stop character N2, and analyzes the code symbol N5 of the data N3, etc. (step S4).
[0041] The CPU 10 displays the analysis results of the code symbol N5 etc. on the screen of the display unit 13 (step S5).
[0042] On the other hand, if the CPU 10 determines in step S3 that the stop character N2 cannot be recognized (step S3: NO), the process proceeds to step S6. In this case, it means that only the start character N1 of the start character N1 and the stop character N2 has been recognized in the barcode NW.
[0043] Here, a specific example will be described in which the stop character N2 cannot be recognized in the barcode NW. Fig. 8 shows (A) the state of the barcode NW when the right end side of the code symbol N5 of the barcode NW overlaps with the frame Sf of the slip S, (B) the waveform when the barcode NW is read, and (C) the waveform after correction of the barcode NW. The vertical axis of Fig. 8(B) and (C) is the reflectance (amplitude of the reflected light), and the horizontal axis is the distance. Note that Fig. 8(B) and (C) show the waveforms in analog, but they may be digital.
[0044] First, the CPU 10 recognizes the start character N1, "A," by analyzing the pattern of bars and spaces on the left side of the code symbol N5, as shown in FIG. 8(A). Next, the CPU 10 searches for a stop character N2 that pairs with the start character N1. In the example of FIG. 8(A), the narrow bar N2a on the right side of the code symbol N5 overlaps with the frame Sf of the slip S, resulting in a wide bar N2b that is thicker than the original narrow bar N2a. In this case, the CPU 10 cannot recognize the stop character N2 because the pattern of bars and spaces on the right side of the code symbol N5 does not match any of the patterns of the characters A to D of the stop character N2 (see FIG. 3). However, since the start character N1 can be recognized, it can be assumed that the paired stop character N2 is in the code symbol N5.
[0045] Therefore, the CPU 10 judges whether or not a pattern corresponding to a part of the pattern from which each character of the stop character N2 can be estimated has been detected in the code data (step S6). That is, in this embodiment, it judges whether or not the code data contains a pattern of bars and spaces similar to the stop character N2.
[0046] Specifically, as shown in Fig. 8(B), when the right end side of the code symbol N5 overlaps with the frame Sf of the slip S, a waveform W2 is generated corresponding to the bar N2b formed by combining the original narrow bar N2a with the frame Sf of the slip S. However, the pattern Wp of bars and spaces other than the bar N2b on the right end side of the code symbol N5 matches a pattern corresponding to part of the pattern of "A" of the stop character N2 (see Fig. 3). Therefore, the CPU 10 determines that the pattern of bars and spaces on the right end side of the code symbol N5 is similar to "A" of the stop character N2.
[0047] When the CPU 10 determines that a pattern corresponding to a part of the pattern from which each character of the stop character N2 can be estimated has been detected in the code data (step S6: YES), the CPU 10 proceeds to step S7. In other words, this is the case where the CPU 10 determines that a pattern similar to the stop character N2 exists in the code data.
[0048] Next, the CPU 10 corrects the code data by replacing the pattern of the portion of the stop character N2 that does not correspond to the estimable pattern with the correction data 14b (step S7: correction step).
[0049] Specifically, as shown in FIG. 8(C), the CPU 10 corrects the pattern of bars and spaces on the right end side of the code symbol N5 to the character "A". For example, the CPU 10 corrects the extra part of the bar N2b at the right end of the code symbol N5 to a white pattern using the correction data 14b consisting of a white pattern (space). In FIG. 8(C), the waveform of the part corresponding to the frame Sf located at the right end of the code symbol N5 is replaced from a low level to a high level. The high level corresponds to, for example, the intensity of the reflected light reflected by the white pattern. As a result, the waveform corresponding to the bar N2b at the right end of the code symbol N5 is corrected to a waveform corresponding to the narrow bar N2a of the original thickness. The part corrected to white may function as a part of the margin N7. The CPU 10 recognizes the code data including the pattern of bars and the like after the correction as the "A" of the stop character N2. When the CPU 10 finishes step S7, the CPU 10 proceeds to step S4. The process from step S4 onwards is the same as the process described above, so details will be omitted.
[0050] On the other hand, if the CPU 10 determines in step S6 that it cannot detect a pattern in the code symbol N5 that corresponds to a part of the pattern from which each character of the stop character N2 can be estimated (step S6: NO), the process proceeds to step S8. That is, the CPU 10 determines that there is no pattern similar to the stop character N2 in the code data. In this case, the CPU 10 recognizes the barcode NW as a type of barcode other than Codabar (step S8). After completing step S7, the CPU 10 proceeds to step S4. The process from step S4 onwards is the same as the process described above, so details will be omitted.
[0051] Next, if the CPU 10 determines in step S2 that the start character N1 cannot be recognized (step S2: NO), the process proceeds to step S9.
[0052] The CPU 10 judges whether or not the stop character N2 has been recognized from the acquired code data (step S9). If the CPU 10 judges that the stop character N2 has been recognized (step S9: YES), the process proceeds to step S10. In this case, it means that only the stop character N2 has been recognized from among the start character N1 and the stop character N2 in the barcode NW. An example of a case in which only the stop character N2 is recognized is when the left end side of the code symbol N5 of the barcode NW overlaps with the frame Sf of the slip S. As a specific example, the frame Sf overlapping the barcode NW shown in FIG. 8 is different on the left and right, and the rest is the same, so a detailed description will be omitted.
[0053] Here, since the stop character N2 has been recognized at the stage of step S9, it can be assumed that the paired start character N1 is in the code symbol N5. Then, the CPU 10 judges whether or not a pattern corresponding to a part of the pattern from which each character of the start character N1 can be estimated has been detected in the code symbol N5 (step S10). If the CPU 10 judges that a pattern corresponding to a part of the pattern from which each character of the start character N1 can be estimated has been detected in the code symbol N5 (step S10: YES), the process proceeds to step S11. That is, this is the case where the CPU 10 judges that a pattern similar to the start character N1 exists in the code data.
[0054] The CPU 10 corrects the code data by replacing the pattern of the part that does not correspond to the pattern that can estimate the character of the start character N1 with the correction data 14b (step S11: correction step). After completing step S11, the CPU 10 proceeds to step S4. The process from step S4 onwards is the same as the process described above, so details will be omitted.
[0055] On the other hand, if the CPU 10 determines in step S10 that it cannot detect a pattern in the code symbol N5 that corresponds to a part of the pattern from which each character of the start character N1 can be estimated (step S10: NO), the process proceeds to step S12. That is, the CPU 10 determines that there is no pattern similar to the start character N1 in the code data. In this case, the CPU 10 recognizes the barcode NW as a type of barcode other than Codabar (step S12). After completing step S12, the CPU 10 proceeds to step S4. The process from step S4 onwards is the same as the process described above, so details will be omitted.
[0056] Next, if the CPU 10 determines in step S9 that the stop character N2 cannot be recognized, the process proceeds to step S13 shown in Fig. 7. In this case, it means that both the start character N1 and the stop character N2 cannot be recognized in the barcode NW.
[0057] Here, a specific example will be described in which both the start character N1 and the stop character N2 cannot be recognized in the barcode NW. Figure 9 shows (A) the state of the barcode NW when the left and right ends of the code symbol N5 of the barcode NW overlap the frame Sf of the slip S, (B) the waveform when the barcode NW is read, and (C) the waveform after correction of the barcode NW. The vertical axis of Figures 9(B) and (C) is reflectance, and the horizontal axis is distance. Note that although Figures 9(B) and (C) show the waveforms in analog, they may also be digital.
[0058] 9(A), the leftmost bar of the code symbol N5 overlaps with the frame Sf of the slip S, and is recognized as a wider bar N1b than the original narrow bar N1a. In this case, the CPU 10 cannot recognize the start character N1 because the pattern of the bars and spaces on the leftmost side of the code symbol N5 does not match any of the patterns of the characters A to D of the start character N1.
[0059] Similarly, the rightmost bar of the code symbol N5 overlaps with the frame Sf of the slip S and is recognized as a wide bar N2b that is thicker than the original narrow bar N2a. In this case, the CPU 10 cannot recognize the stop character N2 because the pattern of the bars and spaces on the rightmost side of the code symbol N5 does not match the pattern of any of the characters A to D of the stop character N2.
[0060] Incidentally, the start character N1 and the stop character N2 can be set in advance from the selection screen 130, which will be described later, etc. Therefore, when the start character N1 and the stop character N2 are set in advance, even if the start character N1, etc. cannot be recognized in the above-mentioned process, it can be assumed that the start character N1 and the stop character N2 are at the left and right ends of the code symbol N5, respectively, based on the selection information on the selection screen 130, etc. Therefore, the CPU 10 determines whether the start character N1 and the stop character N2 are set in advance (step S13).
[0061] 10 shows an example of a selection screen 130 for setting a start character N1 and a stop character N2 displayed on the display unit 13. The selection screen 130 includes, for example, a type setting section 131 for selecting the type of barcode NW, a data setting section 132 for inputting data to be converted into a barcode, a start character setting section 133 for selecting the start character N1, and a stop character setting section 134 for selecting the stop character N2. For example, before reading a target barcode NW, a user selects a specific character from the pull-down menus of the start character setting section 133 and the stop character setting section 134 on the selection screen 130. The selected start character N1 and stop character N2 are stored in, for example, the storage unit 14 as information on the type of barcode NW and the rules for use.
[0062] When the CPU 10 determines that the start character N1 and the stop character N2 are set (step S13: YES), the CPU 10 proceeds to step S14.
[0063] The CPU 10 judges whether or not a pattern corresponding to a part of a pattern from which each character of the start character N1 and the stop character N2 can be estimated can be detected in the code data (step S14). In this embodiment, when a pattern corresponding to a part of a pattern from which the characters of the start character N1 and the stop character N2 can be estimated can be detected, the CPU 10 further judges whether or not a pattern similar to the characters of the start character N1 and the stop character N2 exists in the code data based on the information on the predetermined rule of the start character N1 and the stop character N2 selected on the selection screen 130 and the detection result of the part-corresponding pattern.
[0064] Specifically, as shown in FIG. 9B, when the left end side of the code symbol N5 overlaps with the frame Sf of the slip S, a waveform W1 is generated according to the bar N1b formed by combining the original narrow bar N1a at the left end with the frame Sf of the slip S. However, the pattern Wp of the bars and spaces other than the bar N1b at the left end of the code symbol N5 matches the pattern of "A" of the start character N1. In this embodiment, for example, "A" is set as the start character N1 related to the rules of use, etc. on the selection screen 130. Therefore, based on this information, the CPU 10 determines that the pattern of the bars and spaces on the left end side of the code symbol N5 is similar to the pattern of "A" of the start character N1.
[0065] Similarly, when the right end side of the code symbol N5 overlaps with the frame Sf of the slip S, a waveform W2 is generated according to the bar N2b formed by combining the narrow bar N2a at the original right end with the frame Sf of the slip S. However, the pattern of bars and spaces other than the bar N2b at the right end of the code symbol N5 matches the pattern of "A" of the stop character N2. Also, in this embodiment, for example, "A" is set as the stop character N2 related to the rules for use, etc. on the selection screen 130. Therefore, based on this information, the CPU 10 determines that the pattern of bars and spaces on the right end side of the code symbol N5 is similar to the pattern of "A" of the stop character N2.
[0066] When the CPU 10 determines that a pattern corresponding to a part of the pattern from which the characters of the start character N1 and the stop character N2 can be estimated has been detected in the code data (step S14: YES), the process proceeds to step S15. That is, the CPU 10 determines that a pattern similar to the start character N1 and the stop character N2 exists in the code data. The CPU 10 corrects the code data by replacing the part of the pattern that does not correspond to the pattern from which the start character N1 and the stop character N2 can be estimated with the correction data 14b (step S15: correction step).
[0067] Specifically, as shown in FIG. 9C, the CPU 10 corrects the pattern of bars and spaces on the left side of the code symbol N5 to the pattern of the character "A". For example, the CPU 10 corrects the extra part of the bar N1b at the left end of the code symbol N5 to a white pattern using the correction data 14b consisting of a white pattern (space). In FIG. 9C, the waveform of the part corresponding to the frame Sf located at the left end of the code symbol N5 is changed from low level to high level. As a result, the waveform corresponding to the bar N1b at the left end of the code symbol N5 is corrected to a waveform corresponding to a narrow bar N1a of the original thickness. The part corrected to white may function as a part of the margin N6. The CPU 10 recognizes the code data including the pattern of bars and the like after correction as the "A" of the start character N1.
[0068] Similarly, the CPU 10 corrects the pattern of bars and spaces on the right side of the code symbol N5 to the pattern of the letter "A". For example, the CPU 10 corrects the excess part of the bar N2b at the right end of the code symbol N5 to white using the correction data 14b consisting of white spaces. In FIG. 9C, the waveform of the part corresponding to the frame Sf located at the right end of the code symbol N5 is changed from low level to high level. The waveform corresponding to the bar N2b at the right end of the code symbol N5 is corrected to a waveform corresponding to a narrow bar N2a of the original thickness. The part corrected to white may function as a part of the margin N7. The CPU 10 recognizes the code data including the pattern of bars and the like after correction as the "A" of the stop character N2.
[0069] After step S7 is completed, the CPU 10 proceeds to step S4. The process from step S4 onwards is the same as the process described above, so the details will be omitted.
[0070] On the other hand, if the CPU 10 determines in step S14 that it cannot detect a pattern corresponding to a part of the pattern from which the characters of the start character N1 and the stop character N2 can be estimated in the code data (step S14: NO), it proceeds to step S16. That is, the CPU 10 determines that there is no pattern similar to the start character N1 and the stop character N2 in the code data. In this case, the CPU 10 recognizes the barcode NW as a type of barcode other than Codabar (step S16). After completing step S16, the CPU 10 proceeds to step S4. The process from step S4 onwards is the same as the process described above, so details will be omitted.
[0071] As described above, according to this embodiment, even if the print position of the barcode NW is shifted and the barcode NW overlaps with the frame Sf of the slip S, the correction data 14b is used to correct the patterns that may be the start character N1 and the stop character N2, so that they can be regarded as the start character N1 and the stop character N2. This makes it possible to eliminate the influence of the frame Sf of the slip S, and therefore the barcode NW can be read normally.
[0072] Further, according to this embodiment, the start character N1 and the stop character N2 can be set in advance on the selection screen 130. As a result, even if the bars of the barcode NW overlap the frame Sf of the slip S and the start character N1 and the stop character N2 cannot be recognized, it is possible to predict that the selected start character N1 and the stop character N2 are present in the barcode NW based on the selection information set on the selection screen 130. As a result, since information on the start character N1 and the stop character N2 set by the user can be directly acquired, the start character N1 and the stop character N2 can be identified with high accuracy. For example, even if a plurality of bars of a character consisting of seven bars and spaces do not match the bars of the character shown in FIG. 3, etc., the start character N1 and the stop character N2 are set in advance, so that the bars that do not match the characters can be corrected based on the information.
[0073] Although the preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings, the technical scope of the present disclosure is not limited to such examples. A person having ordinary knowledge in the technical field of the present disclosure will understand that various modifications and improvements made within the scope of the technical ideas described in the claims naturally belong to the technical scope of the present disclosure.
[0074] For example, in the above embodiment, an example was described in which NW-7 (Codabar) was used as the type of barcode NW, but the present invention is not limited to this. For example, the correction process of this embodiment can be effectively applied to a barcode in which characters based on a predetermined rule are arranged at the left end, which is the beginning of the barcode NW, and at the right end, which is the end, like NW-7. In addition, in the above embodiment, when at least one of the start character N1 and the stop character N2 of the barcode NW cannot be recognized, the pattern of the part corresponding to the start character N1, etc. is corrected using the correction data 14b, but the present invention is not limited to this. For example, the correction process of this embodiment can be applied even when characters such as data N3 between the start character N1 and the stop character N2, other than both ends of the barcode NW, cannot be recognized.
[0075] In the above embodiment, when six of the characters consisting of seven bars and spaces match the bars of the reference character shown in Fig. 3, it is determined that the character resembles the start character N1, etc. However, this is not limited to this. For example, when fewer than six bars match the bars of the reference character, it may be determined that the character resembles the start character N1, etc.
[0076] In the above embodiment, a case has been described in which the barcode NW is printed overlapping the frame Sf of the slip S, but the correction process may be performed on something other than the frame Sf of the slip S. For example, the correction process according to this embodiment may be applied to a case in which the start character N1, etc. cannot be recognized because a substance has adhered to the bars of the barcode NW printed on the slip S. [Explanation of symbols]
[0077] 1. Handheld terminal (mobile terminal) 10 CPU10 (correction section, recognition section) 13 Display section 14 Storage section 14a Program 14b Correction data 15 Scanner (reading unit) 130 Selection Screen N1 start character N2 stop character Network barcode (code)
Claims
1. A portable terminal that reads an optically readable code, the code having a pattern set for each character in a character string set corresponding to the code, A reading unit that performs a process of reading the code; a correction unit that, when the entire pattern corresponding to a specific character cannot be detected from the code data acquired by the code reading process and a pattern corresponding to a part of the pattern from which the character can be estimated can be detected, corrects the code data by replacing the part of the code data that does not correspond to the pattern with correction data; A mobile terminal equipped with
2. the correction unit corrects the code data by replacing a part of the code data with the correction data when a character set corresponding to the code cannot be recognized from the code data. The mobile terminal according to claim 1 .
3. The apparatus further includes a recognition unit that recognizes the code data corrected by the correction unit. The mobile terminal according to claim 1 .
4. when the entire pattern of a character at least at one end side in a character string corresponding to the code cannot be detected and a pattern corresponding to a part of the pattern from which the character can be estimated can be detected, the code data of the part not corresponding to the pattern is replaced with the correction data to correct the code data. The mobile terminal according to claim 1 .
5. The characters at both ends of the character string corresponding to the code are arranged according to a predetermined rule, the predetermined rule being a rule for identifying the type of the code. The mobile terminal according to claim 1 .
6. when it is not possible to detect all of the patterns of characters at both ends of a character string corresponding to the code, and a pattern corresponding to a part of the pattern from which the character can be estimated is detected, the code data is corrected by replacing the part of the code data that does not correspond to the pattern with the correction data based on information about the predetermined rule and the detection result of the pattern corresponding to the part. The mobile terminal according to claim 5.
7. A display unit that displays a selection screen for a user to select information regarding the predetermined rule is further provided. The mobile terminal according to claim 5.
8. A method for controlling a mobile terminal that reads an optically readable code, the code having a pattern set for each character in a character string set corresponding to the code, comprising: a reading step for performing a reading process of the code; a correction step of correcting the code data by replacing a part of the code data that does not correspond to the pattern with correction data when the whole pattern corresponding to a specific character cannot be detected from the code data obtained by the code reading process and a pattern corresponding to a part of the pattern from which the character can be estimated can be detected; A method for controlling a mobile terminal having the above configuration.
9. A computer as a portable terminal that reads an optically readable code, the code having a pattern set for each character in a character string set corresponding to the code, a correction unit that, when the entire pattern corresponding to a specific character cannot be detected from the code data acquired by the code reading process and a pattern corresponding to a part of the pattern from which the character can be estimated can be detected, corrects the code data by replacing the part of the code data that does not correspond to the pattern with correction data; A program to function as a
Citation Information
Patent Citations
Method and device for bar code read
JP2000357205A