CN115423808B - Quality detection method for speckle projector, electronic device, and storage medium - Google Patents

Quality detection method for speckle projector, electronic device, and storage medium Download PDF

Info

Publication number
CN115423808B
CN115423808B CN202211373238.XA CN202211373238A CN115423808B CN 115423808 B CN115423808 B CN 115423808B CN 202211373238 A CN202211373238 A CN 202211373238A CN 115423808 B CN115423808 B CN 115423808B
Authority
CN
China
Prior art keywords
speckle
value
point
points
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.)
Active
Application number
CN202211373238.XA
Other languages
Chinese (zh)
Other versions
CN115423808A (en
Inventor
曹天宇
李绪琴
户磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Lushenshi Technology Co ltd
Original Assignee
Hefei Dilusense 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 Hefei Dilusense Technology Co Ltd filed Critical Hefei Dilusense Technology Co Ltd
Priority to CN202211373238.XA priority Critical patent/CN115423808B/en
Publication of CN115423808A publication Critical patent/CN115423808A/en
Application granted granted Critical
Publication of CN115423808B publication Critical patent/CN115423808B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Projection Apparatus (AREA)

Abstract

The embodiment of the application relates to the technical field of machine vision, and discloses a quality detection method of a speckle projector, electronic equipment and a storage medium, wherein the method comprises the following steps: sequentially taking all pixel points in the acquired speckle pattern as reference points, and taking all pixel points in a preset first window with the reference points as centers as points to be matched; calculating the matching cost value of each point to be matched according to the gray value of each point to be matched, a preset template picture and a preset matching algorithm, and determining the point to be matched with the minimum matching cost value as a scattered spot; screening speckle points with the gray value larger than the product of the gray value mean value of the speckle pattern and a preset coefficient as effective speckle points; if the ratio of the number of the effective scattered spots to the total number of the speckle points is smaller than a preset effective threshold value, determining that the quality of the speckle projector to be measured is unqualified, and accordingly timely eliminating the speckle projector with unqualified quality and effectively improving the production quality of the speckle projector.

Description

Quality detection method for speckle projector, electronic device, and storage medium
Technical Field
The embodiment of the application relates to the technical field of machine vision, in particular to a quality detection method of a speckle projector, electronic equipment and a storage medium.
Background
When Laser is subjected to diffuse reflection on the Surface of a scatterer or passes through a transparent scatterer (such as ground glass and the like), randomly distributed bright and dark spots can be observed in the Surface of the scatterer or a light field nearby the scatterer, the spots are called Laser speckles, the Laser speckles can be applied to a structured light camera carrying a structured light technology, the structured light camera is a mainstream depth camera on the market, the core of the structured light camera comprises two parts, namely a speckle projector and a speckle receiver, the speckle receiver is provided with a plurality of infrared lenses, the speckle projector projects the Laser speckles to an object to be detected, the speckle receiver shoots the projection of the Laser speckles on the object to be detected to obtain a speckle pattern, depth gray scale and 3D resolving are carried out based on the speckle pattern, and a conventional Vertical Cavity Surface Emitting Laser (VCSEL for short) in the speckle projector emits Laser, is collimated by a collimating mirror, and is diffracted and copied by a diffraction Optical Element (DOE (VCSEL for short), so that a certain amount of speckles is projected.
The inventor of this application finds, in the production process, because of anchor clamps, the installation, DOE sets up, production environment temperature, the influence of factors such as production environment humidity, the quality of the speckle that the speckle projector that leaves the factory throws out is not conform to expectation, speckle projector's quality is on the low side promptly, speckle projector equipment structure light camera based on the quality is low then can produce bigger loss, consequently, it is very important to carry out quality detection to speckle projector, nevertheless the interior most luminance based on the speckle that speckle projector throws out, contrast etc. carries out quality detection to speckle projector, it is on the low side to detect the precision.
Disclosure of Invention
An object of the embodiment of the application is to provide a quality detection method, electronic equipment and storage medium of speckle projector, can accurately, high-efficiently carry out quality detection to the speckle projector, in time reject the unqualified speckle projector of quality, promote the production quality of speckle projector.
In order to solve the above technical problem, an embodiment of the present application provides a quality detection method for a speckle projector, including the following steps: sequentially taking all pixel points in the acquired speckle pattern as reference points, and taking all pixel points in a preset first window with the reference points as centers as points to be matched; the speckle pattern is obtained by shooting speckles projected to a target plane by a speckle projector to be detected through a preset infrared lens; calculating the matching cost value of each point to be matched according to the gray value of each point to be matched, a preset template graph and a preset matching algorithm, and determining the point to be matched with the minimum matching cost value as a scattered spot; calculating the gray value mean value of the speckle pattern according to the gray value of each speckle in the speckle pattern, and screening the speckle points of which the gray value is greater than the product of the gray value mean value of the speckle pattern and a preset coefficient as effective speckle; and if the ratio of the number of the effective scattered spots to the total number of the scattered spots is smaller than a preset effective threshold value, determining that the quality of the speckle projector to be detected is unqualified.
An embodiment of the present application further provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the above-described speckle projector quality detection method.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above-described method of quality detection for a speckle projector.
The quality detection method of the speckle projector, the electronic device and the storage medium provided by the embodiment of the application, firstly, a speckle pattern obtained by shooting speckles projected to a target plane by a preset infrared lens is obtained, all pixel points in the speckle pattern are sequentially used as reference points, all pixel points in a preset first window with the reference points as centers are used as points to be matched, then, the matching cost value of each point to be matched is calculated according to the gray value of each point to be matched, a preset template pattern and a preset matching algorithm, the point to be matched with the minimum matching cost value is determined as a speckle, then, the gray value mean value of the speckle pattern is calculated according to the gray value of each speckle in the speckle pattern, the speckle point with the gray value larger than the product of the gray value mean value of the speckle pattern and a preset coefficient is screened as an effective speckle, finally, judging whether the ratio of the number of the effective scattered spots to the total number of the speckle points is smaller than a preset effective threshold value or not, if the ratio of the number of the effective scattered spots to the total number of the speckle points is larger than the preset effective threshold value, determining that the quality of the speckle projector to be detected is unqualified, considering that the quality detection is performed on the basis of the brightness and the contrast of a speckle pattern corresponding to the speckle projector in the whole pattern layer mostly in the industry and the detection precision is low, the embodiment of the application firstly accurately finds the scattered spots in the speckle pattern in a block matching mode, calculates an average value according to the gray value of each scattered spot, takes the product of the gray value average value and a preset coefficient as a screening standard, distinguishes the high-quality effective scattered spots and low-quality speckle dead spots, reduces images subjected to whole pattern noise as much as possible, and if the ratio of the number of the effective scattered spots to the total number of the speckle points is smaller than the effective threshold value, indicates that the quality of the speckle pattern is low, the quality of the speckle projector to be detected is unqualified, and rework is needed, so that the speckle projector can be accurately and efficiently subjected to quality detection, the unqualified speckle projector can be removed in time, and the production quality of the speckle projector is improved.
In addition, the determining the point to be matched with the minimum matching cost value as a scattered spot includes: judging whether the point to be matched with the minimum matching cost value is the reference point or not; if the point to be matched with the minimum matching cost value is not the reference point, directly abandoning the point to be matched with the minimum matching cost value; if the point to be matched with the minimum matching cost value is the reference point, continuously judging whether the matching cost value of the reference point is smaller than a preset cost threshold value; if the matching cost value of the reference point is smaller than the cost threshold value, determining the reference point as a scattered spot; if the matching cost value of the reference point is greater than or equal to the cost threshold, the reference point is discarded, due to the characteristics of the diffractive optical element, the speckle pattern projected by the speckle projector to be detected is greatly stretched at the edge position, so that when block matching is performed, the point to be matched with the minimum matching cost value is probably not the center of the image block, namely not the reference point, at this time, whether the point to be matched with the minimum matching cost value is a scattered spot or not cannot be determined, the next matching of the image block is required to be performed to determine, namely, the point to be matched is discarded first, meanwhile, if the reference point is the point to be matched with the minimum matching cost value, but the matching cost value is still large, the point is probably noise, and the point is also discarded, so that the scattered spot is found in the scattered spot pattern more scientifically and more accurately.
In addition, the preset matching algorithm includes a normalized Cross Correlation function (NCC) matching algorithm, the template map is a gaussian kernel function template map, the number of the template maps is several, and the calculating the matching cost value of each point to be matched according to the gray value of each point to be matched, the preset template map and the preset matching algorithm respectively includes: determining a target template map corresponding to the speckle pattern in a plurality of template maps according to the size of the speckle pattern; traversing each point to be matched, and calculating the matching cost value of the current point to be matched according to the gray value of each pixel point in a second window taking the current point to be matched as the center, the gray value mean value corresponding to the second window, the gray value of each pixel point in the target template graph and the gray value mean value of the target template graph; the size of the second window is the same as that of the target template graph, the NCC matching algorithm can well reduce the influence of factors such as light rays on matching calculation, the matching precision is high, and the similarity between the point to be matched and the target template graph can be well measured, so that the quality detection effect of the speckle projector can be further improved, and the production quality of the speckle projector can be further improved.
In addition, after the speckle points with the gray values larger than the product of the mean gray value of the speckle pattern and a preset coefficient are screened as effective speckle points, the method further comprises the following steps: sequentially taking each effective scattered spot as a binarization central point, and calculating a gray value average value corresponding to a preset third window with the binarization central point as a center; assigning the gray value of the pixel point of which the gray value in the third window is smaller than the mean gray value corresponding to the third window to be 0, and assigning the gray value of the pixel point of which the gray value in the third window is larger than or equal to the mean gray value corresponding to the third window to be 1 to obtain a binarization area corresponding to each effective speckle point; respectively carrying out Gaussian blur and ellipse fitting on the binarization areas corresponding to the effective speckle points to obtain first ellipse areas corresponding to the effective speckle points; calculating the speckle radius of the speckle pattern according to the length of the long axis of the first elliptical area corresponding to each effective speckle point, the length of the short axis of the first elliptical area corresponding to each effective speckle point and the number of the effective speckles; if the speckle radius is larger than a preset speckle radius threshold value, determining that the quality of the speckle projector to be detected is unqualified, considering that the difference between the size of speckles projected by the qualified speckle projector and a theoretical value is not too large, and if the size of speckles projected by the speckle projector is too large, indicating that the speckle projector has problems in the production and assembly processes and cannot be sold after leaving a factory.
In addition, before the obtaining of the first elliptical region corresponding to each effective speckle point, the method further includes: carrying out level segmentation on the speckle pattern according to a preset level segmentation template pattern to obtain each diffraction level area; after obtaining the first elliptical area corresponding to each effective speckle point, the method further includes: determining a second elliptical area corresponding to the effective speckle point in the speckle pattern according to the first elliptical area; calculating the mean value of the gray values of the diffraction order areas according to the gray values of the pixel points in the second elliptical area corresponding to the effective speckle points in the diffraction order areas; determining a global uniformity value of the speckle pattern according to the maximum value in the gray value mean value of each diffraction order area and the minimum value in the gray value mean value of each diffraction order area; if the global uniformity value is larger than a preset global uniformity threshold value, determining that the quality of the speckle projector to be detected is unqualified, redefining the global uniformity of the image, not determining the global uniformity based on each pixel point in the speckle pattern, but calculating the global uniformity according to the pixel points in the speckle region, and dividing the diffraction order of the speckle pattern in advance, so that the edge diffraction order is prevented from generating larger influence on the calculation of the global uniformity, the mutual influence among different diffraction orders is weakened, the calculated global uniformity value is more scientific and reasonable, and the production quality of the speckle projector is further improved.
In addition, after the determining a second elliptical area corresponding to the effective speckle point in the speckle pattern according to the first elliptical area, the method further includes: calculating the mean value and variance of the gray values of the zero-order diffraction region according to the gray values of all pixel points in a second elliptical region corresponding to all effective speckle points in the zero-order diffraction region; determining a local uniformity value of the speckle pattern according to the gray value mean value and the gray value variance of the zero-order diffraction region; if the local uniformity value is larger than a preset local uniformity threshold value, determining that the quality of the speckle projector to be detected is unqualified, redefining the local uniformity of the image, namely the quality of a zero-order diffraction area in a speckle pattern is the highest, and if the quality of the zero-order diffraction area is poor, determining that the quality of the speckle projector is unqualified.
In addition, the preset order division template map comprises a plurality of quadrangles, each quadrangle corresponds to a diffraction order region, the diffraction order regions corresponding to different quadrangles are different, the middle quadrangle in the order division template map corresponds to a zero-order diffraction region, and the speckle pattern is subjected to order division according to the preset order division template map to obtain each diffraction order region, and the method comprises the following steps: respectively determining the homonymous points of the centroid points of the quadrangles in the level segmentation template map in the speckle pattern according to a preset matching algorithm; calculating a homography transformation matrix between the level segmentation template map and the speckle pattern according to the coordinates of the centroid points of the quadrangles and the coordinates of the homonymous points of the centroid points of the quadrangles in the speckle pattern; determining coordinates of the corner points of the quadrangles at the same-name points in the speckle pattern according to the coordinates of the corner points of the quadrangles and the homographic transformation matrix; according to the coordinates of the corner points of the quadrangles in the same-name points of the speckle pattern, diffraction order regions of the speckle pattern are obtained, and compared with a level division template pattern, the speckle pattern obtained through shooting by an infrared lens can generate different rotation transformation, translation transformation and perspective transformation.
Drawings
One or more embodiments are illustrated by the corresponding figures in the drawings, which are not meant to be limiting.
FIG. 1 is a flow chart of a method of quality detection for a speckle projector provided by one embodiment of the present application;
FIG. 2 is a flowchart illustrating an embodiment of determining a point to be matched with a minimum matching cost value as a speckle pattern;
FIG. 3 is a flowchart illustrating a method for calculating a matching cost value of each point to be matched according to a gray scale value of each point to be matched, a preset template map and a preset matching algorithm according to an embodiment of the present application;
FIG. 4 is a flow chart of the speckle radius based quality detection for a speckle projector under test in one embodiment of the present application;
FIG. 5 is a schematic diagram of a first elliptical region corresponding to an effective speckle point, provided by an embodiment of the present application;
FIG. 6 is a flow chart of global uniformity-based quality detection for a speckle projector under test as provided in one embodiment of the present application;
FIG. 7 is a flow chart of local uniformity-based quality detection for a speckle projector under test as provided in one embodiment of the present application;
FIG. 8 is a flow chart of a step division of the speckle pattern according to a predetermined step division template map to obtain diffraction step regions, as provided in an embodiment of the present application;
FIG. 9 is a template diagram for a level segmentation provided by an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to another embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that in the examples of the present application, numerous technical details are set forth in order to provide a better understanding of the present application. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments. The following embodiments are divided for convenience of description, and should not constitute any limitation to the specific implementation manner of the present application, and the embodiments may be mutually incorporated and referred to without contradiction.
An embodiment of the present application relates to a quality detection method for a speckle projector, which is applied to an electronic device, where the electronic device may be a terminal or a server, and the electronic device in this embodiment and the following embodiments is described by taking the server as an example.
The specific process of the quality detection method of the speckle projector according to this embodiment can be shown in fig. 1, and includes:
and 101, sequentially taking all pixel points in the acquired speckle pattern as reference points, taking all pixel points in a preset first window with the reference points as centers as points to be matched, and taking the speckle pattern as a speckle pattern obtained by shooting speckles projected to a target plane by a speckle projector to be detected through a preset infrared lens.
In the specific implementation, the speckle projector to be detected is fixed on a detection fixture, a projection surface faces a target plane, the target plane has a certain diffuse reflection condition, the target plane can be a white wall, a white curtain and the like, when the quality detection of the speckle projector is carried out, the speckle projector to be detected is started to project speckles to the target plane, and then a preset infrared lens is used for shooting the projection of the speckles on the target plane, so that a speckle pattern corresponding to the speckle projector to be detected is obtained, wherein the preset infrared lens can be selected by a person skilled in the art according to actual needs.
In one example, in order to facilitate quality detection of a speckle projector to be shipped out of a factory quickly and effectively in a production line, a preset infrared lens needs to have certain precision requirement, namely the preset infrared lens needs to be a high-precision infrared lens, so that poor quality of shot speckle patterns caused by the infrared lens is avoided, and adverse effects on quality detection of the speckle projector are avoided.
In a specific implementation, after the server acquires the speckle pattern corresponding to the speckle projector to be detected, the server may sequentially use each pixel point in the acquired speckle pattern as a reference point, and use each pixel point in a preset first window centered on the reference point as a point to be matched, so as to prepare for subsequent block matching, where the size of the preset first window may be set by a person skilled in the art according to actual needs.
In one example, the size of the preset first window is 5px × 5px, that is, the preset first window includes 25 points to be matched.
And 102, calculating the matching cost value of each point to be matched according to the gray value of each point to be matched, a preset template graph and a preset matching algorithm, and determining the point to be matched with the minimum matching cost value as a scattered spot.
In a specific implementation, the server calculates a matching cost value of each point to be matched according to a gray value of each point to be matched, a preset template map and a preset matching algorithm, and determines the point to be matched with the minimum matching cost value, that is, the point to be matched which is most similar to the template map, as a scattered spot, which is a central point of a speckle, where the scattered spots mentioned in the present application all refer to the central point of the speckle, the preset template map may be selected by a person skilled in the art according to the scattered spot map, and the preset matching algorithm may be an Absolute error Sum matching algorithm (Sum of Absolute Differences, SAD for short), a Zero-mean normalized cross product correlation (ZNCC for short), a normalized cross correlation function matching algorithm (NCC for short), and the like.
And 103, calculating the mean value of the gray values of the speckle patterns according to the gray values of all the speckles in the speckle patterns, and screening the speckle points with the gray values larger than the product of the mean value of the gray values of the speckle patterns and a preset coefficient to be effective speckles.
In the specific implementation, after the server determines each speckle point in the speckle pattern, the server can calculate the gray value average value of the speckle pattern according to the gray value of each speckle point in the speckle pattern, and the non-speckle points do not need to participate in the calculation of the gray value average value, so that the influence of background noise can be well eliminated.
In one example, the predetermined coefficient is greater than 0 and less than 1, and is typically set to 0.5, that is, speckle points with a gray value 50% higher than the mean gray value of the speckle pattern are used as effective speckle, and speckle points with a gray value 50% lower than or equal to the mean gray value of the speckle pattern are used as speckle dead spots.
And step 104, if the ratio of the number of the effective scattered spots to the total number of the speckle points is smaller than a preset effective threshold value, determining that the quality of the speckle projector to be measured is unqualified.
In the specific implementation, after the server determines the effective scattered spots in all the scattered spots, the number of the effective scattered spots can be counted, and the ratio of the number of the effective scattered spots to the total number of the speckle points is calculated, that is, the ratio of the number of the effective scattered spots to the total number of the speckle points is smaller than a preset effective threshold value, that is, the number of the effective speckle points is too small, the number of the speckle bad spots is too large, the server determines that the quality detection of the speckle projector to be detected is unqualified, and if the ratio of the number of the effective scattered spots to the total number of the speckle points is larger than or equal to the preset effective threshold value, the server determines that the quality detection of the speckle projector to be detected is qualified, and the server is allowed to leave the factory.
In one example, when the preset effective threshold value is 0.95, that is, the number of effective scattered spots accounts for less than 95% of all the scattered spots, the quality detection of the speckle projector to be detected is determined to be unqualified.
In this embodiment, a speckle pattern obtained by shooting speckles projected by a speckle projector to be detected to a target plane by a preset infrared lens is obtained, each pixel point in the speckle pattern is sequentially used as a reference point, each pixel point in a preset first window with the reference point as a point to be matched is used as a point to be matched, then a matching cost value of each point to be matched is calculated according to a gray value of each point to be matched, a preset template graph and a preset matching algorithm, the point to be matched with the minimum matching cost value is determined as a speckle, a gray value mean value of the speckle pattern is calculated according to a gray value of each speckle in the speckle pattern, a speckle point with a gray value larger than a product of the gray value mean value of the speckle pattern and a preset coefficient is screened as an effective speckle, and finally whether a ratio of the number of the effective speckle to the total number of the speckle points is smaller than a preset effective threshold is judged, if the ratio of the number of the effective scattered spots to the total number of the speckle points is greater than a preset effective threshold value, determining that the quality of the speckle projector to be detected is unqualified, considering that the quality detection is mostly carried out on the basis of the brightness and the contrast of a speckle pattern corresponding to the speckle projector in the industry on the whole pattern level, and the detection precision is low, the embodiment of the application firstly accurately finds the scattered spots in the speckle pattern in a block matching mode, calculates a mean value according to the gray value of each scattered spot, and distinguishes high-quality effective scattered spots and low-quality speckle bad spots by taking the product of the gray value mean value and a preset coefficient as a screening standard, and reduces the image subjected to the whole pattern noise as much as possible, if the ratio of the number of the effective scattered spots to the total number of the speckle points is less than the effective threshold value, the quality of the speckle pattern is low, the quality detection of the speckle projector to be detected is unqualified, and rework is needed, therefore, the quality of the speckle projector can be accurately and efficiently detected, the speckle projector with unqualified quality can be removed in time, and the production quality of the speckle projector is improved.
In an embodiment, the server determines the point to be matched with the minimum matching cost value as a scattered spot, which may be implemented by the steps shown in fig. 2, and specifically includes:
step 201, judging whether the point to be matched with the minimum matching cost value is a reference point, if so, executing step 203, otherwise, executing step 202.
And 202, directly discarding the point to be matched with the minimum matching cost value.
And step 203, continuously judging whether the matching cost value of the reference point is smaller than a preset cost threshold, if so, executing step 204, otherwise, executing step 205.
In the specific implementation, after determining the point to be matched with the minimum matching cost value, the server may determine whether the point to be matched with the minimum matching cost value is the reference point, if the point to be matched with the minimum matching cost value is the same point as the reference point, continue to determine whether the matching cost value of the reference point is smaller than a preset cost threshold, if the point to be matched with the minimum matching cost value is not the same point as the reference point, discard the point to be matched with the minimum matching cost value, and perform matching calculation of each point to be matched in a preset first window with the next reference point as the center.
Step 204, the reference points are determined as scattered spots.
In step 205, the fiducial is discarded.
In specific implementation, when a point to be matched with the minimum matching cost value is a reference point, the server continuously determines whether the matching cost value of the reference point is smaller than a preset cost threshold, if the matching cost value of the reference point is smaller than the preset cost threshold, the reference point is determined to be a scattered spot, and if the matching cost value of the reference point is greater than or equal to the preset cost threshold, the point is likely to be noise and needs to be discarded, wherein the preset cost threshold can be set by a person skilled in the art according to actual needs.
In one example, the preset cost threshold may be set to 0.35.
In this embodiment, due to the characteristics of the diffractive optical element, the speckle pattern projected by the speckle projector to be measured is stretched greatly at the edge position, so when block matching is performed, the point to be matched with the minimum matching cost value is likely not to be the center of the image block, i.e., not to be the reference point, at this time, it cannot be determined whether the point to be matched with the minimum matching cost value is the scattered spot, and it is necessary to perform matching of the next image block to determine, i.e., discard the point to be matched first, and meanwhile, if the reference point is the point to be matched with the minimum matching cost value, but the matching cost value is still high, the point is likely to be noise and needs to be discarded, so that the scattered spot is found in the scattered spot pattern more scientifically and more accurately.
In one embodiment, the preset matching algorithm includes an NCC matching algorithm, the preset template map is a gaussian kernel function template map, the number of the preset template maps is several, and the server calculates the matching cost value of each point to be matched according to the gray value of each point to be matched, the preset template map and the preset matching algorithm, which may be implemented by the steps shown in fig. 3, and specifically includes:
step 301, determining a target template map corresponding to the speckle pattern from the plurality of template maps according to the size of the speckle pattern.
In one example, the preset template map is a plurality of gaussian kernel function template maps, and the server may determine, according to the size of the speckle pattern, a target template map corresponding to the speckle pattern from the plurality of gaussian kernel function template maps, where the target template map is a template map most suitable for performing matching calculation on the speckle pattern.
Step 302, traversing each point to be matched, and calculating the matching cost value of the current point to be matched according to the gray value of each pixel point in the second window with the current point to be matched as the center, the mean value of the gray values corresponding to the second window, the gray value of each pixel point in the target template map, and the mean value of the gray values of the target template map.
In the specific implementation, after the server determines the target template map, the server may traverse each point to be matched, determine each pixel point in a second window centered on the current point to be matched, calculate a mean value of gray values corresponding to the second window according to the gray values of each pixel point in the second window, calculate a mean value of gray values of the target template map according to the gray values of each pixel point in the target template map, and calculate a matching cost value of the current point to be matched according to the gray values of each pixel point in the second window centered on the current point to be matched, the mean value of gray values corresponding to the second window, the gray values of each pixel point in the target template map, and the mean value of gray values of the target template map, wherein the size of the second window is the same as the size of the target template map.
In an example, the server may calculate the matching cost value of the current point to be matched according to the gray value of each pixel point in the second window centered on the current point to be matched, the mean gray value corresponding to the second window, the gray value of each pixel point in the target template map, and the mean gray value of the target template map by using the following formula:
Figure 26054DEST_PATH_IMAGE001
wherein M is the width of the second window, N is the height of the second window, I (x + I, y + j) is the gray value of a point (x + I, y + j) in the second window centered on the point (x, y) to be matched, I ave Is the mean value of the gray values corresponding to the second window, T (i, j) is the gray value of the point (i, j) in the target template image, T ave The NCC (x, y) is the matching cost value of the point (x, y) to be matched.
In the embodiment, the influence of factors such as light rays on the matching calculation can be well reduced by considering the NCC matching algorithm, the matching precision is very high, the similarity between the point to be matched and the target template graph can be well measured, the quality detection effect of the speckle projector can be further improved by using the NCC matching algorithm, and the production quality of the speckle projector is further improved.
In an embodiment, after screening the speckle points whose gray values are greater than the product of the gray value mean value of the speckle pattern and the preset coefficient as effective speckle points, the server may perform quality detection based on the speckle radius as shown in fig. 4 on the speckle projector to be detected at the same time, which specifically includes:
and step 401, sequentially taking each effective scattered spot as a binarization central point, and calculating a mean value of gray values corresponding to a preset third window with the binarization central point as a center.
In a specific implementation, after screening the speckle points with the gray value greater than the product of the mean value of the gray value of the speckle pattern and the preset coefficient as the effective speckle points, the server may sequentially use each effective speckle point as a binarization central point, determine each pixel point in a preset third window with the binarization central point as the center, and calculate the mean value of the gray value corresponding to the preset third window with the binarization central point as the center according to the gray value of each pixel point in the third window, where the size of the preset third window may be set by a person skilled in the art according to actual needs.
In one example, the preset size of the third window is 15px × 15px, that is, there are 225 pixels in the third window in total.
And 402, assigning the gray value of the pixel point of which the gray value in the third window is smaller than the mean gray value corresponding to the third window to be 0, and assigning the gray value of the pixel point of which the gray value in the third window is larger than or equal to the mean gray value corresponding to the third window to be 1 to obtain the binarization area corresponding to each effective speckle point.
In a specific implementation, the server may perform local binarization on the third window, assign a gray value of a pixel point in the third window whose gray value is smaller than the mean gray value corresponding to the third window to 0, and assign a gray value of a pixel point in the third window whose gray value is greater than or equal to the mean gray value corresponding to the third window to 1, thereby obtaining a binarization area corresponding to each effective speckle point.
And step 403, respectively performing gaussian blurring and ellipse fitting on the binarization areas corresponding to the effective speckle points to obtain first ellipse areas corresponding to the effective speckle points.
In the concrete implementation, after the server obtains the binarization areas corresponding to the effective speckle points, the server can respectively perform Gaussian blur and ellipse fitting on the binarization areas corresponding to the effective speckle points to obtain first ellipse areas corresponding to the effective speckle points, wherein the first ellipse areas corresponding to the effective speckle points are actually accurate speckle areas.
In one example, the first elliptical area corresponding to each effective speckle point in the speckle pattern can be as shown in fig. 5.
And step 404, calculating the speckle radius of the speckle pattern according to the length of the major axis of the first elliptical area corresponding to each effective speckle point, the length of the minor axis of the first elliptical area corresponding to each effective speckle point and the number of effective speckles.
Specifically, after the server obtains the first elliptical area corresponding to each effective speckle point, the server may calculate the speckle radius of the speckle pattern according to the length of the major axis of the first elliptical area corresponding to each effective speckle point, the length of the minor axis of the first elliptical area corresponding to each effective speckle point, and the number of effective speckle points.
In one example, the server may calculate the speckle radius of the speckle pattern according to the length of the major axis of the first elliptical region corresponding to each effective speckle point, the length of the minor axis of the first elliptical region corresponding to each effective speckle point, and the number of effective scattered spots by using the following formula:
Figure 838414DEST_PATH_IMAGE002
wherein G is an effective powderNumber of spots, a g Length of major axis of first elliptical region corresponding to the g-th effective speckle point, b g The length of the short axis of the first elliptical area corresponding to the g-th effective speckle point is shown, and r is the speckle radius of the speckle pattern.
And 405, if the speckle radius is larger than a preset speckle radius threshold value, determining that the quality of the speckle projector to be measured is unqualified.
In specific implementation, after the server calculates the speckle radius of the speckle pattern, it may be determined whether the speckle radius is greater than a preset speckle radius threshold, if the speckle radius is greater than the preset speckle radius threshold, it is determined that the quality detection of the speckle projector to be detected is not qualified, and if the speckle radius is less than or equal to the preset speckle radius threshold, it is determined that the quality detection of the speckle projector to be detected is qualified, and the speckle projector to be detected is allowed to leave a factory.
This embodiment, the size of the speckle that the qualified speckle projector of quality throws out of consideration is not too big with the difference of theoretical value, if the size of the speckle that the speckle projector throws out is too big, it has appeared the problem at the production, the process of assembly to show this speckle projector, can not sell by leaving the factory, this application calculates the speckle radius of the speckle pattern that the speckle projector that awaits measuring corresponds based on the ellipse is fitted, stretch the pattern that leads to diffraction optical element's characteristic and also consider, the speckle radius of calculation is scientific, accurate, thereby further promote the quality detection's of speckle projector effect, further promote the production quality of speckle projector.
In an embodiment, before obtaining the first elliptical area corresponding to each effective speckle point, the server may first perform a level segmentation on the speckle pattern according to a preset level segmentation template map to obtain each diffraction level area, and after obtaining the first elliptical area corresponding to each effective speckle point, the server may perform quality detection based on global uniformity on the speckle projector to be detected as shown in fig. 6, which specifically includes:
and step 501, determining a second elliptical area corresponding to the effective speckle point in the speckle pattern according to the first elliptical area.
In a specific implementation, the gray value of each pixel point in the first elliptical area is assigned to be 0, and the server can determine a second elliptical area corresponding to the effective speckle point in the original speckle pattern according to the coordinates of the edge position of the first elliptical area.
And 502, calculating the gray value average value of each diffraction order area according to the gray value of each pixel point in the second elliptical area corresponding to each effective speckle point in each diffraction order area.
In the specific implementation, in order to avoid the influence of each diffraction order, when the global uniformity of the speckle pattern is calculated, the gray value mean value of the whole pattern is not directly calculated, but the gray value mean value of each diffraction order region is calculated according to the gray value of each pixel point in the second elliptical region corresponding to each effective speckle point in each diffraction order region, the influence of the gray value of the pixel point in the same diffraction order region is similar, and the measure of the global uniformity based on the gray value mean value of each diffraction order region is more reasonable.
Step 503, determining a global uniformity value of the speckle pattern according to a maximum value in the gray value mean value of each diffraction order region and a minimum value in the gray value mean value of each diffraction order region.
Specifically, after the server calculates the gray value mean of each diffraction order region, the server may determine the maximum value in the gray value mean of each diffraction order region and the minimum value in the gray value mean of each diffraction order region, and then determine the global uniformity value of the speckle pattern according to the maximum value in the gray value mean of each diffraction order region and the minimum value in the gray value mean of each diffraction order region.
In one example, the server may determine the global uniformity value of the speckle pattern according to the maximum value of the mean gray value of each diffraction order region and the minimum value of the mean gray value of each diffraction order region by the following formula: u shape 1 =(I max -I min )/(I max +I min ) In the formula (I), wherein,I max is the maximum of the mean of the grey values of the diffraction order regions, I min Is the minimum value, U, of the mean of the gray values of the diffraction order regions 1 Is the global uniformity value of the speckle pattern.
And step 504, if the global uniformity value is larger than a preset global uniformity threshold value, determining that the quality of the speckle projector to be measured is unqualified.
In specific implementation, after determining the global uniformity value of the speckle pattern, the server may determine whether the global uniformity value of the speckle pattern is greater than a preset global uniformity threshold, if the global uniformity value of the speckle pattern is greater than the preset global uniformity threshold, it is determined that the quality detection of the speckle projector to be detected is unqualified, and if the global uniformity value of the speckle pattern is less than or equal to the preset global uniformity threshold, it is determined that the quality detection of the speckle projector to be detected is qualified, wherein the preset global uniformity threshold may be set by a person skilled in the art according to actual needs.
In one example, the preset global uniformity threshold may be set to 0.4.
The embodiment redefines the global uniformity of the image, determines the global uniformity not based on each pixel point in the speckle pattern, calculates the global uniformity only according to the pixel points in the speckle region, divides the diffraction orders of the speckle pattern in advance, avoids the edge diffraction orders from generating large influence on the calculation of the global uniformity, weakens the mutual influence among different diffraction orders, calculates the global uniformity value more scientifically and reasonably, and further improves the production quality of the speckle projector.
In an embodiment, after determining the second elliptical area corresponding to the effective speckle point in the speckle pattern according to the first elliptical area, the server may perform quality detection based on local uniformity on the speckle projector to be detected as shown in fig. 7 at the same time, which specifically includes:
step 601, calculating the mean value and variance of the gray values of the zero-order diffraction region according to the gray values of the pixel points in the second elliptical region corresponding to the effective speckle points in the zero-order diffraction region.
Step 602, determining a local uniformity value of the speckle pattern according to the gray value mean value and the gray value variance of the zero-order diffraction region.
In specific implementation, after the server determines the second elliptical area corresponding to the effective speckle point in the speckle pattern according to the first elliptical area, the server can calculate the gray value mean value and the gray value variance of the zero-order diffraction area according to the gray value of each pixel point in the second elliptical area corresponding to each effective speckle point in the zero-order diffraction area, then determine the local uniformity value of the speckle pattern according to the gray value mean value and the gray value variance of the zero-order diffraction area, the quality of the zero-order diffraction area is the highest, and the zero-order diffraction area is selected to determine that the local uniformity is more scientific and reasonable.
In one example, the server may determine the local uniformity value of the speckle pattern from the mean and variance of the gray values of the zero-order diffraction region by the following formula: u shape 2 =(3* I std )/ I avg In the formula I avg Mean value of gray values in zero-order diffraction region, I std Variance of gray values, U, for zero-order diffraction regions 2 Is the local uniformity value of the speckle pattern.
Step 603, if the local uniformity value is greater than a preset local uniformity threshold value, determining that the quality of the speckle projector to be measured is unqualified.
In specific implementation, after determining the local uniformity value of the speckle pattern, the server may determine whether the local uniformity value of the speckle pattern is greater than a preset local uniformity threshold, if the local uniformity value of the speckle pattern is greater than the preset local uniformity threshold, it is determined that the quality detection of the speckle projector to be detected is unqualified, and if the local uniformity value of the speckle pattern is less than or equal to the preset local uniformity threshold, it is determined that the quality detection of the speckle projector to be detected is qualified, wherein the preset local uniformity threshold may be set by a person skilled in the art according to actual needs.
In one example, the preset local uniformity threshold may be set to 0.45.
The local uniformity of the image is redefined, the quality of a zero-order diffraction area in the speckle pattern, namely the quality of the center-most area, is the highest, and if the quality of the zero-order diffraction area is poor, the quality of the speckle projector can be judged to be unqualified.
In an embodiment, the preset level division template map includes a plurality of quadrangles, each quadrangle corresponds to a diffraction level region, the diffraction level regions corresponding to different quadrangles are different, the middle quadrangle in the level division template map corresponds to a zero-order diffraction region, the server performs level division on the speckle pattern according to the preset level division template map to obtain each diffraction level region, and the method may be implemented by the steps shown in fig. 8, and specifically includes:
and 701, respectively determining the homonymy points of the centroid points of the quadrangles in the level segmentation template picture in the speckle picture according to a preset matching algorithm.
In a specific implementation, when the server performs the level segmentation on the speckle pattern, the server firstly determines the homonymous points of the centroid points of the quadrilaterals in the level segmentation template pattern in the speckle pattern according to a preset matching algorithm, and the preset matching algorithm can be an SAD matching algorithm, a ZNCC matching algorithm, an NCC matching algorithm and the like.
In one example, the predetermined level segmentation template map may be as shown in FIG. 9.
And step 702, calculating a homography transformation matrix between the grade segmentation template picture and the speckle picture according to the coordinates of the mass center points of the quadrangles and the coordinates of the same-name points of the mass center points of the quadrangles in the speckle picture.
In a specific implementation, considering that a speckle pattern obtained by infrared lens shooting has different rotation transformation, translation transformation and perspective transformation compared with a level segmentation template pattern, a server needs to perform corresponding rotation transformation, translation transformation and perspective transformation on the level segmentation template pattern to perform level segmentation, and the server calculates a homography transformation matrix between the level segmentation template pattern and the speckle pattern according to coordinates of center of mass points of each quadrangle and coordinates of same-name points of the center of mass points of each quadrangle in the speckle pattern, wherein the homography transformation matrix comprises a translation matrix, a rotation matrix and a perspective transformation matrix.
And 703, determining coordinates of the corner points of each quadrangle at the same-name points in the speckle pattern according to the coordinates of the corner points of each quadrangle and the homographic transformation matrix.
And step 704, obtaining each diffraction order area of the speckle pattern according to coordinates of the corner points of each quadrangle on the same-name points in the speckle pattern.
In the specific implementation, the server performs corresponding rotation transformation, translation transformation and perspective transformation on the corner points of each quadrangle according to the coordinates of the corner points of each quadrangle and the homographic transformation matrix, so as to determine the coordinates of the homographic points of the corner points of each quadrangle in the speckle pattern, and connects the coordinates of the homographic points of the corner points of each quadrangle in the speckle pattern, so that each diffraction order region of the speckle pattern can be obtained.
In this embodiment, considering that the speckle pattern obtained by infrared lens shooting may have different rotation transformation, translation transformation, and perspective transformation compared with the level division template pattern, the homography transformation matrix is solved before division, that is, the inverse rotation transformation, the inverse translation transformation, and the inverse perspective transformation are performed, so as to improve the precision of diffraction level region division.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
Another embodiment of the present application relates to an electronic device, as shown in fig. 10, including: at least one processor 801; and a memory 802 communicatively coupled to the at least one processor 801; the memory 802 stores instructions executable by the at least one processor 801, and the instructions are executed by the at least one processor 801 to enable the at least one processor 801 to perform the quality detection method of the speckle projector in the above embodiments.
Where the memory and processor are connected by a bus, the bus may comprise any number of interconnected buses and bridges, the buses connecting together one or more of the various circuits of the processor and the memory. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, etc., which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor is transmitted over a wireless medium via an antenna, which further receives the data and transmits the data to the processor.
The processor is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the memory may be used to store data used by the processor in performing operations.
Another embodiment of the present application relates to a computer-readable storage medium storing a computer program. The computer program realizes the above-described method embodiments when executed by a processor.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the present application, and that various changes in form and details may be made therein without departing from the spirit and scope of the present application in practice.

Claims (9)

1. A method of quality inspection of a speckle projector, comprising:
sequentially taking all pixel points in the acquired speckle pattern as reference points, and taking all pixel points in a preset first window taking the reference points as centers as points to be matched; the speckle pattern is obtained by shooting speckles projected to a target plane by a speckle projector to be detected through a preset infrared lens;
calculating the matching cost value of each point to be matched according to the gray value of each point to be matched, a preset template graph and a preset matching algorithm, and determining the point to be matched with the minimum matching cost value as a scattered spot;
calculating the gray value mean value of the speckle pattern according to the gray value of each speckle in the speckle pattern, and screening the speckle points of which the gray value is greater than the product of the gray value mean value of the speckle pattern and a preset coefficient as effective speckle;
if the ratio of the number of the effective scattered spots to the total number of the scattered spots is smaller than a preset effective threshold value, determining that the quality of the speckle projector to be detected is unqualified;
the determining the point to be matched with the minimum matching cost value as a scattered spot includes:
judging whether the point to be matched with the minimum matching cost value is the reference point or not;
if the point to be matched with the minimum matching cost value is not the reference point, directly abandoning the point to be matched with the minimum matching cost value;
if the point to be matched with the minimum matching cost value is the reference point, continuously judging whether the matching cost value of the reference point is smaller than a preset cost threshold value;
if the matching cost value of the reference point is smaller than the cost threshold value, determining the reference point as a scattered spot;
if the matching cost value of the datum point is greater than or equal to the cost threshold, the datum point is discarded.
2. The method as claimed in claim 1, wherein the predetermined matching algorithm includes NCC matching algorithm, the template map is a gaussian kernel function template map, the template maps are several, and the calculating the matching cost value of each point to be matched according to the gray value of each point to be matched, the predetermined template map and the predetermined matching algorithm includes:
determining a target template map corresponding to the speckle pattern in a plurality of template maps according to the size of the speckle pattern;
traversing each point to be matched, and calculating the matching cost value of the current point to be matched according to the gray value of each pixel point in a second window taking the current point to be matched as the center, the mean value of the gray values corresponding to the second window, the gray value of each pixel point in the target template picture and the mean value of the gray values of the target template picture; wherein the size of the second window is the same as the size of the target template map.
3. The quality inspection method for speckle projector as claimed in claim 2, wherein the matching cost value of the current point to be matched is calculated according to the gray value of each pixel point in the second window centered on the current point to be matched, the mean value of the gray values corresponding to the second window, the gray value of each pixel point in the target template map, and the mean value of the gray values of the target template map by the following formula:
Figure 13725DEST_PATH_IMAGE001
wherein M is the width of the second window, N is the height of the second window, I (x + I, y + j) is the gray value of a point (x + I, y + j) in the second window centered on the point (x, y) to be matched, I (x + I, y + j) is the gray value of a point in the second window ave The gray value mean value corresponding to the second window is T (i, j) is the gray value of the point (i, j) in the target template graph, T ave And the NCC (x, y) is the mean value of the gray values of the target template graph and the matching cost value of the point (x, y) to be matched.
4. The method for quality inspection of a speckle projector as claimed in any one of claims 1 to 3, wherein after the speckle points having a gray value greater than the product of the mean gray value of the speckle pattern and a preset coefficient are screened as valid speckle points, the method further comprises:
sequentially taking each effective scattered spot as a binarization central point, and calculating a gray value average value corresponding to a preset third window with the binarization central point as a center;
assigning the gray value of the pixel point of which the gray value in the third window is smaller than the mean gray value corresponding to the third window to be 0, and assigning the gray value of the pixel point of which the gray value in the third window is larger than or equal to the mean gray value corresponding to the third window to be 1 to obtain a binarization area corresponding to each effective speckle point;
respectively carrying out Gaussian blur and ellipse fitting on the binarization areas corresponding to the effective speckle points to obtain first ellipse areas corresponding to the effective speckle points;
calculating the speckle radius of the speckle pattern according to the length of the long axis of the first elliptical area corresponding to each effective speckle point, the length of the short axis of the first elliptical area corresponding to each effective speckle point and the number of the effective speckles;
and if the speckle radius is larger than a preset speckle radius threshold value, determining that the quality of the speckle projector to be measured is unqualified.
5. The method of claim 4, further comprising, before the obtaining the first elliptical area corresponding to each effective speckle point:
carrying out level segmentation on the speckle pattern according to a preset level segmentation template pattern to obtain each diffraction level area;
after obtaining the first elliptical area corresponding to each effective speckle point, the method further includes:
determining a second elliptical area corresponding to the effective speckle point in the speckle pattern according to the first elliptical area;
calculating the mean value of the gray values of the diffraction order areas according to the gray values of the pixel points in the second elliptical area corresponding to the effective speckle points in the diffraction order areas;
determining a global uniformity value of the speckle pattern according to the maximum value in the gray value mean values of the diffraction order regions and the minimum value in the gray value mean values of the diffraction order regions;
and if the global uniformity value is larger than a preset global uniformity threshold value, determining that the quality of the speckle projector to be detected is unqualified.
6. The method of claim 4, further comprising, after determining a second elliptical area corresponding to the valid speckle point in the speckle pattern from the first elliptical area, the step of:
calculating the mean value and variance of the gray values of the zero-order diffraction region according to the gray values of all pixel points in a second elliptical region corresponding to all effective speckle points in the zero-order diffraction region;
determining a local uniformity value of the speckle pattern according to the gray value mean value and the gray value variance of the zero-order diffraction region;
and if the local uniformity value is larger than a preset local uniformity threshold value, determining that the quality of the speckle projector to be detected is unqualified.
7. The quality detection method for the speckle projector as claimed in claim 4, wherein the preset order division template map comprises a plurality of quadrangles, each quadrangle corresponds to a diffraction order region, the diffraction order regions corresponding to different quadrangles are different, the middle quadrangle in the order division template map corresponds to a zero-order diffraction region, and the speckle pattern is divided in order according to the preset order division template map to obtain each diffraction order region, comprising:
respectively determining the homonymy points of the centroid points of all the quadrangles in the level segmentation template graph in the speckle pattern according to a preset matching algorithm;
calculating a homography transformation matrix between the level segmentation template map and the speckle pattern according to the coordinates of the centroid points of the quadrangles and the coordinates of the homonymous points of the centroid points of the quadrangles in the speckle pattern;
determining coordinates of the corner points of the quadrangles at the same-name points in the speckle pattern according to the coordinates of the corner points of the quadrangles and the homographic transformation matrix;
and obtaining each diffraction order area of the speckle pattern according to the coordinates of the corner points of each quadrangle at the same-name points in the speckle pattern.
8. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of quality detection of a speckle projector as claimed in any one of claims 1 to 7.
9. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method of quality detection for a speckle projector of any of claims 1 to 7.
CN202211373238.XA 2022-11-04 2022-11-04 Quality detection method for speckle projector, electronic device, and storage medium Active CN115423808B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211373238.XA CN115423808B (en) 2022-11-04 2022-11-04 Quality detection method for speckle projector, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211373238.XA CN115423808B (en) 2022-11-04 2022-11-04 Quality detection method for speckle projector, electronic device, and storage medium

Publications (2)

Publication Number Publication Date
CN115423808A CN115423808A (en) 2022-12-02
CN115423808B true CN115423808B (en) 2023-03-24

Family

ID=84208188

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211373238.XA Active CN115423808B (en) 2022-11-04 2022-11-04 Quality detection method for speckle projector, electronic device, and storage medium

Country Status (1)

Country Link
CN (1) CN115423808B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115546220B (en) * 2022-12-05 2023-03-31 合肥的卢深视科技有限公司 Quality detection method and system for speckle projector, electronic device and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6970606B2 (en) * 2002-01-16 2005-11-29 Eastman Kodak Company Automatic image quality evaluation and correction technique for digitized and thresholded document images
CN104864819B (en) * 2015-01-19 2017-08-01 华中科技大学 A kind of high speed three-dimensional strain measurement method based on digital speckle
CN109461181B (en) * 2018-10-17 2020-10-27 北京华捷艾米科技有限公司 Depth image acquisition method and system based on speckle structured light
CN111311667B (en) * 2020-02-14 2022-05-17 苏州浪潮智能科技有限公司 Content self-adaptive binocular matching method and device
CN113012143B (en) * 2021-04-02 2022-11-04 重庆邮电大学 Test piece quality detection method based on two-dimensional digital image correlation method
CN114283089B (en) * 2021-12-24 2023-01-31 合肥的卢深视科技有限公司 Jump acceleration based depth recovery method, electronic device, and storage medium
CN114332014B (en) * 2021-12-29 2024-05-24 合肥瑞识智能科技有限公司 Projector quality evaluation method, projector quality evaluation device, projector quality evaluation equipment and storage medium
CN114862779A (en) * 2022-04-25 2022-08-05 合肥的卢深视科技有限公司 Image quality evaluation method, electronic device, and storage medium
CN114913175B (en) * 2022-07-18 2022-12-16 合肥的卢深视科技有限公司 Speckle image quality evaluation method, electronic device, and storage medium

Also Published As

Publication number Publication date
CN115423808A (en) 2022-12-02

Similar Documents

Publication Publication Date Title
JP6795993B2 (en) Shape measurement system, shape measurement device and shape measurement method
TWI412735B (en) Optical inspection of test surfaces
US9007602B2 (en) Three-dimensional measurement apparatus, three-dimensional measurement method, and computer-readable medium storing control program
US10430962B2 (en) Three-dimensional shape measuring apparatus, three-dimensional shape measuring method, and storage medium that calculate a three-dimensional shape of an object by capturing images of the object from a plurality of directions
US10078907B2 (en) Distance measurement apparatus, distance measurement method, and storage medium
CN108846837B (en) Object surface defect detection method and device
CN115423808B (en) Quality detection method for speckle projector, electronic device, and storage medium
CN113176270B (en) Dimming method, device and equipment
CN114255233A (en) Speckle pattern quality evaluation method and device, electronic device and storage medium
US11709110B2 (en) Method for detecting a defect in a zone of interest of an optical lens
CN115225820A (en) Automatic shooting parameter adjusting method and device, storage medium and industrial camera
CN111601097B (en) Binocular stereo matching method, device, medium and equipment based on double projectors
US8102516B2 (en) Test method for compound-eye distance measuring apparatus, test apparatus, and chart used for the same
CN113379816B (en) Structure change detection method, electronic device, and storage medium
CN115103124A (en) Active alignment method for camera module
CN111669573A (en) Motor stability detection method and device
US11711500B1 (en) Systems and methods for calibrating display systems
CN115442591B (en) Camera quality testing method, system, electronic device and storage medium
CN116773457B (en) Polarization measurement method, system, equipment and medium based on Stokes parameters
CN115546220B (en) Quality detection method and system for speckle projector, electronic device and storage medium
CN113891068B (en) Optical axis precision detection method based on camera uniformity test auxiliary device
KR102242202B1 (en) Apparatus and Method for camera calibration
CN115854910A (en) Method, system, electronic device and storage medium for calibrating position of target object
CN115546102A (en) Speckle extraction method, device, electronic device and storage medium
CN117647885A (en) Light source design and production method and device of optical system and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230828

Address after: Room 799-4, 7th Floor, Building A3A4, Zhong'an Chuanggu Science and Technology Park, No. 900 Wangjiang West Road, Gaoxin District, Hefei Free Trade Experimental Zone, Anhui Province, 230031

Patentee after: Anhui Lushenshi Technology Co.,Ltd.

Address before: 230091 room 611-217, R & D center building, China (Hefei) international intelligent voice Industrial Park, 3333 Xiyou Road, high tech Zone, Hefei, Anhui Province

Patentee before: Hefei lushenshi Technology Co.,Ltd.