WO2015008732A1 - 光学文字認識装置 - Google Patents

光学文字認識装置 Download PDF

Info

Publication number
WO2015008732A1
WO2015008732A1 PCT/JP2014/068725 JP2014068725W WO2015008732A1 WO 2015008732 A1 WO2015008732 A1 WO 2015008732A1 JP 2014068725 W JP2014068725 W JP 2014068725W WO 2015008732 A1 WO2015008732 A1 WO 2015008732A1
Authority
WO
WIPO (PCT)
Prior art keywords
character string
candidate
character
candidates
date
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/JP2014/068725
Other languages
English (en)
French (fr)
Inventor
美 張
中村 圭吾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yuyama Manufacturing Co Ltd
Original Assignee
Yuyama Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yuyama Manufacturing Co Ltd filed Critical Yuyama Manufacturing Co Ltd
Priority to JP2015527291A priority Critical patent/JP6344389B2/ja
Priority to CN201480040348.1A priority patent/CN105431866A/zh
Publication of WO2015008732A1 publication Critical patent/WO2015008732A1/ja
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/18Extraction of features or characteristics of the image
    • G06V30/1801Detecting partial patterns, e.g. edges or contours, or configurations, e.g. loops, corners, strokes or intersections
    • G06V30/18019Detecting partial patterns, e.g. edges or contours, or configurations, e.g. loops, corners, strokes or intersections by matching or filtering
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61JCONTAINERS SPECIALLY ADAPTED FOR MEDICAL OR PHARMACEUTICAL PURPOSES; DEVICES OR METHODS SPECIALLY ADAPTED FOR BRINGING PHARMACEUTICAL PRODUCTS INTO PARTICULAR PHYSICAL OR ADMINISTERING FORMS; DEVICES FOR ADMINISTERING FOOD OR MEDICINES ORALLY; BABY COMFORTERS; DEVICES FOR RECEIVING SPITTLE
    • A61J2200/00General characteristics or adaptations
    • A61J2200/70Device provided with specific sensor or indicating means
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61JCONTAINERS SPECIALLY ADAPTED FOR MEDICAL OR PHARMACEUTICAL PURPOSES; DEVICES OR METHODS SPECIALLY ADAPTED FOR BRINGING PHARMACEUTICAL PRODUCTS INTO PARTICULAR PHYSICAL OR ADMINISTERING FORMS; DEVICES FOR ADMINISTERING FOOD OR MEDICINES ORALLY; BABY COMFORTERS; DEVICES FOR RECEIVING SPITTLE
    • A61J2205/00General identification or selection means
    • A61J2205/30Printed labels
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61JCONTAINERS SPECIALLY ADAPTED FOR MEDICAL OR PHARMACEUTICAL PURPOSES; DEVICES OR METHODS SPECIALLY ADAPTED FOR BRINGING PHARMACEUTICAL PRODUCTS INTO PARTICULAR PHYSICAL OR ADMINISTERING FORMS; DEVICES FOR ADMINISTERING FOOD OR MEDICINES ORALLY; BABY COMFORTERS; DEVICES FOR RECEIVING SPITTLE
    • A61J7/00Devices for administering medicines orally, e.g. spoons; Pill counting devices; Arrangements for time indication or reminder for taking medicine
    • A61J7/0015Devices specially adapted for taking medicines
    • A61J7/0046Cups, bottles or bags
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Definitions

  • the present invention relates to an optical character recognition device that optically recognizes a character string, and more particularly to an optical character recognition device that recognizes a character string representing a date.
  • the present invention also relates to an optical character recognition method, a computer program, and a recording medium for recognizing a character string representing a date.
  • Patent Document 1 There is a need for a device that optically recognizes characters printed on a chemical container (see Patent Document 1). For example, if a medicine such as an injection that has been transported to the ward and is not used as a result is returned to the vault, the medicine type, name, and so that the medicine can be quickly and definitely removed at the next use. It is necessary to sort and store based on the expiration date. If a return device that automatically performs this sorting can be realized using an optical character recognition device, it is effective for improving work efficiency and reducing errors. In addition, when storing medicine using such a return device, the storage location of the medicine is recorded, so that the appropriate medicine can be automatically dispensed based on the prescription at the next use. .
  • An object of the present invention is to provide an optical character recognition device, an optical character recognition method, a computer program, and a recording medium capable of recognizing a character string representing a date with higher accuracy than the conventional one. .
  • the optical character recognition device in the optical character recognition device that optically recognizes a character string, includes: First processing means for extracting a target area including an object to be recognized from an input image; Second processing means for extracting candidate objects including at least one character string candidate object from the objects included in the target area; By labeling the candidate objects, a plurality of objects extending in a predetermined direction and close to each other are extracted as the character string candidates, and the character string candidates are two-digit or four-digit numbers representing the year. And whether or not the character string candidate has the date pattern, the character string has a date pattern that includes a one- or two-digit number representing the month and a predetermined punctuation mark. And third processing means for recognizing column candidates as dates.
  • the second processing means includes Detect the contour and edge of the object included in the target area, An object having contours and edges that overlap each other is extracted as the candidate object.
  • the second processing means includes Applying a Sobel filter to the target area to detect the first edge; Applying a canny filter to a region in the vicinity of the first edge to detect a second edge; The second edge is used as an edge of an object included in the target area.
  • the third processing means includes Label the above character string candidate objects to extract multiple character candidates, A plurality of bounding boxes each having a rectangular shape having a width parallel to a direction in which the character string candidates extend and a height orthogonal to the direction in which the character string candidates extend, and surrounding each of the character candidates. Generate Each of the bounding boxes is deformed so that the width of the bounding box is increased as the height of the bounding box is lower. A set of character candidates included in bounding boxes connected by deformation is extracted as a new character string candidate.
  • the third processing means includes Label the above character string candidate objects to extract multiple character candidates, Character string candidates including more than 10 character candidates are deleted.
  • the third processing means includes Label the above character string candidate objects to extract multiple character candidates, Character string candidates including only character candidates including two or more objects in a direction orthogonal to the direction in which the character string candidates extend are deleted.
  • the third processing means includes Detect the contours and edges of the above character string candidate objects, Character string candidates whose portion where the edge pixel coincides with the contour pixel are 60% or less of the area of the edge pixel are deleted.
  • the third processing means recognizes the character string candidate as not being a date when the character string candidate includes an alphabetic character that is clearly not mistaken for a number.
  • the third processing unit is configured to represent the month.
  • the distance between two numbers is larger than the average of the distance between the two numbers representing the month and other characters and the average distance between the other characters, the first digit of the two numbers representing the month and The other characters are removed.
  • the input image is an image of a cylindrical container held rotatably.
  • the first processing means includes, from the input image, an edge extending in a direction substantially perpendicular to a rotation axis of the cylindrical container, and a portion having a luminance higher than a predetermined threshold value. A region to be included is extracted as the target region.
  • the optical character recognition device acquires a plurality of input images respectively representing different angles of the container photographed while rotating the container,
  • the character string candidate related to one input image includes only “1” as the number representing the month
  • the third processing means only includes “1” as the number representing the month as the character string candidate related to the other input image. It is characterized by determining whether it is included.
  • the optical character recognition device in the thirteenth aspect of the present invention, in the optical character recognition device in any one of the tenth to twelfth aspects, is A camera, An imaging table for holding the container so as to be rotatable around a rotation axis of the cylindrical container; A moving device for moving the container between at least one storage and the imaging table; The container is printed with a character string representing the expiration date of the medicine in the container.
  • the optical character recognition method includes: A first step of extracting a target area including an object to be recognized from an input image; A second step of extracting candidate objects including at least one character string candidate object from the objects included in the target area; By labeling the candidate objects, a plurality of objects extending in a predetermined direction and close to each other are extracted as the character string candidates, and the character string candidates are two-digit or four-digit numbers representing the year. And whether or not the character string candidate has the date pattern, the character string has a date pattern that includes a one- or two-digit number representing the month and a predetermined punctuation mark. And a third step of recognizing column candidates as dates.
  • the computer program includes: A first step of extracting a target area including an object to be recognized from an input image; A second step of extracting candidate objects including at least one character string candidate object from the objects included in the target area; By labeling the candidate objects, a plurality of objects extending in a predetermined direction and close to each other are extracted as the character string candidates, and the character string candidates are two-digit or four-digit numbers representing the year. And whether or not the character string candidate has the date pattern, the character string has a date pattern that includes a one- or two-digit number representing the month and a predetermined punctuation mark. And a third step of recognizing column candidates as dates.
  • the computer program includes: A first step of extracting a target area including an object to be recognized from an input image; A second step of extracting candidate objects including at least one character string candidate object from the objects included in the target area; By labeling the candidate objects, a plurality of objects extending in a predetermined direction and close to each other are extracted as the character string candidates, and the character string candidates are two-digit or four-digit numbers representing the year. And whether or not the character string candidate has the date pattern, the character string has a date pattern that includes a one- or two-digit number representing the month and a predetermined punctuation mark. And a third step of recognizing column candidates as dates.
  • the optical character recognition device in the optical character recognition device according to any one of the first to thirteenth aspects, is characterized in that it acquires a plurality of input images each representing a different angle of the container taken while rotating the container, and connects the plurality of input images.
  • the optical character recognition device, the optical character recognition method, the computer program, and the recording medium of the present invention can recognize a character string representing a date with higher accuracy than before.
  • step S6 of FIG. 10 is a flowchart showing a first part of an OCR subroutine in steps S51, S53, S55, and S57 of FIG. 10 is a flowchart showing a second part of the OCR subroutine in steps S51, S53, S55, and S57 of FIG. 12 is a flowchart showing a subroutine of edge strength and area luminance determination processing in step S68 of FIG.
  • FIG. 17 is a diagram in which a portion with high luminance in FIG. 15 and a long vertical edge in FIG. It is a figure which shows the target area
  • FIG. 29B is a diagram showing the binarized image of FIG. 29A extracted using the threshold value 200. It is a figure which shows the outline of FIG. 29B. It is a figure which shows the edge of FIG.
  • FIG. 29A extracted using the threshold value 50.
  • FIG. It is a figure which shows the edge of FIG. 29A extracted using the threshold value 200.
  • FIG. It is a figure which shows the outline and edge of a character. It is a figure which shows the example of the character string candidate extracted in step S61 of FIG. It is a figure which shows extraction of the character string candidate in step S61 of FIG. It is a figure which shows the example of the character candidate extracted in step S62 of FIG. 10, and the produced
  • FIG. 10 It is a figure which shows the example of the bounding box 43 deform
  • FIG. It is a figure which shows the example of the character string candidate after deleting some character string candidates in step S65, S66, S67 of FIG. It is a figure which shows the example of the character string candidate extracted in step S64 of FIG. It is a figure which shows the number of the objects in the height direction of each character candidate contained in the character string candidate of FIG.
  • FIG. 39A It is a figure which shows the edge extracted from the image of FIG. 39A. It is a figure which shows the example of the input image for demonstrating the edge intensity
  • FIG. 1 is a block diagram showing the configuration of the optical character recognition apparatus according to the first embodiment of the present invention.
  • the optical character recognition device in FIG. 1 optically recognizes a date character string printed on the surface of a cylindrical container 13.
  • the optical character recognition device further includes at least one tray (or storage) 11 and 12 that accommodates the container 13.
  • the moving device 3 moves the container 13 between the trays 11 and 12 and the rollers 8 a and 8 b under the control of the control device 1.
  • the cameras 4 to 6 are provided on the trays 11 and 12 and the rollers 8a and 8b, respectively, and acquire images of the containers 13 when the containers 13 are on the trays 11 and 12 and the rollers 8a and 8b.
  • the lighting devices 7a and 7b illuminate the container 13 on the rollers 8a and 8b.
  • the rollers 8 a and 8 b and the lighting devices 7 a and 7 b function as a photographing stand for the container 13.
  • the optical character recognition device may include another mechanism that holds the container 13 so as to be rotatable around the rotation axis of the cylindrical container 13 instead of the rollers 8a and 8b.
  • the control device 1 performs date detection processing described later with reference to FIGS.
  • the control device 1 may be connected to an external personal computer (PC) 9 that operates according to a computer program read from the recording medium 10.
  • PC personal computer
  • the container 13 is, for example, a chemical container (ampoule), and a character string representing the expiration date of the chemical in the container 13 is printed on the container 13.
  • a character string representing the expiration date of the chemical in the container 13 is printed on the container 13.
  • the optical character recognition device moves the container 13 from the tray 11 onto the rollers 8 a and 8 b using the moving device 3, and the roller 8 a , 8b, the expiration date printed on the container 13 is optically recognized.
  • the optical character recognition device determines, based on the recognized date, whether to store or discard the container and uses the transfer device 3 to transfer to another tray 12 associated with the appropriate storage or trash.
  • the container 13 is moved.
  • FIG. 2 is a top view showing the container 13a on which the character string according to the first example is printed.
  • FIG. 3 is a top view showing the container 13b on which the character string according to the second example is printed.
  • FIG. 4 is a top view showing the container 13c on which the character string according to the third example is printed.
  • FIG. 5 is a top view showing a container 13d on which a character string according to the fourth example is printed.
  • the character string may be printed on a label attached to the container, or may be printed directly on the container. Further, the direction of the character string may be parallel to the rotation axis of the cylindrical container 13, may be orthogonal to the rotation axis of the container 13, or the character strings in these directions may be mixed. Good.
  • the control device 1 operates as a first processing unit that extracts a target area including an object to be recognized from an input image.
  • the control device 1 operates as a second processing unit that extracts candidate objects including at least one character string candidate object from the objects included in the target area.
  • the control device 1 performs labeling of the candidate objects, extracts a plurality of objects extending in a predetermined direction and close to each other as character string candidates, and the character string candidates are two digits representing the year or Judge whether or not it has a date pattern that includes a 4-digit number, a 1- or 2-digit month number, and a predetermined punctuation mark. Operates as a third processing means for recognizing a character string candidate as a date.
  • FIG. 6 is a flowchart showing a date detection process executed by the control device 1 of FIG.
  • the control device 1 takes images of the container 13 with the camera 5 while rotating the container 13 by a certain angle (for example, 15 degrees) using the rollers 8a and 8b, and displays a plurality of images (input images) representing different angles of the container 13 respectively. ) To get.
  • the camera 5 a camera having sufficient resolution for optically recognizing the character string printed on the container 13 is used.
  • the container 13 has a diameter of 10 to 40 mm.
  • a black and white camera that captures a range of 120 ⁇ 90 mm including the container 13 with a pixel number of 3840 ⁇ 2748 (about 10 million pixels) is used. In this case, 1 mm on the container 13 corresponds to 32 pixels.
  • step S ⁇ b> 1 of FIG. 6 the control device 1 acquires one of the plurality of images of the container 13.
  • the control device 1 executes target area extraction processing.
  • FIG. 7 is a flowchart showing a subroutine of target area extraction processing in step S2 of FIG.
  • step S21 of FIG. 7 the control device 1 extracts a portion having a luminance higher than a predetermined threshold (for example, a portion including illumination reflection) from the image acquired in step S1.
  • a predetermined threshold for example, a portion including illumination reflection
  • the control device 1 extracts a portion having a luminance higher than 220, for example.
  • FIG. 15 is a diagram illustrating an example of a portion having a high luminance in the image extracted in step S21 of FIG.
  • the input image is an image of the container 13d in FIG.
  • step S22 of FIG. 7 the control device 1 extracts a long edge (longitudinal edge) extending in a direction substantially perpendicular to the rotation axis of the cylindrical container 13 from the image acquired in step S1.
  • a long edge long edge
  • the rollers 8a and 8b exist in the background of the container 13, since the rollers 8a and 8b extend in parallel with the rotation axis of the container 13, the influence of the rollers 8a and 8b is removed by extracting the vertical edge. be able to.
  • FIG. 16 is a diagram illustrating an example of a long vertical edge in the image extracted in step S22 of FIG.
  • the rotation axis of the container 13d in FIG. 5 is parallel to the X axis in FIG. 5. Therefore, in step S22, an edge extending in a direction substantially parallel to the Y axis in FIG. 5 is extracted.
  • the control device 1 extracts a rectangular area (width w1 ⁇ height h1) including a portion with high luminance and a vertical edge as a target area, and deletes an area outside the target area.
  • FIG. 17 is a diagram in which the high luminance portion of FIG. 15 and the long vertical edge of FIG. 16 are superimposed.
  • FIG. 18 is a diagram illustrating the target area 21 including the high-luminance portion of FIG. 15 and the long vertical edge of FIG.
  • the target area is an area that is considered to include a character string object to be recognized.
  • step S3 the control device 1 determines whether or not the target area has been successfully extracted. If YES, the process proceeds to step S4. If NO, the process proceeds to step S10. In step S4, the control device 1 executes candidate object extraction processing.
  • FIG. 8 is a flowchart showing a subroutine of candidate object extraction processing in step S4 of FIG.
  • step S31 of FIG. 8 the control device 1 applies a moving average filter to the image of the target area, thereby extracting bright objects brighter than the surroundings and binarizing the image.
  • a white character string on a black background is extracted as a bright object. Since lighting is uneven, it is not possible to detect an object by simply performing binarization. Therefore, a binarization method (dynamic threshold method) using a moving average filter is used.
  • FIG. 21 is a diagram illustrating extraction of a bright object using the moving average filter in step S31 of FIG. According to the principle shown in FIG. 21, the control device 1 calculates the local average luminance from the luminance of the input image (here, the image of the target area), and adds a predetermined offset to the local average luminance.
  • FIG. 19 is a diagram illustrating an example of the bright object extracted in step S31 of FIG. Next, in step S32, the control device 1 detects the contour of the binarized bright object.
  • step S33 the control device 1 applies a moving average filter to the image of the target area, thereby extracting dark objects that are darker than the surroundings and binarizing the image.
  • a black character string on a white background is extracted as a dark object.
  • FIG. 20 is a diagram illustrating an example of the dark object extracted in step S33 of FIG.
  • step S34 the control device 1 detects the binarized dark object contour.
  • FIG. 22A is a diagram showing an image including a bright object and a dark object.
  • FIG. 22B is a diagram showing extraction of a bright object from the image of FIG. 22A.
  • FIG. 22C is a diagram illustrating extraction of a dark object from the image of FIG. 22A.
  • One character string is considered to be one of a bright object and a dark object. Since both the bright object and the dark object are extracted in steps S31 to S34 in FIG. 8, the date printed on the container 13 can be reliably detected.
  • step S35 of FIG. 8 the control device 1 extracts an edge in the image of the target region using the following Sobel filter.
  • FIG. 23 is a diagram showing an example of edges in the image extracted using the Sobel filter in step S35 of FIG.
  • step S36 of FIG. 8 the control device 1 deletes an area other than the edge extracted in step S35 from the image of the target area.
  • FIG. 24 is a diagram illustrating an example of an image after deleting a region other than the edge extracted in step S35 in step S36 of FIG.
  • step S37 in FIG. 8 the control device 1 applies a Canny filter to the image after the deletion in step S36, and extracts an edge in the image.
  • the Canny edge detection method includes the following three steps. As a first step, the gradient magnitude g (x, y) and gradient direction d (x, y) of the following equation are calculated for the image.
  • f x (x, y) indicates a convolution of the first-order derivative in the x direction of the Gaussian function having the standard deviation ⁇ and the pixel value function
  • f y (x, y) is y of the same Gaussian function. The first derivative with respect to the direction and the convolution of the pixel value function are shown.
  • an edge is detected by obtaining the maximum value of the gradient magnitude g (x, y).
  • the magnitude of the gradient of the pixel of interest is estimated by estimating the magnitude of the gradient interpolated with respect to the gradient direction d (x, y) using 8 pixels around the pixel of interest, and comparing with the estimated value. It is determined whether g (x, y) has a true maximum value.
  • a high threshold value Th_H and a low threshold value Th_L are set, and a threshold value with hysteresis is determined.
  • the gradient magnitude g (x, y) is greater than the high threshold Th_H, the pixel is determined to be an edge.
  • the gradient magnitude g (x, y) is smaller than the low threshold Th_L, it is determined that the pixel is not an edge.
  • the gradient magnitude g (x, y) is between the high threshold Th_H and the low threshold Th_L, it is determined that the pixel is an edge only when the pixel is adjacent to a pixel detected as an edge. To do.
  • the range of possible values for the threshold is 0-255.
  • FIG. 25 is a diagram illustrating an example of edges in the image extracted using the Canny filter having the threshold value 15 in step S37 of FIG.
  • FIG. 26 is a diagram illustrating an example of edges in the image extracted using the Canny filter having the threshold value 4 in step S37 of FIG.
  • the edge of FIG. 26 is used in steps S38 and S39
  • the edge of FIG. 25 is used in step S67 of FIG.
  • edges are extracted once using a Sobel filter (step S35), areas other than the extracted edges are deleted (step S36), and the vicinity of the edges extracted using the Sobel filter is used.
  • An edge is extracted by applying a canny filter only to the area (step S37), and this edge is used as an edge of an object included in the target area.
  • the edge extraction is about 10 times faster than when only the Canny filter is used.
  • step S38 in FIG. 8 the control device 1 extracts a bright object having a contour and an edge, the contour and the edge overlapping each other and substantially matching each other as a candidate object.
  • FIG. 27 is a diagram illustrating an example of a bright object candidate object extracted in step S38 of FIG.
  • step S39 in FIG. 8 the control device 1 extracts dark objects having contours and edges, the contours and edges overlapping each other and substantially matching each other as candidate objects.
  • FIG. 28 is a diagram illustrating an example of dark object candidate objects extracted in step S39 of FIG.
  • FIG. 29A shows an example of an object.
  • FIG. 29B is a diagram showing the binarized image of FIG. 29A extracted using the threshold value 200.
  • FIG. 29C is a diagram showing an outline of FIG. 29B.
  • FIG. 29D is a diagram showing the edges of FIG. 29A extracted using the threshold value 50.
  • FIG. 29E is a diagram showing the edges of FIG. 29A extracted using the threshold 200.
  • FIG. 29F is a diagram showing the outline and edges of a character.
  • the object of FIG. 29A includes a luminance 0 portion, a luminance 128 portion, and a luminance 255 portion, for example, when the luminance of a pixel varies from 0 to 255.
  • FIG. 29A is obtained as the outline of the binarized image (FIG. 29B) (FIG. 29C).
  • the edge of the object in FIG. 29A is obtained as a portion where the luminance changes suddenly, and different edges are extracted by using different threshold values (FIGS. 29D and 29E).
  • FIGS. 29C to 29E generally, the outline and edge of an object do not always coincide with each other. However, it is considered that the character object always has a closed edge, and the outline and the edge of the object coincide. Therefore, a character object can be extracted by extracting an object having a substantially matched contour and edge. Objects whose edges and contours do not match are deleted as noise.
  • step S5 of FIG. 6 the control device 1 determines whether or not the candidate object has been successfully extracted. If YES, the process proceeds to step S6, and if NO, the process proceeds to step S10. In step S6, the control device 1 executes an OCR process.
  • FIG. 9 is a flowchart showing a subroutine of OCR processing in step S6 of FIG. It is unknown whether the character string to be recognized is a bright object or a dark object, and whether the character string to be recognized extends parallel to the X axis in FIG. 5 or extends parallel to the Y axis. Since it is unknown whether it exists, the OCR subroutine of FIGS. 10 and 11 is executed for all these combinations.
  • the OCR subroutine of FIGS. 10 and 11 is executed for all these combinations.
  • the character string of the recognition device is a bright object
  • the bright object candidate object extracted in step S38 in FIG. 8 is used.
  • the dark object candidate object extracted in step S39 in FIG. 8 is used.
  • the image of the target area is used as it is.
  • the image of the target area is rotated 90 degrees and used.
  • step S52 the control device 1 determines whether or not the OCR is successful. If YES, the process proceeds to step S7 in FIG. 6, and if NO, the process proceeds to step S53.
  • step S53 the control device 1 executes the OCR subroutine on the assumption that the character string of the recognition device is a bright object extending in parallel with the Y axis.
  • step S54 the control device 1 determines whether or not the OCR is successful. If YES, the process proceeds to step S7 in FIG. 6, and if NO, the process proceeds to step S55.
  • step S55 the control device 1 executes the OCR subroutine on the assumption that the character string of the recognition device is a dark object extending in parallel with the X axis.
  • step S56 the control device 1 determines whether or not the OCR is successful. If YES, the process proceeds to step S7 in FIG. 6, and if NO, the process proceeds to step S57.
  • step S57 the control device 1 executes the OCR subroutine on the assumption that the character string of the recognition device is a dark object extending in parallel to the Y axis, and then proceeds to step S7 of FIG.
  • FIG. 10 is a flowchart showing a first part of the OCR subroutine in steps S51, S53, S55, and S57 of FIG.
  • FIG. 11 is a flowchart showing a second part of the OCR subroutine in steps S51, S53, S55, and S57 of FIG.
  • step S61 of FIG. 10 the control device 1 performs labeling of the candidate objects, and extracts a plurality of objects extending in a predetermined direction and close to each other as character string candidates.
  • FIG. 30 is a diagram showing an example of character string candidates extracted in step S61 of FIG.
  • FIG. 31 is a diagram showing extraction of character string candidates in step S61 of FIG.
  • the character string candidate mask 31 arranged at a certain position includes even one candidate object pixel, the region in the character string candidate mask 31 is determined to be a part of the character string candidate.
  • the character string candidate mask 31 is scanned over the entire target area, and labels are assigned to the individual connected character string candidates.
  • step S61 When labeling candidate objects and extracting character string candidates in step S61, a plurality of adjacent character strings may be extracted as one character string candidate. Therefore, the character string candidates are once separated into character candidates, and character candidates having similar feature values are recombined as character string candidates based on the feature values (width and height) of each character candidate.
  • step S62 of FIG. 10 the control device 1 performs labeling of objects in each character string candidate, extracts a plurality of character candidates included in the character string candidate, and generates a bounding box for each character candidate.
  • Each bounding box has a rectangular shape having a width parallel to the direction in which the character string candidates extend and a height orthogonal to the direction in which the character string candidates extend, and encloses each character candidate. It is.
  • step S63 the control device 1 deforms each bounding box so that the width of the bounding box is increased as the height of the bounding box is lower, based on the width and height.
  • step S64 the control device 1 extracts a set of character candidates included in the bounding boxes connected by deformation as a new character string candidate.
  • FIG. 32 is a diagram illustrating an example of the character candidates extracted in step S62 of FIG. 10 and the generated bounding box.
  • FIG. 33A is a diagram showing an example of the character string candidates extracted in step S61 of FIG.
  • FIG. 33B is a diagram showing an example of the character candidates extracted in step S62 of FIG. 10 and the generated bounding box 42.
  • FIG. 33C is a diagram illustrating an example of the bounding box 43 modified in step S63 of FIG.
  • FIG. 33D is a diagram showing an example of a new character string candidate extracted in step S64 of FIG.
  • the character string candidates in FIG. 33A include two character strings “2012. 1” and “abc”, but are extracted as one character string candidate.
  • FIG. 33A shows a bounding box 41 of character string candidates for explanation.
  • FIG. 33B the objects in the character string candidates in FIG.
  • each character candidate's bounding box 42 has a width w3 and a height h3.
  • each bounding box is deformed based on its width and height.
  • the width w3 'and the height h3' of the bounding box 43 after deformation are obtained by the following equations.
  • W is the maximum value of the width of the bounding box 42 of each character candidate
  • H is the maximum value of the height of the bounding box 42 of each character candidate.
  • FIG. 33C the bounding box of each character candidate is deformed so as to expand the width w3 as the height h3 is lower. Therefore, although the distance between “.” And “1” is larger than the distance between “1” and “a”, “.” And “1” are connected in the bounding box 43 after deformation, and “1” and “1” a ”is separated.
  • FIG. 33D a set of character candidates included in the bounding boxes connected by deformation is extracted as a new character string candidate.
  • FIG. 33D shows new character string candidate bounding boxes 41a and 41b for explanation.
  • FIG. 34A is a diagram showing another example of the character string candidates extracted in step S61 of FIG.
  • FIG. 34B is a diagram showing another example of the character candidates extracted in step S62 of FIG. 10 and the generated bounding box 42.
  • step S64 when the set of character candidates included in the bounding boxes connected by deformation is not extracted as a new character string candidate, the object included in the character string candidate in FIG. 34A is deleted as noise.
  • step S65 of FIG. 10 the control device 1 deletes character string candidates including more than 10 character candidates.
  • the date string is considered to contain no more than 10 characters. Accordingly, character string candidates including more than 10 character candidates are deleted as noise.
  • step S66 the control device 1 deletes character string candidates including only character candidates including two or more objects in the height direction.
  • the objects included in the character candidate are connected in the height direction, and the number of connected objects is counted.
  • the numbers “0” to “9” are single connected objects. Therefore, if the character string candidate is a date, all the character candidates included in the character string candidate should include only one object in the height direction.
  • FIG. 36A is a diagram showing an example of character string candidates extracted in step S64 of FIG.
  • FIG. 36B is a diagram illustrating the number of objects in the height direction of each character candidate included in the character string candidates in FIG. 36A. The number of objects in the height direction of each character candidate is shown on the character candidate 51 in FIG. 36B.
  • FIG. 37A is a diagram showing another example of the character string candidates extracted in step S64 of FIG.
  • FIG. 37B is a diagram illustrating the number of objects in the height direction of each character candidate included in the character string candidates in FIG. 37A.
  • FIG. 37A and FIG. 37B are examples in which a character string is processed as being erroneously extended horizontally even though it extends vertically. As shown in FIG. 37B, since the number of objects in the height direction of each character candidate is two or more, the character string candidates in FIGS. 37A and 37B are deleted as noise.
  • step S67 the control device 1 clears a character string candidate in which a portion where the edge pixel in each object matches the contour pixel is 60% or less of the edge pixel area (number of pixels) from a certain region.
  • a correct character string candidate is included in only one of them.
  • the edge pixel substantially matches the contour pixel.
  • the character string candidate extracted from the other candidate object is deleted as noise.
  • the edge extracted in step S37 in FIG. 8 is used as the object edge.
  • FIG. 38A is a diagram illustrating an example of an input image.
  • FIG. 38B is a diagram showing bright object candidate objects extracted from the image of FIG. 38A.
  • FIG. 38B is a diagram showing bright object candidate objects extracted from the image of FIG. 38A.
  • FIG. 38C is a diagram showing an outline of the candidate object of FIG. 38B.
  • FIG. 38D is a diagram showing edges extracted from the image of FIG. 38A.
  • FIG. 39A is a diagram illustrating an example of an input image.
  • FIG. 39B is a diagram showing dark object candidate objects extracted from the image of FIG. 39A.
  • FIG. 39C is a diagram showing an outline of the candidate object in FIG. 39B.
  • FIG. 39D is a diagram showing edges extracted from the image of FIG. 39A.
  • the input images in FIGS. 38A and 39A include dark objects. Accordingly, the contour of FIG. 39C and the edge of FIG. 39D substantially match, but the contour of FIG. 38C and FIG. 38D do not match.
  • FIG. 35 is a diagram showing an example of character string candidates after deleting some character string candidates in steps S65, S66, and S67 of FIG. Compared to FIG. 30, it can be seen that noise is reduced.
  • step S68 of FIG. 11 the control device 1 executes edge strength and area luminance determination processing.
  • FIG. 12 is a flowchart showing a subroutine of edge strength and area luminance determination processing in step S68 of FIG.
  • step S90 of FIG. 12 the control device 1 selects one character string candidate.
  • step S91 the control device 1 extracts and expands the outline of the character candidate region.
  • the pixel is expanded by adding one pixel to the outline pixel of the character candidate area.
  • step S92 the control device 1 applies a canny filter to the contour expanded in step S91 to detect the edge of the character string candidate region.
  • step S93 the control device 1 calculates the average edge_M and the deviation edge_D of the edge strength of the character string candidate area. Based on the average edge_M and the deviation edge_D of the edge strength, the lower limit edge_L and the upper limit edge_H of the reference range of the edge strength are calculated using the following equations.
  • step S94 the control device 1 calculates the average I_M and the deviation I_D of the luminance of the character string candidate area. Based on the luminance average I_M and the deviation I_D, the lower limit I_L and the upper limit I_H of the luminance reference range are calculated using the following equations.
  • step S95 the control device 1 selects one character candidate in the selected character string candidate.
  • step S96 the control device 1 calculates the average edge strength of the selected character candidate region.
  • step S97 the control device 1 calculates the average brightness of the selected character candidate area.
  • step S98 when the selected character candidate has edge strength and brightness outside the reference range, the control device 1 deletes the character candidate. Specifically, a character candidate having an edge strength less than the lower limit edge_L or an edge strength greater than the upper limit edge_H is deleted as noise. In addition, character candidates having a luminance lower than the lower limit I_L or a luminance higher than the upper limit I_H are deleted as noise.
  • step S99 the control device 1 determines whether or not there is an unprocessed character candidate. If YES, the process proceeds to step S95, and if NO, the process proceeds to step S100. In step S100, the control device 1 determines whether or not there is an unprocessed character string candidate. If YES, the process proceeds to step S90, and if NO, the process proceeds to step S69 in FIG.
  • FIG. 40 is a diagram illustrating an example of an input image for explaining the edge strength and region luminance determination processing in step S68 of FIG.
  • FIG. 41 is a diagram showing an example of character string candidates selected in step S90 of FIG.
  • FIG. 42 is a diagram illustrating an example of character string candidates processed by the edge strength and region luminance determination processing in step S68 of FIG. 40 to 42, it can be seen that noise is reduced based on the edge strength and the region luminance.
  • step S69 of FIG. 11 the control device 1 executes an average height determination process.
  • FIG. 13 is a flowchart showing a subroutine of average height determination processing in step S69 of FIG.
  • the control device 1 selects one character string candidate.
  • the control device 1 connects the objects included in each character candidate in the height direction. In order to connect the objects in the height direction, a closing process is performed in the height direction (that is, an area expansion process is performed and then a contraction process is performed).
  • the control device 1 calculates an average height and deviation of each character candidate, and determines a reference range for the height. In order to determine the reference range of height, instead of calculating the average and the deviation, an intermediate value of the height of each object in the character string candidate may be calculated.
  • step S ⁇ b> 104 the control device 1 deletes a character candidate that does not have the height of the specified range, and extracts a new character string candidate separated by deleting the character candidate from the original character string candidate.
  • FIG. 43A is a diagram illustrating an example of the character string candidates selected in step S101 of FIG.
  • FIG. 43B is a diagram showing an example of a new character string candidate extracted in step S104 of FIG.
  • the character candidate 42a is deleted as noise, and new character string candidates 41c and 41d are extracted.
  • step S105 in FIG. 13 the control device 1 determines whether or not there is an unprocessed character string candidate. If YES, the process proceeds to step S101, and if NO, the process proceeds to step S70 in FIG.
  • step S70 of FIG. 11 the control device 1 determines whether or not the number of character string candidates is 0. If YES, the control device 1 proceeds to steps S52, S54, S56 of FIG. 9 or step S7 of FIG. If NO, the process proceeds to step S71. In step S71, the control device 1 selects one character string candidate. In step S72, the control device 1 executes date pattern determination processing.
  • FIG. 14 is a flowchart showing a subroutine of date pattern determination processing in steps S72 and S75 of FIG.
  • the control device 1 stores therein a table including a plurality of date patterns including a two-digit or four-digit number representing a year, a one-digit or two-digit number representing a month, and a predetermined punctuation mark. ing. Taking “July 2012” as an example, the date has the following pattern, for example.
  • Each date pattern specifies how numbers and punctuation are arranged.
  • step S111 of FIG. 14 the control device 1 performs OCR for alphanumeric characters on the character string candidate.
  • step S112 the control device 1 selects one date pattern from the date patterns held in the internal table.
  • the control device 1 determines whether or not the character string recognized in step S111 matches the date pattern selected in step S112.
  • step S113 the control device 1 determines whether or not the character string matches the date pattern. If YES, the process proceeds to step S114, and if NO, the process proceeds to step S115.
  • step S114 the control device 1 determines whether or not the character string includes “alphabetic characters that are clearly not mistaken for numbers”. If YES, the process proceeds to step S115. If NO, the process proceeds to step S117.
  • step S115 the control device 1 determines whether or not all date patterns have been used. If YES, the control device 1 proceeds to step S73 (or step S76) in FIG. 11, and if NO, the process returns to step S112. Select a date pattern. In step S117, the control device 1 determines whether or not the height of the character in the character string is constant.
  • step S116 the control device 1 determines whether or not the character string includes alphabetic characters. If YES, the process proceeds to step S117, and if NO, the process proceeds to step S118. In step S117, the control device 1 performs OCR for numbers on the character string candidate, and recognizes that the character string candidate includes an alphabetic character as a number.
  • tilt correction may be performed.
  • a character string including “1” can be recognized without error.
  • step S118 of FIG. 14 the control device 1 determines whether or not the character string is a date. If YES, the process proceeds to step S73 (or step S76) of FIG. 11, and if NO, the process returns to step S113. .
  • step S73 in FIG. 11 the control device 1 determines whether or not the date pattern has been successfully determined. If YES, the process proceeds to steps S52, S54, S56 in FIG. 9 or step S7 in FIG. If YES, go to step S74.
  • step S74 the control device 1 rotates the character string candidate by 180 degrees.
  • step S75 the control device 1 executes the same date pattern determination process as described above for the character string candidate rotated by 180 degrees.
  • step S76 the control device 1 determines whether or not the date pattern has been successfully determined. If YES, the control device 1 proceeds to steps S52, S54, S56 in FIG. 9 or step S7 in FIG. 6, and if NO, Proceed to step S77.
  • step S77 the control device 1 determines whether or not there is an unprocessed character string candidate. If YES, the process returns to step S71. If NO, step S52, S54, S56 in FIG. 9 or FIG. The process proceeds to step S7.
  • step S7 of FIG. 6 the control device 1 determines whether or not the OCR has succeeded, that is, whether or not the character string representing the expiration date has been successfully extracted. If YES, the process proceeds to step S8. If NO, the process proceeds to step S10. When the month is recognized as “1”, it is actually “10” to “12”, but it may be erroneously recognized as “1” due to the angle of the container 13 or the like. is there. In the following steps, when a character string candidate related to one input image includes only “1” as a number representing the month, does a character string candidate related to another input image include only “1” as a number representing the month? Judge whether or not. In step S8, the control device 1 determines whether or not the month is “1”.
  • step S9 the control device 1 determines whether or not the same date has been detected twice. If YES, the process proceeds to step S12. If NO, the process proceeds to step S10.
  • step S10 the control device 1 determines whether or not the container 13 has made one turn, the process proceeds to step S13 if YES, and the process proceeds to step S11 if NO.
  • step S ⁇ b> 11 the control device 1 rotates the container 13. For example, when the container 13 is rotated by 15 degrees, a total of 24 input images can be acquired.
  • step S12 the control device 1 outputs a date.
  • step S13 the control device 1 outputs an error.
  • various noises included in the image of the character string are removed in advance before optically recognizing the character string.
  • a character string representing a date can be recognized with high accuracy.
  • the input image is not limited to a cylindrical container image, and may be another image (a flat object image or arbitrary image data).
  • the date detection process of FIGS. 6 to 14 may be executed at least partially by the PC 9.
  • an optical character recognition method for recognizing a character string representing a date may be performed.
  • Such an optical character recognition method may be implemented as a computer program that optically recognizes a character string when executed by a computer.
  • Such a computer program may be stored in a computer-readable recording medium.
  • such a computer program is stored in the recording medium 10 of FIG. 1, and when the PC 9 reads the computer program from the recording medium 10, the optical character recognition method is performed according to the computer program.
  • the optical character recognition device recognizes a character string representing a date with higher accuracy than before if the date includes a predetermined punctuation and is printed with characters having a normal typeface. can do.
  • dates that include special punctuation for example, “2015/5”, “2015 5”
  • dates printed with characters that have special typefaces for example, a plurality of dots separated from each other
  • a special pattern it is necessary to relax various judgment conditions (threshold values, etc.) in the date detection processing of FIGS. 6 to 14 and extract a large number of character string candidates. is there. Relaxing the judgment conditions in the date detection process increases noise and increases the time required to execute the date detection process, so it is desirable to be able to recognize the date of the special pattern while suppressing an increase in execution time. .
  • FIG. 44 is a flowchart showing date detection processing executed by the control device 1 of the optical character recognition device according to the second embodiment of the present invention. Steps S1 to S12 in FIG. 44 are the same as steps S1 to S12 in FIG.
  • the date detection process in FIG. 44 includes a special pattern date detection process in step S14 instead of step S13 in FIG. In the date detection process of the special pattern in step S14, the judgment conditions (threshold value, etc.) that are more relaxed than those used in steps S2, S4, and S6 of FIG. 44 are set, and the date detection process of FIG. Execute. There are few types and quantities of containers on which the date of the special pattern is printed, and the dates printed on most containers can be recognized by executing a date detection process in which limited conditions are set to some extent.
  • the date detection process of the special pattern of step S14 is executed only when the character string of the date is not recognized by executing steps S1 to S11 of FIG.
  • the date of the special pattern can be recognized while suppressing the increase.
  • the date character string is orthogonal to the rotation axis of the cylindrical container. (FIGS. 3 and 4), there is a possibility that the entire date does not fit in the image. When the date string extends over a half circumference of the side surface of the cylindrical container, an image including the entire date cannot be acquired.
  • FIG. 45 is a flowchart showing date detection processing executed by the control device 1 of the optical character recognition device according to the third embodiment of the present invention. Steps S1 to S12 in FIG. 45 are the same as steps S1 to S12 in FIG.
  • the date detection process in FIG. 45 includes a date detection process for linked images in step S15 instead of step S13 in FIG.
  • FIG. 46 is a flowchart showing a subroutine of date detection processing for linked images in step S15 of FIG.
  • the control device 1 photographs the container 13 with the camera 5 while rotating the container 13 by a certain angle using the rollers 8a and 8b, and acquires a plurality of images representing different angles of the container 13, respectively. .
  • the control device 1 connects a plurality of images including portions adjacent to each other of the container 13 to generate one connected image. Specifically, the control device 1 connects these images by recognizing a similar object in two adjacent images.
  • the connected image is a planar image in which the side surface of the container is developed.
  • the control device 1 corrects the curved portion of the container 13 to a plane using projective transformation, with the width of the container 13 as the diameter of the cylinder.
  • Steps S2 to S9, S12, and S13 in FIG. 46 are the same as steps S2 to S9, S12, and S13 in FIG.
  • control device 1 may generate a connected image in advance before executing step S15 in FIG.
  • a line camera for generating an image of a side surface of a cylindrical object.
  • a line camera in addition to the cost of the line camera itself, there is a cost to provide a mechanism for rotating an object with high accuracy. Since the medicine container has various shapes and sizes, the cost for rotating the medicine container with sufficient accuracy for photographing with a line camera becomes very large.
  • the date detection process of FIG. 45 it is possible to suppress an increase in cost by connecting a plurality of images captured by a normal camera to generate a connected image.
  • the date detection process of the linked image in step S15 is executed only when the character string of the date is not recognized by executing steps S1 to S11 in FIG. Dates that do not fall within one image can be recognized while suppressing the increase.
  • FIG. 47 is a flowchart showing a date pattern determination processing subroutine of date detection processing executed by the control device 1 of the optical character recognition device according to the fourth embodiment of the present invention.
  • the date pattern determination process in FIG. 47 is executed in steps S72 and S75 in FIG. 11, and includes additional steps S121 and S122 between steps S113 and S114 in FIG.
  • step S121 of FIG. 47 when the number representing the month of the character string matching the date pattern is any one of “10”, “11”, and “12”, the control device 1 is based on the criteria described below. Whether or not there are other characters after the date is determined. If YES, the process proceeds to step S122. If NO, the process proceeds to step S114.
  • FIG. 48 is a diagram showing an example of a character string candidate including a date character string and other characters. Another character “CJ932” exists after the date “20166.1”. If “C” is mistakenly recognized as “0”, the character string matching the date pattern is mistakenly recognized as “2016.10”. When detecting the date character string “2016.10”, the control device 1 determines whether or not the last “0” is actually a part of the date.
  • the distances D1 to D10 between characters in FIG. 48 are, for example, as follows in units of the number of pixels.
  • the distance D6 and the distance between characters D7 to D2016 after “2016.10” are determined.
  • the average value of D10 is compared.
  • the control device 1 determines that the last “0” of “2016.10” is not part of the date, and in step S122, the character “CJ932” is determined. Remove.
  • the control device 1 determines that the last “0” of “2016.10” is part of the date. Thereby, even if there is another character immediately after the date character string, the character string representing the date can be recognized with high accuracy.
  • control device 1 uses the character string candidate when the character string candidate includes two numbers representing the month and at least one other character following the two numbers representing the month, and 2 representing the month.
  • the distance between two numbers is greater than the average of the distance between the two numbers representing the month and other characters and the distance between the other characters (step S121)
  • the first digit of the two numbers representing the month And other characters are removed (step S122).
  • the optical character recognition device, the optical character recognition method, the computer program, and the recording medium of the present invention can recognize a character string representing a date with higher accuracy than before.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Character Input (AREA)
  • Character Discrimination (AREA)
  • Image Analysis (AREA)
  • Medical Preparation Storing Or Oral Administration Devices (AREA)

Abstract

 光学文字認識装置は、入力画像から、認識対象のオブジェクトを含む目標領域を抽出する。光学文字認識装置は、目標領域に含まれるオブジェクトから、少なくとも1つの文字列候補のオブジェクトを含む候補オブジェクトを抽出する。光学文字認識装置は、候補オブジェクトのラベリングを行って、予め決められた方向に延在して互いに近接した複数のオブジェクトを文字列候補として抽出し、文字列候補が、年を表す2桁又は4桁の数字と、月を表す1桁又は2桁の数字と、予め決められた約物とを含む日付のパターンを有するか否かを判断し、文字列候補が日付のパターンを有するとき、文字列候補を日付として認識する。

Description

光学文字認識装置
 本発明は、文字列を光学的に認識する光学文字認識装置に関し、特に、日付を表す文字列を認識する光学文字認識装置に関する。本発明はまた、日付を表す文字列を認識するための光学文字認識方法、コンピュータプログラム、及び記録媒体に関する。
 薬品の容器に印字されている文字を光学的に認識する装置に対する需要が存在している(特許文献1を参照)。例えば、病棟にいったん運ばれ、結果的に使用されなかった注射薬などの薬品を保管庫に返却する場合、その薬品を次回の使用時に迅速かつ間違いなく取り出せるように、薬品の種類、名称、及び使用期限などに基づいて仕分けをして保管する必要がある。光学文字認識装置を用いて、この仕分けを自動的に行う返戻装置を実現することができれば、作業の効率化及びミスの削減のために効果的である。また、このような返戻装置を用いて薬品を保管する場合、薬品の保管場所が記録されるので、次回の使用の際にも、処方に基づいて適切な薬品を自動的に払い出すことができる。
特許第4857768号公報。
 光学文字認識装置により文字列を光学的に認識する場合、文字列の画像に含まれるさまざまなノイズに起因して、誤認識が生じる可能性がある。認識の精度を向上させるためには、画像から予めノイズを除去する必要がある。
 本発明は、以上の課題を解決し、従来よりも高い精度で日付を表す文字列を認識することができる光学文字認識装置、光学文字認識方法、コンピュータプログラム、及び記録媒体を提供することにある。
 本発明の第1の態様に係る光学文字認識装置によれば、文字列を光学的に認識する光学文字認識装置において、上記光学文字認識装置は、
 入力画像から、認識対象のオブジェクトを含む目標領域を抽出する第1の処理手段と、
 上記目標領域に含まれるオブジェクトから、少なくとも1つの文字列候補のオブジェクトを含む候補オブジェクトを抽出する第2の処理手段と、
 上記候補オブジェクトのラベリングを行って、予め決められた方向に延在して互いに近接した複数のオブジェクトを上記文字列候補として抽出し、上記文字列候補が、年を表す2桁又は4桁の数字と、月を表す1桁又は2桁の数字と、予め決められた約物とを含む日付のパターンを有するか否かを判断し、上記文字列候補が上記日付のパターンを有するとき、上記文字列候補を日付として認識する第3の処理手段とを備えたことを特徴とする。
 本発明の第2の態様に係る光学文字認識装置によれば、第1の態様に係る光学文字認識装置において、
 上記第2の処理手段は、
 上記目標領域に含まれるオブジェクトの輪郭及びエッジを検出し、
 互いに重なり合う輪郭及びエッジを有するオブジェクトを上記候補オブジェクトとして抽出することを特徴とする。
 本発明の第3の態様に係る光学文字認識装置によれば、第2の態様に係る光学文字認識装置において、
 上記第2の処理手段は、
 上記目標領域にソーベルフィルタを適用して第1のエッジを検出し、
 上記第1のエッジの近傍の領域にキャニーフィルタを適用して第2のエッジを検出し、
 上記第2のエッジを、上記目標領域に含まれるオブジェクトのエッジとして使用することを特徴とする。
 本発明の第4の態様に係る光学文字認識装置によれば、第1~第3のいずれか1つの態様に係る光学文字認識装置において、
 上記第3の処理手段は、
 上記文字列候補のオブジェクトのラベリングを行って複数の文字候補を抽出し、
 上記文字列候補が延在する方向に平行な幅及び上記文字列候補が延在する方向に直交する高さを有する矩形形状をそれぞれ有し、上記各文字候補をそれぞれ包囲する複数のバウンディングボックスを生成し、
 上記各バウンディングボックスを、当該バウンディングボックスの高さが低いほど当該バウンディングボックスの幅を拡大するように変形し、
 変形により連結されたバウンディングボックスに含まれる文字候補の組を、新たな文字列候補として抽出することを特徴とする。
 本発明の第5の態様に係る光学文字認識装置によれば、第1~第4のいずれか1つの態様に係る光学文字認識装置において、
 上記第3の処理手段は、
 上記文字列候補のオブジェクトのラベリングを行って複数の文字候補を抽出し、
 10個より多数の文字候補を含む文字列候補を削除することを特徴とする。
 本発明の第6の態様に係る光学文字認識装置によれば、第1~第5のいずれか1つの態様に係る光学文字認識装置において、
 上記第3の処理手段は、
 上記文字列候補のオブジェクトのラベリングを行って複数の文字候補を抽出し、
 上記文字列候補が延在する方向に直交する方向において2個以上のオブジェクトを含む文字候補のみを含む文字列候補を削除することを特徴とする。
 本発明の第7の態様に係る光学文字認識装置によれば、第1~第6のいずれか1つの態様に係る光学文字認識装置において、
 上記第3の処理手段は、
 上記文字列候補のオブジェクトの輪郭及びエッジを検出し、
 上記エッジの画素が上記輪郭の画素に一致する部分が上記エッジの画素の面積の60%以下である文字列候補を削除することを特徴とする。
 本発明の第8の態様に係る光学文字認識装置によれば、第1~第7のいずれか1つの態様に係る光学文字認識装置において、
 上記第3の処理手段は、上記文字列候補が明らかに数字と間違えることのない英字を含むとき、上記文字列候補を日付ではないものとして認識することを特徴とする。
 本発明の第9の態様に係る光学文字認識装置によれば、第1~第8のいずれか1つの態様に係る光学文字認識装置において、
 上記第3の処理手段は、上記文字列候補が、月を表す2つの数字と、上記月を表す2つの数字に後続する少なくとも1つの他の文字とを含むとき、かつ、上記月を表す2つの数字間の距離が、上記月を表す2つの数字と他の文字との距離及び上記他の文字間の距離の平均値より大きいとき、上記月を表す2つの数字の1の位の数字及び上記他の文字を除去することを特徴とする。
 本発明の第10の態様に係る光学文字認識装置によれば、第1~第9のいずれか1つの態様に係る光学文字認識装置において、
 上記入力画像は、回転可能に保持された円筒形状の容器の画像であることを特徴とする。
 本発明の第11の態様に係る光学文字認識装置によれば、第10の態様に係る光学文字認識装置において、
 上記第1の処理手段は、上記入力画像から、上記円筒形状の容器の回転軸に実質的に直交する方向に延在するエッジと、予め決められたしきい値よりも高い輝度の部分とを含む領域を、上記目標領域として抽出することを特徴とする。
 本発明の第12の態様に係る光学文字認識装置によれば、第10又は第11の態様に係る光学文字認識装置において、
 上記光学文字認識装置は、上記容器を回転させながら撮影された上記容器の異なる角度をそれぞれ表す複数の入力画像を取得し、
 上記第3の処理手段は、1つの入力画像に係る文字列候補が月を表す数字として「1」のみを含むとき、他の入力画像に係る文字列候補が月を表す数字として「1」のみを含むか否かを判断することを特徴とする。
 本発明の第13の態様に係る光学文字認識装置によれば、第10~第12のいずれか1つの態様に係る光学文字認識装置において、
 上記光学文字認識装置は、
 カメラと、
 上記円筒形状の容器の回転軸の周りに回転可能であるように上記容器を保持する撮影台と、
 少なくとも1つの保管庫と上記撮影台との間で上記容器を移動させる移動装置とを備え、
 上記容器には、上記容器中の薬品の使用期限の日付を表す文字列が印字されていることを特徴とする。
 本発明の第14の態様に係る光学文字認識方法によれば、
 文字列を光学的に認識する光学文字認識方法において、上記光学文字認識方法は、
 入力画像から、認識対象のオブジェクトを含む目標領域を抽出する第1のステップと、
 上記目標領域に含まれるオブジェクトから、少なくとも1つの文字列候補のオブジェクトを含む候補オブジェクトを抽出する第2のステップと、
 上記候補オブジェクトのラベリングを行って、予め決められた方向に延在して互いに近接した複数のオブジェクトを上記文字列候補として抽出し、上記文字列候補が、年を表す2桁又は4桁の数字と、月を表す1桁又は2桁の数字と、予め決められた約物とを含む日付のパターンを有するか否かを判断し、上記文字列候補が上記日付のパターンを有するとき、上記文字列候補を日付として認識する第3のステップとを備えたことを特徴とする。
 本発明の第15の態様に係るコンピュータプログラムによれば、
 コンピュータによって実行されたときに文字列を光学的に認識するコンピュータプログラムにおいて、上記コンピュータプログラムは、
 入力画像から、認識対象のオブジェクトを含む目標領域を抽出する第1のステップと、
 上記目標領域に含まれるオブジェクトから、少なくとも1つの文字列候補のオブジェクトを含む候補オブジェクトを抽出する第2のステップと、
 上記候補オブジェクトのラベリングを行って、予め決められた方向に延在して互いに近接した複数のオブジェクトを上記文字列候補として抽出し、上記文字列候補が、年を表す2桁又は4桁の数字と、月を表す1桁又は2桁の数字と、予め決められた約物とを含む日付のパターンを有するか否かを判断し、上記文字列候補が上記日付のパターンを有するとき、上記文字列候補を日付として認識する第3のステップとを備えたことを特徴とする。
 本発明の第16の態様に係る記録媒体によれば、
 コンピュータによって実行されたときに文字列を光学的に認識するコンピュータプログラムを格納したコンピュータにより読み取り可能な記録媒体において、上記コンピュータプログラムは、
 入力画像から、認識対象のオブジェクトを含む目標領域を抽出する第1のステップと、
 上記目標領域に含まれるオブジェクトから、少なくとも1つの文字列候補のオブジェクトを含む候補オブジェクトを抽出する第2のステップと、
 上記候補オブジェクトのラベリングを行って、予め決められた方向に延在して互いに近接した複数のオブジェクトを上記文字列候補として抽出し、上記文字列候補が、年を表す2桁又は4桁の数字と、月を表す1桁又は2桁の数字と、予め決められた約物とを含む日付のパターンを有するか否かを判断し、上記文字列候補が上記日付のパターンを有するとき、上記文字列候補を日付として認識する第3のステップとを備えたことを特徴とする。
 本発明の第17の態様に係る光学文字認識装置によれば、第1~第13のいずれか1つの態様に係る光学文字認識装置において、
 上記光学文字認識装置は、上記容器を回転させながら撮影された上記容器の異なる角度をそれぞれ表す複数の入力画像を取得し、上記複数の入力画像を連結することを特徴とする。
 本発明の光学文字認識装置、光学文字認識方法、コンピュータプログラム、及び記録媒体は、従来よりも高い精度で日付を表す文字列を認識することができる。
本発明の第1の実施形態に係る光学文字認識装置の構成を示すブロック図である。 第1の例に係る文字列が印字された容器13aを示す上面図である。 第2の例に係る文字列が印字された容器13bを示す上面図である。 第3の例に係る文字列が印字された容器13cを示す上面図である。 第4の例に係る文字列が印字された容器13dを示す上面図である。 図1の制御装置1によって実行される日付検出処理を示すフローチャートである。 図6のステップS2における目標領域抽出処理のサブルーチンを示すフローチャートである。 図6のステップS4における候補オブジェクト抽出処理のサブルーチンを示すフローチャートである。 図6のステップS6におけるOCR処理のサブルーチンを示すフローチャートである。 図9のステップS51,S53,S55,S57におけるOCRサブルーチンの第1の部分を示すフローチャートである。 図9のステップS51,S53,S55,S57におけるOCRサブルーチンの第2の部分を示すフローチャートである。 図11のステップS68におけるエッジ強度及び領域輝度判定処理のサブルーチンを示すフローチャートである。 図11のステップS69における平均高さ判定処理のサブルーチンを示すフローチャートである。 図11のステップS72,S75における日付パターン判定処理のサブルーチンを示すフローチャートである。 図7のステップS21において抽出された画像中の輝度が高い部分の例を示す図である。 図7のステップS22において抽出された画像中の長い縦エッジの例を示す図である。 図15の輝度が高い部分及び図16の長い縦エッジを重ね合わせた図である。 図15の輝度が高い部分及び図16の長い縦エッジを含む目標領域21を示す図である。 図8のステップS31において抽出された明オブジェクトの例を示す図である。 図8のステップS33において抽出された暗オブジェクトの例を示す図である。 図8のステップS31における移動平均フィルタを用いた明オブジェクトの抽出を示す図である。 明オブジェクト及び暗オブジェクトを含む画像を示す図である。 図22Aの画像からの明オブジェクトの抽出を示す図である。 図22Aの画像からの暗オブジェクトの抽出を示す図である。 図8のステップS35においてソーベルフィルタを用いて抽出された画像中のエッジの例を示す図である。 図8のステップS36において、ステップS35において抽出されたエッジ以外の領域を削除した後の画像の例を示す図である。 図8のステップS37においてしきい値15のキャニーフィルタを用いて抽出された画像中のエッジの例を示す図である。 図8のステップS37においてしきい値4のキャニーフィルタを用いて抽出された画像中のエッジの例を示す図である。 図8のステップS38において抽出された明オブジェクトの候補オブジェクトの例を示す図である。 図8のステップS39において抽出された暗オブジェクトの候補オブジェクトの例を示す図である。 オブジェクトの例を示す図である。 図29Bはしきい値200を用いて抽出された図29Aの2値化画像を示す図である。 図29Bの輪郭を示す図である。 しきい値50を用いて抽出された図29Aのエッジを示す図である。 しきい値200を用いて抽出された図29Aのエッジを示す図である。 文字の輪郭及びエッジを示す図である。 図10のステップS61において抽出された文字列候補の例を示す図である。 図10のステップS61における文字列候補の抽出を示す図である。 図10のステップS62において抽出された文字候補及び生成されたバウンディングボックスの例を示す図である。 図10のステップS61において抽出された文字列候補の例を示す図である。 図10のステップS62において抽出された文字候補及び生成されたバウンディングボックス42の例を示す図である。 図10のステップS63において変形されたバウンディングボックス43の例を示す図である。 図10のステップS64において抽出された新たな文字列候補の例を示す図である。 図10のステップS61において抽出された文字列候補の他の例を示す図である。 図10のステップS62において抽出された文字候補及び生成されたバウンディングボックス42の他の例を示す図である。 図10のステップS65,S66,S67において一部の文字列候補を削除した後の文字列候補の例を示す図である。 図10のステップS64において抽出された文字列候補の例を示す図である。 図36Aの文字列候補に含まれる各文字候補の高さ方向におけるオブジェクトの個数を示す図である。 図10のステップS64において抽出された文字列候補の他の例を示す図である。 図37Aの文字列候補に含まれる各文字候補の高さ方向におけるオブジェクトの個数を示す図である。 入力画像の例を示す図である。 図38Aの画像から抽出された明オブジェクトの候補オブジェクトを示す図である。 図38Bの候補オブジェクトの輪郭を示す図である。 図38Aの画像から抽出されたエッジを示す図である。 入力画像の例を示す図である。 図39Aの画像から抽出された暗オブジェクトの候補オブジェクトを示す図である。 図39Bの候補オブジェクトの輪郭を示す図である。 図39Aの画像から抽出されたエッジを示す図である。 図11のステップS68におけるエッジ強度及び領域輝度判定処理を説明するための入力画像の例を示す図である。 図12のステップS90において選択された文字列候補の例を示す図である。 図11のステップS68におけるエッジ強度及び領域輝度判定処理によって処理された文字列候補の例を示す図である。 図13のステップS101において選択された文字列候補の例を示す図である。 図13のステップS104において抽出された新たな文字列候補の例を示す図である。 本発明の第2の実施形態に係る光学文字認識装置の制御装置1によって実行される日付検出処理を示すフローチャートである。 本発明の第3の実施形態に係る光学文字認識装置の制御装置1によって実行される日付検出処理を示すフローチャートである。 図45のステップS15における連結画像の日付検出処理のサブルーチンを示すフローチャートである。 本発明の第4の実施形態に係る光学文字認識装置の制御装置1によって実行される日付検出処理の日付パターン判定処理のサブルーチンを示すフローチャートである。 日付の文字列及び他の文字を含む文字列候補の例を示す図である。
第1の実施形態.
 図1は、本発明の第1の実施形態に係る光学文字認識装置の構成を示すブロック図である。図1の光学文字認識装置は、円筒形状の容器13の表面に印字された日付の文字列を光学的に認識する。
 図1の光学文字認識装置は、制御装置1、レール2、移動装置3、カメラ4~6、照明装置7a,7b、及びローラー8a,8bを備える。少なくとも2つのローラー8a,8bは、互いに平行に設けられ、かつ、制御装置1の制御下で動作する駆動装置を備え、これにより、容器13を回転可能に保持する。光学文字認識装置は、さらに、容器13を収容する少なくとも1つのトレー(又は保管庫)11,12を備える。移動装置3は、制御装置1の制御下で、トレー11,12及びローラー8a,8bの間で容器13を移動させる。カメラ4~6は、トレー11,12及びローラー8a,8b上にそれぞれ設けられ、容器13がトレー11,12及びローラー8a,8b上にあるときに容器13の画像をそれぞれ取得し、制御装置1に送る。照明装置7a,7bは、ローラー8a,8b上の容器13に照明を当てる。ローラー8a,8b及び照明装置7a,7bは、容器13のための撮影台として機能する。光学文字認識装置は、ローラー8a,8bに代えて、円筒形状の容器13の回転軸の周りに回転可能であるように容器13を保持する他の機構を備えてもよい。制御装置1は、カメラ5から送られた容器13の画像に対して、図6~図14を参照して後述する日付検出処理を実行し、容器13の表面に印字された日付を認識する。移動装置3に追加のカメラが設けられてもよい。制御装置1は、記録媒体10から読み取られたコンピュータプログラムに従って動作する外部のパーソナルコンピュータ(PC)9に接続されていてもよい。
 容器13は、例えば、薬品の容器(アンプル)であり、容器13には、容器13中の薬品の使用期限の日付を表す文字列が印字されている。例えば、このような容器13が病棟から返却されてトレー11に置かれたとき、光学文字認識装置は、移動装置3を用いて容器13をトレー11からローラー8a,8b上に移動させ、ローラー8a,8b上において、容器13に印字された使用期限の日付を光学的に認識する。次いで、光学文字認識装置は、認識された日付に基づいて、容器を保管するか廃棄するかを決定し、移動装置3を用いて、適切な保管庫又はゴミ箱に関連付けられた他のトレー12に容器13を移動させる。
 図2~図5に、容器13に印字された文字列の例を示す。図2は、第1の例に係る文字列が印字された容器13aを示す上面図である。図3は、第2の例に係る文字列が印字された容器13bを示す上面図である。図4は、第3の例に係る文字列が印字された容器13cを示す上面図である。図5は、第4の例に係る文字列が印字された容器13dを示す上面図である。文字列は、容器に貼られたラベル上に印字されていてもよく、容器上に直接に印字されていてもよい。また、文字列の向きは、円筒形状の容器13の回転軸に平行であってもよく、容器13の回転軸に直交してもよく、又は、これらの向きの文字列が混在していてもよい。
 制御装置1は、入力画像から、認識対象のオブジェクトを含む目標領域を抽出する第1の処理手段として動作する。また、制御装置1は、目標領域に含まれるオブジェクトから、少なくとも1つの文字列候補のオブジェクトを含む候補オブジェクトを抽出する第2の処理手段として動作する。また、制御装置1は、候補オブジェクトのラベリングを行って、予め決められた方向に延在して互いに近接した複数のオブジェクトを文字列候補として抽出し、文字列候補が、年を表す2桁又は4桁の数字と、月を表す1桁又は2桁の数字と、予め決められた約物(punctuation mark)とを含む日付のパターンを有するか否かを判断し、文字列候補が日付のパターンを有するとき、文字列候補を日付として認識する第3の処理手段として動作する。
 以下、図6~図14を参照して、図1の制御装置1によって実行される日付検出処理について説明する。
 図6は、図1の制御装置1によって実行される日付検出処理を示すフローチャートである。制御装置1は、ローラー8a,8bを用いて容器13を一定角度(例えば15度)ずつ回転させながらカメラ5により容器13を撮影して、容器13の異なる角度をそれぞれ表す複数の画像(入力画像)を取得する。カメラ5としては、容器13に印字された文字列を光学的に認識するために十分な解像度を有するものが使用される。例えば、容器13は直径10~40mmを有し、例えば、容器13を含む120×90mmにわたる範囲を、画素数3840×2748(約1000万画素)で撮影する白黒のカメラが使用される。この場合、容器13上の1mmは32画素に相当する。図6のステップS1において、制御装置1は、容器13の複数の画像のうちの1つを取得する。ステップS2において、制御装置1は、目標領域抽出処理を実行する。
 図7は、図6のステップS2における目標領域抽出処理のサブルーチンを示すフローチャートである。
 図7のステップS21において、制御装置1は、ステップS1で取得された画像から、予め決められたしきい値よりも高い輝度の部分(例えば照明の反射を含む部分)を抽出する。制御装置1は、例えば画素の輝度が0~255にわたって変化するとき、例えば220より高い輝度を有する部分を抽出する。図15は、図7のステップS21において抽出された画像中の輝度が高い部分の例を示す図である。ここで、入力画像は、図5の容器13dの画像である。
 次いで、図7のステップS22において、制御装置1は、ステップS1で取得された画像から、円筒形状の容器13の回転軸に実質的に直交する方向に延在する長いエッジ(縦エッジ)を抽出する。容器13の背景にはローラー8a,8bが存在するが、ローラー8a,8bは、容器13の回転軸に平行に延在するので、縦エッジを抽出することでローラー8a,8bの影響を除去することができる。
 ステップS22においてエッジを抽出するために、次式のソーベル(Sobel)フィルタが使用される。
Figure JPOXMLDOC01-appb-M000001
 ソーベルフィルタにより抽出されたエッジのうち、短いもの、例えば55画素の長さに満たないものは、ノイズとして削除される。図16は、図7のステップS22において抽出された画像中の長い縦エッジの例を示す図である。図5の容器13dの回転軸は図5のX軸に平行であり、従って、ステップS22では、図5のY軸に実質的に平行な方向に延在するエッジが抽出される。
 図7のステップS23において、制御装置1は、輝度が高い部分及び縦エッジを含む矩形領域(幅w1×高さh1)を目標領域として抽出し、目標領域の外部の領域を削除する。図17は、図15の輝度が高い部分及び図16の長い縦エッジを重ね合わせた図である。図18は、図15の輝度が高い部分及び図16の長い縦エッジを含む目標領域21を示す図である。目標領域は、認識対象の文字列のオブジェクトを含むと考えられる領域である。
 再び図6を参照すると、ステップS2の目標領域抽出処理の実行後、ステップS3において、制御装置1は、目標領域の抽出に成功したか否かを判断し、YESのときはステップS4に進み、NOのときはステップS10に進む。ステップS4において、制御装置1は、候補オブジェクト抽出処理を実行する。
 図8は、図6のステップS4における候補オブジェクト抽出処理のサブルーチンを示すフローチャートである。
 図8のステップS31において、制御装置1は、目標領域の画像に対して移動平均フィルタを適用することにより、周囲よりも明るい明オブジェクトを抽出し、画像を2値化する。黒地に白字の文字列は、明オブジェクトとして抽出される。照明の当たり方にムラがあるので、単純な2値化を行うだけではオブジェクトを検出できない。従って、移動平均フィルタを用いた2値化方法(動的しきい値法)を使用する。図21は、図8のステップS31における移動平均フィルタを用いた明オブジェクトの抽出を示す図である。図21に示す原理によれば、制御装置1は、入力画像(ここでは、目標領域の画像)の輝度から、その局所的な平均輝度を計算し、局所的な平均輝度に所定のオフセットを加算した輝度よりも高い輝度を有するオブジェクト(すなわち、周囲と比べて突出した明るさを有するオブジェクト)を、明オブジェクトとして抽出する。局所的な平均輝度を計算するために参照する局所的な領域のサイズは、目標領域全体のサイズに基づいて決定される。図19は、図8のステップS31において抽出された明オブジェクトの例を示す図である。次いで、ステップS32において、制御装置1は、2値化された明オブジェクトの輪郭を検出する。
 次いで、図8のステップS33~S34では、ステップS31~S32で明オブジェクトに対して行った処理と同様の処理を、暗オブジェクトに対して行う。ステップS33において、制御装置1は、目標領域の画像に対して移動平均フィルタを適用することにより、周囲よりも暗い暗オブジェクトを抽出し、画像を2値化する。白地に黒字の文字列は、暗オブジェクトとして抽出される。図20は、図8のステップS33において抽出された暗オブジェクトの例を示す図である。ステップS34において、制御装置1は、2値化された暗オブジェクトの輪郭を検出する。
 図22Aは、明オブジェクト及び暗オブジェクトを含む画像を示す図である。図22Bは、図22Aの画像からの明オブジェクトの抽出を示す図である。図22Cは、図22Aの画像からの暗オブジェクトの抽出を示す図である。1つの文字列は、明オブジェクト及び暗オブジェクトの一方であると考えられる。図8のステップS31~S34において明オブジェクト及び暗オブジェクトの両方を抽出しているので、容器13に印字された日付を確実に検出することができる。
 次いで、図8のステップS35において、制御装置1は、次式のソーベルフィルタを用いて、目標領域の画像中のエッジを抽出する。
Figure JPOXMLDOC01-appb-M000002
Figure JPOXMLDOC01-appb-M000003
Figure JPOXMLDOC01-appb-M000004
 ここで、bは、ある画素に演算子Bを適用した結果を示し、cは、同じ画素に演算子Cを適用した結果を示す。図23は、図8のステップS35においてソーベルフィルタを用いて抽出された画像中のエッジの例を示す図である。
 次いで、図8のステップS36において、制御装置1は、目標領域の画像から、ステップS35で抽出されたエッジ以外の領域を削除する。図24は、図8のステップS36において、ステップS35において抽出されたエッジ以外の領域を削除した後の画像の例を示す図である。次いで、図8のステップS37において、制御装置1は、ステップS36の削除を行った後の画像に対してキャニー(Canny)フィルタを適用し、画像中のエッジを抽出する。
 キャニーのエッジ検出方法は、以下の3つのステップを含む。第1のステップとして、画像について、次式の勾配の大きさg(x,y)及び勾配の向きd(x,y)を計算する。
Figure JPOXMLDOC01-appb-M000005
Figure JPOXMLDOC01-appb-M000006
 ここで、f(x,y)は、標準偏差σを有するガウス関数のx方向に関する一次微分と、画素値関数との畳み込みを示し、f(x,y)は、同じガウス関数のy方向に関する一次微分と、画素値関数との畳み込みを示す。
 キャニーのエッジ検出方法の第2のステップとして、勾配の大きさg(x,y)の最大値を求めることで、エッジを検出する。このとき、注目画素の周囲8画素を用いて勾配の向きd(x,y)に対して補間した勾配の大きさを推定し、それらの推定値と比較することにより、注目画素の勾配の大きさg(x,y)が真の最大値を有しているのかを判断する。
 キャニーのエッジ検出方法の第3のステップとして、高いしきい値Th_H及び低いしきい値Th_Lを設定し、ヒステリシスのあるしきい値判断を行う。勾配の大きさg(x,y)が高いしきい値Th_Hよりも大きいとき、その画素をエッジであると判断する。勾配の大きさg(x,y)が低いしきい値Th_Lよりも小さいとき、その画素はエッジではないと判断する。勾配の大きさg(x,y)が高いしきい値Th_H及び低いしきい値Th_Lの間にあるとき、その画素がエッジとして検出された画素に隣接しているときのみ、エッジであると判断する。
 本開示の例では、ステップS37において、ガウス関数の標準偏差σ=1.4、高いしきい値Th_H=10、及び低いしきい値Th_L=5を有するキャニーフィルタを用いた。しきい値の可能な値の範囲は、0~255である。
 図8のステップ40では、直後のステップS38,S39と、後述する図10のステップS67との両方で使用するために、2種類のキャニーフィルタを用いて2種類のエッジを抽出する。図25は、図8のステップS37においてしきい値15のキャニーフィルタを用いて抽出された画像中のエッジの例を示す図である。図26は、図8のステップS37においてしきい値4のキャニーフィルタを用いて抽出された画像中のエッジの例を示す図である。本開示の例では、図26のエッジをステップS38,S39で使用し、図25のエッジを図10のステップS67で用いた。
 ソーベルフィルタを用いてエッジを抽出すると、高速だが、抽出されるエッジの幅が太くなる。キャニーフィルタを用いてエッジを抽出すると、低速だが、詳細なエッジを抽出できる。一方、本実施形態では、いったんソーベルフィルタを用いてエッジを抽出し(ステップS35)、抽出されたエッジ以外の領域を削除し(ステップS36)、ソーベルフィルタを用いて抽出されたエッジの近傍の領域のみにキャニーフィルタを適用してエッジを抽出し(ステップS37)、このエッジを、目標領域に含まれるオブジェクトのエッジとして使用する。このように、ソーベルフィルタ及びキャニーフィルタを組み合わせることで、キャニーフィルタのみを用いる場合よりも、エッジの抽出が約10倍速くなる。
 次いで図8のステップS38において、制御装置1は、輪郭及びエッジを有する明オブジェクトであって、輪郭及びエッジが互いに重なり合い、実質的に一致している明オブジェクトを候補オブジェクトとして抽出する。図27は、図8のステップS38において抽出された明オブジェクトの候補オブジェクトの例を示す図である。次いで図8のステップS39において、制御装置1は、輪郭及びエッジを有する暗オブジェクトであって、輪郭及びエッジが互いに重なり合い、実質的に一致している暗オブジェクトを候補オブジェクトとして抽出する。図28は、図8のステップS39において抽出された暗オブジェクトの候補オブジェクトの例を示す図である。
 図29Aはオブジェクトの例を示す図である。図29Bはしきい値200を用いて抽出された図29Aの2値化画像を示す図である。図29Cは図29Bの輪郭を示す図である。図29Dはしきい値50を用いて抽出された図29Aのエッジを示す図である。図29Eはしきい値200を用いて抽出された図29Aのエッジを示す図である。図29Fは文字の輪郭及びエッジを示す図である。図29Aのオブジェクトは、例えば画素の輝度が0~255にわたって変化するとき、輝度0の部分、輝度128の部分、及び輝度255の部分を含む。図29Aのオブジェクトの輪郭は、その2値化画像(図29B)の輪郭として得られる(図29C)。図29Aのオブジェクトのエッジは、輝度が急に変化する部分として得られ、異なるしきい値を用いることにより異なるエッジが抽出される(図29D、図29E)。図29C~図29Eに示すように、一般に、オブジェクトの輪郭及びエッジは一致するとは限らない。ただし、文字のオブジェクトは常に閉じたエッジを有し、オブジェクトの輪郭及びエッジは一致すると考えられる。従って、実質的に一致した輪郭及びエッジを有するオブジェクトを抽出することにより、文字のオブジェクトを抽出することができる。エッジと輪郭が一致しないオブジェクトは、ノイズとして削除される。
 次いで図6のステップS5において、制御装置1は、候補オブジェクトの抽出に成功したか否かを判断し、YESのときはステップS6に進み、NOのときはステップS10に進む。ステップS6において、制御装置1はOCR処理を実行する。
 図9は、図6のステップS6におけるOCR処理のサブルーチンを示すフローチャートである。認識対象の文字列が明オブジェクトであるのか、それとも暗オブジェクトであるのか未知であり、また、認識対象の文字列が図5のX軸に平行に延在するのか、それともY軸に平行に延在するのか未知であるので、これらすべての組み合わせについて図10及び図11のOCRサブルーチンを実行する。認識装置の文字列が明オブジェクトであると仮定するとき、図8のステップS38で抽出された明オブジェクトの候補オブジェクトを用いる。認識装置の文字列が暗オブジェクトであると仮定するとき、図8のステップS39で抽出された暗オブジェクトの候補オブジェクトを用いる。認識装置の文字列がX軸に平行に延在すると仮定するとき、目標領域の画像をそのまま使用する。認識装置の文字列がY軸に平行に延在すると仮定するとき、目標領域の画像を90度回転して使用する。
 図9のステップS51において、制御装置1は、認識装置の文字列がX軸に平行に延在する明オブジェクトであると仮定して、OCRサブルーチンを実行する。ステップS52において、制御装置1は、OCRに成功したか否かを判断し、YESのときは図6のステップS7に進み、NOのときはステップS53に進む。ステップS53において、制御装置1は、認識装置の文字列がY軸に平行に延在する明オブジェクトであると仮定して、OCRサブルーチンを実行する。ステップS54において、制御装置1は、OCRに成功したか否かを判断し、YESのときは図6のステップS7に進み、NOのときはステップS55に進む。ステップS55において、制御装置1は、認識装置の文字列がX軸に平行に延在する暗オブジェクトであると仮定して、OCRサブルーチンを実行する。ステップS56において、制御装置1は、OCRに成功したか否かを判断し、YESのときは図6のステップS7に進み、NOのときはステップS57に進む。ステップS57において、制御装置1は、認識装置の文字列がY軸に平行に延在する暗オブジェクトであると仮定して、OCRサブルーチンを実行し、その後、図6のステップS7に進む。
 図10は、図9のステップS51,S53,S55,S57におけるOCRサブルーチンの第1の部分を示すフローチャートである。図11は、図9のステップS51,S53,S55,S57におけるOCRサブルーチンの第2の部分を示すフローチャートである。
 図10のステップS61において、制御装置1は、候補オブジェクトのラベリングを行って、予め決められた方向に延在して互いに近接した複数のオブジェクトを文字列候補として抽出する。図30は、図10のステップS61において抽出された文字列候補の例を示す図である。図31は、図10のステップS61における文字列候補の抽出を示す図である。図31において、文字列候補を抽出するための文字列候補マスク31は、例えば、幅w2=75画素、高さh2=3画素を有する。ある位置に配置された文字列候補マスク31が候補オブジェクトの画素を1つでも含むとき、文字列候補マスク31内の領域は、文字列候補の一部であると判断される。文字列候補マスク31を目標領域の全体にわたってスキャンし、個別の連結した文字列候補に対してラベルを付与する。
 ステップS61において候補オブジェクトのラベリングを行って文字列候補を抽出するとき、近接した複数の文字列が1つの文字列候補として抽出される可能性がある。従って、いったん文字列候補を文字候補に分離し、各文字候補の特徴量(幅及び高さ)に基づいて、類似した特徴量を有する文字候補を文字列候補として再結合する。図10のステップS62において、制御装置1は、各文字列候補中のオブジェクトのラベリングを行って当該文字列候補に含まれる複数の文字候補を抽出し、各文字候補のバウンディングボックスを生成する。各バウンディングボックスは、文字列候補が延在する方向に平行な幅及び文字列候補が延在する方向に直交する高さを有する矩形形状をそれぞれ有し、各文字候補をそれぞれ包囲する最小外接矩形である。ステップS63において、制御装置1は、各バウンディングボックスを、その幅及び高さに基づいて、当該バウンディングボックスの高さが低いほど当該バウンディングボックスの幅を拡大するように変形する。ステップS64において、制御装置1は、変形により連結されたバウンディングボックスに含まれる文字候補の組を、新たな文字列候補として抽出する。図32は、図10のステップS62において抽出された文字候補及び生成されたバウンディングボックスの例を示す図である。
 図33Aは、図10のステップS61において抽出された文字列候補の例を示す図である。図33Bは、図10のステップS62において抽出された文字候補及び生成されたバウンディングボックス42の例を示す図である。図33Cは、図10のステップS63において変形されたバウンディングボックス43の例を示す図である。図33Dは、図10のステップS64において抽出された新たな文字列候補の例を示す図である。図33Aの文字列候補は、2つの文字列「2012.1」及び「abc」を含んでいるが、1つの文字列候補として抽出されている。図33Aには、説明のために、文字列候補のバウンディングボックス41を示す。次に、図33Bに示すように、図33Aの文字列候補中のオブジェクトのラベリングを行って当該文字列候補に含まれる複数の文字候補を抽出し、各文字候補のバウンディングボックス42を生成する。各文字候補のバウンディングボックス42は、幅w3及び高さh3を有する。次に、図33Cに示すように、各バウンディングボックスを、その幅及び高さに基づいて変形する。変形後のバウンディングボックス43の幅w3’及び高さh3’は、次式によって得られる。
Figure JPOXMLDOC01-appb-M000007
Figure JPOXMLDOC01-appb-M000008
 ここで、Wは、各文字候補のバウンディングボックス42の幅の最大値であり、Hは、各文字候補のバウンディングボックス42の高さの最大値である。
 図33Cに示すように、各文字候補のバウンディングボックスは、高さh3が低いほど幅w3を拡大するように変形される。従って、「.」及び「1」の距離は「1」及び「a」の距離よりも大きいが、変形後のバウンディングボックス43では、「.」及び「1」が連結され、「1」及び「a」が分離されている。図33Dに示すように、変形により連結されたバウンディングボックスに含まれる文字候補の組を、新たな文字列候補として抽出する。図33Dには、説明のために、新たな文字列候補のバウンディングボックス41a,41bを示す。
 図34Aは、図10のステップS61において抽出された文字列候補の他の例を示す図である。図34Bは、図10のステップS62において抽出された文字候補及び生成されたバウンディングボックス42の他の例を示す図である。ステップS64において、変形により連結されたバウンディングボックスに含まれる文字候補の組が新たな文字列候補として抽出されないとき、図34Aの文字列候補に含まれていたオブジェクトは、ノイズとして削除される。
 次いで、ステップS65~S67では、誤認識の防止のために、明らかに日付の文字列ではない文字列候補を削除する。
 図10のステップS65において、制御装置1は、10個より多数の文字候補を含む文字列候補を削除する。日付の文字列は、たかだか10個以下の文字を含むと考えられる。従って、10個より多数の文字候補を含む文字列候補は、ノイズとして削除される。
 次いでステップS66において、制御装置1は、高さ方向において2個以上のオブジェクトを含む文字候補のみを含む文字列候補を削除する。ここでは、各文字候補において、当該文字候補に含まれるオブジェクトを高さ方向に連結し、連結後のオブジェクトの個数を数える。数字「0」~「9」は単一の連結されたオブジェクトである。従って、文字列候補が日付であるならば、当該文字列候補に含まれるすべての文字候補が、高さ方向においてただ1つのオブジェクトを含むはずである。しかしながら、日付の文字列であるにもかかわらずノイズなどに起因して高さ方向において2個以上のオブジェクトを含む文字候補が存在する可能性(余分なオブジェクトが存在する場合、連結したオブジェクトが切断されている場合、など)を考慮して、高さ方向において2個以上のオブジェクトを含む文字候補のみを含む文字列候補を、ノイズとして削除する。図36Aは、図10のステップS64において抽出された文字列候補の例を示す図である。図36Bは、図36Aの文字列候補に含まれる各文字候補の高さ方向におけるオブジェクトの個数を示す図である。図36Bの文字候補51の上に、各文字候補の高さ方向におけるオブジェクトの個数を示す。
 図37Aは、図10のステップS64において抽出された文字列候補の他の例を示す図である。図37Bは、図37Aの文字列候補に含まれる各文字候補の高さ方向におけるオブジェクトの個数を示す図である。図37A及び図37Bは、文字列が縦に延在するにもかかわらず、誤って横に延在するものとして処理している例である。図37Bに示すように、各文字候補の高さ方向におけるオブジェクトの個数はすべて2個以上であるので、図37A及び図37Bの文字列候補は、ノイズとして削除される。
 次いでステップS67において、制御装置1は、各オブジェクトにおけるエッジの画素が輪郭の画素に一致する部分がエッジの画素の面積(画素数)の60%以下である文字列候補を削除するある領域から明オブジェクト及び暗オブジェクトの候補オブジェクトを抽出したとき、それらの一方にのみ正しい文字列候補が含まれる。正しく抽出された候補オブジェクトでは、そのエッジの画素が輪郭の画素に実質的に一致すると考えられる。一方、他方の候補オブジェクトから抽出された文字列候補は、ノイズとして削除される。オブジェクトのエッジとして、図8のステップS37で抽出されたエッジを使用する。図38Aは、入力画像の例を示す図である。図38Bは、図38Aの画像から抽出された明オブジェクトの候補オブジェクトを示す図である。図38Cは、図38Bの候補オブジェクトの輪郭を示す図である。図38Dは、図38Aの画像から抽出されたエッジを示す図である。図39Aは、入力画像の例を示す図である。図39Bは、図39Aの画像から抽出された暗オブジェクトの候補オブジェクトを示す図である。図39Cは、図39Bの候補オブジェクトの輪郭を示す図である。図39Dは、図39Aの画像から抽出されたエッジを示す図である。図38A及び図39Aの入力画像は、暗オブジェクトを含む。従って、図39Cの輪郭及び図39Dのエッジは実質的に一致しているが、図38Cの輪郭及び図38Dのは一致しない。
 図35は、図10のステップS65,S66,S67において一部の文字列候補を削除した後の文字列候補の例を示す図である。図30に比較して、ノイズが削減されていることがわかる。
 次いで図11のステップS68において、制御装置1は、エッジ強度及び領域輝度判定処理を実行する。
 図12は、図11のステップS68におけるエッジ強度及び領域輝度判定処理のサブルーチンを示すフローチャートである。
 図12のステップS90において、制御装置1は、1つの文字列候補を選択する。ステップS91において、制御装置1は、文字候補の領域の輪郭を抽出して膨張させる。ここで、文字候補の領域の輪郭の画素に1画素を付加することにより膨張させる。ステップS92において、制御装置1は、ステップS91において膨張された輪郭に対してキャニーフィルタを適用し、文字列候補の領域のエッジを検出する。ここでは、ガウス関数の標準偏差σ=1、高いしきい値Th_H=30、及び低いしきい値Th_L=10を有するキャニーフィルタを用いた。
 ステップS93において、制御装置1は、文字列候補の領域のエッジ強度の平均edge_M及び偏差edge_Dを計算する。エッジ強度の平均edge_M及び偏差edge_Dに基づき、次式を用いて、エッジ強度の基準範囲の下限edge_L及び上限edge_Hを計算する。
Figure JPOXMLDOC01-appb-M000009
Figure JPOXMLDOC01-appb-M000010
 次いでステップS94において、制御装置1は、文字列候補の領域の輝度の平均I_M及び偏差I_Dを計算する。輝度の平均I_M及び偏差I_Dに基づき、次式を用いて、輝度の基準範囲の下限I_L及び上限I_Hを計算する。
Figure JPOXMLDOC01-appb-M000011
Figure JPOXMLDOC01-appb-M000012
 ステップS95において、制御装置1は、選択された文字列候補における1つの文字候補を選択する。ステップS96において、制御装置1は、選択された文字候補の領域のエッジ強度の平均を計算する。ステップS97において、制御装置1は、選択された文字候補の領域の輝度の平均を計算する。ステップS98において、制御装置1は、選択された文字候補が、基準範囲外のエッジ強度及び輝度を有する場合には、その文字候補を削除する。詳しくは、下限edge_L未満のエッジ強度又は上限edge_Hより大きなエッジ強度を有する文字候補は、ノイズとして削除される。また、下限I_L未満の輝度又は上限I_Hより大きな輝度を有する文字候補は、ノイズとして削除される。
 次いでステップS99において、制御装置1は、未処理の文字候補があるか否かを判断し、YESのときはステップS95に進み、NOのときはステップS100に進む。ステップS100において、制御装置1は、未処理の文字列候補があるか否かを判断し、YESのときはステップS90に進み、NOのときは図11のステップS69に進む。
 図40は、図11のステップS68におけるエッジ強度及び領域輝度判定処理を説明するための入力画像の例を示す図である。図41は、図12のステップS90において選択された文字列候補の例を示す図である。図42は、図11のステップS68におけるエッジ強度及び領域輝度判定処理によって処理された文字列候補の例を示す図である。図40~図42によれば、エッジ強度及び領域輝度に基づいてノイズが削減されていることがわかる。
 図11のステップS69において、制御装置1は平均高さ判定処理を実行する。
 図13は、図11のステップS69における平均高さ判定処理のサブルーチンを示すフローチャートである。ステップS101において、制御装置1は、1つの文字列候補を選択する。ステップS102において、制御装置1は、各文字候補に含まれるオブジェクトを高さ方向に連結する。オブジェクトを高さ方向に連結するために、高さ方向にクロージング処理を行う(すなわち、領域の拡張処理を行い、次いで収縮処理を行う)。ステップS103において、制御装置1は、各文字候補の高さの平均及び偏差を計算し、高さの基準範囲を決定する。高さの基準範囲を決定するために、平均及び偏差を計算することに代えて、文字列候補中の各オブジェクトの高さの中間値を計算してもよい。この場合、例えば、5画素以上かつ高さの中間値の1.1倍以下の範囲を基準範囲としてもよい。ステップS104において、制御装置1は、規定範囲の高さをもたない文字候補を削除し、元の文字列候補から、文字候補の削除により分離された新たな文字列候補を抽出する。図43Aは、図13のステップS101において選択された文字列候補の例を示す図である。図43Bは、図13のステップS104において抽出された新たな文字列候補の例を示す図である。文字候補42aはノイズとして削除され、新たな文字列候補41c,41dが抽出される。次いで図13のステップS105において、制御装置1は、未処理の文字列候補があるか否かを判断し、YESのときはステップS101に進み、NOのときは図11のステップS70に進む。
 図11のステップS70において、制御装置1は、文字列候補の個数は0であるか否かを判断し、YESのときは図9のステップS52,S54,S56、又は図6のステップS7に進み、NOのときはステップS71に進む。ステップS71において、制御装置1は、1つの文字列候補を選択する。ステップS72において、制御装置1は、日付パターン判定処理を実行する。
 図14は、図11のステップS72,S75における日付パターン判定処理のサブルーチンを示すフローチャートである。
 制御装置1は、年を表す2桁又は4桁の数字と、月を表す1桁又は2桁の数字と、予め決められた約物とを含む複数の日付パターンを含むテーブルを内部に保持している。「2012年7月」を例にすると、日付は例えば以下のパターンを有する。
[表1]
―――――――――――――――――――――――――――――――――
(1)「2012.07」 数字4桁+ピリオド+数字2桁
(2)「2012.7」  数字4桁+ピリオド+数字1桁
(3)「2012-07」 数字4桁+ハイフン+数字2桁
(4)「2012-7」  数字4桁+ハイフン+数字1桁
(5)「’12.07」  アポストロフィ+数字2桁+ピリオド+数字2桁
(6)「’12.7」   アポストロフィ+数字2桁+ピリオド+数字1桁
(7)「2012,07」 (1)のピリオドが汚れている場合の予防措置
(8)「2012,7」  (2)のピリオドが汚れている場合の予防措置
―――――――――――――――――――――――――――――――――
 各日付パターンは、数字及び約物がどのように並んでいるのかを特定する。
 図14のステップS111において、制御装置1は、文字列候補に対して英数字用OCRを行う。ステップS112において、制御装置1は、内部のテーブルに保持した日付パターンのうち1つの日付パターンを選択する。制御装置1は、以下のステップにおいて、ステップS111で認識された文字列が、ステップS112で選択された日付パターンに一致するか否かを判断する。ステップS113において、制御装置1は、文字列は日付パターンに一致したか否かを判断し、YESのときはステップS114に進み、NOのときはステップS115に進む。ステップS114において、制御装置1は、文字列は「明らかに数字と間違えることのない英字」を含むか否かを判断し、YESのときはステップS115に進み、NOのときはステップS117に進む。「明らかに数字と間違えることのない英字」は、例えば、「O」、「o」、「C」、「c」、「U」、「u」、「Z」、「z」、「n」、「L」、「l」、「I」、「J」、「D」を含む。文字列が「明らかに数字と間違えることのない英字」を含むとき、文字列を日付ではないものとして認識する。ステップS115において、制御装置1は、すべての日付パターンを使用したか否かを判断し、YESのときは図11のステップS73(又はステップS76)に進み、NOのときはステップS112に戻り、他の日付パターンを選択する。ステップS117において、制御装置1は、文字列中の文字の高さは一定であるか否かを判断し、YESのときはステップS116に進み、NOのときはステップS113に戻る。ステップS116において、制御装置1は、文字列は英字を含むか否かを判断し、YESのときはステップS117に進み、NOのときはステップS118に進む。ステップS117において、制御装置1は、文字列候補に対して数字用OCRを行い、文字列候補が英字を含んでいても、それを数字として認識する。
 ステップS117の後で、傾き補正を行ってもよい。傾き補正を行うことにより、「1」を含む文字列を誤りなく認識することができる。
 図14のステップS118において、制御装置1は、文字列は日付であるか否かを判断し、YESのときは図11のステップS73(又はステップS76)に進み、NOのときはステップS113に戻る。
 図11のステップS73において、制御装置1は、日付パターンの判定に成功したか否かを判断し、YESのときは図9のステップS52,S54,S56、又は図6のステップS7に進み、NOのときはステップS74に進む。ステップS74において、制御装置1は、文字列候補を180度回転する。ステップS75において、制御装置1は、180度回転された文字列候補に対して、前述のものと同じ日付パターン判定処理を実行する。ステップS76において、制御装置1は、日付パターンの判定に成功したか否かを判断し、YESのときは図9のステップS52,S54,S56、又は図6のステップS7に進み、NOのときはステップS77に進む。ステップS77において、制御装置1は、未処理の文字列候補があるか否かを判断し、YESのときはステップS71に戻り、NOのときは図9のステップS52,S54,S56、又は図6のステップS7にステップSに進む。
 図6のステップS7において、制御装置1は、OCRに成功したか否か、すなわち、使用期限の日付を表す文字列の抽出に成功したか否かを判断し、YESのときはステップS8に進み、NOのときはステップS10に進む。月が「1」であると認識した場合、実際には「10」~「12」であるところ、容器13の角度などに起因して誤って「1」であると認識している可能性がある。以下のステップでは、1つの入力画像に係る文字列候補が月を表す数字として「1」のみを含むとき、他の入力画像に係る文字列候補が月を表す数字として「1」のみを含むか否かを判断する。ステップS8において、制御装置1は、月は「1」であるか否かを判断し、YESのときはステップS9に進み、NOのときはステップS12に進む。ステップS9において、制御装置1は、同じ日付を2回検出したか否かを判断し、YESのときはステップS12に進み、NOのときはステップS10に進む。ステップS10において、制御装置1は、容器13を1周させたか否かを判断し、YESのときはステップS13に進み、NOのときはステップS11に進む。ステップS11において、制御装置1は、容器13を回転させる。例えば、容器13を15度ずつ回転させる場合には、合計で24個の入力画像を取得することができる。また、容器13の直径が異なる場合であっても一定の角度毎に画像を取得するために、容器13を2周にわたって回転させて直径を検出し、一定の時間間隔で容器13の画像を取得しながら、その直径に応じて異なる速度で容器13を回転させてもよい。ステップS12において、制御装置1は、日付を出力する。ステップS13において、制御装置1は、エラーを出力する。
 以上説明したように、本実施形態に係る光学文字認識装置によれば、文字列の画像に含まれるさまざまなノイズを、文字列を光学的に認識する前に予め除去することにより、従来よりも高い精度で日付を表す文字列を認識することができる。
 入力画像は、円筒形状の容器の画像に限定されず、他の画像であってもよい(平坦な物体の画像、又は任意の画像データ)。
 制御装置1が外部のPC9に接続されているとき、図6~図14の日付検出処理は、少なくとも部分的にPC9によって実行されてもよい。
 以上説明したように日付を表す文字列を認識する光学文字認識方法を実施してもよい。また、そのような光学文字認識方法は、コンピュータによって実行されたときに文字列を光学的に認識するコンピュータプログラムとして実施されてもよい。また、そのようなコンピュータプログラムは、コンピュータにより読み取り可能な記録媒体に格納されてもよい。例えば、図1の記録媒体10にそのようなコンピュータプログラムを格納し、PC9は、記録媒体10からコンピュータプログラムを読み取ったとき、当該コンピュータプログラムに従って光学文字認識方法を実施する。
第2の実施形態.
 第1の実施形態に係る光学文字認識装置は、日付が予め決められた約物を含み、通常の書体を有する文字で印字されていれば、従来よりも高い精度で日付を表す文字列を認識することができる。しかしながら、特殊な約物を含む日付(例えば、「2015/5」、「2015 5」)、特殊な書体(例えば、互いに分離した複数のドットからなるもの)を有する文字で印字された日付、など(以下、特殊パターンという)を認識するためには、図6~図14の日付検出処理におけるさまざまな判断の条件(しきい値など)を緩和して、多数の文字列候補を抽出する必要がある。日付検出処理における判断の条件を緩和すると、ノイズが増大し、日付検出処理を実行するのに必要な時間が長くなるので、実行時間の増大を抑えながら、特殊パターンの日付を認識できることが望まれる。
 図44は、本発明の第2の実施形態に係る光学文字認識装置の制御装置1によって実行される日付検出処理を示すフローチャートである。図44のステップS1~S12は、図6のステップS1~S12と同様である。図44の日付検出処理は、図1のステップS13に代えて、ステップS14の特殊パターンの日付検出処理を含む。ステップS14の特殊パターンの日付検出処理では、図44のステップS2、S4、及びS6で用いたものよりも緩和した判断の条件(しきい値など)を設定して、図6の日付検出処理を実行する。特殊パターンの日付が印字された容器の種類及び数量は少なく、大部分の容器に印字された日付は、ある程度限定的な条件を設定した日付検出処理を実行することにより認識することができる。
 図44の日付検出処理によれば、図44のステップS1~S11を実行して日付の文字列を認識できなかったときのみ、ステップS14の特殊パターンの日付検出処理を実行するので、実行時間の増大を抑えながら、特殊パターンの日付を認識することができる。
第3の実施形態.
 第1の実施形態に係る光学文字認識装置によれば、容器13の異なる角度をそれぞれ表す複数の画像(入力画像)を取得するので、日付の文字列が円筒形状の容器の回転軸に直交しているとき(図3及び図4)、日付の全体が1つ画像中に入らない可能性がある。日付の文字列が、円筒形状の容器の側面の半周以上にわたっているときは、日付の全体を含む画像を取得することができない。
 図45は、本発明の第3の実施形態に係る光学文字認識装置の制御装置1によって実行される日付検出処理を示すフローチャートである。図45のステップS1~S12は、図6のステップS1~S12と同様である。図45の日付検出処理は、図1のステップS13に代えて、ステップS15の連結画像の日付検出処理を含む。図46は、図45のステップS15における連結画像の日付検出処理のサブルーチンを示すフローチャートである。前述のように、制御装置1は、ローラー8a,8bを用いて容器13を一定角度ずつ回転させながらカメラ5により容器13を撮影して、容器13の異なる角度をそれぞれ表す複数の画像を取得する。図46のステップS1Aにおいて、制御装置1は、容器13の互いに隣接する部分を含む複数の画像を連結して1つの連結画像を生成する。詳しくは、制御装置1は、互いに隣接する2画像において類似のオブジェクトを認識することにより、これらの画像を連結する。連結画像は、容器の側面を展開した平面画像である。制御装置1は、容器13の曲面で湾曲している部分については、容器13の幅を円柱の直径として、射影変換を用いて平面に補正する。図46のステップS2~S9、S12、及びS13は、図6のステップステップS2~S9、S12、及びS13と同様である。
 連結画像の生成にはある程度の時間がかかるので、制御装置1は、図45のステップS15を実行する前に、連結画像を予め生成しておいてもよい。
 従来、円筒形状の物体の側面の画像を生成するために、ラインカメラが知られている。しかしながら、ラインカメラを用いるためには、ラインカメラ自体のコストがかかることに加えて、物体を高い精度で回転させるための機構を設けることのコストがかかる。薬品の容器はさまざまな形状及びサイズを有するので、ラインカメラによる撮影のために十分な精度で回転させるためのコストは非常に大きくなる。一方、図45の日付検出処理によれば、通常のカメラにより撮影された複数の画像を連結して連結画像を生成することで、コストの増大を抑えることができる。
 図45の日付検出処理によれば、図45のステップS1~S11を実行して日付の文字列を認識できなかったときのみ、ステップS15の連結画像の日付検出処理を実行するので、実行時間の増大を抑えながら、1つ画像中に入らない日付を認識することができる。
第4の実施形態.
 日付の文字列の直後(右側)に他の文字(「O」、「J」、「Z」など)があるとき、他の文字が日付の一部であると誤って認識される可能性がある。従って、このような日付の一部ではない他の文字を文字列候補から除去する必要がある。
 図47は、本発明の第4の実施形態に係る光学文字認識装置の制御装置1によって実行される日付検出処理の日付パターン判定処理のサブルーチンを示すフローチャートである。図47の日付パターン判定処理は、図11のステップS72及びS75において実行され、図14のステップS113及びS114の間に追加のステップS121及びS122を含む。図47のステップS121において、制御装置1は、日付パターンに一致した文字列の月を表す数字が「10」、「11」、「12」のいずれかであるとき、以下に説明する基準に基づいて、日付の後に他の文字があるか否かを判断し、YESのときはステップS122に進み、NOのときはステップS114に進む。
 図48は、日付の文字列及び他の文字を含む文字列候補の例を示す図である。日付「2016.1」の後に他の文字「CJ932」が存在する。「C」を誤って「0」と認識すると、日付パターンに一致した文字列が誤って「2016.10」と認識される。制御装置1は、日付の文字列「2016.10」を検出したとき、その最後の「0」が実際に日付の一部であるのか否かを判断する。
 図48の文字間の距離D1~D10は、画素数を単位として、例えば以下の通りである。
[表2]
――――――――――――――
D1=50.4231
D2=49.8108
D3=43.7262
D4=44.1873
D5=82.874
D6=82.8974
D7=55.6709
D8=39.335
D9=49.1936
D10=45.8404
――――――――――――――
 「2016.10」の最後の「0」が日付の一部であるか否かを判断するために、まず、日付の文字間の距離D1~D6を比較する場合を考える。この場合、最後の「1」と「0」との距離(「1」と「C」との距離)D6が、「.」と「1」との距離D5と同程度であるので、「2016.10」の最後の「0」が日付の一部ではないと判断できない。
 本実施形態では、「2016.10」の最後の「0」が日付の一部であるか否かを判断するために、距離D6と、「2016.10」の後の文字間の距離D7~D10の平均値とを比較する。距離D6が距離D7~D10の平均値よりも大きいとき、制御装置1は、「2016.10」の最後の「0」が日付の一部ではないと判断し、ステップS122において文字「CJ932」を除去する。一方、距離D6が距離D7~D10の平均値以下であるとき、制御装置1は、「2016.10」の最後の「0」が日付の一部であると判断する。これにより、日付の文字列の直後に他の文字があっても、高い精度で日付を表す文字列を認識することができる。
 以上説明したように、制御装置1は、文字列候補が、月を表す2つの数字と、月を表す2つの数字に後続する少なくとも1つの他の文字とを含むとき、かつ、月を表す2つの数字間の距離が、月を表す2つの数字と他の文字との距離及び他の文字間の距離の平均値より大きいとき(ステップS121)、月を表す2つの数字の1の位の数字及び他の文字を除去する(ステップS122)。
 本発明の光学文字認識装置、光学文字認識方法、コンピュータプログラム、及び記録媒体は、従来よりも高い精度で日付を表す文字列を認識することができる。
1…制御装置、
2…レール、
3…移動装置、
4~6…カメラ、
7a,7b…照明装置、
8a,8b…ローラー、
9…パーソナルコンピュータ(PC)、
10…記録媒体、
11,12…トレー、
13,13a~13d…容器、
21…目標領域、
22…トリミングされた目標領域、
31…文字列候補マスク、
41…文字列候補のバウンディングボックス、
41a,41b…新たな文字列候補のバウンディングボックス、
42,42a…文字候補のバウンディングボックス、
43…変形された文字候補のバウンディングボックス、
51…文字候補。

Claims (16)

  1.  文字列を光学的に認識する光学文字認識装置において、上記光学文字認識装置は、
     入力画像から、認識対象のオブジェクトを含む目標領域を抽出する第1の処理手段と、
     上記目標領域に含まれるオブジェクトから、少なくとも1つの文字列候補のオブジェクトを含む候補オブジェクトを抽出する第2の処理手段と、
     上記候補オブジェクトのラベリングを行って、予め決められた方向に延在して互いに近接した複数のオブジェクトを上記文字列候補として抽出し、上記文字列候補が、年を表す2桁又は4桁の数字と、月を表す1桁又は2桁の数字と、予め決められた約物とを含む日付のパターンを有するか否かを判断し、上記文字列候補が上記日付のパターンを有するとき、上記文字列候補を日付として認識する第3の処理手段とを備えたことを特徴とする光学文字認識装置。
  2.  上記第2の処理手段は、
     上記目標領域に含まれるオブジェクトの輪郭及びエッジを検出し、
     互いに重なり合う輪郭及びエッジを有するオブジェクトを上記候補オブジェクトとして抽出することを特徴とする請求項1記載の光学文字認識装置。
  3.  上記第2の処理手段は、
     上記目標領域にソーベルフィルタを適用して第1のエッジを検出し、
     上記第1のエッジの近傍の領域にキャニーフィルタを適用して第2のエッジを検出し、
     上記第2のエッジを、上記目標領域に含まれるオブジェクトのエッジとして使用することを特徴とする請求項2記載の光学文字認識装置。
  4.  上記第3の処理手段は、
     上記文字列候補のオブジェクトのラベリングを行って複数の文字候補を抽出し、
     上記文字列候補が延在する方向に平行な幅及び上記文字列候補が延在する方向に直交する高さを有する矩形形状をそれぞれ有し、上記各文字候補をそれぞれ包囲する複数のバウンディングボックスを生成し、
     上記各バウンディングボックスを、当該バウンディングボックスの高さが低いほど当該バウンディングボックスの幅を拡大するように変形し、
     変形により連結されたバウンディングボックスに含まれる文字候補の組を、新たな文字列候補として抽出することを特徴とする請求項1~3のうちのいずれか1つに記載の光学文字認識装置。
  5.  上記第3の処理手段は、
     上記文字列候補のオブジェクトのラベリングを行って複数の文字候補を抽出し、
     10個より多数の文字候補を含む文字列候補を削除することを特徴とする請求項1~4のうちのいずれか1つに記載の光学文字認識装置。
  6.  上記第3の処理手段は、
     上記文字列候補のオブジェクトのラベリングを行って複数の文字候補を抽出し、
     上記文字列候補が延在する方向に直交する方向において2個以上のオブジェクトを含む文字候補のみを含む文字列候補を削除することを特徴とする請求項1~5のうちのいずれか1つに記載の光学文字認識装置。
  7.  上記第3の処理手段は、
     上記文字列候補のオブジェクトの輪郭及びエッジを検出し、
     上記エッジの画素が上記輪郭の画素に一致する部分が上記エッジの画素の面積の60%以下である文字列候補を削除することを特徴とする請求項1~6のうちのいずれか1つに記載の光学文字認識装置。
  8.  上記第3の処理手段は、上記文字列候補が明らかに数字と間違えることのない英字を含むとき、上記文字列候補を日付ではないものとして認識することを特徴とする請求項1~7のうちのいずれか1つに記載の光学文字認識装置。
  9.  上記第3の処理手段は、上記文字列候補が、月を表す2つの数字と、上記月を表す2つの数字に後続する少なくとも1つの他の文字とを含むとき、かつ、上記月を表す2つの数字間の距離が、上記月を表す2つの数字と他の文字との距離及び上記他の文字間の距離の平均値より大きいとき、上記月を表す2つの数字の1の位の数字及び上記他の文字を除去することを特徴とする請求項1~8のうちのいずれか1つに記載の光学文字認識装置。
  10.  上記入力画像は、回転可能に保持された円筒形状の容器の画像であることを特徴とする請求項1~9のうちのいずれか1つに記載の光学文字認識装置。
  11.  上記第1の処理手段は、上記入力画像から、上記円筒形状の容器の回転軸に実質的に直交する方向に延在するエッジと、予め決められたしきい値よりも高い輝度の部分とを含む領域を、上記目標領域として抽出することを特徴とする請求項10記載の光学文字認識装置。
  12.  上記光学文字認識装置は、上記容器を回転させながら撮影された上記容器の異なる角度をそれぞれ表す複数の入力画像を取得し、
     上記第3の処理手段は、1つの入力画像に係る文字列候補が月を表す数字として「1」のみを含むとき、他の入力画像に係る文字列候補が月を表す数字として「1」のみを含むか否かを判断することを特徴とする請求項10又は11記載の光学文字認識装置。
  13.  上記光学文字認識装置は、
     カメラと、
     上記円筒形状の容器の回転軸の周りに回転可能であるように上記容器を保持する撮影台と、
     少なくとも1つの保管庫と上記撮影台との間で上記容器を移動させる移動装置とを備え、
     上記容器には、上記容器中の薬品の使用期限の日付を表す文字列が印字されていることを特徴とする請求項10~12のうちのいずれか1つに記載の光学文字認識装置。
  14.  文字列を光学的に認識する光学文字認識方法において、上記光学文字認識方法は、
     入力画像から、認識対象のオブジェクトを含む目標領域を抽出する第1のステップと、
     上記目標領域に含まれるオブジェクトから、少なくとも1つの文字列候補のオブジェクトを含む候補オブジェクトを抽出する第2のステップと、
     上記候補オブジェクトのラベリングを行って、予め決められた方向に延在して互いに近接した複数のオブジェクトを上記文字列候補として抽出し、上記文字列候補が、年を表す2桁又は4桁の数字と、月を表す1桁又は2桁の数字と、予め決められた約物とを含む日付のパターンを有するか否かを判断し、上記文字列候補が上記日付のパターンを有するとき、上記文字列候補を日付として認識する第3のステップとを備えたことを特徴とする光学文字認識方法。
  15.  コンピュータによって実行されたときに文字列を光学的に認識するコンピュータプログラムにおいて、上記コンピュータプログラムは、
     入力画像から、認識対象のオブジェクトを含む目標領域を抽出する第1のステップと、
     上記目標領域に含まれるオブジェクトから、少なくとも1つの文字列候補のオブジェクトを含む候補オブジェクトを抽出する第2のステップと、
     上記候補オブジェクトのラベリングを行って、予め決められた方向に延在して互いに近接した複数のオブジェクトを上記文字列候補として抽出し、上記文字列候補が、年を表す2桁又は4桁の数字と、月を表す1桁又は2桁の数字と、予め決められた約物とを含む日付のパターンを有するか否かを判断し、上記文字列候補が上記日付のパターンを有するとき、上記文字列候補を日付として認識する第3のステップとを備えたことを特徴とするコンピュータプログラム。
  16.  コンピュータによって実行されたときに文字列を光学的に認識するコンピュータプログラムを格納したコンピュータにより読み取り可能な記録媒体において、上記コンピュータプログラムは、
     入力画像から、認識対象のオブジェクトを含む目標領域を抽出する第1のステップと、
     上記目標領域に含まれるオブジェクトから、少なくとも1つの文字列候補のオブジェクトを含む候補オブジェクトを抽出する第2のステップと、
     上記候補オブジェクトのラベリングを行って、予め決められた方向に延在して互いに近接した複数のオブジェクトを上記文字列候補として抽出し、上記文字列候補が、年を表す2桁又は4桁の数字と、月を表す1桁又は2桁の数字と、予め決められた約物とを含む日付のパターンを有するか否かを判断し、上記文字列候補が上記日付のパターンを有するとき、上記文字列候補を日付として認識する第3のステップとを備えたことを特徴とする記録媒体。
PCT/JP2014/068725 2013-07-16 2014-07-14 光学文字認識装置 Ceased WO2015008732A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2015527291A JP6344389B2 (ja) 2013-07-16 2014-07-14 光学文字認識装置
CN201480040348.1A CN105431866A (zh) 2013-07-16 2014-07-14 光学字符识别装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2013147546 2013-07-16
JP2013-147546 2013-07-16

Publications (1)

Publication Number Publication Date
WO2015008732A1 true WO2015008732A1 (ja) 2015-01-22

Family

ID=52346186

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/068725 Ceased WO2015008732A1 (ja) 2013-07-16 2014-07-14 光学文字認識装置

Country Status (4)

Country Link
JP (1) JP6344389B2 (ja)
CN (1) CN105431866A (ja)
TW (1) TWI608422B (ja)
WO (1) WO2015008732A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180117596A (ko) * 2016-03-02 2018-10-29 핑안 테크놀로지 (션젼) 컴퍼니 리미티드 운전면허 유효기간 자동 추출 방법, 기기, 시스템 및 저장 매체
CN110414496A (zh) * 2018-04-26 2019-11-05 百度在线网络技术(北京)有限公司 相似字识别方法、装置、计算机设备及存储介质
EP4290478A4 (en) * 2022-03-22 2024-07-24 Choong Ryul Lee METHOD FOR PROCESSING AN IMAGE ACQUIRED FROM AN IMAGING DEVICE LINKED TO A COMPUTER DEVICE, AND SYSTEM USING SAID METHOD

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407976B (zh) * 2016-08-30 2019-11-05 百度在线网络技术(北京)有限公司 图像字符识别模型生成和竖列字符图像识别方法和装置
JP6401806B2 (ja) * 2017-02-14 2018-10-10 株式会社Pfu 日付識別装置、日付識別方法及び日付識別プログラム
JP6480985B2 (ja) * 2017-07-03 2019-03-13 ファナック株式会社 Ncプログラム変換装置
JP6949596B2 (ja) 2017-07-20 2021-10-13 東芝テック株式会社 商品データ処理装置及び商品データ処理プログラム
TWI685796B (zh) * 2018-05-31 2020-02-21 國立中興大學 智慧型文字圖形識別方法
CN110490192A (zh) * 2019-07-16 2019-11-22 广东工业大学 一种商品生产日期标签检测方法及系统
US12307652B2 (en) * 2020-05-08 2025-05-20 Kabushiki Kaisha N-Tech Print inspection device, print inspection method, and program
TWI797531B (zh) * 2020-12-31 2023-04-01 國立臺北科技大學 藥庫管理系統
CN115396661B (zh) * 2022-07-29 2024-11-22 北京奇艺世纪科技有限公司 设备解码性能确定方法、装置、电子设备及存储介质
CN115937884A (zh) * 2022-12-16 2023-04-07 科大讯飞股份有限公司 表格图片的字符高度识别方法、装置、存储介质及设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001175808A (ja) * 1999-12-22 2001-06-29 Fujitsu Ltd 画像処理装置、及び画像処理プログラムを記録した、コンピュータ読み取り可能な記録媒体
JP2004178044A (ja) * 2002-11-25 2004-06-24 Mitsubishi Electric Corp 属性抽出方法及びその装置及び属性抽出プログラム
JP2009294704A (ja) * 2008-06-02 2009-12-17 Mitsubishi Heavy Ind Ltd ナンバー認識装置およびナンバー認識方法
JP2010115339A (ja) * 2008-11-13 2010-05-27 Ookuma Electronic Co Ltd 注射液用空容器の情報読取装置
JP2011521520A (ja) * 2008-04-16 2011-07-21 ワイコフ, リチャード ダレル 携帯型マルチメディア受信および送信装置
JP2012137841A (ja) * 2010-12-24 2012-07-19 Institute Of National Colleges Of Technology Japan ピッキングシステムおよびピッキング方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5405015A (en) * 1993-08-11 1995-04-11 Videojet Systems International, Inc. System and method for seeking and presenting an area for reading with a vision system
TW200641708A (en) * 2005-05-25 2006-12-01 Systex Corp Fast inquiry system and method for merchandise data
JP2009199102A (ja) * 2008-02-19 2009-09-03 Fujitsu Ltd 文字認識プログラム、文字認識装置及び文字認識方法
US8577145B2 (en) * 2009-12-19 2013-11-05 Pcas Patient Care Automation Services Inc. Automated dispensary for identifying embossed characters and package labeling
CN101968865B (zh) * 2010-11-17 2013-12-11 上海合合信息科技发展有限公司 在电子日历中添加提醒事件的方法
JP5647919B2 (ja) * 2011-03-07 2015-01-07 株式会社Nttドコモ 文字認識装置、文字認識方法、文字認識システム、および文字認識プログラム

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001175808A (ja) * 1999-12-22 2001-06-29 Fujitsu Ltd 画像処理装置、及び画像処理プログラムを記録した、コンピュータ読み取り可能な記録媒体
JP2004178044A (ja) * 2002-11-25 2004-06-24 Mitsubishi Electric Corp 属性抽出方法及びその装置及び属性抽出プログラム
JP2011521520A (ja) * 2008-04-16 2011-07-21 ワイコフ, リチャード ダレル 携帯型マルチメディア受信および送信装置
JP2009294704A (ja) * 2008-06-02 2009-12-17 Mitsubishi Heavy Ind Ltd ナンバー認識装置およびナンバー認識方法
JP2010115339A (ja) * 2008-11-13 2010-05-27 Ookuma Electronic Co Ltd 注射液用空容器の情報読取装置
JP2012137841A (ja) * 2010-12-24 2012-07-19 Institute Of National Colleges Of Technology Japan ピッキングシステムおよびピッキング方法

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180117596A (ko) * 2016-03-02 2018-10-29 핑안 테크놀로지 (션젼) 컴퍼니 리미티드 운전면허 유효기간 자동 추출 방법, 기기, 시스템 및 저장 매체
JP2018533808A (ja) * 2016-03-02 2018-11-15 平安科技(深▲せん▼)有限公司 運転免許証有効期限自動抽出方法、装置、システム及び記憶媒体
EP3425563A4 (en) * 2016-03-02 2019-10-23 Ping An Technology (Shenzhen) Co., Ltd. METHOD, DEVICE AND SYSTEM FOR THE AUTOMATIC EXTRACTION OF THE EXPIRATION DATE OF A DRIVING LICENSE AND STORAGE MEDIUM
KR102152191B1 (ko) * 2016-03-02 2020-09-07 핑안 테크놀로지 (션젼) 컴퍼니 리미티드 운전면허 유효기간 자동 추출 방법, 기기, 시스템 및 저장 매체
CN110414496A (zh) * 2018-04-26 2019-11-05 百度在线网络技术(北京)有限公司 相似字识别方法、装置、计算机设备及存储介质
CN110414496B (zh) * 2018-04-26 2022-05-27 百度在线网络技术(北京)有限公司 相似字识别方法、装置、计算机设备及存储介质
EP4290478A4 (en) * 2022-03-22 2024-07-24 Choong Ryul Lee METHOD FOR PROCESSING AN IMAGE ACQUIRED FROM AN IMAGING DEVICE LINKED TO A COMPUTER DEVICE, AND SYSTEM USING SAID METHOD

Also Published As

Publication number Publication date
CN105431866A (zh) 2016-03-23
TWI608422B (zh) 2017-12-11
TW201506800A (zh) 2015-02-16
JP6344389B2 (ja) 2018-06-20
JPWO2015008732A1 (ja) 2017-03-02

Similar Documents

Publication Publication Date Title
JP6344389B2 (ja) 光学文字認識装置
JP7102490B2 (ja) 画像認識装置
JP6354589B2 (ja) 物体識別装置、方法及びプログラム
US8300928B2 (en) System and method for locating a target region in an image
JP6143111B2 (ja) 物体識別装置、物体識別方法、及びプログラム
CN103714338B (zh) 图像处理装置和图像处理方法
TWI725465B (zh) 影像處理系統、影像處理方法及程式產品
US8526668B2 (en) Marker processing method, marker processing device, marker, object having a marker, and marker processing program
CN109961399B (zh) 基于图像距离变换的最佳缝合线搜寻方法
CN113903024A (zh) 一种手写票据数值信息识别方法、系统、介质及装置
JP2016105276A (ja) 2次元マトリックスシンボルを復号するためのシステムおよび方法
US8538170B2 (en) System and method for document location and recognition
TWI751426B (zh) 影像處理系統、影像處理方法及程式產品
JP7232222B2 (ja) 情報処理システム
JPWO2014030400A1 (ja) 物体識別装置、物体識別方法、及びプログラム
JP6941331B2 (ja) 画像認識システム
CN113658039A (zh) 一种药瓶标签图像的拼接顺序确定方法
JP5160366B2 (ja) 電子部品のパターンマッチング方法
JP2017173925A (ja) 光学文字認識装置
JP6890849B2 (ja) 情報処理システム
JP2023061880A (ja) 照合装置及びプログラム
AU2016238852A1 (en) Method for analyzing contents of at least one image of a deformed structured document
Ali et al. Modern to Historic Image Matching: ORB/SURF an Effective Matching Technique
US11817207B1 (en) Medication inventory system including image based boundary determination for generating a medication tray stocking list and related methods
WO2015181580A1 (en) Automated review of forms through augmented reality

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201480040348.1

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14825778

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2015527291

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14825778

Country of ref document: EP

Kind code of ref document: A1