JP2019124518A - Tablet inspection method and tablet inspection device - Google Patents
Tablet inspection method and tablet inspection device Download PDFInfo
- Publication number
- JP2019124518A JP2019124518A JP2018004206A JP2018004206A JP2019124518A JP 2019124518 A JP2019124518 A JP 2019124518A JP 2018004206 A JP2018004206 A JP 2018004206A JP 2018004206 A JP2018004206 A JP 2018004206A JP 2019124518 A JP2019124518 A JP 2019124518A
- Authority
- JP
- Japan
- Prior art keywords
- tablet
- edge
- images
- main surface
- area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
Abstract
Description
この発明は、錠剤検査方法および錠剤検査装置に関し、特に錠剤を撮像するカメラを用いた検査技術に関する。 The present invention relates to a tablet inspection method and a tablet inspection apparatus, and more particularly to an inspection technique using a camera for imaging a tablet.
従来から錠剤の外観を検査する錠剤検査装置が提案されている(例えば特許文献1)。特許文献1では、検査装置は、錠剤を搬送するコンベアと、搬送中の錠剤を撮像するための撮像装置を備えている。撮像装置は、上側から見た錠剤の上面、および、四方から見た錠剤の側面を一つの撮像画像内に収めるように撮像する。
Conventionally, a tablet inspection apparatus for inspecting the appearance of a tablet has been proposed (for example, Patent Document 1). In
具体的には、この撮像装置は一つのカメラと4つのプリズムとを備えている。カメラは錠剤の上側に配置されており、錠剤の上面からの光がレンズ等を介してカメラの撮像面に結像される。またプリズムは錠剤の四方に配置されており、錠剤の側面からの光をカメラへと反射させる。当該光もレンズ等を介してカメラの撮像面に結像される。これにより、カメラは5方向から見た錠剤の外観を撮像できる。検査装置は、カメラによって撮像された撮像画像に対して画像処理を行うことにより、錠剤の外観検査を行う。 Specifically, the imaging device includes one camera and four prisms. The camera is disposed on the upper side of the tablet, and light from the upper surface of the tablet is imaged on the imaging surface of the camera through a lens or the like. Also, the prisms are arranged in the four sides of the tablet and reflect light from the side of the tablet to the camera. The light is also imaged on the imaging surface of the camera via a lens or the like. Thereby, the camera can image the external appearance of the tablet seen from five directions. The inspection apparatus performs an appearance inspection of a tablet by performing image processing on a captured image captured by a camera.
ごみ等の異物が撮像装置の内部に進入し、例えばレンズ等に付着することがある。この場合、実際には錠剤に欠陥が生じていなくても、撮像画像において当該異物が錠剤と重なって写る場合がある。この場合、当該異物が欠陥として誤検出される。 Foreign matter such as dust may enter the inside of the imaging device and adhere to, for example, a lens or the like. In this case, even if the tablet does not actually have a defect, the foreign matter may overlap with the tablet in the captured image. In this case, the foreign matter is erroneously detected as a defect.
またカメラの撮像面を構成する複数の受光素子のうちいくつかが故障することもある。故障した受光素子に対応する画素の画素値は正常値を示さずに例えば零となる。この画素が撮像画像において錠剤の内部に位置している場合には、実際には錠剤に欠陥が生じていなくても、当該画素が欠陥として誤検出される。 In addition, some of the plurality of light receiving elements constituting the imaging surface of the camera may fail. The pixel value of the pixel corresponding to the malfunctioning light receiving element is, for example, zero without indicating a normal value. When this pixel is located inside the tablet in the captured image, the pixel is erroneously detected as a defect even if the tablet does not actually have a defect.
そこで、本発明は、欠陥の誤検出を抑制できる錠剤検査方法および錠剤検査装置を提供することを目的とする。 Then, an object of this invention is to provide the tablet inspection method and tablet inspection apparatus which can suppress the misdetection of a defect.
錠剤検査方法の第1の態様は、錠剤の外観を検査する錠剤検査方法であって、錠剤を撮像して、複数の撮像方向から見た錠剤の外観がそれぞれ写る複数の画像を含む撮像画像を生成する工程(a)と、錠剤の欠陥候補を検出する検査処理を、前記撮像画像に対して行う工程(b)と、前記検査処理によって、前記複数の画像に写る前記錠剤の第1領域において、前記複数の画像のうち2以上の画像で共通の欠陥候補が検出されたときに、前記錠剤に欠陥が生じていると判断する工程(c)とを備える。 A first aspect of the tablet inspection method is a tablet inspection method for inspecting the appearance of a tablet, which is an image of a tablet, and a captured image including a plurality of images in which the appearance of the tablet viewed from a plurality of imaging directions is captured. Step (a) of generating, Step (b) of performing inspection processing on the captured image for detecting a defect candidate of the tablet, and the first region of the tablet reflected in the plurality of images by the inspection processing And (c) determining that the tablet has a defect when a common defect candidate is detected in two or more of the plurality of images.
錠剤検査方法の第2の態様は、第1の態様にかかる錠剤検査方法であって、前記錠剤の第2領域は前記複数の画像のうちn(nは2以上の整数)個の画像のみに写っており、前記検査処理によって、前記n個の画像のうち2以上の画像で共通の欠陥候補が前記第2領域において検出されたときに、前記錠剤に欠陥が生じていると判断する工程(d)を更に備える。 A second aspect of the tablet inspection method is the tablet inspection method according to the first aspect, wherein the second region of the tablet is formed only on n (n is an integer of 2 or more) of the plurality of images. A step of determining that the tablet has a defect when a defect candidate common to two or more of the n images is detected in the second region by the inspection process and d).
錠剤検査方法の第3の態様は、第1または第2の態様にかかる錠剤検査方法であって、前記錠剤の第3領域は前記複数の画像のうち1つの画像のみに写っており、前記検査処理によって、前記1つの画像の前記第3領域において欠陥候補が検出されたときに、前記錠剤に欠陥が生じていると判断する工程(f)を更に備える。 A third aspect of the tablet inspection method is the tablet inspection method according to the first or second aspect, wherein the third region of the tablet is shown in only one of the plurality of images, and the inspection The method further includes the step (f) of determining that the tablet has a defect when a defect candidate is detected in the third region of the one image by the processing.
錠剤検査方法の第4の態様は、第1から第3のいずれか一つの態様にかかる錠剤検査方法であって、前記検査処理の検査対象とならないマスク領域が前記複数の画像ごとに設定され、前記錠剤の第4領域は前記複数の画像のうちm(2以上の整数)個の画像のみにおいて前記マスク領域以外の検査対象領域に写っており、前記工程(c)において、前記検査処理によって、前記m個の画像のうち2以上の画像で共通の欠陥候補が前記第4領域において検出されたときに、前記錠剤に欠陥が生じていると判断する。 A fourth aspect of the tablet inspection method is the tablet inspection method according to any one of the first to third aspects, wherein a mask area not to be inspected in the inspection process is set for each of the plurality of images, The fourth region of the tablet is copied to an inspection target region other than the mask region in only m (an integer of 2 or more) images among the plurality of images, and in the step (c), the inspection process is performed. When a common defect candidate is detected in the fourth area among two or more of the m images, it is determined that the tablet has a defect.
錠剤検査方法の第5の態様は、第4の態様にかかる錠剤検査方法であって、前記複数の画像のそれぞれにおいて、前記錠剤に対する光の正反射によって画素値が他の領域よりも所定値以上高くなる領域を含む領域が前記マスク領域に設定される。 A fifth aspect of the tablet inspection method is the tablet inspection method according to the fourth aspect, in each of the plurality of images, a pixel value is equal to or more than a predetermined value than other regions due to specular reflection of light to the tablet An area including an area to be raised is set as the mask area.
錠剤検査方法の第6の態様は、第4または第5の態様にかかる錠剤検査方法であって、前記錠剤は、前記第1領域たる第1主面と、前記第1主面と対面する第2主面と、前記第1主面の周縁および前記第2主面の周縁を連結する側面とを有し、前記複数の画像のそれぞれにおいて前記錠剤の側面が占める側面領域の両側に位置する端領域が前記マスク領域に設定される。 A sixth aspect of the tablet inspection method is the tablet inspection method according to the fourth or fifth aspect, wherein the tablet has a first main surface, which is the first region, and a first surface facing the first main surface. An end having two main surfaces and a side surface connecting the peripheral edge of the first main surface and the peripheral edge of the second main surface, and located on both sides of a side surface area occupied by the side surface of the tablet in each of the plurality of images. An area is set to the mask area.
錠剤検査方法の第7の態様は、第1から第6のいずれか一つの態様にかかる錠剤検査方法であって、前記錠剤は、前記第1領域たる第1主面と、前記第1主面と対面する第2主面と、前記第1主面の周縁および前記第2主面の周縁を連結する側面とを有し、前記工程(b)は、前記複数の画像の各々において、前記錠剤の前記第1主面が示す主面領域の輪郭に対応した主面エッジを特定する工程(b1)と、前記複数の画像の各々において、前記主面領域の輪郭の形状として予め決められた関数に基づいて、前記主面エッジの近似線を前記主面領域の輪郭として求める工程(b2)と、前記複数の画像の各々において欠陥候補を検出する工程(b3)とを有し、前記工程(c)において、前記主面領域に対する各画素の位置の前記複数の画像の相互間における対応関係に基づいて、前記工程(b3)で検出された欠陥候補が前記2以上の画像において共通するのか否かを判断する。 A seventh aspect of the tablet inspection method is the tablet inspection method according to any one of the first to sixth aspects, wherein the tablet has a first main surface which is the first region, and the first main surface. And a side surface connecting the periphery of the first main surface and the periphery of the second main surface, wherein the step (b) includes, in each of the plurality of images, the tablet Identifying a main surface edge corresponding to the outline of the main surface area indicated by the first main surface, and a function predetermined as the shape of the outline of the main surface area in each of the plurality of images (B2) of obtaining an approximate line of the main surface edge as the contour of the main surface region based on the step (b3) of detecting a defect candidate in each of the plurality of images; In c), the plurality of images of the position of each pixel with respect to the main surface area Based on the correspondence relationship between each other, the detected defect candidates in the step (b3) to determine whether common to the two or more images.
錠剤検査方法の第8の態様は、第7の態様にかかる錠剤検査方法であって、前記錠剤の前記第1主面は平面視で略円形状を有しており、前記関数は楕円を示す関数であり、前記近似線は楕円である。 An eighth aspect of the tablet inspection method is the tablet inspection method according to the seventh aspect, wherein the first main surface of the tablet has a substantially circular shape in plan view, and the function shows an ellipse It is a function and the approximation line is an ellipse.
錠剤検査方法の第9の態様は、第7または第8の態様にかかる錠剤検査方法であって、前記錠剤は略円盤形状を有しており、前記複数の画像の各々において、前記錠剤の側面が占める側面領域と、前記主面領域とは錠剤領域を構成しており、前記複数の画像の各々を検査画像と呼ぶと、前記工程(b1)は、前記検査画像に対してエッジ検出処理を行ってエッジ画像を生成する工程(b11)と、前記検査画像において前記錠剤領域の輪郭に対応する錠剤エッジを、前記エッジ画像から特定する工程(b12)と、前記検査画像において前記第1主面の周縁のうち前記錠剤領域の輪郭の一部となる部分、および、前記検査画像における前記第2主面の周縁にそれぞれ対応する主面外側エッジおよび側面外側エッジを、前記錠剤エッジから抽出する工程(b13)と、前記エッジ画像において、前記側面外側エッジから所定方向に沿って所定距離はなれた探索領域内の画素を探索して、前記主面領域と前記側面領域との間の境界に対応する境界エッジを特定する工程(b14)と、前記主面外側エッジおよび前記境界エッジの一組を前記主面エッジとして特定する工程(b14)とを備える。 A ninth aspect of the tablet inspection method is the tablet inspection method according to the seventh or eighth aspect, wherein the tablet has a substantially disc shape, and the side surface of the tablet in each of the plurality of images. The side surface area occupied by and the main surface area constitute a tablet area, and when each of the plurality of images is referred to as an inspection image, the step (b1) performs an edge detection process on the inspection image. A step (b11) of performing the edge image generation, and a step (b12) of specifying a tablet edge corresponding to the contour of the tablet area in the inspection image from the edge image; and the first main surface in the inspection image A part of the periphery of the tablet that is a part of the outline of the tablet area, and a main surface outer edge and a side surface outer edge respectively corresponding to the periphery of the second main surface in the inspection image from the tablet edge And (b13) in the edge image, searching for pixels in a search area at a predetermined distance from the side outer edge along the predetermined direction, and at the boundary between the main area and the side area. A step (b14) of identifying a corresponding boundary edge, and a step (b14) of identifying one set of the main surface outer edge and the boundary edge as the main surface edge.
錠剤検査方法の第10の態様は、第9の態様にかかる錠剤検査方法であって、前記工程(b14)では、前記エッジ画像の前記探索領域内の画素であって、当該画素に対応する前記検査画像の画素の画素値が所定閾値よりも大きな画素を探索して、前記境界エッジを特定する。 A tenth aspect of the tablet inspection method is the tablet inspection method according to the ninth aspect, wherein, in the step (b14), the pixel in the search area of the edge image, which corresponds to the pixel The boundary edge is identified by searching for a pixel whose pixel value of the pixel of the inspection image is larger than a predetermined threshold.
錠剤検査方法の第11の態様は、第9または第10の態様にかかる錠剤検査方法であって、前記工程(b14)では、前記探索領域において、前記側面外側エッジから前記主面外側エッジへ向かって画素を探索して、前記境界エッジを特定する。 An eleventh aspect of the tablet inspection method is the tablet inspection method according to the ninth or tenth aspect, wherein, in the step (b14), in the search area, the side outer edge is moved from the side outer edge toward the main surface outer edge The pixel is searched to identify the boundary edge.
錠剤検査装置の第12の態様は、錠剤の外観を検査する錠剤検査装置であって、錠剤を撮像して、複数の撮像方向から見た錠剤の外観がそれぞれ写る複数の画像を含む撮像画像を生成する撮像部と、画像処理部とを備え、前記画像処理部は、錠剤の欠陥候補を検出する検査処理を、前記撮像画像に対して行う工程と、前記検査処理によって、前記複数の画像に写る前記錠剤の第1領域において、前記複数の画像のうち2以上の画像で共通の欠陥候補が検出されたときに、前記錠剤に欠陥が生じていると判断する工程とを実行する。 A twelfth aspect of the tablet inspection apparatus is the tablet inspection apparatus for inspecting the appearance of a tablet, which is an image of a tablet, and a captured image including a plurality of images in which the appearance of the tablet viewed from a plurality of imaging directions is captured. The image processing unit includes an imaging unit to generate and an image processing unit, and the image processing unit performs an inspection process for detecting a defect candidate of a tablet on the captured image, and the inspection process generates the plurality of images. In the first region of the tablet to be photographed, when a common defect candidate is detected in two or more of the plurality of images, it is determined that the tablet has a defect.
錠剤検査方法の第1の態様および錠剤検査装置の第12の態様によれば、2以上の画像で共通の欠陥候補を検出したときに、錠剤に欠陥が生じていると判断しているので、欠陥検出時の虚報を抑制できる。 According to the first aspect of the tablet inspection method and the twelfth aspect of the tablet inspection apparatus, it is determined that the tablet has a defect when a common defect candidate is detected in two or more images. It is possible to suppress false reports at the time of defect detection.
錠剤検査方法の第2の態様によれば、極まれな虚報をさらに抑制できる。 According to the second aspect of the tablet inspection method, it is possible to further suppress the rare false alarm.
錠剤検査方法の第3の態様によれば、第3領域内の欠陥を検出できる。 According to the third aspect of the tablet inspection method, defects in the third area can be detected.
錠剤検査方法の第4の態様によれば、第4領域における欠陥を適切に検出できる。 According to the fourth aspect of the tablet inspection method, defects in the fourth area can be appropriately detected.
錠剤検査方法の第5の態様によれば、錠剤上の光の強弱を欠陥と誤検出することを回避できる。 According to the fifth aspect of the tablet inspection method, it is possible to avoid false detection of the light intensity on the tablet as a defect.
錠剤検査方法の第6の態様によれば、欠陥の検出が困難な側面領域の端領域をマスク領域に設定するので、端領域における欠陥候補の誤検出あるいは検出漏れによる欠陥検出への影響を回避できる。 According to the sixth aspect of the tablet inspection method, since the end area of the side area where the detection of defects is difficult is set as the mask area, the influence on the defect detection due to the false detection or defect detection of the defect candidate in the end area is avoided. it can.
錠剤検査方法の第7の態様によれば、主面領域の輪郭の形状として予め決められた関数に基づいて主面領域の輪郭を求めているので、主面領域の特定精度が高い。これによれば、主面領域の各画素の2以上の画像の相互間の対応関係の精度を向上でき、工程(c)の判断精度を向上できる。 According to the seventh aspect of the tablet inspection method, since the outline of the main surface area is obtained based on a function determined in advance as the shape of the outline of the main surface area, the accuracy of specifying the main surface area is high. According to this, it is possible to improve the accuracy of the correspondence between the two or more images of the pixels in the main surface area, and to improve the determination accuracy of the step (c).
錠剤検査方法の第8の態様によれば、錠剤の形状に応じて適切な関数を採用しているので、高い精度で主面を特定できる。 According to the eighth aspect of the tablet inspection method, since the appropriate function is adopted according to the shape of the tablet, the main surface can be identified with high accuracy.
錠剤検査方法の第9の態様によれば、主面エッジを適切に得ることができる。 According to the ninth aspect of the tablet inspection method, the main surface edge can be appropriately obtained.
錠剤検査方法の第10の態様によれば、複数の画像の各々において主面領域をより高い精度で特定できる。 According to the tenth aspect of the tablet inspection method, the main surface area can be identified with higher accuracy in each of the plurality of images.
錠剤検査方法の第11の態様によれば、錠剤の主面に割線が形成されていたとしても、当該割線に対応するエッジを境界エッジとして誤検出することを回避できる。 According to the eleventh aspect of the tablet inspection method, even if a dividing line is formed on the main surface of the tablet, it is possible to avoid erroneous detection of an edge corresponding to the dividing line as a boundary edge.
以下、図面を参照しつつ実施の形態について詳細に説明する。図面においては、理解容易の目的で、必要に応じて各部の寸法や数を誇張または簡略化して描いている。なお、図面においては同様な構成及び機能を有する部分については同じ符号が付されており、下記説明では重複説明が省略される。また各図において、構成要素の方向関係を明確にするため、Z軸方向を鉛直方向とし、XY平面を水平面とするXYZ直交座標系を適宜付している。 Hereinafter, embodiments will be described in detail with reference to the drawings. In the drawings, for the purpose of easy understanding, the dimensions and the numbers of the respective parts are drawn in an exaggerated or simplified manner as necessary. In the drawings, parts having similar configurations and functions are denoted by the same reference numerals, and redundant description will be omitted in the following description. Further, in each drawing, in order to clarify the directional relationship of the components, an XYZ orthogonal coordinate system in which the Z-axis direction is a vertical direction and the XY plane is a horizontal plane is appropriately attached.
第1の実施の形態.
図1は、錠剤印刷装置10の構成の一例を概略的に示す図である。錠剤印刷装置10は錠剤検査装置1と印刷ヘッド6とを備えている。
First Embodiment
FIG. 1 is a view schematically showing an example of the configuration of a
錠剤検査装置1は錠剤9の外観を検査する装置である。図2は、錠剤9の一例を概略的に示す斜視図である。図2の例では、錠剤9は略円盤形状を有しており、一対の主面9a,9bと側面9cとを備えている。例えばこの円盤形状として、いわゆる平錠またはR付き錠を採用できる。主面9a,9bは互いに対面しており、平面視において略同一の円形状を有する。この主面9a,9bの一方および他方はそれぞれ表面および裏面と呼ばれることがあり、また上面および下面と呼ばれることもある。
The
図2の例示では、錠剤9の主面9aの周縁および側面9cは角部を形成しながら互いに連結されており、主面9bの周縁および側面9cも角部を形成しながら互いに連結されている。錠剤9の直径は例えば5[mm]程度〜10数[mm]程度に設定され、その厚みは例えば5[mm]程度以下に設定され得る。
In the example of FIG. 2, the peripheral edge and
図2に例示するように、錠剤9の主面9aには割線91が形成されていてもよい。割線91は主面9aの中心を通って主面9aの端から端まで直線状に延びる溝である。また主面9bにも同様の割線が形成されていてもよい。
As exemplified in FIG. 2, a
図1を参照して、錠剤検査装置1はホッパー2と搬送ドラム3と搬送部4と撮像ヘッド5と選別部7と制御部8とを備えている。
Referring to FIG. 1,
ホッパー2は、錠剤9を錠剤印刷装置10内に投入するための投入部である。このホッパー2は、錠剤印刷装置10の筐体(図示省略)の天井部上側に設けられている。ホッパー2から投入された錠剤9は搬送ドラム3に導かれる。なお、ホッパー2を除く他の要素は錠剤印刷装置10の筐体の内部に設けられている。
The
搬送ドラム3は略円柱状の形状を有しており、その中心軸がY軸方向に沿う姿勢で配置されている。搬送ドラム3は図示省略の回転駆動モータによって当該中心軸を回転中心として図1の紙面上で反時計回りに回転される。この回転駆動モータは例えば制御部8によって制御される。
The transport drum 3 has a substantially cylindrical shape, and the central axis of the transport drum 3 is disposed along the Y-axis direction. The transport drum 3 is rotated counterclockwise on the paper surface of FIG. The rotation drive motor is controlled by, for example, the
搬送ドラム3の外周面には複数の吸着孔(不図示)が周方向に沿って並んで形成されている。複数の吸着孔のそれぞれは搬送ドラム3の内部に設けられた吸引機構(図示省略)と連通している。この吸引機構は例えば制御部8によって制御される。この吸引機構を作動させることによって複数の吸着孔のそれぞれに大気圧よりも低い負圧を作用させることができる。これにより、搬送ドラム3の各吸着孔は1個の錠剤9を吸着保持することができる。
A plurality of suction holes (not shown) are formed along the circumferential direction on the outer peripheral surface of the transport drum 3. Each of the plurality of suction holes is in communication with a suction mechanism (not shown) provided inside the conveyance drum 3. The suction mechanism is controlled by, for example, the
搬送部4は搬送ドラム3の下方に配置されている。搬送ドラム3の外周面に吸着保持された錠剤9は搬送ドラム3の回転に伴って周方向に移動する。錠剤9が搬送ドラム3の下方側まで移動したときに吸引機構が錠剤9に対する吸着を解除することにより、錠剤9が落下して搬送部4へと受け渡される。
The transport unit 4 is disposed below the transport drum 3. The
搬送部4は錠剤9を搬送する。図1の例では、搬送部4はベルトコンベアであって、搬送ベルト41と一対のプーリ42とを備えている。一対のプーリ42は例えばX軸方向において間隔を空けて配置されており、自身の中心軸がY軸方向に沿う姿勢で配置されている。一対のプーリ42はそれぞれ自身の中心軸を回転中心として回転する。
The transport unit 4 transports the
搬送ベルト41は一対のプーリ42に掛け渡されている。一対のプーリ42の少なくともいずれか一方が図示省略の駆動モータによって回転駆動されることにより、搬送ベルト41が図1の矢印にて示す向きに回走する。この駆動モータは例えば制御部8によって制御される。
The
搬送ベルト41の外周面にも、図示省略の複数の吸着孔がその周方向に沿って並んで形成されている。複数の吸着孔のそれぞれは搬送ベルト41の内部に設けられた吸引機構(図示省略)と連通している。この吸引機構は例えば制御部8によって制御される。この吸引機構を作動させることによって複数の吸着孔のそれぞれに大気圧よりも低い負圧を作用させることができる。これにより、搬送ベルト41の各吸着孔は1個の錠剤9を吸着保持することができる。
Also on the outer peripheral surface of the
搬送ベルト41が錠剤9を吸着保持しながら回走することにより、錠剤9はX軸方向に沿って搬送ドラム3から遠ざかる方向に搬送される。
As the
撮像ヘッド5は搬送部4による錠剤9の搬送経路の途中において搬送ドラム3の下流側で、搬送部4と対向する位置に配置されている。この撮像ヘッド5の撮像エリアは搬送ベルト41の一部を含んでいる。撮像ヘッド5は錠剤9がこの撮像エリア内を移動するときに錠剤9を撮像して、撮像画像を生成する。撮像ヘッド5はこの撮像画像を制御部8へ出力する。撮像ヘッド5の具体的な内部構成の一例については後に詳述する。
The
制御部8は、入力された撮像画像に対して画像処理を施すことにより、錠剤9の外観を検査する。制御部8は錠剤9の外観に欠陥が生じている場合にはその錠剤9を不良品と判断し、錠剤9の外観に欠陥が生じていない場合にはその錠剤9を良品と判断する。当該欠陥としては、錠剤9に付着した不純物または錠剤9の形状上の不備(例えば欠け)などの欠陥を例示できる。制御部8による具体的な画像処理の一例については後に詳述する。
The
印刷ヘッド6は錠剤9の搬送途中において撮像ヘッド5の下流側で、搬送ベルト41の上方に配置されている。印刷ヘッド6は例えば制御部8によって制御され、錠剤9に対して印刷処理を行う。印刷ヘッド6は複数の吐出ノズル(図示省略)を備えており、各吐出ノズルからインクジェット方式によってインクの液滴を吐出する。インクジェットの方式は、ピエゾ素子(圧電素子)に電圧を加えて変形させてインクの液滴を吐出するピエゾ方式であっても良いし、ヒータに通電してインクを加熱することによってインクの液滴を吐出するサーマル方式であっても良い。本実施形態においては、錠剤9に印刷処理を行うため、インクとしては食品衛生法で認められている原料によって製造された可食性インクを使用する。
The print head 6 is disposed on the downstream side of the
図1の例では、印刷ヘッド6は撮像ヘッド5よりも搬送経路の下流側に位置しているので、制御部8は錠剤9の検査結果に応じて印刷処理の要否を決定してもよい。より具体的には、外観検査において錠剤9が良品と判断された場合には、制御部8はその錠剤9に対して印刷処理を行うように印刷ヘッド6を制御し、錠剤9が不良品と判断された場合には、その錠剤9に対して印刷処理を行わないように印刷ヘッド6を制御してもよい。これによれば、不要な印刷処理を回避することができる。
In the example of FIG. 1, since the print head 6 is located on the downstream side of the transport path from the
選別部7は外観検査の結果に応じて錠剤9を選別する。例えば選別部7は良品ボックスおよび不良品ボックスを有している。これらのボックスは上方に開口した箱状の形状を有している。良品ボックスは良品と判断された錠剤9を収容し、不良品ボックスは不良品と判断された錠剤9を収容する。例えばこれらのボックスは搬送ベルト41の下方側においてX軸方向に沿って並んで配置されている。制御部8は良品と判断した錠剤9が良品ボックスの開口部の直上に位置するときに、搬送ベルト41内の吸引機構を制御してその錠剤9に対する吸着を解除する。これにより、錠剤9は良品ボックスの内部へと落下して、これに収容される。不良品と判断された錠剤9についても同様にして、不良品ボックスの内部に収容される。
The sorting unit 7 sorts the
制御部8は上述したように各種の構成要素を制御し、また、撮像ヘッド5から入力される撮像画像に対して画像処理を行うことで錠剤9の外観検査を行う。
As described above, the
この制御部8は電子回路機器であって、例えばデータ処理装置および記憶媒体を有していてもよい。データ処理装置は例えばCPU(Central Processor Unit)などの演算処理装置であってもよい。記憶部は非一時的な記憶媒体(例えばROM(Read Only Memory)またはハードディスク)および一時的な記憶媒体(例えばRAM(Random Access Memory))を有していてもよい。非一時的な記憶媒体には、例えば制御部8が実行する処理を規定するプログラムが記憶されていてもよい。処理装置がこのプログラムを実行することにより、制御部8が、プログラムに規定された処理を実行することができる。もちろん、制御部8が実行する処理の一部または全部がハードウェアによって実行されてもよい。
The
<撮像ヘッド>
撮像ヘッド5は複数の撮像方向から搬送途中の錠剤9を撮像する。なお錠剤9はその主面9bが搬送ベルト41側を向く姿勢で搬送ベルト41に吸着保持されることもあれば、その主面9aが搬送ベルト41側を向く姿勢で搬送ベルト41に吸着保持されることもある。以下では、説明の便宜上、錠剤9はその主面9bが搬送ベルト41側を向く姿勢で搬送ベルト41に保持されるものとする。また錠剤9が搬送ベルト41に吸着保持された状態では、側面9cのうち少なくとも主面9a側の一部は、搬送ベルト41から露出している。
<Imaging head>
The
図3および図4は、撮像ヘッド5の内部構成の一例を概略的に示す図である。例えば撮像ヘッド5は検査カメラ51とレンズ群52とミラー53と角錐型ミラー54とを備えている。検査カメラ51は例えばCCD(Charge Coupled Device)イメージセンサまたはCMOS(Complementary Metal Oxide Semiconductor)イメージセンサなどのイメージセンサである。この検査カメラ51は錠剤9の搬送経路の一部とZ軸方向で対向する位置において、その撮像面が搬送ベルト41側を向く姿勢で配置されている。
FIG. 3 and FIG. 4 are diagrams schematically showing an example of the internal configuration of the
ミラー53は、錠剤9の主面9aおよび側面9cからの光を後述する角錐型ミラー54に導くために設けられている。このミラー53の位置を説明するに当たって、便宜的に、錠剤9が検査カメラ51とZ軸方向で向かい合う位置に停止していると仮定する。図3を参照して、ミラー53はZ軸方向において検査カメラ51と錠剤9との間に位置しており、平面視において(つまりZ軸方向に沿って見て)錠剤9よりも外側に配置されている。また、ミラー53は角錐型ミラー54の各面に対向するように配置されている。
The
角錐型ミラー54は、ミラー53で反射した錠剤9の主面9aおよび側面9cからの光を、レンズ群52を介して検査カメラ51の撮像面に導く。角錐型ミラー54は、4つのミラーによって構成されており、各ミラー53と対向するように角錐型ミラー54が配置されている。
The
錠剤9の主面9aおよび側面9cで反射または散乱された光の一部はミラー53の一つに向かって斜め上方へと進み、当該ミラー53で反射し、ミラー53で反射した光は角錐型ミラー54で反射した上で、レンズ群52を介して検査カメラ51の撮像面に結像する。換言すれば、錠剤9の主面9aおよび側面9cから斜め上方に進む光を検査カメラ51の撮像面に向けて反射できるように、ミラー53および角錐型ミラー54の反射面の地面に対する角度が調整されている。
A part of the light reflected or scattered by the
これにより、検査カメラ51は当該ミラー53から見た錠剤9の外観を撮像することができる。つまり、検査カメラ51は実質的に錠剤9を斜め方向から撮像することができ、その撮像画像には、錠剤9の主面9aおよび側面9cの両方が含まれることになる。なお図3では、光の経路の一例が破線で示されている。
Thereby, the
撮像ヘッド5は複数(図4では4つ)のミラー53を備えている。例えば2つのミラー53がX軸方向において間隔を空けて配置されており、残り2つのミラー53がY軸方向において間隔を空けて配置されている。これによれば、錠剤9は平面視において四方をミラー53によって囲まれることになる。さらに、各ミラー53の中央に間隔をあけて角錐型ミラー54が配置されている。各ミラー53で反射された光は角錐型ミラー54でさらに反射され、レンズ群52を介して検査カメラ51の撮像面に結像される。具体的には、4つのミラー53で反射された光は検査カメラ51の撮像面のうち互いに異なる領域に結像される。これにより、撮像ヘッド5は4方向から錠剤9を撮像し、4方向から見た錠剤9の外観が写る複数の画像を含んだ撮像画像を生成する。
The
図5は、撮像画像IM1の一例を概略的に示す図である。撮像画像IM1には、4つの撮像方向から見た錠剤9の外観をそれぞれ写す4つの画像IM11〜IM14が含まれており、これらのいずれにおいても、錠剤9の主面9aおよび側面9cが写っている。ここでは4方向から錠剤9を撮像するので、錠剤9の側面9cを全周に亘って撮像することができる。
FIG. 5 is a diagram schematically illustrating an example of the captured image IM1. The captured image IM1 includes four images IM11 to IM14 that respectively capture the appearance of the
図5の例示では、錠剤9の主面9aの全領域が4つの画像IM11〜IM14(検査画像に相当)のいずれにも写っている。よって、主面9aは画像IM11〜IM14に共通して写る共通面である。一方で、錠剤9の側面9cでは、撮像方向に応じた領域がそれぞれ画像IM11〜IM14に写る。また図5の例では、撮像画像IM1には欠陥候補d1,d2が写っている。ここでいう欠陥候補とは、錠剤9の欠陥である可能性のある候補である。
In the example of FIG. 5, the entire area of the
図5の例では、この欠陥候補d1は画像IM11〜IM14のいずれにも共通に写っているので、錠剤9に生じた欠陥であるといえる。一方で、欠陥候補d2は一つの画像IM12のみに写っており、他の画像IM11,IM13,IM14には写っていない。この欠陥候補d2は錠剤9に生じた欠陥ではなく、撮像ヘッド5に起因して生じたものといえる。例えば、欠陥候補d2はレンズ群52、ミラー53または角錐型ミラー54の異常(例えば付着物)、あるいは、検査カメラ51の撮像面の異常を示す、と考えられる。よって、欠陥候補d2を錠剤9の欠陥として検出することは好ましくない。
In the example of FIG. 5, since the defect candidate d1 is commonly shown in any of the images IM11 to IM14, it can be said that the defect is generated on the
撮像ヘッド5は図示省略の照明用光源を有していてもよい。照明用光源は例えばリング状の形状を有しており、錠剤9へと光を照射する。これにより、撮像画像IM1における錠剤9の明るさを向上できる。
The
また図3および図4の例では、ミラー53および角錐型ミラー54によって光の経路を曲げているものの、必ずしもこれに限らない。光の経路を曲げる素子として、プリズムなどの他の光学素子を採用してもよい。
In the examples of FIGS. 3 and 4, although the light path is bent by the
<検査>
制御部8は、撮像ヘッド5から入力される撮像画像IM1に対して画像処理を行い、撮像された錠剤9の外観検査を行う。よって、制御部8は画像処理部として機能することとなる。
<Inspection>
The
図6は、錠剤検査装置1における動作の一例を示すフローチャートである。まずステップS1にて、撮像ヘッド5は複数の撮像方向から搬送途中の錠剤9を撮像して、撮像画像IM1を生成する。撮像ヘッド5はこの撮像画像IM1を制御部8へと出力する。
FIG. 6 is a flowchart showing an example of the operation in the
次にステップS2にて、制御部8は検査処理(画像処理)を撮像画像IM1に対して行う。つまり制御部8は画像IM11〜IM14に対して検査処理を行う。
Next, in step S2, the
この検査処理の具体的な例は後に述べるものの、ここではまず、その概要について簡単に説明する。例えば制御部8は検査処理として特定処理および候補検出処理を行う。特定処理は、各画像IM11〜IM14において錠剤9が占める錠剤領域を特定する処理である。これにより、錠剤領域の位置および形状が画像IM11〜IM14の各々において特定される。
Although a specific example of this inspection process will be described later, here first, the outline will be briefly described. For example, the
候補検出処理は、各画像IM11〜IM14において欠陥候補を検出する処理である。候補検出処理は、例えば各画像IM11〜IM14の各画素の画素値に基づいてその画素が欠陥候補を示す画素であるか否かを判別する処理を含み、その判別結果として欠陥候補が検出される。 The candidate detection process is a process of detecting a defect candidate in each of the images IM11 to IM14. The candidate detection process includes, for example, a process of determining whether or not the pixel is a pixel indicating a defect candidate based on the pixel value of each pixel of each of the images IM11 to IM14, and the defect candidate is detected as a determination result .
上記特定処理によって、各画像IM11〜IM14における錠剤9の錠剤領域が特定され、上記候補検出処理によって、各画像IM11〜IM14における欠陥候補の位置が特定されるので、錠剤領域に対する欠陥候補の位置が各画像IM11〜IM14において特定される。つまり、その錠剤9上における欠陥候補の位置が画像IM11〜IM14ごとに特定される。したがって、この検査処理は錠剤領域に対する欠陥候補の位置を検出する処理であるともいえる。
The identification process identifies the tablet area of the
次にステップS3にて、制御部8は画像IM11〜IM14の検査処理の結果に基づいて欠陥真偽処理を行う。欠陥真偽処理は検査処理によって検出された欠陥候補が錠剤9の欠陥を示しているのか否かを判断する、つまり欠陥候補の真偽を判断する処理である。具体的には、制御部8は検査処理によって、画像IM11〜IM14のいずれにも写る錠剤9の領域(例えば主面9a)において、画像IM11〜IM14の画像で共通の欠陥候補(例えば欠陥候補d1)が検出されているときに、錠剤9には欠陥が生じていると判断する。一方で、制御部8は検査処理によって、画像IM11〜IM14の当該領域のうち一つのみで欠陥候補(例えば欠陥候補d2)が検出されているきには、その欠陥候補は錠剤9に生じた欠陥ではないと判断する。
Next, in step S3, the
この欠陥真偽処理の具体的な例も後に述べるものの、ここではまず、その概要について簡単に説明する。例えば制御部8は、画像IM11〜IM14における錠剤領域内の各画素の幾何学的な対応関係を求める。つまり、制御部8は錠剤9上の同じ点を写す画素の対応関係を求める。次に制御部8は当該対応関係に基づいて画像IM11〜IM14において欠陥候補が共通しているか否かを判断する。具体的には、当該対応関係に基づいて欠陥候補の位置を対比する。制御部8は当該位置が画像IM11〜IM14において互いに対応しているときには、錠剤9に欠陥が生じていると判断し、互いに対応していないときには、その欠陥候補は錠剤9に生じた欠陥ではないと判断する。
Although a specific example of this defect authenticity processing will be described later, here first, the outline will be briefly described. For example, the
なお4つの画像IM11〜IM14の全てで共通の欠陥候補が検出されなくても、2以上の画像に共通の欠陥候補が検出されたときには、その欠陥候補が錠剤9の欠陥である可能性を排除しきれない。そこで制御部8は、画像IM11〜IM14のうち少なくとも二つに共通の欠陥候補が検出されたときには、錠剤9に欠陥が生じたと判断してもよい。これによれば、欠陥の可能性がある錠剤9を良品と判断することを回避できる。
In addition, even if a common defect candidate is not detected in all four images IM11 to IM14, when a common defect candidate is detected in two or more images, the possibility that the defect candidate is a defect of
以上のように、錠剤検査装置1によれば、画像IM11〜IM14の少なくとも二つにおいて共通の欠陥候補が検出されない限り、その欠陥候補を欠陥とはみなさない。したがって、欠陥検出時の虚報を抑制できる。
As described above, according to the
<検査処理の具体例>
図7は、検査処理の具体的な一例を示すフローチャートである。ここでは、代表的に一つの画像IM12に対する検査処理の一例を説明する。他の画像IM11,IM13,IM14の検査処理も同様である。
<Specific example of inspection process>
FIG. 7 is a flowchart showing a specific example of inspection processing. Here, an example of inspection processing for one image IM12 will be described as a representative. The inspection process of the other images IM11, IM13, IM14 is the same.
この画像IM12に対する検査処理を説明するにあたって、まず画像IM12内の各領域を定義する。図8は、画像IM12の一例を概略的に示す図である。ここで、錠剤領域TR、背景領域BR、主面領域Raおよび側面領域Rcを導入する。錠剤領域TRは画像IM12において錠剤9が占める領域である。背景領域BRは画像IM12のうち錠剤領域TR以外の領域である。主面領域Raは画像IM12において錠剤9の主面9aが占める領域であり、側面領域Rcは画像IM12において錠剤9の側面9cが占める領域である。主面領域Raおよび側面領域Rcは錠剤領域TRを構成する。画像IM11,IM13,IM14についても同様に各領域が定義される。以下では、画像IM12に写る錠剤9の主面9aおよび側面9cを実際の錠剤9の主面9aおよび側面9cと区別すべく、それぞれ主面9aaおよび側面9caと呼ぶ。
In order to describe the inspection process for the image IM12, first, each area in the image IM12 is defined. FIG. 8 schematically shows an example of the image IM12. Here, a tablet area TR, a background area BR, a main area Ra and a side area Rc are introduced. The tablet area TR is an area occupied by the
制御部8は上記特定処理としてステップS21〜S26を実行する。ここでは、錠剤領域TRを構成する主面領域Raおよび側面領域Rcを特定する。まず、ステップS21にて、制御部8は画像IM12に対してエッジ検出処理を行って、エッジ画像を生成する。ただしここでは、制御部8は画像IM12において背景領域BRを削除し、その削除後の画像IM12に対してエッジ検出処理を行う。
The
背景領域BRの削除のために、まず制御部8は画像IM12の錠剤領域TRと背景領域BRとを区別する。例えば制御部8は画像IM12に対する二値化処理を用いて、錠剤領域TRと背景領域BRとを区別する。背景領域BRには、搬送ベルト41が含まれているので、錠剤領域TRと背景領域BRとを精度よく区別するために、実際の搬送ベルト41の色と錠剤9の色とのコントラストを大きくするとよい。例えば錠剤9が白色系である場合には、搬送ベルト41を黒色とする。制御部8は背景領域BRを特定すると、画像IM12において背景領域BRを削除する。例えば制御部8は背景領域BR内の全ての画素の画素値を零にすることで、背景領域BRを削除する。
In order to delete the background area BR, the
次に制御部8は、背景領域BRを削除した画像IM12に対してエッジ検出処理を行って、エッジ画像を生成する。エッジ検出処理の具体的な処理方法は特に制限される必要は無いものの、その一例について簡単に説明する。例えば制御部8は除去後の画像IM12に対してエッジ強度処理を行って、エッジ強度画像を生成する。エッジ強度処理は例えば各画素間の画素値の差の算出処理を含み、これにより、画像IM12において画素間の画素値の差の大きい領域がエッジ強度画像となる。制御部8はこのエッジ強度画像において、画素値が所定のエッジ閾値よりも大きいか否かを画素ごとに判断する。エッジ閾値は例えば予め設定されて制御部8の記憶媒体に記憶されてもよい。制御部8はエッジ閾値よりも大きい画素値を有する画素を検出して、エッジ画像を生成する。
Next, the
このエッジ画像は背景領域BRが除去された画像IM12に基づいて生成されるので、背景領域BR内のエッジ(例えば搬送ベルト41の凹凸)はエッジ画像において検出されない。つまり、錠剤領域TRの輪郭に対応するエッジ(以下、錠剤エッジと呼ぶ)はエッジ画像内のエッジ群のうち最外周に位置することになる。 Since this edge image is generated based on the image IM12 from which the background area BR has been removed, an edge in the background area BR (for example, the unevenness of the transport belt 41) is not detected in the edge image. That is, the edge (hereinafter referred to as a tablet edge) corresponding to the contour of the tablet region TR is positioned at the outermost periphery of the edge group in the edge image.
次にステップS22にて、制御部8は、錠剤領域TRの輪郭に対応する錠剤エッジを次のように特定する。即ち、制御部8はエッジ画像におけるエッジ群のうち、最外周に位置するエッジを錠剤エッジP0(図9参照)として特定する。
Next, in step S22, the
図9は、錠剤エッジP0の一例を模式的に示す図である。図9の例では、模式的に、錠剤エッジP0が複数のエッジに分割して示されている。この錠剤エッジP0は側面外側エッジP1と主面外側エッジP2と一対の側面稜線エッジP4によって構成されている。側面外側エッジP1は、錠剤9の主面9bの周縁のうち画像IM12に写っている部分に対応するエッジである。主面9bは円形状を有しているので、側面外側エッジP1は理想的には半楕円形状を有している。ここでいう半楕円形状とは、楕円をその長軸で2つに分割して得られる形状をいう。
FIG. 9 is a view schematically showing an example of the tablet edge P0. In the example of FIG. 9, the tablet edge P0 is schematically shown divided into a plurality of edges. The tablet edge P0 is composed of a side outer edge P1, a main surface outer edge P2, and a pair of side ridge line edges P4. The side outer edge P1 is an edge corresponding to a portion of the periphery of the
主面外側エッジP2は、画像IM12における錠剤9の主面9aaの周縁のうち側面9caとは接していない部分に対応するエッジである。この主面外側エッジP2は錠剤9の主面9aaの周縁のうち錠剤領域TRの輪郭の一部に対応するエッジである、ともいえる。主面9aは円形状を有しているので、主面外側エッジP2は理想的には半楕円形状を有している。より具体的には、側面外側エッジP1および主面外側エッジP2は互いに反対側に膨らむ半楕円形状を有している。
The main surface outer edge P2 is an edge corresponding to a portion of the periphery of the main surface 9aa of the
一対の側面稜線エッジP4は理想的には直線状に延在しており、主面外側エッジP2の両端をそれぞれ側面外側エッジP1の両端に連結している。一対の側面稜線エッジP4は画像IM12における錠剤9の側面9caの輪郭の一部に対応するエッジである。一対の側面稜線エッジP4はほぼ平行に延在しており、その延在方向は撮像ヘッド5の内部構成の配置によって予め決まっている。ここでは、側面稜線エッジP4は画像IM12内の横方向に対して略45度で交差する方向に延在しているものとする。
The pair of side edge line edges P4 ideally extends in a straight line, and connects both ends of the main surface outer edge P2 to both ends of the side surface outer edge P1. The pair of side edge line edges P4 is an edge corresponding to a part of the outline of the side surface 9ca of the
なお一対の側面稜線エッジP4は実際には完全な平行ではない。一対の側面稜線エッジP4は側面外側エッジP1側に向かうにしたがって互いに近づくように僅かに傾斜している。以下では簡単のために、一対の側面稜線エッジP4は平行であると仮定する。より厳密に考えるのであれば、以下で述べる側面稜線エッジP4の延在方向を、一対の側面稜線エッジP4の延在方向の二等分線で表される方向と把握すればよい。 In addition, a pair of side ridgeline edge P4 is not completely perfect parallel in fact. The pair of side edge line edges P4 are slightly inclined so as to be closer to each other as the side outer edge P1 side is approached. In the following, for the sake of simplicity, it is assumed that the pair of side ridge edges P4 are parallel. If it thinks more strictly, what is necessary is just to grasp the extending direction of side edge line edge P4 described below as the direction represented by the bisector of the extending direction of a pair of side edge line edge P4.
図9の例では、画像IM12における錠剤9の主面9aaと側面9caとの間の境界に対応する境界エッジP3と、割線91に対応する割線エッジP5とを破線で示している。境界エッジP3は主面領域Raと側面領域Rcとの間の境界に対応するエッジであるともいえる。境界エッジP3は理想的には主面外側エッジP2とは反対側に膨らむ半楕円形状を有している。主面外側エッジP2および境界エッジP3の一組は錠剤9の主面9aaの周縁に対応しており、理想的に楕円形状を呈する。以下では、主面外側エッジP2および境界エッジP3の一組を主面エッジP23とも呼ぶ。
In the example of FIG. 9, the boundary edge P3 corresponding to the boundary between the main surface 9aa and the side surface 9ca of the
再び図7を参照して、ステップS23にて、制御部8はステップS22で特定した錠剤エッジP0から、側面外側エッジP1および主面外側エッジP2を抽出する。例えば制御部8は錠剤エッジP0のうち、所定方向D1(=側面稜線エッジP4の延在方向)に沿って延在するエッジを側面稜線エッジP4と特定する。そして制御部8は、錠剤エッジP0から側面稜線エッジP4を除いた2つのエッジのうち、所定側(図では右上側)にある一方を側面外側エッジP1と特定し、他方を主面外側エッジP2と特定する。
Referring again to FIG. 7, in step S23, the
次にステップS24にて、制御部8は境界エッジP3をエッジ画像において特定する。例えば境界エッジP3の形状と側面外側エッジP1の形状との類似性を考慮して、以下で説明するように境界エッジP3を特定する。
Next, in step S24, the
まず境界エッジP3と側面外側エッジP1との幾何学的な関係について述べる。境界エッジP3および側面外側エッジP1は同じ側に膨らむ半楕円形状を有している。またここでは錠剤9はさほど厚くないので、境界エッジP3および側面外側エッジP1はほぼ同一形状を有している、と考えることができる。つまり、境界エッジP3は側面外側エッジP1を所定方向D1に沿って主面外側エッジP2側へと、側面稜線エッジP4の長さの分だけ平行移動させた領域に存在している。側面稜線エッジP4の長さは錠剤9の厚みおよび撮像ヘッド5の内部構成の配置に応じて予め決まっているので、側面外側エッジP1が特定されれば、境界エッジP3が存在する領域を推定することができる。
First, the geometrical relationship between the boundary edge P3 and the side outer edge P1 will be described. The boundary edge P3 and the side outer edge P1 have a semi-elliptical shape bulging on the same side. Here, since the
そこで制御部8は、側面外側エッジP1から所定方向D1に沿って主面外側エッジP2側へと所定距離だけ離れた探索領域R1(図10も参照)内の画素を探索して境界エッジP3を特定する。図10は、探索領域R1の一例を模式的に示す図である。この探索領域R1の一例を説明するにあたって、その探索領域R1の中心線L0と、探索領域R1の輪郭を形成する線L1〜L4とを導入する。
Therefore, the
中心線L0は側面外側エッジP1を側面稜線エッジP4の長さの分だけ、所定方向D1に沿って主面外側エッジP2側へと移動させた線である。なお図10の例では、模式的に中心線L0と境界エッジP3とを一つの曲線で示しているものの、実際にはこれらは相違し得る。 The center line L0 is a line obtained by moving the side outer edge P1 by the length of the side edge P4 along the predetermined direction D1 toward the main surface outer edge P2. In the example of FIG. 10, although the center line L0 and the boundary edge P3 are schematically shown by one curve, they may be different in practice.
線L1,L2は、中心線L0を所定方向D1に沿って互いに反対側へと所定幅だけ移動させた線である。図10では、線L1は線L2よりも側面外側エッジP1に近い。線L3,L4は所定方向D1に沿って延在しており、それぞれ線L1,L2の両端を連結する。探索領域R1はこれらの線L1〜L4の一組によって囲まれた領域である。 The lines L1 and L2 are lines obtained by moving the center line L0 along the predetermined direction D1 to the opposite side by a predetermined width. In FIG. 10, the line L1 is closer to the side outer edge P1 than the line L2. The lines L3 and L4 extend along the predetermined direction D1 and connect both ends of the lines L1 and L2, respectively. The search area R1 is an area surrounded by one set of these lines L1 to L4.
なお図10では、割線エッジP5の一部も示されている。以下では説明の便宜上、探索領域R1において所定方向D1に沿って並ぶ画素群を、「行」と呼ぶ。 In FIG. 10, part of the dividing line edge P5 is also shown. Hereinafter, for convenience of description, a pixel group arranged in the search area R1 along the predetermined direction D1 will be referred to as a “row”.
図11は、制御部8の探索処理の一例を示すフローチャートである。まずステップS51にて、制御部8は値N,Mをそれぞれ1に初期化する。値Nは探索領域R1内の行の番号を示しており、値Mはその行に属する画素の番号を示している。第1番目の画素は線L1上の画素であり、第M番目の画素は各行において第(M−1)番目の画素の隣の画素である。
FIG. 11 is a flowchart illustrating an example of the search process of the
次にステップS52にて、制御部8はエッジ画像の探索領域R1内の第N行第M番目の画素がエッジを示すか否かを判断する。否定的な判断がなされたときには、ステップS53にて、制御部8は値Mに1を加算して値Mを更新し、更新後の値Mを用いて再びステップS52を実行する。つまり、エッジを示す画素(以下、エッジ画素とも呼ぶ)を検出できなければ、次の画素について同様の判断を行うのである。
Next, in step S52, the
ステップS52において肯定的な判断がなされたときには、ステップS54にて、制御部8はその画素を境界エッジP3の構成要素として把握する。次にステップS55にて、制御部8は値Nに1を加算して値Nを更新し、値Mを1に初期化する。次にステップS56にて、制御部8は値Nが基準値Nrefよりも大きいか否かを判断する。基準値Nrefは探索領域R1に含まれる行の総数である。つまり、制御部8は全ての行を探索したか否かを判断する。全ての行を探索してないと判断したときには、制御部8はステップS52を再び実行する。全ての行を探索したと判断したときには、制御部8は探索処理を終了する。
When an affirmative determination is made in step S52, in step S54, the
以上のように、制御部8は探索領域R1内の各行において、線L1から画素を順次に選択し、最初に検出したエッジ画素を境界エッジP3の構成要素として特定する。なお図10の例示では、画素の探索方向を探索領域R1内の実線矢印で模式的に示しており、矢印の終点は、境界エッジP3の構成要素を示している。
As described above, in each row in the search area R1, the
制御部8は、ステップS23で特定した主面外側エッジP2およびステップS24で特定した境界エッジP3の一組を、主面エッジP23として特定する。
The
以上のように、本実施の形態によれば、主面エッジP23を適切かつ容易に得ることができる。 As described above, according to the present embodiment, the main surface edge P23 can be appropriately and easily obtained.
また上述の探索処理によれば、割線エッジP5上の画素は境界エッジP3の構成要素として特定されない。なぜなら、割線エッジP5は境界エッジP3に対して主面外側エッジP2側に位置しているところ、制御部8は探索領域R1を線L1側から線L2側へ(つまり側面外側エッジP1から主面外側エッジP2側へ)探索しているからである。つまり、この探索処理によれば、制御部8は割線エッジP5の画素を探索するよりも前に境界エッジP3の構成要素を特定することができる。つまり、割線エッジP5を境界エッジP3として誤検出することを回避できる。
Further, according to the above-described search processing, the pixel on the dividing line edge P5 is not identified as a component of the boundary edge P3. Because the dividing line edge P5 is located on the main surface outer edge P2 side with respect to the boundary edge P3, the
ところで、この主面エッジP23は画像IM12における錠剤9の主面9aaの周縁に対応するものの、実際に検出された主面エッジP23は理想的な楕円形状を呈するとは限らない。例えば錠剤9の主面9aの周縁近傍に照射される光にむらが生じていたり、あるいは、当該周縁近傍の一部から正反射した光が検査カメラ51に結像されて、一部の画素値が他の画素値に比べて非常に大きな値を有している場合がある。あるいは、当該周縁近傍に欠陥が生じている場合もある。このような場合には、主面エッジP23は理想的な楕円形状と相違し得る。
By the way, although the main surface edge P23 corresponds to the periphery of the main surface 9aa of the
そこでステップS25にて、制御部8は楕円の関数に基づいて、主面エッジP23に近似する近似線(楕円)を主面領域Raの輪郭として算出する。より一般的に説明すれば、制御部8は画像IM12における主面領域Raの輪郭の形状として予め決められた基準関数に基づいて、主面エッジP23の近似線を主面領域Raの輪郭として算出する。ここでいう基準関数とは、主面領域Raの輪郭の形状を表す関数であって、その位置および大きさが変数となる関数をいう。楕円の関数であれば、例えばその長軸の長さ、短軸の長さ、長軸の延在方向、および、中心などを変数として採用できる。制御部8は例えば最小二乗法により主面エッジP23に近似する楕円E1(より具体的にはその長軸の長さ、短軸の長さ、長軸の延在方向および中心)を算出する。この楕円E1は例えば撮像画像IM1(あるいは画像IM12)の座標系で示される式であってもよい。
Therefore, in step S25, the
以上のように、主面領域Raの輪郭を示す関数に基づいて主面エッジP23の近似線を主面領域Raの輪郭として算出しているので、より高い精度で主面領域Raの輪郭を特定することができる。ひいては、主面領域Raに対する欠陥候補の位置を高い精度で特定できる。また上述の具体例では、錠剤9が略円盤形状を有している。つまり、錠剤9の主面9aが略円形状を有している。よって、画像IM12において主面9aaの周縁は理想的には楕円形状を有する。これに対応して、楕円の関数が主面領域Raの輪郭を示す関数として用いられている。したがって、適切に主面領域Raの輪郭を特定することができる。
As described above, since the approximate line of the principal surface edge P23 is calculated as the contour of the principal surface region Ra based on the function indicating the contour of the principal surface region Ra, the contour of the principal surface region Ra is specified with higher accuracy. can do. As a result, the position of the defect candidate with respect to the main surface area Ra can be specified with high accuracy. Moreover, in the above-mentioned specific example, the
以下では、楕円E1をその長軸で分割して得られる2つの半楕円のうち、側面9ca側の半楕円を半楕円E11とも呼ぶ。この半楕円E11は境界エッジP3の近似線に相当することになる。 Hereinafter, among the two half ellipses obtained by dividing the ellipse E1 by its long axis, the half ellipse on the side 9ca side is also referred to as the half ellipse El. The semi-ellipse E11 corresponds to an approximation line of the boundary edge P3.
次にステップS26にて、制御部8は側面領域Rcの輪郭を特定する。例えば、まず制御部8は側面外側エッジP1に近似する近似線(半楕円)を楕円E1に基づいて算出する。制御部8は楕円E1を所定方向D1に沿って移動させながらレーベンバーグ・マルカート(LM)法を用いて、側面外側エッジP1に沿う楕円E2を算出する。この楕円E2は錠剤9の主面9bの周縁に相当する。よって、制御部8はこの楕円E2をその長軸で分割し、得られた2つの半楕円のうち、境界エッジP3よりも遠い方にある半楕円E21を側面外側エッジP1の近似線として求める。
Next, in step S26, the
制御部8はこの楕円E2の算出に際して、楕円E1を所定の割合で縮小させてもよい。画像IM12のような斜視図において、錠剤9の主面9bの周縁は錠剤9の主面9aの周縁よりも所定割合で小さくなるからである。この所定割合は錠剤9の厚みに応じて予め設定される。
When calculating the ellipse E2, the
なお制御部8は必ずしも楕円E1に基づいて楕円E2を算出し、楕円E2から半楕円E21を算出する必要はない。例えば制御部8は楕円E1から半楕円E11を求め、この半楕円E11を所定方向D1に沿って移動させながらLM法を用いて半楕円E21を算出してもよい。また半楕円E21の算出に当たって半楕円E11を所定割合で縮小しても構わない。
The
制御部8は、半楕円E11,E21の両端をそれぞれ連結する一対の直線を算出し、半楕円E11,E21および当該一対の直線を、錠剤9の側面9caが占める側面領域Rcの輪郭として把握する。
The
このように境界エッジP3および側面外側エッジP1に近似する近似線(半楕円E11,E21)を側面領域Rcの輪郭の一部として採用しているので、より高い精度で側面領域Rcを特定することができる。 Since the approximation line (half ellipses E11 and E21) approximating the boundary edge P3 and the side outer edge P1 in this way is adopted as a part of the outline of the side region Rc, the side region Rc is specified with higher accuracy. Can.
次にステップS27にて、制御部8は画像IM12に対して候補検出処理を行う。以下、候補検出処理の具体例について述べる。
Next, in step S27, the
<第1候補検出処理(エッジ強度処理)>
画像IM12において欠陥候補d1,d2(図8参照)が占める領域と、その欠陥候補d1,d2の周囲の領域との境界部では、画素間の画素値の差が大きくなる。そこで制御部8は次のように欠陥候補を検出してもよい。即ち、制御部8は、背景領域BRを削除した画像IM12に対してエッジ強度処理を行ってエッジ強度画像を生成する。なおエッジ画像の生成の途中でエッジ強度画像が既に生成されている場合には、そのエッジ強度画像を用いればよい。
<First candidate detection processing (edge strength processing)>
At the boundary between the area occupied by the defect candidate d1 and d2 (see FIG. 8) and the area around the defect candidate d1 and d2 in the image IM12, the difference in pixel value between the pixels becomes large. Therefore, the
制御部8はエッジ強度画像の画素値が閾値Th1よりも大きいか否かを画素ごとに判断し、肯定的な判断がなされたときに、その画素は欠陥候補の輪郭を示していると判断する。これにより、欠陥候補d1,d2を検出することができる。閾値Th1は例えば予め設定されて制御部8の記憶媒体に記憶されてもよい。
The
<第2候補検出処理>
制御部8は上述の第1候補検出処理に替えて、あるいは、第1候補検出処理と共に、以下で述べる第2候補検出処理を行ってもよい。
<Second candidate detection process>
The
さて、欠陥候補d1,d2が例えば黒色系の付着物である場合、この欠陥候補d1,d2に対応する領域の画素値は他の領域の画素値よりも小さくなる。そこで制御部8は次のようにして欠陥を検出してもよい。即ち、制御部8は、画像IM12の錠剤領域TR内の画素値が閾値Th2よりも小さいか否かを画素ごとに判断し、肯定的な判断がなれたときに、その画素は欠陥候補を示していると判断する。閾値Th2は例えば予め設定されて制御部8の記憶媒体に記憶されてもよい。
Now, if the defect candidate d1, d2 is, for example, a black colored deposit, the pixel value of the region corresponding to the defect candidate d1, d2 is smaller than the pixel value of the other region. Therefore, the
以下では、欠陥候補(あるいはその輪郭)を示す画素を候補画素とも呼ぶ。 Hereinafter, a pixel indicating a defect candidate (or an outline thereof) is also referred to as a candidate pixel.
<欠陥真偽処理の具体例>
図12は、欠陥真偽処理の一例を示すフローチャートである。ここでは、主面領域Ra内の欠陥候補が錠剤9の欠陥を示しているか否かを判断する例について説明する。ステップS31にて、制御部8は少なくとも一つの欠陥候補が画像IM11〜IM14のうち2以上の画像で共通しているか否かを判断する。具体的には、制御部8は主面領域Raに対する各画素の位置の、画像IM11〜IM14の相互間における対応関係に基づいて、欠陥候補が共通しているか否かを判断する。そこでまず制御部8はこの対応関係を求める。つまり制御部8は、画像IM11〜IM14において錠剤9の主面9a上の同じ点を示す画素の対応関係を求める。
<Specific example of defect authenticity processing>
FIG. 12 is a flowchart showing an example of the defect authenticity process. Here, an example in which it is determined whether or not a defect candidate in the main surface area Ra indicates a defect of the
このような対応関係は、例えば次のように求めることができる。例えば、制御部8は画像IM11〜IM14に基づいてそれぞれ鳥瞰画像IM41〜IM44をそれぞれ生成する。ここでいう鳥瞰画像とは、錠剤9をZ軸方向に沿って見た画像である。例えば制御部8は画像IM11における楕円E1の長軸Aと短軸Bの比に基づいて画像IM11についての撮像方向を算出する。この撮像方向は、当該撮像方向と水平面とがなす角度θ(sinθ=B/A)によって表すことができる。なお、角度θは必ずしも算出される必要は無く、撮像ヘッド5の内部構成の配置に応じて予め設定されていてもよい。
Such correspondence can be obtained, for example, as follows. For example, the
制御部8は角度θに基づいて画像IM11に対して画像変換を行って、鳥瞰画像IM41を生成する。この鳥瞰画像IM41における主面9aの輪郭の形状は楕円E1の長軸を直径とする円となる。制御部8は同様にして画像IM12〜IM14に基づいて鳥瞰画像IM42〜IM44を生成する。これにより、鳥瞰画像IM41〜IM44には、Z軸方向から見た錠剤9の外観が写る。図13は、鳥瞰画像IM41〜IM44の一例を概略的に示す図である。以下では、鳥瞰画像IM41〜IM44における錠剤9の主面9aを実際の錠剤9の主面9aと区別すべく、主面9abと呼ぶ。
The
鳥瞰画像IM41〜IM44において錠剤9の主面9abの周縁を示す円F1の大きさが互いに大きく相違している場合には、制御部8はこれらの円F1の大きさの差が所定値よりも小さくなるように、鳥瞰画像IM41〜IM44を拡大または縮小してもよい。このような鳥瞰画像IM41〜IM44において円F1内で同じ位置にある画素が錠剤9の主面9a上の同じ点を示すことになる。つまり、図13は実質的に画像IM11〜IM14の主面領域Raの相互間における各画素の対応関係を示している。
When the sizes of the circles F1 indicating the peripheral edge of the main surface 9ab of the
制御部8は主面領域Raに対する欠陥候補が鳥瞰画像IM41〜IM44のうち2以上の鳥瞰画像で一致するか否かを判断する。なお、本願でいう「一致」とは必ずしも完全な一致を意味する必要はなく、差が所定程度よりも小さい状態を含む。2以上の鳥瞰画像において欠陥候補が互いに一致していれば、制御部8は2以上の画像において欠陥候補(例えば欠陥候補d1)が共通していると判断し、ステップS32にて錠剤9(より具体的には主面9a)に欠陥が生じていると判断する。
The
欠陥候補の一致判断は次のようにして行われてもよい。例えば制御部8は、欠陥候補を構成する複数の候補画素の各々の位置(周縁領域Raに対する位置)が、2以上の画像において互いに一致しているか否かを判断する。例えば画像IM11〜IM14の各々において欠陥候補d1が候補画素Q1[0]〜Q1[10]によって構成されているとする。制御部8は、主面領域Raに対する候補画像Q1[n](n:0〜10)の位置が画像IM11〜IM14のうち2以上の画像で互いに一致しているか否かを判断する。制御部8はこれらが一致しているときに、欠陥候補が一致していると判断してもよい。これによれば、欠陥候補の位置および形状に基づいて欠陥候補の一致判断を行うことができる。もちろん、欠陥候補を構成する全ての候補画素が2以上の画像間で互いに一致している必要は無く、若干の候補画素で不一致があっても構わない。不一致を許容する候補画素の数が多いほど、形状に関する条件が緩まることになる。
The match determination of the defect candidate may be performed as follows. For example, the
このような一致判断のために、制御部8は、各欠陥候補を構成する候補画素を各画像IM11〜IM14において特定する必要がある。これは例えば次のように行うことができる。即ち、例えば、制御部8は各画像IM11〜IM14において、候補画素の相互間の距離を算出し、相互間の距離が小さい候補画素群を同じ欠陥候補として抽出する。これにより、例えば画像IM11〜IM14の各々において欠陥候補d1に属する候補画素Q1[0]〜Q1[10]が特定され、画像IM12において欠陥候補d2に属する候補画素Q2[0]〜Q2[10]が特定される。
For such coincidence determination, the
ここでは、主面領域Raに対する候補画素Q1[n]の位置は複数の画像IM11〜IM14で互いに一致する。よって、制御部8は欠陥候補d1が錠剤9の欠陥であると判断し、錠剤9に欠陥が生じていると判断する。一方で、主面領域Raに対する候補画素Q2[n]の位置は複数の画像IM11〜IM14間で一致しないので、制御部8は欠陥候補d2が錠剤9の欠陥ではないと判断する。
Here, the positions of the candidate pixels Q1 [n] with respect to the main surface area Ra coincide with one another in the plurality of images IM11 to IM14. Therefore, the
ステップS31にて否定的な判断がなされると、ステップS33にて制御部8は錠剤9(より具体的には主面9a)に欠陥が生じていないと判断する。
If a negative determination is made in step S31, the
なお、欠陥の個数を検出する必要がなく、単に錠剤9の欠陥の有無を検出すればよい場合には、必ずしも全ての欠陥候補について判断を行わなくてもよい。一つの欠陥候補が2以上の画素で共有していると判断した場合には、他の欠陥候補についての判断を省略してもよい。一方で、錠剤9に生じた欠陥の個数を検出する場合には、全ての欠陥候補について判断を行えばよい。
In addition, when it is not necessary to detect the number of defects, and it is sufficient to simply detect the presence or absence of the defects of the
上述の例では、主面領域Raの輪郭の形状として予め決められた関数に基づいて主面領域Raの輪郭を求めているので、上述のように主面領域Raの特定精度が高い。これによれば、主面領域Ra内の各画素の位置の画像間の対応関係の精度を向上でき、欠陥真偽の判断精度を向上できる。 In the above-described example, since the outline of the main surface area Ra is obtained based on a function determined in advance as the shape of the outline of the main surface area Ra, the specification accuracy of the main surface area Ra is high as described above. According to this, it is possible to improve the accuracy of the correspondence between the images of the positions of the respective pixels in the main surface region Ra, and to improve the accuracy in the determination of the defect true or false.
<側面領域>
上述の例では、錠剤9の主面9aに対する外観検査について述べた。ここでは、錠剤9の側面9cに対する外観検査について述べる。この錠剤9の側面9cでは、その撮像方向に応じた領域がそれぞれ画像IM11〜IM14に写る。例えば図5を参照して、錠剤9の側面9cのうち領域9c1が画像IM11〜IM13に写っており、画像IM14には写っていない。この領域9c1は錠剤9の側面9cを周方向に例えば6等分して得られる領域と同程度の幅を有している。図5の例では、領域9c1は画像IM11において側面9cのほぼ中央に位置し、画像IM12,IM13においては側面9cの端に位置する。よって領域9c1は画像IM11においては広く写り、画像IM12,IM13において非常に狭く写る。したがって、錠剤9の領域9c1内の欠陥は画像IM11に比して画像IM12,IM13では視認されにくく欠陥候補として検出されにくい。
<Side area>
In the above-described example, the appearance inspection on the
そこで、画像IM12,IM13において側面9cの端の領域9c1は候補検出処理の対象から除いてもよい。言い換えれば、制御部8は画像IM12,IM13において側面領域Rcの端側の領域を、非検査対象たるマスク領域に設定してもよい。これによれば、端領域において欠陥候補を誤検出したり、あるいは、欠陥の検出漏れが生じたりすることを回避できる。
Therefore, the area 9c1 at the end of the
図14は、検査処理の一例を示すフローチャートである。図14の例では、図7と比較して、ステップS28が更に実行される。このステップS28はステップS26,S27の間で実行される。ステップS28では、制御部8はマスク領域を設定する。例えば制御部8は、ステップS26で特定した側面領域Rcの両端に位置する端領域を、マスク領域に設定する。端領域の幅(半楕円E11に沿う幅)は予め決められていてもよく、あるいは、制御部8が側面領域Rcの幅の所定割合を端領域の幅として算出してもよい。
FIG. 14 is a flowchart showing an example of the inspection process. In the example of FIG. 14, step S28 is further executed as compared with FIG. This step S28 is performed between steps S26 and S27. In step S28, the
制御部8はステップS27の候補検出処理において、マスク領域内の画素を欠陥候補として検出しない。これによれば、錠剤9の領域9c1は画像IM11のみにおいて実質的な候補検出処理が行われることになる。なぜなら、領域9c1は画像IM14には写っておらず、画像IM12,IM13ではマスク領域内に写っているからである。
The
制御部8は領域9c1については次のように欠陥真偽処理を行う。即ち、制御部8は、画像IM11に対する候補検出処理によって領域9c1内に欠陥候補が検出されているときに、他の画像IM12〜IM14の候補検出処理の結果に関わらず、錠剤9(より具体的には側面9cの領域9c1)に欠陥が生じていると判断する。つまり画像IM11のみで候補検出処理が行われる領域9c1については、他の画像IM12〜IM14で候補検出処理が行われないので、画像IM11において欠陥候補が検出されれば、その欠陥候補を錠剤9の欠陥とみなすのである。これにより、側面9cの領域9c1における欠陥を検出することができる。
The
図5を参照して、錠剤9の側面9cの領域9c1と周方向で隣り合う領域9c2は画像IM11,IM12に写っており、画像IM13,IM14には写っていない。この領域9c2は例えば錠剤9の側面9cを周方向に12等分して得られる領域と同程度の幅を有している。この領域9c2は画像IM11,IM12において側面9cの中央よりも端側に位置しているものの、その側面9cの端から離れている。画像IM11,IM12において領域9c2はマスク領域に設定されておらず、検査対象領域に相当する。
Referring to FIG. 5, a region 9c2 adjacent to the region 9c1 of the
制御部8は領域9c2については次のように欠陥真偽処理を行う。即ち、制御部8は、画像IM11,IM12に対する候補検出処理によって領域9c1に共通の候補検出が検出されているときに、画像IM13,IM14に対する候補検出処理の結果に関わらず、錠剤9(より具体的には側面9cの領域9c2)に欠陥が生じていると判断する。つまり画像IM11,IM12のみに写る領域9c2については、他の画像IM13,IM14で候補検出処理が行われないので、画像IM11,IM12の領域9c2において共通の欠陥候補が検出されたときに、その欠陥候補を錠剤9の欠陥とみなすのである。これにより、高い精度で側面9cの領域9c2における欠陥を検出できる。
The
なお上記の例では領域9c1,9c2について述べたものの、他の領域についても同様である。要するに、制御部8は、一つの画像のみにおいて候補検出処理が行われる錠剤9の第1領域、および、複数の画像において候補検出処理が行わる錠剤9の第2領域に対しては、それぞれ次のように欠陥真偽処理を行えばよい。即ち制御部8は、第1領域については、当該一つの画像の第1領域に欠陥候補が検出されているときに錠剤9に欠陥が生じていると判断し、第2領域については、複数の画像のうち2以上の画像の第2領域で共通の欠陥候補が検出されているときに錠剤9に欠陥が生じていると判断する。
In the above example, although the areas 9c1 and 9c2 have been described, the same applies to other areas. In short, the
図15は、側面領域に対する欠陥真偽処理の一例を示すフローチャートである。図12と比較して、ステップS34が更に実行され、またステップS32を実行するための条件が相違する。ステップS34はステップS31にて否定的な判断がなされたときに実行される。ステップS34にて、制御部8は、側面領域Rc内の少なくとも一つの欠陥候補に対応する領域が他の画像の全てで欠陥検出の対象外(つまり候補検出処理の対象外)であるか否かを判断する。
FIG. 15 is a flowchart showing an example of defect authenticity processing for the side surface area. Compared to FIG. 12, step S34 is further executed, and the conditions for executing step S32 are different. Step S34 is executed when a negative determination is made in step S31. In step S34, the
なお側面領域Rcに対する各画素の位置の画像IM11〜IM14間の対応関係は主面領域Raと同様にして求めることができる。例えば錠剤9を真横から見た4つの画像をそれぞれ画像IM11〜IM14に基づいて生成する。当該4つの画像では、4方向から見た錠剤9の側面9cがそれぞれ写る。側面領域Rc内の各画素の、当該4つの画像間の対応関係は予め設定されていればよい。
The correspondence between the images IM11 to IM14 of the position of each pixel with respect to the side surface region Rc can be obtained in the same manner as the main surface region Ra. For example, four images of the
例えば画像IM11の領域9c1において欠陥候補を検出した場合について説明する。この領域9c1は他の画像IM12〜IM14の全てで欠陥検出の対象外である。例えば領域9c1は画像IM12,IM13においてマスク領域であり、画像IM14にはそもそも存在しない。よってこの場合、ステップS34では肯定的な判断が行われる。このときステップS32にて、制御部8は錠剤9(より具体的には側面9c)に欠陥が生じていると判断する。つまり、たとえ欠陥候補が2以上の画像で共通していなくても、その欠陥候補がそもそも他の画像で欠陥検出の対象外である場合には、その欠陥候補は当然に他の画像では検出されない。よってこの場合には、1つの画像において検出された欠陥候補を錠剤9の欠陥とみなすのである。
For example, the case where a defect candidate is detected in the area 9c1 of the image IM11 will be described. This area 9c1 is not targeted for defect detection in all the other images IM12 to IM14. For example, the area 9c1 is a mask area in the images IM12 and IM13, and does not originally exist in the image IM14. Therefore, in this case, an affirmative determination is made in step S34. At this time, in step S32, the
ステップS34にて否定的な判断がなされたときには、ステップS33にて、制御部8は錠剤9の側面9cに欠陥が生じていないと判断する。
If a negative determination is made in step S34, the
なお欠陥の個数を検出する必要がなく、単に錠剤9の欠陥の有無を検出すればよい場合には、各ステップS31,S32において必ずしも全ての欠陥候補について判断を行わなくてもよい。また主面領域に対する欠陥真偽処理(図12)および側面領域に対する欠陥真偽処理(図15)の一方で錠剤9に欠陥が生じていると判断すれば、他方を省略してもよい。
When it is not necessary to detect the number of defects, and it is sufficient to simply detect the presence or absence of defects in the
錠剤9に生じた欠陥の個数を検出する場合には、全ての欠陥候補について判断を行えばよい。つまりステップS31の判断結果に依らず、必ずステップS34を行い、またステップS31,S32の各々において全ての欠陥候補についての判断を行えばよい。またこの場合、主面領域に対する欠陥真偽処理および側面領域に対する欠陥真偽処理の両方を行う。
In the case of detecting the number of defects generated in the
<境界エッジ>
上述の例では、探索領域R1の各行における探索で最初に検出されたエッジ画素を境界エッジP3の構成要素として把握した。この場合、例えば画像IM12において錠剤9の主面9aaと側面9caとの間の境界に欠陥が生じていれば、楕円E1の算出精度が低下し得る。以下、具体的に説明する。
<Boundary edge>
In the above-described example, the edge pixel first detected in the search in each row of the search area R1 is grasped as a component of the boundary edge P3. In this case, for example, if a defect occurs in the boundary between the main surface 9aa and the side surface 9ca of the
図16は、錠剤9の主面9aaと側面9caとの間の境界に欠けが生じたときの、エッジ画像におけるエッジの一例を概略的に示す図である。図16に例示するように、錠剤9に生じた欠けの輪郭に沿ってエッジP’が検出されている。図16の例示では、エッジP’を太線で模式的に示している。上述の探索処理によれば、エッジP’のうち線L1側のエッジ上の画素が境界エッジP3の構成要素として把握されることになる。図16の例においては、境界エッジP3の構成要素として把握される画素のいくつかを模式的に黒丸で示している。つまり、境界エッジP3の構成要素がエッジP’のうち線L1側のエッジPc’に偏ってしまう。したがって、境界エッジP3に近似する半楕円E11は錠剤9の主面9aaの周縁からずれやすい。つまり、主面領域Raの特定精度が低下し得る。
FIG. 16 is a view schematically showing an example of an edge in an edge image when a crack is generated in the boundary between the
ここでは、主面領域Raの特定精度を更に向上することを企図する。具体的には、画像IM12における欠陥領域の画素値の分布に着目して、境界エッジP3の構成要素がエッジP’のうちエッジPc’と、線L2側のエッジPa’に分散されるように、境界エッジP3を特定することを企図する。 Here, it is intended to further improve the identification accuracy of the main surface region Ra. Specifically, paying attention to the distribution of pixel values of the defect area in the image IM12, the constituent elements of the boundary edge P3 are dispersed into an edge Pc ′ of the edge P ′ and an edge Pa ′ on the line L2 side. , It is intended to identify the boundary edge P3.
さて、錠剤9の欠けの表面は主面9aおよび側面9cの表面粗さに比べて粗く、画像IM12における欠陥領域内の輝度成分はばらついている。よって、欠陥領域の輪郭(エッジP’)においても輝度成分はばらついている。したがって、画像IM12におけるエッジPa’上の画素値もある範囲でばらついており、エッジPc’上の画素値も同様の範囲内でばらついている。
The chipped surface of the
そこで、制御部8は、エッジ画像の探索領域R1内の画素であって、対応する画像IM12における画素値が所定の閾値(以下、明るさ閾値と呼ぶ)よりも大きい画素を探索する。この明るさ閾値は錠剤9の主面9aaの明るさに応じて予め設定される。例えば明るさ閾値は上記範囲内の値に予め設定される。このような明るさ閾値は例えばシミュレーションまたは実験等によって設定することができる。明るさ閾値は例えば制御部8の記憶媒体に記憶されていてもよい。以下、具体的な動作の一例について説明する。
Therefore, the
図17は、制御部8による探索処理の一例を示すフローチャートである。図11と比較して、制御部8はステップS57を更に実行する。このステップS57はステップS52において肯定的な判断がなされたときに実行される。ステップS57では、制御部8は画像IM12の探索領域R1における第N行第M番目の画素の画素値が明るさ閾値よりも大きいか否かを判断する。
FIG. 17 is a flowchart showing an example of a search process by the
ステップS57にて否定的な判断がなされたときには、制御部8はステップS53を実行し、肯定的な判断がなされたときには、制御部8はステップS54を実行する。
When a negative determination is made in step S57, the
これによれば、たとえ探索領域R1内のエッジ画素であっても、そのエッジ画素に対応する画像IM12の画素の画素値が明るさ閾値よりも小さい場合には、そのエッジ画素は境界エッジP3の構成要素とは把握されず、画像IM12の当該画素の画素値が明るさ閾値よりも大きい場合に、そのエッジ画像が境界エッジP3の構成要素と把握される。 According to this, even if it is an edge pixel in the search area R1, if the pixel value of the pixel of the image IM12 corresponding to the edge pixel is smaller than the brightness threshold, the edge pixel is the boundary edge P3. If the pixel value of the pixel of the image IM12 is larger than the brightness threshold, the edge image is recognized as a component of the boundary edge P3.
この結果、境界エッジP3の構成要素として把握される画素がエッジP’上で分散される。図18は、錠剤9の主面9aaと側面9caとの間の境界に欠けが生じたときの、エッジ画像におけるエッジの一例を概略的に示す図である。図18の例でも、境界エッジP3として把握される画素のいくつかが模式的に黒丸で示されている。図18に例示するように、当該画素はエッジP’のエッジPa’,Pc’に分散される。言い換えれば、境界エッジP3として把握される画素がエッジP’において一方側のみに偏らないように明るさ閾値が設定される。より具体的な一例として、錠剤9の主面9aaの明るさ(例えば画素値(あるいは輝度値)の平均値、中央値、最大値または最小値など、以下、同様)が錠剤9の側面9caの明るさよりも高い場合には、当該明るさ閾値として主面9aaの明るさを採用し、錠剤9の主面9aaの明るさが錠剤9の側面9caの明るさよりも低い場合には、当該明るさ閾値として側面9caの明るさを採用する。
As a result, pixels grasped as components of the boundary edge P3 are dispersed on the edge P '. FIG. 18 is a view schematically showing an example of an edge in an edge image when a chipping occurs in the boundary between the
このような境界エッジP3に近似する半楕円E11は錠剤9の主面9aaの周縁により近い半楕円となる。ひいては、より高い精度で主面領域Raを特定することができる。
A semi-elliptic E11 approximating such boundary edge P3 is a semi-elliptic closer to the periphery of the major surface 9aa of the
<探索領域の中心線>
上述の例では、探索領域R1の中心線L0は側面外側エッジP1を移動させて得られた線であると説明したが、この移動に際して側面外側エッジP1を所定倍率で拡大しても構わない。厳密には、境界エッジP3は側面外側エッジP1よりも所定倍率で大きいからである。
<Center line of search area>
In the above example, the center line L0 of the search area R1 is described as a line obtained by moving the side outer edge P1, but the side outer edge P1 may be enlarged at a predetermined magnification during this movement. Strictly speaking, the boundary edge P3 is larger than the side outer edge P1 at a predetermined magnification.
<マスク領域>
上記の例では、制御部8は各画像IM11〜IM14において側面領域Rcの端領域をマスク領域に設定した。しかるに、他の領域をマスク領域に設定してもよい。ここでは、好適な説明のために、錠剤9の形状として糖衣錠を採用して説明する。この錠剤9は球体を一軸方向に縮小させた扁平形状を有しており、最も広い面に対して垂直にみると錠剤9は円形状を有している。なお錠剤9の形状はこれに限らない。
<Mask area>
In the above example, the
図19は、撮像画像IM1’の一例を概略的に示す図である。撮像画像IM1’は撮像ヘッド5によって糖衣錠の錠剤9を撮像して得られる画像である。撮像画像IM1’の画像IM11’〜IM14’には、それぞれ異なる撮像方向から見た錠剤9の外観が示されている。各画像IM11’〜IM14’において錠剤9の輪郭は理想的には楕円形状を有する。
FIG. 19 schematically shows an example of a captured image IM1 '. The captured image IM1 'is an image obtained by imaging the
図19の例示では、画像IM11’〜IM14’において錠剤9の表面上の各点の対応関係が二点鎖線で示されている。このような対応関係は、例えば錠剤9の輪郭を示す関数に対応付けて予め設定されて、制御部8の記憶媒体に記憶されてもよい。
In the example of FIG. 19, the correspondence of each point on the surface of the
図19の例示では、画像IM11’〜IM14’には、マスク領域MR1〜MR4が設定されている。このマスク領域MR1〜MR4は、画素値が他の領域における画素値よりも大幅に高くなり得る領域である。このような領域は、照明用光源から照射された光が錠剤9で正反射されることにより生じる。つまり、この正反射光がミラー53、角錐型ミラー54およびレンズ群52を介して検査カメラ51の結像面の一部に結像されると、その結像面の一部に対応する領域(正反射領域)内の画素の画素値が他の画素値よりも大幅に高くなる。そこで、この正反射領域を含むようにマスク領域が設定される。これにより、錠剤9上の光の強弱を欠陥と誤検出することを回避できる。
In the example of FIG. 19, mask areas MR1 to MR4 are set in the images IM11 'to IM14'. The mask regions MR1 to MR4 are regions in which the pixel values can be much higher than those in the other regions. Such a region is generated by specular reflection of light emitted from the illumination light source by the
ここでは照明用光源としてリング状の光源を想定しているので、図19の例では、マスク領域MR1〜MR4が楕円状のリング領域で示されている。マスク領域MR1は例えば錠剤9の輪郭を示す関数に対応付けて予め設定されていてもよい。あるいは、制御部8は例えば画像IM11’内の画素の画素値がマスク閾値よりも大きい領域を特定し、その領域をマスク領域MR1に設定してもよい。マスク領域MR2〜MR4も同様である。マスク閾値は例えば予め設定されて制御部8の記憶媒体に記憶されていてもよい。
Here, since a ring-shaped light source is assumed as the illumination light source, in the example of FIG. 19, the mask regions MR1 to MR4 are shown as elliptical ring regions. The mask area MR1 may be set in advance in association with a function indicating the outline of the
複数の撮像方向から錠剤9を撮像するので、各撮像方向に対応する正反射領域は錠剤9の表面上で互いに異なる。もちろん、2つの撮像方向に対応する正反射領域の一部どうしが錠剤9の表面上で重なる場合はある。しかし、3以上の正反射領域が錠剤9の表面上の同じ領域で互いに重なることは少ない。つまりマスク領域MR1〜MR4を錠剤9の表面に投影した場合、マスク領域MR1〜MR4の2つは錠剤9の表面上において重なり合うものの、3つが同じ領域で重なり合うことはまれである。4つが同じ領域で重なり合う可能性はさらに低い。もし仮にマスク領域MR1〜MR4が同じ領域で重なり合えば、その領域は画像IM11’〜IM14’においてマスク領域MR1〜MR4内に含まれることになるので、画像IM11’〜IM14’のいずれにおいても検査対象にならない。しかしそのような可能性は非常に低いのである。
Since
ここでは、マスク領域MR1〜MR4の4つは同じ領域で重なり合わないものとする。この場合、錠剤9のうち画像IM11’〜IM14’のいずれにも写る共通面は次の4種の領域に分割される。即ち、第1領域は、画像IM11’〜IM14’の全てにおいて検査対象領域内に位置する領域であり、第2領域は、画像IM11’〜IM14’の3つのみにおいて検査対象領域内に位置する領域であり、第3領域は、画像IM11’〜IM14’の2つのみにおいて検査対象領域内に位置する領域であり、第4領域は、画像IM11’〜IM14’の一つのみにおいて検査対象領域内に位置する領域である。
Here, it is assumed that the four mask regions MR1 to MR4 do not overlap in the same region. In this case, the common surface of the
<検査処理>
次に糖衣錠たる錠剤9についての検査処理について説明する。この錠剤9は図2の錠剤9と違って主面と側面との明確な境界を有さない。よって、制御部8は主面領域と側面領域とを特定することは困難であるので、欠陥候補の位置を錠剤領域に対する位置で把握する。そこで制御部8は特定処理において錠剤領域の輪郭を特定する。
<Inspection processing>
Next, inspection processing for the sugar-coated
図20は、検査処理の一例を示すフローチャートである。ステップS211にて、制御部8はステップS21と同様にしてエッジ画像を生成する。次にステップS212にて、制御部8はステップS22と同様にして錠剤エッジを特定する。次にステップS213にて、楕円の関数に基づいて当該錠剤エッジに近似する近似線(楕円)を、錠剤領域の輪郭として特定する。より一般的に説明すると、IM11〜IM14における錠剤9の輪郭を示す基準関数に基づいて錠剤エッジに近似する近似線を特定する。次にステップS214にて、制御部8は例えば図19に示すようにマスク領域を設定する。
FIG. 20 is a flowchart illustrating an example of the inspection process. In step S211, the
次に制御部8は各画像IM11’〜IM14’に対して候補検出処理を行う。候補検出処理は上述した通りである。これにより、各画像IM11’〜IM14’において、欠陥候補が検出されて錠剤領域に対する欠陥候補の位置が特定される。
Next, the
制御部8は欠陥真偽処理において次にように動作する。即ち、制御部8は、第1領域から第3領域については、画像IM11’〜IM14’のうち2以上の画像で共通の欠陥候補が検出されているときに、錠剤9に欠陥が生じていると判断する。制御部8は、第4領域については、画像IM11’〜IM14’の1つにおいて欠陥候補が検出されたときに、錠剤9に欠陥が生じていると判断する。
The
具体的な欠陥真偽処理の一例は、図15を参照して説明した側面領域に対する欠陥真偽処理と同様である。具体的には、「側面領域」および「錠剤の側面」をそれぞれ「錠剤領域」および「錠剤」に読み替えればよい。 An example of a specific defect authenticity process is similar to the defect authenticity process for the side surface area described with reference to FIG. Specifically, "side area" and "side of tablet" may be read as "tablet area" and "tablet", respectively.
変形例.
<錠剤の主面>
上述の例では、主面9bが搬送ベルト41側を向く姿勢で搬送された錠剤9を検査対象として説明した。錠剤9の主面9aが搬送ベルト41を向く姿勢で錠剤9が搬送される場合には、錠剤検査装置1は錠剤9の主面9bおよび側面9cに対する外観検査を行うことになる。
Modified example.
<Principal surface of tablet>
In the above-mentioned example, the
また例えば錠剤9に対する外観検査の後に、錠剤9の搬送姿勢を反転させ、その状態で錠剤9に対する外観検査を行ってもよい。これによれば、錠剤9の全面(主面9a,9bおよび側面9c)に対する外観検査を行うことができる。
For example, after the appearance inspection on the
以上のように、錠剤検査方法および錠剤検査装置は詳細に説明されたが、上記した説明は、全ての局面において例示であって、この開示がそれに限定されるものではない。また上述した各種変形例は、相互に矛盾しない限り組み合わせて適用可能である。そして、例示されていない多数の変形例が、この開示の範囲から外れることなく想定され得るものと解される。 As mentioned above, although the tablet inspection method and the tablet inspection device were explained in detail, the above-mentioned explanation is illustration in all the aspects, and this indication is not limited to it. The various modifications described above can be combined and applied as long as they do not contradict each other. And, it is understood that many variations not illustrated may be envisaged without departing from the scope of the present disclosure.
1 錠剤検査装置
5 撮像部(撮像ヘッド)
8 画像処理部(制御部)
9 錠剤
9a 第1主面(主面)
9b 第2主面(主面)
9c 側面
d1,d2 欠陥候補
IM1,IM1’ 撮像画像
IM11〜IM14,IM11’〜IM14 画像
MR1〜MR4 マスク領域
P0 錠剤エッジ
P1 側面外側エッジ
P2 主面外側エッジ
P3 境界エッジ
P23 主面エッジ
R1 探索領域
Ra 主面領域
Rc 側面領域
TR 錠剤領域
1
8 Image processing unit (control unit)
9
9b Second main surface (main surface)
9c Side surface d1, d2 defect candidate IM1, IM1 'Image pickup image IM11 to IM14, IM11' to IM14 Image MR1 to MR4 Mask area P0 Tablet edge P1 Side outer edge P2 Main surface outer edge P3 Boundary edge P23 Main surface edge R1 Search area Ra Main area Rc Side area TR Tablet area
Claims (12)
錠剤を撮像して、複数の撮像方向から見た錠剤の外観がそれぞれ写る複数の画像を含む撮像画像を生成する工程(a)と、
錠剤の欠陥候補を検出する検査処理を、前記撮像画像に対して行う工程(b)と、
前記検査処理によって、前記複数の画像に写る前記錠剤の第1領域において、前記複数の画像のうち2以上の画像で共通の欠陥候補が検出されたときに、前記錠剤に欠陥が生じていると判断する工程(c)と
を備える、錠剤検査方法。 A tablet inspection method for inspecting the appearance of a tablet, comprising
Imaging the tablet to generate a captured image including a plurality of images in which the appearance of the tablet viewed from the plurality of imaging directions is captured;
Performing an inspection process of detecting a defect candidate of a tablet on the captured image;
When a defect candidate is generated in the tablet when a common defect candidate is detected in two or more of the plurality of images in the first region of the tablet captured in the plurality of images by the inspection process A tablet inspection method comprising the step of determining (c).
前記錠剤の第2領域は前記複数の画像のうちn(nは2以上の整数)個の画像のみに写っており、
前記検査処理によって、前記n個の画像のうち2以上の画像で共通の欠陥候補が前記第2領域において検出されたときに、前記錠剤に欠陥が生じていると判断する工程(d)を更に備える、錠剤検査方法。 The tablet inspection method according to claim 1, wherein
The second region of the tablet is included in only n (n is an integer of 2 or more) of the plurality of images.
When a defect candidate common to two or more of the n images is detected in the second region by the inspection process, the step (d) of judging that the tablet has a defect is further included. Have a tablet inspection method.
前記錠剤の第3領域は前記複数の画像のうち1つの画像のみに写っており、
前記検査処理によって、前記1つの画像の前記第3領域において欠陥候補が検出されたときに、前記錠剤に欠陥が生じていると判断する工程(f)を更に備える、錠剤検査方法。 The tablet inspection method according to claim 1 or 2, wherein
The third region of the tablet is captured in only one of the plurality of images,
The tablet inspection method further provided with the process (f) of judging that a defect has arisen in the tablet, when a defect candidate is detected in the 3rd field of the one picture by the inspection processing.
前記検査処理の検査対象とならないマスク領域が前記複数の画像ごとに設定され、
前記錠剤の第4領域は前記複数の画像のうちm(2以上の整数)個の画像のみにおいて前記マスク領域以外の検査対象領域に写っており、
前記工程(c)において、
前記検査処理によって、前記m個の画像のうち2以上の画像で共通の欠陥候補が前記第4領域において検出されたときに、前記錠剤に欠陥が生じていると判断する、錠剤検査方法。 A tablet inspection method according to any one of claims 1 to 3, wherein
Mask regions not to be inspected in the inspection process are set for each of the plurality of images;
The fourth area of the tablet is captured in an examination area other than the mask area only in m (an integer of 2 or more) of the plurality of images.
In the step (c),
The tablet inspection method which judges that a defect has arisen in the tablet, when a common defect candidate is detected in the 4th field among two or more pictures of the m pieces by the inspection processing.
前記複数の画像のそれぞれにおいて、前記錠剤に対する光の正反射によって画素値が他の領域よりも所定値以上高くなる領域を含む領域が前記マスク領域に設定される、錠剤検査方法。 The tablet inspection method according to claim 4, wherein
The tablet inspection method, wherein in each of the plurality of images, a region including a region where a pixel value is higher by a predetermined value or more than other regions due to regular reflection of light to the tablet is set as the mask region.
前記錠剤は、前記第1領域たる第1主面と、前記第1主面と対面する第2主面と、前記第1主面の周縁および前記第2主面の周縁を連結する側面とを有し、
前記複数の画像のそれぞれにおいて前記錠剤の側面が占める側面領域の両側に位置する端領域が前記マスク領域に設定される、錠剤検査方法。 A tablet inspection method according to claim 4 or claim 5, wherein
The tablet has a first main surface which is the first region, a second main surface facing the first main surface, and a side surface connecting the peripheral edge of the first main surface and the peripheral edge of the second main surface. Have
The tablet inspection method according to claim 1, wherein end regions located on both sides of a side surface area occupied by the side surface of the tablet in each of the plurality of images are set in the mask area.
前記錠剤は、前記第1領域たる第1主面と、前記第1主面と対面する第2主面と、前記第1主面の周縁および前記第2主面の周縁を連結する側面とを有し、
前記工程(b)は、
前記複数の画像の各々において、前記錠剤の前記第1主面が示す主面領域の輪郭に対応した主面エッジを特定する工程(b1)と、
前記複数の画像の各々において、前記主面領域の輪郭の形状として予め決められた関数に基づいて、前記主面エッジの近似線を前記主面領域の輪郭として求める工程(b2)と、
前記複数の画像の各々において欠陥候補を検出する工程(b3)と
を有し、
前記工程(c)において、前記主面領域に対する各画素の位置の前記複数の画像の相互間における対応関係に基づいて、前記工程(b3)で検出された欠陥候補が前記2以上の画像において共通するのか否かを判断する、錠剤検査方法。 The tablet inspection method according to any one of claims 1 to 6,
The tablet has a first main surface which is the first region, a second main surface facing the first main surface, and a side surface connecting the peripheral edge of the first main surface and the peripheral edge of the second main surface. Have
In the step (b),
Identifying a main surface edge corresponding to an outline of a main surface area indicated by the first main surface of the tablet in each of the plurality of images;
In each of the plurality of images, a step (b2) of finding an approximation line of the main surface edge as the contour of the main surface region based on a function predetermined as a shape of the contour of the main surface region;
Detecting a defect candidate in each of the plurality of images (b3);
In the step (c), the defect candidate detected in the step (b3) is common to the two or more images based on the correspondence between the plurality of images of the position of each pixel with respect to the main surface region. A tablet inspection method to determine whether to
前記錠剤の前記第1主面は平面視で略円形状を有しており、
前記関数は楕円を示す関数であり、前記近似線は楕円である、錠剤検査方法。 The tablet inspection method according to claim 7, wherein
The first main surface of the tablet has a substantially circular shape in plan view,
The tablet inspection method, wherein the function is a function indicating an ellipse, and the approximate line is an ellipse.
前記錠剤は略円盤形状を有しており、
前記複数の画像の各々において、前記錠剤の側面が占める側面領域と、前記主面領域とは錠剤領域を構成しており、
前記複数の画像の各々を検査画像と呼ぶと、
前記工程(b1)は、
前記検査画像に対してエッジ検出処理を行ってエッジ画像を生成する工程(b11)と、
前記検査画像において前記錠剤領域の輪郭に対応する錠剤エッジを、前記エッジ画像から特定する工程(b12)と、
前記検査画像において前記第1主面の周縁のうち前記錠剤領域の輪郭の一部となる部分、および、前記検査画像における前記第2主面の周縁にそれぞれ対応する主面外側エッジおよび側面外側エッジを、前記錠剤エッジから抽出する工程(b13)と、
前記エッジ画像において、前記側面外側エッジから所定方向に沿って所定距離はなれた探索領域内の画素を探索して、前記主面領域と前記側面領域との間の境界に対応する境界エッジを特定する工程(b14)と、
前記主面外側エッジおよび前記境界エッジの一組を前記主面エッジとして特定する工程(b14)と
を備える、錠剤検査方法。 A tablet inspection method according to claim 7 or 8, wherein
The tablet has a substantially disc shape,
In each of the plurality of images, the side surface area occupied by the side surface of the tablet and the main surface area constitute a tablet area,
When each of the plurality of images is referred to as an examination image,
In the step (b1),
Performing an edge detection process on the inspection image to generate an edge image (b11);
Identifying a tablet edge corresponding to the contour of the tablet area in the inspection image from the edge image (b12);
A main surface outer edge and a side surface outer edge respectively corresponding to a part of the periphery of the first main surface which is a part of the contour of the tablet area in the inspection image and the periphery of the second main surface in the inspection image Extracting from the tablet edge (b13),
In the edge image, a pixel in a search area which is separated by a predetermined distance from the side outer edge along a predetermined direction is searched to specify a boundary edge corresponding to a boundary between the main area and the side area. A process (b14),
Identifying a pair of the main surface outer edge and the boundary edge as the main surface edge (b14).
前記工程(b14)では、
前記エッジ画像の前記探索領域内の画素であって、当該画素に対応する前記検査画像の画素の画素値が所定閾値よりも大きな画素を探索して、前記境界エッジを特定する、錠剤検査方法。 The tablet inspection method according to claim 9,
In the step (b14),
The tablet inspection method which is a pixel in the search area of the edge image, and searches for a pixel whose pixel value of the inspection image corresponding to the pixel is larger than a predetermined threshold to specify the boundary edge.
前記工程(b14)では、
前記探索領域において、前記側面外側エッジから前記主面外側エッジへ向かって画素を探索して、前記境界エッジを特定する、錠剤検査方法。 The tablet inspection method according to claim 9 or 10, wherein
In the step (b14),
The tablet inspection method which searches the pixel from said side face outer edge toward said main surface outer side edge in said search area, and specifies said border edge.
錠剤を撮像して、複数の撮像方向から見た錠剤の外観がそれぞれ写る複数の画像を含む撮像画像を生成する撮像部と、
画像処理部と
を備え、
前記画像処理部は、
錠剤の欠陥候補を検出する検査処理を、前記撮像画像に対して行う工程と、
前記検査処理によって、前記複数の画像に写る前記錠剤の第1領域において、前記複数の画像のうち2以上の画像で共通の欠陥候補が検出されたときに、前記錠剤に欠陥が生じていると判断する工程と
を実行する、錠剤検査装置。 A tablet inspection apparatus for inspecting the appearance of a tablet, comprising:
An imaging unit configured to image a tablet and generate a captured image including a plurality of images in which the appearance of the tablet viewed from the plurality of imaging directions is captured;
And an image processing unit,
The image processing unit
Performing an inspection process for detecting a defect candidate of a tablet on the captured image;
When a defect candidate is generated in the tablet when a common defect candidate is detected in two or more of the plurality of images in the first region of the tablet captured in the plurality of images by the inspection process Tablet inspection device which performs and the process to judge.
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018004206A JP7083646B2 (en) | 2018-01-15 | 2018-01-15 | Tablet inspection method and tablet inspection equipment |
CN202310949454.2A CN116973369A (en) | 2018-01-15 | 2018-12-28 | Tablet inspection method and tablet inspection device |
CN201880086537.0A CN111602047B (en) | 2018-01-15 | 2018-12-28 | Tablet inspection method and tablet inspection device |
PCT/JP2018/048426 WO2019138930A1 (en) | 2018-01-15 | 2018-12-28 | Tablet inspection method and tablet inspection device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018004206A JP7083646B2 (en) | 2018-01-15 | 2018-01-15 | Tablet inspection method and tablet inspection equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019124518A true JP2019124518A (en) | 2019-07-25 |
JP7083646B2 JP7083646B2 (en) | 2022-06-13 |
Family
ID=67398504
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018004206A Active JP7083646B2 (en) | 2018-01-15 | 2018-01-15 | Tablet inspection method and tablet inspection equipment |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7083646B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2021009088A (en) * | 2019-07-02 | 2021-01-28 | フロイント産業株式会社 | Printing inspection device and printing inspection method |
CN117274251A (en) * | 2023-11-20 | 2023-12-22 | 山东鲁抗医药集团赛特有限责任公司 | Tablet quality detection method in medicine production process based on image data |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000242791A (en) * | 1999-02-23 | 2000-09-08 | Mitsubishi Heavy Ind Ltd | Image processing method |
JP2005172608A (en) * | 2003-12-11 | 2005-06-30 | Nichizou Imc:Kk | Appearance inspecting apparatus |
JP2005241488A (en) * | 2004-02-27 | 2005-09-08 | Sankyo:Kk | Imaging device for photographing direct view face and non-direct view face concurrently, and tablet inspecting imaging system applied with the same |
JP2009031247A (en) * | 2007-12-28 | 2009-02-12 | Lion Engineering Co Ltd | Article appearance inspecting apparatus and surface inspecting apparatus |
JP2011137704A (en) * | 2009-12-28 | 2011-07-14 | Lion Engineering Co Ltd | Visual inspection apparatus, surface inspection apparatus, and visual inspection method |
US20120293623A1 (en) * | 2011-05-17 | 2012-11-22 | Gii Acquisition, Llc Dba General Inspection, Llc | Method and system for inspecting small manufactured objects at a plurality of inspection stations and sorting the inspected objects |
JP2016057075A (en) * | 2014-09-05 | 2016-04-21 | 株式会社Screenホールディングス | Inspection device and inspection method |
-
2018
- 2018-01-15 JP JP2018004206A patent/JP7083646B2/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000242791A (en) * | 1999-02-23 | 2000-09-08 | Mitsubishi Heavy Ind Ltd | Image processing method |
JP2005172608A (en) * | 2003-12-11 | 2005-06-30 | Nichizou Imc:Kk | Appearance inspecting apparatus |
JP2005241488A (en) * | 2004-02-27 | 2005-09-08 | Sankyo:Kk | Imaging device for photographing direct view face and non-direct view face concurrently, and tablet inspecting imaging system applied with the same |
JP2009031247A (en) * | 2007-12-28 | 2009-02-12 | Lion Engineering Co Ltd | Article appearance inspecting apparatus and surface inspecting apparatus |
JP2011137704A (en) * | 2009-12-28 | 2011-07-14 | Lion Engineering Co Ltd | Visual inspection apparatus, surface inspection apparatus, and visual inspection method |
US20120293623A1 (en) * | 2011-05-17 | 2012-11-22 | Gii Acquisition, Llc Dba General Inspection, Llc | Method and system for inspecting small manufactured objects at a plurality of inspection stations and sorting the inspected objects |
JP2016057075A (en) * | 2014-09-05 | 2016-04-21 | 株式会社Screenホールディングス | Inspection device and inspection method |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2021009088A (en) * | 2019-07-02 | 2021-01-28 | フロイント産業株式会社 | Printing inspection device and printing inspection method |
CN117274251A (en) * | 2023-11-20 | 2023-12-22 | 山东鲁抗医药集团赛特有限责任公司 | Tablet quality detection method in medicine production process based on image data |
CN117274251B (en) * | 2023-11-20 | 2024-02-06 | 山东鲁抗医药集团赛特有限责任公司 | Tablet quality detection method in medicine production process based on image data |
Also Published As
Publication number | Publication date |
---|---|
JP7083646B2 (en) | 2022-06-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11636585B2 (en) | Substrate defect inspection apparatus, substrate defect inspection method, and storage medium | |
TWI778078B (en) | Method and system for automatic defect classification and related non-transitory computer program product | |
US20020196432A1 (en) | Defect detector and method of detecting defect | |
JP2014129224A (en) | Method for producing glass product from glass product material, and assembly apparatus for executing method | |
US20200408698A1 (en) | Apparatus and method for inspecting a glass sheet | |
US11280744B2 (en) | Appearance inspection apparatus and appearance inspection method | |
JP2000180382A (en) | Visual examination apparatus | |
JP2019124518A (en) | Tablet inspection method and tablet inspection device | |
WO2019138930A1 (en) | Tablet inspection method and tablet inspection device | |
EP3428626B1 (en) | Inspecting method, inspection system and manufacturing method | |
JP4910800B2 (en) | Screw parts inspection device and inspection method | |
KR20140031392A (en) | Container mouth portion inspection method and device | |
JP6623545B2 (en) | Inspection system, inspection method, program, and storage medium | |
JP7075218B2 (en) | Tablet inspection method and tablet inspection equipment | |
JP7011348B2 (en) | Foreign matter inspection device and foreign matter inspection method | |
JP6168834B2 (en) | Optical film defect determination method | |
TWI779055B (en) | Damage inspection method of optical display panel | |
JP6980538B2 (en) | Tablet inspection method and tablet inspection equipment | |
TWI728708B (en) | Automated optical inspection system and metod for inspecting defect in contact lens edge the same | |
TWI776152B (en) | Inspection apparatus for equipment of handling electronic components | |
WO2023119882A1 (en) | Wafer external appearance inspecting device | |
JPS63225156A (en) | Method for inspecting inner surface of container | |
JP7081086B2 (en) | Inspection equipment, inspection method | |
JP2022138855A (en) | Inspection method and device of semiconductor chip | |
JP2019124493A (en) | Appearance inspection device, and appearance inspection method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201218 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20211109 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220106 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20220524 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220601 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7083646 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |