This paper presents faults inspection scheme on cigarette packet on LabVIEW platform. The objectives of the proposed work are:
- to count the number of cigarettes in an open packet
- to check defect in the barcode
- to check defects on the label of the packet
A smart camera (from NI, India) is used to capture images from the required parts of the cigarette packets. These images are processed using various image processing techniques to achieve the above objectives. The proposed scheme is subjected to off-line testing on 300 sets of images of cigarette packets.
The images of cigarette packets are acquired with the help of a smart camera NI-1744  in laboratory environment under a table lamp of 60 W. In off-line inspection, all the images are stored and called consequently by the program. For acquisition, “NI Vision Acquisition Express” VI is used.
Region of Interest
ROI is that portion of an image which contains the desired information. The rest portion of the image is discarded to reduce the processing burden. ROI can be strictly defined to contain only the individual cigarettes/barcode/label as the case arises. Here we use rectangular type ROI. For extracting ROI from the image, ROI Descriptor, IMAQ Select Rectangle and IMAQ Overlay rectangle are used.
The Pre-processing for counting cigarettes includes filtering, thresholding, and morphological operations. Filtering is the preprocessing steps for barcode validation. Simultaneously, thresholding and morphological operations are performed for label identification.
Detect Counting Objects
After pre-processing step shown in Fig. 1, processed images are ready for counting cigarettes in a packet. “IMAQ Count Object” VI is used on the corresponding images containing objects to count the numbers. Predefined radius is chosen for detecting number of cigarettes.
Read 1D Barcode for Barcode Evaluation
The images after passing through the pre-processing step shown in Fig. 2 are ready for barcode detection. “IMAQ Read Barcode” VI is used on the corresponding images containing barcode on cigarette packets to detect the barcode. In this paper, barcode of flake packet, i.e. 8901725139018 is used as a predefined template. Learning and recognition are the two phases used to validate the barcode.
The result of the flowchart above is the block diagram of the program as follows
Screen-shots of the software environment that follows, the following screen-shots represent the different scenarios of the program and its response.