WO2014092189A1 - Image recognition device, image recognition method, and image recognition program - Google Patents

Image recognition device, image recognition method, and image recognition program Download PDF

Info

Publication number
WO2014092189A1
WO2014092189A1 PCT/JP2013/083524 JP2013083524W WO2014092189A1 WO 2014092189 A1 WO2014092189 A1 WO 2014092189A1 JP 2013083524 W JP2013083524 W JP 2013083524W WO 2014092189 A1 WO2014092189 A1 WO 2014092189A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
recognition
input image
recognition target
registered
Prior art date
Application number
PCT/JP2013/083524
Other languages
French (fr)
Japanese (ja)
Inventor
博史 川口
康毅 斎藤
Original Assignee
株式会社メディポリ
チームラボ株式会社
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 株式会社メディポリ, チームラボ株式会社 filed Critical 株式会社メディポリ
Publication of WO2014092189A1 publication Critical patent/WO2014092189A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition

Definitions

  • the present invention relates to an image recognition apparatus, an image recognition method, and an image recognition program, and more particularly, to an input image recognition process.
  • Dispensing pharmacies that provide drugs according to doctors' prescriptions handle a wide variety of drugs. Since drugs are life-threatening and there should be no medication errors, it is necessary to provide accurate drugs according to the doctor's prescription from a wide variety of drugs. Among various types of medicines, for example, many medicines packed in blister packs are similar in appearance. Therefore, the confirmation work of the medicine at the time of provision is a heavy burden on the pharmacist.
  • Patent Document 1 In the technique disclosed in Patent Document 1, it is assumed that a drug name image part capable of recognizing a drug name from an image of a packaging material is collated. However, since a special font may be used for the medicine name printed on the medicine, it may be difficult to perform highly accurate character recognition.
  • the image displayed on the drug packaging material may contain information effective for drug recognition.
  • information is used. Cannot be used effectively.
  • such a subject is not limited to the medicine packaged by the blister pack, but can be a problem as long as the medicine displays information capable of identifying the medicine on the packaging material.
  • the present invention has been made in consideration of the above-described circumstances, and an object thereof is to improve the recognition accuracy of a recognition target based on an input image and to quickly obtain a recognition result of the recognition target.
  • one embodiment of the present invention is a drug recognition device that recognizes a drug based on a read image generated by imaging a package of the drug, and acquires the read image. And a registered image database in which a plurality of local feature amounts are extracted from the read image, and local feature amounts extracted for each of a plurality of medicine images that can be recognized are registered in association with each of the plurality of medicines.
  • the unit obtains the conversion information in the order of the ranks of the plurality of medicines ranked, and the verification processing unit converts one of the medicine image and the read image using the conversion information obtained in order. Determining whether the image of the medicine and the read image are the same, and outputting the medicine corresponding to the image of the medicine determined to be the same as the recognition result of the medicine for the read image. When That.
  • a drug recognition method for recognizing a drug based on a read image generated by imaging a package of a drug, wherein the read image is acquired, and a plurality of read images are obtained from the read image.
  • a local feature amount is extracted, and a local feature amount extracted for each of a plurality of medicine images that can be recognized is extracted from the read image with reference to a registered image database registered in association with each of the plurality of medicines.
  • a plurality of local feature quantities are associated with the nearest local feature quantity among the local feature quantities registered in the registered image database, the plurality of drugs are ranked according to the number of associated local feature quantities, and the drugs Conversion information for converting one of the medicine image and the read image so that the read image and the read image are overlapped with each other.
  • the drug is obtained based on the local feature amount extracted from the image of the medicine and the read image in the order of the medicine, and the medicine is used by using the conversion information obtained in the order of the ranking of the ranked medicines.
  • One of the image and the read image is converted and the image of the drug and the read image are compared to determine whether the image of the drug and the read image are the same.
  • the medicine corresponding to the determined medicine image is output as a medicine recognition result for the read image.
  • a medicine recognition program for recognizing a medicine based on a read image generated by imaging a medicine packaging, the step of acquiring the read image, and the read image Extracting a plurality of local feature amounts from the registered image database in which local feature amounts extracted for each of a plurality of medicine images that can be recognized are registered in association with each of the plurality of medicines, and Associating a plurality of local feature quantities extracted from the read image with the nearest local feature quantity among the local feature quantities registered in the registered image database; and the plurality of drugs according to the number of associated local feature quantities The medicine image and the read image so that the medicine image and the read image are superimposed.
  • the information processing apparatus includes a step of determining whether or not the read image is the same, and a step of outputting a drug corresponding to the drug image determined to be the same as a drug recognition result for the read image. It is made to perform.
  • the recognition accuracy of the recognition target based on the input image can be improved, and the recognition result of the recognition target can be obtained quickly.
  • an image recognition device a drug recognition device that uses an image obtained by imaging a medicine packaging as an input image, recognizes the type of the drug based on the image, and notifies the user of the input image. This will be described as an example.
  • FIG. 1 is a perspective view showing an appearance and an internal configuration of a medicine recognition apparatus 1 according to the present embodiment.
  • the drug recognition device 1 according to the present embodiment is configured by installing a touch panel 3 on a box-shaped housing 2.
  • a part of the upper surface of the housing 2 is formed of a transparent plate, and the transparent portion serves as an imaging stand 4 on which a medicine to be imaged is placed.
  • a camera 6 for imaging a medicine placed on the imaging table 4 is installed inside the housing 2, and a ball-type illumination 5 is provided so as to face the imaging table 4 from the periphery of the camera 6. ing. Due to the effect of the ball-type illumination 5, the medicine placed on the imaging table 4 is irradiated with light from multiple directions, and an image of the medicine from which the shadow is eliminated is taken by the camera 6.
  • a controller device 7 is provided inside the housing 2, and an image captured and generated by the camera 6 is input to the controller device 7.
  • the controller device 7 processes the medicine image acquired from the camera 6 to perform the medicine recognition process, and displays the recognition result on the touch panel 3.
  • FIG. 2 is a block diagram showing a hardware configuration of the medicine recognition apparatus 1 according to the present embodiment.
  • the medicine recognition apparatus 1 according to the present embodiment includes the above-described camera 6 in addition to the same configuration as an information processing terminal such as a general server or a PC (Personal Computer). That is, the drug recognition apparatus 1 according to the present embodiment includes a CPU (Central Processing Unit) 10, a RAM (Random Access Memory) 11, a ROM (Read Only Memory) 12, an HDD (Hard Disk Drive) 13 and an I / F 14. 17 is connected.
  • the I / F 14 is connected to an image camera 6, an LCD (Liquid Crystal Display) 15, and an operation unit 16.
  • the CPU 10 is a calculation means and controls the operation of the entire medicine recognition apparatus 1.
  • the RAM 11 is a volatile storage medium capable of reading and writing information at high speed, and is used as a work area when the CPU 10 processes information.
  • the ROM 12 is a read-only nonvolatile storage medium, and stores programs such as firmware.
  • the HDD 13 is a non-volatile storage medium that can read and write information, and stores an OS (Operating System), various control programs, application programs, and the like.
  • the I / F 14 connects and controls the bus 18 and various hardware and networks.
  • the LCD 15 is a visual user interface for the operator of the apparatus to confirm the state of the medicine recognition apparatus 1.
  • the operation unit 16 is a user interface for an operator to input information to the medicine recognition device 1.
  • the LCD 15 and the operation unit 16 constitute the touch panel 3 shown in FIG.
  • a program stored in a recording medium such as the ROM 12, the HDD 14, or an optical disk (not shown) is read into the RAM 11, and the CPU 10 performs an operation according to the program, thereby configuring a software control unit.
  • a functional block that realizes the function of the medicine recognition apparatus 1 according to the present embodiment is configured by a combination of the software control unit configured as described above and hardware.
  • FIG. 3 is a block diagram showing a functional configuration of the controller device 7 according to the present embodiment.
  • the controller device 7 according to the present embodiment includes a registered image database 1-2 and an image processing unit 110 in addition to the camera driver 101 that drives the camera 6 and the display driver 103 that drives the LCD 15. Including.
  • the camera driver 101, the display driver 103, and the image processing unit 110 have the software control unit and hardware realized by the CPU 10 performing calculations according to the program read into the RAM 11. It works by.
  • the image processing unit 110 acquires an image of the medicine placed on the imaging stand 4 taken by the camera 6 via the camera driver 101, and performs medicine recognition processing based on the image.
  • the registered image database 102 is an information storage unit that stores information related to an image of a medicine that can be placed on the imaging table 4 and can be recognized (hereinafter referred to as “registered image”).
  • FIG. 4 is a diagram illustrating an example of information stored in the registered image database 102.
  • the registered image database 102 according to the present embodiment includes a “medicine ID” that identifies a drug that can be recognized, a “medicine name” that indicates the name of a drug that can be recognized, and a drug that can be recognized. This is information associated with “data path” information indicating a storage area in which an image of the package is stored.
  • the “medicine name” includes a part of the drug name itself such as “ABC tablet” and a part of the amount of the drug such as “250 mg”.
  • the “data path” is a data path indicating a storage area in the HDD 13 described with reference to FIG. 2, for example, but may be a storage area outside the medicine recognition apparatus 1 such as a network drive.
  • FIG. 5A is a diagram illustrating an example of a registered image according to the present embodiment. As shown in FIG. 5A, in a general medicine packaging, the name and quantity of the medicine are repeatedly displayed on one side. In the medicine recognition device 1 according to the present embodiment, an image of a surface on which such names and amounts of medicines are repeatedly displayed is registered in advance.
  • Fig. 5 (b) is an image obtained by extracting one portion of the display range of the drug name and quantity shown in Fig. 5 (a).
  • an image of a portion that can be a feature in medicine recognition as shown in FIG. Reference image ” is registered in advance.
  • the image processing unit 110 includes an image acquisition unit 111, a ranking unit 112, a rotation processing unit 113, and a verification processing unit 114.
  • the image acquisition unit 111 acquires an image (hereinafter, referred to as “read image”) that is captured and generated by the camera 6 via the camera driver 101.
  • the ranking unit 112 performs a comparison process between the read image acquired by the image acquisition unit 111 and the registered image whose “data path” is registered in the registered image database 102, and ranks the registered images in an order similar to the read image. I do.
  • the rotation processing unit 113 considers that the medicine is read while being tilted or rotated in the read image, and aligns the direction of the registered image with the portion serving as a key for image comparison included in the read image. Performs image rotation processing. That is, the rotation processing unit 113 functions as a conversion information acquisition unit that obtains conversion information for converting either one of the read image and the registered image so as to overlap each other.
  • the verification processing unit 114 compares the key portion of the read image rotated by the rotation processing unit 113 and the registered image in the order of the ranks generated by the ranking unit 112, and determines whether or not they are the same image. And outputs information to display the verification result.
  • the gist of the present embodiment is to perform each process with high accuracy and high speed by using parameters related to the processes in the ranking unit 112 and the rotation processing unit 113.
  • processing according to the gist of the present embodiment will be described.
  • the camera 6 may detect and execute in real time that the medicine is placed on the imaging table 4, or may be executed by the operator operating the touch panel 3. .
  • FIG. 6A is a diagram illustrating an example of a read image generated by imaging a medicine placed on the imaging stand 4.
  • the read image generated by the imaging by the camera 6 is in a state where the medicine is tilted as shown in FIG. 6A according to how the medicine is placed on the imaging stand 4 by the operator.
  • the image acquisition unit 111 acquires the read image generated in this way via the camera driver 101.
  • the ranking unit 112 registers information in the registered image database 102 in the order of similarity to the read images based on the read images acquired by the image acquisition unit 111. Ranking registered images.
  • the details of the processing by the ranking unit 112 is one of the gist according to the present embodiment.
  • the ranking unit 112 according to the present embodiment uses the read image and the registered image as input, and performs ranking by nearest neighbor search processing based on local feature amounts.
  • the local feature amount extraction processing includes processing for extracting key points effective for recognition in an image and processing for generating feature amounts for each of the extracted key points.
  • FIG. 6B is a diagram illustrating an example of a result of key point extraction based on the read image illustrated in FIG.
  • Such key point extraction processing can be realized, for example, by extracting corner pixels using a simple corner detection filter. In that case, a predetermined scale can be used for the local scale. It is also possible to perform key point extraction using Fast-Hessian Detector.
  • the ranking unit 112 performs feature amount extraction based on the extracted image around the key point.
  • SIFT Scale-Invariant Feature Transform
  • SURF Speeded-Up Robust Features
  • FRAK Fast Retina Keypoint
  • the content of the feature amount extracted by such processing differs depending on whether one of the above-described algorithms is used, but all is information calculated or extracted according to the content of the image. For example, when SIFT is used, a 128-dimensional feature amount can be extracted.
  • the ranking unit 112 executes the above-described key point extraction and feature amount extraction processing in advance for an image whose information is registered in the registered image database 102.
  • FIG. 5C is a diagram illustrating an example of the processing executed in advance. As shown in FIG. 5C, the ranking unit 112 according to the present embodiment extracts key points for the reference image shown in FIG. 5B among the images whose information is registered in the registered image database 102. The feature amount extraction is executed in advance, and the result is stored in the registered image database 102.
  • the local feature value f q of the read image and the local feature value f t of the reference image obtained in this way are expressed by, for example, the following equations (1) and (2).
  • p q and p t shown in equations (1) and (2) are the positions of the feature points, and are indicated by the coordinates of the pixels in the image, for example.
  • ⁇ q and ⁇ t are feature point scales, respectively.
  • d q and d t are descriptors indicating the features of the feature points, respectively.
  • the ranking unit 112 uses the feature points extracted from the read image by the nearest neighbor search process as keys, and features corresponding to the feature points. Search for points in the reference image. In the nearest neighbor search, the ranking unit 112 sequentially refers to the feature points extracted from the read image, and selects d t closest to d q of the feature points from the information registered in the registered image database. Associate.
  • the feature points in the read image and the feature points in the reference image that are associated with each other are connected by a broken line.
  • a broken line associated with a part of the feature point in the read image specifically, one display part of the medicine name as one unit is shown.
  • all the feature points included in the read image are associated with the feature points of any registered image whose information is registered in the registered image database by the nearest neighbor search.
  • each of the feature points of the part of the drug name displayed in the read image is associated with the feature point in the reference image, so that the plurality of feature points in the read image are referred to. It can happen that it is associated with one feature point in the image redundantly.
  • FIG. 7 shows a case where the drug in the read image is the same as the drug in the reference image.
  • FIG. 8 is a diagram illustrating an example of feature points associated with different reference images, that is, different drugs, for the same read image as FIG. 7. As shown in FIG. 8, when the drug in the read image and the drug in the reference image are different, the feature amounts are naturally different, and the number of feature points is small even if they are associated with each other.
  • the ranking unit 112 associates feature points by the nearest neighbor search with respect to one registered image for all registered images whose information is registered in the registered image database 102.
  • the nearest neighbor search it is preferable to perform approximation for speeding up the processing.
  • the approximate nearest neighbor search for example, Hierarchical K-Means Tree or ANN (Approximate Nearest Neighbor) is used. Can do.
  • the ranking unit 112 counts the number of feature points associated with the feature points in the read image for each reference image as the number of votes, The number of votes for each reference image is obtained. In other words, the ranking unit 112 counts how many votes out of n votes each reference image obtains with the number n of feature points extracted from the read image as the total number of votes.
  • the ranking unit 112 that performed such vote count processing performs ranking of reference images based on the number of votes counted for each reference image.
  • FIG. 9 shows an example of the results of counting and ranking the number of votes.
  • the ranking by the ranking unit 112 is not a reference image.
  • the feature points extracted from the read image may be associated with the feature points extracted from the registered image shown in FIG.
  • the medicine corresponding to the reference image that has obtained the first place by the processing of the ranking unit 112 represents an accurate recognition result.
  • the “ABC tablet whose medicine ID is“ 0001 ” is also used. “250 mg”, the correct recognition result has won first place.
  • a feature point in an image of a different drug is associated by a nearest neighbor search, and an accurate recognition result is not ranked first.
  • the ranking result verification process is executed by the rotation processing unit 113 and the verification processing unit 114. Therefore, the ranking unit 112 inputs the ranking result illustrated in FIG. 9, the read image and local feature amount extraction result, and the feature point association result to the rotation processing unit 113.
  • FIG. 10 is a flowchart showing the order of processing executed by the rotation processing unit 113 and the verification processing unit 114.
  • the rotation processing unit 113 that has acquired the above-described information from the ranking unit 112 selects reference images in the order of the ranking results illustrated in FIG. 9, and selects the selected reference images as corresponding feature points.
  • a conversion matrix H for matching and projecting on the read image is obtained (S1001).
  • the transformation matrix H can be obtained using, for example, RANSAC (RANdom Sampl Consensus). Processing for obtaining the transformation matrix H using RANSAC will be described below with reference to FIG.
  • the rotation processing unit 113 first associates the feature points included in the reference image with the feature points included in the read image (S1101).
  • the rotation processing unit 113 using the f q-i and f t-j described above, the following equation (3), the f q-i and f t-j that satisfy the constraints shown in (4)
  • Corresponding points C ⁇ p q ⁇ i , p t ⁇ j ⁇ are obtained by associating the sets as corresponding points.
  • the expression (3) is an expression for calculating the Hamming distance in the case of FREEK, and is an expression for calculating the Euclidean distance in the case of SIFT and SURF. Therefore, “T d ” is set with respect to the Hamming distance or the Euclidean distance. That is, the threshold value is used to determine that the feature amount of the feature point in the reference image is close to the feature amount of the feature point in the read image. Further, since the reference image is stored at the same resolution as that of the image picked up by the camera 6, for example, “1” can be used as T s indicating the threshold of the scale difference.
  • the feature point association processing by the above formulas (3) and (4) can also be used in the feature point association by the ranking unit 112.
  • the result of association by the ranking unit 112 can be adopted as the result of association in S1101.
  • the ranking unit 112 it is predicted that many feature points are associated with each other. Therefore, feature points are associated again based on the above formulas (3) and (4). Even if it is performed, it is predicted that many feature points have the same correspondence result. Therefore, by adopting the feature point association result by the ranking unit 112 as the association result in S1101, it is possible to reduce the amount of processing and obtain a result quickly without degrading the processing accuracy.
  • the rotation processing unit 113 that has completed the processing of S1101 next randomly selects one corresponding point associated in S1101 (S1102), and is within a predetermined range on the read image side with the selected corresponding point as the center. Two other corresponding points are randomly selected from the reference image side (S1103).
  • This predetermined range is, for example, a range in which the diagonal line of the reference image shown in FIG.
  • the rotation processing unit 113 When a total of three corresponding points are acquired from the predetermined range on the read image side, the rotation processing unit 113 performs the reference image side according to the affine transformation based on the positions ⁇ p q ⁇ i , p t ⁇ j ⁇ of the corresponding points.
  • a transformation matrix H for projecting the feature points to the read image side is obtained (S1104). Since the number of parameters in the affine transformation is 6, it is possible to obtain the transformation matrix H according to the affine transformation using two parameters included in each of the three feature points.
  • the rotation processing unit 113 projects the feature points in the reference image into the read image using the calculated H (S1105), and the feature points of the reference image projected in the read image;
  • the position difference from the corresponding feature point of the read image that is, the number of corresponding points whose distance between corresponding feature points is within a predetermined threshold value is counted as Inlier (S1106).
  • the predetermined threshold value can be set by the number of pixels, for example, and a relatively small value such as a few pixels to a dozen pixels is set according to the resolution of the reference image.
  • the rotation processing unit 113 repeatedly executes the processing from S1102 in various corresponding point selection states (S1107 / NO). When the specified number of repetitions is completed (S1107 / YES), each corresponding point is selected. The count number of Inlier counted in the state is compared, and the conversion matrix H obtained when the count number is the largest is determined as the final conversion matrix H (S1108), and the process is terminated. In the process of S1108, the Inlier count may be the same in the selection state of a plurality of corresponding points. In such a case, any one may be selected.
  • the rotation processing unit 113 determines that any of the corresponding corresponding points being selected is incorrect, and returns to S1102 to select another feature point.
  • DLT Direct Linear Transform
  • the rotation processing unit 113 when the rotation processing unit 113 obtains the transformation matrix H by such processing, the rotation processing unit 113 inputs the obtained transformation matrix H to the verification processing unit 114.
  • the verification processing unit 114 projects the selected reference image onto the read image based on the conversion matrix H acquired from the rotation processing unit 113 in this way. By projecting the reference image onto the read image, a range corresponding to the reference image in the read image can be extracted based on the outer frame of the reference image, as shown in FIG.
  • the verification processing unit 114 performs an image in a range corresponding to the reference image in the read image, that is, an image of a characteristic part for identifying a drug such as “ABC tablet 250 mg” (hereinafter, “ Whether or not the two images are the same by comparing the extracted medicine display unit image with the reference image converted by the conversion matrix H. That is, the accuracy of the reference image ranked higher by the ranking unit 112 as being similar to the read image is verified (S1002).
  • the comparison processing of the image by the verification processing unit 114 is performed by, for example, calculating the similarity of the shape by normalized correlation or calculating the similarity by comparing the color histograms generated by the HSV (Hue, Saturation, Value) system. This can be realized by making a threshold judgment on the determined value. In addition, verification accuracy can be improved by using a combination of the above-described threshold determination for the similarity of the shape and the similarity of the color.
  • the rotation processing unit 113 and the verification processing unit 114 perform conversion matrix H calculation processing and verification processing in the order of the generated order as shown in FIG.
  • the verification processing unit 114 determines that the reference image being determined is a read image, that is, when the verification is passed (S1003 / YES)
  • the determination process is terminated at that time, and the determination result is displayed.
  • the judgment result that is, the recognition result of the medicine placed on the imaging stand 4 is displayed on the LCD 15.
  • the verification processing unit 114 determines that the reference image being determined is not a read image (S1003 / NO)
  • the verification processing unit 114 notifies the rotation processing unit 113 of the determination result.
  • the rotation processing unit 113 executes the process described with reference to FIG. 11 for the reference image having the next highest order in the order shown in FIG.
  • the verification processing unit 114 performs the verification process on the next highest-reference image.
  • the medicine recognition apparatus 1 after ranking the reference images based on the local feature amounts as described above, a detailed comparison inspection is performed by the verification processing unit 114 according to the ranking. Therefore, it is possible to improve the accuracy of drug recognition through detailed comparison tests, and since ranking is performed using local features in advance, comparisons are made in order from the reference images that are most likely to be accurate. Since the drug recognition result is confirmed when the accuracy is confirmed, it is not necessary to carry out detailed comparison inspections for many reference images, and the recognition result of the drug can be obtained quickly by reducing the processing load. It is possible.
  • the conversion matrix H is calculated by the rotation processing unit 113 to correct the inclination of the read image.
  • a portion corresponding to the reference image in the read image that is, a portion to be subjected to the high-precision comparison inspection is extracted from the read image.
  • the matching result of the local feature amount obtained by the ranking unit 112 is used. It is possible to link the processing of the rotation processing unit 113 with each other, realize efficient processing, and contribute to the acquisition of the rapid drug recognition result described above.
  • the medicine recognition device 1 As described above, according to the medicine recognition device 1 according to the present embodiment, it is possible to improve the medicine recognition accuracy based on an image obtained by imaging the packaging material and to quickly obtain the medicine recognition result. Moreover, in the said embodiment, although the case where the image displayed on the packaging of a medicine was character information like "ABC tablet 250 mg" was demonstrated as an example, the method which concerns on this embodiment is not restricted to character information. Applicable and widely applicable to drugs in various packaging forms.
  • photographed based on the image obtained by imaging the packaging of a medicine was demonstrated as an example, it is not restricted to such an aspect,
  • the input image Can be widely used as a technique for recognizing a recognition object displayed in an image.
  • the display on the LCD 15 has been described as an example as a result of the drug recognition process.
  • the drug name of the recognized drug may be read out by voice. If there is information indicating a medicine to be provided, such as prescription information, whether the medicine is correctly selected by comparing the recognition result by the verification processing unit 114 with the information indicating the medicine to be provided. It is also possible to notify the pharmacist by judging.
  • the number of medicine display unit images included in the read image is determined based on the number of the conversion matrix H. can do.
  • the number of medicine display unit images determined in this way can be used in medicine recognition. Such a case can be realized by registering the number of medicine display unit images for each medicine in the registered image database 102 described in FIG.
  • the medicine may be prescribed in a divided state instead of one package of the blister pack.
  • it is also possible to determine the amount of the prescribed medicine by judging the number of medicine display unit images included in the read image as described above. This makes it possible to determine whether or not the amount of medicine actually provided matches the doctor's prescription.
  • the number of medicine display unit images displayed in the medicine packaging does not always correspond to the amount of medicine, for example, the number of tablets.
  • the number of medicine display unit images included in one package of the blister pack is registered in the registered image database 102 for each medicine, and based on the ratio to the number of medicine display unit images determined from the read image.
  • the amount of medicine corresponding to the number of recognized medicine display unit images may be registered in the registered image database 102 for each medicine.
  • the case where the verification is terminated by the process such as the normalized correlation in the verification processing unit 114 has been described as an example.
  • a combination of medicines whose reference images are very similar may be stored in a database in advance, and when a medicine registered in the database is recognized, further detailed verification may be performed.
  • the type of medicine may be the same and the amount may be different.
  • the “2” portion of “250 mg” and the “1” portion of “150 mg” are different as images. Even if the read image is “250 mg”, If “150 mg” is ranked first by the ranking unit 112, the verification processing by the verification processing unit 114 may pass verification.
  • FIG. 15 is a diagram showing an example of a database (hereinafter referred to as “similar drug database”) in which similar drugs are registered.
  • similar drug database for example, drug IDs of drugs with similar reference images are registered in association with each other, and the reference image of the drug ID is verified by the verification processing unit 114. Is passed, the information of coordinates indicating the area in the reference image to be further verified is associated as “verification area coordinates”.
  • FIG. 16 is a diagram illustrating an example of the coordinate range specified by the verification area coordinates. As indicated by a broken line in FIG. 16, a different part in a set of similar images is specified as a verification region. Thereby, when the medicine ID corresponding to the reference image that has passed the verification pass in S1003 in FIG. 10 is registered in the similar medicine database, the verification processing unit 114 performs the verification process again on the verification region coordinates associated with the medicine ID. That is, the shape similarity is calculated by the above-described normal correlation, and the similarity is calculated by comparing color histograms generated by the HSV system. Thereby, it is possible to improve the recognition accuracy for similar images.
  • the process of S1001 in FIG. 11 may be omitted and only the verification process using normalized correlation or the like may be performed.
  • the transformation matrix H obtained in the reference image in error is used as it is, there is a possibility that a positional deviation occurs between the read image and the reference image in the verification process with the similar image. This misregistration can be absorbed in the normalized correlation processing, and the amount of processing can be reduced by such processing, and the recognition result can be obtained quickly.
  • the case has been described as an example where, after ranking by the ranking unit 112, the verification processing by the verification processing unit 114 is always performed to ensure the accuracy of the recognition result.
  • the result of ranking as shown in FIG. 9, if it can be clearly determined that the first place is correct based on the difference between the first place and the second place, the rotation processing unit 113 and the verification processing unit 114.
  • the first result shown in FIG. 9 may be output as the recognition result.
  • the ranking unit 112 determines that the medicine corresponding to the first medicine ID is correct if, for example, the number of votes in the second place is 1% or less of the number of votes in the first place as a result of the ranking shown in FIG.
  • the result is a recognition result and generating information for displaying the recognition result in place of the verification processing unit 114 and outputting the information to the display driver 103, the determination result on the LCD 15, that is, the image is placed on the imaging stand 4.
  • the recognition result of the selected drug is displayed.

Abstract

The present invention increases the recognition accuracy of an input image and rapidly obtains recognition results of a recognition subject. The present invention is characterized by containing: a ranking unit (112) that extracts a plurality of local feature quantities from an input image, references a registered image database (102) in which local feature quantities extracted from each of a plurality of recognition subject images that can be recognized are associated with each of a plurality of recognition subjects, and are registered, associates the plurality of local feature quantities extracted from the input image with the closest local feature quantities among the registered local feature quantities, and ranks the plurality of recognition subjects in accordance with the number of associated local feature quantities; a rotation processing unit (113) that, on the basis of each extracted local feature quantity, determines conversion information for converting the recognition subject images; and a verification processing unit (114) that performs a conversion using the determined conversion information and determines whether or not the recognition subject image and the input image are the same.

Description

画像認識装置、画像認識方法及び画像認識プログラムImage recognition apparatus, image recognition method, and image recognition program
 本発明は、画像認識装置、画像認識方法及び画像認識プログラムに関し、特に、入力された画像の認識処理に関する。 The present invention relates to an image recognition apparatus, an image recognition method, and an image recognition program, and more particularly, to an input image recognition process.
 医師の処方に応じて薬剤を提供する調剤薬局においては非常に多種の薬剤を取り扱っている。薬剤は生命に関わるものであり、投薬過誤はあってはならないため、薬剤の提供に際しては多種の薬剤の中から医師の処方に従った正確な薬剤の提供が求められる。様々な種類の薬剤のうち、例えばブリスタパックに梱包された薬剤は外観的に類似したものが多く存在するため、提供時における薬剤の確認作業は薬剤師にとっての大きな負担となっている。 調 Dispensing pharmacies that provide drugs according to doctors' prescriptions handle a wide variety of drugs. Since drugs are life-threatening and there should be no medication errors, it is necessary to provide accurate drugs according to the doctor's prescription from a wide variety of drugs. Among various types of medicines, for example, many medicines packed in blister packs are similar in appearance. Therefore, the confirmation work of the medicine at the time of provision is a heavy burden on the pharmacist.
 このような負担を軽減するため、薬剤を直接包装している包装材の画像を読み取って生成された画像から薬剤名を認識して、正確な薬剤が選択されているか否かを確認する方法が提案されている(例えば、特許文献1参照)。 In order to reduce such a burden, there is a method for recognizing a drug name from an image generated by reading an image of a packaging material directly packaging a drug and confirming whether an accurate drug is selected. It has been proposed (see, for example, Patent Document 1).
特開2004-167158号公報JP 2004-167158 A
 特許文献1に開示された技術においては、包装材の画像から薬剤名を認識可能な薬剤名画像部分を照合することが前提となっている。しかしながら、薬剤に印字されている薬剤名には特別なフォントが用いられている場合があるため、高精度な文字認識を行うことが困難な場合があり得る。 In the technique disclosed in Patent Document 1, it is assumed that a drug name image part capable of recognizing a drug name from an image of a packaging material is collated. However, since a special font may be used for the medicine name printed on the medicine, it may be difficult to perform highly accurate character recognition.
 また、薬剤の包装材に表示されている画像には、薬剤名以外にも薬剤の認識に有効な情報が含まれている場合もあるが、特許文献1において開示された技術ではそのような情報を有効に活用できていない。尚、このような課題はブリスタパックによって包装された薬剤に限定されたものではなく、包装材に薬剤を識別可能な情報が表示された薬剤であれば同様に課題となり得る。 In addition to the drug name, the image displayed on the drug packaging material may contain information effective for drug recognition. However, in the technique disclosed in Patent Document 1, such information is used. Cannot be used effectively. In addition, such a subject is not limited to the medicine packaged by the blister pack, but can be a problem as long as the medicine displays information capable of identifying the medicine on the packaging material.
 また、薬剤の認識にも限らず、入力された画像に表示されている対象物を画像処理によって認識するための画像認識処理全般において、認識精度の正確性及び認識処理の迅速性は重要な課題である。 In addition to the recognition of drugs, the accuracy of recognition accuracy and the speed of recognition processing are important issues in general image recognition processing for recognizing an object displayed in an input image by image processing. It is.
 本発明は、上記実情を考慮してなされたものであり、入力された画像に基づく認識対象の認識精度を向上すると共に、認識対象の認識結果を迅速に得ることを目的とする。 The present invention has been made in consideration of the above-described circumstances, and an object thereof is to improve the recognition accuracy of a recognition target based on an input image and to quickly obtain a recognition result of the recognition target.
 上記課題を解決するために、本発明の一態様は、薬剤の包装を撮像することにより生成された読取画像に基づいて薬剤を認識する薬剤認識装置であって、前記読取画像を取得する画像取得部と、前記読取画像から複数の局所特徴量を抽出し、認識され得る複数の薬剤の画像夫々について抽出された局所特徴量が前記複数の薬剤夫々に関連付けられて登録されている登録画像データベースを参照し、前記読取画像から抽出された複数の局所特徴量を、前記登録画像データベースに登録されている局所特徴量のうち最も近い局所特徴量に関連付け、関連付けられた局所特徴量の数に従って前記複数の薬剤を順位付けする順位付け部と、前記薬剤の画像と前記読取画像とが重ね合わせられるように、前記薬剤の画像及び前記読取画像の一方を変換するための変換情報を、前記薬剤の画像及び前記読取画像から夫々抽出された局所特徴量に基づいて求める変換情報取得部と、求められた前記変換情報を用いて前記薬剤の画像及び前記読取画像の一方を変換し、前記薬剤の画像及び前記読取画像とを比較することにより前記薬剤の画像と前記読取画像とが同一であるか否かを判断する検証処理部とを含み、前記変換情報取得部は、順位付けされた前記複数の薬剤の順位の順に前記変換情報を求め、前記検証処理部は、順番に求められた変換情報を用いて前記薬剤の画像及び前記読取画像の一方を変換して前記薬剤の画像と前記読取画像とが同一であるか否かを判断し、同一であると判断した前記薬剤の画像に対応する薬剤を前記読取画像に対する薬剤の認識結果として出力することを特徴とする。 In order to solve the above problems, one embodiment of the present invention is a drug recognition device that recognizes a drug based on a read image generated by imaging a package of the drug, and acquires the read image. And a registered image database in which a plurality of local feature amounts are extracted from the read image, and local feature amounts extracted for each of a plurality of medicine images that can be recognized are registered in association with each of the plurality of medicines. Referring to and associating a plurality of local feature quantities extracted from the read image with the nearest local feature quantity among the local feature quantities registered in the registered image database, and the plurality of local feature quantities according to the number of associated local feature quantities An ordering unit for ranking medicines, and transforming one of the medicine image and the read image so that the medicine image and the read image are superimposed Conversion information acquisition unit that obtains conversion information for obtaining based on local feature amounts extracted from the image of the medicine and the read image, respectively, and the image of the medicine and the read image using the obtained conversion information And a verification processing unit that determines whether the image of the medicine and the read image are the same by converting one of the medicine image and comparing the image of the medicine and the read image. The unit obtains the conversion information in the order of the ranks of the plurality of medicines ranked, and the verification processing unit converts one of the medicine image and the read image using the conversion information obtained in order. Determining whether the image of the medicine and the read image are the same, and outputting the medicine corresponding to the image of the medicine determined to be the same as the recognition result of the medicine for the read image. When That.
 また、本発明の他の態様は、薬剤の包装を撮像することにより生成された読取画像に基づいて薬剤を認識する薬剤認識方法であって、前記読取画像を取得し、前記読取画像から複数の局所特徴量を抽出し、認識され得る複数の薬剤の画像夫々について抽出された局所特徴量が前記複数の薬剤夫々に関連付けられて登録されている登録画像データベースを参照し、前記読取画像から抽出された複数の局所特徴量を、前記登録画像データベースに登録されている局所特徴量のうち最も近い局所特徴量に関連付け、関連付けられた局所特徴量の数に従って前記複数の薬剤を順位付けし、前記薬剤の画像と前記読取画像とが重ね合わせられるように、前記薬剤の画像及び前記読取画像の一方を変換するための変換情報を、順位付けされた前記複数の薬剤の順位の順に、前記薬剤の画像及び前記読取画像から夫々抽出された局所特徴量に基づいて求め、順位付けされた前記複数の薬剤の順位の順に求められた前記変換情報を用いて前記薬剤の画像及び前記読取画像の一方を変換し、前記薬剤の画像及び前記読取画像とを比較することにより前記薬剤の画像と前記読取画像とが同一であるか否かを判断し、同一であると判断した前記薬剤の画像に対応する薬剤を前記読取画像に対する薬剤の認識結果として出力することを特徴とする。 According to another aspect of the present invention, there is provided a drug recognition method for recognizing a drug based on a read image generated by imaging a package of a drug, wherein the read image is acquired, and a plurality of read images are obtained from the read image. A local feature amount is extracted, and a local feature amount extracted for each of a plurality of medicine images that can be recognized is extracted from the read image with reference to a registered image database registered in association with each of the plurality of medicines. A plurality of local feature quantities are associated with the nearest local feature quantity among the local feature quantities registered in the registered image database, the plurality of drugs are ranked according to the number of associated local feature quantities, and the drugs Conversion information for converting one of the medicine image and the read image so that the read image and the read image are overlapped with each other. The drug is obtained based on the local feature amount extracted from the image of the medicine and the read image in the order of the medicine, and the medicine is used by using the conversion information obtained in the order of the ranking of the ranked medicines. One of the image and the read image is converted and the image of the drug and the read image are compared to determine whether the image of the drug and the read image are the same. The medicine corresponding to the determined medicine image is output as a medicine recognition result for the read image.
 また、本発明の更に他の態様は、薬剤の包装を撮像することにより生成された読取画像に基づいて薬剤を認識する薬剤認識プログラムであって、前記読取画像を取得するステップと、前記読取画像から複数の局所特徴量を抽出するステップと、認識され得る複数の薬剤の画像夫々について抽出された局所特徴量が前記複数の薬剤夫々に関連付けられて登録されている登録画像データベースを参照し、前記読取画像から抽出された複数の局所特徴量を、前記登録画像データベースに登録されている局所特徴量のうち最も近い局所特徴量に関連付けるステップと、関連付けられた局所特徴量の数に従って前記複数の薬剤を順位付けるステップと、前記薬剤の画像と前記読取画像とが重ね合わせられるように、前記薬剤の画像及び前記読取画像の一方を変換するための変換情報を、順位付けされた前記複数の薬剤の順位の順に、前記薬剤の画像及び前記読取画像から夫々抽出された局所特徴量に基づいて求めるステップと、順位付けされた前記複数の薬剤の順位の順に求められた前記変換情報を用いて前記薬剤の画像及び前記読取画像の一方を変換し、前記薬剤の画像及び前記読取画像とを比較することにより前記薬剤の画像と前記読取画像とが同一であるか否かを判断するステップと、同一であると判断した前記薬剤の画像に対応する薬剤を前記読取画像に対する薬剤の認識結果として出力するステップとを情報処理装置に実行させることを特徴とする。 According to still another aspect of the present invention, there is provided a medicine recognition program for recognizing a medicine based on a read image generated by imaging a medicine packaging, the step of acquiring the read image, and the read image Extracting a plurality of local feature amounts from the registered image database in which local feature amounts extracted for each of a plurality of medicine images that can be recognized are registered in association with each of the plurality of medicines, and Associating a plurality of local feature quantities extracted from the read image with the nearest local feature quantity among the local feature quantities registered in the registered image database; and the plurality of drugs according to the number of associated local feature quantities The medicine image and the read image so that the medicine image and the read image are superimposed. A step of obtaining conversion information for converting a method based on local features extracted from the image of the medicine and the read image in the order of the ranking of the plurality of medicines, respectively. Converting one of the medicine image and the read image using the conversion information obtained in the order of the plurality of medicines, and comparing the medicine image and the read image with the medicine image The information processing apparatus includes a step of determining whether or not the read image is the same, and a step of outputting a drug corresponding to the drug image determined to be the same as a drug recognition result for the read image. It is made to perform.
 本発明によれば、入力された画像に基づく認識対象の認識精度を向上すると共に、認識対象の認識結果を迅速に得ることが可能となる。 According to the present invention, the recognition accuracy of the recognition target based on the input image can be improved, and the recognition result of the recognition target can be obtained quickly.
本発明の薬剤認識装置の外観及び内部構成を示す図である。It is a figure which shows the external appearance and internal structure of the chemical | medical agent recognition apparatus of this invention. 本発明の実施形態に係る薬剤認識装置のハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of the chemical | medical agent recognition apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る薬剤認識装置の機能構成を示す図である。す図である。It is a figure which shows the function structure of the chemical | medical agent recognition apparatus which concerns on embodiment of this invention. It is a figure. 本発明の実施形態に係る登録画像データベースの例を示す図である。It is a figure which shows the example of the registration image database which concerns on embodiment of this invention. 本発明の実施形態に係る登録画像、参照画像及び特徴点の抽出例を示す図である。It is a figure which shows the example of extraction of the registration image, reference image, and feature point which concern on embodiment of this invention. 本発明の実施形態に係る読取画像の例を示す図である。It is a figure which shows the example of the read image which concerns on embodiment of this invention. 本発明の実施形態に係る特徴点の対応付けの例を示す図である。It is a figure which shows the example of matching of the feature point which concerns on embodiment of this invention. 本発明の実施形態に係る特徴点の対応付けの例を示す図である。It is a figure which shows the example of matching of the feature point which concerns on embodiment of this invention. 本発明の実施形態に係る順位付け結果の例を示す図である。It is a figure which shows the example of the ranking result which concerns on embodiment of this invention. 本発明の実施形態に係る回転処理部及び検証処理部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the rotation process part and verification process part which concern on embodiment of this invention. 本発明の実施形態に係る回転処理部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the rotation process part which concerns on embodiment of this invention. 本発明の実施形態に係る参照画像の読み取り画像への射影を概念的に示す図である。It is a figure which shows notionally the projection to the read image of the reference image which concerns on embodiment of this invention. 本発明の実施形態に係る読取画像の例を示す図である。It is a figure which shows the example of the read image which concerns on embodiment of this invention. 本発明の実施形態に係る類似画像の例を示す図である。It is a figure which shows the example of the similar image which concerns on embodiment of this invention. 本発明の実施形態に係る類似画像データベースの例を示す図である。It is a figure which shows the example of the similar image database which concerns on embodiment of this invention. 本発明の実施形態に係る検証領域座標の例を示す図である。It is a figure which shows the example of the verification area | region coordinate which concerns on embodiment of this invention.
 以下、図面を参照して、本発明の実施形態を詳細に説明する。本実施形態においては、画像認識装置の例として、薬剤の包装を撮像して得られた画像を入力画像とし、その画像に基づき、その薬剤の種類を認識してユーザに通知する薬剤認識装置を例として説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In the present embodiment, as an example of an image recognition device, a drug recognition device that uses an image obtained by imaging a medicine packaging as an input image, recognizes the type of the drug based on the image, and notifies the user of the input image. This will be described as an example.
 図1は、本実施形態に係る薬剤認識装置1の外観及び内部構成を示す斜視図である。図1に示すように、本実施形態に係る薬剤認識装置1は、箱状の筐体2にタッチパネル3が設置されて構成されている。筐体2の上面の一部は透明の板で構成されており、その透明部分が撮像対象の薬剤を置く撮像台4となる。 FIG. 1 is a perspective view showing an appearance and an internal configuration of a medicine recognition apparatus 1 according to the present embodiment. As shown in FIG. 1, the drug recognition device 1 according to the present embodiment is configured by installing a touch panel 3 on a box-shaped housing 2. A part of the upper surface of the housing 2 is formed of a transparent plate, and the transparent portion serves as an imaging stand 4 on which a medicine to be imaged is placed.
 筐体2内部には、撮像台4の上に置かれた薬剤を撮像するためのカメラ6が設置されており、カメラ6の周囲から撮像台4に対向するようにボール型照明5が設けられている。このボール型照明5の効果により、撮像台4に置かれた薬剤には多方向から光が照射され、陰影の排除された薬剤の画像がカメラ6によって撮像される。 A camera 6 for imaging a medicine placed on the imaging table 4 is installed inside the housing 2, and a ball-type illumination 5 is provided so as to face the imaging table 4 from the periphery of the camera 6. ing. Due to the effect of the ball-type illumination 5, the medicine placed on the imaging table 4 is irradiated with light from multiple directions, and an image of the medicine from which the shadow is eliminated is taken by the camera 6.
 筐体2内部にはコントローラ装置7が設けられており、カメラ6によって撮像されて生成された画像がコントローラ装置7に入力される。コントローラ装置7は、カメラ6から取得した薬剤の画像を処理して薬剤の認識処理を行い、タッチパネル3に認識結果を表示する。 A controller device 7 is provided inside the housing 2, and an image captured and generated by the camera 6 is input to the controller device 7. The controller device 7 processes the medicine image acquired from the camera 6 to perform the medicine recognition process, and displays the recognition result on the touch panel 3.
 図2は、本実施形態に係る薬剤認識装置1のハードウェア構成を示すブロック図である。図1に示すように、本実施形態に係る薬剤認識装置1は、一般的なサーバやPC(Personal Computer)等の情報処理端末と同様の構成に加えて、上述したカメラ6を含む。即ち、本実施形態に係る薬剤認識装置1は、CPU(Central Processing Unit)10、RAM(Random Access Memory)11、ROM(Read Only Memory)12、HDD(Hard Disk Drive)13及びI/F14がバス17を介して接続されている。また、I/F14には、画像カメラ6、LCD(Liquid Crystal Display)15及び操作部16が接続されている。 FIG. 2 is a block diagram showing a hardware configuration of the medicine recognition apparatus 1 according to the present embodiment. As shown in FIG. 1, the medicine recognition apparatus 1 according to the present embodiment includes the above-described camera 6 in addition to the same configuration as an information processing terminal such as a general server or a PC (Personal Computer). That is, the drug recognition apparatus 1 according to the present embodiment includes a CPU (Central Processing Unit) 10, a RAM (Random Access Memory) 11, a ROM (Read Only Memory) 12, an HDD (Hard Disk Drive) 13 and an I / F 14. 17 is connected. The I / F 14 is connected to an image camera 6, an LCD (Liquid Crystal Display) 15, and an operation unit 16.
 CPU10は演算手段であり、薬剤認識装置1全体の動作を制御する。RAM11は、情報の高速な読み書きが可能な揮発性の記憶媒体であり、CPU10が情報を処理する際の作業領域として用いられる。ROM12は、読み出し専用の不揮発性記憶媒体であり、ファームウェア等のプログラムが格納されている。HDD13は、情報の読み書きが可能な不揮発性の記憶媒体であり、OS(Operating System)や各種の制御プログラム、アプリケーション・プログラム等が格納されている。I/F14は、バス18と各種のハードウェアやネットワーク等を接続し制御する。 The CPU 10 is a calculation means and controls the operation of the entire medicine recognition apparatus 1. The RAM 11 is a volatile storage medium capable of reading and writing information at high speed, and is used as a work area when the CPU 10 processes information. The ROM 12 is a read-only nonvolatile storage medium, and stores programs such as firmware. The HDD 13 is a non-volatile storage medium that can read and write information, and stores an OS (Operating System), various control programs, application programs, and the like. The I / F 14 connects and controls the bus 18 and various hardware and networks.
 LCD15は、装置のオペレータが薬剤認識装置1の状態を確認するための視覚的ユーザインタフェースである。操作部16は、オペレータが薬剤認識装置1に情報を入力するためのユーザインタフェースである。本実施形態においては、LCD15及び操作部16によって、図1に示すタッチパネル3が構成される。 The LCD 15 is a visual user interface for the operator of the apparatus to confirm the state of the medicine recognition apparatus 1. The operation unit 16 is a user interface for an operator to input information to the medicine recognition device 1. In the present embodiment, the LCD 15 and the operation unit 16 constitute the touch panel 3 shown in FIG.
 このようなハードウェア構成において、ROM12やHDD14若しくは図示しない光学ディスク等の記録媒体に格納されたプログラムがRAM11に読み出され、そのプログラムに従ってCPU10が演算を行う事により、ソフトウェア制御部が構成される。このようにして構成されたソフトウェア制御部と、ハードウェアとの組み合わせによって、本実施形態に係る薬剤認識装置1の機能を実現する機能ブロックが構成される。 In such a hardware configuration, a program stored in a recording medium such as the ROM 12, the HDD 14, or an optical disk (not shown) is read into the RAM 11, and the CPU 10 performs an operation according to the program, thereby configuring a software control unit. . A functional block that realizes the function of the medicine recognition apparatus 1 according to the present embodiment is configured by a combination of the software control unit configured as described above and hardware.
 次に、図3を参照して、本実施形態に係る薬剤認識装置1のコントローラ装置7の機能構成について説明する。図3は、本実施形態に係るコントローラ装置7の機能構成を示すブロック図である。図3に示すように、本実施形態に係るコントローラ装置7は、カメラ6を駆動するカメラドライバ101、及びLCD15を駆動するディスプレイドライバ103に加えて、登録画像データベース1-2及び画像処理部110を含む。 Next, the functional configuration of the controller device 7 of the drug recognition device 1 according to the present embodiment will be described with reference to FIG. FIG. 3 is a block diagram showing a functional configuration of the controller device 7 according to the present embodiment. As shown in FIG. 3, the controller device 7 according to the present embodiment includes a registered image database 1-2 and an image processing unit 110 in addition to the camera driver 101 that drives the camera 6 and the display driver 103 that drives the LCD 15. Including.
 尚、カメラドライバ101、ディスプレイドライバ103及び画像処理部110は、上述したように、RAM11に読み出されたプログラムに従ってCPU10が演算を行う事により実現されるソフトウェア制御部とハードウェアとが連動することにより機能する。画像処理部110は、カメラ6によって撮像された撮像台4上に置かれた薬剤の画像をカメラドライバ101を介して取得し、その画像に基づいて薬剤の認識処理を行う。 Note that, as described above, the camera driver 101, the display driver 103, and the image processing unit 110 have the software control unit and hardware realized by the CPU 10 performing calculations according to the program read into the RAM 11. It works by. The image processing unit 110 acquires an image of the medicine placed on the imaging stand 4 taken by the camera 6 via the camera driver 101, and performs medicine recognition processing based on the image.
 登録画像データベース102は、撮像台4上に置かれて認識対象となり得る薬剤の画像(以降、「登録画像」とする)に関する情報を記憶している情報記憶部である。図4は、登録画像データベース102に記憶されている情報の例を示す図である。図4に示すように、本実施形態に係る登録画像データベース102は、認識対象となり得る薬剤を識別する“薬剤ID”、認識対象となり得る薬剤の名称を示す“薬剤名”、認識対象となり得る薬剤の包装の画像が格納されている記憶領域を示す“データパス”の情報が関連付けられた情報である。 The registered image database 102 is an information storage unit that stores information related to an image of a medicine that can be placed on the imaging table 4 and can be recognized (hereinafter referred to as “registered image”). FIG. 4 is a diagram illustrating an example of information stored in the registered image database 102. As illustrated in FIG. 4, the registered image database 102 according to the present embodiment includes a “medicine ID” that identifies a drug that can be recognized, a “medicine name” that indicates the name of a drug that can be recognized, and a drug that can be recognized. This is information associated with “data path” information indicating a storage area in which an image of the package is stored.
 図4に示すように、本実施形態に係る“薬剤名”は、「ABC錠」のような薬剤の名称そのものの部分と、「250mg」のような薬剤の分量の部分とを含む。また、本実施形態に“データパス”は、例えば図2において説明したHDD13内の記憶領域を示すデータパスであるが、ネットワークドライブ等、薬剤認識装置1外部の記憶領域であってもよい。 As shown in FIG. 4, the “medicine name” according to the present embodiment includes a part of the drug name itself such as “ABC tablet” and a part of the amount of the drug such as “250 mg”. In the present embodiment, the “data path” is a data path indicating a storage area in the HDD 13 described with reference to FIG. 2, for example, but may be a storage area outside the medicine recognition apparatus 1 such as a network drive.
 図5(a)は、本実施形態に係る登録画像の例を示す図である。図5(a)に示すように、一般的な薬剤の包装においては、その片面上に薬剤の名称や分量などが繰り返し表示されている。本実施形態に係る薬剤認識装置1においては、このような薬剤の名称や分量などが繰り返し表示されている面の画像が予め登録されている。 FIG. 5A is a diagram illustrating an example of a registered image according to the present embodiment. As shown in FIG. 5A, in a general medicine packaging, the name and quantity of the medicine are repeatedly displayed on one side. In the medicine recognition device 1 according to the present embodiment, an image of a surface on which such names and amounts of medicines are repeatedly displayed is registered in advance.
 図5(b)は、図5(a)に示す薬剤の名称や分量の表示範囲の1つ分を抽出した画像である。本実施形態に薬剤認識装置1においては、図5(a)に示す薬剤の包装全体の画像の他、図5(b)に示すような薬剤の認識において特徴となり得る部分の画像(以降、「参照画像」とする)が予め登録されている。 Fig. 5 (b) is an image obtained by extracting one portion of the display range of the drug name and quantity shown in Fig. 5 (a). In the medicine recognition apparatus 1 according to the present embodiment, in addition to the image of the whole medicine packaging shown in FIG. 5A, an image of a portion that can be a feature in medicine recognition as shown in FIG. Reference image ”is registered in advance.
 図3に示すように、本実施形態に係る画像処理部110は、画像取得部111、順位付け部112、回転処理部113及び検証処理部114を含む。画像取得部111は、カメラドライバ101を介して、カメラ6が撮像して生成した画像(以降、「読取画像」とする)を取得する。順位づけ部112は、画像取得部111が取得した読取画像と登録画像データベース102に“データパス”が登録されている登録画像との比較処理を行い、読取画像に類似する順に登録画像の順位付けを行う。 As shown in FIG. 3, the image processing unit 110 according to the present embodiment includes an image acquisition unit 111, a ranking unit 112, a rotation processing unit 113, and a verification processing unit 114. The image acquisition unit 111 acquires an image (hereinafter, referred to as “read image”) that is captured and generated by the camera 6 via the camera driver 101. The ranking unit 112 performs a comparison process between the read image acquired by the image acquisition unit 111 and the registered image whose “data path” is registered in the registered image database 102, and ranks the registered images in an order similar to the read image. I do.
 回転処理部113は、読取画像において薬剤が傾いたり回転したりして読み取られていることを考慮し、読取画像に含まれる画像比較のキーとなる部分と、登録画像との向きを合わせるように画像の回転処理を行う。即ち、回転処理部113が、読取画像と登録画像とが重ね合わせられるように、どちらか一方を変換するための変換情報を求める変換情報取得部として機能する。検証処理部114は、回転処理部113によって回転処理された読取画像のキー部分と登録画像とを、順位付け部112によって生成された順位の順に比較し、両者が同一の画像であるか否かを検証して検証結果を表示するための情報を出力する。 The rotation processing unit 113 considers that the medicine is read while being tilted or rotated in the read image, and aligns the direction of the registered image with the portion serving as a key for image comparison included in the read image. Performs image rotation processing. That is, the rotation processing unit 113 functions as a conversion information acquisition unit that obtains conversion information for converting either one of the read image and the registered image so as to overlap each other. The verification processing unit 114 compares the key portion of the read image rotated by the rotation processing unit 113 and the registered image in the order of the ranks generated by the ranking unit 112, and determines whether or not they are the same image. And outputs information to display the verification result.
 このような構成において、本実施形態に係る要旨は、順位付け部112、回転処理部113における処理において関連するパラメータを用いることにより、夫々の処理を高精度且つ高速に行うことにある。以下、本実施形態の要旨に係る処理について説明する。本実施形態に係る薬剤認識装置1の動作に際しては、まずは上述したようにオペレータが薬剤を撮像台4上に置き、カメラ6による薬剤の撮像が実行される。カメラ6による撮像の実行に際しては、薬剤が撮像台4上に置かれたことをカメラ6がリアルタイムに検知して実行しても良いし、オペレータがタッチパネル3を操作することにより実行しても良い。 In such a configuration, the gist of the present embodiment is to perform each process with high accuracy and high speed by using parameters related to the processes in the ranking unit 112 and the rotation processing unit 113. Hereinafter, processing according to the gist of the present embodiment will be described. In the operation of the medicine recognition apparatus 1 according to this embodiment, first, as described above, the operator places the medicine on the imaging table 4 and the medicine 6 is imaged by the camera 6. When the imaging by the camera 6 is executed, the camera 6 may detect and execute in real time that the medicine is placed on the imaging table 4, or may be executed by the operator operating the touch panel 3. .
 図6(a)は、撮像台4に置かれた薬剤を撮像することにより生成された読取画像の例を示す図である。カメラ6による撮像によって生成された読取画像は、オペレータによる薬剤の撮像台4への置き方に応じて、図6(a)に示すように薬剤が傾いた状態となる。画像取得部111は、このように生成された読み取り画像をカメラドライバ101を介して取得する。 FIG. 6A is a diagram illustrating an example of a read image generated by imaging a medicine placed on the imaging stand 4. The read image generated by the imaging by the camera 6 is in a state where the medicine is tilted as shown in FIG. 6A according to how the medicine is placed on the imaging stand 4 by the operator. The image acquisition unit 111 acquires the read image generated in this way via the camera driver 101.
 画像取得部111が読取画像を取得すると、順位付け部112は、画像取得部111が取得した読取画像に基づき、この読取画像に類似している順に、登録画像データベース102に情報が登録されている登録画像の順位付けを行う。この順位付け部112による処理の詳細が、本実施形態に係る要旨の1つである。本実施形態に係る順位付け部112は、読取画像及び登録画像を入力とし、局所特徴量に基づく最近傍探索処理によって順位付けを行う。 When the image acquisition unit 111 acquires read images, the ranking unit 112 registers information in the registered image database 102 in the order of similarity to the read images based on the read images acquired by the image acquisition unit 111. Ranking registered images. The details of the processing by the ranking unit 112 is one of the gist according to the present embodiment. The ranking unit 112 according to the present embodiment uses the read image and the registered image as input, and performs ranking by nearest neighbor search processing based on local feature amounts.
 局所特徴量の抽出処理は、画像中において認識に有効なキーポイントを抽出する処理と、抽出したキーポイント夫々について特徴量を生成する処理とを含む。図6(b)は、図6(a)に示す読取画像に基づいてキーポイント抽出を行った結果の例を示す図である。このようなキーポイント抽出処理は、例えば、単純なコーナー検知フィルタによってコーナーの画素を抽出することにより実現可能である。その場合、局所スケールについては、予め定められたスケールを用いることができる。また、Fast-Hessian Detecterを用いてキーポイント抽出を行うことも可能である。 The local feature amount extraction processing includes processing for extracting key points effective for recognition in an image and processing for generating feature amounts for each of the extracted key points. FIG. 6B is a diagram illustrating an example of a result of key point extraction based on the read image illustrated in FIG. Such key point extraction processing can be realized, for example, by extracting corner pixels using a simple corner detection filter. In that case, a predetermined scale can be used for the local scale. It is also possible to perform key point extraction using Fast-Hessian Detector.
 図6(b)に示すようなキーポイント抽出が完了すると、順位付け部112は、抽出したキーポイント周囲の画像に基づいて特徴量抽出を行う。この特徴量抽出処理に際しては、SIFT(Scale-Invariant Feature Transform)、SURF(Speeded-Up Robust Features)、FREAK(Fast Retina Keypoint)等を用いることができる。この処理により、図6(b)に示すように抽出されたキーポイント毎に、特徴量が抽出される。 When the key point extraction as shown in FIG. 6B is completed, the ranking unit 112 performs feature amount extraction based on the extracted image around the key point. In this feature amount extraction processing, SIFT (Scale-Invariant Feature Transform), SURF (Speeded-Up Robust Features), FRAK (Fast Retina Keypoint), or the like can be used. By this processing, feature amounts are extracted for each extracted key point as shown in FIG.
 このような処理により抽出される特徴量の内容は、上述した夫々のアルゴリズムのいずれかを用いるかによって異なるが、いずれも画像の内容に応じて算出し、若しくは抽出される情報である。例えばSIFTを用いる場合、128次元の特徴量を抽出することができる。 The content of the feature amount extracted by such processing differs depending on whether one of the above-described algorithms is used, but all is information calculated or extracted according to the content of the image. For example, when SIFT is used, a 128-dimensional feature amount can be extracted.
 尚、本実施形態に係る順位付け部112は、上述したキーポイント抽出及び特徴量抽出の処理を登録画像データベース102に情報が登録されている画像に対しても予め実行しておく。図5(c)は、この予め実行しておく処理の例を示す図である。図5(c)に示すように、本実施形態に係る順位付け部112は、登録画像データベース102に情報が登録されている画像のうち、図5(b)に示す参照画像について、キーポイント抽出及び特徴量抽出を予め実行し、その結果を登録画像データベース102に格納しておく。 Note that the ranking unit 112 according to the present embodiment executes the above-described key point extraction and feature amount extraction processing in advance for an image whose information is registered in the registered image database 102. FIG. 5C is a diagram illustrating an example of the processing executed in advance. As shown in FIG. 5C, the ranking unit 112 according to the present embodiment extracts key points for the reference image shown in FIG. 5B among the images whose information is registered in the registered image database 102. The feature amount extraction is executed in advance, and the result is stored in the registered image database 102.
 このようにして求められた読取画像の局所特徴量f及び参照画像の局所特徴量fは、例えば以下の式(1)、(2)によって示される。
Figure JPOXMLDOC01-appb-I000001
 ここで、式(1)、(2)に示すp及びpは、夫々特徴点の位置であり、例えば画像における画素の座標によって示される。また、σ及びσは、夫々特徴点のスケールである。また、d及びdは、夫々特徴点の特徴を示す記述子である。
The local feature value f q of the read image and the local feature value f t of the reference image obtained in this way are expressed by, for example, the following equations (1) and (2).
Figure JPOXMLDOC01-appb-I000001
Here, p q and p t shown in equations (1) and (2) are the positions of the feature points, and are indicated by the coordinates of the pixels in the image, for example. Also, σ q and σ t are feature point scales, respectively. Further, d q and d t are descriptors indicating the features of the feature points, respectively.
 このようにして読取画像及び参照画像から局所特徴量を抽出すると、順位付け部112は、最近傍探索処理によって読取画像から抽出された夫々の特徴点をキーとして、夫々の特徴点に対応する特徴点を参照画像において探索する。最近傍探索において、順位付け部112は、読取画像から抽出された特徴点を順番に参照し、その特徴点のdに最も近いdを登録画像データベースに登録されている情報から選択して関連付ける。 When the local feature amounts are extracted from the read image and the reference image in this way, the ranking unit 112 uses the feature points extracted from the read image by the nearest neighbor search process as keys, and features corresponding to the feature points. Search for points in the reference image. In the nearest neighbor search, the ranking unit 112 sequentially refers to the feature points extracted from the read image, and selects d t closest to d q of the feature points from the information registered in the registered image database. Associate.
 図7においては、対応付けられた読み取り画像中の特徴点と参照画像中の特徴点とが破線で結ばれて示されている。尚、図7においては図示の容易化のため、読取画像中の一部の特徴点、具体的には、1まとまりである薬剤名の表示部分の1つ分に対して対応付けの破線を示しているが、実際には、最近傍探索により、読取画像中に含まれる全ての特徴点が、登録画像データベースに情報が登録されているいずれかの登録画像の特徴点に関連付けられる。 In FIG. 7, the feature points in the read image and the feature points in the reference image that are associated with each other are connected by a broken line. In FIG. 7, for ease of illustration, a broken line associated with a part of the feature point in the read image, specifically, one display part of the medicine name as one unit is shown. However, in practice, all the feature points included in the read image are associated with the feature points of any registered image whose information is registered in the registered image database by the nearest neighbor search.
 即ち、図7の例においては、読取画像において複数表示されている薬剤名の部分の特徴点の夫々が参照画像中の特徴点に関連付けられることにより、読取画像中の複数の特徴点が、参照画像中の1つの特徴点に重複して関連付けられることが起こり得る。 That is, in the example of FIG. 7, each of the feature points of the part of the drug name displayed in the read image is associated with the feature point in the reference image, so that the plurality of feature points in the read image are referred to. It can happen that it is associated with one feature point in the image redundantly.
 図7の場合、読取画像の薬剤と参照画像の薬剤とが同一の場合を示している。図8は、図7と同一の読み取り画像について、異なる参照画像、即ち、異なる薬剤との間で対応付けられた特徴点の例を示す図である。図8に示すように、読取画像の薬剤と参照画像の薬剤とが異なる場合、当然特徴量も異なるため、特徴点が関連付けられたとしてもその数は少ないものとなる。 FIG. 7 shows a case where the drug in the read image is the same as the drug in the reference image. FIG. 8 is a diagram illustrating an example of feature points associated with different reference images, that is, different drugs, for the same read image as FIG. 7. As shown in FIG. 8, when the drug in the read image and the drug in the reference image are different, the feature amounts are naturally different, and the number of feature points is small even if they are associated with each other.
 順位付け部112は、このような処理により、1つの読み取り画像に対して、登録画像データベース102に情報が登録されている全ての登録画像を探索対象として最近傍探索による特徴点の関連付けを行う。尚、最近傍探索においては、処理の高速化のために近似を行うことが好ましい近似最近傍探索の具体的な処理としては、例えばHierarchical K-Means Treeや、ANN(Approximate Nearest Neighbor)を用いることができる。 By such processing, the ranking unit 112 associates feature points by the nearest neighbor search with respect to one registered image for all registered images whose information is registered in the registered image database 102. In the nearest neighbor search, it is preferable to perform approximation for speeding up the processing. As a specific process of the approximate nearest neighbor search, for example, Hierarchical K-Means Tree or ANN (Approximate Nearest Neighbor) is used. Can do.
 このように読取画像に基づく最近傍探索が完了すると、順位付け部112は、夫々の参照画像について読取画像中の特徴点との対応付けが行われた特徴点の数を投票数として集計し、夫々の参照画像に対する投票数を求める。換言すると、順位付け部112は、読取画像において抽出された特徴点の数nを合計の票数として、夫々の参照画像がn票のうちの何票を獲得するかをカウントする。 When the nearest neighbor search based on the read image is completed in this way, the ranking unit 112 counts the number of feature points associated with the feature points in the read image for each reference image as the number of votes, The number of votes for each reference image is obtained. In other words, the ranking unit 112 counts how many votes out of n votes each reference image obtains with the number n of feature points extracted from the read image as the total number of votes.
 このような処理によれば、読取画像と同一の薬剤であれば、n票のうちの多くの票数を占めることになると共に、読取画像に類似した画像であればある程度の票数を獲得することとなる。このような票数のカウント処理を行った順位付け部112は、夫々の参照画像毎にカウントした票数に基づいて参照画像の順位付けを行う。図9に、このような票数のカウント及び順位付けの結果の例を示す。 According to such a process, if the medicine is the same as that of the read image, it occupies a large number of votes, and if the image is similar to the read image, a certain number of votes is obtained. Become. The ranking unit 112 that performed such vote count processing performs ranking of reference images based on the number of votes counted for each reference image. FIG. 9 shows an example of the results of counting and ranking the number of votes.
 尚、本実施形態においては、読取画像から抽出された特徴点を、参照画像から抽出された特徴点に関連付ける場合を例として説明するが、順位付け部112による順位付けにおいては、参照画像ではなく図5(a)に示す登録画像から抽出された特徴点に対して読取画像から抽出された特徴点を関連付けても良い。 In the present embodiment, the case where the feature points extracted from the read image are associated with the feature points extracted from the reference image will be described as an example. However, the ranking by the ranking unit 112 is not a reference image. The feature points extracted from the read image may be associated with the feature points extracted from the registered image shown in FIG.
 多くの場合、順位付け部112の処理によって1位を獲得した参照画像に対応する薬剤が正確な認識結果を表すこととなり、図9の例においても、薬剤IDが「0001」である「ABC錠250mg」として、正確な認識結果が1位を獲得している。しかしながら、類似する画像の存在によっては、最近傍探索によって異なった薬剤の画像中の特徴点に対して対応付けがなされ、正確な認識結果が1位にならない場合があり得る。 In many cases, the medicine corresponding to the reference image that has obtained the first place by the processing of the ranking unit 112 represents an accurate recognition result. In the example of FIG. 9, the “ABC tablet whose medicine ID is“ 0001 ”is also used. “250 mg”, the correct recognition result has won first place. However, depending on the presence of a similar image, there may be a case where a feature point in an image of a different drug is associated by a nearest neighbor search, and an accurate recognition result is not ranked first.
 そのため、本実施形態に係る薬剤認識装置1においては、回転処理部113及び検証処理部114による処理により、順位付け結果の検証処理が実行される。そのため、順位付け部112は、図9に示す順位付け結果と、読取画像及び局所特徴量の抽出結果並びに特徴点の対応付け結果を回転処理部113に入力する。 Therefore, in the drug recognition device 1 according to the present embodiment, the ranking result verification process is executed by the rotation processing unit 113 and the verification processing unit 114. Therefore, the ranking unit 112 inputs the ranking result illustrated in FIG. 9, the read image and local feature amount extraction result, and the feature point association result to the rotation processing unit 113.
 図10は、回転処理部113及び検証処理部114によって実行される処理の順序を示すフローチャートである。図10に示すように、順位付け部112から上述した情報を取得した回転処理部113は、図9に示す順位付け結果の順に参照画像を選択し、選択した参照画像を、対応する特徴点を一致させて読取画像に射影するための変換行列Hを求める(S1001)。変換行列Hは、例えばRANSAC(RANdom SAmple Consensus)を用いて求めることができる。RANSACを用いて変換行列Hを求める場合の処理について、図11を参照して以下に説明する。 FIG. 10 is a flowchart showing the order of processing executed by the rotation processing unit 113 and the verification processing unit 114. As illustrated in FIG. 10, the rotation processing unit 113 that has acquired the above-described information from the ranking unit 112 selects reference images in the order of the ranking results illustrated in FIG. 9, and selects the selected reference images as corresponding feature points. A conversion matrix H for matching and projecting on the read image is obtained (S1001). The transformation matrix H can be obtained using, for example, RANSAC (RANdom Sampl Consensus). Processing for obtaining the transformation matrix H using RANSAC will be described below with reference to FIG.
 図11に示すように、変換行列Hの算出処理において、回転処理部113は、まず参照画像中に含まれる特徴点と読取画像中に含まれる特徴点との対応付けを行う(S1101)。S1101の処理において、回転処理部113は、上述したfq-i及びft-jを用い、以下の式(3)、(4)に示す制約を満たすfq-i及びft-jの組を対応点として対応付けて対応点C={pq-i,pt-j}を求める。
Figure JPOXMLDOC01-appb-I000002
As shown in FIG. 11, in the calculation process of the transformation matrix H, the rotation processing unit 113 first associates the feature points included in the reference image with the feature points included in the read image (S1101). In the processing of S1101, the rotation processing unit 113, using the f q-i and f t-j described above, the following equation (3), the f q-i and f t-j that satisfy the constraints shown in (4) Corresponding points C = {p q−i , p t−j } are obtained by associating the sets as corresponding points.
Figure JPOXMLDOC01-appb-I000002
 ここで、式(3)は、FREAKの場合はハミング距離を算出する式であり、SIFT、SURFの場合はユークリッド距離を算出する式である。従って、“T”はハミング距離またはユークリッド距離に対し設定される。即ち、参照画像中の特徴点の特徴量と読取画像中の特徴点の特徴量とが近いと判断するための閾値である。また、参照画像は、カメラ6による撮像の解像度と同一の解像度で保存されているため、スケール差異の閾値を示すTについては、例えば“1”を用いることができる。 Here, the expression (3) is an expression for calculating the Hamming distance in the case of FREEK, and is an expression for calculating the Euclidean distance in the case of SIFT and SURF. Therefore, “T d ” is set with respect to the Hamming distance or the Euclidean distance. That is, the threshold value is used to determine that the feature amount of the feature point in the reference image is close to the feature amount of the feature point in the read image. Further, since the reference image is stored at the same resolution as that of the image picked up by the camera 6, for example, “1” can be used as T s indicating the threshold of the scale difference.
 このような対応付け処理によれば、図6に示すように参照画像と同一の画像が複数表示された読取画像の場合、参照画像中の特徴点1つに対して、読取画像中の複数の特徴点に対応付けられることとなる。そのような場合であっても、上記対応点C={pq-i,pt-j}は、別個の対応点として求められる。そのような対応点から1つの対応点を選択して変換行列Hを求めるための処理が以降の処理である。 According to such an association process, as shown in FIG. 6, in the case of a read image in which a plurality of images identical to the reference image are displayed, a plurality of feature points in the read image are compared with one feature point in the reference image. It will be associated with the feature point. Even in such a case, the corresponding point C = {p q−i , p t−j } is obtained as a separate corresponding point. The processing for selecting one corresponding point from such corresponding points and obtaining the transformation matrix H is the subsequent processing.
 尚、上記式(3)、(4)による特徴点の対応付け処理は、順位付け部112による特徴点の関連付けにおいても用いることが可能である。その場合、順位付け部112による関連付けの結果を、S1101における対応付けの結果として採用することも可能である。特に順位付けの結果が1位である参照画像については、多くの特徴点が関連付けられていることが予測されるため、再度上記式(3)、(4)に基づいて特徴点の対応付けを行ったとしても、多くの特徴点が同一の対応付け結果となることが予測される。従って、順位付け部112による特徴点の関連付け結果をS1101における対応付けの結果として採用することにより、処理の精度を落とすことなく、処理量を低減して迅速に結果を得ることが可能である。 It should be noted that the feature point association processing by the above formulas (3) and (4) can also be used in the feature point association by the ranking unit 112. In that case, the result of association by the ranking unit 112 can be adopted as the result of association in S1101. In particular, for a reference image that is ranked first, it is predicted that many feature points are associated with each other. Therefore, feature points are associated again based on the above formulas (3) and (4). Even if it is performed, it is predicted that many feature points have the same correspondence result. Therefore, by adopting the feature point association result by the ranking unit 112 as the association result in S1101, it is possible to reduce the amount of processing and obtain a result quickly without degrading the processing accuracy.
 S1101の処理を完了した回転処理部113は、次に、S1101において対応付けられた対応点をランダムに1つ選択する(S1102)と共に、選択された対応点を中心として読取画像側において所定範囲内である他の対応点を参照画像側からランダムに2点選択する(S1103)。この所定範囲は、例えば図5(b)に示す参照画像の対角線を半径とする範囲である。 The rotation processing unit 113 that has completed the processing of S1101 next randomly selects one corresponding point associated in S1101 (S1102), and is within a predetermined range on the read image side with the selected corresponding point as the center. Two other corresponding points are randomly selected from the reference image side (S1103). This predetermined range is, for example, a range in which the diagonal line of the reference image shown in FIG.
 読取画像側の所定範囲内から合計で3つの対応点を取得すると、回転処理部113は、夫々の対応点の位置{pq-i,pt-j}に基づき、アフィン変換に従って参照画像側の特徴点を読取画像側に射影するための変換行列Hを求める(S1104)。アフィン変換におけるパラメータ数は6つであるため、3つの特徴点夫々に含まれる2つのパラメータを用いてアフィン変換に従って変換行列Hを求めることが可能である。 When a total of three corresponding points are acquired from the predetermined range on the read image side, the rotation processing unit 113 performs the reference image side according to the affine transformation based on the positions {p q−i , p t−j } of the corresponding points. A transformation matrix H for projecting the feature points to the read image side is obtained (S1104). Since the number of parameters in the affine transformation is 6, it is possible to obtain the transformation matrix H according to the affine transformation using two parameters included in each of the three feature points.
 変換行列Hを算出すると、回転処理部113は、算出したHを用いて参照画像中の特徴点を読取画像中に射影し(S1105)、読取画像中に射影された参照画像の特徴点と、それに対応する読取画像の特徴点との位置の差、即ち対応する特徴点間の距離が所定の閾値の範囲内である対応点の個数をInlierとしてカウントする(S1106)。この所定の閾値は例えばピクセル数で設定することが可能であり、数ピクセル~十数ピクセルのような比較的小さい値が参照画像の解像度に応じて設定される。 When the transformation matrix H is calculated, the rotation processing unit 113 projects the feature points in the reference image into the read image using the calculated H (S1105), and the feature points of the reference image projected in the read image; The position difference from the corresponding feature point of the read image, that is, the number of corresponding points whose distance between corresponding feature points is within a predetermined threshold value is counted as Inlier (S1106). The predetermined threshold value can be set by the number of pixels, for example, and a relatively small value such as a few pixels to a dozen pixels is set according to the resolution of the reference image.
 回転処理部113はこのようなS1102からの処理を、様々な対応点の選択状態において繰り返し実行し(S1107/NO)、規定回数の繰り返しを完了すると(S1107/YES)、夫々の対応点の選択状態においてカウントされたInlierのカウント数を比較し、カウント数が最も多かった場合に求められた変換行列Hを、最終的な変換行列Hとして確定して(S1108)、処理を終了する。尚、S1108の処理において、複数の対応点の選択状態においてInlierのカウント数が同一となる場合もあり得る。そのような場合、いずれか1つを選択すれば良い。 The rotation processing unit 113 repeatedly executes the processing from S1102 in various corresponding point selection states (S1107 / NO). When the specified number of repetitions is completed (S1107 / YES), each corresponding point is selected. The count number of Inlier counted in the state is compared, and the conversion matrix H obtained when the count number is the largest is determined as the final conversion matrix H (S1108), and the process is terminated. In the process of S1108, the Inlier count may be the same in the selection state of a plurality of corresponding points. In such a case, any one may be selected.
 尚、読取画像の薬剤と参照画像の薬剤とが異なる場合、S1104においてアフィン変換の条件に合致する変換行列Hの算出が不可能な場合もあり得る。その場合、回転処理部113は、選択中の対応点のいずれかの対応付けが誤っていると判断し、S1102に戻って他の特徴点を選択する。 If the drug in the read image is different from the drug in the reference image, it may be impossible to calculate the transformation matrix H that matches the affine transformation conditions in S1104. In that case, the rotation processing unit 113 determines that any of the corresponding corresponding points being selected is incorrect, and returns to S1102 to select another feature point.
 また、カウント数が最も多かった場合に求められた変換行列Hを最終的な変換行列Hとして確定する場合の他、カウント数が最も多かった場合のInlierの対応点の位置関係に基づき、夫々の対応点毎の位置の差が最小となるような変換行列Hを再計算しても良い。このような手法はDLT(Direct Linear Transform)と呼ばれる。 Further, in addition to the case where the conversion matrix H obtained when the number of counts is the largest is determined as the final conversion matrix H, based on the positional relationship between corresponding points of the Inlier when the number of counts is the largest, The transformation matrix H that minimizes the difference in position for each corresponding point may be recalculated. Such a method is called DLT (Direct Linear Transform).
 また、図11のS1104においては、アフィン変換を用いる場合を例として説明したが、図1に示すように、本実施形態に係る薬剤認識装置1においては撮像台4に置かれた薬剤を撮像するため、アフィン変換が必要となるような画像の歪みはほとんど生じない。従って、アフィン変換ではなくユークリッド変換を用いることも可能である。この場合、ユークリッド変換は3点ではなく2点の特徴点を選択すれば計算可能であり、アフィン変換の場合よりも処理負荷を低減して薬剤認識結果を得るまでの時間を短縮することができる。 Further, in S1104 of FIG. 11, the case where affine transformation is used has been described as an example. However, as shown in FIG. 1, in the medicine recognition device 1 according to the present embodiment, the medicine placed on the imaging stand 4 is imaged. Therefore, image distortion that requires affine transformation hardly occurs. Therefore, it is possible to use Euclidean transformation instead of affine transformation. In this case, the Euclidean transformation can be calculated by selecting two feature points instead of three points, and the processing load can be reduced and the time required to obtain a drug recognition result can be shortened compared to the case of affine transformation. .
 図10に戻り、回転処理部113は、このような処理により変換行列Hを求めると、求めた変換行列Hを検証処理部114に入力する。検証処理部114はこのようにして回転処理部113から取得した変換行列Hに基づき、選択中の参照画像を読取画像に射影する。参照画像が読取画像に射影されることにより、図12に示すように、読取画像中において参照画像に相当する範囲を、参照画像の外枠に基づいて抽出することが可能となる。 10, when the rotation processing unit 113 obtains the transformation matrix H by such processing, the rotation processing unit 113 inputs the obtained transformation matrix H to the verification processing unit 114. The verification processing unit 114 projects the selected reference image onto the read image based on the conversion matrix H acquired from the rotation processing unit 113 in this way. By projecting the reference image onto the read image, a range corresponding to the reference image in the read image can be extracted based on the outer frame of the reference image, as shown in FIG.
 検証処理部114は、このような処理により読取画像中において参照画像に相当する範囲の画像、即ち、「ABC錠250mg」のような薬剤を識別する上で特徴的な部分の画像(以降、「薬剤表示単位画像」とする)を読取画像から切り出し、切り出した薬剤表示単位画像と、変換行列Hによって変換された参照画像との比較処理を行うことにより、両画像が同一であるか否か、即ち、順位付け部112によって読取画像に類似するものとして上位にランク付けされた参照画像の正確性を検証する(S1002)。 The verification processing unit 114 performs an image in a range corresponding to the reference image in the read image, that is, an image of a characteristic part for identifying a drug such as “ABC tablet 250 mg” (hereinafter, “ Whether or not the two images are the same by comparing the extracted medicine display unit image with the reference image converted by the conversion matrix H. That is, the accuracy of the reference image ranked higher by the ranking unit 112 as being similar to the read image is verified (S1002).
 検証処理部114による画像の比較処理は、例えば正規化相関による形状の類似度の算出や、HSV(Hue、Saturation、Value)系によって生成した色ヒストグラムの比較による類似度の算出を行い、算出された値に対する閾値判断を行うことにより実現可能である。また、上述した形状の類似度や色の類似度に対する閾値判断を組み合わせて用いることにより、検証精度を向上することが可能である。 The comparison processing of the image by the verification processing unit 114 is performed by, for example, calculating the similarity of the shape by normalized correlation or calculating the similarity by comparing the color histograms generated by the HSV (Hue, Saturation, Value) system. This can be realized by making a threshold judgment on the determined value. In addition, verification accuracy can be improved by using a combination of the above-described threshold determination for the similarity of the shape and the similarity of the color.
 本実施形態に係る回転処理部113及び検証処理部114は、図9に示すように生成された順位の順に夫々変換行列Hの算出処理及び検証処理を行う。そして、検証処理部114が、判断中の参照画像が読取画像であると判断した場合、即ち検証をパスすると(S1003/YES)、その時点で判断処理を終了し、判断結果を表示するための情報を生成してディスプレイドライバ103に出力することにより、LCD15に判断結果、即ち、撮像台4に置かれた薬剤の認識結果を表示させる。 The rotation processing unit 113 and the verification processing unit 114 according to the present embodiment perform conversion matrix H calculation processing and verification processing in the order of the generated order as shown in FIG. When the verification processing unit 114 determines that the reference image being determined is a read image, that is, when the verification is passed (S1003 / YES), the determination process is terminated at that time, and the determination result is displayed. By generating information and outputting it to the display driver 103, the judgment result, that is, the recognition result of the medicine placed on the imaging stand 4 is displayed on the LCD 15.
 他方、検証処理部114は、判断中の参照画像が読取画像ではないと判断した場合(S1003/NO)、その判断結果を回転処理部113に通知する。これにより、回転処理部113は、図9に示すような順位において次に順位の高い参照画像について、図11において説明した処理を実行する。これにより、検証処理部114は次に順位の高い参照画像について検証処理を実行することとなる。このような処理が図9に示すような順位付けの順に繰り返されることにより、薬剤の正確な認識結果を得ることが可能となる。 On the other hand, if the verification processing unit 114 determines that the reference image being determined is not a read image (S1003 / NO), the verification processing unit 114 notifies the rotation processing unit 113 of the determination result. As a result, the rotation processing unit 113 executes the process described with reference to FIG. 11 for the reference image having the next highest order in the order shown in FIG. As a result, the verification processing unit 114 performs the verification process on the next highest-reference image. By repeating such processing in the order of ranking as shown in FIG. 9, it is possible to obtain accurate drug recognition results.
 本実施形態に係る薬剤認識装置1においては、上述したように局所特徴量による参照画像の順位付けを行った上で、その順位に従って検証処理部114による詳細な比較検査を行う。そのため、詳細な比較検査によって薬剤認識の正確性を向上することが可能であると共に、予め局所特徴量を用いた順位付けが行われているため、正確である可能性の高い参照画像から順に比較件を行って、正確性が確認された時点で薬剤認識結果を確定するため、多くの参照画像について詳細な比較検査を行う必要がなく、処理負荷を低減して迅速に薬剤の認識結果を得ることが可能である。 In the medicine recognition apparatus 1 according to the present embodiment, after ranking the reference images based on the local feature amounts as described above, a detailed comparison inspection is performed by the verification processing unit 114 according to the ranking. Therefore, it is possible to improve the accuracy of drug recognition through detailed comparison tests, and since ranking is performed using local features in advance, comparisons are made in order from the reference images that are most likely to be accurate. Since the drug recognition result is confirmed when the accuracy is confirmed, it is not necessary to carry out detailed comparison inspections for many reference images, and the recognition result of the drug can be obtained quickly by reducing the processing load. It is possible.
 また、本実施形態に係る薬剤認識装置1においては、検証処理部114による高精度な比較検査を可能とするため、回転処理部113による変換行列Hの算出処理を行い、読取画像の傾きを補正して参照画像と向きを揃えている、また、読取画像中において参照画像に相当する部分、即ち、検証処理部114に高精度な比較検査を行わせる対象となる部分を抽出している。 Further, in the medicine recognition apparatus 1 according to the present embodiment, in order to enable a high-precision comparison inspection by the verification processing unit 114, the conversion matrix H is calculated by the rotation processing unit 113 to correct the inclination of the read image. Thus, a portion corresponding to the reference image in the read image, that is, a portion to be subjected to the high-precision comparison inspection is extracted from the read image.
 この回転処理部113による変換行列Hの算出処理及び読取画像からの比較対象の抽出処理においても、順位付け部112によって求めた局所特徴量の対応付け結果を用いるため、順位付け部112の処理と回転処理部113の処理とを連動させることが可能であり、効率的な処理を実現して、上述した迅速な薬剤の認識結果の取得に貢献している。 In the calculation process of the transformation matrix H by the rotation processing unit 113 and the extraction process of the comparison target from the read image, the matching result of the local feature amount obtained by the ranking unit 112 is used. It is possible to link the processing of the rotation processing unit 113 with each other, realize efficient processing, and contribute to the acquisition of the rapid drug recognition result described above.
 以上、説明したように、本実施形態に係る薬剤認識装置1によれば、包装材を撮像した画像に基づく薬剤の認識精度を向上すると共に、薬剤の認識結果を迅速に得ることが可能である。また、上記実施形態においては、薬剤の包装に表示されている画像が「ABC錠250mg」のような文字情報である場合を例として説明したが、本実施形態に係る手法は文字情報に限らず適用可能であり、様々な包装形態の薬剤に対して幅広く適用可能である。 As described above, according to the medicine recognition device 1 according to the present embodiment, it is possible to improve the medicine recognition accuracy based on an image obtained by imaging the packaging material and to quickly obtain the medicine recognition result. . Moreover, in the said embodiment, although the case where the image displayed on the packaging of a medicine was character information like "ABC tablet 250 mg" was demonstrated as an example, the method which concerns on this embodiment is not restricted to character information. Applicable and widely applicable to drugs in various packaging forms.
 更に、本実施形態においては、薬剤の包装を撮像することによって得られた画像に基づいて撮像された薬剤を認識する装置を例として説明したが、このような態様に限らず、入力された画像を上述した方法に従って解析することにより、画像中に表示されている認識対象物を認識する技術として幅広く用いることが可能である。 Furthermore, in this embodiment, although the apparatus which recognizes the medicine image | photographed based on the image obtained by imaging the packaging of a medicine was demonstrated as an example, it is not restricted to such an aspect, The input image Can be widely used as a technique for recognizing a recognition object displayed in an image.
 尚、上記実施形態においては、薬剤の認識処理の結果として、LCD15への表示を例として説明した。しかしながらこれは一例であり、例えば、認識された薬剤の薬剤名を音声により読みあげても良い。また、処方箋の情報等、提供するべき薬剤を示す情報があれば、検証処理部114による認識結果と提供するべき薬剤を示す情報とを比較することにより、薬剤が正確に選択されているか否かを判断して薬剤師に通知することも可能である。 In the above embodiment, the display on the LCD 15 has been described as an example as a result of the drug recognition process. However, this is only an example, and for example, the drug name of the recognized drug may be read out by voice. If there is information indicating a medicine to be provided, such as prescription information, whether the medicine is correctly selected by comparing the recognition result by the verification processing unit 114 with the information indicating the medicine to be provided. It is also possible to notify the pharmacist by judging.
 尚、図11において説明した処理においては、S1108において、Inlierのカウント数が最も高かった場合の変換行列Hを採用するため、図5(a)に示すように読取画像に複数表示されている薬剤表示単位画像のうちの1つを抽出して比較処理を行う場合を例として説明した。しかしながら、S1102において、読取画像中の全体からまんべんなく対応点を選択するようにすれば、図5(a)に示すように読取画像において複数表示されている薬剤表示単位画像全てに対応する変換行列Hを求めることが可能である。 In the process described with reference to FIG. 11, in S1108, since the transformation matrix H when the Inlier count is the highest is adopted, a plurality of medicines displayed in the read image as shown in FIG. The case where one of the display unit images is extracted and compared is described as an example. However, in S1102, if the corresponding points are selected evenly from the entire read image, a conversion matrix H corresponding to all of the plurality of medicine display unit images displayed in the read image as shown in FIG. Can be obtained.
 そして、読取画像において複数表示されている薬剤表示単位画像全てに対応する変換行列Hを求めることができれば、その変換行列Hの数に基づき、読取画像中に含まれる薬剤表示単位画像の数を判断することができる。薬剤によっては、1つの包装材において表示されている薬剤表示単位画像の数は予め定まっているため、このようにして判断した薬剤表示単位画像の数を、薬剤認識において用いることが可能である。そのような場合、図4において説明した登録画像データベース102において、夫々の薬剤毎に薬剤表示単位画像の数を登録しておくことにより実現可能である。 If the conversion matrix H corresponding to all of the plurality of medicine display unit images displayed in the read image can be obtained, the number of medicine display unit images included in the read image is determined based on the number of the conversion matrix H. can do. Depending on the medicine, since the number of medicine display unit images displayed on one packaging material is determined in advance, the number of medicine display unit images determined in this way can be used in medicine recognition. Such a case can be realized by registering the number of medicine display unit images for each medicine in the registered image database 102 described in FIG.
 また、薬剤の処方によっては、図13に示すように、ブリスタパックの1つのパッケージ分ではなく、分断された状態で薬剤が処方される場合もあり得る。そのような場合において、上述したように読取画像中に含まれる薬剤表示単位画像の数を判断することにより、処方された薬剤の量を判断することも可能である。これにより、実際に提供される薬剤の量が医師の処方に合致しているものであるか否かを判断することが可能となる。 Further, depending on the prescription of the medicine, as shown in FIG. 13, the medicine may be prescribed in a divided state instead of one package of the blister pack. In such a case, it is also possible to determine the amount of the prescribed medicine by judging the number of medicine display unit images included in the read image as described above. This makes it possible to determine whether or not the amount of medicine actually provided matches the doctor's prescription.
 尚、薬剤の包装において表示されている薬剤表示単位画像の数と薬剤の量、例えば錠剤の数が対応しているとは限らない。その場合、ブリスタパック1つのパッケージに含まれる薬剤表示単位画像の数を夫々の薬剤毎に登録画像データベース102に登録しておき、読取画像から判断された薬剤表示単位画像の数との割合に基づいて求めても良いし、認識された薬剤表示単位画像の数に応じた薬剤の量を、夫々の薬剤毎に登録画像データベース102に登録しておいても良い。 Note that the number of medicine display unit images displayed in the medicine packaging does not always correspond to the amount of medicine, for example, the number of tablets. In that case, the number of medicine display unit images included in one package of the blister pack is registered in the registered image database 102 for each medicine, and based on the ratio to the number of medicine display unit images determined from the read image. The amount of medicine corresponding to the number of recognized medicine display unit images may be registered in the registered image database 102 for each medicine.
 また、上記実施形態においては、検証処理部114における正規化相関等の処理によって検証を終了する場合を例として説明した。この他、参照画像が非常に類似している薬剤の組み合わせを予めデータベース化しておき、そのデータベースに登録されている薬剤が認識された場合には、更に詳細な検証を行うようにしても良い。 In the above-described embodiment, the case where the verification is terminated by the process such as the normalized correlation in the verification processing unit 114 has been described as an example. In addition, a combination of medicines whose reference images are very similar may be stored in a database in advance, and when a medicine registered in the database is recognized, further detailed verification may be performed.
 図14に示すように、薬剤の種類は同一で分量が異なる場合があり得る。図14の例の場合、画像として異なるのは「250mg」の“2”の部分と「150mg」の“1”の部分のみであり、仮に読取画像が「250mg」の場合であったとしても、「150mg」が順位付け部112によって1位として順位付けされた場合、検証処理部114による検証処理において検証をパスしてしまう場合があり得る。 As shown in FIG. 14, the type of medicine may be the same and the amount may be different. In the case of the example in FIG. 14, only the “2” portion of “250 mg” and the “1” portion of “150 mg” are different as images. Even if the read image is “250 mg”, If “150 mg” is ranked first by the ranking unit 112, the verification processing by the verification processing unit 114 may pass verification.
 図15は、類似する薬剤が登録されたデータベース(以降、「類似薬剤データベース」とする)の例を示す図である。図15に示すように、類似薬剤データベースにおいては、例えば、参照画像が類似している薬剤の薬剤IDが互いに関連付けられて登録されていると共に、その薬剤IDの参照画像が検証処理部114において検証をパスした場合に、更に検証するべき参照画像中の領域を示す座標の情報が“検証領域座標”として関連付けられている。 FIG. 15 is a diagram showing an example of a database (hereinafter referred to as “similar drug database”) in which similar drugs are registered. As shown in FIG. 15, in the similar drug database, for example, drug IDs of drugs with similar reference images are registered in association with each other, and the reference image of the drug ID is verified by the verification processing unit 114. Is passed, the information of coordinates indicating the area in the reference image to be further verified is associated as “verification area coordinates”.
 図16は、検証領域座標によって特定されている座標範囲の例を示す図である。図16において破線で示されているように、類似する画像の組において異なる部分が検証領域として特定される。これにより、検証処理部114は、図10のS1003において検証パスした参照画像に対応する薬剤IDが類似薬剤データベースに登録されている場合、その薬剤IDに関連付けられている検証領域座標について再度検証処理、即ち、上述した正規相関による形状の類似度の算出や、HSV系によって生成した色ヒストグラムの比較による類似度の算出を行う。これにより、類似画像についての認識精度を向上することが可能である。 FIG. 16 is a diagram illustrating an example of the coordinate range specified by the verification area coordinates. As indicated by a broken line in FIG. 16, a different part in a set of similar images is specified as a verification region. Thereby, when the medicine ID corresponding to the reference image that has passed the verification pass in S1003 in FIG. 10 is registered in the similar medicine database, the verification processing unit 114 performs the verification process again on the verification region coordinates associated with the medicine ID. That is, the shape similarity is calculated by the above-described normal correlation, and the similarity is calculated by comparing color histograms generated by the HSV system. Thereby, it is possible to improve the recognition accuracy for similar images.
 また、このような類似画像についての再検証において検証エラーとなった場合、図10のS1001に戻って検証を繰り返すのではなく、図15に示すように類似する薬剤として関連付けられている薬剤IDに対応する薬剤を認識結果することにより、再度の検証処理を行うことなく迅速に認識結果を出力することが可能である。 Further, when a verification error occurs in the re-verification of such a similar image, the verification is not repeated by returning to S1001 of FIG. 10, but the drug ID associated with the similar drug as shown in FIG. By recognizing the corresponding drug, it is possible to output the recognition result quickly without performing another verification process.
 その他、再度の認識処理を行う場合においても、類似画像として検証エラーとなった参照画像において求められた変換行列Hをそのまま用いることが可能であると考えられるため、図10のS1001の処理、即ち、図11のフロー全てを省略して、正規化相関等による検証処理のみを行っても良い。エラーとなった参照画像において求められた変換行列Hをそのまま用いる場合、類似画像との検証処理において読取画像と参照画像との間に位置ずれが発生する可能性もある。この位置ずれについては、正規化相関の処理において吸収することも可能であり、このような処理によって処理量を低減して認識結果を迅速に得ることが可能となる。 In addition, even when the recognition process is performed again, it is considered that the transformation matrix H obtained from the reference image that has been verified as a similar image can be used as it is. Therefore, the process of S1001 in FIG. 11 may be omitted and only the verification process using normalized correlation or the like may be performed. When the transformation matrix H obtained in the reference image in error is used as it is, there is a possibility that a positional deviation occurs between the read image and the reference image in the verification process with the similar image. This misregistration can be absorbed in the normalized correlation processing, and the amount of processing can be reduced by such processing, and the recognition result can be obtained quickly.
 また、上記実施形態においては、順位付け部112による順位付けを行った後、必ず検証処理部114による検証処理を行って認識結果の精度を確保する場合を例として説明した。しかしながら、図9に示すように順位付けされた結果において、1位と2位との差に基づいて明らかに1位が正確であると判断できる場合には、回転処理部113及び検証処理部114による処理を省略し、図9に示す1位の結果を認識結果として出力しても良い。 In the above embodiment, the case has been described as an example where, after ranking by the ranking unit 112, the verification processing by the verification processing unit 114 is always performed to ensure the accuracy of the recognition result. However, in the result of ranking as shown in FIG. 9, if it can be clearly determined that the first place is correct based on the difference between the first place and the second place, the rotation processing unit 113 and the verification processing unit 114. The first result shown in FIG. 9 may be output as the recognition result.
 このような場合、順位付け部112は、図9に示す順位付けの結果、例えば2位の票数が1位の票数の1%以下であった場合、1位の薬剤IDに対応する薬剤が正しい認識結果であると判断して、検証処理部114に代わって認識結果を表示するための情報を生成してディスプレイドライバ103に出力することにより、LCD15に判断結果、即ち、撮像台4に置かれた薬剤の認識結果を表示させる。 In such a case, the ranking unit 112 determines that the medicine corresponding to the first medicine ID is correct if, for example, the number of votes in the second place is 1% or less of the number of votes in the first place as a result of the ranking shown in FIG. By determining that the result is a recognition result and generating information for displaying the recognition result in place of the verification processing unit 114 and outputting the information to the display driver 103, the determination result on the LCD 15, that is, the image is placed on the imaging stand 4. The recognition result of the selected drug is displayed.
 また、本実施形態においては、変換行列Hとして参照画像を読取画像に重ね合わせるための情報を算出する場合を例として説明した。これは一例であり、読取画像を参照画像に重ね合わせるための情報を算出しても良い。 In the present embodiment, the case where information for superimposing the reference image on the read image is calculated as the transformation matrix H has been described as an example. This is an example, and information for superimposing the read image on the reference image may be calculated.
 1 薬剤認識装置
 2 筐体
 3 タッチパネル
 4 撮像台
 5 ボール型照明
 6 カメラ
 7 コントローラ装置
 10 CPU
 11 RAM
 12 ROM
 13 HDD
 14 I/F
 15 LCD
 16 操作部
 17 バス
 101 カメラドライバ
 102 登録画像データベース
 103 ディスプレイドライバ
 110 画像処理部
 111 画像取得部
 112 順位付け部
 113 回転処理部
 114 検証処理部
DESCRIPTION OF SYMBOLS 1 Drug | medical agent recognition apparatus 2 Case 3 Touch panel 4 Imaging stand 5 Ball type illumination 6 Camera 7 Controller apparatus 10 CPU
11 RAM
12 ROM
13 HDD
14 I / F
15 LCD
16 Operation Unit 17 Bus 101 Camera Driver 102 Registered Image Database 103 Display Driver 110 Image Processing Unit 111 Image Acquisition Unit 112 Ranking Unit 113 Rotation Processing Unit 114 Verification Processing Unit

Claims (11)

  1.  入力された入力画像に基づいて画像中に表示されている認識対象を認識する画像認識装置であって、
     前記入力画像を取得する画像取得部と、
     前記入力画像から複数の局所特徴量を抽出し、認識され得る複数の認識対象の画像夫々について抽出された局所特徴量が前記複数の認識対象の画像夫々に関連付けられて登録されている登録画像データベースを参照し、前記入力画像から抽出された複数の局所特徴量を、前記登録画像データベースに登録されている局所特徴量のうち最も近い局所特徴量に関連付け、関連付けられた局所特徴量の数に従って前記複数の認識対象の画像を順位付けする順位付け部と、
     前記認識対象の画像と前記入力画像とが重ね合わせられるように、前記認識対象の画像及び前記入力画像の一方を変換するための変換情報を、前記認識対象の画像及び前記入力画像から夫々抽出された局所特徴量に基づいて求める変換情報取得部と、
     求められた前記変換情報を用いて前記認識対象の画像及び前記入力画像の一方を変換し、前記認識対象の画像と前記入力画像とを比較することにより前記認識対象の画像と前記入力画像とが同一であるか否かを判断する検証処理部とを含み、
     前記変換情報取得部は、順位付けされた前記複数の認識対象の順位の順に前記変換情報を求め、
     前記検証処理部は、順番に求められた変換情報を用いて前記認識対象の画像及び前記入力画像の一方を変換して前記認識対象の画像と前記入力画像とが同一であるか否かを判断し、同一であると判断した前記認識対象の画像に対応する認識対象を前記入力画像に対する認識対象の認識結果として出力することを特徴とする画像認識装置。
    An image recognition device for recognizing a recognition target displayed in an image based on an input image,
    An image acquisition unit for acquiring the input image;
    A registered image database in which a plurality of local feature amounts are extracted from the input image, and local feature amounts extracted for each of a plurality of recognition target images that are recognized are associated with each of the plurality of recognition target images and registered. , The plurality of local feature quantities extracted from the input image are associated with the nearest local feature quantity among the local feature quantities registered in the registered image database, and the local feature quantity is associated with the number of associated local feature quantities. A ranking unit for ranking a plurality of recognition target images;
    Conversion information for converting one of the recognition target image and the input image is extracted from the recognition target image and the input image so that the recognition target image and the input image are superimposed. Conversion information acquisition unit to be obtained based on the local feature amount,
    One of the recognition target image and the input image is converted using the obtained conversion information, and the recognition target image and the input image are compared by comparing the recognition target image and the input image. A verification processing unit that determines whether or not they are the same,
    The conversion information acquisition unit obtains the conversion information in the order of the ranks of the plurality of recognition targets that are ranked,
    The verification processing unit converts one of the recognition target image and the input image using conversion information obtained in order, and determines whether the recognition target image and the input image are the same. And outputting a recognition target corresponding to the recognition target image determined to be the same as a recognition target recognition result for the input image.
  2.  前記変換情報取得部は、前記順位付け部による前記局所特徴量の関連付けの結果に基づいて前記変換情報を求めることを特徴とする請求項1に記載の画像認識装置。 The image recognition apparatus according to claim 1, wherein the conversion information acquisition unit obtains the conversion information based on a result of association of the local feature amounts by the ranking unit.
  3.  前記登録画像データベースは、前記複数の認識対象夫々について、前記認識対象の画像のうち認識対象の認識において特徴となり得る部分の画像を関連付けて記憶しており、
     前記変換情報取得部は、前記特徴となり得る部分の画像が、前記入力画像において対応する部分に重ね合わせられるように前記変換情報を求め、
     前記検証処理部は、求められた前記変換情報を用いて前記特徴となり得る部分の画像を変換し、前記入力画像のうち前記特徴となり得る部分の画像が重ね合わせられた部分の画像と前記特徴となり得る部分の画像とを比較することを特徴とする請求項1に記載の画像認識装置。
    The registered image database stores, for each of the plurality of recognition targets, an image of a portion that can be a characteristic in recognition of the recognition target among the recognition target images in association with each other.
    The conversion information acquisition unit obtains the conversion information so that an image of a part that can be the feature is superimposed on a corresponding part in the input image,
    The verification processing unit converts an image of a portion that can be a feature using the obtained conversion information, and becomes an image of a portion of the input image in which the image of a portion that can be the feature is superimposed and the feature. The image recognition apparatus according to claim 1, wherein an image of a portion to be obtained is compared.
  4.  前記変換情報取得部は、前記特徴となり得る部分の画像が、前記入力画像において複数含まれる場合に、求められた変換情報の数に基づいて前記入力画像に含まれる前記特徴となり得る部分の画像の数を判断し、
     前記検証処理部は、前記入力画像に含まれる前記特徴となり得る部分の画像の数に基づいて前記入力画像の生成に際して撮像された認識対象の量を判断することを特徴とする請求項3に記載の画像認識装置。
    The conversion information acquiring unit, when a plurality of images of the portion that can be the feature are included in the input image, the image of the portion of the image that can be the feature included in the input image based on the number of conversion information obtained. Determine the number,
    The said verification process part determines the quantity of the recognition target imaged at the time of the production | generation of the said input image based on the number of the images of the part which can become the said characteristic contained in the said input image. Image recognition device.
  5.  前記登録画像データベースは、前記複数の認識対象夫々について、前記特徴となり得る部分の画像が含まれる数を関連付けて記憶しており、
     前記変換情報取得部は、前記特徴となり得る部分の画像が、前記入力画像において複数含まれる場合に、求められた変換情報の数に基づいて前記入力画像に含まれる前記特徴となり得る部分の画像の数を判断し、
     前記検証処理部は、前記入力画像に含まれる前記特徴となり得る部分の画像の数と、前記登録画像データベースに記憶されている前記特徴となり得る部分の画像が含まれる数とを比較して、前記認識対象の画像と前記入力画像とが同一であるか否かを判断することを特徴とする請求項3に記載の画像認識装置。
    The registered image database stores, in association with each of the plurality of recognition objects, the number of images of the portion that can be the feature.
    The conversion information acquiring unit, when a plurality of images of the portion that can be the feature are included in the input image, the image of the portion of the image that can be the feature included in the input image based on the number of conversion information obtained. Determine the number,
    The verification processing unit compares the number of images of the portion that can be the feature included in the input image with the number of images of the portion that can be the feature stored in the registered image database, and The image recognition apparatus according to claim 3, wherein it is determined whether an image to be recognized and the input image are the same.
  6.  前記変換情報取得部は、前記認識対象の画像から抽出された局所特徴量を、前記入力画像から抽出された局所特徴量のうち、差異が所定の範囲内である局所特徴量に関連付け、関連付けた局所特徴量を複数選択し、選択した局所特徴量が前記認識対象の画像及び前記入力画像の一方から他方に射影されるような変換情報を算出することを特徴とする請求項1に記載の画像認識装置。 The conversion information acquisition unit associates and associates a local feature amount extracted from the recognition target image with a local feature amount whose difference is within a predetermined range among the local feature amounts extracted from the input image. The image according to claim 1, wherein a plurality of local feature values are selected, and conversion information is calculated so that the selected local feature values are projected from one of the recognition target image and the input image to the other. Recognition device.
  7.  前記変換情報取得部は、選択した局所特徴量が前記認識対象の画像及び前記入力画像の一方から他方に射影されるような変換情報をアフィン変換またはユークリッド変換に従って算出することを特徴とする請求項6に記載の画像認識装置。 The conversion information acquisition unit calculates conversion information such that a selected local feature is projected from one of the recognition target image and the input image to the other according to affine transformation or Euclidean transformation. 6. The image recognition apparatus according to 6.
  8.  前記検証処理部は、認識され得る複数の認識対象の画像のうち、類似している画像の組が登録されている類似画像データベースを参照し、同一であると判断した前記認識対象の画像が登録されている場合には、再検証を行うことを特徴とする請求項1に記載の画像認識装置。 The verification processing unit refers to a similar image database in which a set of similar images is registered among a plurality of recognition target images, and the recognition target images determined to be the same are registered. The image recognition apparatus according to claim 1, wherein reverification is performed in the case where it has been performed.
  9.  前記類似画像データベースは、類似している画像の組と、類似ている画像の組において異なる画像の部分を示す情報とを関連付けて記憶しており、
     前記検証処理部は、同一であると判断した前記認識対象の画像が前記類似画像データベースに登録されている場合、前記異なる画像の部分について前記認識対象の画像及び前記入力画像とを比較することにより再検証を行うことを特徴とする請求項8に記載の画像認識装置。
    The similar image database stores a set of similar images in association with information indicating portions of different images in the set of similar images,
    When the recognition target images determined to be the same are registered in the similar image database, the verification processing unit compares the recognition target image and the input image for the different image portions. The image recognition apparatus according to claim 8, wherein re-verification is performed.
  10.  入力された入力画像に基づいて画像中に表示されている認識対象を認識する画像認識方法であって、
     前記入力画像を取得し、
     前記入力画像から複数の局所特徴量を抽出し、
     認識され得る複数の認識対象の画像夫々について抽出された局所特徴量が前記複数の認識対象夫々に関連付けられて登録されている登録画像データベースを参照し、前記入力画像から抽出された複数の局所特徴量を、前記登録画像データベースに登録されている局所特徴量のうち最も近い局所特徴量に関連付け、
     関連付けられた局所特徴量の数に従って前記複数の認識対象を順位付けし、
     前記認識対象の画像と前記入力画像とが重ね合わせられるように、前記認識対象の画像及び前記入力画像の一方を変換するための変換情報を、順位付けされた前記複数の認識対象の順位の順に、前記認識対象の画像及び前記入力画像から夫々抽出された局所特徴量に基づいて求め、
     順位付けされた前記複数の認識対象の順位の順に求められた前記変換情報を用いて前記認識対象の画像及び前記入力画像の一方を変換し、前記認識田使用の画像と前記入力画像とを比較することにより前記認識対象の画像と前記入力画像とが同一であるか否かを判断し、
     同一であると判断した前記認識対象の画像に対応する認識対象を前記入力画像に対する認識対象の認識結果として出力することを特徴とする画像認識方法。
    An image recognition method for recognizing a recognition target displayed in an image based on an input image,
    Obtaining the input image;
    Extracting a plurality of local features from the input image;
    A plurality of local features extracted from the input image with reference to a registered image database in which local feature amounts extracted for each of a plurality of recognition target images that can be recognized are associated with each of the plurality of recognition targets. Associating the amount with the closest local feature amount among the local feature amounts registered in the registered image database;
    Ranking the plurality of recognition objects according to the number of associated local features,
    Conversion information for converting one of the recognition target image and the input image so that the recognition target image and the input image are overlaid in order of the ranking of the plurality of recognition targets. , Obtained based on local features extracted from the recognition target image and the input image, respectively,
    One of the recognition target image and the input image is converted using the conversion information obtained in the order of the ranking of the plurality of recognized recognition targets, and the image using the recognition field is compared with the input image. To determine whether the image to be recognized and the input image are the same,
    An image recognition method comprising: outputting a recognition target corresponding to the recognition target image determined to be the same as a recognition target recognition result for the input image.
  11.  入力された入力画像に基づいて画像中に表示されている認識対象を認識する画像認識プログラムであって、
     前記入力画像を取得するステップと、
     前記入力画像から複数の局所特徴量を抽出するステップと、
     認識され得る複数の認識対象の画像夫々について抽出された局所特徴量が前記複数の認識対象夫々に関連付けられて登録されている登録画像データベースを参照し、前記入力画像から抽出された複数の局所特徴量を、前記登録画像データベースに登録されている局所特徴量のうち最も近い局所特徴量に関連付けるステップと、
     関連付けられた局所特徴量の数に従って前記複数の認識対象を順位付けるステップと、
     前記認識対象の画像と前記入力画像とが重ね合わせられるように、前記認識対象の画像及び前記入力画像の一方を変換するための変換情報を、順位付けされた前記複数の認識対象の順位の順に、前記認識対象の画像及び前記入力画像から夫々抽出された局所特徴量に基づいて求めるステップと、
     順位付けされた前記複数の認識対象の順位の順に求められた前記変換情報を用いて前記認識対象の画像及び前記入力画像の一方を変換し、前記認識対象の画像と前記入力画像とを比較することにより前記認識対象の画像と前記入力画像とが同一であるか否かを判断するステップと、
     同一であると判断した前記認識対象の画像に対応する認識対象を前記入力画像に対する認識対象の認識結果として出力するステップとを情報処理装置に実行させることを特徴とする画像認識プログラム。
    An image recognition program for recognizing a recognition target displayed in an image based on an input image,
    Obtaining the input image;
    Extracting a plurality of local features from the input image;
    A plurality of local features extracted from the input image with reference to a registered image database in which local feature amounts extracted for each of a plurality of recognition target images that can be recognized are associated with each of the plurality of recognition targets. Associating a quantity with the closest local feature quantity among the local feature quantities registered in the registered image database;
    Ranking the plurality of recognition objects according to the number of associated local feature quantities;
    Conversion information for converting one of the recognition target image and the input image so that the recognition target image and the input image are overlapped with each other in the order of the ranking of the plurality of recognition targets. Determining based on local features extracted from the image to be recognized and the input image, respectively,
    One of the recognition target image and the input image is converted using the conversion information obtained in the order of the ranking of the plurality of recognized recognition targets, and the recognition target image and the input image are compared. Determining whether the recognition target image and the input image are the same,
    An image recognition program that causes an information processing apparatus to execute a step of outputting a recognition target corresponding to the recognition target image determined to be the same as a recognition target recognition result for the input image.
PCT/JP2013/083524 2012-12-14 2013-12-13 Image recognition device, image recognition method, and image recognition program WO2014092189A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2012273429A JP5414879B1 (en) 2012-12-14 2012-12-14 Drug recognition device, drug recognition method, and drug recognition program
JP2012-273429 2012-12-14

Publications (1)

Publication Number Publication Date
WO2014092189A1 true WO2014092189A1 (en) 2014-06-19

Family

ID=50202774

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/083524 WO2014092189A1 (en) 2012-12-14 2013-12-13 Image recognition device, image recognition method, and image recognition program

Country Status (2)

Country Link
JP (1) JP5414879B1 (en)
WO (1) WO2014092189A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019168765A (en) * 2018-03-22 2019-10-03 オオクマ電子株式会社 Medical material recognition system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008097245A (en) * 2006-10-11 2008-04-24 Seiko Epson Corp Rotation angle detection apparatus, and control method and control program of same
JP2009187186A (en) * 2008-02-05 2009-08-20 Sony Corp Image processing apparatus and method, and program
JP2010026603A (en) * 2008-07-15 2010-02-04 Canon Inc Image processor, image processing method and computer program
JP2010152543A (en) * 2008-12-24 2010-07-08 Fujitsu Ltd Detection apparatus, detection method and detection program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3128357B2 (en) * 1992-10-20 2001-01-29 沖電気工業株式会社 Character recognition processor
JPH09179909A (en) * 1995-12-25 1997-07-11 Matsushita Electric Works Ltd Memory card for home automation control system
JP4923282B2 (en) * 2002-11-22 2012-04-25 グローリー株式会社 Drug recognition device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008097245A (en) * 2006-10-11 2008-04-24 Seiko Epson Corp Rotation angle detection apparatus, and control method and control program of same
JP2009187186A (en) * 2008-02-05 2009-08-20 Sony Corp Image processing apparatus and method, and program
JP2010026603A (en) * 2008-07-15 2010-02-04 Canon Inc Image processor, image processing method and computer program
JP2010152543A (en) * 2008-12-24 2010-07-08 Fujitsu Ltd Detection apparatus, detection method and detection program

Also Published As

Publication number Publication date
JP5414879B1 (en) 2014-02-12
JP2014117390A (en) 2014-06-30

Similar Documents

Publication Publication Date Title
CN105378793B (en) System, method and computer-readable medium for being identified when object may be influenced by medical condition
JP2020507836A (en) Tracking surgical items that predicted duplicate imaging
WO2018173649A1 (en) Drug recognizing device, drug recognizing method, and drug recognizing program
US11688060B2 (en) Image-based circular plot recognition and interpretation
US10937152B2 (en) Inspection support method and inspection support device
JP6879298B2 (en) Image processing program and image processing device
US11404153B2 (en) Drug inspection assisting apparatus and drug inspection assisting method
US11759401B2 (en) Method of monitoring medication regimen with portable apparatus
JP2016523405A (en) System and method using mark analysis in tablet identification
JP6047475B2 (en) Image recognition apparatus, image recognition method, and image recognition program
JP5414879B1 (en) Drug recognition device, drug recognition method, and drug recognition program
Holtkötter et al. Development and validation of a digital image processing-based pill detection tool for an oral medication self-monitoring system
WO2014020820A1 (en) Mark reading device and mark reading method
Yang et al. A novel mobile application for medication adherence supervision based on AR and OpenCV designed for elderly patients
JP6857373B1 (en) Information processing equipment, information processing methods, and programs
Nguyen et al. Developing a prescription recognition system based on CRAFT and tesseract
WO2018221066A1 (en) Dispensing inspection assistance device and dispensing inspection assistance method
JP7437259B2 (en) Image processing device, drug identification device, image processing method, and drug identification method
JP4379038B2 (en) Image collation apparatus, image collation method, and image collation program
JP2019017913A (en) Information processing system, control method for information processing system, and program
KR102598969B1 (en) Pill identification system
JP5582610B2 (en) Image identification apparatus and program
US20180021017A1 (en) A method and apparatus for displaying a region of interest on a current ultrasonic image
Ferraz Utilização da câmara smartphone para monitorizar a aderência à terapia inalatória
Saitoh Pharmaceutical Blister Pack Recognition using Local Features.

Legal Events

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

Ref document number: 13862499

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13862499

Country of ref document: EP

Kind code of ref document: A1