Drug determination device and boundary concave portion detection method

By combining the testing department and the image shooting department in the pharmaceutical judgment device, the shooting conditions are changed multiple times, and the light radiation conditions of multiple luminous parts are used to accurately detect the boundary concave of the continuous body of the packaging bag to solve the determination of the existing technology. The problem that is difficult to improve accuracy and correctness achieves higher judgment accuracy.

CN111902843BActive Publication Date: 2025-01-28FUJIFILM MEDICAL CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN201980021887.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-03-26
Filing Date
2019-01-29
Publication Date
2025-01-28
Estimated Expiration
2039-01-29

AI Technical Summary

Technical Problem

The existing drug determination device is difficult to accurately detect the boundary recesses formed in the packaging bag continuum, which makes it difficult to improve the accuracy and accuracy of the drug determination.

Method used

By the combination of detection department and image shooting department in the packaging bag, the shooting conditions are changed multiple times to detect the concave part of the boundary. The light shot uses a number of luminous parts to emit light in the opposite direction. The image shooting department takes the image under different light irradiation conditions. The synthetic image is removed to remove the pharmaceutical image and detect the concave part of the boundary.

Benefits of technology

The position of the concave part of the boundary is accurately detected in the continuous body of the packaging bag, and the determination accuracy and correctness of the determination of the agent determination device is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111902843B_ABST
    Figure CN111902843B_ABST
Patent Text Reader

Abstract

Provided are a medicine determination device and a method for detecting a boundary concave portion, which can appropriately detect the position of a boundary concave portion provided at a boundary between packaging bags in a continuous package bag body. When detecting a boundary concave portion formed at a boundary position between packaging bags in a continuous package bag body in which a plurality of packaging bags containing medicines are arranged side by side, the image of the surface of the imaging target portion is captured multiple times by changing the imaging conditions while irradiating light onto the surface of at least the imaging target portion where the boundary concave portion is located in the continuous package bag body, and the boundary concave portion in the imaging target portion is detected based on the images captured differently according to the imaging conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a drug identification device and a method for detecting boundary recesses, and in particular to a drug identification device and a method for detecting boundary recesses that detect boundary recesses formed at boundary positions between packaging bags in a continuous body of a plurality of strip-shaped packaging bags containing medicines arranged side by side. Background Art

[0002] It is known to automatically judge (check) whether the medicine is correctly packaged in a packaging bag such as packaging paper as indicated on the prescription by a machine or the like. In such an automatic checking device (hereinafter referred to as a medicine judging device), an image of the medicine packaged in the packaging bag is captured in the device. Then, it is judged whether the type and number of medicines captured in the captured image are consistent with the type and number of medicines indicated on the prescription.

[0003] However, there are cases where a plurality of strip-shaped packaging bags for packaging medicines are connected to form a continuum (hereinafter referred to as a packaging bag continuum). In the above-mentioned medicine determination device, a packaging bag continuum is introduced into the device, and the medicines contained in each packaging bag of the packaging bag continuum are taken as the object, and each packaging bag is determined to be suitable for the medicine. In the case of individually determining each packaging bag of the packaging bag continuum, it is necessary to slide the packaging bag by a corresponding amount of area from the captured image. For this purpose, it becomes important to detect the end position of the packaging bag, that is, the boundary position between the packaging bags in the packaging bag continuum. Boundary concave parts such as cutting lines are usually formed at the boundary positions between the packaging bags. However, since the boundary concave parts are relatively small and easily crushed, the boundary concave parts in the image are not clear, and the detection accuracy and precision are difficult to improve. Under such circumstances, in recent years, methods for determining the end position of the packaging bag without detecting the boundary concave parts themselves have been developed (for example, refer to patent documents 1 to 4).

[0004] The technology described in Patent Document 1 relates to a tablet counting and monitoring device (equivalent to a drug determination device), which transfers a package (equivalent to a packaging bag) formed by heat-sealing in a series of sub-wrapping paper (equivalent to a continuous body of packaging bags) in a forward feeding manner, and uses a lighting device and a camera that are separated and arranged opposite to each other on both sides of the shooting range on the transfer path to shoot the package, extract the drug image area from the shot image, and count the drug images therein, thereby automatically confirming the number of drugs in the package. According to the technology described in Patent Document 1 (especially refer to Claim 1 of Patent Document 1), the lighting device has a scattering surface lighting unit, and is provided with a background image forming unit that generates a background image that can be distinguished from the surface lighting unit in the shooting data shot without putting anything in the shooting range, and the drug image area is delimited based on the perspective image of the background image forming unit found in the heat-sealed part of the package. That is, by illuminating the package of light-scattering sub-wrapping paper from the back side and shooting from the front side, a negative image that eliminates the influence of the color and engraving of the tablets in the package can be obtained. Here, the portion of the packaging paper other than the heat-sealed portion (non-sealed portion) is frosted glass-like, while the heat-sealed portion is like transparent glass that has lost its light scattering properties. Based on the difference in scattering properties when light is transmitted between the heat-sealed portion and the non-sealed portion, the background image on the illuminated side is clearly visible only at the package end, and the package end can be detected and determined.

[0005] The technology described in Patent Document 2 relates to a drug inspection system (equivalent to a drug determination device) that inspects each of the sub-bags (equivalent to packaging bags) of a sub-bag continuum (equivalent to a packaging bag continuum). According to the technology described in Patent Document 2 (especially referring to claim 7 and paragraphs 0043 and 0044 of Patent Document 2), since boundary recesses such as cutting lines are not clearly presented in the captured image, candidates for the boundaries of the sub-bags (equivalent to packaging bags) are selected from the captured image. Specifically, a predetermined value of the length of the sub-bag to be inspected, i.e., the sub-bag to be inspected, is obtained, and based on the captured image of the sub-bag continuum, boundary candidates that are assumed to be the boundaries between the sub-bag to be inspected, i.e., the sub-bag adjacent to the upstream and downstream sides thereof, are derived as upstream boundary candidates and downstream boundary candidates, and position information with respect to the upstream boundary candidates and the downstream boundary candidates is obtained. Then, calculations based on the acquired position information are performed on the combination candidates of the upstream boundary candidates and the downstream boundary candidates respectively, and the candidate values ​​of the length of the audit object, i.e., the sub-bag, are derived. A value that is close to the predetermined value of the length of the audit object, i.e., the sub-bag, is selected from the derived candidate values, and the combination of the upstream boundary candidates and the downstream boundary candidates constituting the selected candidate value is determined as the boundary position located on the upstream and downstream sides of the audit object, i.e., the sub-bag.

[0006] The technology described in Patent Documents 3 and 4 relates to a drug monitoring device (equivalent to a drug determination device), wherein each sub-bag (equivalent to a packaging bag) in a sub-bag continuous body (equivalent to a packaging bag continuous body) is sealed at a longitudinal seal portion extending in the width direction of the sub-bag continuous body and a transverse seal portion extending in the longitudinal direction of the sub-bag continuous body, and the sub-bag continuous body forms a boundary between the longitudinal seal portions of adjacent sub-bags, and the drug is checked for each sub-bag. According to the technology described in Patent Documents 3 and 4 (particularly referring to Claim 32 of Patent Document 3 and Claim 31 of Patent Document 4), a boundary position deriving unit capable of deriving the position of the boundary in the sub-bag continuous body is provided, the boundary position deriving unit detects a contour line (longitudinal edge) extending in the longitudinal direction in the captured image area of ​​the sub-bag, selects a longitudinal edge longer than a given length, recognizes a region where the intervals between the longitudinal edges among the selected plurality of longitudinal edges are within a given interval set based on the width of the longitudinal seal as an edge region, and recognizes the central portion of the recognized edge region as the boundary position between the longitudinal seal portions.

[0007] Prior Art Literature

[0008] Patent Literature

[0009] Patent Document 1: Japanese Patent Application Publication No. 2006-334062

[0010] Patent Document 2: Japanese Patent Application Publication No. 2017-47975

[0011] Patent Document 3: Japanese Patent Application Publication No. 2013-144101

[0012] Patent Document 4: JP Patent No. 5196285 Summary of the invention

[0013] Problems to be solved by the invention

[0014] However, the techniques described in Patent Documents 1 to 4 are not techniques for detecting the boundary concave portion itself, such as the cut line. In particular, the technique described in Patent Document 1 uses the different scattering properties of light in the packaging paper between the heat-sealed portion and the non-sealed portion, and makes the background image of the illuminated side appear only at the package end to detect and determine the package end. Therefore, the technique described in Patent Document 1 can be limited to packaging paper with different light scattering properties between the heat-sealed portion and the non-sealed portion, and is difficult to apply to packaging paper (continuum of packaging bags) that does not have such properties.

[0015] In addition, the technology described in Patent Document 2 derives candidate values ​​of the length of the audit object, i.e., the sub-bag, for the combination candidates of the upstream boundary candidate and the downstream boundary candidate, respectively, selects a value that is close to the predetermined value of the length of the audit object, i.e., the sub-bag, from the derived candidate values, and sets the combination of the upstream boundary candidate and the downstream boundary candidate that constitute the selected candidate value to the boundary position located on the upstream side and the downstream side of the audit object, i.e., the sub-bag. That is, in order to use the technology described in Patent Document 2, a predetermined value of the length of the audit object, i.e., the sub-bag, is required, and it cannot be used when the predetermined value is unknown. In addition, when there are multiple upstream boundary candidates or multiple downstream boundary candidates, there are multiple cases where the derived value of the length of the audit object, i.e., the sub-bag, is close to the predetermined value among the combination candidates of the upstream boundary candidate and the downstream boundary candidate. In such a case, it becomes difficult to determine the boundary position from the boundary candidates.

[0016] In addition, the techniques described in Patent Documents 3 and 4 recognize the edge region from the interval between the longitudinal edges longer than a given length, and use the central portion of the edge region as the boundary position between the longitudinal sealed portions. Therefore, the techniques described in Patent Documents 3 and 4 are used under the premise that the boundary position of the package exists at the central position of the edge region. For example, when the boundary recess is provided at a position deviated from the central portion of the edge region, it is difficult to accurately determine the position of the boundary recess.

[0017] The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a drug identification device and a method for detecting a boundary recess that can appropriately detect the position of a boundary recess provided at a boundary between packaging bags in a continuous body of packaging bags.

[0018] Means for solving problems

[0019] In order to achieve the above-mentioned purpose, the drug identification device of the present invention comprises: a detection unit, which detects a boundary recess formed at a boundary position between packaging bags in a continuous body of a plurality of strip-shaped packaging bags containing medicines arranged side by side; and an image capturing unit, which changes the capturing conditions to capture images of the surface of the capturing object part multiple times while irradiating light to the surface of at least the capturing object part where the boundary recess is located in the continuous body of packaging bags, and the detection unit detects the boundary recess in the capturing object part based on the multiple images captured by the image capturing unit when the capturing conditions are changed.

[0020] In addition, it is preferred that: a light irradiation unit irradiates light onto the surface of the photographed object portion when the image capturing unit captures an image, the light irradiation unit has a first light emitting unit and a second light emitting unit that emit light in opposite directions in the long side direction of the packaging bag continuous body, and irradiates light onto the surface of the photographed object portion from an oblique direction, the image capturing unit captures an image when the photographed object portion is located between the first light emitting unit and the second light emitting unit in the long side direction, and whenever the capturing conditions are changed, the light irradiation unit changes the light emitting unit used for irradiating light between the first light emitting unit and the second light emitting unit. In addition, the "irradiating light onto the surface of the photographed object portion from an oblique direction" mentioned here means irradiating the surface of the photographed object portion in a direction inclined relative to the front direction, that is, obliquely upward, when the capturing direction of the photographed object portion is set to the front direction.

[0021] In addition, preferably, the image capturing unit captures a first image of the surface of the photographing object part while the light irradiation unit uses the first light emitting unit to irradiate light to the surface of the photographing object part, and captures a second image of the surface of the photographing object part while the light irradiation unit uses the second light emitting unit to irradiate light to the surface of the photographing object part, and the detection unit uses the first image and the second image to detect a boundary recess in the photographing object part.

[0022] In addition, preferably, while the light irradiation unit uses the first light emitting unit to irradiate light to the surface of the object part, the second light emitting unit stops emitting light, and while the light irradiation unit uses the second light emitting unit to irradiate light to the surface of the object part, the first light emitting unit stops emitting light.

[0023] In addition, preferably, the detection unit synthesizes a portion of the first image that is an area farther away from the first light-emitting unit in the photographed object part and a portion of the second image that is an area farther away from the second light-emitting unit in the photographed object part to create a composite image, and detects a boundary recess in the photographed object part based on the composite image.

[0024] In addition, preferably, the image capturing unit has: a first camera and a second camera for capturing a capturing object portion from opposite directions in the thickness direction of the packaging bag continuum, the first camera capturing an image of one surface of the capturing object portion in the thickness direction, the second camera capturing an image of other surfaces of the capturing object portion located on the opposite side of the one surface in the thickness direction, and the detection unit detects a boundary recess in the capturing object portion based on the image captured by the first camera and the image captured by the second camera.

[0025] In addition, preferably, after determining the candidates for the boundary recess captured in the image captured by the first camera and determining the candidates for the boundary recess captured in the image captured by the second camera, the detection unit detects the candidates for the boundary recess captured in both the image captured by the first camera and the image captured by the second camera as the boundary recess in the captured object part.

[0026] In addition, preferably, medicines are packaged in packaging bags in a packaging bag continuum, and the image capturing unit changes the capturing conditions to capture images of the surface of the capturing object portion where at least the end of the packaging bag packaging the medicines and the boundary recess adjacent to the end are located multiple times.

[0027] In addition, preferably, the packaging bag has light transmittance, and the image capturing unit changes the capturing conditions to capture multiple images of the surface of the capturing object portion where at least the portion covering the medicine, the end portion, and the boundary recess adjacent to the end portion of the packaging bag that packages the medicine are located, and the medicine identification device comprises: a removal processing execution unit that performs a removal processing for removing the image of the medicine in the image on each of the multiple images captured with the captured conditions changed.

[0028] In addition, preferably, the removal processing execution unit performs a removal processing for removing the image of the medicine in the image by removing the shrunk and expanded image obtained by shrinking and expanding the pixel group constituting the image captured by the image capturing unit in at least one direction from the image before the shrinkage and expansion.

[0029] In addition, it is preferable that the boundary recessed portion is a cutting line including a dotted linear groove formed in the lateral width direction of the packaging bag continuous body from one end to the other end of the packaging bag continuous body.

[0030] In addition, in order to achieve the aforementioned purpose, the boundary recess detection method of the present invention detects boundary recesses formed at boundary positions between packaging bags in a continuous body of multiple strip-shaped packaging bags containing medicines arranged side by side. The boundary recess detection method is characterized in that it has the following steps: while irradiating light to the surface of at least the portion of the packaging bag continuum where the boundary recesses are located, changing the shooting conditions to capture images of the surface of the portion of the photography object multiple times; and detecting the boundary recesses in the portion of the photography object based on the multiple images captured by changing the shooting conditions.

[0031] Effects of the Invention

[0032] According to the medicine determination device and the boundary concave portion detection method of the present invention, the position of the boundary concave portion provided at the boundary between the packaging bags can be appropriately detected in the packaging bag continuous body. As a result, when determining whether the medicine contained in the packaging bag is suitable or not, the determination can be made accurately based on the correct demarcation of the imaging range of the packaging bag continuous body. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 This is a diagram showing the flow of drug prescription work.

[0034] Figure 2 This is a diagram showing a packaging bag continuum.

[0035] Figure 3 This is a schematic diagram showing the internal structure of a device body of a drug determination device according to one embodiment of the present invention.

[0036] Figure 4 This is a diagram showing the imaging range of the image capturing unit and a portion of the continuous body of packaging bags that falls within the imaging range.

[0037] Figure 5 It is a schematic diagram showing a plurality of light emitting parts included in the light irradiation unit when viewed from above.

[0038] Figure 6 This is a schematic diagram showing how light is irradiated onto a packaging bag.

[0039] Fig. 7A This is an example (part 1) of an image captured by an image capturing unit included in the drug determination device according to one embodiment of the present invention.

[0040] Figure 7B This is an example of an image captured by the image capturing unit included in the drug determination device according to one embodiment of the present invention (part 2).

[0041] Figure 8 This is a block diagram showing the configuration of a processing device included in a drug determination device according to one embodiment of the present invention.

[0042] Fig. 9 It is a diagram showing a rough flow of the determination process of the determination unit.

[0043] Fig.10 This is an illustration of a drug extraction image.

[0044] Fig.11 This is an explanatory diagram of a database in which main images are registered.

[0045] Fig.12 It is a diagram showing the flow of the cutting line detection process.

[0046] Fig.13 This is an example of a composite image.

[0047] Fig.14 This is a diagram (image) for explaining the flow of image shrinkage and expansion processing.

[0048] Fig.15 This is an example of an image that has been subjected to removal processing.

[0049] Fig.16 This is a diagram showing the correspondence between the distance from the edge position of the image and the grayscale total value in the image subjected to the removal process.

[0050] Fig.17 It is a diagram showing a modified example of the procedure for detecting a cutting line.

[0051] Fig.18 This is a diagram showing the basic operation flow of the drug determination device according to one embodiment of the present invention. DETAILED DESCRIPTION

[0052] The drug identification device and drug identification method of the present invention are described in detail below.

[0053] The description of the constituent elements described below is sometimes based on a representative embodiment of the present invention, but the present invention is not limited to such an embodiment. That is, the following embodiment is an example for easily understanding the drug determination device and drug determination method of the present invention, and does not limit the present invention. In addition, of course, various improvements or changes can be made within the scope of the main purpose of the present invention.

[0054] In this specification, the term "drug" refers to a solid drug, and specifically corresponds to a tablet or a capsule.

[0055] <<About pharmaceutical prescription work>>

[0056] In describing a drug determination device (hereinafter referred to as drug determination device 10) according to an embodiment of the present invention, a drug prescription operation performed using the drug determination device 10 will be described first. In the drug prescription operation, Figure 1 As shown, the process is carried out in the order of prescription input, picking, automatic packaging, dispensing review and prescription. Figure 1 This is a diagram showing the flow of drug prescription work.

[0057] In the prescription input operation, the pharmacist inputs the prescription conditions recorded on the prescription into a computer (hereinafter referred to as the prescription condition input device 50). Here, the so-called prescription conditions are conditions set for prescribing medicines to patients. The content of the input prescription conditions is, for example, the patient's name, age, the type of medicine to be prescribed, the prescription quantity by type, etc. In addition, in the following description, it is assumed that the prescription quantity of the corresponding amount for one dose is the same amount based on multiple doses. However, the prescription conditions are not limited to this, and it is also possible to prescribe only one dose of the corresponding amount of medicine. In addition, the type of medicine and the prescription quantity of the corresponding amount of medicine for one dose may also be different each time.

[0058] In the picking operation, the pharmacist picks the corresponding amount of medicines of the types corresponding to the prescription conditions from the medicine shelf 55 based on the prescription conditions. In addition, the picking operation is not limited to the case where the pharmacist performs it manually, and a known automatic picking device can also automatically perform it based on the prescription conditions input to the prescription condition input device 50.

[0059] In addition, the medicines picked in this embodiment all have identification information formed on their surfaces. The so-called "identification information" refers to characters, numbers, and symbols used to identify the type (drug species) of medicines, which are formed by engraving or printing. In addition, in this embodiment, identification information is formed on the surface of the medicine by engraving (concave processing). Among them, the picked medicines are not limited to the above-mentioned embodiments, and the picked medicines may also include medicines without identification information formed thereon, and may also include medicines with identification information formed thereon by printing.

[0060] In the automatic packaging operation, the pharmacist places the medicines picked in the picking operation on the Figure 1 The tray of the packaging machine 60 shown in the figure, the packaging machine 60 automatically packages the medicines in the tray. At this time, the picked medicines are placed on the tray according to the corresponding amount for each dose, and the medicines corresponding to one dose are packaged in each of the plurality of packaging bags 1. The packaging bag 1 is a well-known packaging bag and has light transmittance. As the material of the packaging bag 1, for example, a laminated film of cellophane and polyethylene and a polyethylene film can be cited.

[0061] The multiple packaging bags 1 for packaging the medicine are as follows at the end time of the automatic packaging operation. Figure 2 As shown in the figure, the packaging bags 1 are arranged continuously to form a strip-shaped packaging bag continuous body 3. When taking medicine, the patient separates a corresponding amount of packaging bags 1 from the packaging bag continuous body 3 and takes the medicine contained in the separated packaging bags 1. Figure 2 It is a diagram showing a packaging bag continuous body 3.

[0062] The packaging bag continuous body 3 is described. The picked medicines are packaged in the packaging bags 1 (excluding the empty bags 1A described later) in the packaging bag continuous body 3. Figure 2 As is known, in the packaging bag continuous body 3, a cutting line 3y is formed as a boundary concave portion at a boundary position between the packaging bags 1. Here, the cutting line 3y is formed by a dotted straight line groove, and is formed from one end of the packaging bag continuous body 3 to the other end in the horizontal width direction of the packaging bag continuous body 3. In addition to the cutting line 3y, as the boundary concave portion, a triangular, rectangular, or semi-elliptical cutout formed at the end of the packaging bag continuous body 3 in the horizontal width direction may be formed.

[0063] In addition, at the end time of the automatic subpackaging operation, the packaging bag 1 at one end of the packaging bag continuum 3 is Figure 2As shown in the figure, it becomes an empty bag 1A. The empty bag 1A is the same as the packaging bag 1 in the state of packaging medicine, except that no medicine is placed inside. In addition, the empty bag 1A can be provided at a place other than the end of the packaging bag continuous body 3, and the packaging bag continuous body 3 may not contain the empty bag 1A.

[0064] In the dispensing audit work, use Figure 1 The medicine determination device 10 shown in the figure verifies whether the medicine prescribed is correct. Specifically, the medicine determination device 10 determines whether the type and number of medicines (strictly, the number of each type) in each packaging bag 1 in the packaging bag continuous body 3 are the same as the contents indicated on the prescription.

[0065] The prescription operation executes the prescription of the packaged medicine judged to be correct (complying with the contents of the prescription) in the dispensing review operation for the patient (the person to whom the prescription is given). At this time, the pharmacist removes the empty bag 1A at one end of the packaging bag continuous body 3 and hands the remaining packaging bag continuous body 3 to the patient.

[0066] <<Structure of drug determination device>>

[0067] Next, the structure of the medicine determination device 10 will be described.

[0068] The medicine determination device 10 is used for dispensing review, and determines whether the type and number of medicines (strictly, the number of each type) packed in the packaging bag 1 in the automatic packaging operation are regular types and numbers. Here, the so-called regular types and numbers refer to the types of medicines indicated in the prescription (in other words, input as prescription conditions) and the number of medicines distinguished by type, and strictly speaking, the types of medicines and the number of medicines distinguished by type for a corresponding amount of one dose.

[0069] The medicines contained in the packaging bags 1 other than the empty bag 1A in the packaging bag continuous body 3 (that are packaged separately) correspond to the medicines to be determined.

[0070] The drug determination device 10 is as follows Figure 1 As shown, the device includes: a device body 11 having a function of capturing an image of a drug to be determined (specifically, the drug packaged in each packaging bag 1); and a processing device 12 having a function of performing a dispensing review based on the image captured by the device body 11.

[0071] The device body 11 has Figure 1 The housing 13 shown in the figure has Figure 3 The transport unit 14 , the placement unit 15 , the image capturing unit 16 , and the light irradiation unit 17 are shown in the figure. Figure 31 is a schematic diagram showing the internal structure of the device body 11. In addition, the housing 13 of the device body 11 is provided with: an introduction portion 13a for introducing the continuous packaging bag body 3 into the interior of the device body 11; and a discharge portion (not shown) for discharging the continuous packaging bag body 3 introduced into the interior of the device body 11 to the outside of the device body 11.

[0072] The conveying unit 14 has a conveying path 18 formed inside the device body 11, and conveys the continuous package bag body 3 along the conveying path 18. The continuous package bag body 3 introduced into the device body 11 from the introduction unit 13a moves to the downstream side of the conveying path 18 by the conveying action of the conveying unit 14, and is discharged to the outside of the device body 11 after passing through the discharge unit. Here, the so-called "downstream side" refers to the side closer to the discharge unit in the conveying direction, and the so-called upstream side refers to the opposite side to the downstream side, that is, the side closer to the introduction unit 13a in the conveying direction.

[0073] In the present embodiment, the conveying path 18 is a horizontal path, and the conveying unit 14 conveys the continuous packaging bag body 3 with its longitudinal direction along the conveying path 18 (ie, conveying direction) and its thickness direction along the up-down direction (vertical direction).

[0074] The transport unit 14 is as follows Figure 3 As shown, there is an upstream drive unit 14U and a downstream drive unit 14D. The upstream drive unit 14U is arranged on the upstream side of the arrangement portion 15, and the downstream drive unit 14D is arranged on the downstream side of the arrangement portion 15. The upstream drive unit 14U and the downstream drive unit 14D each have a pair of upper and lower flattening rollers 14a and 14b and a motor (not shown) that drives one of the upper and lower pair of flattening rollers 14a and 14b to rotate. The upper and lower pair of flattening rollers 14a and 14b are arranged side by side with a gap of a degree that allows the packaging bag continuum 3 to pass through, and rotate in a state of sandwiching the packaging bag continuum 3 between the rollers. As a result, the packaging bag continuum 3 is transported in a state where a certain tension (tension) is applied.

[0075] In addition, in the present embodiment, the motor is configured to rotate intermittently. For this reason, the conveying unit 14 performs the conveying operation intermittently. In one conveying operation, the continuous package bag body 3 moves a given amount along the conveying direction. The moving amount (conveying amount) of the continuous package bag body 3 in one conveying operation is set by the control unit 21 of the processing device 12 described later.

[0076] The conveying unit 14 of this embodiment can convey the object both upstream and downstream in the conveying direction by switching the rotation direction of the motor. The conveying direction is set by the control unit 21 of the processing device 12 .

[0077] In addition, in the present embodiment, a conveying mechanism driven by the rotation of a roller (i.e., a roller conveyor) is used, but other conveying mechanisms may be used as long as the packaging bag continuum 3 can be appropriately conveyed. For example, a belt conveyor may be used that conveys the packaging bag continuum 3 by rotating the belt while the packaging bag continuum 3 is placed on the upper surface of an endless belt.

[0078] The dispensing unit 15 is a part for dispensing the medicine to be determined in a state of being wrapped in the packaging bag 1. Figure 3 As shown in FIG. 1 , the packaging bag 1 disposed in the middle of the conveying path 18 is disposed in the arrangement section 15. The arrangement section 15 is a rectangular frame-shaped table having a size sufficient to carry one packaging bag 1. The packaging bag 1 disposed in the arrangement section 15 is sequentially switched in the packaging bag continuous body 3 by the conveying section 14 conveying the packaging bag continuous body 3.

[0079] In addition, the entire upper surface (the surface facing the upper side of the device body 11, and the same applies hereinafter) of the packaging bag 1 in the state of being arranged in the arrangement portion 15 is exposed, and the lower surface (the surface facing the lower side of the device body 11, and the same applies hereinafter) of the packaging bag 1 except for the edge is exposed. The edge of the packaging bag 1 is a sealed portion formed by overlapping and crimping two film sheets constituting the packaging bag 1.

[0080] The image capturing unit 16 captures an image of the packaging bag 1 placed in the placement unit 15 and the medicine (i.e., the medicine to be determined) contained in the packaging bag 1. Figure 3 As shown, the plurality of cameras include two cameras, one above and one below. These two cameras photograph the portion of the arrangement portion 15 (i.e., the photographing target portion 3x) arranged in the packaging bag continuous body 3 from opposite directions in the thickness direction (i.e., the vertical direction) of the packaging bag continuous body 3.

[0081] Specifically, the upper camera (hereinafter referred to as the first camera 16a) of the two upper and lower cameras is arranged at a position directly above the arrangement portion 15, and captures an image of one surface of the photographing target portion 3x in the thickness direction of the packaging bag continuous body 3, more specifically, the upper surface of the packaging bag 1 arranged at the arrangement portion 15 from above. The lower camera (hereinafter referred to as the second camera 16b) is arranged at a position directly below the arrangement portion 15, and captures an image of the other surface of the photographing target portion 3x located on the opposite side of the one surface (i.e., the surface captured by the first camera 16a) in the thickness direction of the packaging bag continuous body 3, more specifically, the lower surface of the packaging bag 1 arranged at the arrangement portion 15 from below.

[0082] The images of the packaging bag 1 (excluding the empty bag 1A) captured by the first camera 16a and the second camera 16b include images of medicines. Here, the “images of medicines” refer to images of medicines captured across the packaging bag 1 .

[0083] In the present embodiment, the device body 11 is configured such that the conveying section 14 intermittently performs the conveying operation, and the image capturing section 16 captures images of the packaging bag 1 arranged in the arrangement section 15 and the medicine contained in the packaging bag 1 during the conveying operation. Then, the image capturing section 16 captures images of the packaging bag 1 arranged in the arrangement section 15 and the medicine contained in the packaging bag 1 every time the packaging bag 1 arranged in the arrangement section 15 is switched by the conveying operation.

[0084] In this embodiment, the shooting range (angle of view) of the first camera 16a is as follows: Figure 4 As shown, it is a rectangular area ( Figure 4 The rectangular area shown by the dotted line in the middle) sets the front of the upper surface of the packaging bag 1 arranged in the arrangement part 15 and a part of the upper surface of the packaging bag 1 located on both sides thereof (strictly speaking, the end part) as the range that can be photographed. In other words, the part of the packaging bag continuous body 3 located in the photographing range of the first camera 16a corresponds to the photographing object part 3x, as shown in FIG. Figure 4 As shown, at least the cutting line 3y between the packaging bags 1 is located in this portion.

[0085] in addition, Figure 4 The figure shows the imaging range of the image capturing unit 16 and a part of the continuous packaging bag body 3 that is within the imaging range.

[0086] Similarly, the imaging range (angle of view) of the lower camera 16b is a rectangular area, and the exposed area located inside the arrangement portion 15 and a portion of the lower surface of the packaging bag 1 arranged in the arrangement portion 15 and the end portion of the packaging bag 1 located on both sides thereof are set as the imaging range. In other words, the portion of the packaging bag continuum 3 located within the imaging range of the second camera 16b corresponds to the imaging target portion 3x, and at least the cutting line 3y between the packaging bags 1 is located in this portion.

[0087] The image capturing unit 16 may have a function of acquiring image data of a subject, and examples thereof include a CCD (Charge-Coupled Device) image sensor and a CMOS (Complementary Metal Oxide Semiconductor) image sensor, but are not limited thereto.

[0088] In the present embodiment, the image capturing unit 16 is composed of two cameras, but the number of cameras is not particularly limited, and may be only one, or may be three or more.

[0089] In addition, in the present embodiment, the camera is set at the position sandwiching the configuration portion 15 above and below, but the camera can be set at any position as long as it is a position that can well capture the image of the packaging bag 1 configured in the configuration portion 15 and the medicine wrapped in the packaging bag 1.

[0090] The light irradiation unit 17 irradiates light to the packaging bag 1 arranged in the arrangement unit 15 and the medicine contained in the packaging bag 1 (i.e., the medicine to be determined) when the image capturing unit 16 captures an image. More specifically, the light irradiation unit 17 irradiates light to a portion of the packaging bag continuous body 3 that is within the imaging range of the image capturing unit 16 (i.e., the surface of the imaging target portion 3x).

[0091] The light irradiation unit 17 is as follows Figure 5 As shown in the figure, there are a plurality of light emitting parts, and in this embodiment, there are four light emitting parts 17a, 17b, 17c and 17d. Figure 5 17 is a schematic diagram of a plurality of light emitting units of the light irradiation unit 17 when viewed from above. The four light emitting units 17a, 17b, 17c and 17d are light sources used by the light irradiation unit 17 when irradiating light. Figure 5 As shown in the figure, they are arranged at four directions of the arrangement part 15. Furthermore, the light irradiation part 17 uses four light emitting parts 17a, 17b, 17c and 17d (a plurality of light emitting parts) to irradiate light in mutually different directions.

[0092] Specifically, the two light emitting units 17a and 17b are arranged at positions on opposite sides of the arrangement unit 15 in the conveying direction (i.e., the longitudinal direction of the continuous packaging bag body 3), and emit light in opposite directions. That is, one light emitting unit 17a (hereinafter referred to as the first light emitting unit 17a) emits light from the upstream side in the conveying direction to the arrangement unit 15 located on the downstream side in the conveying direction. The other light emitting unit 17b (hereinafter referred to as the second light emitting unit 17b) emits light from the downstream side in the conveying direction to the arrangement unit 15 located on the upstream side in the conveying direction.

[0093] The remaining two light emitting units 17c and 17d among the four light emitting units 17a, 17b, 17c, and 17d are arranged at positions on opposite sides from each other when viewed from the arrangement unit 15 in a direction transverse to the conveying direction (hereinafter referred to as the cross direction), and emit light in opposite directions. That is, the light emitting unit 17c on one side (hereinafter referred to as the third light emitting unit 17c) emits light from one side to the arrangement unit 15 on the other side in the cross direction. The light emitting unit 17d on the other side (hereinafter referred to as the fourth light emitting unit 17d) emits light from the other side to the arrangement unit 15 on one side in the cross direction. Here, the so-called "one side in the cross direction" refers to, for example, a side close to one end of the arrangement unit 15 in the cross direction, and the so-called "the other side in the cross direction" refers to a side close to the other end of the arrangement unit 15 in the cross direction.

[0094] The light irradiation unit 17 uses part or all of the four light emitting units 17a, 17b, 17c, and 17d to irradiate the packaging bag 1 disposed in the disposition unit 15 and the medicine contained in the packaging bag 1. Figure 6 As known, the light irradiation unit 17 irradiates light from an oblique direction to the surface of the photographed object portion 3x. This is because when the light hits the surface of the medicine from an oblique direction, the outline of the identification information formed on the surface of the medicine (especially the edge of the outline located at the irradiation target of the light) can be made conspicuous.

[0095] Figure 6 1 is a diagram showing a state where the packaging bag 1 is irradiated with light, and is a schematic diagram showing the packaging bag 1 , the image capturing unit 16 , and the light irradiating unit 17 from the side.

[0096] In addition, in the present embodiment, the light emitting units 17a, 17b, 17c, and 17d used by the light irradiation unit 17 can be switched when the image capturing unit 16 captures an image. Specifically, the light irradiation unit 17 uses one of the four light emitting units 17a, 17b, 17c, and 17d to irradiate light. At this time, the other light emitting units stop and do not emit light. For example, while the light irradiation unit 17 uses the first light emitting unit 17a to irradiate light onto the surface of the captured object portion 3x, the second light emitting unit 17b, the third light emitting unit 17c, and the fourth light emitting unit 17d each stop emitting light. Similarly, while the light irradiation unit 17 uses the second light emitting unit 17b to irradiate light onto the surface of the captured object portion 3x, the first light emitting unit 17a, the third light emitting unit 17c, and the fourth light emitting unit 17d each stop emitting light.

[0097] While the light irradiation unit 17 is irradiating light from one of the light emitting units, the image capturing unit 16 captures an image of the medicine contained in the packaging bag 1 placed in the placement unit 15. Thereafter, the light irradiation unit 17 switches the light emitting unit that was just used among the light emitting units 17a, 17b, 17c, and 17d to another light emitting unit, and irradiates light using the light emitting unit 17a, 17b, 17c, or 17d that has been switched. During this period, the image capturing unit 16 captures an image of the medicine contained in the packaging bag 1 placed in the placement unit 15 again.

[0098] Thereafter, the light irradiation unit 17 switches the light emitting units 17a, 17b, 17c, and 17d in the same order, and each time the light irradiation unit 17 switches the light emitting units 17a, 17b, 17c, and 17d, the image capturing unit 16 captures an image of the medicine contained in the packaging bag 1 disposed in the disposition unit 15. As a result, images differentiated by the irradiation direction of light are captured for the medicine contained in one packaging bag 1 disposed in the disposition unit 15 (that is, four images with different light reflection conditions in various parts of the medicine surface).

[0099] As described above, in this embodiment, the image capturing unit 16 captures images of the surface of the imaging target portion 3x a plurality of times by changing the imaging conditions while irradiating light onto the surface of the imaging target portion 3x in the continuous packaging bag body 3. Here, the imaging conditions refer to the camera used by the image capturing unit 16 when capturing images and the light emitting unit used by the light irradiation unit 17 when irradiating light.

[0100] More specifically, the light irradiation unit 17 changes the light emitting unit used for irradiating light among the first light emitting unit 17a, the second light emitting unit 17b, the third light emitting unit 17c, and the fourth light emitting unit 17d every time the imaging condition is changed. In addition, the image capturing unit 16 changes the camera used for capturing images among the first camera 16a and the second camera 16b every time the imaging condition is changed. Then, the image capturing unit 16 changes the imaging condition (differentiates according to the imaging condition) and captures the image of the imaging target portion 3x, and as a result, a total of 8 images (the number of cameras×the number of light emitting units) are captured for each packaging bag 1 in the packaging bag continuum 3.

[0101] In addition, in this embodiment, if Figure 5 As shown in the figure, in the conveying direction (in other words, the longitudinal direction of the continuous packaging bag body 3), the first light emitting unit 17a is located on the upstream side of the arrangement unit 15, and the second light emitting unit 17b is located on the downstream side of the arrangement unit 15. In addition, the first camera 16a is arranged just above the arrangement unit 15, and the second camera 16b is arranged just below the arrangement unit 15. With such a positional relationship, the image capturing unit 16 captures an image of the surface of the imaging target portion 3x in a state where the imaging target portion 3x is located between the first light emitting unit 17a and the second light emitting unit 17b in the conveying direction.

[0102] Here, as described above, the end of the packaging bag 1 (strictly speaking, the packaging bag 1 for packaging medicines other than the empty bag 1A) arranged in the arrangement portion 15 and the cutting line 3y adjacent to the end are located in the imaging target portion 3x. More specifically, the imaging target portion 3x is at least the portion covering the medicine, the two ends in the conveying direction, and the cutting line 3y adjacent to each end of the packaging bag 1 arranged in the arrangement portion 15. Then, the image capturing unit 16 captures the image of the surface of the imaging target portion 3x a plurality of times by changing the imaging conditions.

[0103] Here, the image of the surface of the photographing object portion 3x photographed by the image photographing unit 16 is described. Fig. 7A as well as Figure 7B As shown, the image captures the packaging bag 1 arranged in the arrangement portion 15 , the cutting lines 3 y located on both sides of the packaging bag 1 , and the individual medicines f wrapped in the packaging bag 1 . Fig. 7A as well as Figure 7B This is an example of an image captured by the image capturing unit 16 .

[0104] in addition, Fig. 7A The images shown and Figure 7B The images shown are images captured under mutually different capturing conditions. Fig. 7A The image shown is an image of the surface of the imaging target portion 3x captured by the image capturing unit 16 during the period when the light irradiation unit 17 uses the first light emitting unit 17a to irradiate light to the surface of the imaging target portion 3x, and is hereinafter referred to as the "first image". Figure 7B The image shown is an image of the surface of the imaging target portion 3x captured by the image capturing unit 16 while the light irradiation unit 17 uses the second light emitting unit 17b to irradiate light onto the surface of the imaging target portion 3x, and is hereinafter referred to as a "second image".

[0105] Incidentally, as the light emitting parts 17a, 17b, 17c and 17d used in the light irradiation of the light irradiation part 17, known light sources can be used, and any of point light sources, line light sources and surface light sources can be used. Specifically, for example, light sources based on electric field luminescence such as LED (Light Emitting Diode), semiconductor laser (LD: Laser Diode), and organic EL (Electro-luminescence), light sources based on radiant heat such as halogen bulbs and incandescent bulbs, light sources based on discharge luminescence such as mercury lamps and fluorescent lamps, and light sources obtained by combining these light sources with light guide members such as light guide plates or optical fibers can be used.

[0106] In the present embodiment, the light irradiation unit 17 includes four light emitting units 17a, 17b, 17c, and 17d, but the number of light emitting units is not particularly limited, and two or more light emitting units may be provided.

[0107] The processing device 12 executes a series of information processing each time a dispensing audit is performed, and in this embodiment, it is constituted by a personal computer (PC) attached to the device body 11. However, the present invention is not limited to this, and the processing device 12 may be constituted by a computer built into the device body 11.

[0108] The processing device 12 is communicatively connected to the device body 11, the prescription condition input device 50, and a database server 70 described later. The processing device 12 may be connected to each device by wire or wirelessly.

[0109] In addition, the processing device 12 is as follows Figure 8 As shown, the apparatus includes a control unit 21 , a prescription condition information acquisition unit 22 , an image acquisition unit 23 , a pre-processing unit 24 , a determination unit 25 , a detection unit 27 , and a removal processing execution unit 28 . Figure 8 This is a block diagram showing the structure of the processing device 12. These components are realized by the cooperation of hardware devices such as a CPU (Central Processing Unit) and a memory, which are not shown in the figure, and an information processing program stored in the processing device 12. The information processing program can be obtained by reading from a recording medium such as a CD-ROM (Compact Disc Read Only Memory) storing the same program, or can be obtained by downloading from a given website via the network.

[0110] In addition, in the present embodiment, each functional unit of the processing device 12 (specifically, the control unit 21, the prescription condition information acquisition unit 22, the image acquisition unit 23, the pre-processing unit 24, the determination unit 25, the detection unit 27, and the removal processing execution unit 28) is composed of a personal computer, but is not limited to this. It is also possible that part of the above-mentioned functional units are composed of one personal computer, and the remaining functional units are composed of other personal computers.

[0111] The control unit 21 is electrically connected to each part of the device body 11 (specifically, the transport unit 14, the image capture unit 16, and the light irradiation unit 17) via the drive control circuit 11a mounted on the device body 11, and controls each part of the device. In more detail, the control unit 21 controls the transport amount, the transport direction, and the timing of the transport action in one transport action with respect to the transport action of the transport unit 14. In addition, the control unit 21 controls the cameras used in the two cameras 16a and 16b of the image capture unit 16 and the timing of image capture with respect to the shooting action of the image capture unit 16. In addition, the control unit 21 controls the light emitting units used in the four light emitting units 17a, 17b, 17c, and 17d of the light irradiation unit 17 and the timing of light irradiation with respect to the light irradiation action of the light irradiation unit 17.

[0112] The prescription condition information acquisition unit 22 is communicatively connected to the prescription condition input device 50, and acquires the prescription condition information by communicating with the prescription condition input device 50. Here, the prescription condition information refers to information indicating the prescription condition, specifically, electronic data indicating the prescription condition input into the prescription condition input device 50 by the pharmacist.

[0113] In addition, in the present embodiment, when the prescription condition is inputted in the prescription condition input device 50, the prescription condition information is automatically sent from the prescription condition input device 50 to the prescription condition information acquisition unit 22, and the prescription condition information acquisition unit 22 receives the above-mentioned prescription condition information. However, the present invention is not limited to this, and the prescription condition information acquisition unit 22 may send an information transmission request, and the prescription condition input device 50 transmits the prescription condition information at the time when the prescription condition input device 50 receives the request. More specifically, the character string information or the two-dimensional barcode information for specifying the prescription condition is printed on the front end portion of the continuous package bag body 3 (the portion of the continuous package bag body 3 that is first introduced into the device body 11), and when the continuous package bag body 3 is introduced into the device body 11, the prescription condition information acquisition unit 22 reads the above-mentioned printed information. Thereafter, the prescription condition information acquisition unit 22 requests the prescription condition input device 50 for prescription condition information indicating the prescription conditions related to the medicines packaged in each package bag 1 in the continuous package bag body 3 introduced into the device body 11 based on the read printed information. The prescription condition input device 50 that has received the request analyzes the request, identifies the prescription condition information related to the request, and transmits the identified prescription condition information to the processing device 12 .

[0114] The image acquisition unit 23 is connected to the image shooting unit 16 (strictly speaking, the first camera 16a and the second camera 16b), and acquires the image shot by the image shooting unit 16 via the network. Here, the image acquired by the image acquisition unit 23 refers to image data, specifically, image data in the JPEG (Joint Pthotographic Experts Group) format, GIF (Graphics Interchange Format) format, PNG (Portable Network Graphics) format, TIFF (Tagged Image File Format) format, BMP (Bitmap Image) format, etc.

[0115] In addition, every time the image capturing unit 16 captures an image, the image acquisition unit 23 acquires an image from the image capturing unit 16. To be more specific, in this embodiment, as described above, the image capturing conditions are changed (differentiated by the capturing conditions) for a plurality of times (specifically, 8 times) for capturing images of one packaging bag 1 that packages medicines. Therefore, the image acquisition unit 23 changes the capturing conditions for each packaging bag 1 and the medicines packaged in the packaging bag 1 to acquire a plurality of images (i.e., 8 images differentiating by the capturing conditions).

[0116] Furthermore, when the packaging bag 1 arranged in the arrangement portion 15 is switched, the image capturing portion 16 changes the imaging conditions to capture new images. Accordingly, the image acquiring portion 23 acquires a plurality of newly captured images under different imaging conditions.

[0117] The preprocessing unit 24 performs preprocessing on the image (i.e., image data of the drug to be determined) acquired by the image acquisition unit 23 from the image capturing unit 16. The preprocessing is processing for emphasizing identification information formed on the surface of the drug captured in the image acquired by the image acquisition unit 23.

[0118] Specifically, in this embodiment, as described above, the irradiation direction of light is changed for the medicine wrapped in one packaging bag 1 to capture images multiple times (specifically 4 times). Here, in each image distinguished by the irradiation direction of light, the surface of the medicine captured in the image has uneven illumination of light. Such uneven illumination of light will have an impact on the detection and determination of identification information formed on the surface of the medicine. In addition, the uneven illumination of light is different depending on the irradiation direction of light. For this reason, the pre-processing unit 24 performs pre-processing to synthesize the prominent part of the contour (edge) of the identification information captured in each image in relation to the irradiation direction of light in order to emphasize the identification information located on the surface of the medicine using the images distinguished by the irradiation direction of light. Alternatively, the pre-processing unit 24 applies the illumination difference stereo method to the images distinguished by the irradiation direction of light, considers the irradiation direction of light in each image, and performs image synthesis for making the identification information captured in common in each image prominent.

[0119] The image subjected to the above preprocessing becomes an image in which uneven illumination of light that changes according to the irradiation direction of light is eliminated as much as possible, and identification information formed on the surface of the medicine captured in the image is emphasized.

[0120] The determination unit 25 determines whether the number and type of medicines (ie, medicines to be determined) contained in the packaging bag 1 arranged in the arrangement unit 15 match the number and type of medicines specified based on the prescription condition information acquired by the prescription condition information acquisition unit 22 .

[0121] refer to Fig. 9 A specific procedure of determination by the determination unit 25 will be described below. Fig. 9 2 is a diagram showing a rough flow of the determination process of the determination unit 25. In the determination process of the determination unit 25, Fig. 9 As shown, first, a process is performed to determine the area where the drug to be determined is captured from the pre-processed image (S001). Hereinafter, the pre-processed image is referred to as a "pre-processed image", and the area where the drug is captured in the pre-processed image is referred to as a "drug presence area".

[0122] In the drug presence region determination step S001, the pre-processed image is subjected to known edge extraction and segmentation processing to determine the contour of the drug in the image. Then, the area surrounded by the determined contour is determined as the drug presence region. In the case where multiple drugs are captured in the pre-processed image, the drug presence region is determined according to the number of drugs.

[0123] After the drug existing region determination step S001 is performed, the determination unit 25 extracts a pixel group corresponding to the drug existing region from the pixel group constituting the pre-processed image (S002). Fig.10A rectangle is formed to surround the drug presence area as shown in FIG. Fig.10 The extracted pixel group is hereinafter referred to as a "drug extraction image X". In addition, when a plurality of drug existing regions are determined in the drug existing region determination step S001, the drug extraction image X is determined separately for each drug existing region.

[0124] By the way, Fig.10 : is an illustration of the drug extraction image X. In addition, Fig.10 The pixel size (the size of one pixel per image) shown in the figure is drawn larger than the actual pixel size for the convenience of illustration.

[0125] In the pixel group extraction step S002, the size and position of the drug extraction image X are determined. Here, the size of the drug extraction image X is the area of ​​the rectangular pixel group forming the drug extraction image X, which is equivalent to Fig.10 The product of the lengths d1 and d2 of the two sides shown in the figure.

[0126] The position of the drug extraction image X is a coordinate position when the reference position is the origin and the transport direction and the cross direction are the coordinate axis directions. Specifically, it is the intersection position of the diagonal lines of the rectangular pixel group forming the drug extraction image X, which is equivalent to Fig.10 The coordinates of the point P shown in the figure. By determining the position of the drug extraction image X in this way, the imaging position (disposition position) of the drug to be determined relative to the imaging range of the image capturing unit 16 (strictly speaking, the respective viewing angles of the first camera 16a and the second camera 16b) can be determined. In addition, in the present embodiment, the reference position set as the origin is set at the central position of the imaging range of the image capturing unit 16 (strictly speaking, the first camera 16a and the second camera 16b), but it is not limited to this and can be set at any position.

[0127] After the pixel group extraction step S002 is performed, the determination unit 25 determines the type of prescription to be executed from the prescription condition information acquired by the prescription condition information acquisition unit 22, and performs a step (S003) of reading a main image of the medicine of the determined type from the database DB. In this step S003, when there are multiple types of prescriptions to be executed, that is, when multiple types of medicines are packaged in the packaging bag 1, the main image is read out for each type.

[0128] Here, the main image is described. The main image is an image of a medicine registered in correspondence with the type of medicine, and is an image pre-registered for the type of medicine determined from the prescription condition information. In addition, in the present embodiment, the main image is an image of the medicine photographed in a state of being wrapped in the packaging bag 1. In addition, for the type of medicine that has been determined by the determination unit 25 in the past, among the images (strictly speaking, the medicine extraction images X) of the medicine of the type that were taken by the image capture unit 16 in the past, the image obtained when the determination result that the medicine is consistent with the prescription condition is registered as the main image.

[0129] Describe the database DB, such as Fig.11 As shown, the database DB registers the main image of each medicine and the type of medicine in association with each other. Fig.11 It is an explanatory diagram of a database DB in which main images are registered.

[0130] In addition to the main image, the database DB also registers the name of the medicine, identification information formed on the surface of the medicine, and the size of the medicine as viewed from above and the thickness in correspondence with the type of medicine. In addition, the information registered in the database DB is not limited to the above information, and information other than the above information may also be registered.

[0131] In this embodiment, the database DB is provided in the external database server 70, and the determination unit 25 communicates with the database server 70 to access the database DB. However, the present invention is not limited thereto, and the database DB may be provided in the processing device 12, that is, may be stored in a storage medium in the processing device 12.

[0132] After the main image is read out from the database DB, the determination unit 25 uses the read out main image and the image of the medicine of the determination object taken by the image capture unit 16 (strictly speaking, the medicine extraction image X) to determine whether the type of the medicine of the determination object is consistent with the type of the medicine captured in the main image (that is, the type of the medicine determined according to the acquired prescription condition information) (S004). Specifically, in the determination step S004, template matching between the main image and the medicine extraction image X is performed to evaluate the similarity between the medicine captured in the main image and the medicine captured in the medicine extraction image X (that is, the medicine of the determination object). Regarding the evaluation method of the similarity, the well-known geometric hashing method or the LLHA (Locally Likely Arrangement Hashing) method can be used. In addition, when the similarity is above the reference value, the determination unit 25 determines that the type of the medicine captured in the medicine extraction image X is consistent with the type of the medicine captured in the main image.

[0133] In addition, when there are multiple drug extraction images X, the similarity is evaluated for each drug extraction image X. In addition, the determination unit 25 counts the number of images determined to be consistent with the type of the drug captured in the main image among the images captured in the drug extraction image X (hereinafter referred to as the drug type consistency number). Then, the determination unit 25 determines whether the drug type consistency number counted by type is the same as the number of prescriptions by type determined based on the prescription condition information.

[0134] The determination by the determination unit 25 is performed in the order described above. Then, if the packaging bag 1 arranged in the arrangement unit 15 is switched (that is, the medicine to be determined is changed), the determination is repeated. That is, if the packaging bag 1 arranged in the arrangement unit 15 is switched, an image of the medicine packaged in the packaging bag 1 is obtained, and the determination is performed using the newly obtained image. In addition, when the medicines are packaged in each packaging bag 1 in the packaging bag continuous body 3 under the same prescription conditions, in the second and subsequent determinations, the main image used in the first determination can be directly used, so the step S003 of reading the main image from the database DB can be omitted.

[0135] According to the procedure described so far, by judging the medicine in each packaging bag 1 (strictly speaking, the packaging bag 1 other than the empty bag 1A) in the packaging bag continuum 3, it is possible to confirm (audit) whether the medicine in each packaging bag 1 is correctly packaged as instructed on the prescription.

[0136] The detection unit 27 detects a cutting line 3y (boundary concave portion) formed at a boundary position between the packaging bags 1 in the packaging bag continuous body 3 introduced into the housing 13. The detection unit 27 detects the cutting line 3y in order to define an imaging range in the packaging bag continuous body 3 every time the determination unit 25 determines whether the medicine packaged in the packaging bag 1 is suitable or not.

[0137] To explain more clearly, for example, if the image capturing unit 16 directly captures the image of the capture target portion 3x without detecting the cut line 3y, the image may be captured in a state where each package bag 1 in the package bag continuous body 3 is deviated from the proper position. In such a case, the captured image becomes an image that straddles the cut line 3y, and there is a possibility that medicines that are respectively packaged in two adjacent package bags 1 are captured together in one image. For this reason, in this embodiment, the detection unit 27 detects the cut line 3y in the package bag continuous body 3 before the determination by the determination unit 25.

[0138] In addition, in the present embodiment, the detection unit 27 detects the cut line 3y in the imaging target portion 3x in the packaging bag continuous body 3 based on the images obtained by the image acquisition unit 23 under different imaging conditions (in other words, the images obtained by the image acquisition unit 16 under different imaging conditions). The specific detection procedure of the cut line 3y will be described in detail later.

[0139] The removal processing execution unit 28 performs a removal processing to remove the image of the medicine in the image used by the detection unit 27 to detect the cutting line 3y. The detection unit 27 detects the cutting line 3y in the imaging target portion 3x based on the image on which the removal processing is performed by the removal processing execution unit 28 (i.e., the image from which the image of the medicine is removed). The details of the removal processing will be described later together with the detection procedure of the cutting line 3y.

[0140] <<Method for detecting cut lines>>

[0141] Next, the detection method of the cutting line 3y in this embodiment is described. In addition, the detection method of the cutting line 3y is equivalent to the detection method of the boundary concave portion of the present invention. And the detection method of the boundary concave portion of the present invention is used in the basic operation of the drug determination device 10 including the detection process of the cutting line 3y described later.

[0142] When explaining the detection method of the cut line 3y in the present embodiment, the problems related to the detection of the cut line 3y in the past are first explained. In a general method of detecting the cut line 3y, the image of the object portion 3x is captured by the image capturing unit 16, and the cut line 3y captured in the captured image is detected. In addition, when the image is captured, the light irradiation unit 17 irradiates light to the object portion 3x. If the light irradiated by the light irradiation unit 17 reaches the cut line 3y in the object portion 3x, diffuse reflection of the light will occur at the cut line 3y. Therefore, in the captured image, if Fig. 7A as well as Figure 7B As shown, the luminance (brightness) of the portion where the cutting line 3y is formed becomes high.

[0143] On the other hand, since the medicine is packaged in the packaging bag 1, the portion of the surface of the packaging bag 1 near the cutting line 3y is more bulged than the portion of the packaging bag continuous body 3 forming the cutting line 3y. For this reason, a portion of the light irradiated by the light irradiation unit 17 to the imaging target portion 3x is as follows: Figure 6 As shown in FIG. 1 , a portion of the surface of the packaging bag 1 that is raised near the cutting line 3y ( Figure 6 The reflected light is captured by the image capturing unit 16. As a result, in the captured image, Fig. 7A as well as Figure 7BAs shown, a line having a brightness higher than that of the surroundings is found near the cutting line 3y, and this line (hereinafter referred to as a pseudo cutting line 3r) may be erroneously detected as the cutting line 3y.

[0144] As described above, when detecting the cut line 3y from the image of the object portion 3x captured by the image capturing unit 16, it is necessary to avoid erroneous detection of the pseudo cut line 3r. For this reason, in the present embodiment, the cut line 3y in the object portion 3x in the continuous packaging bag body 3 is detected using an image captured by the image capturing unit 16 under different shooting conditions. Then, according to the detection method of the present embodiment, it is possible to avoid erroneous detection of the pseudo cut line 3r, and thus to correctly detect the cut line 3y. Figure 6 ,and Figure 12 to Figure 16 The detection procedure of the cutting line 3y will be described.

[0145] Fig.12 3 y is a diagram showing the flow of a process (hereinafter referred to as a cutting line detection process) in which the detection unit 27 detects the cutting line 3 y. Fig.13 This is an example of a composite image described later. Fig.14 This is a diagram (image) for explaining the flow of image shrinkage and expansion processing. Fig.15 This is an example of an image on which the removal process is performed by the removal process execution unit 28 . Fig.16 This is a diagram showing the correspondence between the distance from the edge position of the image and the grayscale total value in the image subjected to the removal process. Fig.16 The horizontal axis represents the distance from the end position of the image in the conveying direction (specifically, the end position closer to the upstream side in the conveying direction) in pixels, and the vertical axis represents the total value of the grayscale values ​​(depth) of pixels located at the same distance.

[0146] In the cutting line detection process, the detection unit 27 detects the cutting line 3y in the imaging target portion 3x using the first image and the second image described above among the images captured under different imaging conditions by the image capturing unit 16. More specifically, the detection unit 27 uses, as the first image, an image of the surface of the imaging target portion 3x captured by the image capturing unit 16 using the first camera 16a during the period when the light irradiation unit 17 irradiates light to the surface of the imaging target portion 3x using the first light emitting unit 17a. In addition, the detection unit 27 uses, as the second image, an image of the surface of the imaging target portion 3x captured by the image capturing unit 16 using the first camera 16a during the period when the light irradiation unit 17 irradiates light to the surface of the imaging target portion 3x using the second light emitting unit 17b.

[0147] In the cutting line inspection process, Fig.12As shown in FIG. 1 , the detection unit 27 first selects a certain area from each of the first image and the second image (S051). Specifically, the detection unit 27 divides the first image into two parts in the direction corresponding to the conveying direction (i.e., the lateral direction of the image), and selects the part of the first image close to the downstream side in the conveying direction. In addition, the part of the first image close to the downstream side in the conveying direction corresponds to the part of the area of ​​the photographed object part 3x that is photographed farther from the first light-emitting unit 17a.

[0148] Similarly, the detection unit 27 divides the second image into two parts in the horizontal direction of the image, and selects the part of the second image close to the upstream side in the conveying direction. In addition, the so-called part of the second image close to the upstream side in the conveying direction is a part of the area farther from the second light-emitting unit 17b in the photographed object part 3x.

[0149] The reason why the detection unit 27 selects the first image and the second image that are farther from the light emitting unit 17a or 17b used by the light emitting unit 17 when the image is captured is that it is more difficult to find the above-mentioned false cutting line 3r in the selected portion. More specifically, when a packaging bag 1 arranged in the arrangement unit 15 and the cutting lines 3y provided on both sides of the packaging bag 1 enter the photographing target portion 3x, the light emitting unit 17 irradiates light to the photographing target portion 3x. In this case, Figure 6 As shown in FIG. 1 , the cutting line 3y closer to the light emitting portion 17a or 17b emitting light at this time and the portion located near it ( Figure 6 The light is reflected by the image capturing unit 16. As a result, the pseudo-cutting line 3r is easily found in the captured image at a portion closer to the light emitting unit 17a or 17b that emits the light.

[0150] On the other hand, in the packaging bag 1 described above, even at the raised portion ( Figure 6 The light is reflected from the part marked with Rf2. Figure 6 As shown in FIG. 1 , the reflected light does not reach the image capturing unit 16. Therefore, it is difficult to find the pseudo cut line 3r in the portion farther from the light emitting unit 17a or 17b that emits light in the captured image. In view of such a property, the detection unit 27 uses the portion farther from the light emitting unit 17a or 17b used by the light irradiation unit 17 when the image is captured in each of the first image and the second image to detect the cut line 3y in the captured object portion 3x.

[0151] Returning to the description of the cutting line detection process, the detection unit 27 synthesizes the parts of the first image and the second image selected in the previous step S051 to create a composite image (S052). The composite image includes the downstream half of the first image in the conveying direction and the upstream half of the second image in the conveying direction. Therefore, in the composite image, the pseudo cutting line 3r is not found for the reasons mentioned above. Fig.13 As shown, the medicine contained in the packaging bag 1 and the cutting line 3y are mainly captured. Then, the detection unit 27 detects the cutting line 3y in the imaging target portion 3x based on the synthesized image.

[0152] Specifically describing the process after the composite image is created, the removal processing execution unit 28 performs removal processing on the composite image (S053). In the present embodiment, the removal processing uses the shrinkage and expansion technology as an image processing technology. That is, the removal processing execution unit 28 performs the removal processing to remove the image of the medicine in the composite image by shrinking and expanding the pixel group constituting the composite image in at least one direction and removing the image after shrinkage and expansion from the image before shrinkage and expansion.

[0153] refer to Fig.14 To illustrate the removal process. Fig.14 In order to explain the order of contraction and expansion in an easily understandable manner, the image captured by the image capturing unit 16 is not a synthesized image (strictly speaking, an image obtained by converting the captured image from an RGB (Red Green Blue) image into a grayscale image).

[0154] lie in Fig.14 The image in the upper part of the figure shows the image before shrinkage and expansion. If the pixel group constituting the image is shrunk in the direction corresponding to the transport direction (i.e., the lateral direction of the image), the image at Fig.14 As shown in the middle section of the image, an image (image after contraction) is obtained in which the lines extending in the direction corresponding to the cross direction (i.e., the longitudinal direction of the image) in the image before contraction and expansion disappear. Here, contraction means that when each pixel in the image is converted to black and white binary, the target pixel is made black, and the target pixel is contracted by an amount corresponding to one pixel.

[0155] Then, if the pixel group constituting the shrunk image is expanded along the horizontal direction of the image, as if located at Fig.14 As in the image in the lower section of FIG. 1 , the medicine and the vertical lines such as the cutting line 3y captured in the contracted image become images of the size before contraction in the horizontal direction (contracted and expanded image). Here, the so-called expansion means that when each pixel in the image is converted to black and white binary, when any of the pixels located around the target pixel is white, the target pixel is made white so as to expand by one pixel.

[0156] In addition, in this embodiment, shrinkage and expansion are performed along the direction corresponding to the conveying direction (i.e., the horizontal direction of the image), but it is not limited to this. Shrinkage and expansion can also be performed along the direction corresponding to the cross direction (i.e., the vertical direction of the image). In addition, shrinkage and expansion can be performed not only in one direction, but in multiple directions.

[0157] Then, if the image after shrinkage and expansion is removed from the image before shrinkage and expansion (in other words, a differential image of the two images is obtained), the image of the medicine in the image before shrinkage and expansion is removed. Fig.15 As shown in FIG. 3 , a composite image is obtained in which only the cutting line 3y is captured. Fig.15 The composite image shown is an image obtained by expanding the pixel group constituting the composite image after the removal process in the lateral direction of the image.

[0158] When the removal process is completed, the detection unit 27 detects the cut line 3y in the imaging target portion 3x based on the composite image after the removal process (i.e., the composite image from which the medicine is removed) (S054). As a method for detecting the cut line 3y from the composite image after the removal process, for example, a method of detecting the cut line 3y by determining the relationship between the position and the grayscale value (depth) of each pixel constituting the composite image after the removal process can be cited.

[0159] Specifically, the detection unit 27 regards a plurality of pixels located at equal distances from the end position of the synthesized image among the pixels constituting the synthesized image after the processing is removed as a pixel column (a column along the vertical direction of the image). Then, the detection unit 27 sums up the grayscale values ​​of the pixels in the pixel column by the number of pixels in the pixel column. If the sum of the number of pixels in the pixel column existing in the synthesized image after the processing is obtained (hereinafter referred to as the summed grayscale value), the pixel value is determined. Fig.16 The corresponding relationship between the position of the pixel row and the total grayscale value is shown in the figure.

[0160] Based on the determined correspondence, the detection unit 27 determines a pixel column whose total grayscale value is higher than that of surrounding pixel columns and whose total grayscale value exceeds a threshold. Fig.16 In the case shown in the figure, a pixel row whose distance from the end position of the composite image is the distance indicated by the arrow in the figure is determined. Then, the detection unit 27 detects the portion of the imaging object portion 3x corresponding to the determined pixel row as the cutting line 3y. In addition, the detection unit 27 detects two cutting lines 3y located in the imaging object portion 3x from an image (strictly speaking, a composite image) of the imaging object portion 3x.

[0161] In addition, the detection unit 27 calculates the interval ( Fig.16The controller 21 controls the conveying unit 14 based on the calculation result of the interval of the cutting line 3y sent from the detection unit 27. More specifically, the controller 21 sets the conveying amount in one conveying operation to an amount corresponding to the calculation result of the interval of the cutting line 3y.

[0162] An example of the procedure for detecting the cutting line 3y has been described above, but the cutting line 3y may be detected by a procedure other than the above-described procedure. Fig.17 An example of changing the procedure of detecting the cutting line 3y will be described. Fig.17 It is a diagram showing a modification example of the procedure for detecting the cutting line 3y.

[0163] In the cutting line detection process according to the modification, the detection unit 27 detects the cutting line 3y in the imaging target portion 3x using the image captured by the first camera 16a of the image capturing unit 16 (hereinafter referred to as the upper surface image Js) and the image captured by the second camera 16b of the image capturing unit 16 (hereinafter referred to as the lower surface image Jb) among the images captured under different imaging conditions by the image capturing unit 16. Here, the upper surface image Js and the lower surface image Jb used by the detection unit 27 are both images captured during the period when the light irradiation unit 17 irradiates light from the same light emitting unit 17a, 17b, 17c or 17d.

[0164] In addition, if Fig.17 As shown in FIG. 1 , in addition to the medicine f and the cut line 3y, a pseudo cut line 3r is found near the end of the light-emitting portion that emits light when the image is captured in the upper surface image Js and the lower surface image Jb. Fig.17 As shown, the cutting line 3y is captured at the same position between the upper surface image Js and the lower surface image Jb, while the pseudo cutting line 3r is captured at different positions. This is because the irradiation light from the light irradiation unit 17 is reflected at different positions on the upper surface and the lower surface of the packaging bag 1.

[0165] In the cutting line detection process involved in the modification example, if Fig.17As shown in the figure, first, the removal processing execution unit 28 performs the removal processing on the upper surface image Js and the lower surface image Jb in the same order as described above. That is, in the removal processing, the removal processing execution unit 28 shrinks and expands the pixel groups constituting the upper surface image Js and the lower surface image Jb captured by the image capturing unit 16 in the direction corresponding to the conveying direction (i.e., the lateral direction of the image). Then, the removal processing execution unit 28 removes the shrunken and expanded images obtained by shrinking and expanding each image from the image before shrinking and expanding. Thus, images obtained by removing the images of the medicine f from the upper surface image Js and the lower surface image Jb, i.e., the upper surface image NJs after the removal processing and the lower surface image NJb after the removal processing are obtained.

[0166] The upper surface image NJs after the removal process and the lower surface image NJb after the removal process are shown in FIG. Fig.17 As shown, vertical lines along a direction corresponding to the intersecting direction (ie, the vertical direction of the image), specifically, a cutting line 3y and a pseudo-cutting line 3r are captured.

[0167] After the removal process is performed, the detection unit 27 determines the candidate of the cutting line 3y captured in the image captured by the first camera 16a (strictly speaking, the upper surface image NJs after the removal process), and determines the candidate of the cutting line 3y captured in the image captured by the second camera 16b (strictly speaking, the lower surface image NJb after the removal process). Here, the candidate of the cutting line 3y is the vertical line captured in each of the upper surface image NJs after the removal process and the lower surface image NJb after the removal process, specifically, the cutting line 3y itself and the pseudo cutting line 3r.

[0168] Then, the detection unit 27 identifies the candidate of the cutting line 3y commonly captured in both the image captured by the first camera 16a (strictly speaking, the image NJs after the processing is removed from the upper surface) and the image captured by the second camera 16b (strictly speaking, the image NJb after the processing is removed from the lower surface). Then, the detection unit 27 detects the identified candidate of the cutting line 3y as the cutting line 3y in the captured object portion 3x.

[0169] In more detail, the detection unit 27 determines the vertical lines commonly captured between the post-removal upper surface image NJs and the post-removal lower surface image NJb, and generates a comprehensive image Ji reflecting the determination result. The comprehensive image Ji is an image in which only the vertical lines commonly captured between the post-removal upper surface image NJs and the post-removal lower surface image NJb are captured. Here, the vertical lines captured in the comprehensive image Ji are as follows: Fig.17Therefore, the detection unit 27 detects the vertical line captured in the integrated image Ji as the cutting line 3y in the imaged object portion 3x. In addition, as a method for detecting the vertical line (i.e., the cutting line 3y) in the integrated image Ji, it is also possible to use the correspondence between the position of each pixel column in the image and the total grayscale value in each pixel column described above (see Fig.16 ) method.

[0170] <<Basic Operation of Drug Determination Device>>

[0171] Next reference Fig.18 The basic operation of the medicine determination device 10 will be described. Fig.18 This is a diagram showing the basic operation flow of the drug identification device 10 .

[0172] First, when the prescription condition information is inputted in the prescription input operation, the prescription condition information acquisition unit 22 of the processing device 12 communicates with the prescription condition input device 50 to acquire the prescription condition information indicating the inputted prescription condition ( S011 ).

[0173] On the other hand, if the automatic packaging operation is performed by the packaging machine 60 in accordance with the input prescription conditions (in other words, the prescription conditions indicated by the prescription condition information acquired by the prescription condition information acquisition unit 22), a strip-shaped packaging bag continuous body 3 in which the packaging bags 1 containing the medicines are connected is produced. The packaging bag continuous body 3 is introduced into the device body 11 through the introduction portion 13a formed in the housing 13 of the device body 11 (S012).

[0174] When the continuous package bag body 3 is introduced into the device body 11, the conveying operation of the conveying unit 14 is repeated intermittently (S013). In each conveying operation, the continuous package bag body 3 is conveyed to the downstream side in the conveying direction by a predetermined amount. When the continuous package bag body 3 is conveyed to the downstream side in the conveying direction, one of the continuous package bag bodies 3 is arranged in the arrangement unit 15 soon. Then, each time the conveying operation is performed, the continuous package bag body 3 is switched to be arranged in the arrangement unit 15.

[0175] During the period between the conveying operations (i.e., during the period when the conveying of the continuous package bag body 3 is stopped), the light irradiation unit 17 irradiates light to the medicine contained in the package bag 1 arranged in the arrangement unit 15 (S014). In this state, the image capturing unit 16 captures an image of the package bag 1 or the medicine contained in the arrangement unit 15 (i.e., the medicine to be determined) using the first camera 16a and the second camera 16b respectively (S015).

[0176] The light irradiation process S014 of the light irradiation unit 17 is described in detail. After irradiating light from one of the four light emitting units 17a, 17b, 17c or 17d arranged around the arrangement unit 15, the light irradiation unit 17 sequentially switches the light emitting units (S016 and S017), and irradiates light again from the switched light emitting units 17a, 17b, 17c or 17d. That is, the light irradiation unit 17 sequentially switches the irradiation direction of light and irradiates light from various directions. Then, the image capturing unit 16 captures an image of the medicine to be determined according to the irradiation direction of light. Thus, a total of 8 images (the number of cameras × the number of irradiation directions of light) are captured of the medicine contained in the packaging bag 1 arranged in the arrangement unit 15.

[0177] In addition, every time the packaging bag 1 arranged in the arrangement portion 15 is switched in accordance with the conveying operation, the above-mentioned light irradiation step S014, image capturing step S015, and light emitting unit switching step S017 are repeatedly performed.

[0178] The captured image is transmitted to the image acquisition unit 23 of the processing device 12 at any time (S018). Then, the image acquired by the image acquisition unit 23 is pre-processed by the pre-processing unit 24 of the processing device 12 (S019). Thus, a pre-processed image is generated in which the edge of the identification information formed by engraving is emphasized on the surface of the medicine.

[0179] On the other hand, the determination unit 25 of the processing device 12 determines the prescription conditions related to the medicine captured in the pre-processed image (i.e., the medicine to be determined) (S020). Specifically, the prescription conditions set for the medicines in each packaging bag 1 packaged in the packaging bag continuous body 3 are determined from the prescription condition information obtained in S011 (in detail, the type of medicine and the number of medicines by type).

[0180] In addition, the detection unit 27 of the processing device 12 uses the image obtained by the image acquisition unit 23 under different shooting conditions (in other words, the image of the shooting target portion 3x shot by the image shooting unit 16 with the shooting conditions changed) to perform the cutting line detection step (S021). Specifically, the detection unit 27 detects the two cutting lines 3y located in the shooting target portion 3x through the above-mentioned procedure. Here, when the two cutting lines 3y are detected, one of the packaging bags 1 in the packaging bag continuous body 3 is correctly arranged in the arrangement unit 15. On the other hand, when the two cutting lines 3y are not detected, for example, when only one cutting line 3y is detected because two packaging bags 1 are arranged across the arrangement unit 15, the detection unit 27 performs the cutting line detection step again after the conveying unit 14 conveys the packaging bag continuous body 3 a little and adjusts the position of the packaging bag continuous body 3. Then, until the detection unit 27 detects the positions of the two cutting lines 3y in the shooting target portion 3x, the conveying operation for position adjustment of the conveying unit 14 and the cutting line detection step are repeated.

[0181] When the detection unit 27 detects two cutting lines 3y in the imaging target portion 3x, it calculates the interval between the cutting lines 3y and sends the calculated result to the control unit 21. The control unit 21 controls the conveying unit 14 in the subsequent conveying operation of the conveying unit 14 to convey the continuous package bag body 3 by a conveying amount corresponding to the calculated value of the interval between the cutting lines 3y. Thus, after each conveying operation is performed, the package bags 1 in the continuous package bag body 3 are correctly arranged one by one in the arrangement unit 15.

[0182] In addition, while the transport unit 14 is stopped, the determination unit 25 determines whether the medicines packaged in each package bag 1 in the package bag continuous body 3 are correctly packaged according to the prescription conditions through the above-mentioned determination process sequence (S022). In the determination process, the determination unit 25 accesses the database DB of the database server 70 and reads the main image corresponding to the prescription conditions (specifically, the type of medicine) determined in the previous step S020. Then, the determination unit 25 uses the pre-processed image and the main image to determine whether the type and number of medicines packaged in the package bag 1 arranged in the arrangement unit 15 are in accordance with the prescription conditions.

[0183] Until the determination of the medicine in each package bag 1 in the package bag continuous body 3 is completed, each time the package bag 1 arranged in the arrangement unit 15 is switched, a series of steps S013 to S022 ( S023 ) from the conveying operation to the determination flow described above are repeatedly performed.

[0184] In addition, Fig.18 In the illustrated flow, the cutting line detection step S021 is repeatedly performed every time the packaging bag 1 arranged in the arrangement section 15 is switched. However, the cutting line detection step S021 may be performed only at the first time and omitted thereafter.

[0185] The determination unit 25 performs the above determination on the medicines in the packaging bags 1 in the continuous packaging bag body 3 , and when all determinations are completed, displays text information indicating the results (determination results) on the display ( S024 ).

[0186] In addition, regarding the judgment results displayed on the display, as long as it is clear that the judgment result is for which packaging bag 1 in the packaging bag continuum 3 the medicine is contained, the judgment result can be switched and displayed according to the packaging bag 1, or the judgment result of each packaging bag 1 in the packaging bag continuum 3 can be displayed in a summarized manner by establishing a correspondence with the position or order of the packaging bag 1.

[0187] Then, the packaging bag continuum 3 reaches the discharge portion of the shell 13 of the device main body 11 through the conveying action of the conveying unit 14. When the packaging bag 1 located at the end side of the packaging bag continuum 3 (the packaging bag 1 located at the upstream side in the conveying direction) is discharged to the outside of the shell 13, the basic action of the drug identification device 10 is completed.

[0188] <<Regarding the effectiveness of the drug determination device according to the present embodiment>>

[0189] As described above, the drug determination device 10 and the detection method of the boundary concave portion (specifically, the detection method of the cutoff line 3y) according to the present embodiment detect the cutoff line 3y in the imaging target portion 3x using the image of the imaging target portion 3x captured by the image capturing unit 16 under changed imaging conditions. As a result, the formation position of the cutoff line 3y in the packaging bag continuous body 3 can be appropriately detected. As a result, when the suitability of the drug is determined (reviewed) individually for each packaging bag 1 in the packaging bag continuous body 3, the imaging area in the packaging bag continuous body 3 can be accurately demarcated. In this regard, the drug determination device and the detection method of the boundary concave portion of the present invention have more advantageous effects than the techniques described in Patent Documents 1 to 4.

[0190] To explain in more detail, as described in the section of the background technology, the cut line 3y is relatively small and easily crushed, so the cut line 3y in the image is not clear and difficult to detect. In addition, when the cut line 3y is detected by irradiating light to the formation position of the cut line 3y in the packaging bag continuous body 3 and taking an image near the cut line 3y, as described above, a pseudo cut line 3r is found near the cut line 3y, and there is a possibility that the pseudo cut line 3r is mistaken for the cut line 3y. For this reason, in the techniques described in Patent Documents 1 to 4, the cut line 3y is not detected itself, but the part near the cut line 3y or the candidate of the cut line 3y is detected, thereby indirectly detecting the cut line 3y.

[0191] Specifically, in the technology described in Patent Document 1, the different scattering properties of light passing through the packaging paper between the heat-sealed portion and the non-sealed portion are utilized to detect the package end by making the background image of the illuminated side appear only at the package end.

[0192] In the technology described in Patent Document 2, a combination of upstream boundary candidates and downstream boundary candidates in which the derived value of the length of the audit object, i.e., the sub-bag, is close to a predetermined value is regarded as the boundary position of the audit object, i.e., located on the upstream and downstream sides of the sub-bag.

[0193] In the techniques described in Patent Documents 3 and 4, the edge region is recognized based on the interval between longitudinal edges longer than a predetermined length, and the center of the edge region is used as the boundary position between the longitudinal sealed portions.

[0194] In contrast, in the drug identification device 10 according to the present embodiment, the image of the object portion 3x where the cut line 3y is located in the packaging bag continuous body 3 is captured multiple times by changing the shooting conditions, and the pseudo cut line 3r can be removed from the image by using the multiple captured images captured by changing the shooting conditions. For this reason, the cut line 3y can be directly detected from the captured images. In addition, when using the technology described in Patent Document 1, since it is necessary to make the light scattering properties different between the heat-sealed portion and the non-sealed portion, the drug identification device 10 according to the present embodiment can also be used for the packaging bag continuous body 3 that does not have such a property.

[0195] In addition, in order to utilize the technology described in Patent Document 2, a predetermined value of the length of the audit object, i.e., the sub-package bag, is required, and it cannot be utilized when the predetermined value is unknown. In addition, in the technology described in Patent Document 2, there are multiple candidates whose derived values ​​of the length of the audit object, i.e., the sub-package bag, are close to the predetermined value among the combination candidates of the upstream boundary candidates and the downstream boundary candidates. In such a case, it is difficult to determine the boundary position from the boundary candidates. In contrast, the drug determination device 10 involved in this embodiment does not require the aforementioned predetermined value, and can detect the cutting line 3y more simply and accurately with limited (few) boundary candidates.

[0196] In addition, in the techniques described in Patent Documents 3 and 4, the boundary position is determined on the premise that the boundary position of the package exists at the center of the edge region, but when, for example, the cutting line is provided at a position deviated from the center of the edge region, it is difficult to accurately detect the position of the cutting line. In contrast, the drug determination device 10 according to the present embodiment can detect the cutting line 3y itself as described above, and thus can more accurately detect the cutting line 3y.

[0197] <<Other Implementation Methods>>

[0198] The above description has been given of a specific example of the drug determination device and the detection method of the boundary concave portion of the present invention, but the above embodiment is only an example, and other embodiments are also conceivable. For example, in the above embodiment, the case where a plurality of drugs are packaged in each packaging bag 1 (except the empty bag 1A) in the packaging bag continuous body 3 is given as an example, but the present invention is not limited to this. The number of drugs packaged in each packaging bag 1 can be arbitrarily set, and can be only one, or can be two or more.

[0199] In the above-mentioned embodiment, the medicine determination device 10w is used as an example to determine whether the medicine packaged in the packaging bag 1 is suitable when the pharmacist prescribes the medicine to the patient. However, the use of the medicine determination device 10 is not limited to the above-mentioned use. When a patient brings medicine in the packaging bag 1 when admitted to a hospital or other facility, the medicine determination device 10 can be used for the purpose of allowing the staff of the facility to grasp the type and quantity (strictly speaking, the quantity by type) of the self-brought medicine.

[0200] Explanation of symbols

[0201] 1 Packaging bag

[0202] 1A Empty Bag

[0203] 3. Bag continuum

[0204] 3r Pseudo cut-off line

[0205] 3x Part of the subject

[0206] 3y Cutting line

[0207] 10 Drug determination device

[0208] 11 Device body

[0209] 11a Drive control circuit

[0210] 12 Processing device

[0211] 13. Housing

[0212] 13a Introduction

[0213] 14 Transportation Department

[0214] 14a, 14b Flattening rollers

[0215] 15 Configuration Department

[0216] 16 Image capture unit

[0217] 16a First Camera

[0218] 16b Second Camera

[0219] 17 Light irradiation part

[0220] 17a First light emitting unit

[0221] 17b Second light emitting unit

[0222] 17c The third light emitting part

[0223] 17d Fourth light emitting part

[0224] 18 Transportation Road

[0225] 21 Control Department

[0226] 22 Prescription Condition Information Acquisition Department

[0227] 23 Image acquisition unit

[0228] 24 Pre-processing unit

[0229] 25 Judgment Department

[0230] 27 Detection Department

[0231] 28 Remove the processing execution unit

[0232] 50 Prescription condition input device

[0233] 55 Pharmacy Shed

[0234] 60 charter flights

[0235] 70 Database Server

[0236] DB database

[0237] f Pharmacy

[0238] Jb lower surface image

[0239] Ji comprehensive image

[0240] Js upper surface image

[0241] NJb lower surface image after removal

[0242] Image of the upper surface after NJs removal

[0243] X-Pharmacy Extraction Image

Claims

1. A drug determination device, characterized in that: have: a detection unit that detects a boundary concave portion formed at a boundary position between a plurality of strip-shaped packaging bags containing medicines arranged side by side in a continuous body of packaging bags; and an image capturing unit that captures images of the surface of at least a portion of the continuous packaging bag body where the boundary recessed portion is located a plurality of times by changing the capturing conditions while irradiating light onto the surface of the portion of the continuous packaging bag body where the boundary recessed portion is located. The detection section detects the boundary concave portion by detecting the boundary concave portion itself in the imaging target portion based on a plurality of images captured by the image capturing section while changing the imaging condition, thereby detecting the boundary concave portion.

2. The drug determination device according to claim 1, wherein: The medicine determination device comprises: a light irradiation unit for irradiating light toward the surface of the object portion when the image capturing unit captures an image, The light irradiation unit includes a first light emitting unit and a second light emitting unit that emit light in opposite directions in the long side direction of the continuous packaging bag body, and irradiates light from an oblique direction toward the surface of the photographed object portion. The image capturing section captures an image in a state where the capturing object portion is located between the first light emitting section and the second light emitting section in the long side direction. The light irradiation unit changes the light emitting unit used for irradiating light between the first light emitting unit and the second light emitting unit whenever the imaging condition is changed.

3. The drug determination device according to claim 2, characterized in that: The image capturing unit captures a first image of the surface of the photographing object portion during a period when the light irradiation unit uses the first light emitting unit to irradiate light onto the surface of the photographing object portion, and captures a second image of the surface of the photographing object portion during a period when the light irradiation unit uses the second light emitting unit to irradiate light onto the surface of the photographing object portion, The detection unit detects the boundary concave portion in the imaging object portion using the first image and the second image.

4. The drug determination device according to claim 3, characterized in that: While the light irradiation unit irradiates light onto the surface of the object portion using the first light emitting unit, the second light emitting unit stops emitting light, While the light irradiation unit irradiates the surface of the object portion with light using the second light emitting unit, the light emission of the first light emitting unit is stopped.

5. The drug determination device according to claim 4, characterized in that: The detection unit synthesizes a portion of the first image that is an area farther away from the first light-emitting unit in the portion of the photographed object and a portion of the second image that is an area farther away from the second light-emitting unit in the portion of the photographed object to create a composite image, and detects the boundary recess in the portion of the photographed object based on the composite image.

6. The drug determination device according to claim 1, wherein: The image capturing unit includes a first camera and a second camera that capture images of the capture target portion from opposite directions in the thickness direction of the continuous packaging bag body. The first camera captures an image of a surface of the photographing object portion in the thickness direction, The second camera captures an image of another surface of the photographing object portion located on the opposite side of the one surface in the thickness direction, The detection section detects the boundary concave portion in the imaging object portion based on the image captured by the first camera and the image captured by the second camera.

7. The drug determination device according to claim 6, characterized in that: After determining the candidates for the boundary concave portion captured in the image taken by the first camera and determining the candidates for the boundary concave portion captured in the image taken by the second camera, the detection unit detects the candidates for the boundary concave portion captured in both the image taken by the first camera and the image taken by the second camera as the boundary concave portion in the captured object portion.

8. The drug identification device according to any one of claims 1 to 7, wherein: packaging a medicine in the packaging bag in the packaging bag continuum, The image capturing unit changes the capturing conditions a plurality of times to capture images of at least an end portion of the packaging bag that packages the medicine and a surface of the capturing target portion where the boundary recess adjacent to the end portion is located.

9. The drug determination device according to claim 8, characterized in that: The packaging bag is light-transmissive. The image capturing unit changes the capturing conditions to capture multiple images of at least the portion of the packaging bag that packages the medicine that covers the medicine, the end, and the surface of the capturing target portion where the boundary recess adjacent to the end is located. The medicine determination device comprises: A removal processing execution unit executes a removal processing for removing an image of a medicine from each of the plurality of images captured by changing the imaging conditions.

10. The drug determination device according to claim 9, characterized in that: The removal processing execution unit performs the removal processing for removing the image of the drug in the image by removing the shrunk and expanded image obtained by shrinking and expanding the pixel group constituting the image captured by the image capturing unit in at least one direction from the image before the shrunk and expanded image.

11. The drug determination device according to any one of claims 1 to 7, 9 and 10, wherein: The boundary recess is a cutting line including a dotted linear groove formed in the lateral width direction of the continuous packaging bag body from one end to the other end of the continuous packaging bag body.

12. A method for detecting a boundary concave portion, comprising: detecting a boundary concave portion formed at a boundary position between a plurality of strip-shaped packaging bags containing medicines arranged side by side; The method for detecting a concave boundary portion is characterized by comprising the following steps: In a state where light is irradiated onto a surface of at least a portion of the continuous packaging bag body where the boundary recessed portion is located, changing photographing conditions to photograph the surface of the portion a plurality of times; The boundary concave portion is detected by detecting the boundary concave portion itself in the photographing object portion based on a plurality of images photographed with photographing conditions changed.

Citation Information

Patent Citations

  • Handotaikisoseichoho

    JP1976096285A

  • Tablet counting and monitoring apparatus

    JP2006334062A

  • Medicine checking device and apparatus for separately packaging medicines

    JP2013144101A

  • Medicinal agent inspection system, winding device, feed device, and holder

    JP2017047975A

  • Medicinal agent inspection system, winding device, feed device, and holder

    CN105188637A