Once the GUI based on the requirement component is formed, and when the figure is saved, two files (the figure file and M. file) will be formed with the same filename but different extents. The figure file contains the actual GUI components and figure layout that the user have created and M. file contains the matlab code to load and control the figure and skeleton callbacks for each GUI elements. Then write matlab code function and program for each formed of GUI figure layout and components by using callback function.
The callback function used to respond the matlab program for each event and components or to implement the function of each graphical components on GUI.
Generally during the time of image processing and analyzing of the textile yarn which wound on the blackboard surface, in matlab software by using a simple graphical user interface, the output result which includes the binary pixel value (black and white pixels), and the different stages of image processing are described in the table below sequentially step by step.
In this paper totally to accomplish the whole experiment of the matlab yarn image processing and quality grade classification, the graphical user interface that contains the required GUI fig. file components and the processed outputs is formulated below as shown in the given figure below.
After yarn image processing and analyzing by using different image processing steps in graphical user interface, the output of binary image pixel values (white and black pixels) of the yarn sample are listed below in table in count wise.
Theoretically, as shown in the figure below (fig. a), in conventional method of yarn quality testing and grading evaluation, based on the ASTM (D2255) method, the yarn quality checker sometimes give same grade for which has different yarn surface appearance of the same yarn count. And also when sometimes the grade falls between the two consecutive grades, they denotes the grade by ‘+’ sign after the letter based on their perception.
In this investigation, the yarn quality and grading classification will be by using fuzzy logic control system (FLCS). Fuzzy logic control defined as toolbox of matlab and it is a good measure frame to handle the problem of uncertainty, vague or not clear things in the image information. In FLCS toolbox, there are different menu parameters such as FIS editor, IF-THEN rule editor, membership function editor and others that used for image classification by using linguistic variables and mathematical membership functions. This paper uses a supervised type of image classification techniques of FLCS for yarn grading and classification.
As shown in the figure below (fig. b), the first image yarn sample (im1) will expressed in percentage between two standard grades (grade A and B) according to its degree of membership, i.e. ?A(im1) and ?B(im1) to each fuzzy set, whereas the grade of the second yarn image (im2) will expressed in percentage between (A and B) grades, which means according to membership of ?A(im2) and ?B(im2) to each fuzzy set.
Fig: A) yarn grade conventional classification, and B) classification by using FLCS.
After image processing and generating the pixel values of binary image for each yarn samples, the yarn appearance classification will be analyzed in fuzzy logic system based on the number of white pixels of the yarn binary image.
According to the investigation of , all yarn count series standard images of ASTM (D2255) have been acquired by using a commercial scanner with two resolutions (150dpi and 300dpi), and from the proposed of the six yarn count series, this paper considering the second series of yarn count pixel values as shown in the table below to construct the membership function (MF) of the fuzzy logic control system (FLCS), and to accomplish the analyzing and classification of yarn grading process. And as shown below in the table, first grade image has higher yarn quality which means less thick, thin place and neps. And because of its low defect the value of white pixel is less than black pixel values. While grade ‘D’ that the yarn which has higher number of thick place and neps, and lower quality its white pixel value is larger than black pixels due to this it has more white pixels than black pixels. As a result when we go to from grade A, to grade D, the number of white pixels becomes increase and black pixels are decrease, while from grade D, to grade A, the vice versa is true.
Generally, the white pixels of the binary image describes the quality of the yarn surface, because it is the combination of pure (core) yarn surface and different surface defects. That means the fewer pixels describes the higher yarn quality (less thick place and neps) and it has, while higher pixels describes low yarn quality (more thick place and neps).