CN117367758A - Device imaging consistency detection method and device, computer device and storage medium - Google Patents

Device imaging consistency detection method and device, computer device and storage medium Download PDF

Info

Publication number
CN117367758A
CN117367758A CN202311523299.4A CN202311523299A CN117367758A CN 117367758 A CN117367758 A CN 117367758A CN 202311523299 A CN202311523299 A CN 202311523299A CN 117367758 A CN117367758 A CN 117367758A
Authority
CN
China
Prior art keywords
value
gray
line pair
image
preset
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.)
Pending
Application number
CN202311523299.4A
Other languages
Chinese (zh)
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.)
Shenzhen Smartmore Technology Co Ltd
Original Assignee
Shenzhen Smartmore 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 Shenzhen Smartmore Technology Co Ltd filed Critical Shenzhen Smartmore Technology Co Ltd
Priority to CN202311523299.4A priority Critical patent/CN117367758A/en
Publication of CN117367758A publication Critical patent/CN117367758A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M11/00Testing of optical apparatus; Testing structures by optical methods not otherwise provided for
    • G01M11/02Testing optical properties

Landscapes

  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Image Analysis (AREA)

Abstract

The present invention relates to the field of device detection technologies, and in particular, to a device imaging consistency detection method, a device, a computer device, and a storage medium, where the method includes: acquiring at least two test board images, wherein the test board images are acquired by collecting standard test boards positioned at different preset positions of the equipment, and the standard test boards are provided with at least two line pair blocks; carrying out gray scale processing on line pairs included in line pair blocks in the test board image to obtain gray scale average value peak value information and gray scale average value valley value information corresponding to the line pair blocks; calculating the image definition of the line pair block based on the gray average peak information, the gray average valley information and the number of line pairs included in the line pair block; and determining a definition consistency detection result of the equipment based on a preset definition threshold and the image definition of each line pair block. By adopting the method and the device, the consistency judgment result of objective and accurate equipment imaging can be conveniently obtained.

Description

Device imaging consistency detection method and device, computer device and storage medium
Technical Field
The present invention relates to the field of device detection technologies, and in particular, to a device imaging consistency detection method, device, computer device, and storage medium.
Background
After the product is produced, the product is required to be subjected to image detection to obtain a corresponding detection result, and whether the product is qualified or not is judged according to the detection result; equipment, such as five-axis equipment, is used for image detection of the product; the five-axis equipment comprises 4 groups of jigs for positioning products, and each group of jigs is correspondingly provided with a camera for shooting the products; in the implementation, 4 products can be simultaneously placed on corresponding jigs for positioning, and then 4 cameras are controlled to shoot the same positions of the corresponding products based on the same shooting conditions, so that images of the 4 products are simultaneously acquired, and the 4 products are conveniently and simultaneously subjected to qualification detection through a preset detection algorithm, so that the detection efficiency of the products is increased.
In order to enable the equipment to acquire images meeting the requirements of a preset detection algorithm at the same time, the equipment needs to ensure that a plurality of images acquired by the equipment at the same time are consistent as much as possible; therefore, the consistency of the acquired images of the equipment is required to be detected before the equipment is actually applied, so as to judge how the equipment images are consistent; the current mode for detecting the imaging consistency of equipment is as follows: and placing a plurality of preset sample products on a jig corresponding to the equipment in a one-to-one correspondence manner, simultaneously acquiring images of the plurality of sample products through corresponding cameras, and subjectively judging how the acquired images are consistent by an optical engineer so as to judge how the equipment images are consistent.
In summary, the current mode of judging the imaging consistency of the equipment is subjective, and the objective and accurate equipment imaging consistency judgment result is difficult to obtain.
Disclosure of Invention
The embodiment of the invention provides a device imaging consistency detection method, a device, computer equipment and a storage medium, which can realize that a comparatively objective and accurate device imaging consistency judgment result can be conveniently obtained.
In a first aspect, an embodiment of the present invention provides a method for detecting consistency of imaging of a device, including:
acquiring at least two test board images, wherein the test board images are acquired by collecting standard test boards positioned at different preset positions of the equipment, and the standard test boards are provided with at least two line pair blocks;
carrying out gray scale processing on line pairs included in line pair blocks in the test board image to obtain gray scale average value peak value information and gray scale average value valley value information corresponding to the line pair blocks;
calculating the image definition of the line pair block based on the gray average peak information, the gray average valley information and the number of line pairs included in the line pair block;
and determining a definition consistency detection result of the equipment based on a preset definition threshold and the image definition of each line pair block.
In a second aspect, an embodiment of the present invention provides an apparatus for detecting consistency of imaging, including:
the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring at least two test board images, the test board images are acquired by standard test boards positioned at different preset positions of the device, and the standard test boards are provided with at least two line pair blocks;
the processing module is used for carrying out gray processing on the line pairs included in the line pair blocks in the test board image to obtain gray average value peak value information and gray average value valley value information corresponding to the line pair blocks;
the computing module is used for computing the image definition of the line pair block based on the gray average peak value information, the gray average valley value information and the number of the line pairs included in the line pair block;
and the determining module is used for determining a definition consistency detection result of the equipment based on a preset definition threshold value and the image definition of each line pair block.
In a third aspect, an embodiment of the present invention provides a computer device, where the computer device includes a memory and a processor, where the memory stores a computer program, and where the processor implements the steps of the method described above when executing the computer program.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium having stored thereon a computer program which when executed by a processor performs steps in the above-described method.
In a fifth aspect, embodiments of the present invention also provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method described above.
According to the device imaging consistency detection method, device, computer readable storage medium and computer program product, gray average value peak value information and gray average value valley value information of each line pair block on each standard test board are calculated, and then the definition of the corresponding line pair block is calculated according to the gray average value peak value information, the gray average value valley value information and the line pair quantity in the corresponding line pair block, so that the definition of each line pair block on the test board image of each standard test board can be obtained; then judging the definition of all the line pair blocks, so as to obtain a definition consistency detection result of the equipment; compared with the prior art, the method for subjectively judging the consistency of the acquired multiple images by an optical engineer is convenient for acquiring more objective and accurate consistency judgment results of equipment imaging.
Drawings
FIG. 1 is an application environment diagram of a device imaging consistency detection method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for detecting consistency of imaging of a device according to an embodiment of the present invention;
FIG. 3 is a plan view of a standard test board according to an embodiment of the present invention;
FIG. 4 is a block diagram of a device for detecting consistency of imaging of an apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention;
fig. 6 is an internal structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The method for detecting the consistency of the imaging of the equipment, provided by the embodiment, can be applied to an application environment as shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a communication network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, portable wearable devices, and the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, etc. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
Fig. 2 is a flowchart of a method for detecting consistency of device imaging according to an embodiment of the present invention, and the method is applied to the terminal 102 or the server 104 in fig. 1 for example. It is understood that the computer device may include at least one of a terminal and a server. The method comprises the following steps:
s110, acquiring at least two test board images, wherein the test board images are acquired by standard test boards positioned at different preset positions of the equipment, and at least two line pair blocks are arranged on the standard test boards.
The device is used for detecting the image of the product; the standard test board is an image acquisition object when the device performs imaging consistency detection, and the patterns of the standard test board in this embodiment may be various, but the method for detecting imaging consistency of the device described in this embodiment must be satisfied, and one of the standard test boards shown in fig. 3 is one of the standard test boards. In this embodiment, referring to fig. 3, eight cross-shaped marks are uniformly arranged on the peripheral edges of the standard test board, five square identification blocks are uniformly distributed on the diagonal line of the standard test board, and four line pair blocks are uniformly distributed around the identification block located at the center of the standard test board; it should be noted that the pair block is composed of a plurality of parallel pairs, each pair is composed of one black line and an adjacent white line.
In this embodiment, a five-axis device is specifically taken as an example to describe the device; the five-axis equipment comprises four groups of positioning jigs for positioning products, and each group of positioning jigs is provided with a camera for shooting the corresponding products. In this embodiment, the preset four standard test boards are first installed on the corresponding products respectively, and then each product is positioned on the corresponding positioning jig, and it is to be noted that the positioning states of the products are consistent, and one surface of the product, on which the standard test board is installed, faces the corresponding camera.
In this embodiment, after the product with the standard test board is positioned on the corresponding positioning jig, further, the four cameras are controlled to synchronously collect the images of the corresponding standard test board, so as to obtain four test board images.
S120, carrying out gray scale processing on line pairs included in the line pair blocks in the test board image to obtain gray scale average value peak value information and gray scale average value valley value information corresponding to the line pair blocks.
After four test board images are obtained in step S110, further, each line pair block on each test board image is obtained, and then, gray scale processing is performed on the line pairs in each line pair block, so that gray scale average value peak value information and gray scale average value valley value information corresponding to the corresponding line pair block can be obtained.
In this embodiment, a maximum gray average value corresponding to each line pair in each line pair block is obtained and recorded as a gray average value peak value, and a minimum gray average value corresponding to each line in each line pair block is also obtained and recorded as a gray average value valley value. Combining the gray average peak values of all the line pairs in the line pair block aiming at each line pair block to obtain gray average peak value information corresponding to the line pair block; and combining the gray average valley values of all the line pairs in the line pair block to obtain gray average valley value information corresponding to the line pair block.
S130, calculating the image definition of the line pair block based on the gray average peak information, the gray average valley information and the number of line pairs included in the line pair block.
After the gray average peak value information and the gray average valley value information of each line pair block on each test board image are obtained through the step S120, further, the number of all line pairs in each line pair block is detected, and the number of line pairs in the block corresponding to each line pair block one by one is obtained; and then, processing the gray average peak value information, the gray average valley value information and the number of line pairs in the block corresponding to each line pair block based on a preset line pair block image definition calculation formula to obtain the image definition corresponding to each line pair block.
And S140, determining a definition consistency detection result of the equipment based on a preset definition threshold and the image definition of each line pair block.
It should be noted that, a definition threshold set based on historical experience is preset for the image definition of the line pair block; if the image definition of the line pair block is larger than the preset definition threshold, the image of the corresponding line pair block is clear; the image of the line pair block, namely the image of the area occupied by the line pair block on the corresponding test board image; if the image definition of the line pair block is smaller than or equal to the preset definition threshold, the image of the corresponding line pair block is not clear.
In this embodiment, after the image definition of each pair of line blocks is obtained in step S130, further, each test board image is judged according to a preset definition threshold, and whether the image definition of each pair of line blocks on the test board image is greater than the preset definition threshold is judged, so as to obtain an image definition judgment result; if the image definition judging result is that the image definition of each line pair block on the test board image is larger than the preset definition threshold value, the image of each line pair block on the test board image is clear, namely the test board image shot by the camera is clear, and the placement state of a group of positioning jigs corresponding to the test board image and the camera is standard.
After judging the image definition judgment result corresponding to each test board image, further judging all obtained image definition judgment results, and judging whether all obtained image definition judgment results are the image definition corresponding to each line pair block on the test board image or not and are all larger than a preset definition threshold value, so as to obtain a definition consistency detection result of the equipment; if the definition consistency detection result of the equipment is that the definition judgment result of all obtained images is that the definition of the image corresponding to each line pair block on the test board image is larger than a preset definition threshold value, the obtained test board images are clear, that is, the placing states of all groups of positioning jigs and cameras are standard and consistent, and the consistency of the imaging of the equipment is standard.
Through implementation of the steps S110-S140, definition judgment can be carried out on all acquired test board images, and when all the test board images are judged to be clear, consistency of equipment imaging is further judged to reach the standard. The detection and judgment mode is convenient for obtaining objective and accurate equipment imaging consistency judgment results.
In some embodiments, gray scale processing is performed on a line pair included in a line pair block in a test board image to obtain gray scale average value peak value information and gray scale average value valley value information corresponding to the line pair block, including:
S121, determining pixel columns in corresponding line pair blocks along the length direction of the line pairs in the test board image, and calculating the gray average value of each pixel column.
Referring to fig. 3, taking one pair block as an example, an area where each pair in the pair block is located includes a plurality of pixel columns, and each pixel column is formed by a corresponding column of pixel points; in the implementation, determining all pixel columns corresponding to each line pair in each line pair block, then acquiring R, G and B values of all pixel points in each pixel column, and then calculating the gray value of the corresponding pixel point based on the R, G and B values of each pixel point and a gray value conversion formula; further, a gray average value of the corresponding pixel column is calculated based on the number of all pixel points in each pixel column and the gray value.
S122, determining the maximum gray average value and the minimum gray average value corresponding to each line pair, and generating gray average value peak value information and gray average value valley value information corresponding to the line pair blocks.
Each line pair corresponds to a plurality of pixel columns, after the gray average value of all the pixel columns corresponding to each line pair is calculated, further, the gray average value with the largest value corresponding to each line pair is obtained and marked as a gray average value peak value, and the gray average value with the smallest value corresponding to each line pair is also obtained and marked as a gray average value valley value; then, combining the gray average peak values of all the line pairs in each line pair block into gray average peak value information, and combining the gray average valley values of all the line pairs in each line pair block into gray average valley value information; thus, each line pair block has corresponding gray average peak information and gray average valley information, the gray average peak information comprises gray average peaks corresponding to all line pairs in the corresponding line pair block one by one, and the gray average valley information comprises gray average valleys corresponding to all line pairs in the corresponding line pair block one by one.
In some embodiments, calculating the image sharpness of the pair block based on the gray mean peak information, the gray mean valley information, and the number of pairs included by the pair block includes:
s131, determining the difference value between the gray average peak value and the gray average valley value of the line pair and the sum value between the gray average peak value and the gray average valley value of the line pair for each line pair included in the line pair block.
The gray average peak information includes all gray average peaks I corresponding to the corresponding line pair blocks max The gray average valley information comprises all gray average valleys I corresponding to the corresponding line pair blocks min The method comprises the steps of carrying out a first treatment on the surface of the In the present embodiment, the gray-level average peak value I corresponding to each line pair is calculated max And the gray average value valley value I min The difference of (I), i.e. I max -I min The method comprises the steps of carrying out a first treatment on the surface of the Also calculate the gray average peak value I corresponding to each line pair max And the gray average value valley value I min Sum of (I), i.e. I max +I min
And S132, obtaining the image definition of the line pair based on the sum of the difference values corresponding to the line pair.
Calculating the gray average peak value I corresponding to each line pair through the step S131 max And the gray average value valley value I min Is the difference I of (2) max -I min And corresponding gray-level average peak value I max And the gray average value valley value I min Sum value I of (a) max +I min Then, further, the image definition corresponding to each line pair is calculated
S133, determining the image definition of the line pair block based on the image definition of each line pair included in the line pair block.
Obtaining the image definition of all the line pairs corresponding to each line pair block through S132Then calculating the image definition control of each line pair block based on a preset line pair block image definition calculation formula; the line-to-block image definition calculation formula is as follows:
and S140, processing the image definition of each line pair block based on a preset definition threshold value to obtain a definition consistency detection result of the equipment.
In this embodiment, the preset sharpness threshold is 0.65 according to the history experience, and when the sharpness of the image calculated in step S130 is greater than the sharpness threshold of 0.65, it is indicated that the corresponding line-to-block image is sharp; otherwise, it is unclear.
In some embodiments, the device imaging consistency detection method further comprises:
s210, processing the test board image into a channel image, wherein at least two identification blocks are preset on the test board image.
Besides adopting a mode of detecting definition consistency to detect whether the placement states of each group of corresponding positioning jigs and cameras in the five-axis equipment are standard and consistent, white balance consistency detection can be adopted.
In this embodiment, after four corresponding test board images are obtained by four cameras, each test board image is further split into an R-channel image, a G-channel image, and a B-channel image by a computer.
It should be noted that, at least, the number of the recognition blocks on the test board image is not less than 2; in this embodiment, as shown in fig. 3, the number of identification blocks on the test board image is 5.
S220, calculating gray values of all pixel points in the identification blocks on the channel image to obtain gray value groups corresponding to the identification blocks.
The pixel points corresponding to the same positions of the R channel image, the G channel image and the B channel image respectively have an R value, a G value and a B value, and in the implementation, gray images corresponding to the R channel image, the G channel image and the B channel image can be calculated based on the R value, the G value and the B value of each corresponding pixel point on the R channel image, the G channel image and the B channel image and a preset gray image conversion formula; the gray image conversion formula is as follows: gray=0.299r+0.587g+0.114 b.
The implementation of the steps can obtain an R channel image, a G channel image, a B channel image and a gray level image corresponding to each test board image; further, on each of the R-channel image, G-channel image, B-channel image, and gray-scale image, gray-scale values p (i, j) of pixel points in each of the identification blocks are calculated, thereby obtaining gray-scale value groups corresponding to each of the identification blocks.
S230, based on the gray value groups and the sizes of the corresponding identification blocks, calculating gray mean values and gray variances corresponding to the identification blocks, and obtaining gray mean value groups and gray variance groups.
In the implementation, the size of an identification block in the test board image is obtained, wherein the size comprises an identification block image height m and an identification block image width n; further, acquiring a gray value group corresponding to each identification block, and then calculating a gray average value mu of the corresponding identification block according to a preset identification block gray average value calculation formula; the gray level average value calculation formula of the identification block is as follows:
the gray average value mu of each channel image and each identification block on the gray image can be calculated through the identification block gray average value calculation formula, so that a gray average value group is obtained.
Further, the gray variance sigma of each identification block is calculated based on the size of the identification block, the gray value group corresponding to each identification block and the gray average value mu of each identification block, wherein the gray variance calculation formula of the identification block is as follows:
the gray variance sigma of each channel image and each identification block on the gray image can be calculated by the identification block gray variance calculation formula, so that a gray variance group is obtained.
S240, determining a white balance judgment result based on a preset mean value difference threshold, a variance difference threshold, a gray level mean value group and a gray level variance group.
Through the execution of step S230, a gray-scale mean group and a gray-scale variance group of each channel image and gray-scale image corresponding to each test plate image can be obtained.
In this embodiment, a gray-scale average value group of each channel image and gray-scale image of each test board image is obtained, and taking one of the gray-scale average value groups as an example, a maximum value in the gray-scale average value group is obtained and is marked as a maximum value of the gray-scale average value, and a minimum value in the gray-scale average value group is also obtained and is marked as a minimum value of the gray-scale average value; and then calculating the difference between the maximum value of the gray average value and the minimum value of the gray average value, and recording the difference as the average value difference.
In this embodiment, a gray variance group of each channel image and gray image of each test board image is obtained, and taking one gray variance group as an example, a maximum value in the gray variance group is obtained and is marked as a gray variance maximum value, and a minimum value in the gray variance group is also obtained and is marked as a gray variance minimum value; and then calculating the difference between the maximum gray variance and the minimum gray variance, and recording the difference as a variance difference.
In this embodiment, a mean difference value threshold and a variance difference value threshold set according to historical experimental data are preset for the mean difference value and the variance difference value; in this embodiment, after the mean value difference and the variance difference of an image are obtained, further, whether the mean value difference is smaller than a preset mean value difference threshold is determined, and whether the variance difference is smaller than a preset variance difference threshold is determined, so as to obtain a white balance determination result.
S250, processing the white balance judgment results corresponding to the test board images to obtain the white balance consistency detection result of the equipment.
After obtaining the white balance judgment result corresponding to each image one by one through the step S240, further judging whether the white balance judgment results of the four images (the R channel image, the G channel image, the B channel image and the gray level image) corresponding to each test board image are all average value maximum difference values smaller than an average value difference value threshold value and variance maximum difference values smaller than a variance difference value threshold value, so as to obtain the test board white balance judgment result corresponding to each test board image; if the white balance judgment result of one image is that the maximum difference value of the mean value is smaller than the mean value difference value threshold value and the maximum difference value of the variance is smaller than the variance difference value threshold value, the white balance of the corresponding image (one of the R channel image, the G channel image, the B channel image and the gray level image) is uniform; otherwise, the color is uneven; if the white balance of each image corresponding to a certain test board image is uniform, the white balance of the test board image is uniform, that is, the placement states of a group of corresponding positioning jigs and cameras in the shaft equipment are up to the standard.
Still further, judging whether the white balance of the test board images corresponding to the four test board images is uniform or not, and obtaining a white balance consistency detection result of the equipment; if the white balance consistency detection result of the equipment is that the white balance judgment result of the test board corresponding to the four test board images is uniform, the arrangement state of each group of corresponding positioning jigs and cameras in the five-axis equipment is standard and consistent.
In some embodiments, determining the white balance determination result based on the preset mean difference threshold and variance difference threshold, the gray mean group, and the gray variance group includes:
s241, calculating a mean maximum difference value based on the gray level mean value group, and calculating a variance maximum difference value based on the gray level variance group.
Taking five identification blocks in an R channel image of a first test board image as an example, gray average values in a gray average value group corresponding to the five identification blocks are respectively recorded as follows: mu (mu) R11 、μ R12 、μ R13 、μ R14 、μ R15 The method comprises the steps of carrying out a first treatment on the surface of the The gray variance in the gray variance group corresponding to the five identification blocks is respectively recorded as: sigma (sigma) R11 、σ R12 、σ R13 、σ R14 、σ R15
In the present embodiment, the gray average peak value max { μ ] in the gray average group is obtained R11 、μ R12 、μ R13 、μ R14 、μ R15 -and a gray mean valley min { μ ] in the gray mean group R11 、μ R12 、μ R13 、μ R14 、μ R15 -a }; then calculate the difference A between the gray average peak value and the gray average valley value 1R I.e. the mean maximum difference.
In the present embodiment, the gray variance peak value max { σ } in the gray variance group is obtained R11 、σ R12 、σ R13 、σ R14 、σ R15 -and a gray variance valley min { σ } in the gray variance group R11 、σ R12 、σ R13 、σ R14 、σ R15 -a }; then calculate the difference B between the gray variance peak value and the gray variance valley value 1R I.e. the maximum difference in variance.
According to the mode, the mean maximum difference and the variance maximum difference of the R channel image, the G channel image, the B channel image and the gray level image corresponding to the four test board images can be obtained.
S242, if the maximum difference value of the mean is smaller than a preset mean difference value threshold value and the maximum difference value of the variance is smaller than a preset variance difference value threshold value, determining that the white balance judging result is uniform.
In this embodiment, a mean difference threshold set based on historical experience is preset for the mean maximum difference, and a variance difference threshold set based on historical experience is preset for the variance maximum difference.
After obtaining the maximum difference value of the mean value and the maximum difference value of the R channel image, the G channel image, the B channel image and the gray level image corresponding to the four test board images through the step S241, further judging whether the maximum difference value of the mean value of each image of the R channel image, the G channel image, the B channel image and the gray level image corresponding to the four test board images is smaller than a mean value difference value threshold value, and judging whether the corresponding maximum difference value of the variance is smaller than a variance difference value threshold value; obtaining a white balance judgment result corresponding to each image one by one; if the maximum difference value of the mean value is smaller than the preset mean value difference value threshold value and the maximum difference value of the variance is smaller than the preset variance difference value threshold value, the white balance judgment result is determined to be uniform.
In some embodiments, the device imaging consistency detection method further comprises:
s310, determining coordinates of corresponding detection points on different test board images based on the detection points in a preset reference coordinate system to obtain a detection point coordinate set.
It should be noted that, if the positioning jig and/or the camera in the five-axis device have abnormal placement state, the positions of the four finally obtained images of the test board in the preset coordinate system are different; therefore, the positioning jig and the camera can be judged whether to reach standard and be consistent according to the position consistency detection.
In this embodiment, four test board images captured synchronously by the cameras are acquired, and coordinates of the four test board images at the same preset position in the preset coordinate system are acquired in combination with fig. 3 to obtain a detection point coordinate set (x 1 ,y 1 )、(x 2 ,y 2 )、(x 3 ,y 3 )、(x 4 ,y 4 )。
S320, determining a position deviation result based on a preset abscissa deviation threshold value, a preset ordinate deviation threshold value and a detection point coordinate set.
In the implementation, acquiring an abscissa in a detection point coordinate set to obtain an abscissa set, and acquiring an ordinate in the detection point coordinate set to obtain an ordinate set; calculating an abscissa maximum difference value based on the abscissa group, and calculating an ordinate maximum difference value based on the ordinate group; and judging whether the maximum difference value of the horizontal coordinates is smaller than the horizontal coordinate deviation threshold value or not, and judging whether the maximum difference value of the vertical coordinates is smaller than the vertical coordinate deviation threshold value or not, so as to obtain a position deviation result.
S330, judging the position deviation result to obtain a position consistency detection result of the equipment.
If the position deviation result is that the maximum difference value of the horizontal coordinates is smaller than the horizontal coordinate deviation threshold value and the maximum difference value of the vertical coordinates is smaller than the vertical coordinate deviation threshold value, generating a position consistency detection result of the equipment, wherein the position consistency detection result of the equipment is that the positions of all acquired test board images in a preset coordinate system are consistent; otherwise, it is inconsistent.
If the positions of all the acquired test board images in the preset coordinate system are consistent, the arrangement state of each group of corresponding positioning jigs and cameras in the five-axis equipment is up to standard and consistent.
In some embodiments, determining the position deviation result based on the preset abscissa deviation threshold and ordinate deviation threshold, the detection point coordinate set, comprises:
s321, acquiring an abscissa in the detection point coordinate set to obtain an abscissa set, and acquiring an ordinate in the detection point coordinate set to obtain an ordinate set.
After the detection point coordinate set is obtained in step S310, further, all abscissas in the detection point coordinate set are obtained and combined into an abscissas set { x } 1 、x 2 、x 3 、x 4 -a }; all the ordinate in the detection point coordinate set are also obtained and combined into an ordinate set { y } 1 、y 2 、y 3 、y 4 }。
S322, calculating an abscissa maximum difference value based on the abscissa group, and calculating an ordinate maximum difference value based on the ordinate group.
The abscissa group { x } is obtained by step S321 1 、x 2 、x 3 、x 4 After } further, the maximum abscissa max { x } in the abscissa group is obtained 1 、x 2 、x 3 、x 4 -and the smallest abscissa min { x } in the abscissa set 1 、x 2 、x 3 、x 4 Then calculate the abscissa maximum difference m=max { x } 1 、x 2 、x 3 、x 4 }-min{x 1 、x 2 、x 3 、x 4 }。
The ordinate group { y } is obtained by step S321 1 、y 2 、y 3 、y 4 After } further, the maximum ordinate max { y } in the ordinate group is obtained 1 、y 2 、y 3 、y 4 -and the smallest ordinate min { y } in the ordinate group 1 、y 2 、y 3 、y 4 Then calculate the maximum difference n=max { y }, on the ordinate 1 、y 2 、y 3 、y 4 }-min{y 1 、y 2 、y 3 、y 4 }。
S323, if the maximum difference value of the horizontal coordinates is smaller than a preset horizontal coordinate deviation threshold value and the maximum difference value of the vertical coordinates is smaller than a preset vertical coordinate deviation threshold value, determining that the position deviation result is that the position has no deviation.
In this embodiment, an abscissa deviation threshold is preset for the abscissa maximum difference value M, and an ordinate deviation threshold is preset for the ordinate maximum difference value N; after the maximum difference value M of the abscissa and the maximum difference value N of the ordinate are obtained through the step S322, further, judging whether the maximum difference value of the abscissa is smaller than an abscissa deviation threshold value or not, and judging whether the maximum difference value of the ordinate is smaller than an ordinate deviation threshold value or not, so as to obtain a position deviation result; if the maximum difference value of the horizontal coordinates is smaller than a preset horizontal coordinate deviation threshold value and the maximum difference value of the vertical coordinates is smaller than a preset vertical coordinate deviation threshold value, determining that the position deviation result is that the position has no deviation.
In some embodiments, the device imaging consistency detection method further comprises:
s410, obtaining the distance between two marks preset on each test board image to obtain a mark interval group, and obtaining the pixel column number between the two marks preset on each test board image to obtain a pixel column array.
It should be noted that, if the pixel equivalent of the obtained four test board images is consistent, it is indicated that the placement states of each group of corresponding positioning jigs and cameras in the five-axis device are standard and consistent.
Referring to FIG. 3, a distance l between two marks preset in each test board image is obtained to obtain a mark distance group { l } 1 、l 2 、l 3 、l 4 -a }; at the same time, the pixel column number c between the preset two marks in each test board image is also obtained to obtain a pixel column number pixel column array { c } 1 、c 2 、c 3 、c 4 }。
S420, processing the mark space group and the pixel column group to obtain a pixel equivalent group, and calculating the maximum difference value of the pixel equivalent based on the pixel equivalent group.
The mark pitch group { l } is obtained by step S410 1 、l 2 、l 3 、l 4 And pixel array { c }, pixel array 1 、c 2 、c 3 、c 4 After { l }, further, based on the mark-space group { l } 1 、l 2 、l 3 、l 4 And pixel array { c }, pixel array 1 、c 2 、c 3 、c 4 Calculating pixel equivalent corresponding to each test board image; wherein the pixel equivalent corresponding to the first test board image is The second test plate image corresponds to a pixel equivalent of +.>The third test plate image corresponds to a pixel equivalent of +.>The fourth test plate image corresponds to a pixel equivalent of +.>Then further obtain the pixel equivalent group { d } 1 、d 2 、d 3 、d 4 -a }; further, the pixel equivalent group { d } is calculated 1 、d 2 、d 3 、d 4 Maximum pixel amount max { d } in } 1 、d 2 、d 3 、d 4 -pixel equivalent group { d } 1 、d 2 、d 3 、d 4 The smallest pixel equivalent min { d } in 1 、d 2 、d 3 、d 4 -a }; then calculate the maximum difference in pixel equivalent k=max { d 1 、d 2 、d 3 、d 4 }-min{d 1 、d 2 、d 3 、d 4 }。
S430, determining a pixel equivalent consistency detection result of the equipment based on a preset pixel equivalent threshold value and a pixel equivalent maximum difference value.
In an implementation, a pixel equivalent threshold is preset for a pixel equivalent maximum difference K; after the maximum pixel equivalent difference K is obtained through S420, further, whether the maximum pixel equivalent difference K is smaller than a pixel equivalent threshold is determined, so as to obtain a pixel equivalent consistency detection result of the device; if the pixel equivalent consistency detection result of the equipment is that the maximum difference K of the pixel equivalents is smaller than the pixel equivalent threshold value, the visual field of each camera is consistent, namely that the placement states of each group of corresponding positioning jigs and cameras in the five-axis equipment are standard and consistent.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows; the steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the invention also provides a device for detecting the imaging consistency of the equipment. The implementation of the solution provided by the apparatus is similar to the implementation described in the above method, so the specific limitation in the embodiments of the apparatus for detecting device imaging consistency provided in the following may be referred to the limitation of the method for detecting device imaging consistency hereinabove, and will not be repeated herein.
Fig. 4 is a block diagram of a device for detecting consistency of imaging of an apparatus according to an embodiment of the present invention, where the device includes:
the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring at least two test board images, the test board images are acquired by standard test boards positioned at different preset positions of the device, and the standard test boards are provided with at least two line pair blocks;
the processing module is used for carrying out gray processing on the line pairs included in the line pair blocks in the test board image to obtain gray average value peak value information and gray average value valley value information corresponding to the line pair blocks;
the computing module is used for computing the image definition of the line pair block based on the gray average peak value information, the gray average valley value information and the number of the line pairs included in the line pair block;
And the determining module is used for determining a definition consistency detection result of the equipment based on a preset definition threshold value and the image definition of each line pair block.
It should be noted that, the technical scheme for solving the technical problem provided by the device for detecting the imaging consistency is similar to the technical scheme defined by the method for detecting the imaging consistency of the device, the technical scheme provided by the device imaging consistency detection apparatus is not described in detail here.
The above-described respective modules in the apparatus imaging consistency detection device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In some embodiments, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store data required for device imaging consistency detection. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement the steps in the device imaging consistency detection method described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 5 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In some embodiments, a computer device is provided, comprising a memory storing a computer program and a processor implementing the steps of the method embodiments described above when the computer program is executed.
In some embodiments, an internal structural diagram of a computer-readable storage medium is provided as shown in fig. 6, the computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method embodiments described above.
In some embodiments, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of a computer program, which may be stored on a non-transitory computer readable storage medium and which, when executed, may comprise the steps of the above-described embodiments of the methods. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples represent only a few embodiments of the present application, which are described in more detail and are not thereby to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (11)

1. A method for detecting consistency of imaging of a device, comprising:
acquiring at least two test board images, wherein the test board images are acquired by collecting standard test boards positioned at different preset positions of the equipment, and the standard test boards are provided with at least two line pair blocks;
carrying out gray scale processing on the line pairs included in the line pair blocks in the test board image to obtain gray scale average value peak value information and gray scale average value valley value information corresponding to the line pair blocks;
Calculating the image definition of the line pair block based on the gray average peak information, the gray average valley information and the number of the line pairs included in the line pair block;
and determining a definition consistency detection result of the equipment based on a preset definition threshold value and the image definition of each line pair block.
2. The method according to claim 1, wherein the performing gray scale processing on the line pairs included in the line pair block in the test board image to obtain gray scale average peak value information and gray scale average valley value information corresponding to the line pair block includes:
determining pixel columns in the corresponding line pair blocks along the length direction of the line pairs in the test board image, and calculating the gray average value of each pixel column;
and determining the maximum gray average value and the minimum gray average value corresponding to each line pair, and generating gray average value peak value information and gray average value valley value information corresponding to the line pair blocks.
3. The method of claim 1, wherein the calculating the image sharpness of the pair block based on the gray-scale average peak information, the gray-scale average valley information, and the number of pairs included in the pair block comprises:
For each line pair included in the line pair block, determining a difference value between a gray average peak value and a gray average valley value of the line pair, and determining a sum value between the gray average peak value and the gray average valley value of the line pair;
obtaining the image definition of the line pair based on the difference value and the sum value corresponding to the line pair;
and determining the image definition of the line pair block based on the image definition of each line pair included in the line pair block.
4. A method according to any one of claims 1-3, characterized in that the method further comprises:
processing the test board image into a channel image, wherein at least two identification blocks are preset on the test board image;
calculating gray values of all pixel points in the identification blocks on the channel image to obtain gray value groups corresponding to the identification blocks;
based on the gray value group and the corresponding size of the identification block, calculating a gray mean value and a gray variance corresponding to each identification block to obtain a gray mean value group and a gray variance group;
determining a white balance judgment result based on a preset mean value difference threshold value and variance difference threshold value, the gray level mean value group and the gray level variance group;
And processing the white balance judgment results corresponding to the test board images to obtain a white balance consistency detection result of the equipment.
5. The method of claim 4, wherein the determining the white balance determination result based on the preset mean difference threshold and variance difference threshold, the gray level mean group, and the gray level variance group comprises:
calculating a mean maximum difference value based on the gray level mean value group, and calculating a variance maximum difference value based on the gray level variance group;
and if the maximum mean value difference is smaller than a preset mean value difference threshold and the maximum variance difference is smaller than a preset variance difference threshold, determining that the white balance judging result is uniform.
6. A method according to any one of claims 1-3, characterized in that the method further comprises:
determining coordinates corresponding to detection points on different test board images based on detection points in a preset reference coordinate system to obtain a detection point coordinate set;
determining a position deviation result based on a preset abscissa deviation threshold value, a preset ordinate deviation threshold value and the detection point coordinate set;
and judging the position deviation result to obtain a position consistency detection result of the equipment.
7. The method of claim 6, wherein the determining a position deviation result based on the set of detection point coordinates and the preset abscissa deviation threshold and ordinate deviation threshold comprises:
acquiring an abscissa in the detection point coordinate set to obtain an abscissa set, and acquiring an ordinate in the detection point coordinate set to obtain an ordinate set;
calculating an abscissa maximum difference value based on the abscissa group, and calculating an ordinate maximum difference value based on the ordinate group;
and if the maximum difference value of the horizontal coordinates is smaller than a preset horizontal coordinate deviation threshold value and the maximum difference value of the vertical coordinates is smaller than a preset vertical coordinate deviation threshold value, determining that the position deviation result is position non-deviation.
8. A method according to any one of claims 1-3, characterized in that the method further comprises:
obtaining a distance between two marks preset on each test board image to obtain a mark interval group, and obtaining a pixel column number between the two marks preset on each test board image to obtain a pixel column array;
processing the mark space group and the pixel column array to obtain a pixel equivalent group, and calculating a maximum difference value of pixel equivalents based on the pixel equivalent group;
And determining a pixel equivalent consistency detection result of the equipment based on a preset pixel equivalent threshold value and the maximum difference value of the pixel equivalents.
9. An apparatus for detecting consistency of imaging, comprising:
the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring at least two test board images, the test board images are acquired by standard test boards positioned at different preset positions of the device, and the standard test boards are provided with at least two line pair blocks;
the processing module is used for carrying out gray processing on the line pairs included in the line pair blocks in the test board image to obtain gray average value peak value information and gray average value valley value information corresponding to the line pair blocks;
the calculating module is used for calculating the image definition of the line pair block based on the gray average peak value information, the gray average valley value information and the number of the line pairs included by the line pair block;
and the determining module is used for determining a definition consistency detection result of the equipment based on a preset definition threshold value and the image definition of each line pair block.
10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the method according to any of claims 1-8 when executing the computer program.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method according to any of claims 1-8.
CN202311523299.4A 2023-11-15 2023-11-15 Device imaging consistency detection method and device, computer device and storage medium Pending CN117367758A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311523299.4A CN117367758A (en) 2023-11-15 2023-11-15 Device imaging consistency detection method and device, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311523299.4A CN117367758A (en) 2023-11-15 2023-11-15 Device imaging consistency detection method and device, computer device and storage medium

Publications (1)

Publication Number Publication Date
CN117367758A true CN117367758A (en) 2024-01-09

Family

ID=89396707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311523299.4A Pending CN117367758A (en) 2023-11-15 2023-11-15 Device imaging consistency detection method and device, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN117367758A (en)

Similar Documents

Publication Publication Date Title
CN109859204B (en) Convolutional neural network model inspection method and device
WO2023201924A1 (en) Object defect detection method and apparatus, and computer device and storage medium
CN110825900A (en) Training method of feature reconstruction layer, reconstruction method of image features and related device
CN113012157B (en) Visual detection method and system for equipment defects
CN114612469A (en) Product defect detection method, device and equipment and readable storage medium
CN115759148B (en) Image processing method, device, computer equipment and computer readable storage medium
CN113421242A (en) Deep learning-based welding spot appearance quality detection method and device and terminal
CN117011304A (en) Defect detection method, defect detection device, computer equipment and computer readable storage medium
CN110163095B (en) Loop detection method, loop detection device and terminal equipment
CN116258663A (en) Bolt defect identification method, device, computer equipment and storage medium
CN102713974A (en) Learning device, identification device, learning identification system and learning identification device
CN115471439A (en) Method and device for identifying defects of display panel, electronic equipment and storage medium
CN117367758A (en) Device imaging consistency detection method and device, computer device and storage medium
CN114862866A (en) Calibration plate detection method and device, computer equipment and storage medium
CN115018932A (en) Camera calibration method and device, electronic equipment and storage medium
CN112861874B (en) Expert field denoising method and system based on multi-filter denoising result
CN114463764A (en) Table line detection method and device, computer equipment and storage medium
CN116645374B (en) Point defect detection method, point defect detection device, computer equipment and storage medium
CN116030450B (en) Checkerboard corner recognition method, device, equipment and medium
CN116797498A (en) Lens dirt degree detection method, device, computer equipment and storage medium
CN117115275B (en) Distortion parameter determination method and device and computer equipment
CN112348044A (en) License plate detection method, device and equipment
CN115527161B (en) Abnormal discharge monitoring method, device, computer equipment and storage medium
RU2538319C1 (en) Device of searching image duplicates
CN116109561A (en) Liquid crystal screen detection method and device, computer equipment and storage medium

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