CN114897905B - Hydraulic valve production control method based on image processing - Google Patents
Hydraulic valve production control method based on image processing Download PDFInfo
- Publication number
- CN114897905B CN114897905B CN202210822968.7A CN202210822968A CN114897905B CN 114897905 B CN114897905 B CN 114897905B CN 202210822968 A CN202210822968 A CN 202210822968A CN 114897905 B CN114897905 B CN 114897905B
- Authority
- CN
- China
- Prior art keywords
- hydraulic valve
- casting
- pixel points
- valve casting
- ray image
- 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.)
- Active
Links
- 238000012545 processing Methods 0.000 title claims abstract description 19
- 238000000195 production control method Methods 0.000 title claims abstract description 14
- 238000005266 casting Methods 0.000 claims abstract description 224
- 238000004519 manufacturing process Methods 0.000 claims abstract description 36
- 238000000034 method Methods 0.000 claims abstract description 23
- 230000009191 jumping Effects 0.000 claims abstract description 16
- 230000008569 process Effects 0.000 claims description 10
- 239000000126 substance Substances 0.000 claims description 10
- 238000012549 training Methods 0.000 claims description 6
- 238000002372 labelling Methods 0.000 claims description 3
- 230000007547 defect Effects 0.000 abstract description 56
- 238000001514 detection method Methods 0.000 abstract description 8
- 230000001105 regulatory effect Effects 0.000 description 9
- 238000000280 densification Methods 0.000 description 5
- 230000001276 controlling effect Effects 0.000 description 3
- 238000007796 conventional method Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 229910001141 Ductile iron Inorganic materials 0.000 description 1
- 235000008694 Humulus lupulus Nutrition 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005087 graphitization Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 239000002184 metal Substances 0.000 description 1
- 229910052751 metal Inorganic materials 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000002893 slag Substances 0.000 description 1
- 238000007711 solidification Methods 0.000 description 1
- 230000008023 solidification Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration by the use of histogram techniques
-
- G06T5/90—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/762—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/774—Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10116—X-ray image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30116—Casting
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Abstract
The invention relates to the field of hydraulic valve production control, in particular to a hydraulic valve production control method based on image processing. The method comprises the following steps: acquiring an X-ray image of a hydraulic valve casting produced at the current moment, and calculating the attention degree of each pixel point on the image; clustering the pixel points with the attention degree greater than or equal to a set threshold value to obtain an area with the highest concentration degree; coding the pixel points in the region with the highest density degree, and counting the jumping times of the pixel points in the region with the highest density degree; calculating the relevance of the pixel points in the region according to the jumping times of the pixel points in the region with the highest density; calculating the compactness of the hydraulic valve casting piece according to the relevance of pixel points in the region with the highest density degree; and judging whether the compactness of the hydraulic valve casting is less than or equal to a set threshold, and if the compactness of the hydraulic valve casting is less than or equal to the set threshold, adjusting the casting speed and the casting temperature in the production process of the hydraulic valve casting. The invention improves the efficiency of hydraulic valve shrinkage porosity defect detection.
Description
Technical Field
The invention relates to the field of production control of hydraulic valves, in particular to a production control method of a hydraulic valve based on image processing.
Background
The hydraulic component is used as a high-load precision machine, not only needs to realize accurate hydraulic transmission and control, but also needs to bear variable high-pressure load, and the quality requirement on the hydraulic component is very high. The hydraulic casting is the foundation of a high-end hydraulic element, and the quality of the hydraulic element casting becomes an important factor influencing hydraulic technology.
Although the appearance of the hydraulic valve body casting is simple, the cross section structure of the hydraulic valve body casting is complex, in the casting process of the hydraulic valve, the design of a pouring system is unreasonable, the valve body casting is possibly accompanied by more or less casting defects, the casting defects can cause the non-uniformity of the valve body base body, the compactness of the casting is reduced, and even the clamping stagnation phenomenon of the valve body in the working process can be possibly caused. When the valve body casting material is nodular cast iron, the unreasonable design of a pouring system can cause uneven distribution of the temperature field in the casting mould, so that the casting cannot fully utilize graphitization expansion in the solidification process, the molten metal flow resistance is large, the hot spot is difficult to be fed, and the finally solidified part at the hot spot generates shrinkage porosity and shrinkage cavity defects. The shrinkage porosity defect is not the same as the surface defect such as a pockmark, slag inclusion, crack and the like, and the shrinkage porosity defect generally generates a thick and large part at the root of a flying head near an ingate, a thick and thin transition part of a wall and a thin wall with a large plane. The shrinkage porosity defect detection of the conventional hydraulic valve mainly depends on manual work, and the detection efficiency is low.
Disclosure of Invention
In order to solve the problem of low efficiency when the conventional method is used for detecting the shrinkage porosity defect of the hydraulic valve, the invention aims to provide a hydraulic valve production control method based on image processing, and the adopted technical scheme is as follows:
the invention provides a hydraulic valve production control method based on image processing, which comprises the following steps:
acquiring an X-ray image of a hydraulic valve casting produced at the current moment;
constructing a gray level histogram corresponding to the X-ray image of the hydraulic valve casting, and calculating the attention degree of each pixel point on the X-ray image of the hydraulic valve casting; clustering pixel points with the attention degree larger than or equal to a set threshold value on an X-ray image of the hydraulic valve casting to obtain an area with the highest concentration degree on the X-ray image of the hydraulic valve casting;
coding the pixel points in the region with the highest density degree, and counting the jumping times of the pixel points in the region with the highest density degree; calculating the relevance of the pixel points in the region with the highest concentration degree according to the hopping times of the pixel points in the region with the highest concentration degree and the number of the pixel points; calculating the compactness of the hydraulic valve casting piece according to the relevance of the pixel points in the region with the highest density degree;
and judging whether the compactness of the hydraulic valve casting is less than or equal to a set threshold, and if the compactness of the hydraulic valve casting is less than or equal to the set threshold, adjusting the casting speed and the casting temperature in the production process of the hydraulic valve casting.
Preferably, the following formula is adopted to calculate the attention degree of each pixel point on the X-ray image of the hydraulic valve:
wherein the content of the first and second substances,the attention degree of the X-th pixel point on the X-ray image of the hydraulic valve casting piece,is a value of a threshold value of the gray scale,is the maximum gray value of the pixel points on the image, X is the gray value of the X-th pixel point on the X-ray image of the hydraulic valve casting piece, l is the number of the pixel points on the X-ray image of the hydraulic valve casting piece,the gray value of the ith pixel point on the X-ray image of the hydraulic valve casting is shown, and e is the base number of the natural logarithm.
Preferably, the following formula is adopted to calculate the correlation of the pixel points in the region with the highest density degree:
f is the correlation of pixel points in the region with the highest density, b is the number of the pixel points in the region, N is the jumping frequency of the pixel points in the region, and a is the number of marked pixel points in the region; and the marked pixel points are pixel points of which the attention degree on the X-ray image of the hydraulic valve casting is greater than or equal to a set threshold value.
Preferably, the compactness of the hydraulic valve casting is calculated by the following formula:
wherein the content of the first and second substances,in order to ensure the compactness of the casting piece of the hydraulic valve,the correlation of the pixel points in the region with the highest density,the total number of marked pixel points on the X-ray image of the hydraulic valve casting is calculated,the total number of pixel points on the X-ray image of the hydraulic valve casting.
Preferably, the determining whether the compactness of the hydraulic valve casting is greater than a second threshold, and if so, adjusting the pouring speed in the production process of the hydraulic valve casting includes:
wherein the content of the first and second substances,for the casting speed of the hydraulic valve casting piece produced at the next moment,the pouring speed of the hydraulic valve casting is produced at the current moment,for the compactness of the hydraulic valve casting at the current moment,is speedAnd (5) regulating and controlling parameters.
Preferably, the adjusting of the pouring speed and the pouring temperature in the production process of the hydraulic valve casting piece comprises the following steps:
wherein the content of the first and second substances,for the casting speed of the hydraulic valve casting piece produced at the next moment,the pouring speed of the hydraulic valve casting is produced at the current moment,for the compactness of the hydraulic valve casting at the current moment,in order to regulate and control the parameters of the speed,for the casting temperature of the hydraulic valve casting piece produced at the next moment,the pouring temperature for producing the hydraulic valve casting at the current moment,is a temperature regulation parameter.
Preferably, the encoding the pixel points in the region with the highest density degree, and counting the number of hops of the pixel points in the region with the highest density degree, includes:
and (3) encoding pixel points in the region with the highest density: the pixel point code belonging to the mark is 1, the pixel point code not belonging to the mark is 0, and a row sequence is established; the marked pixel points are pixel points of which the attention degree on the X-ray image of the hydraulic valve casting is greater than or equal to a set threshold value;
and counting the jumping times of the pixel points from 1 to 0 in the row sequence.
Preferably, the determining whether the compactness of the hydraulic valve casting is less than or equal to a set threshold, and if the compactness of the hydraulic valve casting is less than or equal to the set threshold, adjusting the pouring speed and the pouring temperature in the production process of the hydraulic valve casting comprises:
judging whether the compactness of the hydraulic valve casting is smaller than or equal to a first threshold, if so, judging whether the compactness of the hydraulic valve casting is larger than a second threshold, if so, adjusting the pouring speed in the production process of the hydraulic valve casting, and if not, adjusting the pouring speed and the pouring temperature in the production process of the hydraulic valve casting; the first threshold is greater than a second threshold.
Preferably, the acquiring an X-ray image of the hydraulic valve casting produced at the current time includes:
the training set of the DNN network comprises a plurality of images containing hydraulic valve casting parts, and the label labeling process corresponding to the training set comprises the following steps: the mark of the pixel point at the corresponding position belonging to the background class is 0, and the mark of the pixel point at the corresponding position belonging to the hydraulic valve casting piece is 1;
and inputting the acquired initial X-ray image into a trained DNN network to obtain an X-ray image of the hydraulic valve casting.
The invention has the following beneficial effects: according to the invention, the shrinkage porosity defect of the hydraulic valve casting is considered to influence the quality of the product, so that the shrinkage porosity defect detection is carried out on the produced hydraulic valve casting, and the gray value of the pixel point of the shrinkage porosity defect is different from the pixel value of the pixel point in the normal area to a certain extent. The specific shrinkage porosity defect detection process comprises the following steps: constructing a gray level histogram corresponding to the X-ray image of the hydraulic valve casting, and calculating the attention degree of each pixel point on the X-ray image of the hydraulic valve casting; clustering pixel points with the attention degree larger than or equal to a set threshold value on an X-ray image of the hydraulic valve casting to obtain an area with the highest concentration degree on the X-ray image of the hydraulic valve casting, and calculating the relevance of the pixel points in the area with the highest concentration degree; according to the relevance of the pixel points in the area with the highest density degree, the compactness of the hydraulic valve casting piece is calculated, the compactness of the hydraulic valve casting piece can reflect the shrinkage porosity defect degree of the hydraulic valve casting piece, and the casting speed or the casting speed and the casting temperature in the subsequent hydraulic valve production process are adjusted according to the compactness of the hydraulic valve casting piece. The method provided by the invention is not required to depend on manual work to detect the shrinkage porosity defect of the hydraulic valve casting piece, and solves the problem of low efficiency existing in the conventional method which depends on manual work to detect the shrinkage porosity defect of the hydraulic valve casting piece.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a hydraulic valve production control method based on image processing according to the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention for achieving the predetermined objects, a method for controlling the production of a hydraulic valve based on image processing according to the present invention is described in detail below with reference to the accompanying drawings and preferred embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following describes a specific scheme of the hydraulic valve production control method based on image processing in detail with reference to the accompanying drawings.
Embodiment of hydraulic valve production control method based on image processing
The problem of low efficiency exists when the existing method is used for detecting the shrinkage porosity defect of the hydraulic valve. In order to solve the above problem, the present embodiment proposes a hydraulic valve production control method based on image processing, and as shown in fig. 1, the hydraulic valve production control method based on image processing of the present embodiment includes the following steps:
and step S1, acquiring the X-ray image of the hydraulic valve casting produced at the current moment.
The idea of the embodiment is as follows: and judging whether the casting speed and the casting temperature in the casting process are proper or not according to the quality of the hydraulic valve casting piece produced at the current moment, and if not, adjusting the casting temperature and the casting speed in the casting process to ensure that the quality of the hydraulic valve casting piece produced subsequently can reach the standard. The shrinkage porosity defect is a relatively serious defect of the hydraulic valve, and the quality of the hydraulic valve can be influenced by the defect, so that the embodiment aims to detect the shrinkage porosity defect of the hydraulic valve and adjust the casting speed and the casting temperature in the subsequent production process according to the defect degree of the shrinkage porosity defect. Firstly, an X-ray image of a hydraulic valve casting produced at the current moment needs to be acquired, and the shrinkage porosity defect of the hydraulic valve casting produced at the current moment is detected. The camera is arranged to this embodiment, gathers initial X-ray image, contains hydraulic valve casting, work face in the initial X-ray image, even complicated operating mode background. In order to avoid the influence of other noises on the detection of the shrinkage porosity defect of the hydraulic valve casting, the DNN technology is adopted in the embodiment to identify the hydraulic valve casting in the image.
The specific contents of the DNN network are as follows:
the training set of the DNN network is an acquired initial X-ray image containing various hydraulic valve casting parts; the task of the DNN network is classification, pixels needing to be segmented are divided into two types, and the label labeling process corresponding to the training set is as follows: the semantic label of the single channel, the mark of the pixel at the corresponding position belonging to the background class is 0, and the mark of the pixel belonging to the hydraulic valve casting piece is 1; the loss function used is a cross entropy loss function.
And inputting the acquired initial X-ray image into a trained DNN network to obtain an X-ray image of the hydraulic valve casting.
Step S2, constructing a gray level histogram corresponding to the X-ray image of the hydraulic valve casting, and calculating the attention degree of each pixel point on the X-ray image of the hydraulic valve casting; and clustering pixel points of the attention degree in the set interval on the X-ray image of the hydraulic valve casting to obtain an area with the highest concentration degree on the X-ray image of the hydraulic valve casting.
The shrinkage porosity defect of the hydraulic valve has no fixed shape, and the shrinkage porosity defect is usually cloud-shaped and is filiform when serious. The hydraulic valve has an oil groove, so that a region with small and uniform gray value exists in the collected X-ray image, and the region is often the oil groove; the gray value of an X-ray image of a valve body of the hydraulic valve is usually larger, namely, the gray value is white; for the shrinkage porosity defect of the hydraulic valve, the gray value of the X-ray image is between the gray values of the oil groove and the valve body of the hydraulic valve, and the gray value is more biased to be smaller. In the embodiment, the attention degree of pixel points on the X-ray image of the hydraulic valve casting is calculated, the target pixel points are screened, and the shrinkage porosity defect is usually cloud-shaped and is filamentous in a serious state, and some correlation exists between the target pixel points, namely the probability that the pixel points are the shrinkage porosity defect is higher. For a normal hydraulic valve casting piece, the internal structure of the product is compact, so that compactness judgment is carried out according to the proportion of target pixel points, the relation between the pixel points and the relation between the whole product, and the production process is regulated and controlled according to the compactness.
According to the embodiment, the pouring temperature and the pouring speed of the hydraulic valve casting piece are adjusted according to the quality of the product produced at the current moment, so that the attention degree of pixel points on an X-ray image of the product produced at the current moment is required to be obtained at first, and the compactness of the interior of the product is calculated according to the pixel points with high attention degree and the correlation between the pixel points.
The specific process of obtaining the area with the highest density degree on the X-ray image of the hydraulic valve casting piece according to the attention degree of the pixel points on the X-ray image of the hydraulic valve casting piece is as follows:
(1) and constructing a gray level histogram corresponding to the X-ray image of the valve body of the hydraulic valve, counting pixel points on the X-ray image of the hydraulic valve casting, and acquiring the number of gray level numbers and the number of pixel points of each gray level. The shrinkage porosity defect has no fixed shape and no fixed gray level, but the gray value of the X-ray image is between the gray level of the oil groove and the gray level of the valve body, and the gray value is more inclined to the smaller gray level, namely the gray level inclined to the oil groove, so that the attention degree of each pixel point on the X-ray image of the hydraulic valve casting piece is calculated by the embodiment, and the target pixel point is selected.
(2) Obtaining the minimum gray level and the maximum gray level according to the gray histogram, and calculating the attention degree of the pixel points according to the minimum gray level and the maximum gray level, namely:
wherein, the first and the second end of the pipe are connected with each other,the attention degree of the X-th pixel point on the X-ray image of the hydraulic valve casting piece,is the maximum gray value of the pixel point on the image, X is the gray value of the X-th pixel point on the X-ray image of the hydraulic valve casting piece,the number of pixel points on the X-ray image of the hydraulic valve casting,the gray value of the ith pixel point on the X-ray image of the hydraulic valve casting piece is shown, e is the base number of the natural logarithm,the value of (a) is 2.718,for gray scale threshold, in this embodimentIn particular applications, the use of the compositions of the invention,the value of (a) is set according to actual needs.
The larger the value of E is, the larger the attention degree of the corresponding pixel point is, and the more interesting the corresponding pixel point is represented. Since the shrinkage defect has no fixed gray level, a gray level section in which the shrinkage defect is most likely to exist is obtained, that is, when the value of E is 0.8 or more, there is a section, that is, [ 2 ]2],Representing the minimum gray level in the gray histogram. m1 and m2 are gray scale differences corresponding to a degree of attention of 0.8.
(3) Marking the pixel points meeting the attention degree requirement and counting the number of the pixel points, namely, setting the gray value on the X-ray image of the hydraulic valve casting to be in the range of2]The method comprises the steps of marking pixel points and counting the number of the pixel points, wherein the number is recorded as c, the shrinkage porosity defect is usually cloud-shaped and seriously filamentous, the marked pixel points are usually intensively distributed although the shape is not fixed, so that the marked pixel points are clustered, a mean shift clustering algorithm is adopted for clustering, an area with the highest concentration degree on an X-ray image of a hydraulic valve casting is obtained, the number of the pixel points with the attention degree E being more than or equal to 0.8 in the area is the largest, and the area is subsequently analyzed.
Step S3, marking the pixel points in the region with the highest density degree, and counting the jumping times of the pixel points in the region with the highest density degree; calculating the relevance of the pixel points in the region with the highest density degree according to the jumping times of the pixel points in the region with the highest density degree and the number of the pixel points; and calculating the compactness of the hydraulic valve casting piece according to the correlation of the pixel points in the region with the highest density degree.
In step S2, the area with the highest density on the X-ray image of the hydraulic valve casting is obtained, the possibility of the area having the shrinkage porosity defect is high, and if the area meets the shrinkage porosity defect, it indicates that the hydraulic valve casting is a non-conforming product, and the production process needs to be controlled to prevent the subsequent products from continuing to have quality problems.
In the embodiment, the pixel points of the area with the highest density degree on the X-ray image of the hydraulic valve casting are coded, the pixel point code belonging to the mark is 1, the pixel point code not belonging to the mark is 0, and a row sequence is established, wherein the row sequence is as shaped asThe jumping times of the row sequence are counted, the jumping times from 1 to 0 are counted, the number of the marking pixel points in the region is more, the jumping times are less, the better the relevance of the marking pixel points is shown, and the relevance of the pixel points in the region is as follows:
wherein, F is the correlation of the pixel points in the region with the highest density, b is the number of the pixel points in the region, N is the sum of the jumping times of the pixel points in the row sequence, and a is the number of the marked pixel points in the region.
When the hopping times of the pixels in the region are less and the occupation ratio of the marked pixels is higher, the correlation of the pixels in the region is better, namely the defects are more likely to occur.
The embodiment further judges the shrinkage porosity defect based on the relevance of pixel points in the area with the highest density degree on the X-ray image of the hydraulic valve casting. For shrinkage porosity defects, the control of the casting process by the severity of the shrinkage porosity defects is different, the more the shrinkage porosity defects are, the greater the control strength of the production process is, so that the compactness of the hydraulic valve casting is calculated by paying attention to the correlation between the number of pixel points and local pixel points, and the process is regulated according to the compactness, namely:
wherein the content of the first and second substances,the compactness of the hydraulic valve casting piece is improved,the total number of marked pixel points on the X-ray image of the hydraulic valve casting is calculated,the total number of pixel points on the X-ray image of the hydraulic valve casting.
The compactness G of the hydraulic valve casting is closer to 1, which indicates that the compactness of the hydraulic valve casting is better, namely the qualified rate of the product is higher; the compactness G of the hydraulic valve casting part is closer to 0, which indicates that the compactness of the hydraulic valve casting part is poorer, namely the qualified rate of the product is lower, namely the shrinkage defect is more serious.
And step S4, judging whether the compactness of the hydraulic valve casting is less than or equal to a set threshold value, and if the compactness of the hydraulic valve casting is less than or equal to the set threshold value, adjusting the pouring speed and the pouring temperature in the production process of the hydraulic valve casting.
The hydraulic valve pouring process is generally used for regulating and controlling the pouring temperature and the pouring speed according to compactness, but the regulation and control force on the temperature is not too large, and the regulation and control force on the temperature is small due to the fact that the temperature is possibly accompanied with problems such as scum and the like, so that the temperature is regulated and controlled appropriately, and the pouring speed is mainly regulated and controlled on slight shrinkage porosity defects.
In this example, the first threshold value of the densification was set to 0.85, and the second threshold value of the densification was set to 0.5. When the value of the compactness G is smaller than or equal to the first threshold value, the fact that the hydraulic valve casting has the shrinkage porosity defect needing to be repaired is judged, at the moment, the production process needs to be regulated and controlled, and the same defect of the hydraulic valve casting produced subsequently is prevented. Whether the casting temperature or the casting temperature and the casting speed are to be controlled is determined according to the second threshold value of the densification degree.
The specific regulation and control method comprises the following steps:
when the compactness of the hydraulic valve casting piece is (0.85, 1), the compactness of the hydraulic valve casting piece is judged to be better, and the product meets the quality requirement, namely the production process meets the production requirement, and the regulation and control of the casting temperature and the casting speed are not needed.
When the compactness of the hydraulic valve casting piece is (0.5, 0.85), the compactness of the hydraulic valve casting piece is poor, the product does not meet the quality requirement at this moment, namely the production process does not meet the production requirement, but the defects at this moment mostly belong to the cloud-like defect, namely the severity of the defect is lower, so that the casting speed is only required to be regulated and controlled, namely:
wherein the content of the first and second substances,for the casting speed of the hydraulic valve casting piece produced at the next moment,the pouring speed of the hydraulic valve casting is produced at the current moment,for the compactness of the hydraulic valve casting at the current moment,as the speed control parameter, the speed control parameter in this embodimentIs 3.
When the compactness of the hydraulic valve casting piece is [0, 0.5], the compactness of the hydraulic valve casting piece is relatively poor, the product does not meet the quality requirement at the moment, namely the production process does not meet the production requirement, most of the defects at the moment belong to filiform defects, namely the severity of the defects is relatively high, so that the casting speed and the casting temperature are required to be regulated and controlled, namely:
wherein the content of the first and second substances,for the casting temperature of the hydraulic valve casting piece produced at the next moment,the pouring temperature for producing the hydraulic valve casting at the current moment,as the temperature control parameter, the temperature control parameter in the present embodimentIs 20.
In this embodiment, a first densification threshold, a second densification threshold, a speed regulation parameter, and a temperature regulation parameter are set by an implementer according to an actual situation. The method for adjusting the casting speed and the casting temperature in the casting production process is not limited to the method provided by the embodiment, and can be adjusted according to actual conditions in specific applications.
In the embodiment, the shrinkage porosity defect of the hydraulic valve casting piece is considered to influence the quality of a product, so that the shrinkage porosity defect detection is performed on the produced hydraulic valve casting piece, and the gray value of the pixel point of the shrinkage porosity defect is different from the pixel value of the pixel point in the normal area by a certain amount. The specific shrinkage porosity defect detection process comprises the following steps: constructing a gray level histogram corresponding to the X-ray image of the hydraulic valve casting, and calculating the attention degree of each pixel point on the X-ray image of the hydraulic valve casting; clustering pixel points with the attention degree larger than or equal to a set threshold value on an X-ray image of the hydraulic valve casting to obtain an area with the highest concentration degree on the X-ray image of the hydraulic valve casting, and calculating the relevance of the pixel points in the area with the highest concentration degree; according to the relevance of pixel points in the area with the highest density degree, the compactness of the hydraulic valve casting piece is calculated, the compactness of the hydraulic valve casting piece can reflect the shrinkage porosity defect degree of the hydraulic valve casting piece, and the casting speed or the casting speed and the casting temperature in the subsequent hydraulic valve production process are adjusted according to the compactness of the hydraulic valve casting piece. The method provided by the embodiment adjusts the casting speed and the casting temperature in the production process of the hydraulic valve casting piece based on the quality of the hydraulic valve casting piece at the current moment so as to ensure that the quality of a product produced subsequently can reach the standard.
It should be noted that: the above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (7)
1. A hydraulic valve production control method based on image processing is characterized by comprising the following steps:
acquiring an X-ray image of a hydraulic valve casting produced at the current moment;
constructing a gray level histogram corresponding to the X-ray image of the hydraulic valve casting, and calculating the attention degree of each pixel point on the X-ray image of the hydraulic valve casting; clustering pixel points with the attention degree larger than or equal to a set threshold value on an X-ray image of the hydraulic valve casting to obtain an area with the highest concentration degree on the X-ray image of the hydraulic valve casting;
coding the pixel points in the region with the highest density degree, and counting the jumping times of the pixel points in the region with the highest density degree; calculating the relevance of the pixel points in the region with the highest density degree according to the jumping times of the pixel points in the region with the highest density degree and the number of the pixel points; calculating the compactness of the hydraulic valve casting piece according to the correlation of the pixel points in the area with the highest density degree;
judging whether the compactness of the hydraulic valve casting is less than or equal to a set threshold, and if the compactness of the hydraulic valve casting is less than or equal to the set threshold, adjusting the casting speed and the casting temperature in the production process of the hydraulic valve casting;
calculating the attention degree of each pixel point on the X-ray image of the hydraulic valve by adopting the following formula:
wherein, the first and the second end of the pipe are connected with each other,the attention degree of the X-th pixel point on the X-ray image of the hydraulic valve casting piece,is a value of a threshold value of the gray scale,is the maximum gray value of the pixel point on the image, X is the gray value of the X-th pixel point on the X-ray image of the hydraulic valve casting piece,the number of pixel points on the X-ray image of the hydraulic valve casting,for the ith pixel point on the X-ray image of the hydraulic valve castingE is the base of the natural logarithm;
the encoding the pixel points in the region with the highest density degree and counting the jumping times of the pixel points in the region with the highest density degree comprise:
and (3) encoding pixel points in the region with the highest density: the pixel point code belonging to the mark is 1, the pixel point code not belonging to the mark is 0, and a row sequence is established; the marked pixel points are pixel points of which the attention degree on the X-ray image of the hydraulic valve casting is greater than or equal to a set threshold value;
and counting the jumping times of the pixel points from 1 to 0 in the row sequence.
2. The hydraulic valve production control method based on image processing according to claim 1, wherein the correlation of pixel points in the most intensive region is calculated by using the following formula:
f is the correlation of pixel points in the region with the highest density, b is the number of the pixel points in the region, N is the jumping frequency of the pixel points in the region, and a is the number of marked pixel points in the region; and the marked pixel points are pixel points of which the attention degree on the X-ray image of the hydraulic valve casting is greater than or equal to a set threshold value.
3. The hydraulic valve production control method based on image processing as claimed in claim 1, wherein the compactness of the hydraulic valve casting is calculated by adopting the following formula:
wherein the content of the first and second substances,is hydraulic pressureThe compactness of the valve casting piece is improved,the correlation of the pixel points in the region with the highest density degree,the total number of marked pixel points on the X-ray image of the hydraulic valve casting is calculated,the total number of pixel points on the X-ray image of the hydraulic valve casting.
4. The method for controlling production of the hydraulic valve based on image processing according to claim 1, wherein the step of judging whether the compactness of the casting of the hydraulic valve is greater than a second threshold value, and if so, adjusting the pouring speed in the production process of the casting of the hydraulic valve comprises the steps of:
wherein the content of the first and second substances,for the casting speed of the hydraulic valve casting piece produced at the next moment,the pouring speed of the hydraulic valve casting is produced at the current moment,for the compactness of the hydraulic valve casting at the current moment,is a speed regulation parameter.
5. The method for controlling production of the hydraulic valve based on image processing according to claim 1, wherein the adjusting of the pouring speed and the pouring temperature in the production process of the hydraulic valve casting comprises:
wherein the content of the first and second substances,for the casting speed of the hydraulic valve casting piece produced at the next moment,the pouring speed of the hydraulic valve casting is produced at the current moment,for the compactness of the hydraulic valve casting at the current moment,in order to regulate and control the parameters of the speed,for the casting temperature of the hydraulic valve casting piece produced at the next moment,the pouring temperature for producing the hydraulic valve casting at the current moment,is a temperature regulation parameter.
6. The method for controlling production of the hydraulic valve based on image processing according to claim 1, wherein the step of judging whether the compactness of the casting of the hydraulic valve is less than or equal to a set threshold value, and if the compactness of the casting of the hydraulic valve is less than or equal to the set threshold value, adjusting the pouring speed and the pouring temperature in the production process of the casting of the hydraulic valve comprises the following steps:
judging whether the compactness of the hydraulic valve casting is smaller than or equal to a first threshold, if so, judging whether the compactness of the hydraulic valve casting is larger than a second threshold, if so, adjusting the casting speed in the production process of the hydraulic valve casting, and if not, adjusting the casting speed and the casting temperature in the production process of the hydraulic valve casting; the first threshold is greater than a second threshold.
7. The method for controlling production of the hydraulic valve based on image processing as claimed in claim 1, wherein the step of obtaining the X-ray image of the casting of the hydraulic valve produced at the current moment comprises:
the training set of the DNN network comprises a plurality of images containing hydraulic valve casting parts, and the label labeling process corresponding to the training set comprises the following steps: the mark of the pixel point at the corresponding position belonging to the background class is 0, and the mark of the pixel point at the corresponding position belonging to the hydraulic valve casting piece is 1;
and inputting the acquired initial X-ray image into a trained DNN network to obtain an X-ray image of the hydraulic valve casting.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210822968.7A CN114897905B (en) | 2022-07-14 | 2022-07-14 | Hydraulic valve production control method based on image processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210822968.7A CN114897905B (en) | 2022-07-14 | 2022-07-14 | Hydraulic valve production control method based on image processing |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114897905A CN114897905A (en) | 2022-08-12 |
CN114897905B true CN114897905B (en) | 2022-09-16 |
Family
ID=82729821
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210822968.7A Active CN114897905B (en) | 2022-07-14 | 2022-07-14 | Hydraulic valve production control method based on image processing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114897905B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105068134A (en) * | 2015-07-29 | 2015-11-18 | 公安部第一研究所 | Method for detecting dangerous goods hidden in shoe by using X-ray multi-view image |
CN110473163A (en) * | 2019-06-03 | 2019-11-19 | 赵旭东 | A method of ultrasound image pretreatment system and processing ultrasound image for Diagnosis of Breast Tumor |
CN114092496A (en) * | 2021-11-30 | 2022-02-25 | 西安邮电大学 | Lip segmentation method and system based on spatial weighting |
CN114742785A (en) * | 2022-03-31 | 2022-07-12 | 启东普力马机械有限公司 | Hydraulic joint cleanliness control method based on image processing |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113934190B (en) * | 2021-12-17 | 2022-03-22 | 武汉春田纸品包装有限公司 | Corrugated board production quality regulation and control method based on machine vision |
CN114663405B (en) * | 2022-03-27 | 2022-12-06 | 扬州市苏灵农药化工有限公司 | Wastewater treatment control method for pesticide production enterprises |
CN114565614B (en) * | 2022-05-02 | 2022-07-19 | 武汉华塑亿美工贸有限公司 | Injection molding surface defect analysis method and system based on machine vision |
-
2022
- 2022-07-14 CN CN202210822968.7A patent/CN114897905B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105068134A (en) * | 2015-07-29 | 2015-11-18 | 公安部第一研究所 | Method for detecting dangerous goods hidden in shoe by using X-ray multi-view image |
CN110473163A (en) * | 2019-06-03 | 2019-11-19 | 赵旭东 | A method of ultrasound image pretreatment system and processing ultrasound image for Diagnosis of Breast Tumor |
CN114092496A (en) * | 2021-11-30 | 2022-02-25 | 西安邮电大学 | Lip segmentation method and system based on spatial weighting |
CN114742785A (en) * | 2022-03-31 | 2022-07-12 | 启东普力马机械有限公司 | Hydraulic joint cleanliness control method based on image processing |
Non-Patent Citations (1)
Title |
---|
"改进的灰度-局部方差二维直方图图像分割";杨恢先等;《计算机工程与应用》;20150929;第209-213页 * |
Also Published As
Publication number | Publication date |
---|---|
CN114897905A (en) | 2022-08-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115082467B (en) | Building material welding surface defect detection method based on computer vision | |
CN114862862B (en) | Pump body cold shut defect identification method and system based on image processing | |
CN105956618A (en) | Converter steelmaking blowing state recognition system and method based on image dynamic and static characteristics | |
CN114782432B (en) | Edge detection method of improved canny operator based on textural features | |
CN108256260A (en) | A kind of continuous casting billet quality Forecasting Methodology based on extreme learning machine | |
CN115100191B (en) | Metal casting defect identification method based on industrial detection | |
CN114758185B (en) | Injection molding parameter control method and system based on gray level chromatic aberration | |
CN115082429B (en) | Aluminum bar defect detection method based on image processing | |
CN117275635B (en) | Electroplating optimization method and system for copper pipe of crystallizer | |
CN116071363B (en) | Automatic change shaped steel intelligent production monitoring system | |
CN114897905B (en) | Hydraulic valve production control method based on image processing | |
CN112862769A (en) | Blast furnace slag iron ratio online intelligent monitoring method and system | |
CN113538424A (en) | Wood board joint classification data identification method based on artificial intelligence | |
CN115049649A (en) | Reinforcing steel bar polishing and rust removing control method based on corrosion degree | |
CN115222761A (en) | Polyphenyl particle product quality detection method based on computer vision technology | |
CN116664584B (en) | Intelligent feedback regulating system for production of thin-wall zinc alloy die casting die | |
CN117635604A (en) | Method for detecting welding quality of constructional engineering steel structure | |
CN107330587B (en) | AIS-based near-shore channel water depth utilization rate calculation method | |
CN115797361B (en) | Aluminum template surface defect detection method | |
CN114693652A (en) | Fabric defect detection method based on Gaussian mixture model | |
CN112016564A (en) | Method for calculating optimal binarization threshold value at lower case amount of financial bill | |
CN110334664B (en) | Statistical method and device for alloy precipitated phase fraction, electronic equipment and medium | |
CN108154501B (en) | Spiral blade image segmentation quality self-adaptive evaluation method based on gray distribution | |
CN112580626A (en) | Method for determining addition amount of covering slag in metallurgical continuous casting process based on artificial intelligence | |
CN113409343B (en) | Real-time solid fuel material layer thickness measuring method |
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 |