CN109766939A - A kind of galvanized steel and mild steel classification method and device based on photo - Google Patents

A kind of galvanized steel and mild steel classification method and device based on photo Download PDF

Info

Publication number
CN109766939A
CN109766939A CN201811632530.2A CN201811632530A CN109766939A CN 109766939 A CN109766939 A CN 109766939A CN 201811632530 A CN201811632530 A CN 201811632530A CN 109766939 A CN109766939 A CN 109766939A
Authority
CN
China
Prior art keywords
subgraph
training
steel
photo
classification
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.)
Granted
Application number
CN201811632530.2A
Other languages
Chinese (zh)
Other versions
CN109766939B (en
Inventor
王海贤
王敬
张友红
于辉
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.)
Foshan University
Original Assignee
Foshan University
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 Foshan University filed Critical Foshan University
Priority to CN201811632530.2A priority Critical patent/CN109766939B/en
Publication of CN109766939A publication Critical patent/CN109766939A/en
Application granted granted Critical
Publication of CN109766939B publication Critical patent/CN109766939B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a kind of galvanized steel based on photo and mild steel classification method and devices, the process of Classification and Identification is carried out by the photo use pattern recognizer to galvanized steel and mild steel, the following steps are included: acquiring photograph image from network, cut photo manually to remove the part of Noise, resampling is slided, the noise picture that resampling obtains, balanced sample are deleted, color image gray processing, is classified using support vector machines and two-dimensional principal component analysis.The present invention is applied successfully to the galvanized steel downloaded on sorter network and mild steel photo, and achieves preferable recognition effect, is beneficial to the online transaction classification of both steel.

Description

A kind of galvanized steel and mild steel classification method and device based on photo
Technical field
This disclosure relates to which the present invention relates to the image identification technical fields of steel type, and in particular to a kind of based on photo Galvanized steel and mild steel classification method and device.
Background technique
Galvanized steel and mild steel industrially have a wide range of applications.Normal carbon is built in particular, galvanized steel refers to Steel is built by zinc-plated processing, so that corrosion of steel be effectively prevent to get rusty, extends steel service life.Zinc-plated mode is generally divided into heat Zinc immersion and electrogalvanizing.Galvanizing by dipping is to make molten metal and iron-based precursor reactant and generate alloy-layer, to make matrix and coating The two combines.The advantages that hot galvanizing has coating uniform, and adhesive force is strong, long service life, corrosion resistance is strong.Electrogalvanizing Claim cold galvanizing, zinc-plated amount is seldom, and corrosion resistance is more many than hot galvanizing difference, and mild steel is the carbon that carbon content is lower than 0.25% Steel.Because its intensity is low, hardness is low and soft, therefore also known as mild steel.It includes most of common carbon structural steel and a part of high quality carbon Plain structural steel, mostly not thermally treated to be used for engineering structure part, some is through carburizing and other heat treatments for requiring wear-resisting machine Tool part.Since both steel are industrially widely used, they are also largely present in online transaction.It is how automatic And the type that steel are recognized accurately is a meaningful job.
Summary of the invention
The disclosure provides a kind of galvanized steel based on photo and mild steel classification method and device, in order to galvanized steel and low The photo use pattern recognizer of carbon steel carries out Classification and Identification, and the present invention provides a kind of classification of two based on photo kind steel Method identifies galvanized steel and mild steel from the image of network photo.
To achieve the goals above, according to the one side of the disclosure, a kind of galvanized steel and mild steel based on photo is provided Classification method the described method comprises the following steps:
Step 1, read images to be recognized and by images to be recognized according to sliding window carry out sliding resampling generate it is multiple Sample subgraph;
Step 2, gray processing is carried out to all sampling subgraphs;
Step 3, each sampling subgraph is divided into trained subgraph and test subgraph;
Step 4, support vector machines is constructed;
Step 5, by training subgraph as training sample Training Support Vector Machines;
Step 6, it is verified according to support vector machines by ten retransposings and Classification and Identification is carried out to test subgraph.
Further, in step 1, the reading images to be recognized is steel to crawl the keyword in website by crawler Steel, steel wire, steel strand wires, steel in material, steel wire, steel strand wires, steel pipe, steel plate, steel, the picture of coil of strip or artificial download site Pipe, steel plate, steel, coil of strip photograph image, photograph image is cut manually after saving photograph image, retain steel portion Point remove noise section, the noise section for cropping photograph image is surrounding enviroment in photograph image where steel, on photo Watermark and appear in the worker on photo, manually cut after obtain images to be recognized.
Further, in step 1, it reads images to be recognized and images to be recognized is subjected to sliding weight according to sliding window The method that sampling generates multiple sampling subgraphs are as follows: sliding weight will carried out with the sliding window of 80 × 80 pixels in images to be recognized Sampling generates multiple sampling subgraphs, and sliding resampling is by sliding window that spacing is 80 × 80 pixels will be in images to be recognized It is sampled, is sampled as saving as the image in sliding window into new subgraph, new subgraph samples subgraph, sliding window Mouth is slided since the upper left corner of original image, and sliding window is transversely or longitudinally moved to 40 pixels on picture every time Length sampled, until sliding window has traversed images to be recognized, generate multiple sampling subgraphs.
Further, in step 2, to it is all sampling subgraphs carry out gray processings methods are as follows: to all sampling subgraphs into The method of row gray processing are as follows: each pixel f (i, j) takes three red R (i, j), green G (i, j), blue B (i, j) colors point The mean value of amount quantify as pixel f (i, j) after brightness value, that is, gray processing, gray processing calculation method is
Further, in step 3, the method for each sampling subgraph being divided into trained subgraph and testing subgraph are as follows: namely The sampling subgraph stochastic averagina of all gray processings is divided into ten parts, chooses nine parts therein as training subgraph, remaining survey Swab figure.
Further, in step 4, the method for support vector machines is constructed are as follows:
Subgraph will be trained as sample set, sample set is (xi,yi), i=1 ..., n, x ∈ Rd, y ∈ {+1, -1 } is classification Label, in d dimension space RdIn, linear discriminant function is g (x)=ωTX+b is classified by the b that any one supporting vector acquires Threshold value, classifier equation are as follows: ωTX+b=0.
Discriminant function is normalized, meets all samples of two classes all | g (x) | >=1, it may be assumed that so that most from classifier Close sample | g (x) |=1, such class interval is equal to 2/ | | ω | |, be equivalent to make the norm of supporting vector ω | | ω | | most It is small, while classification line being required correctly to classify all samples, that is, require it to meet condition: yiTxi+ b) -1 >=0, i=1 ..., N, ωTFor the transposition of supporting vector;Meet condition and make | | ω | |2The smallest classifier is exactly optimum classifier, these two types of samples In the point nearest from classifier and be parallel to the hyperplane H of optimum classifier1,H2On training sample be exactly optimum classifier Sample, i.e. support vector machines.
Further, in steps of 5, the method by training subgraph as training sample Training Support Vector Machines are as follows: defeated Enter sample set, by optimum classifier problem representation are as follows: yiTxi+ b) -1 >=0, i=1 ... finds a function under the constraint of nMinimum value,
Define Lagrangian are as follows:
Wherein, aiFor Lagrange coefficient, ai> 0, partial differential is asked to ω and b respectively, and result is enabled to be equal to 0, about Beam conditionai>=0, i=1 ..., to a under niSolve the maximum value of lower array function:Ifω for maximum value, then after training*Are as follows:It is i.e. optimal The weight coefficient vector of classifier is the linear combination of training sample vector, and the classifier equation of optimization problem meets after training: ai [yiTxi+ b) -1]=0, i=1 ..., n;Therefore, to most samplesIt will be 0, value is not 0Corresponding to classifier Equation yiTxi+ b) -1 >=0, i=1 ..., n equal sign set up sample, that is, train after supporting vector, solve the above problem after The optimal classification function arrived, that is, support vector machines is after training,Due to it is non-supporting to It measures correspondingIt is 0, therefore the summation in formula actually only carries out supporting vector.And b*It is the threshold value classified after training, It is acquired by any one supporting vector, in summary, the support vector machines after training is exactly first by being defined with interior Product function Nonlinear transformation the input space is transformed into a higher dimensional space, Generalized optimal classifier is sought in this space, i.e., it is non-thread Property can divide under optimum classifier, the kernel function of support vector machines after training includes linear kernel function, gaussian radial basis function core letter Any one kernel function of number, wherein the expression formula of linear kernel function is K (x, x ')=a (x*x ');Gaussian radial basis function Expression formula are as follows:Wherein, x and x ' is the vector that sample is constituted.
Further, in step 6, it is verified according to support vector machines by ten retransposings and classification knowledge is carried out to test subgraph Method for distinguishing is following steps:
Step 6.1,10 equal-sized subsets are divided into using test subgraph as training set;
Step 6.2, select one of subset as checksum set, and using other subsets as training sample, according to step Rapid 5 Training Support Vector Machines;
Step 6.3, the classifier y obtained using trainingiTxi+ b) -1 >=0, i=1 ..., n changes on checksum set For test record test error, until all subsets all made verification;
Step 6.4, all test errors are counted.
Further, in step 6, the classifier that classification method uses is that support vector machines and two-dimensional principal component analysis are appointed The combination of the one or two kinds of classifiers of meaning.
The present invention also provides a kind of galvanized steel based on photo and mild steel sorter, described device includes: storage Device, processor and storage in the memory and the computer program that can run on the processor, the processor The computer program is executed to operate in the unit of following device:
Resampling unit is slided, for reading images to be recognized and images to be recognized being carried out sliding weight according to sliding window Sampling generates multiple sampling subgraphs;
Subgraph gray processing unit, for carrying out gray processing to all sampling subgraphs;
The sub-category unit of subgraph, for each sampling subgraph to be divided into trained subgraph and test subgraph;
Vector machine construction unit, for constructing support vector machines;
Vector machine training unit, for by training subgraph as training sample Training Support Vector Machines;
Classification and Identification unit carries out classification knowledge to test subgraph for verifying according to support vector machines by ten retransposings Not.
The disclosure has the beneficial effect that the present invention provides a kind of galvanized steel based on photo and mild steel classification method and dress It sets, is beneficial to the online transaction classification of both steel, the characteristic of division of acquisition is easy, pervasive, reduces the cost of manual sort.
Detailed description of the invention
By the way that the embodiment in conjunction with shown by attached drawing is described in detail, above-mentioned and other features of the disclosure will More obvious, identical reference label indicates the same or similar element in disclosure attached drawing, it should be apparent that, it is described below Attached drawing be only some embodiments of the present disclosure, for those of ordinary skill in the art, do not making the creative labor Under the premise of, it is also possible to obtain other drawings based on these drawings, in the accompanying drawings:
Fig. 1 show the flow chart of a kind of galvanized steel based on photo and mild steel classification method;
Fig. 2 show sliding resampling schematic diagram;
Fig. 3 show the average classification accuracy figure that classification obtains;
Fig. 4 show a kind of galvanized steel based on photo and mild steel sorter figure.
Specific embodiment
It is carried out below with reference to technical effect of the embodiment and attached drawing to the design of the disclosure, specific structure and generation clear Chu, complete description, to be completely understood by the purpose, scheme and effect of the disclosure.It should be noted that the case where not conflicting Under, the features in the embodiments and the embodiments of the present application can be combined with each other.
As shown in Figure 1 for according to a kind of flow chart of galvanized steel and mild steel classification method based on photo of the disclosure, A kind of galvanized steel and mild steel classification method based on photo according to embodiment of the present disclosure is illustrated below with reference to Fig. 1.
The disclosure proposes a kind of galvanized steel based on photo and mild steel classification method, specifically includes the following steps:
Step 1, read images to be recognized and by images to be recognized according to sliding window carry out sliding resampling generate it is multiple Sample subgraph;
Step 2, gray processing is carried out to all sampling subgraphs;
Step 3, each sampling subgraph is divided into trained subgraph and test subgraph;
Step 4, support vector machines is constructed;
Step 5, by training subgraph as training sample Training Support Vector Machines;
Step 6, it is verified according to support vector machines by ten retransposings and Classification and Identification is carried out to test subgraph.
Further, in step 1, the reading images to be recognized is steel to crawl the keyword in website by crawler Steel, steel wire, steel strand wires, steel in material, steel wire, steel strand wires, steel pipe, steel plate, steel, the picture of coil of strip or artificial download site Pipe, steel plate, steel, coil of strip photograph image, photograph image is cut manually after saving photograph image, retain steel portion Point remove noise section, the noise section for cropping photograph image is surrounding enviroment in photograph image where steel, on photo Watermark and appear in the worker on photo, manually cut after obtain images to be recognized.
Further, in step 1, it reads images to be recognized and images to be recognized is subjected to sliding weight according to sliding window The method that sampling generates multiple sampling subgraphs are as follows: sliding weight will carried out with the sliding window of 80 × 80 pixels in images to be recognized Sampling generates multiple sampling subgraphs, and sliding resampling is by sliding window that spacing is 80 × 80 pixels will be in images to be recognized It is sampled, is sampled as saving as the image in sliding window into new subgraph, new subgraph samples subgraph, sliding window Mouth is slided since the upper left corner of original image, and sliding window is transversely or longitudinally moved to 40 pixels on picture every time Length sampled, until sliding window has traversed images to be recognized, generate multiple sampling subgraphs.
Further, in step 2, to it is all sampling subgraphs carry out gray processings methods are as follows: to all sampling subgraphs into The method of row gray processing are as follows: each pixel f (i, j) takes three red R (i, j), green G (i, j), blue B (i, j) colors point The mean value of amount quantify as pixel f (i, j) after brightness value, that is, gray processing, gray processing calculation method is
Further, in step 3, the method for each sampling subgraph being divided into trained subgraph and testing subgraph are as follows: namely The sampling subgraph stochastic averagina of all gray processings is divided into ten parts, chooses nine parts therein as training subgraph, remaining survey Swab figure.
Further, in step 4, the method for support vector machines is constructed are as follows:
Subgraph will be trained as sample set, sample set is (xi,yi), i=1 ..., n, x ∈ Rd, y ∈ {+1, -1 } is classification Label, in d dimension space RdIn, linear discriminant function is g (x)=ωTX+b, b are the threshold values of classification, by any one supporting vector It acquires, classifier equation are as follows: ωTX+b=0;
Discriminant function is normalized, meets all samples of two classes all | g (x) | >=1, it may be assumed that so that most from classifier Close sample | g (x) |=1, such class interval is equal to 2/ | | ω | |, be equivalent to make the norm of supporting vector ω | | ω | | most It is small, while classification line being required correctly to classify all samples, that is, require it to meet condition: yiTxi+ b) -1 >=0, i=1 ..., N, ωTFor the transposition of supporting vector;Meet condition and make | | ω | |2The smallest classifier is exactly optimum classifier, these two types of samples In the point nearest from classifier and be parallel to the hyperplane H of optimum classifier1,H2On training sample be exactly optimum classifier Sample, i.e. support vector machines.
Further, in steps of 5, the method by training subgraph as training sample Training Support Vector Machines are as follows: defeated Enter sample set, optimum classifier problem representation are as follows: yiTxi+ b) -1 >=0, i=1 ... finds a function under the constraint of nMinimum value defines Lagrangian are as follows:
Wherein, aiFor Lagrange coefficient, ai> 0, partial differential is asked to ω and b respectively, and result is enabled to be equal to 0, about Beam conditionai>=0, i=1 ... solve the maximum value of lower array function under n to ai:Ifω for maximum value, then after training*Are as follows:I.e. most The weight coefficient vector of excellent classifier is the linear combination of training sample vector, and the classifier equation of optimization problem meets after training: ai[yiTxi+ b) -1]=0, i=1 ..., n;Therefore, to most samplesIt will be 0, value is not 0Corresponding to classification Device equation yiTxi+ b) -1 >=0, i=1 ..., the sample that n equal sign is set up, that is, supporting vector after training, after solving the above problem Obtained optimal classification function, that is, support vector machines is after training,Due to non-supporting Vector is correspondingIt is 0, therefore the summation in formula actually only carries out supporting vector.And b*It is the threshold classified after training Value, is acquired by any one supporting vector, and in summary, the support vector machines after training is exactly first by fixed with interior Product function The input space is transformed to a higher dimensional space by the nonlinear transformation of justice, and Generalized optimal classifier is sought in this space, i.e., non- The kernel function of optimum classifier under linear separability, the support vector machines after training includes linear kernel function, gaussian radial basis function core Any one kernel function of function, wherein the expression formula of linear kernel function is K (x, x ')=a (x*x ');Gaussian radial basis function Expression formula are as follows:Wherein, x and x ' is the vector that sample is constituted.
Further, in step 6, it is verified according to support vector machines by ten retransposings and classification knowledge is carried out to test subgraph Method for distinguishing is following steps:
Step 6.1,10 equal-sized subsets are divided into using test subgraph as training set;
Step 6.2, select one of subset as checksum set, and using other subsets as training sample, according to step Rapid 5 Training Support Vector Machines;
Step 6.3, the classifier y obtained using trainingiTxi+ b) -1 >=0, i=1 ..., n changes on checksum set For test record test error, until all subsets all made verification;
Step 6.4, all test errors are counted.
Further, in step 6, the classifier that classification method uses is that support vector machines and two-dimensional principal component analysis are appointed The combination of the one or two kinds of classifiers of meaning.
A kind of embodiment of the invention, firstly, the present invention collects the photo of galvanized steel and mild steel from network.Photo comes Source is Google, the websites such as Baidu and Alibaba.Since online photo has noise much unrelated with identification mission, such as steel Surrounding enviroment, photo watermark, worker where material etc., so the present invention slightly is cut out at the beginning of carrying out a step to picture after saving picture It cuts, removes noise as far as possible, while retaining the part where steel.Available original galvanized steel and low-carbon in this way The picture of steel.
Due to crawled by crawler it is in a network or manually uneven in the picture quality level of network downloading, wherein having Some repetitions, so meeting the picture of condition and few.In order to make full use of the picture downloaded to, the present invention to original image into Row resampling.In particular, the present invention is slided on picture with a small sliding window, the extracting section in window is come out As new image.This operation is applied on all pictures downloaded to, so as to generate a series of new pictures.This The operation of a sliding resampling is but also the picture size of all generations is consistent, so as to by various algorithm for pattern recognition applications Face on them.
In newly-generated picture, it is noise that part picture, which has larger proportion, such as periphery when taking pictures where steel Environment, photo watermark etc..The undesirable picture in this part is got rid of, remaining picture is exactly to meet Classification and Identification requirement Picture.
Classification and Identification finally is carried out to the picture that above step obtains.In particular, the present invention answers ten retransposings verifying It is divided into ten parts at random in this group of data, that is, by all pictures, chooses nine parts therein every time as training, is left It is a as test, repeat ten times, until all pictures are all tested.The recognition result of test picture is obtained Afterwards, a total classification accuracy can be calculated, for assessing the performance of this Classification and Identification frame.
Another embodiment of the invention, first downloads photo from the Internet.The source of photo is Google, Baidu and Alibaba Equal websites.Since it is an object of the present invention to the identifications based on steel photo progress steel type, so the photo met the requirements needs It wants preferably show the information such as color, texture, the quality of steel.Coil of strip meets this requirement, so being selected.Except steel Except volume, the photo of many relevant steel, such as steel wire, steel strand wires, steel pipe, steel plate, the outer packing of steel product, advertising page Deng being all filtered.By carefully searching for and selecting, 53 zinc-plated coil of strip photos are always obtained and 18 low-carbon coil of strips shine Piece.
The photo being collected into is cut manually, removes the part more comprising noise, has obtained a series of new steel Material picture.Noise in Part of photos taken is not removed completely, this is retained to make full use of picture.These noises will It is removed after sliding resampling.Although the main body in these pictures is steel, the effect that steel picture itself shows Fruit is influenced by several factors, including shooting angle;Ambient light intensity;Camera lens is at a distance from coil of strip;Steel surface it is reflective Or shade;The some of steel surface are blocked, such as strap, literal notation;The cambered surface of coil of strip, the difference between side, and volume hole Deng.In addition, the surface of galvanized steel is zinc, the appearance for having comparison unified is visually seemed, and mild steel is that carbon content is lower than The general name of 0.25% steel can be with according to quality, manufacturing process, metallographic structure, purpose classification, smelting process etc. The subspecies of very multiple types are separated, these subspecies in appearance may be multifarious.This is the great challenge to sorting algorithm.Though These right factors can have a significant impact to picture recognition effect, it is contemplated that they are objective reality, the present invention is not directed to These factors are distinguishingly handled or are operated.These factor brings are difficult, also the inspection exactly to the effect of recognizer.
After obtaining the image that main body is steel, sliding resampling is carried out on picture with 80 × 80 sliding window.
As shown in Fig. 2, Fig. 2 is the schematic diagram for sliding resampling.The method of sliding resampling is, by one 80 × 80 cunning Dynamic window is placed on picture, and the image in window is saved as to new picture.It is slided since the upper left corner of original image, every time The length that sliding window is transversely or longitudinally moved to 40 pixels on picture, until this sliding window traverses whole figure Until piece.This sliding resampling steps is applied on all pictures, a series of available new pictures.From these figures Removed manually obviously in piece be noise picture, it is remaining just can be used to classification picture.Due to carrying out before just slightly Ground is cut manually, so the number of pictures for needing to remove in the step is less.By sliding resampling and erased noise picture The two steps, galvanized steel photo generate 3696 new pictures, and mild steel photo generates 495 new pictures.
Due to two class imbalanced training sets, so randomly selecting 495 from the picture of galvanized steel at random when being classified , so that two class samples reach balanced.Since picture itself is colored, and colour information can not have in classification, So before carrying out Classification and Identification, gray processing first carried out to all pictures, after gray processing by 495 galvanized steel pictures and 495 mild steel pictures are classified using ten retransposings verifying.These pictures are divided into ten parts at random, choose nine every time Part, which is used as, trains, and remaining a be used as is tested, and is repeated ten times, and until all pictures are all tested, then calculating is classified Accuracy rate.
The present invention is classified using two kinds of popular pattern recognition classifier algorithms, is support vector machines and two dimension master respectively Constituent analysis.The average classification accuracy that the former obtains is 0.5293, the average classification accuracy that the latter obtains;
As shown in figure 3, Fig. 3 is the average classification accuracy figure that classification obtains, reach when 5 two-dimentional principal components before selection Maximum is 0.6940.Using two sample t-tests it is found that discrimination obtained is significantly higher than Random Level, two-dimentional principal component Analysis more has apparent advantage relative to support vector machines in this classification task.
In conclusion the present invention proposes a kind of process for carrying out Classification and Identification to galvanized steel and mild steel based on photo, and And it is successfully applied to classify on the photo downloaded from network.
A kind of galvanized steel and mild steel sorter based on photo that embodiment of the disclosure provides, is illustrated in figure 4 A kind of galvanized steel and mild steel sorter figure based on photo of the disclosure, a kind of galvanized steel based on photo of the embodiment Include: processor, memory and storage in the memory with mild steel sorter and can transport on the processor Capable computer program, the processor realize above-mentioned a kind of galvanized steel based on photo and low when executing the computer program Step in carbon steel sorter embodiment.
Described device includes: memory, processor and storage in the memory and can transport on the processor Capable computer program, the processor execute the computer program and operate in the unit of following device:
Resampling unit is slided, for reading images to be recognized and images to be recognized being carried out sliding weight according to sliding window Sampling generates multiple sampling subgraphs;
Subgraph gray processing unit, for carrying out gray processing to all sampling subgraphs;
The sub-category unit of subgraph, for each sampling subgraph to be divided into trained subgraph and test subgraph;
Vector machine construction unit, for constructing support vector machines;
Vector machine training unit, for by training subgraph as training sample Training Support Vector Machines;
Classification and Identification unit carries out classification knowledge to test subgraph for verifying according to support vector machines by ten retransposings Not.
A kind of galvanized steel and mild steel sorter based on photo can run on desktop PC, notes Originally, palm PC and cloud server etc. calculate in equipment.A kind of galvanized steel and mild steel sorter based on photo, The device that can be run may include, but be not limited only to, processor, memory.It will be understood by those skilled in the art that the example is only It is only the example of a kind of galvanized steel based on photo and mild steel sorter, does not constitute to a kind of galvanized steel based on photo It may include component more more or fewer than example with the restriction of mild steel sorter, perhaps combine certain components or not With component, such as a kind of galvanized steel and mild steel sorter based on photo can also include input-output equipment, Network access equipment, bus etc..
Alleged processor can be central processing unit (Central Processing Unit, CPU), can also be it His general processor, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng, the processor is a kind of control centre of galvanized steel and mild steel sorter running gear based on photo, benefit With the entire a kind of galvanized steel and mild steel sorter based on photo of various interfaces and connection can running gear it is each Part.
The memory can be used for storing the computer program and/or module, and the processor is by operation or executes Computer program in the memory and/or module are stored, and calls the data being stored in memory, described in realization A kind of various functions of galvanized steel and mild steel sorter based on photo.The memory can mainly include storing program area The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory may include high-speed random access memory, it can also include non-volatile Memory, such as hard disk, memory, plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card), at least one disk memory, flush memory device or other Volatile solid-state part.
Although the description of the disclosure is quite detailed and especially several embodiments are described, it is not Any of these details or embodiment or any specific embodiments are intended to be limited to, but should be considered as is by reference to appended A possibility that claim provides broad sense in view of the prior art for these claims explanation, to effectively cover the disclosure Preset range.In addition, the disclosure is described with inventor's foreseeable embodiment above, its purpose is to be provided with Description, and those equivalent modifications that the disclosure can be still represented to the unsubstantiality change of the disclosure still unforeseen at present.

Claims (9)

1. a kind of galvanized steel and mild steel classification method based on photo, which is characterized in that the described method comprises the following steps:
Step 1, it reads images to be recognized and images to be recognized is subjected to sliding resampling according to sliding window and generate multiple samplings Subgraph;
Step 2, gray processing is carried out to all sampling subgraphs;
Step 3, each sampling subgraph is divided into trained subgraph and test subgraph;
Step 4, support vector machines is constructed;
Step 5, by training subgraph as training sample Training Support Vector Machines;
Step 6, it is verified according to support vector machines by ten retransposings and Classification and Identification is carried out to test subgraph.
2. a kind of galvanized steel and mild steel classification method based on photo according to claim 1, which is characterized in that in step In rapid 1, reads images to be recognized and images to be recognized is subjected to the multiple sampling subgraphs of sliding resampling generation according to sliding window Method are as follows: with the sliding window of 80 × 80 pixels, will carry out sliding resampling in images to be recognized, to generate multiple samplings sub Figure, sliding resampling by spacing be 80 × 80 pixels sliding window will sampled in images to be recognized, be sampled as by Image in sliding window saves as new subgraph, and new subgraph samples subgraph, and sliding window is from a left side for original image Upper angle starts to slide, and the length that sliding window is transversely or longitudinally moved to 40 pixels on picture every time samples, Until sliding window has traversed images to be recognized, multiple sampling subgraphs are generated.
3. a kind of galvanized steel and mild steel classification method based on photo according to claim 1, which is characterized in that in step In rapid 2, to the method for all sampling subgraphs progress gray processings are as follows: the methods for carrying out gray processings to all sampling subgraphs are as follows: each Pixel f (i, j) take red R (i, j), green G (i, j), blue B (i, j) three color components mean value as pixel f Brightness value, that is, gray processing after (i, j) quantization, gray processing calculation method are
4. a kind of galvanized steel and mild steel classification method based on photo according to claim 1, which is characterized in that in step In rapid 3, each sampling subgraph is divided into the method for trained subgraph with test subgraph are as follows: namely by the sampling subgraph of all gray processings Stochastic averagina is divided into ten parts, chooses nine parts therein as training subgraph, remaining test subgraph.
5. a kind of galvanized steel and mild steel classification method based on photo according to claim 1, which is characterized in that in step In rapid 4, the method that constructs support vector machines are as follows:
Subgraph will be trained as sample set, sample set is (xi,yi), i=1 ..., n, x ∈ Rd, y ∈ {+1, -1 } is category label, In d dimension space RdIn, linear discriminant function is g (x)=ωTX+b, the threshold value classified by the b that any one supporting vector acquires, Classifier equation are as follows: ωTDiscriminant function is normalized x+b=0, meets all samples of two classes all | g (x) | >=1, it may be assumed that So that the sample nearest from classifier | g (x) |=1, such class interval is equal to 2/ | | ω | |, it is equivalent to make supporting vector ω Norm | | ω | it is minimum, while classification line being required correctly to classify all samples, that is, require it to meet condition: yiTxi+b)- 1 >=0, i=1 ..., n, ωTFor the transposition of supporting vector;Meet condition and make | | ω | |2The smallest classifier is exactly optimal classification Device the point nearest from classifier and is parallel to the hyperplane H of optimum classifier in these two types of samples1,H2On training sample be exactly The sample of optimum classifier, i.e. support vector machines.
6. a kind of galvanized steel and mild steel classification method based on photo according to claim 1, which is characterized in that in step Method in rapid 5, by training subgraph as training sample Training Support Vector Machines are as follows: input sample collection, by optimum classifier Problem representation are as follows: yi (ω Txi+b) -1 >=0, i=1 ... is found a function under the constraint of nMinimum value, definition Lagrangian are as follows:Wherein, aiFor Lagrange coefficient, ai> 0, partial differential is asked to ω and b respectively, and result is enabled to be equal to 0, in constraint conditionai>=0, i=1 ..., n;It is right aiSolve the maximum value of lower array function:IfFor maximum value, then after training ω*Are as follows:That is the weight coefficient vector of optimum classifier is the linear combination of training sample vector, excellent after training The classifier equation of change problem meets: ai[yiTxi+ b) -1]=0, i=1 ..., n;Therefore, to most samplesIt will be 0, Value is not 0Corresponding to classifier equation yiTxi+ b) -1 >=0, i=1 ..., n equal sign set up sample, training after prop up Holding vector machine is,
7. a kind of galvanized steel and mild steel classification method based on photo according to claim 1, which is characterized in that in step In rapid 6, verifying the method for carrying out Classification and Identification to test subgraph by ten retransposings according to support vector machines is following steps:
Step 6.1,10 equal-sized subsets are divided into using test subgraph as training set;
Step 6.2, it selects one of subset as checksum set, and is instructed as training sample according to step 5 using other subsets Practice support vector machines;
Step 6.3, the classifier y obtained using trainingiTxi+ b) -1 >=0, i=1 ..., n is iterated survey on checksum set Trial record test error, until all subsets all made verification;
Step 6.4, all test errors are counted.
8. a kind of galvanized steel and mild steel classification method based on photo according to claim 1, which is characterized in that in step In rapid 6, classifier that classification method uses is support vector machines and two-dimensional principal component analysis any one or two kinds of classifiers In conjunction with.
9. a kind of galvanized steel and mild steel sorter based on photo, which is characterized in that described device includes: memory, place The computer program managing device and storage in the memory and can running on the processor, the processor execute institute Computer program is stated to operate in the unit of following device:
Resampling unit is slided, for reading images to be recognized and images to be recognized being carried out sliding resampling according to sliding window Generate multiple sampling subgraphs;
Subgraph gray processing unit, for carrying out gray processing to all sampling subgraphs;
The sub-category unit of subgraph, for each sampling subgraph to be divided into trained subgraph and test subgraph;
Vector machine construction unit, for constructing support vector machines;
Vector machine training unit, for by training subgraph as training sample Training Support Vector Machines;
Classification and Identification unit carries out Classification and Identification to test subgraph for verifying according to support vector machines by ten retransposings.
CN201811632530.2A 2018-12-29 2018-12-29 Photo-based galvanized steel and low-carbon steel classification method and device Active CN109766939B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811632530.2A CN109766939B (en) 2018-12-29 2018-12-29 Photo-based galvanized steel and low-carbon steel classification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811632530.2A CN109766939B (en) 2018-12-29 2018-12-29 Photo-based galvanized steel and low-carbon steel classification method and device

Publications (2)

Publication Number Publication Date
CN109766939A true CN109766939A (en) 2019-05-17
CN109766939B CN109766939B (en) 2023-09-26

Family

ID=66452680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811632530.2A Active CN109766939B (en) 2018-12-29 2018-12-29 Photo-based galvanized steel and low-carbon steel classification method and device

Country Status (1)

Country Link
CN (1) CN109766939B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110532924A (en) * 2019-08-22 2019-12-03 江苏联峰实业有限公司 A kind of identifying processing method and device of high heat resistance steel

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104112143A (en) * 2014-07-23 2014-10-22 大连民族学院 Weighted hyper-sphere support vector machine algorithm based image classification method
CN105426842A (en) * 2015-11-19 2016-03-23 浙江大学 Support vector machine based surface electromyogram signal multi-hand action identification method
CN106295661A (en) * 2016-08-15 2017-01-04 北京林业大学 The plant species identification method of leaf image multiple features fusion and device
CN107679453A (en) * 2017-08-28 2018-02-09 天津大学 Weather radar electromagnetic interference echo recognition methods based on SVMs
CN107688829A (en) * 2017-08-29 2018-02-13 湖南财政经济学院 A kind of identifying system and recognition methods based on SVMs
CN108647718A (en) * 2018-05-10 2018-10-12 江苏大学 A kind of different materials metallographic structure is classified the method for grading automatically
CN108765412A (en) * 2018-06-08 2018-11-06 湖北工业大学 A kind of steel strip surface defect sorting technique

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104112143A (en) * 2014-07-23 2014-10-22 大连民族学院 Weighted hyper-sphere support vector machine algorithm based image classification method
CN105426842A (en) * 2015-11-19 2016-03-23 浙江大学 Support vector machine based surface electromyogram signal multi-hand action identification method
CN106295661A (en) * 2016-08-15 2017-01-04 北京林业大学 The plant species identification method of leaf image multiple features fusion and device
CN107679453A (en) * 2017-08-28 2018-02-09 天津大学 Weather radar electromagnetic interference echo recognition methods based on SVMs
CN107688829A (en) * 2017-08-29 2018-02-13 湖南财政经济学院 A kind of identifying system and recognition methods based on SVMs
CN108647718A (en) * 2018-05-10 2018-10-12 江苏大学 A kind of different materials metallographic structure is classified the method for grading automatically
CN108765412A (en) * 2018-06-08 2018-11-06 湖北工业大学 A kind of steel strip surface defect sorting technique

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110532924A (en) * 2019-08-22 2019-12-03 江苏联峰实业有限公司 A kind of identifying processing method and device of high heat resistance steel

Also Published As

Publication number Publication date
CN109766939B (en) 2023-09-26

Similar Documents

Publication Publication Date Title
US9594977B2 (en) Automatically selecting example stylized images for image stylization operations based on semantic content
CN102799635B (en) The image collection sort method that a kind of user drives
CN109509187B (en) Efficient inspection algorithm for small defects in large-resolution cloth images
David et al. Deeppainter: Painter classification using deep convolutional autoencoders
CN105144239B (en) Image processing apparatus, image processing method
CN108920580A (en) Image matching method, device, storage medium and terminal
CN110910343A (en) Method and device for detecting pavement cracks and computer equipment
CN103988202A (en) Image attractiveness based indexing and searching
CN104866868A (en) Metal coin identification method based on deep neural network and apparatus thereof
Kelek et al. Painter classification over the novel art painting data set via the latest deep neural networks
CN109472280B (en) Method for updating species recognition model library, storage medium and electronic equipment
CN113761259A (en) Image processing method and device and computer equipment
CN110942144B (en) Neural network construction method integrating automatic training, checking and reconstruction
CN108764018A (en) A kind of multitask vehicle based on convolutional neural networks recognition methods and device again
CN106503047B (en) A kind of image crawler optimization method based on convolutional neural networks
CN108985285A (en) A kind of commodity patent acquisition methods and system based on machine recognition
CN108427971A (en) The method and system of tobacco leaf grading based on mobile terminal
CN109977832A (en) A kind of image processing method, device and storage medium
Bressane et al. Statistical analysis of texture in trunk images for biometric identification of tree species
CN105164672A (en) Content classification
CN109766939A (en) A kind of galvanized steel and mild steel classification method and device based on photo
CN114298179A (en) Data processing method, device and equipment
Bruno et al. A novel image dataset for source camera identification and image based recognition systems
Olisah et al. Understanding unconventional preprocessors in deep convolutional neural networks for face identification
David et al. Authentication of Vincent van Gogh’s work

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant