CN114897905B - Hydraulic valve production control method based on image processing - Google Patents

Hydraulic valve production control method based on image processing Download PDF

Info

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
Application number
CN202210822968.7A
Other languages
Chinese (zh)
Other versions
CN114897905A (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.)
Jiangsu Oscen Hydraulic Technology Co ltd
Original Assignee
Jiangsu Oscen Hydraulic Technology Co ltd
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 Jiangsu Oscen Hydraulic Technology Co ltd filed Critical Jiangsu Oscen Hydraulic Technology Co ltd
Priority to CN202210822968.7A priority Critical patent/CN114897905B/en
Publication of CN114897905A publication Critical patent/CN114897905A/en
Application granted granted Critical
Publication of CN114897905B publication Critical patent/CN114897905B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration by the use of histogram techniques
    • G06T5/90
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing 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/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10116X-ray image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30116Casting
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing 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

Hydraulic valve production control method based on image processing
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:
Figure 874294DEST_PATH_IMAGE002
wherein the content of the first and second substances,
Figure 100002_DEST_PATH_IMAGE003
the attention degree of the X-th pixel point on the X-ray image of the hydraulic valve casting piece,
Figure 941476DEST_PATH_IMAGE004
is a value of a threshold value of the gray scale,
Figure 100002_DEST_PATH_IMAGE005
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,
Figure 769624DEST_PATH_IMAGE006
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:
Figure 127924DEST_PATH_IMAGE008
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:
Figure 787444DEST_PATH_IMAGE010
wherein the content of the first and second substances,
Figure 100002_DEST_PATH_IMAGE011
in order to ensure the compactness of the casting piece of the hydraulic valve,
Figure 104156DEST_PATH_IMAGE012
the correlation of the pixel points in the region with the highest density,
Figure 100002_DEST_PATH_IMAGE013
the total number of marked pixel points on the X-ray image of the hydraulic valve casting is calculated,
Figure 156950DEST_PATH_IMAGE014
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:
Figure 240313DEST_PATH_IMAGE016
wherein the content of the first and second substances,
Figure 100002_DEST_PATH_IMAGE017
for the casting speed of the hydraulic valve casting piece produced at the next moment,
Figure 754339DEST_PATH_IMAGE018
the pouring speed of the hydraulic valve casting is produced at the current moment,
Figure 100002_DEST_PATH_IMAGE019
for the compactness of the hydraulic valve casting at the current moment,
Figure 163324DEST_PATH_IMAGE020
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:
Figure 513534DEST_PATH_IMAGE022
wherein the content of the first and second substances,
Figure 731413DEST_PATH_IMAGE017
for the casting speed of the hydraulic valve casting piece produced at the next moment,
Figure 116258DEST_PATH_IMAGE018
the pouring speed of the hydraulic valve casting is produced at the current moment,
Figure 492882DEST_PATH_IMAGE019
for the compactness of the hydraulic valve casting at the current moment,
Figure 100002_DEST_PATH_IMAGE023
in order to regulate and control the parameters of the speed,
Figure 720601DEST_PATH_IMAGE024
for the casting temperature of the hydraulic valve casting piece produced at the next moment,
Figure 100002_DEST_PATH_IMAGE025
the pouring temperature for producing the hydraulic valve casting at the current moment,
Figure 411345DEST_PATH_IMAGE026
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:
Figure 100002_DEST_PATH_IMAGE027
wherein, the first and the second end of the pipe are connected with each other,
Figure 106156DEST_PATH_IMAGE003
the attention degree of the X-th pixel point on the X-ray image of the hydraulic valve casting piece,
Figure 404413DEST_PATH_IMAGE005
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,
Figure 57112DEST_PATH_IMAGE028
the number of pixel points on the X-ray image of the hydraulic valve casting,
Figure 613864DEST_PATH_IMAGE006
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,
Figure DEST_PATH_IMAGE029
the value of (a) is 2.718,
Figure 894672DEST_PATH_IMAGE004
for gray scale threshold, in this embodiment
Figure 832672DEST_PATH_IMAGE030
In particular applications, the use of the compositions of the invention,
Figure 628459DEST_PATH_IMAGE004
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 ]
Figure DEST_PATH_IMAGE031
2],
Figure 917796DEST_PATH_IMAGE032
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 of
Figure 866161DEST_PATH_IMAGE031
2]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 as
Figure DEST_PATH_IMAGE033
The 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:
Figure 958750DEST_PATH_IMAGE008
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:
Figure 507412DEST_PATH_IMAGE034
wherein the content of the first and second substances,
Figure 156699DEST_PATH_IMAGE011
the compactness of the hydraulic valve casting piece is improved,
Figure 208838DEST_PATH_IMAGE013
the total number of marked pixel points on the X-ray image of the hydraulic valve casting is calculated,
Figure 285378DEST_PATH_IMAGE014
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:
Figure 58687DEST_PATH_IMAGE016
wherein the content of the first and second substances,
Figure 246086DEST_PATH_IMAGE017
for the casting speed of the hydraulic valve casting piece produced at the next moment,
Figure 152731DEST_PATH_IMAGE018
the pouring speed of the hydraulic valve casting is produced at the current moment,
Figure 400172DEST_PATH_IMAGE019
for the compactness of the hydraulic valve casting at the current moment,
Figure 454585DEST_PATH_IMAGE020
as the speed control parameter, the speed control parameter in this embodiment
Figure 445675DEST_PATH_IMAGE020
Is 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:
Figure 472405DEST_PATH_IMAGE022
wherein the content of the first and second substances,
Figure 94011DEST_PATH_IMAGE024
for the casting temperature of the hydraulic valve casting piece produced at the next moment,
Figure 576332DEST_PATH_IMAGE025
the pouring temperature for producing the hydraulic valve casting at the current moment,
Figure 167850DEST_PATH_IMAGE026
as the temperature control parameter, the temperature control parameter in the present embodiment
Figure 49088DEST_PATH_IMAGE026
Is 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:
Figure 713818DEST_PATH_IMAGE002
wherein, the first and the second end of the pipe are connected with each other,
Figure DEST_PATH_IMAGE003
the attention degree of the X-th pixel point on the X-ray image of the hydraulic valve casting piece,
Figure 121665DEST_PATH_IMAGE004
is a value of a threshold value of the gray scale,
Figure DEST_PATH_IMAGE005
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,
Figure 304647DEST_PATH_IMAGE006
the number of pixel points on the X-ray image of the hydraulic valve casting,
Figure DEST_PATH_IMAGE007
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:
Figure DEST_PATH_IMAGE009
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:
Figure DEST_PATH_IMAGE011
wherein the content of the first and second substances,
Figure 384730DEST_PATH_IMAGE012
is hydraulic pressureThe compactness of the valve casting piece is improved,
Figure DEST_PATH_IMAGE013
the correlation of the pixel points in the region with the highest density degree,
Figure 791485DEST_PATH_IMAGE014
the total number of marked pixel points on the X-ray image of the hydraulic valve casting is calculated,
Figure DEST_PATH_IMAGE015
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:
Figure DEST_PATH_IMAGE017
wherein the content of the first and second substances,
Figure 945517DEST_PATH_IMAGE018
for the casting speed of the hydraulic valve casting piece produced at the next moment,
Figure DEST_PATH_IMAGE019
the pouring speed of the hydraulic valve casting is produced at the current moment,
Figure 797936DEST_PATH_IMAGE020
for the compactness of the hydraulic valve casting at the current moment,
Figure DEST_PATH_IMAGE021
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:
Figure DEST_PATH_IMAGE023
wherein the content of the first and second substances,
Figure 834156DEST_PATH_IMAGE018
for the casting speed of the hydraulic valve casting piece produced at the next moment,
Figure 869370DEST_PATH_IMAGE019
the pouring speed of the hydraulic valve casting is produced at the current moment,
Figure 455072DEST_PATH_IMAGE020
for the compactness of the hydraulic valve casting at the current moment,
Figure 947234DEST_PATH_IMAGE024
in order to regulate and control the parameters of the speed,
Figure DEST_PATH_IMAGE025
for the casting temperature of the hydraulic valve casting piece produced at the next moment,
Figure 408433DEST_PATH_IMAGE026
the pouring temperature for producing the hydraulic valve casting at the current moment,
Figure DEST_PATH_IMAGE027
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.
CN202210822968.7A 2022-07-14 2022-07-14 Hydraulic valve production control method based on image processing Active CN114897905B (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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