Hot casting measuring method and device based on compressed sensing algorithm
Technical Field
The invention relates to the technical field of hot casting measurement, in particular to a hot casting measurement method and device based on a compressed sensing algorithm.
Background
The temperature is high, up to 800 degrees, just as the metal casting is cast. At this moment, the size of the device is difficult to measure, manual measurement is adopted, the working environment is poor, and workers cannot work for a long time. By adopting a contact type sensor for measurement, the sensor measurement is inaccurate due to high temperature, and the service life is shortened. In the image shooting method, the temperature of the air nearby is increased due to the high temperature of the cast to be detected, so that the refractive index of the air to light is changed, the shot image is deformed, and a correct image cannot be obtained.
Disclosure of Invention
The invention aims to provide a hot casting measuring method and device based on a compressive sensing algorithm, and aims to solve the problem that a correct image cannot be obtained in the prior art.
In order to achieve the purpose, the invention is realized by adopting the following technical scheme:
a hot casting measuring method based on a compressed sensing algorithm comprises the following steps:
step 1, acquiring a complete optical signal of a part to be measured of the thermal casting to be measured, and converting the acquired optical signal into an electrical signal; step 2, converting the electric signals into an electric signal matrix, wherein the expression of the electric signal matrix is as follows:
simplifying the electrical signal matrix into an equation: y is KC; wherein, Yi(i-1, … m) represents the light intensity detected by the detector at different positions of the corresponding grid baffle; k is a radical ofiji is 1 … n, j is 1 … n, the value is 1 or 0, the j indicates that light can pass through at the jth position of the ith grid baffle plate, 1 represents passing, and 0 represents not passing; c. CjRepresenting the intensity at the jth location in the image;
step 3, solving the electric signal equation through a compressed sensing algorithm to obtain a vector C; step 4, restoring the obtained vector C into a two-dimensional grid matrix according to a row-first principle, and obtaining image information of the part to be measured of the measured thermal casting; and 5, acquiring the size information of the part to be measured of the measured thermal casting according to the image information of the part to be measured of the measured thermal casting.
A hot cast measurement device based on a compressive sensing algorithm, comprising: the device comprises a photoelectric processing module, a conversion module, a calculation module, an image recovery module and an image processing module; the photoelectric processing module is used for acquiring a complete optical signal of a part to be measured of the measured thermal casting and converting the acquired optical signal into an electrical signal; the conversion module is used for converting the electric signals into an electric signal matrix and simplifying the electric signal matrix into an electric signal equation; the calculation module is used for solving the electric signal equation through a compressed sensing algorithm to obtain a vector C; the image recovery module is used for recovering the obtained vector C into a two-dimensional grid matrix according to a row-first principle and obtaining an image of the part to be detected of the detected thermal casting; and the image processing module is used for acquiring the size information of the part to be measured of the measured thermal casting according to the image information of the part to be measured of the measured thermal casting.
Further, the photoelectric processing module is a photoelectric sensor.
Further, the device further comprises: placing a table and an asbestos gauge; the measured heat casting is placed on the placing table, supporting motors are arranged on two sides of the placing table, the asbestos gauze is rotatably connected between the supporting motors on the two sides, and the photoelectric sensor is fixed above the asbestos gauze.
The invention has the advantages that: the invention provides a method and a device for measuring the form of a hot casting based on a compression sensing algorithm, which can effectively solve the problem of inaccurate measurement of the hot casting caused by overhigh surface temperature.
Drawings
FIG. 1 is a schematic diagram of the overall structure of example 1 and example 2 in the embodiment of the present invention;
FIG. 2 is a schematic view of the overall structure of an asbestos web in accordance with an embodiment of the invention;
FIG. 3 is a schematic illustration of a hot cast object image in accordance with an embodiment of the present invention;
FIG. 4 is a top view of the overall structure of example 2 in an embodiment of the present invention;
FIG. 5 is a schematic diagram showing the overall structure of examples 3 and 4 in the embodiment of the present invention;
FIG. 6 is a schematic diagram of the signals received by the photosensors in example 3 and example 4 in accordance with an embodiment of the present invention;
FIG. 7 is a schematic representation of the asbestos webs of examples 4 and 6 in accordance with an embodiment of the present invention;
FIG. 8 is a schematic diagram showing the overall structure of examples 5 and 6 in the embodiment of the present invention;
FIG. 9 is a schematic diagram of signals received by the photosensors in example 5 and example 6 in accordance with one embodiment of the present invention;
fig. 10 is a schematic view of the angles of the signals collected by the photosensors in example 5 and example 6 according to the embodiment of the present invention.
Wherein: 1. a photosensor; 2. an asbestos web; 3. hot casting; 4. a placing table; 5. a support motor; 6. a baffle plate; 7. an upper transfer device; 8. a lower transport device; 9. and (4) square cylinders.
Detailed Description
In order to make the technical means, the creation characteristics, the achievement purposes and the effects of the invention easy to understand, the invention is further described with the specific embodiments.
Example 1
As shown in fig. 1 to 3, the present embodiment includes a photoelectric sensor 1, a placing table 4, and a grid barrier made of asbestos cloth or other high temperature resistant material. The high temperature resistance refers to the temperature resistance of more than 800 ℃. The asbestos net 2 is of a structure that square grids are fully distributed, the size of each grid is d, shading baffles are fixed in 50% of the grids, and the shading baffles are distributed according to random vectors generated by a computer and are generated and stored by the computer. The light emitted by the measured thermal casting 3 can not pass through the shading baffle but only can pass through the grids without the shading baffle on the asbestos gauge 2. In order to ensure the measurement precision of the device, the size of the square grid is smaller than the measurement precision requirement. Meanwhile, the distance between the hot casting 3 and the asbestos gauge 2 is also smaller than the requirement of measurement precision.
Heat foundry goods 3 are placed on placing platform 4, the both sides of placing platform 4 all are fixed with supporting motor 5, asbestos gauge 2 is connected between the supporting motor 5 of placing platform 4 both sides, supporting motor 5 rotates and drives asbestos gauge 2 two-way motion between two supporting motor 5, photoelectric sensor 1 is fixed in asbestos gauge 2's top, photoelectric sensor 1 can see through the light source information that no shading baffle was received to the net of asbestos gauge 2 and sent of heat foundry goods 3, photoelectric sensor 1 can be with the light source signal conversion of receiving to the signal of telecommunication.
During the detection process, turbulence or atmospheric disturbances caused by high temperatures mainly have an effect on the spatial distribution of the light field, but do not have a large effect on the overall intensity of the entire light field. Thus, the turbulence between the asbestos web 2 and the photosensor 1 does not affect the single-pixel imaging result. Thus, the disturbance-resistant imaging of the hot casting 3 is realized, and then the corresponding casting form is obtained through image processing.
In this embodiment, the measurement method includes the steps of:
step 1, a
photoelectric sensor 1 receives a light source signal sent by a
thermal casting 3 and converts the received light source signal into an electric signal; the electrical signal expression is:
wherein, alpha is a photoelectric conversion coefficient, kiIs a random vector coefficient with a value of 0 or 1, ciThe luminance of a small spot on the hot cast.
And 2, controlling the support motors 5 on the two sides to rotate, enabling the asbestos cloth 2 to move rightwards, enabling the photoelectric sensor 1 to acquire optical signals sent by the thermal casting 3 once when the asbestos cloth 2 moves one row of grids, and controlling the support motors 5 to stop rotating until the complete optical signal information of the thermal casting 3 to be detected is acquired, so that the asbestos cloth 2 stops moving. And 3, converting the obtained complete optical signal of the hot casting 3 into complete electrical signal information of the hot casting.
Step 4, converting the complete electrical signal information into an electrical signal matrix, wherein the electrical signal matrix expression is as follows:
simplifying the electrical signal matrix into an equation: y is KC; wherein, Yi(i-1, … m) represents the light intensity detected by the detector at different positions of the corresponding grid baffle; k is a radical ofij i 1 … n, j 1 … n and their useThe value is 1 or 0, which indicates whether light can pass through the ith grid baffle plate position at the jth position, 1 represents passing, and 0 represents not passing; c. CjIndicating the intensity at the j-th position of the image.
And 5, solving the electric signal equation through a compressed sensing algorithm to obtain a vector C.
Taking the OMP algorithm in the compressive sensing algorithm as an example:
step 1: initialization r0=Y,C0=0,0=φ
Step 2: n is equal to 1, and n is equal to 1,
step 2.3:n=n-1∪in
step 2.4: cn=nY
Step 2.5: r isn=Y-KCn
Step 2.6: repeating for 2.1-2.5 times until rn-rn-1And | l <, which is the set precision requirement. At this time CnI.e. the solution to the equation. (meaning of each letter in supplementary formula)
C
nThe expression Y is the predicted value of the vector C in KC. r is
nAnd substituting the residual error after the predicted value is substituted into the equation.
nRepresenting a set of vectors that starts with an empty set phi.<r
n-1,K>Representing the residual error r
n-1And the inner product of the column vectors of matrix K,
representing the values of these inner products. i.e. i
nWhen the inner product value is maximum, the column vector in K is expressed.
n=
n-1∪i
nRepresents that i is
nThis vector is put into the set.
Step 6, will obtainThe vector C is recovered into a two-dimensional grid matrix according to the line priority principle, and the image of the hot casting 3 can be recovered by rearranging the vector C according to the position of the vector C on the asbestos gauge 2. In particular, according to ciBrightness (c) on different grids at different positions on the asbestos gaugeiThe value of) is recorded at the corresponding position, a two-dimensional bright distribution can be obtained, namely a picture.
And 7, acquiring the size information of the hot casting 3 according to the image information of the hot casting 3. Specifically, the size of the hot cast can be calculated according to the number of the grids occupied by the hot cast 3 on the asbestos gauge 2. In fig. 3, an object image of the reconstructed hot casting 3 is shown, which has a width of 6 pixels, and thus an actual width D is 6D.
The image shot remotely by the method can avoid measurement errors caused by temperature interference.
Example 2
As shown in fig. 1, fig. 2 and fig. 4, the present embodiment includes a photoelectric sensor 1, a placing table 4, a baffle 6 and a mesh baffle, wherein the baffle 6 and the mesh baffle are made of asbestos cloth or other high temperature resistant materials. The high temperature resistance refers to the temperature resistance of more than 800 ℃. The apron 6 is fixed to the placement table 4, and the left end of the hot cast 3 is fixed to the placement table 4. Heat foundry goods 3 are placed on placing platform 4, the both sides of placing platform 4 all are fixed with supporting motor 5, asbestos gauge 2 is connected between the supporting motor 5 of placing platform 4 both sides, supporting motor 5 rotates and drives asbestos gauge 2 two-way motion between two supporting motor 5, photoelectric sensor 1 is fixed in asbestos gauge 2's top, photoelectric sensor 1 can see through the light source information that no shading baffle was received to the net of asbestos gauge 2 and sent of heat foundry goods 3, photoelectric sensor 1 can be with the light source signal conversion of receiving to the signal of telecommunication.
The asbestos gauge 2 is of a structure of square grids, and the size of each grid is d. Shading baffles are fixed in 50% of grids on the asbestos cloth 2 at the non-fixed end of the hot casting 3, namely the right end of the hot casting 3, and the shading baffles are distributed according to random vector distribution generated by a computer and are generated and stored by the computer. The light emitted by the measured thermal casting 3 can not pass through the shading baffle but only can pass through the grids without the shading baffle on the asbestos gauge 2. In order to ensure the measurement precision of the device, the size of the square grid is smaller than the measurement precision requirement. Meanwhile, the distance between the hot casting 3 and the asbestos gauge 2 is also smaller than the requirement of measurement precision.
During the detection process, turbulence or atmospheric disturbances caused by high temperatures mainly have an effect on the spatial distribution of the light field, but do not have a large effect on the overall intensity of the entire light field. Thus, the turbulence between the asbestos web 2 and the photosensor 1 does not affect the single-pixel imaging result. Thus, the disturbance-resistant imaging of the hot casting 3 is realized, and then the corresponding casting form is obtained through image processing.
In this embodiment, the measurement method includes the steps of:
step 1, a
photoelectric sensor 1 receives a light source signal sent by the right end of a
thermal casting 3 and converts the received light source signal into an electric signal; the electrical signal expression is:
wherein, alpha is a photoelectric conversion coefficient, kiIs a random vector coefficient with a value of 0 or 1, ciThe luminance of a small spot on the hot cast.
And 2, controlling the support motors 5 on the two sides to rotate, enabling the asbestos cloth 2 to move rightwards, enabling the photoelectric sensor 1 to acquire optical signals sent by the thermal casting 3 once when the asbestos cloth 2 moves one row of grids, and controlling the support motors 5 to stop rotating until the complete optical signal information of the right end part of the measured thermal casting 3 is acquired, so that the asbestos cloth 2 stops moving. And 3, converting the acquired complete optical signal at the right end of the hot casting 3 into complete electrical signal information of the hot casting.
Step 4, converting the complete electrical signal information into an electrical signal matrix, wherein the electrical signal matrix expression is as follows:
simplifying the electrical signal matrix into an equation: y is KC; wherein, Yi(i-1, … m) tableShowing the light intensity detected by the detector at different positions of the corresponding grid baffle; k is a radical ofiji is 1 … n, j is 1 … n, the value is 1 or 0, the j indicates that light can pass through at the jth position of the ith grid baffle plate, 1 represents passing, and 0 represents not passing; c. CjIndicating the intensity at the j-th position of the image.
And 5, solving the electric signal equation through a compressed sensing algorithm to obtain a vector C.
Taking the OMP algorithm in the compressive sensing algorithm as an example:
step 1: initialization r0=Y,C0=0,0=φ
Step 2: n is equal to 1, and n is equal to 1,
step 2.1: gn=<rn-1,K>
step 2.3:n=n-1∪in
step 2.4: cn=nY
Step 2.5: r isn=Y-KCn
Step 2.6: repeating for 2.1-2.5 times until rn-rn-1And | l <, which is the set precision requirement. At this time CnI.e. the solution to the equation.
C
nThe expression Y is the predicted value of the vector C in KC. r is
nAnd substituting the residual error after the predicted value is substituted into the equation.
nRepresenting a set of vectors that starts with an empty set phi.<r
n-1,K>Representing the residual error r
n-1And the inner product of the column vectors of matrix K,
representing the values of these inner products. i.e. i
nWhen the inner product value is maximum, the column vector in K is expressed.
n=
n-1∪i
nRepresents that i is
nThis vector is put into the set.
Step 6, pressing the obtained vector C according toThe image of the hot cast 3 can be recovered by restoring the image to a two-dimensional grid matrix according to the line-priority principle and rearranging the position of the two-dimensional grid matrix on the asbestos gauge 2. In particular, according to ciBrightness (c) on different grids at different positions on the asbestos gaugeiThe value of) is recorded at the corresponding position, a two-dimensional bright distribution can be obtained, namely a picture.
And 7, acquiring the height information of the hot casting 3 according to the right-end image information of the hot casting 3. Specifically, the height of the hot cast can be calculated based on the distance between the grid position occupied by the rightmost end of the hot cast 3 on the asbestos gauge 2 and the grid position occupied by the baffle 6.
The image shot remotely by the method can avoid measurement errors caused by temperature interference. For large hot castings, only images of partial positions need to be measured, and measurement accuracy and measurement speed are improved.
Example 3
As shown in fig. 2, 3, 5 and 6, the present embodiment includes a photosensor 1, a lower transmission device 8, an upper transmission device 7 and a grid barrier made of asbestos cloth or other high temperature resistant material. The high temperature resistance refers to the temperature resistance of more than 800 ℃. The asbestos net 2 is of a structure that square grids are fully distributed, the size of each grid is d, shading baffles are fixed in 50% of the grids, and the shading baffles are distributed according to random vectors generated by a computer and are generated and stored by the computer. The light emitted by the measured thermal casting 3 can not pass through the shading baffle but only can pass through the grids without the shading baffle on the asbestos gauge 2. In order to ensure the measurement precision of the device, the size of the square grid is smaller than the measurement precision requirement. Meanwhile, the distance between the hot casting 3 and the asbestos gauge 2 is also smaller than the requirement of measurement precision.
The hot casting 3 is fixed on the lower conveying device 8, the lower conveying device 8 and the upper conveying device 7 are both conveying belts, and the asbestos gauge 2 is fixedly connected between the upper conveying device 7 and the lower conveying device 8. The square cylinder 9 is fixed on the upper transmission device 7, the photoelectric sensor 1 is fixed in the square cylinder 9, and the photoelectric sensor 1 receives light only from the hot casting 3 by using the shielding of the cylinder. Photoelectric sensor 1 can receive the light source information that heat castings 3 sent through the net that does not have the shading baffle on asbestos gauge 2, and photoelectric sensor 1 can be with the light source signal conversion of receiving the signal of light source for the signal of telecommunication.
During the detection process, turbulence or atmospheric disturbances caused by high temperatures mainly have an effect on the spatial distribution of the light field, but do not have a large effect on the overall intensity of the entire light field. Thus, the turbulence between the asbestos web 2 and the photosensor 1 does not affect the single-pixel imaging result. Thus, the disturbance-resistant imaging of the hot casting 3 is realized, and then the corresponding casting form is obtained through image processing.
In this embodiment, the measurement method includes the steps of:
step 1, a
photoelectric sensor 1 receives a light source signal sent by a
thermal casting 3 and converts the received light source signal into an electric signal; the electrical signal expression is:
wherein, alpha is a photoelectric conversion coefficient, kiIs a random vector coefficient with a value of 0 or 1, ciThe luminance of a small spot on the hot cast.
Step 2, the upper and lower conveyors 7, 8 move to the right at a constant speed, i.e. the upper and lower conveyors 7, 8 remain relatively stationary and the asbestos web 2 moves relative to the hot castings 3 as the hot castings 3 are fixed to the lower conveyors. When the asbestos net 2 moves one row of grids, the photoelectric sensor 1 acquires the optical signal sent by the thermal casting 3 once until the complete optical signal information of the detected thermal casting 3 is acquired, and the upper transmission device 7 and the lower transmission device 8 stop moving. And 3, converting the obtained complete optical signal of the hot casting 3 into complete electrical signal information of the hot casting.
Step 4, converting the complete electrical signal information into an electrical signal matrix, wherein the electrical signal matrix expression is as follows:
matrix the above electric signalsSimplified as equation: y is KC; wherein, Yi(i-1, … m) represents the light intensity detected by the detector at different positions of the corresponding grid baffle; k is a radical ofiji is 1 … n, j is 1 … n, the value is 1 or 0, the j indicates that light can pass through at the jth position of the ith grid baffle plate, 1 represents passing, and 0 represents not passing; c. CjIndicating the intensity at the j-th position of the image.
And 5, solving the electric signal equation through a compressed sensing algorithm to obtain a vector C.
Taking the OMP algorithm in the compressive sensing algorithm as an example:
step 1: initialization r0=Y,C0=0,0=φ
Step 2: n is equal to 1, and n is equal to 1,
step 2.1: gn=<rn-1,K>
step 2.3:n=n-1∪in
step 2.4: cn=nY
Step 2.5: r isn=Y-KCn
Step 2.6: repeating for 2.1-2.5 times until rn-rn-1And | l <, which is the set precision requirement. At this time CnI.e. the solution to the equation.
C
nThe expression Y is the predicted value of the vector C in KC. r is
nAnd substituting the residual error after the predicted value is substituted into the equation.
nRepresenting a set of vectors that starts with an empty set phi.<r
n-1,K>Representing the residual error r
n-1And the inner product of the column vectors of matrix K,
representing the values of these inner products. i.e. i
nWhen the inner product value is maximum, the column vector in K is expressed.
n=
n-1∪i
nRepresents that i is
nThis vector is put into the set.
And 6, restoring the acquired vector C into a two-dimensional grid matrix according to a row-first principle, and rearranging the vector C according to the position of the vector C on the asbestos gauge 2 to restore the image of the hot casting 3. In particular, according to ciBrightness (c) on different grids at different positions on the asbestos gaugeiThe value of) is recorded at the corresponding position, a two-dimensional bright distribution can be obtained, namely a picture.
And 7, acquiring the size information of the hot casting 3 according to the image information of the hot casting 3. Specifically, the size of the hot cast can be calculated according to the number of the grids occupied by the hot cast 3 on the asbestos gauge 2. In fig. 3, an object image of the reconstructed hot casting 3 is shown, which has a width of 6 pixels, and thus an actual width D is 6D.
The image shot remotely by the method can avoid measurement errors caused by temperature interference. The existing transmission device is utilized to measure the hot castings, so that the time can be fully saved, and the production efficiency is improved.
Example 4
As shown in fig. 3 and 5-7, the present embodiment includes a photosensor 1, a lower transmission device 8, an upper transmission device 7, and a grid barrier made of asbestos cloth or other high temperature resistant material. The high temperature resistance refers to the temperature resistance of more than 800 ℃. The asbestos gauge 2 in this embodiment is shown in fig. 7, the middle grids of the asbestos gauge 2 are all blocked by the light-blocking baffles, 50% of the grids on both sides are fixed with the light-blocking baffles, and the distribution of the light-blocking baffles is generated and stored by a computer according to random vector distribution generated by the computer. The middle and sides of the asbestos cloth 2 are determined according to the general shape of the hot casting 3, and the two sides of the asbestos cloth 2 ensure that light emitted from the two ends of the hot casting 3 can be received by the photoelectric sensor 1. The light emitted by the measured thermal casting 3 can not pass through the shading baffle but only can pass through the grids without the shading baffle on the asbestos gauge 2. In order to ensure the measurement precision of the device, the size of the square grid is smaller than the measurement precision requirement. Meanwhile, the distance between the hot casting 3 and the asbestos gauge 2 is also smaller than the requirement of measurement precision.
The hot casting 3 is fixed on the lower conveying device 8, the lower conveying device 8 and the upper conveying device 7 are both conveying belts, and the asbestos gauge 2 is fixedly connected between the upper conveying device 7 and the lower conveying device 8. The square cylinder 9 is fixed on the upper conveying device 7, and the photoelectric sensor 1 is fixed inside the square cylinder 9, so that the photoelectric sensor 1 receives light only from the hot casting 3. Photoelectric sensor 1 can receive the light source information that heat castings 3 sent through the net that does not have the shading baffle on asbestos gauge 2, and photoelectric sensor 1 can be with the light source signal conversion of receiving the signal of light source for the signal of telecommunication.
During the detection process, turbulence or atmospheric disturbances caused by high temperatures mainly have an effect on the spatial distribution of the light field, but do not have a large effect on the overall intensity of the entire light field. Thus, the turbulence between the asbestos web 2 and the photosensor 1 does not affect the single-pixel imaging result. Thus, the disturbance-resistant imaging of the hot casting 3 is realized, and then the corresponding casting form is obtained through image processing.
In this embodiment, the measurement method includes the steps of:
step 1, a
photoelectric sensor 1 receives a light source signal sent by the right end of a
thermal casting 3 and converts the received light source signal into an electric signal; the electrical signal expression is:
wherein, alpha is a photoelectric conversion coefficient, kiIs a random vector coefficient with a value of 0 or 1, ciThe luminance of a small spot on the hot cast.
Step 2, the upper and lower conveyors 7, 8 move to the right at a constant speed, i.e. the upper and lower conveyors 7, 8 remain relatively stationary and the asbestos web 2 moves relative to the hot castings 3 as the hot castings 3 are fixed to the lower conveyors. When the asbestos net 2 moves one row of grids, the photoelectric sensor 1 acquires optical signals sent by the thermal casting 3 once until complete optical signal information of two end parts of the measured thermal casting 3 is acquired, and the upper transmission device 7 and the lower transmission device 8 stop moving. And 3, converting the acquired complete optical signals at the two ends of the hot casting 3 into complete electrical signal information of the hot casting.
Step 4, converting the complete electrical signal information into an electrical signal matrix, wherein the electrical signal matrix expression is as follows:
simplifying the electrical signal matrix into an equation: y is KC; wherein, Yi(i-1, … m) represents the light intensity detected by the detector at different positions of the corresponding grid baffle; k is a radical ofiji is 1 … n, j is 1 … n, the value is 1 or 0, the j indicates that light can pass through at the jth position of the ith grid baffle plate, 1 represents passing, and 0 represents not passing; c. CjIndicating the intensity at the j-th position of the image.
And 5, solving the electric signal equation through a compressed sensing algorithm to obtain a vector C.
Taking the OMP algorithm in the compressive sensing algorithm as an example:
step 1: initialization r0=Y,C0=0,0=φ
Step 2: n is equal to 1, and n is equal to 1,
step 2.1: gn=<rn-1,K>
step 2.3:n=n-1∪in
step 2.4: cn=nY
Step 2.5: r isn=Y-KCn
Step 2.6: repeating for 2.1-2.5 times until rn-rn-1And | l <, which is the set precision requirement. At this time CnI.e. the solution to the equation.
C
nThe expression Y is the predicted value of the vector C in KC. r is
nAnd substituting the residual error after the predicted value is substituted into the equation.
nRepresenting a set of vectors that starts with an empty set phi.<r
n-1,K>Indicating a disabilityDifference r
n-1And the inner product of the column vectors of matrix K,
representing the values of these inner products. i.e. i
nWhen the inner product value is maximum, the column vector in K is expressed.
n=
n-1∪i
nRepresents that i is
nThis vector is put into the set.
And 6, restoring the acquired vector C into a two-dimensional grid matrix according to a row-first principle, and rearranging the vector C according to the position of the vector C on the asbestos gauge 2 to restore the image of the hot casting 3. In particular, according to ciBrightness (c) on different grids at different positions on the asbestos gaugeiThe value of) is recorded at the corresponding position, a two-dimensional bright distribution can be obtained, namely a picture.
And 7, acquiring height information of the hot casting 3 according to the image information of the two ends of the hot casting 3. Specifically, the height of the hot cast can be calculated according to the sum of the grid positions occupied by the two ends of the hot cast 3 on the asbestos gauge 2 and the grid positions occupied by the shading baffle in the middle of the asbestos gauge 2.
The image shot remotely by the method can avoid measurement errors caused by temperature interference. For large hot castings, only images of partial positions need to be measured, and measurement accuracy and efficiency are improved.
Example 5
As shown in fig. 2 and 8-10, the present embodiment includes a photoelectric sensor 1, a lower transmission device 8, a square tube 9, and a grid baffle made of asbestos cloth or other high temperature resistant materials. The high temperature resistance refers to the temperature resistance of more than 800 ℃. The asbestos net 2 is of a structure that square grids are fully distributed, the size of each grid is d, shading baffles are fixed in 50% of the grids, and the shading baffles are distributed according to random vectors generated by a computer and are generated and stored by the computer. The light emitted by the measured thermal casting 3 can not pass through the shading baffle but only can pass through the grids without the shading baffle on the asbestos gauge 2. In order to ensure the measurement precision of the device, the size of the square grid is smaller than the measurement precision requirement. Meanwhile, the distance between the hot casting 3 and the asbestos gauge 2 is also smaller than the requirement of measurement precision.
The hot casting 3 is fixed on the lower conveying device 8, the lower conveying device 8 is a conveying belt, and the asbestos gauge 2 is fixedly connected above the lower conveying device 8. The square barrel 9 is fixed at the middle part of the square on the asbestos gauge 2, and the photoelectric sensor 1 is fixed inside the square barrel 9, so that the photoelectric sensor 1 receives light to the whole asbestos gauge 2. And a square tube 9 is added, so that the photoelectric sensor 1 cannot receive direct light of other light sources, and the measurement noise is reduced. Photoelectric sensor 1 can receive the light source information that heat castings 3 sent through the net that does not have the shading baffle on asbestos gauge 2, and photoelectric sensor 1 can be with the light source signal conversion of receiving the signal of light source for the signal of telecommunication.
During the detection process, turbulence or atmospheric disturbances caused by high temperatures mainly have an effect on the spatial distribution of the light field, but do not have a large effect on the overall intensity of the entire light field. Thus, the turbulence between the asbestos web 2 and the photosensor 1 does not affect the single-pixel imaging result. Thus, the disturbance-resistant imaging of the hot casting 3 is realized, and then the corresponding casting form is obtained through image processing.
During the measurement, it is ensured that a basic range, the size of n, is determined depending on the size of the hot cast part 3. n is the number of pixels of the final image, the larger n the higher resolution, the more accurate the measurement result, but the time for measurement is increased. As the hot cast 3 moves, the photoelectric sensor 1 collects a signal every time it moves through a column of grids. Because the difference of relative position can lead to the inconsistent pixel size when gathering at every turn. Therefore, a relative calibration is required: the brightness I ═ I of each acquisition0Percos (. alpha.) its I0Alpha is the included angle between the connecting line from the center of the hot casting 3 to the photoelectric sensor 1 and the vertical direction of the photoelectric sensor 1, and is the brightness of the hot casting 3 right below the photoelectric sensor 1.
In this embodiment, the measurement method includes the steps of:
step 1, a
photoelectric sensor 1 receives a light source signal sent by a
thermal casting 3 and converts the received light source signal into an electric signal; the electrical signal expression is:
wherein, alpha is a photoelectric conversion coefficient, kiIs a random vector coefficient with a value of 0 or 1, ciThe luminance of a small spot on the hot cast.
And 2, moving the lower transmission device 8 to the right to drive the hot casting 3 to move to the right, taking the hot casting 3 as a reference point, moving the asbestos gauge 2 to the left, and when the asbestos gauge 2 moves by one row of grids, acquiring an optical signal sent by the hot casting 3 by the photoelectric sensor 1 until the complete optical signal information of the detected hot casting 3 is acquired, and stopping the movement of the lower transmission device 8. And 3, converting the obtained complete optical signal of the hot casting 3 into complete electrical signal information of the hot casting 3.
Step 4, converting the complete electrical signal information into an electrical signal matrix, wherein the electrical signal matrix expression is as follows:
simplifying the electrical signal matrix into an equation: y is KC; wherein, Yi(i-1, … m) represents the light intensity detected by the detector at different positions of the corresponding grid baffle; k is a radical ofiji is 1 … n, j is 1 … n, the value is 1 or 0, the j indicates that light can pass through at the jth position of the ith grid baffle plate, 1 represents passing, and 0 represents not passing; c. CjIndicating the intensity at the j-th position of the image.
And 5, solving the electric signal equation through a compressed sensing algorithm to obtain a vector C.
Taking the OMP algorithm in the compressive sensing algorithm as an example:
step 1: initialization r0=Y,C0=0,0=φ
Step 2: n is equal to 1, and n is equal to 1,
step 2.1: gn=<rn-1,K>
step 2.3:n=n-1∪in
step 2.4: cn=nY
Step 2.5: r isn=Y-KCn
Step 2.6: repeating for 2.1-2.5 times until rn-rn-1And | l <, which is the set precision requirement. At this time CnI.e. the solution to the equation.
C
nThe expression Y is the predicted value of the vector C in KC. r is
nAnd substituting the residual error after the predicted value is substituted into the equation.
nRepresenting a set of vectors that starts with an empty set phi.<r
n-1,K>Representing the residual error r
n-1And the inner product of the column vectors of matrix K,
representing the values of these inner products. i.e. i
nWhen the inner product value is maximum, the column vector in K is expressed.
n=
n-1∪i
nRepresents that i is
nThis vector is put into the set.
And 6, restoring the acquired vector C into a two-dimensional grid matrix according to a row-first principle, and rearranging the vector C according to the position of the vector C on the asbestos gauge 2 to restore the image of the hot casting 3. In particular, according to ciBrightness (c) on different grids at different positions on the asbestos gaugeiThe value of) is recorded at the corresponding position, a two-dimensional bright distribution can be obtained, namely a picture.
And 7, acquiring the size information of the hot casting 3 according to the image information of the hot casting 3. Specifically, the size of the hot cast can be calculated according to the number of the grids occupied by the hot cast 3 on the asbestos gauge 2. In fig. 3, an object image of the reconstructed hot casting 3 is shown, which has a width of 6 pixels, and thus an actual width D is 6D.
In the embodiment, the form of the casting can be effectively measured by only one photoelectric sensor 1, so that the cost is saved.
Example 6
As shown in fig. 7-10, the present embodiment includes a photosensor 1, a lower transfer device 8, a square cylinder 9, and a mesh barrier made of asbestos cloth or other high temperature resistant material. The high temperature resistance refers to the temperature resistance of more than 800 ℃. The asbestos gauge 2 in this embodiment is shown in fig. 7, the middle grids of the asbestos gauge 2 are all blocked by the light-blocking baffles, 50% of the grids on both sides are fixed with the light-blocking baffles, and the distribution of the light-blocking baffles is generated and stored by a computer according to random vector distribution generated by the computer. The middle and sides of the asbestos cloth 2 are determined according to the general shape of the hot casting 3, and the two sides of the asbestos cloth 2 ensure that light emitted from the two ends of the hot casting 3 can be received by the photoelectric sensor 1. The light emitted by the measured thermal casting 3 can not pass through the shading baffle but only can pass through the grids without the shading baffle on the asbestos gauge 2. In order to ensure the measurement precision of the device, the size of the square grid is smaller than the measurement precision requirement. Meanwhile, the distance between the hot casting 3 and the asbestos gauge 2 is also smaller than the requirement of measurement precision.
The hot casting 3 is fixed on the lower conveying device 8, the lower conveying device 8 is a conveying belt, and the asbestos gauge 2 is fixedly connected above the lower conveying device 8. The square barrel 9 is fixed at the middle part of the square on the asbestos gauge 2, and the photoelectric sensor 1 is fixed inside the square barrel 9, so that the photoelectric sensor 1 receives light to the whole asbestos gauge 2. Photoelectric sensor 1 can receive the light source information that heat castings 3 sent through the net that does not have the shading baffle on asbestos gauge 2, and photoelectric sensor 1 can be with the light source signal conversion of receiving the signal of light source for the signal of telecommunication.
During the detection process, turbulence or atmospheric disturbances caused by high temperatures mainly have an effect on the spatial distribution of the light field, but do not have a large effect on the overall intensity of the entire light field. Thus, the turbulence between the asbestos web 2 and the photosensor 1 does not affect the single-pixel imaging result. Thus, the disturbance-resistant imaging of the hot casting 3 is realized, and then the corresponding casting form is obtained through image processing.
In this embodiment, the measurement method includes the steps of:
step 1, the
photoelectric sensor 1 receives a light source signal sent by the right end of the
thermal casting 3 and receives the light source signalThe signal is converted into an electric signal; the electrical signal expression is:
wherein, alpha is a photoelectric conversion coefficient, kiIs a random vector coefficient with a value of 0 or 1, ciThe luminance of a small spot on the hot cast.
And 2, moving the lower conveying device 8 to the right to drive the hot casting 3 to move to the right, and taking the hot casting 3 as a reference point, so that the asbestos gauge 2 moves to the left. When the asbestos net 2 moves one row of grids, the photoelectric sensor 1 acquires optical signals sent by the thermal casting 3 once, and the lower transmission device 8 stops moving until complete optical signal information of two end parts of the measured thermal casting 3 is acquired. And 3, converting the acquired complete optical signals at the two ends of the hot casting 3 into complete electrical signal information of the hot casting.
Step 4, converting the complete electrical signal information into an electrical signal matrix, wherein the electrical signal matrix expression is as follows:
simplifying the electrical signal matrix into an equation: y is KC; wherein, Yi(i-1, … m) represents the light intensity detected by the detector at different positions of the corresponding grid baffle; k is a radical ofiji is 1 … n, j is 1 … n, the value is 1 or 0, the j indicates that light can pass through at the jth position of the ith grid baffle plate, 1 represents passing, and 0 represents not passing; c. CjIndicating the intensity at the j-th position of the image.
And 5, solving the electric signal equation through a compressed sensing algorithm to obtain a vector C.
Taking the OMP algorithm in the compressive sensing algorithm as an example:
step 1: initialization r0=Y,C0=0,0=φ
Step 2: n is equal to 1, and n is equal to 1,
step 2.1: gn=<rn-1,K>
step 2.3:n=n-1∪in
step 2.4: cn=nY
Step 2.5: r isn=Y-KCn
Step 2.6: repeating for 2.1-2.5 times until rn-rn-1And | l <, which is the set precision requirement. At this time CnI.e. the solution to the equation.
C
nThe expression Y is the predicted value of the vector C in KC. r is
nAnd substituting the residual error after the predicted value is substituted into the equation.
nRepresenting a set of vectors that starts with an empty set phi.<r
n-1,K>Representing the residual error r
n-1And the inner product of the column vectors of matrix K,
representing the values of these inner products. i.e. i
nWhen the inner product value is maximum, the column vector in K is expressed.
n=
n-1∪i
nRepresents that i is
nThis vector is put into the set.
And 6, restoring the acquired vector C into a two-dimensional grid matrix according to a row-first principle, and rearranging the vector C according to the position of the vector C on the asbestos gauge 2 to restore the image of the hot casting 3. In particular, according to ciBrightness (c) on different grids at different positions on the asbestos gaugeiThe value of) is recorded at the corresponding position, a two-dimensional bright distribution can be obtained, namely a picture.
And 7, acquiring height information of the hot casting 3 according to the image information of the two ends of the hot casting 3. Specifically, the height of the hot cast can be calculated according to the sum of the grid positions occupied by the two ends of the hot cast 3 on the asbestos gauge 2 and the grid positions occupied by the shading baffle in the middle of the asbestos gauge 2.
In the embodiment, the form of the casting can be effectively measured by only one photoelectric sensor 1, so that the cost is saved.
By integrating the six embodiments, the invention provides a hot casting measuring method based on a compressed sensing algorithm, which comprises the following steps:
step 1, acquiring a complete optical signal of a part to be measured of the measured thermal casting, and converting the acquired optical signal into an electrical signal; step 2, converting the electric signals into an electric signal matrix, wherein the expression of the electric signal matrix is as follows:
simplifying the electrical signal matrix into an equation: y is KC; wherein, Yi(i-1, … m) represents the light intensity detected by the detector at different positions of the corresponding grid baffle; k is a radical ofiji is 1 … n, j is 1 … n, the value is 1 or 0, the j indicates that light can pass through at the jth position of the ith grid baffle plate, 1 represents passing, and 0 represents not passing; c. CjIndicating the intensity at the j-th position of the image.
Step 3, solving the electric signal equation through a compressed sensing algorithm to obtain a vector C; step 4, restoring the obtained vector C into a two-dimensional grid matrix according to a row-first principle, and obtaining image information of a part to be detected of the thermal casting 3 to be detected; and 5, acquiring the size information of the part to be measured of the measured thermal casting 3 according to the image information of the part to be measured of the measured thermal casting 3.
A hot cast measurement device based on a compressive sensing algorithm, comprising: the device comprises a photoelectric processing module, a conversion module, a calculation module, an image recovery module and an image processing module; the photoelectric processing module is used for acquiring a complete optical signal of a part to be detected of the thermal casting 3 to be detected and converting the acquired optical signal into an electrical signal; the conversion module is used for converting the electric signals into an electric signal matrix and simplifying the electric signal matrix into an electric signal equation; the calculation module is used for solving the electric signal equation through a compressed sensing algorithm to obtain a vector C; the image recovery module is used for recovering the obtained vector C into a two-dimensional grid matrix according to a row-first principle and obtaining an image of a part to be detected of the detected thermal casting 3; the image processing module is used for acquiring the size information of the part to be measured of the measured thermal casting 3 according to the image information of the part to be measured of the measured thermal casting 3.
The invention provides a method and a device for measuring the form of a hot casting based on a compression sensing algorithm, which can effectively solve the problem of inaccurate measurement of the hot casting caused by overhigh surface temperature, and can accurately obtain the form of the measured hot casting by measuring the hot casting below a shielded high-temperature-resistant asbestos cloth 2 for multiple times and combining the compression sensing algorithm to obtain complete measurement information of the hot casting.
It will be appreciated by those skilled in the art that the invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The embodiments disclosed above are therefore to be considered in all respects as illustrative and not restrictive. All changes which come within the scope of or equivalence to the invention are intended to be embraced therein.