JP2014067426A - Tablet packaging inspection apparatus, and tablet packaging inspection method - Google Patents

Tablet packaging inspection apparatus, and tablet packaging inspection method Download PDF

Info

Publication number
JP2014067426A
JP2014067426A JP2013225861A JP2013225861A JP2014067426A JP 2014067426 A JP2014067426 A JP 2014067426A JP 2013225861 A JP2013225861 A JP 2013225861A JP 2013225861 A JP2013225861 A JP 2013225861A JP 2014067426 A JP2014067426 A JP 2014067426A
Authority
JP
Japan
Prior art keywords
tablet
unit
image
declination
value
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.)
Pending
Application number
JP2013225861A
Other languages
Japanese (ja)
Inventor
Yoshitaka Sato
嘉隆 佐藤
Minoru Fujita
稔 藤田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Toshiba Digital Solutions Corp
Original Assignee
Toshiba Corp
Toshiba Solutions Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp, Toshiba Solutions Corp filed Critical Toshiba Corp
Priority to JP2013225861A priority Critical patent/JP2014067426A/en
Publication of JP2014067426A publication Critical patent/JP2014067426A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a tablet packaging inspection apparatus improving inspection precision of presence of foreign matter sticking to a tablet surface and chipping of the tablet.SOLUTION: A tablet packaging inspection apparatus comprises: a tablet cut unit 2 for cutting an area where one tablet is captured respectively out of a captured image; a coordinate converter 4A for preparing an image that the image capturing cut one tablet is converted into a polar coordinate making the center of the tablet a pole and making the distance from the center and the declination axes respectively; a projection data calculation unit 5 for totalizing gray level every declination from the made image; a mask processing unit 6 for masking a summary value which is less than a value determined based on the gray level of a secant on the tablet in the summary values totalized every declination; and a determination unit 7A for determining whether a value less than the threshold exists among the summary values totalized every declination except the masked summary values.

Description

本発明は、錠剤表面に異物が付着しているか、または錠剤の一部が崩落することで生じる欠損箇所があるかを検査する技術に関する。   The present invention relates to a technique for inspecting whether a foreign substance is attached to a tablet surface or whether there is a defective portion caused by a part of a tablet collapsing.

医薬品を製造する製薬会社では、出荷前に、錠剤(素錠)の品質に関する検査を行っている。この検査工程では、錠剤表面に異物が付着しているか、また錠剤の一部が崩落することで生じる欠損箇所(以下チッピングと称す)があるか等の検査が行われる。   A pharmaceutical company that manufactures pharmaceuticals inspects the quality of tablets (uncoated tablets) before shipping. In this inspection process, an inspection is performed to determine whether foreign matter is adhered to the tablet surface and whether there is a defective portion (hereinafter referred to as chipping) caused by a part of the tablet collapsing.

また、錠剤の一部には、半分に割りやすくするための割線が入っている。   In addition, a part of the tablet has a secant for easy splitting in half.

関連する技術にとして、以下の技術が開示されている。   The following technologies are disclosed as related technologies.

特開2002−99898号公報JP 2002-99898 A 特開2005−164272号公報JP 2005-164272 A 特開平11−73508号公報Japanese Patent Laid-Open No. 11-73508 特開平10−104076号公報Japanese Patent Laid-Open No. 10-104076

画像を用いて、錠剤を検査する方法において、異物の付着およびチッピングを誤検出する場合がある。また、錠剤は人体に入るものであるため、精度の高い検査が求められている。   In a method for inspecting a tablet using an image, there is a case where foreign matter adhesion and chipping are erroneously detected. Moreover, since a tablet enters the human body, a highly accurate inspection is required.

本発明は、上述した問題点を解決するためになされたものであり、錠剤の異物の付着やチッピングの有無を、より高い精度で検査する技術を提供することを目的とする。   The present invention has been made to solve the above-described problems, and an object of the present invention is to provide a technique for inspecting the presence or absence of foreign matter adhesion or chipping of a tablet with higher accuracy.

上述した課題を解決するため、本発明の一態様に係る錠剤包装検査装置は、凹部に錠剤が一つまたは複数供給されたプラスチックシートを撮像する撮像部と、前記撮像部によって撮像された画像から、錠剤一つが撮像されている領域をそれぞれ切り出す錠剤切り出し部と、前記錠剤切り出し部によって切り出された一つの錠剤が撮像された画像から、前記錠剤の中心を極とした極座標に変換した画像であって、前記中心からの距離、および偏角をそれぞれ軸とした画像を作成する座標変換部と、前記座標変換部によって作成された画像から、前記偏角ごとに濃度値をそれぞれ集計する集計部と、前記集計部によって偏角ごとに集計された集計値のうち、前記錠剤に入っている割線の濃度値に基づき決定された値を下回る集計値をマスクするマスク処理部と、前記集計部によって偏角ごとに集計された集計値のうち、かつ前記マスク処理部によってマスクされた集計値以外の集計値のうちで、閾値を下回る値があるかを判定する判定部と、前記錠剤切り出し部によって切り出された画像それぞれが処理されるように、前記座標変換部、前記集計部、前記マスク処理部、前記判定部を制御する実行制御部とを有する。   In order to solve the above-described problem, a tablet packaging inspection device according to an aspect of the present invention includes an imaging unit that images a plastic sheet in which one or more tablets are supplied to a recess, and an image captured by the imaging unit. A tablet cutout unit that cuts out an area where one tablet is imaged, and an image obtained by imaging one tablet cut out by the tablet cutout unit into polar coordinates centered on the tablet. A coordinate conversion unit that creates an image centered on the distance from the center and the declination, respectively, and a totaling unit that totalizes density values for each declination from the image created by the coordinate conversion unit; A mask that masks aggregate values that are less than a value determined based on the concentration value of the secant in the tablet among the aggregate values that are aggregated for each declination by the aggregation unit. Among the aggregate values aggregated for each declination by the aggregation processor and the aggregate values other than the aggregate values masked by the mask processor, determine whether there is a value below the threshold value A determination unit; and an execution control unit that controls the coordinate conversion unit, the aggregation unit, the mask processing unit, and the determination unit so that each of the images cut out by the tablet cutout unit is processed.

また、上述した課題を解決するため、本発明の一態様に係る錠剤包装検査装置は、凹部に錠剤が一つまたは複数供給されたプラスチックシートを撮像する撮像部と、前記撮像部によって撮像された画像から、錠剤一つが撮像されている領域をそれぞれ切り出す錠剤切り出し部と、前記錠剤切り出し部によって切り出された一つの錠剤が撮像された画像を二値化する二値化部と、前記二値化部によって二値化された画像に対し、前記錠剤の中心を極とした極座標に変換した画像であって、前記中心からの距離、および偏角をそれぞれ軸とした画像を作成する座標変換部と、前記座標変換部によって作成された画像から、前記偏角ごとに濃度値をそれぞれ集計する集計部と、前記集計部によって偏角ごとに集計された集計値のうち、閾値を下回る値があるかを判定する判定部と、前記錠剤切り出し部によって切り出された画像それぞれが処理されるように、前記二値化部、前記座標変換部、前記集計部、前記判定部を制御する実行制御部とを有する。   In order to solve the above-described problem, a tablet packaging inspection device according to one aspect of the present invention is imaged by an imaging unit that images a plastic sheet in which one or a plurality of tablets are supplied to a recess, and the imaging unit. A tablet cutout unit that cuts out an area where one tablet is imaged from the image, a binarization unit that binarizes an image of one tablet cut out by the tablet cutout unit, and the binarization A coordinate conversion unit that creates an image converted into polar coordinates with the center of the tablet as a pole with respect to the image binarized by the unit, the distance from the center, and an image with the declination as an axis, respectively The totaling unit that totalizes the density values for each declination from the image created by the coordinate conversion unit, and the total value that is totaled for each declination by the totaling unit is below the threshold value An execution control for controlling the binarization unit, the coordinate conversion unit, the aggregation unit, and the determination unit so that each of the image cut out by the determination unit and the tablet cutout unit is processed. Part.

上述した課題を解決するため、本発明の一態様に係る錠剤包装検査装置は、凹部に錠剤が一つまたは複数供給されたプラスチックシートを撮像する撮像部と、前記撮像部によって撮像された画像から、錠剤一つが撮像されている領域をそれぞれ切り出す錠剤切り出し部と、前記錠剤切り出し部によって切り出された一つの錠剤が撮像された画像から、前記錠剤の中心を極とした極座標に変換した画像であって、前記中心からの距離、および偏角をそれぞれ軸とした画像を作成する第1座標変換部と、前記第1座標変換部によって作成された画像から、前記偏角ごとに濃度値をそれぞれ集計する第1集計部と、前記第1集計部によって偏角ごとに集計された集計値のうち、前記錠剤に入っている割線の濃度値に基づき決定された値を下回る集計値をマスクするマスク処理部と、前記第1集計部によって偏角ごとに集計された集計値のうち、かつ前記マスク処理部によってマスクされた集計値以外の集計値のうちで、閾値を下回る値があるかを判定する第1判定部と、前記錠剤切り出し部によって切り出された一つの錠剤が撮像された画像を二値化する二値化部と、前記二値化部によって二値化された画像に対し、前記錠剤の中心を極とした極座標に変換した画像であって、前記中心からの距離、および偏角をそれぞれ軸とした画像を作成する第2座標変換部と、前記第2座標変換部によって作成された画像から、前記偏角ごとに濃度値をそれぞれ集計する第2集計部と、前記第2集計部によって偏角ごとに集計された集計値のうち、閾値を下回る値があるかを判定する第2判定部と、前記錠剤切り出し部によって切り出された画像それぞれが処理されるように、前記第1および第2座標変換部、前記第1および第2集計部、マスク処理部、前記第1および第2判定部、前記二値化部を制御する実行制御部とを有する。   In order to solve the above-described problem, a tablet packaging inspection device according to an aspect of the present invention includes an imaging unit that images a plastic sheet in which one or more tablets are supplied to a recess, and an image captured by the imaging unit. A tablet cutout unit that cuts out an area where one tablet is imaged, and an image obtained by imaging one tablet cut out by the tablet cutout unit into polar coordinates centered on the tablet. The first coordinate conversion unit that creates an image with the distance from the center and the declination as axes, and the density value for each declination from the image created by the first coordinate conversion unit The total which falls below the value determined based on the concentration value of the secant contained in the tablet among the total values calculated for each declination by the first totaling unit and the first totaling unit Among the aggregated values other than the aggregated values masked by the mask processing unit among the aggregated values aggregated for each declination by the mask processing unit and the first aggregation unit, A first determination unit that determines whether there is a binarization unit that binarizes an image obtained by imaging one tablet cut out by the tablet cutout unit, and an image binarized by the binarization unit On the other hand, a second coordinate conversion unit for generating an image converted into polar coordinates with the center of the tablet as a pole, the image having a distance from the center and a declination as axes, and the second coordinate conversion Whether there is a value less than the threshold value among the second totaling unit that totalizes the density values for each declination and the total value totaled for each declination by the second totaling unit from the image created by the unit A second determination unit for determining The first and second coordinate conversion units, the first and second tabulation units, the mask processing unit, the first and second determination units, so that each of the images cut out by the tablet cutting unit is processed. And an execution control unit that controls the binarization unit.

上述した課題を解決するため、本発明の一態様に係る錠剤包装検査方法は、撮像装置が、凹部に錠剤が一つまたは複数供給されたプラスチックシートを撮像し、コンピュータが、前記撮像装置によって撮像された画像を取得し、該画像から、錠剤一つが撮像されている領域をそれぞれ切り出し、切り出された一つの錠剤が撮像された画像から、前記錠剤の中心を極とした極座標に変換した画像であって、前記中心からの距離、および偏角をそれぞれ軸とした画像を作成し、作成された画像から、前記偏角ごとに濃度値をそれぞれ集計し、偏角ごとに集計された集計値のうち、前記錠剤に入っている割線の濃度値に基づき決定された値を下回る集計値をマスクし、偏角ごとに集計された集計値のうち、かつ前記マスクされた集計値以外の集計値のうちで、閾値を下回る値があるかを判定する処理を、前記切り出された画像それぞれに実行する。   In order to solve the above-described problem, in the tablet packaging inspection method according to one embodiment of the present invention, an imaging device images a plastic sheet in which one or a plurality of tablets are supplied to a recess, and a computer images using the imaging device. An image obtained by cutting out a region where one tablet is imaged from the image, and converting the image obtained by capturing one extracted tablet into polar coordinates with the center of the tablet as a pole. Then, an image is created with the distance from the center and the declination as axes, respectively, and from the created image, the density value is totaled for each declination, and the aggregated value aggregated for each declination Of these, the total value below the value determined based on the concentration value of the secant in the tablet is masked, and the total value other than the masked total value among the total values calculated for each declination In out, the process of determining whether there is a value below the threshold value, executes the each of the cut-out image.

錠剤表面に付着している異物や、錠剤のチッピングの有無の検査精度を向上することができる。   Inspection accuracy for foreign matter adhering to the tablet surface and the presence or absence of chipping of the tablet can be improved.

実施の形態1、2に係る錠剤包装装置の構成の一例を示す図である。It is a figure which shows an example of a structure of the tablet packaging apparatus which concerns on Embodiment 1,2. 実施の形態1に係る画像処理部の機能の一例を示すブロック図である。3 is a block diagram illustrating an example of functions of an image processing unit according to Embodiment 1. FIG. 実施の形態1に係る画像処理部の動作の一例を示すフローチャートである。6 is a flowchart illustrating an example of an operation of the image processing unit according to the first embodiment. 実施の形態1、2に係る処理対象の領域(ROI1)の一例を示す模式図である。6 is a schematic diagram illustrating an example of a region to be processed (ROI1) according to Embodiments 1 and 2. FIG. 実施の形態1、2に係る錠剤1つの領域(ROI)の一例を示す模式図である。It is a schematic diagram which shows an example of the one area | region (ROI) of the tablet which concerns on Embodiment 1,2. 実施の形態1、2に係る極座標変換および射影データを説明する図である。It is a figure explaining the polar coordinate conversion and projection data which concern on Embodiment 1,2. 実施の形態1、2に係るスムージング処理を説明する図である。It is a figure explaining the smoothing process which concerns on Embodiment 1,2. 実施の形態1、2に係る照明器具の配置の一例を示す図である。It is a figure which shows an example of arrangement | positioning of the lighting fixture which concerns on Embodiment 1,2. 実施の形態2に係る画像処理部の機能の一例を示すブロック図である。6 is a block diagram illustrating an example of functions of an image processing unit according to Embodiment 2. FIG. 実施の形態2に係る画像処理部の動作の一例を示すフローチャートである。10 is a flowchart illustrating an example of an operation of the image processing unit according to the second embodiment. 実施の形態2に係るマスク処理の一例を説明する図である。It is a figure explaining an example of the mask process which concerns on Embodiment 2. FIG.

以下、本発明の実施の形態について図面を参照しつつ説明する。尚、チッピングの有無の検査に対して有効な装置および方法を実施の形態1で説明し、異物付着の有無の検査に対して有効な装置および方法を実施の形態2で説明する。   Embodiments of the present invention will be described below with reference to the drawings. An apparatus and method effective for the inspection for the presence / absence of chipping will be described in the first embodiment, and an apparatus and method effective for the inspection for the presence / absence of foreign matter will be described in the second embodiment.

(実施の形態1)
本実施の形態では、錠剤(素錠)のチッピングの有無を検査するのに有効な錠剤包装検査装置について説明する。また本実施の形態では、透過光(NIRまたはVIS)照明を用いて撮像した錠剤画像を用いて検査するものとする。
(Embodiment 1)
In this embodiment, a tablet packaging inspection apparatus effective for inspecting the presence or absence of chipping of a tablet (plain tablet) will be described. Moreover, in this Embodiment, it shall test | inspect using the tablet image imaged using transmitted light (NIR or VIS) illumination.

本実施の形態に係る錠剤包装装置の構成について、図1の模式図を参照しつつ説明する。錠剤包装装置100は、プラスチックシート搬送部10、凹部作成部20、錠剤供給部30、PTP(Press Through Package)シート搬送部40、シート結合部50、包装シート切り出し部60、取り出し部70、CCDカメラ80(撮像部)、画像処理部90を有する。尚、CCDカメラ80と画像処理部90とで錠剤包装検査装置が構成される。   The configuration of the tablet packaging device according to the present embodiment will be described with reference to the schematic diagram of FIG. The tablet packaging apparatus 100 includes a plastic sheet conveying unit 10, a recess creating unit 20, a tablet supplying unit 30, a PTP (Press Through Package) sheet conveying unit 40, a sheet combining unit 50, a packaging sheet cutting unit 60, a taking out unit 70, and a CCD camera. 80 (imaging unit) and an image processing unit 90. The CCD camera 80 and the image processing unit 90 constitute a tablet packaging inspection device.

プラスチックシート搬送部10は、プラスチックシート200を供給し、次の工程である凹部作成部20にプラスチックシート200を搬送する。プラスチックシート搬送部10は、複数の搬送ローラによって構成されている。凹部作成部20は、プラスチックシート搬送部10から搬送されたプラスチックシート200に、錠剤を入れるための凹部を鋳型を用いて作成する。凹部が作成されたプラスチックシート200は、複数の搬送ローラを経由してボード301まで搬送される。   The plastic sheet transport unit 10 supplies the plastic sheet 200 and transports the plastic sheet 200 to the recess creating unit 20 which is the next step. The plastic sheet transport unit 10 is composed of a plurality of transport rollers. The recess creating unit 20 creates a recess for putting a tablet in the plastic sheet 200 transported from the plastic sheet transport unit 10 using a mold. The plastic sheet 200 with the recesses is conveyed to the board 301 via a plurality of conveying rollers.

錠剤供給部30は、ボード301まで搬送されたプラスチックシート200上の凹部に錠剤201を一錠ずつ供給する。PTPシート搬送部40は、PTPシート202を供給し、シート結合部50まで搬送する。PTPシート搬送部40は、複数の搬送ローラによって構成されている。   The tablet supply unit 30 supplies the tablets 201 one by one to the recess on the plastic sheet 200 conveyed to the board 301. The PTP sheet conveying unit 40 supplies the PTP sheet 202 and conveys it to the sheet combining unit 50. The PTP sheet conveyance unit 40 is configured by a plurality of conveyance rollers.

シート結合部50は、PTPシート202と、凹部に錠剤201が供給されたプラスチックシート200とを結合する。   The sheet coupling unit 50 couples the PTP sheet 202 and the plastic sheet 200 in which the tablets 201 are supplied to the recesses.

包装シート切り出し部60は、PTPシート202とプラスチックシート200とが結合することで錠剤が包装されたシートを所定の大きさ、すなわち、錠剤の数が所定の数ずつとなるように切り出す。この切り出されたシートを包装シートと称する。取り出し部70は、切り出された包装シートを取り出す。ここで、取り出し部70は、CCDカメラ80、画像処理部90によって構成される錠剤包装検査装置によって不良と判定された包装シートを取り除く。   The packaging sheet cutting unit 60 cuts out the sheet in which the tablets are packaged by joining the PTP sheet 202 and the plastic sheet 200 so as to have a predetermined size, that is, a predetermined number of tablets. This cut sheet is referred to as a packaging sheet. The take-out unit 70 takes out the cut packaging sheet. Here, the take-out unit 70 removes the packaging sheet determined to be defective by the tablet packaging inspection apparatus configured by the CCD camera 80 and the image processing unit 90.

CCDカメラ80は、プラスチックシート200の凹部に供給された錠剤を所定区域ごとに撮像する。尚、この所定区域は、包装シート切り出し部60で切り出されるシートごとのサイズにより決定される。   The CCD camera 80 images the tablets supplied to the recesses of the plastic sheet 200 for each predetermined area. This predetermined area is determined by the size of each sheet cut out by the packaging sheet cutout section 60.

画像処理部90は、CPU、メモリ、不揮発性の記憶装置を少なくとも有するコンピュータであり、CCDカメラ80によって撮像された画像に対して処理演算することで、錠剤の異物付着やチッピングを検出する。   The image processing unit 90 is a computer having at least a CPU, a memory, and a non-volatile storage device. The image processing unit 90 detects a foreign substance adhering to the tablet or chipping by processing the image captured by the CCD camera 80.

次に、画像処理部90の機能を、図2の機能ブロックを参照しつつ説明する。画像処理部90は、重心位置算出部1、錠剤切り出し部2、二値化部3、座標変換部4、射影データ算出部5(集計部)、判定部7を有する。これら各機能ブロックは、予め上述の不揮発性の記憶装置に保存されているプログラムが上述のメモリにロードされ、上述のCPUがロードされたプログラムを演算実行することで実現される。   Next, the function of the image processing unit 90 will be described with reference to the functional block of FIG. The image processing unit 90 includes a center-of-gravity position calculation unit 1, a tablet cutout unit 2, a binarization unit 3, a coordinate conversion unit 4, a projection data calculation unit 5 (aggregation unit), and a determination unit 7. Each of these functional blocks is realized by a program stored in advance in the above-described nonvolatile storage device being loaded into the above-described memory, and the above-described CPU calculating and executing the loaded program.

重心位置算出部1は、CCDカメラ80で撮像された画像内の錠剤それぞれの重心位置(錠剤それぞれの中心位置)を算出する。錠剤切り出し部2は、重心位置算出部1によって算出された重心位置に基づき、錠剤個々の切り出し画像を作成する。錠剤切り出し部2は、撮像されている錠剤全ての切り出し画像を作成する。   The center-of-gravity position calculation unit 1 calculates the center-of-gravity position of each tablet in the image captured by the CCD camera 80 (the center position of each tablet). The tablet cutout unit 2 creates a cutout image of each tablet based on the barycentric position calculated by the barycentric position calculating unit 1. The tablet cutout unit 2 creates cutout images of all the tablets that have been imaged.

二値化部3は、錠剤切り出し部2によって切り出された画像、すなわち、一つの錠剤が撮像された画像を二値化する。二値化部3は、錠剤切り出し部2によって切り出された画像内の最大濃度値を選定し、選定した最大濃度値に基づき閾値を算出し、この閾値を用いて二値化する。   The binarization unit 3 binarizes the image cut out by the tablet cutout unit 2, that is, an image in which one tablet is captured. The binarization unit 3 selects the maximum density value in the image cut out by the tablet cutout unit 2, calculates a threshold value based on the selected maximum density value, and binarizes using the threshold value.

座標変換部4は、二値化部3によって二値化された画像に対し、錠剤の重心位置(錠剤の中心)を極とした極座標に変換した画像であって、重心位置からの距離、および偏角をそれぞれ縦軸、横軸とした画像を作成する。   The coordinate conversion unit 4 is an image obtained by converting the image binarized by the binarization unit 3 into polar coordinates with the tablet centroid position (tablet center) as a pole, and a distance from the centroid position, and Images are created with the declination being the vertical axis and the horizontal axis, respectively.

射影データ算出部5は、座標変換部4によって極座標変換された画像の、偏角ごとに濃度値をそれぞれ集計したデータ(射影データ)を算出する。   The projection data calculation unit 5 calculates data (projection data) obtained by collecting the density values for each declination of the image subjected to polar coordinate conversion by the coordinate conversion unit 4.

判定部7は、射影データ算出部5によって偏角ごとに集計された濃度値のうちで、閾値を下回る値があるかを判定することで、チッピングの有無を検出する。   The determination unit 7 detects the presence / absence of chipping by determining whether there is a value that is less than the threshold value among the density values collected for each declination by the projection data calculation unit 5.

次に、画像処理部90の動作について、図3のフローチャートを参照しつつ説明する。以下、入力画像を
IN(x,y)
とし、またCCDカメラ80より得られる画像の全体領域をROI1とする。
Next, the operation of the image processing unit 90 will be described with reference to the flowchart of FIG. Hereinafter, the input image is F IN (x, y)
In addition, the entire area of the image obtained from the CCD camera 80 is ROI1.

まず、重心位置算出部1は、CCDカメラ80より得られた画像を、所定の閾値(T)で二値化処理し、錠剤の領域とその他の領域とが分けられた画像FBHを作成することで、錠剤を抽出する(ステップS1)。本実施の形態では、得られる画像FBHは入力画像に対して二値化反転された画像となる。
BH=!(Bin(T)・FIN(x,y))
尚、「!(F)」の表記は、Fの論理否定を意味する。また、「A・B」の表記は、対象BにAの処理を実行することを意味する。
First, the center-of-gravity position calculation unit 1 binarizes the image obtained from the CCD camera 80 with a predetermined threshold value (T h ), and creates an image F BH in which the tablet area and other areas are separated. Thus, the tablet is extracted (step S1). In the present embodiment, the obtained image F BH is an image that is binarized and inverted with respect to the input image.
F BH =! (Bin (T h ) · F IN (x, y))
Note that the notation “! (F)” means a logical negation of F. Further, the notation “A · B” means that the process of A is executed on the target B.

次に、重心位置算出部1は、錠剤の重心位置を算出する(S2)。   Next, the barycentric position calculation unit 1 calculates the barycentric position of the tablet (S2).

ここで、錠剤の重心位置の算出について説明する。重心位置算出部1は、画像FBHに対しラベリング処理(LABEL・FBH)をすることで、画像FBH内の錠剤領域それぞれを識別するためのラベルを付与する。尚、重心位置算出部1は、所定の面積(TSL)以下の錠剤領域は除外する。その後、重心位置算出部1は、ラベルが付与された錠剤領域それぞれの重心位置(特徴量)を算出する。ここで得られた重心位置を(x(i),y(i))(i=0から(錠剤領域の数−1))とする。尚、重心位置算出部1は、重心位置をサブピクセル精度で算出する。よって、x(i)、y(i)の値は共に小数となる。 Here, calculation of the center of gravity position of the tablet will be described. Centroid position calculation unit 1, by labeling processing on the image F BH a (LABEL · F BH), imparts a label for identifying each tablet region in an image F BH. The center-of-gravity position calculation unit 1 excludes tablet regions having a predetermined area (T SL ) or less. Thereafter, the center-of-gravity position calculation unit 1 calculates the center-of-gravity position (feature amount) of each tablet region to which a label is attached. The center-of-gravity position obtained here is defined as (x c (i), y c (i)) (i = 0 to (number of tablet regions−1)). The centroid position calculation unit 1 calculates the centroid position with subpixel accuracy. Therefore, the values of x c (i) and y c (i) are both decimal numbers.

重心位置算出部1は、得られた重心位置(x(i),y(i))を図4で示すように整列する。すなわち、重心位置算出部1は、重心位置(x(i),y(i))を、CCDカメラ80で撮像されたROI1内の錠剤の配置となるように整列する。ここでは重心位置の最終結果を
(x (k,l),y (k,l))
とする。尚、図4に示されているように、mはROI1内の横方向(x方向)の錠剤数、nはROI1内の縦方向(y方向)の錠剤数とすると、k=0〜m−1、l=0〜n−1となる。また重心位置算出部1は、欠錠(錠剤が凹部に格納されていないもの)は(x (k,l)=−1、y (k,l)=−1)とする。
The center-of-gravity position calculation unit 1 aligns the obtained center-of-gravity positions (x c (i), y c (i)) as shown in FIG. That is, the center-of-gravity position calculation unit 1 aligns the center-of-gravity positions (x c (i), y c (i)) so that the tablets are arranged in the ROI 1 captured by the CCD camera 80. Here, the final result of the centroid position is (x c T (k, l), y c T (k, l))
And As shown in FIG. 4, when m is the number of tablets in the horizontal direction (x direction) in ROI1, and n is the number of tablets in the vertical direction (y direction) in ROI1, k = 0 to m−. 1, l = 0 to n−1. The center-of-gravity position calculation unit 1 sets (x c T (k, l) = − 1, y c T (k, l) = − 1) for missing tablets (those in which tablets are not stored in the recesses).

尚、図4の配置ごとに得られる画像の明度、コントラスト等が異なるため、本実施の形態で説明する各パラメータは、図4の配置単位でそれぞれ用意されているものとする。   Since the brightness, contrast, and the like of the image obtained for each arrangement in FIG. 4 are different, each parameter described in the present embodiment is prepared for each arrangement unit in FIG.

図3のフローチャートの説明に戻る。次に二値化部3は、入力画像FIN(x,y)内での錠剤それぞれの最大濃度を算出する(S3)。錠剤の最大濃度は錠剤ごとに算出される。 Returning to the flowchart of FIG. Next, the binarizing unit 3 calculates the maximum density of each tablet in the input image F IN (x, y) (S3). The maximum tablet concentration is calculated for each tablet.

二値化部3の錠剤の最大濃度算出方法について説明する。錠剤の最大濃度は、錠剤の中心付近となるため、本実施の形態ではかかる点を考慮した処理となっている。   A method for calculating the maximum concentration of the tablet in the binarizing unit 3 will be described. Since the maximum concentration of the tablet is in the vicinity of the center of the tablet, the processing in this embodiment takes this point into consideration.

まず二値化部3は、二値化画像FBH対し、錠剤領域それぞれを縮退させるための処理(錠剤領域の面積を錠剤の略中心位置に縮める処理)を行い、縮退処理後の画像FBH を得る。二値化部3は、縮退処理を予め設定された回数(Ne)実施する。
BH =ERODE(Ne)・FBH
First, the binarization unit 3 performs a process for shrinking each tablet area (a process for shrinking the area of the tablet area to the approximate center position of the tablet) on the binarized image F BH , and the image F BH after the shrink process is performed. Get E. The binarization unit 3 performs the degeneration process a predetermined number of times (Ne).
F BH E = ERODE (Ne) ・ F BH

次に二値化部3は、入力画像FIN(x,y)とFBH とをAND演算した画像、すなわち、錠剤の中心付近のみの画像を作成し、この画像を用いて錠剤ごとの最大濃度値をそれぞれ選定し、取得する。取得された錠剤ごとの濃度最大値は上述の重心位置同様に(k,l)のラベルで整列される。算出される最大濃度値を
max(k,l)
とする。
Next, the binarizing unit 3 creates an image obtained by ANDing the input image F IN (x, y) and F BH E , that is, an image only near the center of the tablet, and uses this image for each tablet. Select and obtain the maximum concentration value. The acquired maximum concentration value for each tablet is aligned with the label (k, l) as in the above-described center of gravity position. Calculate the maximum concentration value as G max (k, l)
And

図3のフローチャートの説明に戻る。二値化部3は、Gmax(k,l)を用いて、以下の式によって錠剤ごとの二値化閾値(T(k,l))を算出する(S4)。
(k,l)=Gmax(k,l)+Toff
尚、Toffは予め設定されたパラメータである。
Returning to the flowchart of FIG. The binarization unit 3 uses G max (k, l) to calculate a binarization threshold (T B (k, l)) for each tablet by the following equation (S4).
T B (k, l) = G max (k, l) + T off
T off is a preset parameter.

図3のフローチャートに説明を戻す。以降の処理は、錠剤個数分(図4の例では(m×n)個分)が実施されるまでループする(S5)。すなわち、kが0からm−1になるまで、かつlが0からn−1になるまで処理が繰り返される。   Returning to the flowchart of FIG. The subsequent processing loops until the number of tablets (for (m × n) in the example of FIG. 4) is executed (S5). That is, the process is repeated until k becomes 0 to m−1 and l becomes 0 to n−1.

錠剤切り出し部2は、入力画像FIN(x,y)から、1つの錠剤が撮像されている領域(以下、ROIと表記)を切り出す(S6)。 The tablet cutout unit 2 cuts out an area where one tablet is imaged (hereinafter referred to as ROI) from the input image F IN (x, y) (S6).

ここで、図5を参照しつつ錠剤切り出し部2の処理について説明する。錠剤切り出し部2は、重心位置算出部1によって算出された重心位置(x (k,l),y (k,l))に基づき、以下の式を用いてROI((x,y)−(x,y))を算出する。
=[x (k,l)]−w
=[y (k,l)]−w
=x+2w
=y+2w
ここでw は、錠剤一つが全て収まるような切り出し画像が得られるように予め決定されたパラメータであり、重心位置(x (k,l),y (k,l))からのx軸、y軸成分の距離である。また、[F]の表記は、浮動少数Fの整数値を意味する。
Here, the process of the tablet cutout unit 2 will be described with reference to FIG. Based on the centroid position (x c T (k, l), y c T (k, l)) calculated by the centroid position calculation unit 1, the tablet cutting unit 2 uses the following formula to calculate the ROI ((x 1 , Y 1 ) − (x 2 , y 2 )).
x 1 = [x c T (k, l)] − w h T
y 1 = [y c T (k, l)] − w h T
x 2 = x 1 + 2wh h T
y 2 = y 1 + 2wh h T
Here, w h T is a parameter determined in advance so as to obtain a cut-out image in which one tablet can be entirely accommodated, and the barycentric position (x c T (k, l), y c T (k, l)). X-axis and y-axis component distance from Moreover, the notation [F] means an integer value of the floating-point F.

図3のフローチャートの説明に戻る。二値化部3は、ステップS6で切り出された画像をステップS4で算出された二値化閾値T(k,l)で二値化することで、二値化画像(FBIN T(k,l))を作成する(S7)。
BIN T(k,l)=Bin(T(k,l))・FIN(ROI)
Returning to the flowchart of FIG. The binarization unit 3 binarizes the image cut out in step S6 with the binarization threshold value T B (k, l) calculated in step S4, so that the binarized image (F BIN T (k , L) ) is created (S7).
F BIN T (k, l) = Bin (T B (k, l)) · F IN (ROI)

次に、座標変換部4は、二値化画像FBIN T(k,l)を、中心((x (k,l)−x),(y (k,l)−y))で極座標変換した画像(FPOL T(k,l))を作成する(S8)。尚、((x (k,l)−x),(y (k,l)−y))は入力画像FIN(x,y)の左上端を基点とした座標系での表記である。座標変換部4は、極座標変換する際にはBilinear補間を行う。
POL T(k,l)=POLAR・FBIN T(k,l)
ここで、極座標変換画像FPOL T(k,l)の幅は(2×π×Re)、高さは(Re−Rs+1)となる。尚、Rsは極座標の縦軸rの始点(下限)であり、Reは縦軸rの終点(上限)であり、これらはパラメータとして事前に定義された値である。
Next, the coordinate conversion unit 4 converts the binarized image F BIN T (k, l) to the center ((x c T (k, l) −x 1 ), (y c T (k, l) −y). 1 )) The image (F POL T (k, l) ) that has been subjected to polar coordinate conversion in step 1) ) is created (S8). Note that ((x c T (k, l) −x 1 ), (y c T (k, l) −y 1 )) is a coordinate system based on the upper left corner of the input image F IN (x, y). It is a notation. The coordinate conversion unit 4 performs Bilinear interpolation when performing polar coordinate conversion.
F POL T (k, l) = POLAR · F BIN T (k, l)
Here, the polar coordinate conversion image F POL T (k, l) has a width of (2 × π × Re) and a height of (Re−Rs + 1). Rs is the starting point (lower limit) of the vertical axis r of polar coordinates, Re is the end point (upper limit) of the vertical axis r, and these are values defined in advance as parameters.

次に、射影データ算出部5は、極座標変換画像FPOL T(k,l)の、偏角ごとに濃度値をそれぞれ集計した射影データを作成する(S9)。 Next, the projection data calculation unit 5 creates projection data in which the density values are tabulated for each declination of the polar coordinate conversion image F POL T (k, l) (S9).

ここで、ステップS8、ステップS9について、図6を参照しつつ説明する。尚、図6で示した図では二値化を考慮していないが、図6(A)、(B)は、実際は二値化されている画像である。   Here, step S8 and step S9 will be described with reference to FIG. Although binarization is not considered in the diagram shown in FIG. 6, FIGS. 6A and 6B are actually binarized images.

二値化画像FBIN T(k,l)が例えば図6(A)である場合、座標変換部4は、二値化画像FBIN T(k,l)を、錠剤の重心位置(中心)を極とし、重心位置からの距離rを縦軸(y方向)、偏角θを横軸(x方向)とした座標系に変換した画像FPOL T(k,l)を作成する(図6(B)参照)。 When the binarized image F BIN T (k, l) is, for example, FIG. 6A , the coordinate conversion unit 4 converts the binarized image F BIN T (k, l) into the center of gravity (center) of the tablet. Is an image F POL T (k, l) converted into a coordinate system with the distance r from the center of gravity as the vertical axis (y direction) and the deflection angle θ as the horizontal axis (x direction) (FIG. 6 ) . (See (B)).

射影データ算出部5は、極座標変換画像FPOL T(k,l)の濃度値を、偏角θ(極座標変換画像FPOL T(k,l)の横軸成分)ごとにそれぞれ集計(足し算)し、縦軸を集計値、横軸を極座標変換画像FPOL T(k,l)の横軸の値とした射影データを作成する(図6(C)参照)。ここで、射影データ算出部5によって作成されたデータ上、チッピングのある箇所(および割り線箇所)の集計値が他の値と比較して特徴がある(図6(C)の例では集計値が低い)ことに留意する。射影データ算出部5は、集計値をそれぞれP T(k,l)(x)(xは図6(C)の横軸成分)に格納する。 Projection data calculating unit 5, respectively counts the density value of the polar coordinate conversion image F POL T (k, l) , for each deflection angle theta (horizontal axis component of the polar coordinate conversion image F POL T (k, l) ) ( addition) Then, projection data is created with the vertical axis representing the total value and the horizontal axis representing the value of the horizontal axis of the polar coordinate conversion image F POL T (k, l) (see FIG. 6C). Here, on the data created by the projection data calculation unit 5, the total value of the chipped portion (and the dividing line portion) is characterized in comparison with other values (in the example of FIG. 6C, the total value). Note that this is low). The projection data calculation unit 5 stores the total values in P j T (k, l) (x) (x is a horizontal axis component in FIG. 6C), respectively.

図3のフローチャートの説明に戻る。射影データ算出部5は、上述のようにして得られた射影データに対しスムージング処理を行う(S10)。上述のようにして得られた射影データは、図7(A)で示すように微小のノイズや微小区間のみの特出点があるため、射影データ算出部5は、これらを滑らかにしノイズ成分を減少させるためのスムージング処理を行う。スムージング処理は、以下の式を用いて行う。
PjmT(k,l)(x)=(ΣPjT(k,l)(x+p))/(2・Sm+1)
尚、数列の総和Σの範囲はp=x−Smからp=x+Smまでである。
Smは事前に定義されたパラメータであり、(2・Sm+1)は、PjmT(k,l)(x)のx方向のスムージングの幅になる。スムージングの幅が大きくなると、細かい変動がスムージングにより減衰するローパスフィルタとして作用する。
Returning to the flowchart of FIG. The projection data calculation unit 5 performs a smoothing process on the projection data obtained as described above (S10). As shown in FIG. 7A, the projection data obtained as described above has a minute noise or a special point of only a minute section. Therefore, the projection data calculation unit 5 smoothes the noise component and generates a noise component. A smoothing process is performed to reduce this. The smoothing process is performed using the following equation.
Pj mT (k, l) (x) = (ΣPj T (k, l) (x + p)) / (2 · Sm + 1)
Note that the range of the sum Σ of the sequence is from p = x−Sm to p = x + Sm.
Sm is a predefined parameter, and (2 · Sm + 1) is the smoothing width in the x direction of Pj mT (k, l) (x). When the smoothing width increases, it acts as a low-pass filter in which fine fluctuations are attenuated by smoothing.

次に、判定部7は、チッピングの判定を行う(S11)。ここで、判定部7による処理について説明する。判定部7は、以下の式を用いて平均値を算出する。
AVE=(ΣPjT(k,l)(x))/w
尚、数列の総和Σの範囲はx=0からx=w−1までであり、wはFPOL T(k,l)の幅である。
Next, the determination unit 7 determines chipping (S11). Here, the process by the determination part 7 is demonstrated. The determination unit 7 calculates an average value using the following formula.
P AVE = (ΣPj T (k, l) (x)) / w
The range of the sum Σ of the sequence is from x = 0 to x = w−1, and w is the width of F POL T (k, l) .

その後、判定部7は、以下の式を用いて算出した平均値をP T(k,l)(x)およびPjmT(k,l)(x)から除去する処理を行う。
PjT(k,l)F(x)=PjT(k,l)(x)−PAVE
PjmT(k,l)F(x)=PjmT(k,l)(x)−PAVE
Thereafter, the determination unit 7 performs a process of removing the average value calculated using the following expression from P j T (k, l) (x) and Pj mT (k, l) (x).
Pj T (k, l) F (x) = Pj T (k, l) (x) −P AVE
Pj mT (k, l) F (x) = Pj mT (k, l) (x) −P AVE

判定部7は、上述のように算出されたPjT(k,l)F(x)、PjmT(k,l)F(x)が予め定義された所定値(Tchip、Tchip )を下回っているかを判定することで、チッピングの有無を判定する。すなわち、以下の条件が1つでも成立する場合、判定部7は当該錠剤にチッピングがあると判定する。
PjT(k,l)F(x) < Tchip
PjmT(k,l)F(x) < Tchip
尚、xは0〜w−1(wはFPOL T(k,l)の幅)である。
The determination unit 7 has predetermined values (T chip , T chip m ) in which Pj T (k, l) F (x) and Pj mT (k, l) F (x) calculated as described above are defined in advance. The presence / absence of chipping is determined by determining whether it is below the threshold. That is, when at least one of the following conditions is satisfied, the determination unit 7 determines that the tablet has chipping.
Pj T (k, l) F (x) <T chip
Pj mT (k, l) F (x) <T chip m
Note that x is 0 to w-1 (w is the width of F POL T (k, l) ).

上述の判定部7の処理では、PAVEを動的に算出しているが、PAVEを固定値として予めTchip、Tchip に加算していてもよい。 In the processing of the determination unit 7 described above, P AVE is dynamically calculated. However, P AVE may be previously added to T chip and T chip m as a fixed value.

尚、画像処理部90に、CPU、メモリ、およびプログラムとが協働することで実現される実行制御部を設け、この実行制御部がステップS5の判定およびステップS6からステップS11までのループ制御を行うものとしてもよい。   The image processing unit 90 is provided with an execution control unit realized by cooperation of the CPU, the memory, and the program. The execution control unit performs the determination in step S5 and the loop control from step S6 to step S11. It may be done.

次に、CCDカメラ80で撮像するときの照明器具の配置について、図8を参照しつつ説明する。本実施の形態では、凹部に格納された錠剤に対し、斜め上方から透過光を当てる照明器具400のみではなく、斜め下方からも透過光を当てる照明器具400Aを配置する。チッピングが存在するのは錠剤のエッジ近傍であるため、斜め下方からの透過光をエッジに当てることで、欠陥のコントラストを際立たせることができる。また、チッピングの形状により、明欠陥、暗欠陥に分かれる。   Next, the arrangement of lighting fixtures when taking an image with the CCD camera 80 will be described with reference to FIG. In the present embodiment, not only the lighting fixture 400 that applies transmitted light obliquely from above to the tablet stored in the recess, but also a lighting fixture 400A that applies transmitted light from diagonally downward. Since chipping is present in the vicinity of the edge of the tablet, the contrast of the defect can be emphasized by applying light transmitted obliquely from below to the edge. Moreover, it is divided into a bright defect and a dark defect depending on the chipping shape.

また、このように斜め下方からも透過光が当たるように照明器具を配置することで、上方からの照明の強度を抑えることができ、錠剤表面の斑点模様を抑えることができる。また、割線の特徴量も出やすくなる。尚、下方斜めからも透過光が当たるようにするため、本実施の形態では、ボード301を透明部材にする。   In addition, by arranging the luminaire so that the transmitted light is applied from obliquely below, the intensity of illumination from above can be suppressed, and the spotted pattern on the tablet surface can be suppressed. In addition, the feature value of the secant becomes easy to appear. In this embodiment, the board 301 is made of a transparent member so that the transmitted light can be applied from an obliquely downward direction.

(実施の形態2)
実施の形態1は、チッピングの有無の検査に有効な装置、手法について説明したが、実施の形態2では、異物の付着の検査に有効な装置、方法について説明する。
(Embodiment 2)
In the first embodiment, an apparatus and method effective for inspecting the presence or absence of chipping have been described. In the second embodiment, an apparatus and method effective in inspecting adhesion of foreign matter will be described.

図9に、本実施の形態に係る画像処理部の機能ブロック図を示す。画像処理部90Aは、重心位置算出部1、錠剤切り出し部2、座標変換部4A、射影データ算出部5(集計部)、マスク処理部6、判定部7Aを有する。   FIG. 9 shows a functional block diagram of the image processing unit according to the present embodiment. The image processing unit 90A includes a center-of-gravity position calculation unit 1, a tablet cutout unit 2, a coordinate conversion unit 4A, a projection data calculation unit 5 (aggregation unit), a mask processing unit 6, and a determination unit 7A.

座標変換部4Aは、錠剤切り出し部2によって切り出された画像、すなわち1つの錠剤が撮像された画像から、錠剤の重心位置を極とした極座標に変換した画像であって、重心位置からの距離、および偏角をそれぞれ縦軸、横軸とした画像を作成する。   The coordinate conversion unit 4A is an image cut out by the tablet cutout unit 2, that is, an image obtained by taking an image of one tablet, and converted into polar coordinates with the tablet barycentric position as a pole, and the distance from the barycentric position, An image is created with the vertical axis and the horizontal axis as the vertical axis and the horizontal axis, respectively.

マスク処理部6は、射影データ算出部5によって作成された偏角ごとに集計された濃度値の集計値のうち、錠剤に入っている割線の濃度値に基づき決定された値(以下、マスク閾値と称す)よりも下回る値をマスク処理する。マスク処理には、例えばマスク閾値を下回った集計値に対して、本来起こりえない値に変更する処理等が考えられる。   The mask processing unit 6 determines a value (hereinafter referred to as a mask threshold value) determined based on the concentration value of the secant line contained in the tablet among the total values of the concentration values calculated for each declination created by the projection data calculation unit 5. A value lower than that) is masked. As the mask process, for example, a process of changing the total value that is below the mask threshold value to a value that cannot occur can be considered.

判定部7Aは、射影データ算出部5によって偏角ごとの集計値のうち、かつマスク処理部6によってマスクされた集計値以外の値のうち、閾値を下回る値があるかを判定することで、錠剤に異物が付着しているかの判定を行う。   The determination unit 7A determines whether there is a value lower than the threshold value among the total values for each declination by the projection data calculation unit 5 and the values other than the total value masked by the mask processing unit 6. It is determined whether or not foreign substances are attached to the tablet.

座標変換部4A、マスク処理部6、判定部7A以外の機能ブロック、錠剤包装装置の構成、および照明器具の配置は、実施の形態1と同様であるため、ここでの説明を割愛する。   Since the functional blocks other than the coordinate conversion unit 4A, the mask processing unit 6, and the determination unit 7A, the configuration of the tablet packaging device, and the arrangement of the lighting fixtures are the same as those in the first embodiment, description thereof is omitted here.

次に、本実施の形態に係る画像処理部90Aの動作を、図10を参照しつつ説明する。尚、図10において、図3と同一符号は実施の形態1で説明した処理と同一であるため、ここでの説明を割愛する。   Next, the operation of the image processing unit 90A according to the present embodiment will be described with reference to FIG. In FIG. 10, the same reference numerals as those in FIG. 3 are the same as those described in the first embodiment, and the description thereof is omitted here.

座標変換部4Aは、ステップS6で錠剤切り出し部2によって切り出された画像(実施の形態1のROIに相当)から、中心(x (k,l)−x,y (k,l)−y)で極座標変換した画像(FPOL T(k,l))を作成する(S8A)。尚、((x (k,l)−x),(y (k,l)−y))は入力画像FIN(x,y)の左上端を基点とした座標系での表記である。座標変換部4Aの処理は、入力される画像が錠剤切り出し部2によって切り出された画像になること以外は、実施の形態1の座標変換部4と同様であるため、詳細の説明を割愛する。 The coordinate conversion unit 4A obtains the center (x c T (k, l) −x 1 , y c T (k, k) from the image cut out by the tablet cutout unit 2 in step S6 (corresponding to the ROI in the first embodiment). 1) Create an image (F POL T (k, l) ) that has been subjected to polar coordinate conversion by -y 1 ) (S8A). Note that ((x c T (k, l) −x 1 ), (y c T (k, l) −y 1 )) is a coordinate system based on the upper left corner of the input image F IN (x, y). It is a notation. The processing of the coordinate conversion unit 4A is the same as that of the coordinate conversion unit 4 of the first embodiment except that the input image becomes an image cut out by the tablet cutout unit 2, and thus detailed description thereof is omitted.

マスク処理部6は、射影データ算出部5によって作成された射影データに対し、マスク閾値よりも下回る箇所にマスク処理をする(S101)。マスク閾値は、割線の場合どの程度の集計値になるのかが事前に調査され、その集計値によって定義された値である。   The mask processing unit 6 performs mask processing on the projection data created by the projection data calculation unit 5 at a location that is lower than the mask threshold (S101). In the case of the secant, the mask threshold value is a value defined by the total value obtained by examining in advance how much the total value will be.

例えば図11を参照すると、集計値が特出して下回っている箇所が2箇所ある(図11(A)参照)。マスク処理部6は、この2箇所をマスクするため、マスク閾値を下回るかを判断し、下回った箇所をマスク処理する(図11(B)参照)。尚、マスクする幅(x方向)を、割線箇所のみを全て覆うように微増させることで、さらに検査精度は向上する。この微増幅は事前に調査された値が用いられる。   For example, referring to FIG. 11, there are two places where the total value is particularly low (see FIG. 11A). In order to mask these two locations, the mask processing unit 6 determines whether the value is below the mask threshold, and performs mask processing on the locations below (see FIG. 11B). Note that the inspection accuracy is further improved by slightly increasing the masking width (x direction) so as to cover only all the dividing lines. The value previously investigated is used for this fine amplification.

判定部7Aは、異物が付着しているかの判定を行う(S11A)。判定部7Aは、マスク処理部6によってマスクされた箇所、すなわち、マスク処理部6によってマスクされた集計値を判定の対象としない。かかる点以外は、実施の形態1と同様であるため、詳細な説明を割愛する。   The determination unit 7A determines whether foreign matter is attached (S11A). The determination unit 7A does not set a portion masked by the mask processing unit 6, that is, a total value masked by the mask processing unit 6, as a determination target. Except for this point, the second embodiment is the same as the first embodiment, and a detailed description thereof will be omitted.

尚、画像処理部90Aに、CPU、メモリ、およびプログラムとが協働することで実現される実行制御部を設け、この実行制御部がステップS5の判定およびステップS6からステップS11Aまでのループ制御を行うものとしてもよい。   The image processing unit 90A is provided with an execution control unit realized by the cooperation of the CPU, the memory, and the program. The execution control unit performs the determination in step S5 and the loop control from step S6 to step S11A. It may be done.

実施の形態1はチッピングの検査に有効な手段とし、実施の形態2は異物付着の検査に有効な手段としたが、実施の形態1の態様で異物付着の判定を行ってもよいし、また実施の形態2の態様でチッピングの判定を行ってもよい。さらに、錠剤の印字有無の検査、錠剤色の検査(異なった色の錠剤が入っているかを検査することで、種別の異なった錠剤が混入していないかの検査)、錠剤が凹部に入っているか否かの検査等、チッピングの検査、異物付着の検査以外の錠剤に関する検査に対しても実施の形態1、実施の形態2を適用することができる。   Although the first embodiment is an effective means for inspection of chipping and the second embodiment is an effective means for inspection of foreign matter adhesion, the determination of foreign matter adhesion may be performed in the form of the first embodiment. The chipping determination may be performed in the mode of the second embodiment. In addition, check whether the tablet is printed, check the tablet color (inspect whether a different color tablet is included, check whether different types of tablets are mixed), the tablet enters the recess The first embodiment and the second embodiment can be applied to the inspection relating to tablets other than the inspection of chipping and the inspection of adhesion of foreign matter, such as inspection of whether or not there is.

また、CCDカメラ80と、実施の形態1で説明した画像処理部90と、実施の形態2で説明した態画像処理部90Aとで一つの錠剤包装検査装置とすることも可能である。この場合の錠剤包装検査装置は、実施の形態1で説明したチッピングの検査の後に実施の形態2で説明した異物検査の順で錠剤検査を行ってもよいし、その逆の順でもよい。また、実施の形態1と実施の形態2とで説明したステップを、必要に応じて混合させてもよい。   The CCD camera 80, the image processing unit 90 described in the first embodiment, and the state image processing unit 90A described in the second embodiment can be used as one tablet packaging inspection apparatus. In this case, the tablet packaging inspection apparatus may perform the tablet inspection in the order of the foreign matter inspection described in the second embodiment after the chipping inspection described in the first embodiment, or vice versa. Moreover, you may mix the step demonstrated in Embodiment 1 and Embodiment 2 as needed.

本発明は、その精神または主要な特徴から逸脱することなく、他の様々な形で実施することができる。そのため、前述の実施の形態は、あらゆる点で単なる例示に過ぎず、限定的に解釈してはならない。本発明の範囲は、特許請求の範囲によって示すものであって、明細書本文には、何ら拘束されない。更に、特許請求の範囲の均等範囲に属する全ての変形、様々な改良、代替および改質は、全て本発明の範囲内のものである。   The present invention can be implemented in various other forms without departing from the spirit or main features thereof. Therefore, the above-described embodiment is merely an example in all respects and should not be interpreted in a limited manner. The scope of the present invention is shown by the scope of claims, and is not restricted by the text of the specification. Moreover, all modifications, various improvements, substitutions and modifications belonging to the equivalent scope of the claims are all within the scope of the present invention.

1 重心位置算出部、2 錠剤切り出し部、3 二値化部、4,4A 座標変換部、5 射影データ算出部、6 マスク処理部、7,7A 判定部、10 プラスチックシート搬送部、20 凹部作成部、30 錠剤供給部、40 PTPシート搬送部、50 シート結合部、60 包装シート切り出し部、70 取り出し部、80 CCDカメラ、90,90A 画像処理部、100 錠剤包装装置、301 ボード、400,400A 照明器具。   DESCRIPTION OF SYMBOLS 1 Center-of-gravity position calculation part, 2 Tablet cutting part, 3 Binary part, 4,4A Coordinate conversion part, 5 Projection data calculation part, 6 Mask processing part, 7, 7A Judgment part, 10 Plastic sheet conveyance part, 20 Recess preparation Part, 30 tablet supply part, 40 PTP sheet conveying part, 50 sheet combining part, 60 packaging sheet cutting part, 70 taking part, 80 CCD camera, 90, 90A image processing part, 100 tablet packaging device, 301 board, 400, 400A lighting equipment.

Claims (4)

凹部に錠剤が一つまたは複数供給されたプラスチックシートを撮像する撮像部と、
前記撮像部によって撮像された画像から、錠剤一つが撮像されている領域をそれぞれ切り出す錠剤切り出し部と、
前記錠剤切り出し部によって切り出された一つの錠剤が撮像された画像を二値化する二値化部と、
前記二値化部によって二値化された画像に対し、前記錠剤の中心を極とした極座標に変換した画像であって、前記中心からの距離、および偏角をそれぞれ軸とした画像を作成する座標変換部と、
前記座標変換部によって作成された画像から、前記偏角ごとに濃度値をそれぞれ集計する集計部と、
前記集計部によって偏角ごとに集計された集計値のうち、閾値を下回る値があるかを判定する判定部と、
前記錠剤切り出し部によって切り出された画像それぞれが処理されるように、前記二値化部、前記座標変換部、前記集計部、前記判定部を制御する実行制御部と、
を有する錠剤包装検査装置。
An imaging unit for imaging a plastic sheet in which one or more tablets are supplied to the recess;
From the image captured by the imaging unit, a tablet cutout unit that cuts out each region where one tablet is imaged,
A binarization unit that binarizes an image obtained by imaging one tablet cut out by the tablet cutout unit;
An image obtained by converting the image binarized by the binarization unit into polar coordinates with the center of the tablet as a pole, and creating an image with the distance from the center and the declination as axes. A coordinate transformation unit;
From the image created by the coordinate conversion unit, a totaling unit for totalizing density values for each declination,
A determination unit that determines whether there is a value that falls below a threshold value among the total values that are totaled for each declination by the total unit;
An execution control unit that controls the binarization unit, the coordinate conversion unit, the counting unit, and the determination unit so that each of the images cut out by the tablet cutting unit is processed;
A tablet packaging inspection apparatus.
請求項1に記載の錠剤包装検査装置において、
前記二値化部は、前記錠剤の画像上の最大濃度値を選定し、該最大濃度値に基づき二値化するときの閾値を算出することを特徴とする錠剤包装検査装置。
In the tablet packaging inspection apparatus according to claim 1,
The binarization unit selects a maximum density value on an image of the tablet and calculates a threshold value for binarization based on the maximum density value.
撮像装置が、
凹部に錠剤が一つまたは複数供給されたプラスチックシートを撮像し、
コンピュータが、
前記撮像装置によって撮像された画像を取得し、該画像から、錠剤一つが撮像されている領域をそれぞれ切り出し、
切り出された一つの錠剤が撮像された画像を二値化し、
二値化された画像に対し、前記錠剤の中心を極とした極座標に変換した画像であって、前記中心からの距離、および偏角をそれぞれ軸とした画像を作成し、
作成された画像から、前記偏角ごとに濃度値をそれぞれ集計し、
偏角ごとに集計された集計値のうち、閾値を下回る値があるかを判定する
処理を、前記切り出された画像それぞれに実行する錠剤包装検査方法。
The imaging device
Image a plastic sheet with one or more tablets in the recess,
Computer
Obtain images captured by the imaging device, and cut out each region where one tablet is imaged from the image,
Binarize the image of one clipped tablet,
For the binarized image, an image converted into polar coordinates with the center of the tablet as a pole, creating an image with the distance from the center and the declination as axes,
From the created image, the density values are totaled for each declination,
The tablet packaging inspection method which performs the process which determines whether there exists a value which is less than a threshold value among the total values totaled for every declination to each of the said cut-out image.
請求項3に記載の錠剤包装検査方法において、
前記二値化は、前記錠剤の画像上の最大濃度値を選定し、該最大濃度値に基づき二値化するときの閾値を算出することを特徴とする錠剤包装検査方法。
In the tablet packaging inspection method according to claim 3,
In the binarization, a maximum density value on the image of the tablet is selected, and a threshold value for binarization is calculated based on the maximum density value.
JP2013225861A 2013-10-30 2013-10-30 Tablet packaging inspection apparatus, and tablet packaging inspection method Pending JP2014067426A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013225861A JP2014067426A (en) 2013-10-30 2013-10-30 Tablet packaging inspection apparatus, and tablet packaging inspection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013225861A JP2014067426A (en) 2013-10-30 2013-10-30 Tablet packaging inspection apparatus, and tablet packaging inspection method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2009250542A Division JP5491826B2 (en) 2009-10-30 2009-10-30 Tablet packaging inspection device, tablet packaging inspection method

Publications (1)

Publication Number Publication Date
JP2014067426A true JP2014067426A (en) 2014-04-17

Family

ID=50743685

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013225861A Pending JP2014067426A (en) 2013-10-30 2013-10-30 Tablet packaging inspection apparatus, and tablet packaging inspection method

Country Status (1)

Country Link
JP (1) JP2014067426A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112164060A (en) * 2020-10-22 2021-01-01 江苏科技大学 Diamond sawing wire fracture prediction method based on image processing

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07209195A (en) * 1994-01-14 1995-08-11 Toshiba Eng Co Ltd Circular element inspection apparatus
JP2004062266A (en) * 2002-07-25 2004-02-26 Nachi Fujikoshi Corp Method of detecting edge position of imaged body
JP2004145710A (en) * 2002-10-25 2004-05-20 Hitachi High-Tech Instruments Co Ltd Device and method for detecting crack on disk-like information recording medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07209195A (en) * 1994-01-14 1995-08-11 Toshiba Eng Co Ltd Circular element inspection apparatus
JP2004062266A (en) * 2002-07-25 2004-02-26 Nachi Fujikoshi Corp Method of detecting edge position of imaged body
JP2004145710A (en) * 2002-10-25 2004-05-20 Hitachi High-Tech Instruments Co Ltd Device and method for detecting crack on disk-like information recording medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112164060A (en) * 2020-10-22 2021-01-01 江苏科技大学 Diamond sawing wire fracture prediction method based on image processing
CN112164060B (en) * 2020-10-22 2024-02-06 江苏科技大学 Diamond saw wire fracture prediction method based on image processing

Similar Documents

Publication Publication Date Title
US9536295B2 (en) Three-dimensional image processing apparatus, three-dimensional image processing method, three-dimensional image processing program, computer-readable recording medium, and recording device
US10373302B2 (en) Three-dimensional image processing apparatus, three-dimensional image processing method, three-dimensional image processing program, computer-readable recording medium, and recording device
JP2021177186A (en) Three-dimensional image processing device and three-dimensional image processing method
JP6184289B2 (en) 3D image processing apparatus, 3D image processing method, 3D image processing program, computer-readable recording medium, and recorded apparatus
JP7174074B2 (en) Image processing equipment, work robots, substrate inspection equipment and specimen inspection equipment
JP2006189421A (en) High-intelligent digital image inspection system and its inspection method
CN106651857B (en) A kind of printed circuit board patch defect inspection method
JP2006066478A (en) Pattern matching device and scanning electron microscope employing it
CN112334761B (en) Defect discriminating method, defect discriminating apparatus, and recording medium
EP2924647A1 (en) Drug inspection device
JP5491826B2 (en) Tablet packaging inspection device, tablet packaging inspection method
JP2014020926A (en) Surface defect inspection device and surface defect inspection method
JP2014067426A (en) Tablet packaging inspection apparatus, and tablet packaging inspection method
JP2017166957A (en) Defect detection device, defect detection method and program
JP6714477B2 (en) Board angle position identification method
JP2018136340A (en) Visual inspection device
JP2019514012A (en) Item appearance inspection apparatus and item inspection method using the same
EP3104169B1 (en) Quality management system
CN115055806B (en) Welding track tracking method and device based on visual tracking
TW201809643A (en) Substrate inspection device and substrate manufacturing method
JP2008294451A (en) Image forming method and image forming apparatus
CN206945041U (en) More mesh coaxial configuration light 3D detection means
JP2009224476A (en) Defect relevance displaying apparatus, substrate testing apparatus, and defect relevance displaying method
JP2012088199A (en) Method and apparatus for inspecting foreign matter
CN116997927A (en) Curved substrate bubble detection method and detection system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140806

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140812

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150106