Aurora Visio Studio TOP » Program Examples » Tablets
Tablets
目的
The aim of the program is to detect missing or damaged tablets on a conveyor belt.
Input
A series of images from the conveyor of a production line.
Output
Detected missing or damaged tablets:
ヒント
To detect damaged tablets it is recommended to consider using the DetectMultipleCircles filter together with the CheckPresence_Intensity filter to verify object presence by analyzing pixel intensities. To ensure that the inspection is performed once for an every batch of tablets, you can specify a Region Of Interest, where the inspection should be performed, as an input of the CheckPresence_EdgeAmount filter.
接続のラベル付けについては こちらを参照ください。
Solution (AVS)
-
In Workspace Explorer open workspace Examples and in Film strip window select Tablets dataset. Drag the Image channel to the ACQUIRE section.
-
Add the CheckPresence_EdgeAmount filter.
- Label the outIsPresent as IsKeyFrame.
- Connect the ReadFilmstrip output to the inImage input of the current one.
- In Properties window in the bottom left corner set the inEdgeScale to 2.
- Set the inMinAmount to 0.27 to determine the minimum amount of the pixels that should be detected.
- Click on the CheckPresence_EdgeAmount filter and select the inRoi parameter in the Properties window to mark the region as on image below:
-
Add formula which converts an input image into Nil when no tablets are found:
KeyFrame = if IsKeyFrame then Image else Nil
-
Add the DetectMultipleCircles filter.
- Connect the DetectMultipleCircles.inImage input with the Formula.KeyFrame.
- Set the inRoi as on the image below:
- Set the inRadius to 7 (approximate radius of tablets), the inMaxOverlap to 0 (to avoid overlapping), the inMinScore to 15 (in order not to miss any tablet) and the inEdgeThreshold to 6 (the minimum accepted edge magnitude).
-
Add the CircleBoundingRectangle and connect its inCircle with the DetectMultipleCircles's outCircles
-
Add the CheckPresence_Intensity filter.
- Connect the Formula.KeyFrame with the inImage.
- Connect the CircleBoundingRectangle's outBoundingRectangle with the CheckPresence_Intensity's inRoi.
- Set the inMinContrast to 18 to avoid detecting bad tablets as good ones by checking their contrast.
-
Now create HMI by clicking on HMI Designer in the upper toolbar.
- Add the View2dBox control and connect the ReadFilmstrip output to its inImage input. It is going to display the images from the production line.
- Connect the IsPresent with the View2dBox.InStatus1.
- Connect the TabletCircles with the View2dBox.InData1.
マクロフィルタ メイン
使用したフィルタ
アイコン | 名前 | 説明 |
---|---|---|
DelayByPeriod | Suspends the program workflow for inTime milliseconds relative to the end of the filter's last invoke time. | |
CheckPresence_EdgeAmount | 迅速かつ簡単な存在確認。(例: キャップ、ネジ、ラベルの紛失) | |
CheckPresence_Intensity | 迅速かつ簡単な存在確認。(例: キャップ、ネジ、ラベルの紛失) | |
CircleBoundingRectangle | Computes the smallest rectangle containing a circle. | |
DetectMultipleCircles | Detection of circular or close-to-circular objects like holes, pins, pills, particles. |
その他の資料
- Image Analysis - List of filters analyzing images.