Background technology
Plastics are widely used in the every field of national economy due to its good processing and serviceability, and China's plastic products total output has reached 3,000 ten thousand tons and with 8%~10% growth rate cumulative year after year at present.Injection moulding is good because of its Forming Quality, and efficiency is high, low cost and other advantages, and become the particularly topmost means of production of high-performance plastic material products of plastics industry.According to statistics, injection molding goods account for 1/3rd of all moulded plastics articles total outputs, and injection molding accounts for the over half of mould for plastics quantity.
Injection molding is comprised of dynamic model and cover half two parts, and dynamic model is arranged on the moving die plate of injection machine, and cover half is arranged on the fixed form of injection machine.Plastic Injection Shaping Process is a kind of cyclic process of intermittently operated, in each cycle period, at first, dynamic model and cover half closed formation running gate system and die cavity, then, under the pressure that the plastics of melting provide at injection machine, flow into die cavity cooling curing setting through running gate system, finally, dynamic model separates with cover half, by ejecting mechanism, ejects plastic products.Yet, in actual production process, usually because ejecting mechanism lost efficacy, mould structure designs the reasons such as unreasonable or plastic products quality fluctuation, easily cause plastic products to eject smoothly, and remain in (the particularly mould of a multi-cavity mold) in mould, now, if dynamic model and cover half closure, residual plastic products easily cause the damage of mould.For fear of this situation, a lot of enterprises adopt manual type to address this problem, and a secondary mould is joined an employee, and the special monitoring production process is closed immediately injection machine when finding that plastic products eject unsuccessfully, stops dynamic model and cover half closure.This manual type is except the human cost height, and simultaneously the reaction time due to the normal person is 0.1~0.5s, and energy time of concentration only has 20~30min, therefore, and the problem such as manual type exists response speed slow, and reliability is low.
In computer vision field, histogram can provide the statistical information of image, it reflected the different tonal gradation number of pixels of piece image the number and distribution situation, its abscissa means gray scale, its ordinate means pixel quantity.Histogrammic generation does not need complicated conversion and computing, and image processing speed is fast.Histogrammic matching algorithm can detect the statistics variations of the significant edge of different images and color, and identifies fast the difference of video scene.
Summary of the invention
The object of the invention is to overcome the deficiency of above-mentioned existence; a kind of embedded plastic mold protecting device based on Histogram Matching is provided; whether this device can exist the plastic products that do not come off in the automatic decision mould, is a kind of application of computer vision technique in Plastic Injection Shaping Process.
The objective of the invention is to complete by following technical solution, this device is divided into four modules and is respectively: image capture module, calculate matching module, human-computer interaction module, action control module; Described image capture module comprises two infrared cameras and an incandescent lamp; Calculate matching module and comprise the Arm development board of going forward side by side a histogram for computed image the column hisgram coupling calculating; Human-computer interaction module is for showing the controller of plastic injection molding host computer of the captured image of infrared camera responsible man-machine interactive operation; Action control module is the controller of plastic injection molding slave computer of the mold closing action for controlling the injection machine dynamic model; Image capture module, calculate between matching module and human-computer interaction module and connect control by hub with the Ethernet netting twine, between human-computer interaction module and action control module, with the Can/232 line, is connected control.
As preferably, described two infrared cameras are separately fixed on fixed half and moving half by magnetic stand, and infrared camera is toward the opening part of described fixed half and moving half and gather image; Described incandescent lamp is fixed on cover half by magnetic stand, and this socket is toward the opening part of described fixed half and moving half, and for providing infrared camera to gather the required light source of image.
As preferably, described hub is provided with four ports, wherein two ports respectively with two infrared cameras in image capture module with the control that is connected of Ethernet netting twine; Another two ports respectively with calculate matching module in Arm development board and controller of plastic injection molding host computer in human-computer interaction module with the control that is connected of Ethernet netting twine.
Beneficial effect of the present invention is: can whether have the goods that do not come off in the automatic decision mould of plastics according to the difference of two image histograms, if exist, report to the police, and the inaccurate mold closing of indication injection machine, thus effectively protect mould.
The specific embodiment
Label in accompanying drawing of the present invention is respectively: 1, infrared camera, 2, incandescent lamp, 3, magnetic stand, 4, the Ethernet netting twine, 5, hub, 6, the controller of plastic injection molding host computer, 7, the Arm development board, 8, the Can/232 line, 9, controller of plastic injection molding slave computer, 10, cover half, 11, dynamic model.
Below in conjunction with accompanying drawing, the present invention is done to detailed introduction: as shown in Figure 1, this device is divided into four modules and is respectively: image capture module, calculate matching module, human-computer interaction module, action control module; Described image capture module comprises two infrared cameras 1 and an incandescent lamp 2; Calculate matching module and comprise the Arm development board 7 of going forward side by side a histogram for computed image the column hisgram coupling calculating; Human-computer interaction module is for showing the controller of plastic injection molding host computer 6 of the captured image of infrared camera responsible man-machine interactive operation; Action control module is the controller of plastic injection molding slave computer 9 of the mold closing action for controlling the injection machine dynamic model; Image capture module, calculate between matching module and human-computer interaction module and connect control by hub 5 with Ethernet netting twine 4, between human-computer interaction module and action control module, with Can/232 line 8, is connected control.
Described two infrared cameras 1 are separately fixed on cover half 10 and dynamic model 11 by magnetic stand 3, and infrared camera 1 is toward the opening part of described cover half 10 and dynamic model 11 and gather image; Described incandescent lamp 2 is fixed on cover half 10 by magnetic stand 3, and this socket is toward the opening part of described cover half 10 and dynamic model 11, and for providing infrared camera 1 to gather the required light source of image.
Described hub 5 is provided with four ports, wherein two ports respectively with two infrared cameras 1 in image capture module with Ethernet netting twine 4 control that is connected; Another two ports respectively with calculate matching module in Arm development board 7 and controller of plastic injection molding host computer 6 in human-computer interaction module with Ethernet netting twine 4 control that is connected.
As shown in Figure 2, the course of work of the present invention can be described as, at first, the pattern of injection machine is set to manually, the similarity threshold T of image is set, 0≤T≤1, and utilize the image capture module collection not have dynamic model image and each of the cover half image (following abbreviation respectively: dynamic model standard picture and cover half standard picture) of residual goods, dynamic model standard picture and cover half standard picture automatically are kept at and calculate in matching module; Then, the pattern of injection machine is set to semi-automatic or full-automatic, put in place and move also less than before moving at mold closing at the liftout attachment rollback, image capture module gathers dynamic model and each of cover half image (following abbreviation respectively: dynamic model contrast images and cover half contrast images) automatically, is saved in equally and calculates in matching module; Then, calculate matching module and calculate dynamic model standard picture and the similarity value of dynamic model contrast images and the similarity value of cover half standard picture and cover half contrast images, if both similarity values all are greater than the similarity threshold of setting, think and all there is no residual goods in dynamic model and cover half, action control module is carried out the mold closing action of dynamic model, starts next cycle period.If both similarity thresholds have one or two similarity threshold that is less than setting, to think in dynamic model or cover half and have residual goods, action control module stops the mold closing action of dynamic model, and gives the alarm.
The computational methods of above-mentioned dynamic model standard picture and dynamic model contrast images similarity value and the computational methods of cover half standard picture and cover half contrast images are identical, and computational methods mainly comprise the following steps:
(1) gray level image of taking according to infrared camera, generate histogram.Histogrammic abscissa is gray value, has the pixel quantity of this gray value in ordinate presentation graphs picture.The gray value of gray level image is 0~255, by gray value be divided into n interval, i.e. 0~255/n, 255/n~2 * 255/n ...The value of n is unsuitable excessive also unsuitable too small, and too small meeting causes histogram too average and can't embody difference, excessively can produce sharp-pointed and single effect.
(2) carry out histogrammic normalization operation, be about in histogram the pixel quantity between each gray area divided by the total number of pixels of image, like this, in histogram between each gray area corresponding ordinate and be 1.
(3), according to normalized histogram, calculate two and treat the histogrammic similarity value of contrast images.In the present invention, histogrammic matching algorithm has three kinds, and the computing formula of three kinds of algorithms is respectively suc as formula shown in (I), formula (II) and formula (III), and in actual production process, the user can select suitable matching algorithm as required.
In formula, i is between histogrammic i gray area, H
1and H
2for waiting to contrast the normalized value of two image histogram ordinates.
Below by a production example, the present invention is described in further detail, histogrammic matching algorithm selection algorithm 1 in this embodiment, and the n value gets 37.
The first step: injection machine is set to manual work pattern, gathers each of dynamic model standard picture and cover half standard picture, and it is 0.8 that similarity threshold T is set.
Second step: injection machine is set to the fully automatic working pattern, at the liftout attachment rollback, puts in place and in mold closing action also not before action, and image capture module gathers each of dynamic model and cover half contrast images automatically.
The 3rd step: calculate matching module and calculate the histogram similarity between cover half standard picture and cover half contrast images.At first generate the histogram of cover half standard picture, the sum of all pixels of cover half standard picture is 305398, wherein between first gray area, the pixel count of (gray value is 0~5) is 307, then the histogram of cover half standard picture is carried out to the normalization operation, between first gray area, the pixel value of (gray value is 0~5) is 307/305398=0.00100525.Equally, first generate the histogram of cover half contrast images, then carry out the normalization operation.After the normalization operation, the histogram data of cover half standard picture and contrast images (as shown in Figure 3).Then, the histogram similarity value of calculating between cover half standard picture and cover half contrast images according to formula (I) is 0.9936.
The 4th step: calculate matching module and calculate the histogram similarity between dynamic model standard picture and dynamic model contrast images.Calculation procedure is identical with the 4th step, and the normalization histogram data (as shown in Figure 4) of dynamic model standard picture and contrast images are same, and the histogram similarity value of calculating between dynamic model standard picture and dynamic model contrast images according to formula (I) is 0.7574.
The 5th step: the histogram similarity value 0.9936 between cover half standard picture and cover half contrast images is greater than similarity threshold 0.8, thinks in cover half and does not have residual goods; Histogram similarity value 0.7574 between dynamic model standard picture and dynamic model contrast images is less than similarity threshold 0.8, thinks in dynamic model and has residual goods, stops mold closing and moves and give the alarm.