Research for Detection Level and Production Sales Management of Raisins Based on NN and SAS / GIS

Raisins grade identification in China still relies on photoelectric sorting and manual separation, also, the function of management system for the production, processing, and sales of raisin is traditional and simple. This study presents a processing method on the basis of the Neural Network (NN) and image manipulation. Calculating the length of the long-short-axis, marking the location of it and calculated the 7 parameters, chroma, length, width and etc, and using boundary tracking algorithm, A BP NN was to build and identify the level of raisins through analysis of the external characteristics of raisins. The result of experiment indicates that average recognition rate is higher than 92%. This study took regional economy statistics of Pan Zhihua as an example, designed an system based on regional economy statistic and achieves the analytic function of regional economic statistics by utilizing distributed SAS /GIS to release the data, provide browsing, searching and analytic function of the space data for the users and accomplish data share. Therefore, the method has a great practical value, which can be applied to other.


INTRODUCTION
The usefulness of image detection technology to identify agricultural research has been extensively researched and applied (Tang et al., 2007).The fruit quality detection and classification is applied wildly (Xie et al., 2010).Some new ways with computer technology and image processing to test the quality and surface (Bao et al., 2004).
At present, there are photoelectric sorting and manual separation with regard to distinguish the grading of raisins.Method of Manual separation is based mainly upon human observation to determine the level (Wang and Gao, 2004).And the other is based primarily on color characteristics, utilizing surface testing to determine level of raisins by the equipment automatically (Diep, 2007).These two methods have many disadvantages in the applications.
The analysis and management for agricultural product are very important to improve the quality of products and manage the data of the characteristics.The SAS System and SAS/GIS software allow us to perform many different kinds of analysis and data management functions, as well as produce many different types of text-based and graphical presentation output.Many types of data have a spatial aspect, including demographics, marketing surveys, customer addresses, and epidemiological studies.As the further application of GIS and the fast development of object-oriented programming and the component technology, the spatial management function easily achieves the analysis and application of the regional economy.
In this study, image processing and analysis technology are combined with artificial neural networks to identify and grade raisins.The secondary development module and visual programming language are used to develop the analytic system of regional economy, realize common data management, graphic processing functions etc., strengthen statistic analysis and optimize the functions of spatial and location analysis.One of the key ways is image manipulation algorithms and characteristic testing, linked to artificial neural networks through extracting valid characteristic parameter.Another of the key way is used SAS and GIS.

CHARACTERISTICS PARAMETER HIS MODEL
First the photos of raisins can be got and be expressed by 640×480 pixel, 24-bit true color BMP, as shown in Fig. 1.In order to identify and grade raisins, the characteristics of a single raisin need extracting.The following focus on extraction method of color, shape, and other characteristics.Here it needs to give a HIS model to represent the parameters of the raisins characteristics.HSI model is defined as follows: 3 The mean value of H, S, I are shown as Eq. ( 5)-( 7):   conducted threshold as far as the gray image concerned, and then compared the original color image with treated image.If pixel is 255 (having treated image, the Eq. ( 8), and the threshold is shown as follows: Here n = 1, 2, 3, and m = 1, 2, 3.When n = 1, 2, 3, it respectively stands for R (i, j),G (i, j),B (i, j).
) , ( 0 j i c n respectively stands for R 0 (i, j),G 0 (i, j) , B 0 (i, j ) when n = 1, 2, 3. R(i, j), G(i, j), B(i, j) are gray value of threechannel pixel before and after the background segmenting.T m , respectively stands for T r , T g , T b when m = 1,2,3.T r , T g , T b are the threshold of segmenting background for three channels R, G and B. The parameter of Area shape is shown as Eq. ( 9): where, N b = The numbers of the boundary The result of segmenting is shown in Fig. 2.
Selection and Extraction of characteristics parameter.According to the area feature in the Green theorem, calculate three levels (each contain 60) of raisin samples, and get mean score of 7 characteristics, identify the parameters color, saturation, brightness, long, area, length and width as a means of identification features.Part parameters are shown as Table 1.

RAISIN GRADE-LEVEL UNDER BP NETWORK CHECKUP
The structure of BP NN: The relation between the form feature and grading is comparatively complex which is hard to distinguish one from another.So we make use of BP NN to establish the relationship between form feature and grading which is helpful to distinguish the different grades.The NN structure has 7   2, hroma, area, length, width is relatively important parameters.At the same time, these 4 features are more efficient than those 7 features.So the cyber structure adopts the system with 7 inputs, 3 outputs and a middle layer with 17 nerve cells.

Database design and main function of system:
In order to manage the data about products of the raisins, a system be programming based on SAS/GIS.The system provides the modules of management of regional economy data, spatial query, calculation of statistic analysis, graphic analysis chart, space etc.

System developing platform and structure:
According to the thought of system expansibility and the need of SAS system, this system uses the systematical structure of C/S.Database uses relation database, SQL Server 2000 and stores spatial data, business data, metadata etc. Logic application layer consists of bottom data layer, middle Public application components and upper application components.Bottom database engine of spatial data (Super map SDX) and data source management database engine components (ADO.NET) compose the bottom data layer.The upper application components include thematic application components and GIS application components (Super map components).Components accomplish the mutual use through COM interface.Implementation level achieves the user's dynamic interactions and various functions of the system through user interface (GUI) (Xie, 2004).Detailed structure is illustrated in Chart1.GIS exploring platform selects component object platform, (Component GIS) Super Map Objects 5.0 (Xiao et al., 2008).
System module based on SAS/GIS: SAS/GIS software uses two basic types of data which are spatial data and attribute data (Wang et al., 2004).The spatial data describes the location, shape, and interrelationships of map features and represent point features, line features and area features of map.To represent point, line, and area features in the map, the attribute data provide information that relates to the map features.
Attribute data are all other data that are related to map features in some way, including the data to analyze in the context of the map.Also attribute data can be stored in the spatial database (Jones et al., 2003).
• Statistic data management of raisins: Statistic data includes categories of products, quality, sales etc.Because of a huge mass of statistic data, regional enterprise economy statistic data and spatial data are respectively input and stored.At first, input economy statistic data to a sequential document edit and store in the relevant file of database.

• Modules of spatial query and statistic analysis:
Spatial query includes buffer query, crossing query, and interaction query of chart data and attribute data etc (Lan et al., 2003).The system supports the statistical function and finishes the statistical function of data of raisins product.For instance, those statistic information, such as total number, mean, standard deviation etc.At the same time, the system carries out the functions of spatial statistic analysis and reflects the spatial connection of economic development.These statistical data showing on the geographic base helps to make a correct decision about the development tendency for the raisins products in the whole region.

Fig. 1 :
Fig. 1: Raisin image (The left: First-grade raisin image; the right: Second-grade raisin image) where, H = The mean value of tones S = The mean value of saturation I = Illumination value Image manipulation: The images need pre-treating for extracting characteristic data and get the parameters of RGB in the HSI model.The image pre-treatment including image denoising, background, segmentation, boundary tracking and raisin extraction.Making the background white, non-background part of the original image is retained, and Set the corresponding pixel of the original image to 255.The colored image of raisins can be indicated as R (red), G (green) and B (blue).(Zhang and Liu, 2004) Based on the When segmenting the background of color images, the researcher first

Fig. 2 :
Fig. 2: Results of background segmentation in three channels (The left: Segmentation in R channel; the middle: Segmentation in G channel; the right: Segmentation in B channel)

Table 1 :
Average of raisin features

Table 2 :
Recognition rate of different parameters Parameter number - Recognition rate of different parameters are shown as the Table 2. From Table The results of recognition:

•
Geographic analysis module: According to different requirements, diverse charts express economy data of every administrative region.It usually adopts pie chart, point density diagram, histogram, line chart etc. Drawing the graphs of the same region at different periods visually reveals the law of regional economy development.Parts of codes are as following: public SLThematicMap(Panel chartContainer, ObservableCollection<ObservableCollection<object>> table){this.chartContainer= chartContainer;