WO2021087692A1 - 散斑图像匹配方法、装置及存储介质 - Google Patents

散斑图像匹配方法、装置及存储介质 Download PDF

Info

Publication number
WO2021087692A1
WO2021087692A1 PCT/CN2019/115435 CN2019115435W WO2021087692A1 WO 2021087692 A1 WO2021087692 A1 WO 2021087692A1 CN 2019115435 W CN2019115435 W CN 2019115435W WO 2021087692 A1 WO2021087692 A1 WO 2021087692A1
Authority
WO
WIPO (PCT)
Prior art keywords
speckle
matching
matched
image
preset
Prior art date
Application number
PCT/CN2019/115435
Other languages
English (en)
French (fr)
Inventor
毛一杰
刘川熙
詹洁琼
Original Assignee
深圳市汇顶科技股份有限公司
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 深圳市汇顶科技股份有限公司 filed Critical 深圳市汇顶科技股份有限公司
Priority to CN201980002726.XA priority Critical patent/CN113168681A/zh
Priority to PCT/CN2019/115435 priority patent/WO2021087692A1/zh
Publication of WO2021087692A1 publication Critical patent/WO2021087692A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis

Definitions

  • the embodiments of the present application relate to the field of image processing technology, and in particular, to a speckle image matching method, device, and storage medium.
  • a camera device is used to photograph a target object to obtain a two-dimensional image
  • a projector is used to obtain a speckle image of the target object
  • the speckle image of the target object is processed to obtain the pixel points in the two-dimensional image.
  • Depth information to construct a three-dimensional image In the process of determining the depth information through the speckle image of the target object, the speckle image of the target object is locally matched with the preset speckle image. After the local matching is successful, the local area is in the speckle image of the target object. The offset of the position relative to the position in the preset speckle image can determine the depth of the center point of the local area.
  • the local area matching process if the local area is too small, the matching result is not accurate enough. If the local area is too large, the matching may not succeed, resulting in mismatching or missing matching.
  • one of the technical problems solved by the embodiments of the present application is to provide a speckle image matching method, device, and storage medium to overcome the defects in the prior art that speckle image matching easily leads to mismatching and missing matching .
  • an embodiment of the present application provides a speckle image matching method, including:
  • the pre-matching result of the first speckle is adjusted, and the pre-matching result indicates that the first speckle is performed 0 times
  • the pre-matching result indicates the pre-matched speckles that are successfully pre-matched with the first speckles, and the confidence level between the first speckles and the pre-matched speckles;
  • the pre-matching result of the first speckle indicates that the confidence between the first speckle and the pre-matched speckle is greater than or equal to the preset reliability
  • the first speckle and the pre-matched speckle are marked as successfully matched speckles Correct.
  • the single-step matching of the first speckle in the target speckle image with the speckle in the preset speckle image includes:
  • the matching range corresponding to the first speckle is determined in the preset speckle image; the first speckle is matched with the speckle in the matching range in a single step.
  • the single-step matching of the first speckle with the speckles in the matching range includes:
  • the number of speckles corresponding to the positions in the first area and the second area is greater than or equal to the preset number, it is determined that the first speckle and the second speckle are successfully matched in a single step.
  • the single-step matching of the first speckle in the target speckle image with the speckle in the preset speckle image includes:
  • the fourth speckle is a pair of speckles with successful mark matching
  • adjusting the pre-matching result of the first speckle includes:
  • the confidence between the first speckle and the pre-matched speckle is increased by a step length.
  • adjusting the pre-matching result of the first speckle includes:
  • the second speckle is determined as the pre-matched speckle, and the confidence between the first speckle and the pre-matched speckle is increased The second step length.
  • adjusting the pre-matching result of the first speckle includes:
  • the second speckle is determined as the pre-matched speckle. Match the speckle and increase the confidence between the first speckle and the pre-matched speckle by a third step.
  • adjusting the pre-matching result of the first speckle includes:
  • the pre-matching result of the first speckle indicates that the pre-matched speckle is different from the second speckle, and the confidence of the first speckle and the pre-matched speckle is greater than the second threshold, the first speckle and the pre-matched speckle are combined
  • the confidence between is reduced by the fourth step.
  • the single-step matching of the first speckle in the target speckle image with the speckle in the preset speckle image includes:
  • the matrix elements in the target speckle matrix are matched with the matrix elements in the preset speckle matrix in a single step.
  • determining the target speckle matrix of the target speckle image according to the target speckle image includes:
  • the matrix element corresponding to the position of the speckle in the target speckle image is set to 1, and the remaining matrix elements are set to 0.
  • determining the preset speckle matrix of the preset speckle image according to the preset speckle image includes:
  • the matrix element corresponding to the position of the speckle in the preset speckle image is set to 1
  • the matrix element within the preset range of the matrix element corresponding to the position of the speckle is set to 1
  • the remaining matrices The element is set to 0.
  • an embodiment of the present application provides a speckle image matching device, including: a pre-matching module, a result processing module, and a speckle matching module;
  • the pre-matching module is used for single-step matching the first speckle in the target speckle image with the speckle in the preset speckle image;
  • the result processing module is used to adjust the pre-matching result of the first speckle after the first speckle in the target speckle image is successfully matched with the second speckle in the preset speckle image, and the pre-matching result indicates the first speckle
  • the matching result of a scatter spot after 0 times or at least one single-step matching indicates the pre-matched spot that is successfully pre-matched with the first spot, and the confidence level between the first spot and the pre-matched spot ;
  • the speckle matching module is used to combine the first speckle with the pre-matched speckle when the pre-matching result of the first speckle indicates that the confidence between the first speckle and the pre-matched speckle is greater than or equal to the preset reliability A pair of scattered spots marked as a successful match.
  • an embodiment of the present application provides an electronic device, including: at least one processor and a memory, and at least one processor and the memory are electrically connected;
  • Memory for storing at least one program
  • an embodiment of the present application provides a storage medium, characterized in that a computer program is stored on the storage medium, and when the processor executes the computer program, the implementation is as described in the first aspect or any one of the embodiments of the first aspect. Described method.
  • the first speckle in the target speckle image is matched with the speckle in the preset speckle image in a single step, and the pre-matching of the speckle in the target speckle image is adjusted according to the result of the single step matching.
  • the confidence is greater than or equal to the preset confidence, it is determined which speckle in the target speckle image matches with which speckle in the preset speckle image, and the speckles are fully pre-matched.
  • adjust the pre-matching results and then determine the matching speckles according to the final pre-matching results, reducing the impact of too large or too small local areas on the matching results, and improving the accuracy and success rate of speckle image matching.
  • FIG. 1 is a flowchart of a speckle image matching method in Embodiment 1 of this application;
  • FIG. 2 is a schematic diagram of a speckle image provided by an embodiment of the application.
  • FIG. 3 is a schematic diagram of a speckle matrix diffusion effect provided by an embodiment of the application.
  • FIG. 4 is a schematic diagram of another speckle matrix diffusion effect provided by an embodiment of the application.
  • FIG. 5 is a schematic diagram of a matching effect provided by an embodiment of the application.
  • FIG. 6 is a structural diagram of a speckle image matching device provided by an embodiment of the application.
  • FIG. 7 is a structural diagram of an electronic device provided by an embodiment of the application.
  • FIG. 1 is a flowchart of a speckle image matching method provided by an embodiment of the present application.
  • the speckle image matching method includes the following steps:
  • Step 101 Perform a single-step matching of the first speckle in the target speckle image with the speckle in the preset speckle image.
  • the target speckle image is any speckle image to be matched.
  • target is only used to indicate a singular number and is not used to make any limitation.
  • the preset speckle image is a reference image used to match the target speckle image.
  • the speckle projector projects a plane at a preset distance to obtain a preset speckle image, and for each speckle projector, the speckle distribution in the obtained speckle image has Certain characteristics, for the speckle images collected by the same speckle projector for different objects, the local speckle distribution is similar.
  • the target speckle image and the preset speckle image can be converted into a speckle matrix, and then the speckle matrix is used as the basis for matching.
  • the single-step matching of the first speckle in the target speckle image with the speckle in the preset speckle image includes:
  • determining the target speckle matrix of the target speckle image according to the target speckle image includes:
  • the matrix element corresponding to the position of the speckle in the target speckle image is set to 1, and the rest of the matrix elements are set to 0.
  • an image point in the target speckle image corresponds to a matrix element in the target speckle matrix
  • an image point in the preset speckle image corresponds to a matrix element in the preset speckle matrix
  • the image point can be a pixel point or an image area formed by at least two pixel points.
  • a pixel point can correspond to an array element in an image sensor array (an array element can be a photodiode). This application There is no restriction on this. Taking the image point as a pixel point as an example, for example, if the target speckle image is an image of m ⁇ n pixels, the target speckle matrix is a matrix with a size of m ⁇ n.
  • determining the preset speckle matrix of the preset speckle image according to the preset speckle image includes:
  • the matrix element corresponding to the position of the speckle in the preset speckle image is set to 1
  • the matrix element within the preset range of the matrix element corresponding to the position of the speckle is set to 1
  • the remaining matrices The element is set to 0.
  • Figure 2 is a schematic diagram of a speckle image provided by an embodiment of the application.
  • a white dot in the speckle image is a speckle.
  • the matrix element corresponding to the position of the speckle is set to 1, and the rest of the matrix elements are Set to 0.
  • the matrix elements around the speckles can also be set to 1, to improve the tolerance for speckle changes.
  • the single-step matching of the first speckle in the target speckle image with the speckle in the preset speckle image includes:
  • the matching range corresponding to the first speckle is determined in the preset speckle image; the first speckle is matched with the speckle in the matching range in a single step.
  • the matching range corresponding to the first speckle is the range of points that are preliminarily determined in the preset speckle image to match the first speckle.
  • the matching range may be preset, for example, the first speckle
  • the position in the target speckle image is (a, b), then the area from line (ak) to line (a+k) in the preset speckle image is used as the matching range, and k can be 3 or 5 or 10. Etc., this is only an exemplary description, and this application does not limit it.
  • the single-step matching of the first speckle with the speckles in the matching range includes:
  • the first area around the first speckle is determined according to the first speckle
  • the second area around the second speckle is determined according to the second speckle.
  • the second speckle is the speckle in the preset speckle image
  • the second speckle is the speckle in the preset speckle image.
  • the spots are in the matching range; when the number of speckles corresponding to the positions in the first area and the second area is greater than or equal to the preset number, it is determined that the first speckle and the second speckle are successfully matched in a single step.
  • the first area around the first speckle spot is matched with the second area around the second speckle spot.
  • the first area around the first speckle refers to a point whose distance from the first speckle is less than or equal to the first distance, or the first area around the first speckle refers to
  • the first speckle is an area with a preset shape and a preset size with the first speckle as the reference point (for example, taking the first speckle as the center).
  • the first area may be a square area with the first speckle as the center, which may be A square area with a size of 19 ⁇ 19, that is, a square area with a number of image points of 19 rows ⁇ 19 columns and a center of the first speckle can also be a size of 35 ⁇ 35, which is not limited in this application.
  • the second area and the first area are arranged in the same manner, and the second area can be different in size from the first area or the same size, which is not limited in this application.
  • the first area and the second area have the same size.
  • the first area and the second area are both 19 ⁇ 19 square areas, and the coordinates of the image points in the first area may be the image The number of rows and columns of the point in the first area.
  • Each image point in the first area has a corresponding image point in the second area. If the two image points in the first area and the second area correspond to the positions And both are speckles, then these two speckles are regarded as a speckle pair. If the number of speckle pairs in the first area and the second area is greater than or equal to the preset number, then the first speckle and the second speckle The single-step matching is successful.
  • the single-step matching of the first speckle in the target speckle image with the speckle in the preset speckle image includes:
  • the pair of speckles with successful mark matching includes two speckles with successful mark matching, one is the speckle with successful mark matching in the target speckle image, and the other is the speckle with successful mark matching in the pre-matched speckle image. spot.
  • the third speckle and the fourth speckle are pairs of speckles that have successfully marked matching, that is, the pre-matching result of the third speckle indicates the confidence level between the third speckle and the fourth speckle. Greater than or equal to the preset reliability.
  • the third area around the third speckle spot and the fourth area around the fourth speckle spot are determined.
  • the third area and the fourth area can be determined in the same manner as the first area.
  • the third area and the fourth area may have the same size.
  • the third area and the fourth area are both 19 ⁇ 19 square areas, and the positions in the third area and the fourth area are corresponding and both scattered. The two image points of the spot confirm that the single-step matching is successful.
  • the first speckle and the second speckle are both speckles, and the position of the first speckle in the third area corresponds to the position of the second speckle in the fourth area, then the first speckle and the second speckle
  • the single-step matching is successful.
  • the position of the first speckle in the third area is (6,6), that is, the first speckle is located in the sixth row and sixth column in the third area
  • the position of the second speckle in the fourth area is also (6,6), it is determined that the first speckle and the second speckle are successfully matched in a single step.
  • first implementation manner and the second implementation manner here are two different pre-matching manners, which can be used in combination or separately, and this application does not limit this.
  • Step 102 After the first speckle in the target speckle image is successfully matched with the second speckle in the preset speckle image, adjust the pre-matching result of the first speckle.
  • the pre-matching result indicates the matching result of the first speckle spot after zero or at least one single-step matching. Specifically, if the first scatter spot has not undergone single-step matching, the pre-matching result is empty; if the first scatter spot has been single-step matched at least once, the pre-matching result indicates the matching after at least one single-step matching As a result, after each single-step matching, the pre-matching result will be updated according to the result of the single-step matching.
  • the matching process between the target speckle image and the preset speckle image may be referred to as a pre-matching process, and the pre-matching process may include at least one single-step matching process. For a speckle, taking the first speckle as an example, the first speckle can be single-step matched at least once. After each single-step matching, the pre-matching of the first speckle is adjusted according to the result of the single-step matching. result.
  • the pre-matching result indicates the pre-matched speckles that are successfully pre-matched with the first speckles, and the confidence level between the first speckles and the pre-matched speckles.
  • four examples are listed to specifically illustrate how to adjust the pre-matching result when the first speckle and the second speckle are successfully matched in a single step.
  • adjusting the pre-matching result of the first speckle includes:
  • the confidence between the first speckle and the pre-matched speckle is increased by a step length.
  • the confidence between two speckles is used to indicate the accuracy of the matching of the two speckles. The higher the confidence, the more accurate the two speckles are matched. If pre-matching The result indicates that the pre-matched speckle is the second speckle. This time the first speckle and the second speckle are matched again in a single step, indicating that the matching accuracy of the first speckle and the second speckle is greater, so , Increase the confidence between the first speckle and the second speckle by a step length.
  • adjusting the pre-matching result of the first speckle includes:
  • the second speckle is determined as the pre-matched speckle, and the confidence between the first speckle and the pre-matched speckle is increased The second step length.
  • the pre-matching result indicates that the first speckle has no pre-matched speckles, it means that the successful single-step matching of the first speckle and the second speckle is the first single-step matching of the first speckle. You can change the second speckle.
  • the spot is used as a pre-matched scatter, and the confidence is increased by a second step. When there is no pre-matched scatter, the confidence is 0, and the second step can be the initial value of the confidence.
  • adjusting the pre-matching result of the first speckle includes:
  • the second speckle is determined as the pre-matched speckle. Match the speckle and increase the confidence between the first speckle and the pre-matched speckle by a third step.
  • the pre-matched speckle is not the second speckle, it means that the first speckle has been successfully matched with other speckles in a single step, and the confidence is less than or equal to the first threshold, indicating that there is a gap between the first speckle and the pre-matched speckle.
  • the accuracy of the first and second speckles is not high, and the successful single-step matching of the first and second speckles can also prove that the previous pre-matching results are not accurate. Therefore, the pre-matching of the first and pre-matched speckles
  • the matching result is invalidated, the second speckle is used as a new pre-matched speckle, and the confidence between the first speckle and the second speckle is increased by a third step.
  • the third step can be equal to the second , Or the third step length can be smaller than the second step length.
  • adjusting the pre-matching result of the first speckle includes:
  • the pre-matching result of the first speckle indicates that the pre-matched speckle is different from the second speckle, and the confidence of the first speckle and the pre-matched speckle is greater than the second threshold, the first speckle and the pre-matched speckle are combined
  • the confidence between is reduced by the fourth step.
  • the pre-matched speckle is not the second speckle, and the confidence is greater than the second threshold, it means that the accuracy of the match between the first speckle and the pre-matched speckle is relatively high, and this time the first and second speckles
  • the successful single-step matching of the speckles may be because the matching is not accurate, or the previous matching is not very accurate. At this time, the previous pre-matched speckles are not changed, and the gap between the first speckle and the pre-matched speckles is reduced.
  • the confidence level of can be further adjusted in the subsequent matching process to determine the final result.
  • first step length, the second step length, the third step length and the fourth step length may be the same or different.
  • first”, “second”, “third”, “Fourth” is only used for distinction, not for any limitation.
  • adjusting the pre-matching result and the two pre-matching methods in step 101 can be used in combination, and different pre-matching methods can correspond to different step sizes.
  • the increased first step length may be the same or different from the second step length increased after the single-step matching through the second implementation method. This application does not limit this.
  • Step 103 When the pre-matching result of the first speckle indicates that the confidence between the first speckle and the pre-matched speckle is greater than or equal to the preset reliability, mark the first speckle and the pre-matched speckle as a successful match The speckled pairs.
  • the confidence is greater than or equal to the preset confidence, it indicates that the matching accuracy of the first speckle and the pre-matched speckle is relatively high, and the first speckle and the pre-matched speckle can be formally marked as a successfully matched pair of speckles.
  • a single-step matching can be performed according to the pre-matching mode of the first speckle, and finally a speckle that matches each speckle in the preset speckle image is determined.
  • the first speckle in the target speckle image is matched with the speckle in the preset speckle image in a single step, and the pre-matching of the speckle in the target speckle image is adjusted according to the result of the single step matching.
  • the confidence is greater than or equal to the preset confidence, it is determined which speckle in the target speckle image matches with which speckle in the preset speckle image, and the speckles are fully pre-matched.
  • adjust the pre-matching results and then determine the matching speckles according to the final pre-matching results, reducing the impact of too large or too small local areas on the matching results, and improving the accuracy and success rate of speckle image matching.
  • the second embodiment of the present application uses a specific application scenario as an example to describe in detail the specific implementation process of the speckle image matching method.
  • the matrix element corresponding to the spot position in the target speckle image is set to 1, and the remaining matrix elements are set to 0, and the matrix M corresponding to the target speckle image is obtained as the target speckle matrix.
  • Set the matrix element corresponding to the spot position in the preset speckle image to 1, and set the rest of the matrix elements to 0 to obtain matrix C. Perform the first expansion of matrix C.
  • FIG. 3 is a schematic diagram of the diffusion effect of a speckle matrix provided by an embodiment of the application.
  • FIG. 3 is a schematic diagram of the diffusion effect of a speckle matrix provided by an embodiment of the application.
  • FIG. 3 is only an exemplary illustration, and does not mean that the application is limited to this.
  • Each matrix element in the matrix C 2 represents the index value of the scattered spot coordinates.
  • the coordinates of each scattered spot in the preset speckle image are stored, and each piece of stored information is assigned an index. Value, the coordinates of the corresponding speckle can be obtained according to the index value.
  • Carry out the second expansion of matrix C For points whose value is not 0, diffuse to adjacent points, with a diffusion radius less than 1/3 of the dot pitch (the distance between two adjacent speckle spots), and save the diffused matrix C 2 .
  • FIG. 4 is a schematic diagram of another speckle matrix diffusion effect provided by an embodiment of the application.
  • C 3 and matrix C 4 as auxiliary matrices.
  • the sizes of matrix C 3 and matrix C 4 are the same as C 1 and C 2 and all values are 0.
  • C 3 is used to record the confidence of the speckle corresponding to the position (can Represents the number of successful single-step matching)
  • C 4 is used to record the index value of the pre-matched speckle of the speckle corresponding to the position.
  • Flag is set matrix C 5, C 5 same matrix initial value matrix M, i.e., the matrix M C 5 copy obtained, whether the recording matrix C 5 spots scattered successful match has been successfully matched point no further single step match.
  • the matrix C 5 For the pre-matching of a first implementation, the matrix C 5, all values of the points p 1 subsequent steps, in the present embodiment, the p-point as the first scattered spots, the point q as the Take two scattered spots as an example to illustrate:
  • the matching range L is calculated according to the coordinates of the point p in the matrix M. It should be noted that the matching range L is the range corresponding to the point P in the preset speckle matrix.
  • M w window is determined around the p-size matrix R ⁇ R 1 (i.e., a first region of a first embodiment of a scattered spot embodiment), calculates the value of the window 1 w n 1 is the number 1 (i.e., the first region The number of speckles); traverse the matching range L of matrix C, and perform single-step matching of all points in matrix C whose values are greater than 0 (that is, the speckles in matrix C) with p points.
  • the matching method is to take the R ⁇ R size window w 2 around the q point in the matrix C 1 (ie the second area), and calculate the corresponding positions of w 1 and w 2 that are not 0 at the same time
  • the number of points n 2 that is, the number of scattered spots corresponding to the positions in the first area and the second area
  • the matching range L if the n 2 value of the q point is greater than or equal to (n 1 -T 1 ), (n 1- T 1 ) is the preset number, and T 1 is the preset parameter, then the point p and q are successfully matched in a single step.
  • the matching range L there may be multiple points and p points that satisfy the condition that the value of n 2 is greater than or equal to (n 1 -T 1 ), and there may be no point that satisfies the value of n 2 greater than or equal to (n 1 -T 1 ), the point with the largest n 2 value can be determined as the q point and whether the single-step matching with the p point is successful.
  • comparison matrix C 4 p-point value corresponding to whether the point q in the matrix C corresponding to index value 2 are the same i.e., determining the pre-match scatter dot p point whether the point q ), if the matrix C 4 corresponding to the point p and the q value corresponding to the point C 2 in the matrix of the same index value, the value of C 3 plus matrix point p 2 (here, the first step size is 2);
  • the matrix C 3 determines the value p corresponding to the point, if the matrix C 3 corresponding to the point p is 0, previously described If point p has not been successfully matched in a single step, add 2 to the value of point p in matrix C 3 (here the second step is 2), and set the value corresponding to point p in matrix C 4 as the index value of point q; The value corresponding to point p in matrix C 3 is 1 (the confidence is less than or equal to the first threshold), indicating that the accuracy of the pre-matched speckles that is successfully pre-matched before point p is not high, and the pre-matching result can be invalidated.
  • Change matrix C 3 The value corresponding to point p in the middle is increased by 1 (here the third step is 1), and the value corresponding to point p in matrix C 4 is set to the index value of point q; if the value corresponding to point p in matrix C 3 is greater than 1 (The confidence level is greater than the second threshold.
  • the first threshold and the second threshold are equal to 1), then the value corresponding to the point p in the matrix C 3 is subtracted by 2 (here the fourth step is 2).
  • the point p 1 is regarded as the first speckle
  • the point q 1 is regarded as the second speckle
  • the point p 2 is regarded as the third speckle
  • the point q 2 is regarded as the third speckle. Speckle, give an exemplary explanation:
  • T 2 is the preset reliability
  • the value corresponding to point p 2 is set to 0 (that means that p 2 no longer needs to be matched in a single step).
  • the value corresponding to the p 2 point in the matrix M can also be set to ( 1+q 2 index value)
  • the value corresponding to point p 2 in matrix C 4 is the index value of q 2.
  • the index value starts from 0. After adding 1 to the index value, the point with the index value of 0 can be prevented from being judged as the background.
  • the surrounding speckles are matched in a single step.
  • the first implementation method can also be used to continue to perform single-step matching on the remaining speckles.
  • the confidence of each speckle can be judged, and the speckle with the confidence greater than or equal to the preset confidence can be determined as the new matched one.
  • Fig. 5 is a schematic diagram of a matching effect provided by an embodiment of the application. In Fig.
  • the black dots indicate the speckles that have been successfully matched, and the dots filled with slashes are the speckles in the pre-matching ( That is, the speckles with confidence less than the preset confidence)
  • the second implementation method is used to perform a single-step matching on the speckles around the speckles that have been marked and matched successfully, and the two speckles that have been marked and matched are radiated outward, Four speckles that have been marked for successful matching are obtained.
  • Fig. 5 is only an illustration of the matching effect and does not represent any limitation.
  • the coordinate information of the speckle can be obtained, and the offset of the position of the speckle in the target speckle image relative to the position of the matching speckle in the preset speckle image can be determined, and the point can be determined according to the offset depth.
  • the distribution of the speckle is similar in the local area. When the depth of the object surface changes, the local distribution of the speckle changes less, and the entire speckle position in this area will have an offset, according to the offset The amount to determine the depth of the site.
  • the matrix C 3 , the matrix C 4 , and the matrix C 5 are taken as examples for description.
  • the functions implemented by these matrices can also be integrated into one matrix, which is not limited in this application.
  • FIG. 6 is a structural diagram of a speckle image matching device provided by an embodiment of the application.
  • the speckle image matching device 60 includes: a pre-matching module 601, a result processing module 602, and a speckle matching module 603;
  • the pre-matching module 601 is used for single-step matching the first speckle in the target speckle image with the speckle in the preset speckle image;
  • the result processing module 602 is used to adjust the pre-matching result of the first speckle after the first speckle in the target speckle image is successfully matched with the second speckle in the preset speckle image, and the pre-matching result indicates The matching result after the first speckle is matched 0 times or at least once.
  • the pre-matching result indicates the pre-matched speckle that is successfully pre-matched with the first speckle, and the confidence between the first speckle and the pre-matched speckle degree;
  • the speckle matching module 603 is configured to scatter the first speckle and the pre-match when the pre-match result of the first speckle indicates that the confidence between the first speckle and the pre-matched speckle is greater than or equal to the preset reliability
  • the spot is marked as a pair of scattered spots that match successfully.
  • an embodiment of the present application provides an electronic device for executing the speckle image matching method described in the first and second embodiments.
  • the embodiment of the present application provides one An electronic device, as shown in FIG. 7, FIG. 7 is a structural diagram of an electronic device provided by an embodiment of the application.
  • the electronic device 70 includes: at least one processor 701, a memory 702, at least one processor 701, and The memory 702 is electrically connected;
  • the memory 702 is configured to store at least one program 712;
  • the memory 702 as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the (Method for Determining Touch Position of Capacitive Screen) in the embodiment of the present application ) Corresponding program instructions/modules.
  • the processor 810 executes various functional applications and data processing of the server by running non-volatile software programs, instructions, and modules stored in the memory 702, that is, implementing the above method embodiment (method for determining the touch position of the capacitive screen).
  • the memory 702 may include a storage program area and a storage data area, where the storage program area can store an operating system and an application program required by at least one function; the storage data area can store data created based on the use of (the device for determining the touch position of the capacitive screen) Data etc.
  • the memory 702 may include a high-speed random access memory 702, and may also include a non-volatile memory 702, such as 702 pieces of at least one disk storage, flash memory device, or 702 other non-volatile solid-state memories.
  • the memory 702 may optionally include a memory 702 remotely provided with respect to the processor 810, and these remote memories 702 may be connected to (device for determining a touch position of a capacitive screen) via a network.
  • networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • an embodiment of the present application provides a storage medium, which is characterized in that a computer program is stored on the storage medium, and when the processor executes the computer program, the implementation is as follows: The method described in the second embodiment.
  • the electronic devices in the embodiments of this application exist in various forms, including but not limited to:
  • Mobile communication equipment This type of equipment is characterized by mobile communication functions, and its main goal is to provide voice and data communications.
  • Such terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
  • Ultra-mobile personal computer equipment This type of equipment belongs to the category of personal computers, has calculation and processing functions, and generally also has mobile Internet features.
  • Such terminals include: PDA, MID and UMPC devices, such as iPad.
  • Portable entertainment equipment This type of equipment can display and play multimedia content.
  • Such devices include: audio, video players (such as iPod), handheld game consoles, e-books, as well as smart toys and portable car navigation devices.
  • Server A device that provides computing services.
  • the composition of a server includes a processor 810, hard disk, memory, system bus, etc.
  • the server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has High requirements in terms of performance, reliability, security, scalability, and manageability.
  • the improvement of a technology can be clearly distinguished between hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to method flow).
  • hardware improvements for example, improvements to the circuit structure of diodes, transistors, switches, etc.
  • software improvements improvements to method flow.
  • the improvement of many methods and processes of today can be regarded as a direct improvement of the hardware circuit structure.
  • Designers almost always get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be realized by the hardware entity module.
  • a programmable logic device for example, a Field Programmable Gate Array (Field Programmable Gate Array, FPGA)
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • ABEL Advanced Boolean Expression Language
  • AHDL Altera Hardware Description Language
  • HDCal JHDL
  • Lava Lava
  • Lola MyHDL
  • PALASM RHDL
  • VHDL Very-High-Speed Integrated Circuit Hardware Description Language
  • Verilog Verilog
  • a typical implementation device is a computer.
  • the computer may be, for example, a personal computer, a laptop computer, a cell phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or Any combination of these devices.
  • this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM).
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
  • this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • This application may be described in the general context of computer-executable instructions executed by a computer, such as a program module.
  • program modules include routines, programs, objects, components, data structures, etc. that perform specific transactions or implement specific abstract data types.
  • This application can also be practiced in distributed computing environments. In these distributed computing environments, transactions are executed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

一种散斑图像匹配方法、装置及存储介质,散斑图像匹配方法,包括:将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配;在目标散斑图像中的第一散斑点与预设散斑图像中的第二散斑点单步匹配成功后,调整第一散斑点的预匹配结果,预匹配结果指示第一散斑点进行0次或至少一次单步匹配后的匹配结果,预匹配结果指示与第一散斑点预匹配成功的预匹配散斑点,以及第一散斑点与预匹配散斑点之间的置信度;在第一散斑点的预匹配结果指示第一散斑点与预匹配散斑点之间的置信度大于或等于预设置信度时,将第一散斑点与预匹配散斑点标记为匹配成功的散斑点对。

Description

散斑图像匹配方法、装置及存储介质 技术领域
本申请实施例涉及图像处理技术领域,尤其涉及散斑图像匹配方法、装置及存储介质。
背景技术
在三维重建技术中,利用摄像装置对目标对象进行拍摄得到二维图像,并且利用投射器得到目标对象的散斑图像,通过对目标对象的散斑图像进行处理得到二维图像中的像素点的深度信息,以此构建三维图像。在通过目标对象的散斑图像确定深度信息的过程中,将目标对象的散斑图像与预设的散斑图像进行局部匹配,在局部匹配成功后,根据局部区域在目标对象的散斑图像中的位置相对于在预设的散斑图像中的位置的偏移量就可以确定出局部区域的中心点的深度。但是,在局部区域匹配过程中,如果局部区域太小,匹配结果不够准确,如果局部区域太大,则很可能无法匹配成功,导致误匹配或漏匹配。
发明内容
有鉴于此,本申请实施例所解决的技术问题之一在于提供一种散斑图像匹配方法、装置及存储介质,用以克服现有技术中散斑图像匹配容易导致误匹配和漏匹配的缺陷。
第一方面,本申请实施例提供一种散斑图像匹配方法,包括:
将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配;
在目标散斑图像中的第一散斑点与预设散斑图像中的第二散斑点单步匹配成功后,调整第一散斑点的预匹配结果,预匹配结果指示第一散斑点进行0次或至少一次单步匹配后的匹配结果,预匹配结果指示与第一散斑点预匹配成功的预匹配散斑点,以及第一散斑点与预匹配散斑点之间的置信度;
在第一散斑点的预匹配结果指示第一散斑点与预匹配散斑点之间的置信度大于或等于预设置信度时,将第一散斑点与预匹配散斑点标记为匹配成功的散斑点对。
可选地,在本申请的一个实施例中,将目标散斑图像中的第一散斑点与 预设散斑图像中的散斑点进行单步匹配,包括:
在预设散斑图像中确定第一散斑点对应的匹配范围;将第一散斑点与匹配范围中的散斑点进行单步匹配。
可选地,在本申请的一个实施例中,将第一散斑点与匹配范围中的散斑点进行单步匹配,包括:
根据第一散斑点确定第一散斑点周围的第一区域,根据第二散斑点确定第二散斑点周围的第二区域,第二散斑点在匹配范围中;
在第一区域和第二区域中位置对应的散斑点数量大于或等于预设数量时,确定第一散斑点和第二散斑点单步匹配成功。
可选地,在本申请的一个实施例中,将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配,包括:
根据目标散斑图像中的第三散斑点确定第三散斑点周围的第三区域,根据预设散斑图像中的第四散斑点确定第四散斑点周围的第四区域,第三散斑点和第四散斑点是标记匹配成功的散斑点对;
在第三区域中的第一散斑点与第四区域中的第二散斑点位置对应时,确定第一散斑点和第二散斑点单步匹配成功。
可选地,在本申请的一个实施例中,调整第一散斑点的预匹配结果,包括:
在第一散斑点的预匹配结果指示的预匹配散斑点是第二散斑点时,将第一散斑点与预匹配散斑点之间的置信度增加第一步长。
可选地,在本申请的一个实施例中,调整第一散斑点的预匹配结果,包括:
在第一散斑点的预匹配结果指示第一散斑点无预匹配散斑点时,将第二散斑点确定为预匹配散斑点,并将第一散斑点与预匹配散斑点之间的置信度增加第二步长。
可选地,在本申请的一个实施例中,调整第一散斑点的预匹配结果,包括:
在第一散斑点的预匹配结果指示预匹配散斑点与第二散斑点不同,且第一散斑点与预匹配散斑点的置信度小于或等于第一阈值时,将第二散斑点确定为预匹配散斑点,并将第一散斑点与预匹配散斑点之间的置信度增加第三步长。
可选地,在本申请的一个实施例中,调整第一散斑点的预匹配结果,包 括:
在第一散斑点的预匹配结果指示预匹配散斑点与第二散斑点不同,且第一散斑点与预匹配散斑点的置信度大于第二阈值时,将第一散斑点与预匹配散斑点之间的置信度减少第四步长。
可选地,在本申请的一个实施例中,将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配,包括:
根据目标散斑图像确定目标散斑图像的目标散斑矩阵,根据预设散斑图像确定预设散斑图像的预设散斑矩阵;
将目标散斑矩阵中的矩阵元素和预设散斑矩阵中的矩阵元素进行单步匹配。
可选地,在本申请的一个实施例中,根据目标散斑图像确定目标散斑图像的目标散斑矩阵,包括:
将目标散斑矩阵中,与目标散斑图像中的散斑点位置对应的矩阵元素设置为1,其余矩阵元素设置为0。
可选地,在本申请的一个实施例中,根据预设散斑图像确定预设散斑图像的预设散斑矩阵,包括:
将预设散斑矩阵中,与预设散斑图像中的散斑点位置对应的矩阵元素设置为1,并将与散斑点位置对应的矩阵元素预设范围内的矩阵元素设置为1,其余矩阵元素设置为0。
第二方面,本申请实施例提供一种散斑图像匹配装置,包括:预匹配模块、结果处理模块和散斑匹配模块;
其中,预匹配模块,用于将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配;
结果处理模块,用于在目标散斑图像中的第一散斑点与预设散斑图像中的第二散斑点单步匹配成功后,调整第一散斑点的预匹配结果,预匹配结果指示第一散斑点进行0次或至少一次单步匹配后的匹配结果,预匹配结果指示与第一散斑点预匹配成功的预匹配散斑点,以及第一散斑点与预匹配散斑点之间的置信度;
散斑匹配模块,用于在第一散斑点的预匹配结果指示第一散斑点与预匹配散斑点之间的置信度大于或等于预设置信度时,将第一散斑点与预匹配散斑点标记为匹配成功的散斑点对。
第三方面,本申请实施例提供一种电子设备,包括:至少一个处理器、存储器,至少一个处理器和存储器电连接;
存储器,用于存储至少一个程序;
当至少一个处理器执行至少一个程序时,实现如第一方面或第一方面的任意一个实施例中所描述的方法。
第四方面,本申请实施例提供一种存储介质,其特征在于,存储介质上存储有计算机程序,在处理器执行计算机程序时,实现如第一方面或第一方面的任意一个实施例中所描述的方法。
本申请实施例中,将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配,根据单步匹配的结果调整目标散斑图像中的散斑点的预匹配结果,而且,在置信度大于或等于预设置信度时,才确定目标散斑图像中的散斑点与预设散斑图像中的哪个散斑点相匹配,对散斑点进行了充分的预匹配,并且调整预匹配结果,再根据最后的预匹配结果确定相匹配的散斑点,减小了局部区域过大或过小对匹配结果的影响,提高了散斑图像匹配的准确率和成功率。
附图说明
后文将参照附图以示例性而非限制性的方式详细描述本申请实施例的一些具体实施例。附图中相同的附图标记标示了相同或类似的部件或部分。本领域技术人员应该理解,这些附图未必是按比例绘制的。附图中:
图1为本申请实施例一中散斑图像匹配方法的流程图;
图2为本申请实施例提供的一种散斑图像示意图;
图3为本申请实施例提供的一种散斑矩阵扩散效果示意图;
图4为本申请实施例提供的另一种散斑矩阵扩散效果示意图;
图5为本申请实施例提供的一种匹配效果示意图;
图6为本申请实施例提供的一种散斑图像匹配装置的结构图;
图7为本申请实施例提供的一种电子设备的结构图。
具体实施方式
实施本申请实施例的任一技术方案必不一定需要同时达到以上的所有优点。
为了使本领域的人员更好地理解本申请实施例中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请实施例一部分实施例,而不是全部的实施例。基于本申请实施例中的实施例,本领域普通技术人员所获得的所有其他实施例,都应当属于本申请实施例保护的范围。
下面结合本申请实施例附图进一步说明本申请实施例具体实现。
实施例一、
本申请实施例提供一种散斑图像匹配方法,如图1所示,图1为本申请实施例提供的一种散斑图像匹配方法的流程图,该散斑图像匹配方法包括以下步骤:
步骤101、将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配。
目标散斑图像是任意一个待匹配的散斑图像,在本申请中,“目标”一词只用于表示单数,不用于做任何限定。预设散斑图像是用于和目标散斑图像进行匹配的参考图像。例如,在人脸识别的应用场景中,散斑投射器对一个预设距离的平面进行投射得到预设散斑图像,每一个散斑投射器,其得到的散斑图像中的散斑分布具有一定的特点,对于同一个散斑投射器对于不同物体采集到的散斑图像,其局部散斑分布具有相似性,因此,先得到一个散斑投射器对于一个平面采集到的散斑图像作为预设散斑图像,然后得到散斑投射器对于待验证的人脸(或称为目标人脸、目标对象)进行投射得到的目标散斑图像,将目标散斑图像与预设散斑图像进行单步匹配。
在对目标散斑图像与预设散斑图像进行单步匹配时,可以将目标散斑图像和预设散斑图像转化为散斑矩阵,再以散斑矩阵为基础进行匹配。例如,在本申请的一个实施例中,将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配,包括:
根据目标散斑图像确定目标散斑图像的目标散斑矩阵,根据预设散斑图像确定预设散斑图像的预设散斑矩阵;将目标散斑矩阵中的矩阵元素和预设散斑矩阵中的矩阵元素进行单步匹配。
具体地,在本申请的一个实施例中,根据目标散斑图像确定目标散斑图像的目标散斑矩阵,包括:
将目标散斑矩阵中,与目标散斑图像中的散斑点位置对应的矩阵元素设 置为1,其余矩阵元素设置为0。需要说明的是,目标散斑图像中的一个图像点与目标散斑矩阵中的一个矩阵元素相对应,预设散斑图像中的一个图像点与预设散斑矩阵中的一个矩阵元素相对应,图像点可以是一个像素点,也可以是由至少两个像素点形成的一个图像区域,一个像素点可以对应一个图像传感器阵列中的阵列元素(一个阵列元素可以是一个感光二极管),本申请对此不作限制。以图像点是一个像素点为例,例如,目标散斑图像是m×n个像素的图像,则目标散斑矩阵是大小为m×n的矩阵。
可选地,在本申请的一个实施例中,根据预设散斑图像确定预设散斑图像的预设散斑矩阵,包括:
将预设散斑矩阵中,与预设散斑图像中的散斑点位置对应的矩阵元素设置为1,并将与散斑点位置对应的矩阵元素预设范围内的矩阵元素设置为1,其余矩阵元素设置为0。
如图2所示,图2为本申请实施例提供的一种散斑图像示意图,散斑图像中一个白色圆点就是一个散斑点,将散斑点位置对应的矩阵元素设置为1,其余矩阵元素设置为0。可选地,可以将散斑点周围的矩阵元素也设置为1,提高对散斑变化的容忍度。
当然,此处只是示例性说明,并不代表本申请局限于此。此处,列举两种实现方式说明如何将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配。
可选地,在第一种实现方式中,将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配,包括:
在预设散斑图像中确定第一散斑点对应的匹配范围;将第一散斑点与匹配范围中的散斑点进行单步匹配。需要说明的是,第一散斑点对应的匹配范围是在预设散斑图像中初步确定的与第一散斑点匹配的点的范围,该匹配范围可以是预设的,例如,第一散斑点在目标散斑图像中的位置是(a,b),则将预设散斑图像中第(a-k)行到第(a+k)行的区域作为匹配范围,k可以是3或者5或者10等,此处只是示例性说明,本申请对此不作限制。
具体地,在本申请的一个实施例中,将第一散斑点与匹配范围中的散斑点进行单步匹配,包括:
根据第一散斑点确定第一散斑点周围的第一区域,根据第二散斑点确定第二散斑点周围的第二区域,第二散斑点是预设散斑图像中的散斑点,第二散 斑点在匹配范围中;在第一区域和第二区域中位置对应的散斑点数量大于或等于预设数量时,确定第一散斑点和第二散斑点单步匹配成功。
在第一种实现方式中,将第一散斑点周围的第一区域和第二散斑点周围的第二区域进行匹配。需要说明的是,第一散斑点周围的第一区域指的是与所述第一散斑点的距离小于或等于第一距离的点,或者,第一散斑点周围的第一区域指的是以第一散斑点为参考点(例如,以第一散斑点为中心)的一个预设形状和预设大小的区域,比如,第一区域可以是以第一散斑点为中心的方形区域,可以是19×19大小的方形区域,即图像点数量是19行×19列,且以第一散斑点为中心的方形区域,也可以是35×35大小,本申请对此不做限制。同理,第二区域和第一区域设置方式相同,第二区域可以和第一区域大小不同,也可以大小相同,本申请对此不作限制。在一个可选地实施例中,第一区域和第二区域大小相同,例如,第一区域和第二区域都是19×19大小的方形区域,第一区域中图像点的坐标可以是该图像点在第一区域中的行数和列数,第一区域中的每一个图像点在第二区域中都有位置对应的图像点,如果第一区域和第二区域中两个图像点位置对应且都是散斑点,则将这两个散斑点作为一个散斑点对,如果第一区域和第二区域中散斑点对的数量大于或等于预设数量,则第一散斑点和第二散斑点单步匹配成功。
可选地,在第二种实现方式中,将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配,包括:
根据目标散斑图像中的第三散斑点确定第三散斑点周围的第三区域,根据预设散斑图像中的第四散斑点确定第四散斑点周围的第四区域,第三散斑点和第四散斑点是标记匹配成功的散斑点对;在第三区域中的第一散斑点与第四区域中的第二散斑点位置对应时,确定第一散斑点和第二散斑点单步匹配成功。
对于标记匹配成功的散斑点对,表示两个散斑点最终匹配成功,不再进行后续匹配。标记匹配成功的散斑点对包括两个标记匹配成功的散斑点,一个是目标散斑图像中标记匹配成功的散斑点,另一个是与之匹配成功的预设散斑图像中标记匹配成功的散斑点。
在第二种实现方式中,第三散斑点和第四散斑点是标记匹配成功的散斑点对,即第三散斑点的预匹配结果指示第三散斑点和第四散斑点之间的置信度大于或等于预设置信度。此时,确定第三散斑点周围的第三区域,以及第四散斑点周围的第四区域,第三区域和第四区域的确定方式可以和第一区域的确定 方式相同。可选地,第三区域和第四区域可以大小相同,例如,第三区域和第四区域都是19×19大小的方形区域,将第三区域和第四区域中,位置对应且同为散斑点的两个图像点确定单步匹配成功。第一散斑点和第二散斑点同为散斑点,且第一散斑点在第三区域中的位置与第二散斑点在第四区域中的位置对应,则第一散斑点和第二散斑点单步匹配成功。例如,第一散斑点在第三区域中的位置是(6,6),即第一散斑点在第三区域中位于第6行第6列,第二散斑点在第四区域中的位置也是(6,6),则确定第一散斑点和第二散斑点单步匹配成功。
需要说明的是,此处第一种实现方式和第二种实现方式是是两种不同的预匹配方式,可以结合起来使用,也可以单独使用,本申请对此不做限制。
步骤102、在目标散斑图像中的第一散斑点与预设散斑图像中的第二散斑点单步匹配成功后,调整第一散斑点的预匹配结果。
需要说明的是,预匹配结果指示第一散斑点进行0次或至少一次单步匹配后的匹配结果。具体的,如果第一散斑点还没有进行过单步匹配,则预匹配结果为空,如果第一散斑点已经进行过至少一次单步匹配,则预匹配结果指示至少一次单步匹配后的匹配结果,每一次单步匹配后,都会根据单步匹配的结果更新预匹配结果。目标散斑图像与预设散斑图像的匹配过程可以称为预匹配的过程,预匹配的过程可以包含至少一次单步匹配的过程。对于一个散斑点而言,以第一散斑点为例,可以对第一散斑点进行至少一次单步匹配,每一次单步匹配后,都根据单步匹配的结果调整第一散斑点的预匹配结果。
预匹配结果指示与第一散斑点预匹配成功的预匹配散斑点,以及第一散斑点与预匹配散斑点之间的置信度。此处,列举四个示例具体说明在第一散斑点和第二散斑点单步匹配成功时,如何调整预匹配结果。
可选地,在第一个示例中,调整第一散斑点的预匹配结果,包括:
在第一散斑点的预匹配结果指示的预匹配散斑点是第二散斑点时,将第一散斑点与预匹配散斑点之间的置信度增加第一步长。
需要说明的是,在本申请中,两个散斑点之间的置信度用于指示两个散斑点相匹配的准确性,置信度越高,两个散斑点相匹配就越准确,如果预匹配结果指示预匹配散斑点是第二散斑点,此次第一散斑点与第二散斑点又一次单步匹配成功,则说明第一散斑点和第二散斑点相匹配的准确性更大,因此,将第一散斑点和第二散斑点之间的置信度增加第一步长。
可选地,在第二个示例中,调整第一散斑点的预匹配结果,包括:
在第一散斑点的预匹配结果指示第一散斑点无预匹配散斑点时,将第二散斑点确定为预匹配散斑点,并将第一散斑点与预匹配散斑点之间的置信度增加第二步长。
如果预匹配结果指示第一散斑点无预匹配散斑点,则说明此次第一散斑点和第二散斑点单步匹配成功是第一散斑点第一次单步匹配成功,可以将第二散斑点作为预匹配散斑点,将置信度增加第二步长,无预匹配散斑点时,置信度为0,第二步长可以是置信度的初始值。
可选地,在第三个示例中,调整第一散斑点的预匹配结果,包括:
在第一散斑点的预匹配结果指示预匹配散斑点与第二散斑点不同,且第一散斑点与预匹配散斑点的置信度小于或等于第一阈值时,将第二散斑点确定为预匹配散斑点,并将第一散斑点与预匹配散斑点之间的置信度增加第三步长。
如果预匹配散斑点不是第二散斑点,说明第一散斑点之前已经与其他散斑点单步匹配成功,而置信度小于或等于第一阈值,说明,第一散斑点与预匹配散斑点之间的准确度并不高,而此次第一散斑点预第二散斑点单步匹配成功也可以证明之前的预匹配结果并不准确,因此,可以将第一散斑点和预匹配散斑点的预匹配结果作废,将第二散斑点作为新的预匹配散斑点,并将第一散斑点和第二散斑点之间的置信度增加第三步长,第三步长可以和第二步长相等,或者第三步长可以小于第二步长。
可选地,在第四个示例中,调整第一散斑点的预匹配结果,包括:
在第一散斑点的预匹配结果指示预匹配散斑点与第二散斑点不同,且第一散斑点与预匹配散斑点的置信度大于第二阈值时,将第一散斑点与预匹配散斑点之间的置信度减少第四步长。
如果预匹配散斑点不是第二散斑点,而置信度大于第二阈值,则说明第一散斑点和预匹配散斑点相匹配的准确度是比较高的,而这一次第一散斑点和第二散斑点单步匹配成功有可能是此次匹配不准确,也可能是之前的匹配并不是非常准确,此时,不改变之前的预匹配散斑点,减少第一散斑点与预匹配散斑点之间的置信度,可以在后面的匹配过程中进一步调整,确定最终结果。
需要说明的是,第一步长、第二步长、第三步长和第四步长可以相同,也可以不同,本申请中,“第一”、“第二”、“第三”、“第四”只用作区分,不用于任何限定。此处调整预匹配结果和步骤101中两种预匹配方式可以结合使用,不同的预匹配方式可以对应不同的步长。例如,通过步骤101中预 匹配的第一种实现方式单步匹配成功后,增加的第一步长可以和通过第二种实现方式单步匹配成功后,增加的第二步长相同或者不同,本申请对此不作限定。
步骤103、在第一散斑点的预匹配结果指示第一散斑点与预匹配散斑点之间的置信度大于或等于预设置信度时,将第一散斑点与预匹配散斑点标记为匹配成功的散斑点对。
如果置信度大于或等于预设置信度,说明第一散斑点与预匹配散斑点相匹配的准确度比较高,可以正式将第一散斑点与预匹配散斑点标记为匹配成功的散斑点对。对于目标散斑图像中每一个散斑点,都可以按照第一散斑点的预匹配方式进行单步匹配,最终确定每个散斑点在预设散斑图像中相匹配的散斑点。
本申请实施例中,将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配,根据单步匹配的结果调整目标散斑图像中的散斑点的预匹配结果,而且,在置信度大于或等于预设置信度时,才确定目标散斑图像中的散斑点与预设散斑图像中的哪个散斑点相匹配,对散斑点进行了充分的预匹配,并且调整预匹配结果,再根据最后的预匹配结果确定相匹配的散斑点,减小了局部区域过大或过小对匹配结果的影响,提高了散斑图像匹配的准确率和成功率。
实施例二、
基于上述实施例一所描述的散斑图像匹配方法,本申请实施例二以一个具体应用场景作为示例,详细说明散斑图像匹配方法的具体实现过程。
在本实施例中,将目标散斑图像中散斑点位置对应的矩阵元素设置为1,其余矩阵元素设置为0,得到目标散斑图像对应的矩阵M作为目标散斑矩阵。将预设散斑图像中散斑点位置对应的矩阵元素设置为1,其余矩阵元素设置为0,得到矩阵C,将矩阵C进行第一种扩展,对矩阵C中不为0的矩阵元素,向相邻点扩散,扩散半径小于1/2点距(两个相邻散斑点间的距离),也就是说,如果预设散斑图像中,散斑点A和散斑点B相邻,则散斑点A到散斑点B的距离的1/2作为扩散半径,距散斑点A的距离小于或等于扩散半径的图像点都作为预设范围内的点,将这些图像点点对应的矩阵元素都可以设置为1,将扩散后的矩阵C 1作为预设散斑矩阵。如图3所示,图3为本申请实施例提供的一种散斑矩阵扩散效果示意图,图3中,将预设散斑图像中,将散斑点周围与散斑点相邻的8个图像点作为预设范围内的点,将这8个图像点对应的矩阵元素 都设置为1。当然,图3只是示例性说明,并不代表本申请局限于此。
矩阵C 2中每个矩阵元素表示的是散斑点坐标的索引值,在实际应用中,将预设散斑图像中,每个散斑点的坐标都进行存储,并对每一条存储的信息分配索引值,根据索引值就可以得到对应的散斑点的坐标。对矩阵C进行第二种扩展,对值不为0的点,往相邻点扩散,扩散半径小于1/3点距(两个相邻散斑点间的距离),保存扩散后的矩阵C 2。如图4所示,图4为本申请实施例提供的另一种散斑矩阵扩散效果示意图。
设置矩阵C 3和矩阵C 4作为辅助矩阵,矩阵C 3和矩阵C 4的大小与C 1,C 2相同,且全部值为0,C 3用于记录位置对应的散斑点的置信度(可以表示单步匹配成功的次数),C 4用于记录位置对应的散斑点的预匹配散斑点的索引值。
设置标记矩阵C 5,矩阵C 5初始值与矩阵M相同,即C 5是复制矩阵M得到的,矩阵C 5用于记录散斑点是否相匹配成功,已经匹配成功的点不需要再进行单步匹配。
1)对于预匹配中的第一种实现方式,将矩阵C 5中,所有值为1的点p执行后续步骤,在本实施例中,将p点作为第一散斑点,将q点作为第二散斑点为例进行说明:
根据矩阵M中p点的坐标计算匹配范围L,需要说明的是匹配范围L是预设散斑矩阵中与P点对应的范围。确定矩阵M中p周围R×R大小的窗口w 1(即实施例一中第一散斑点的第一区域),计算该窗口w 1内数值1的个数n 1(即第一区域内的散斑点数量);遍历矩阵C的匹配范围L,将矩阵C中所有值大于0的点(即矩阵C中的散斑点)均与p点进行单步匹配。以矩阵C中的q点为例,匹配方式为取矩阵C 1中q点周围R×R大小的窗口w 2(即第二区域),计算w 1与w 2对应位置且同时不为0的点的个数n 2(即第一区域和第二区域中位置对应的散斑点数量),在匹配范围L内,如果q点的n 2值大于或等于(n 1-T 1),(n 1-T 1)即为预设数量,T 1为预先设定的参数,则点p与q单步匹配成功。实际实现过程中,匹配范围L内,可能有多个点与p点满足n 2值大于或等于(n 1-T 1)的条件,有可能没有一个点满足n 2值大于或等于(n 1-T 1)的条件,可以确定出n 2值最大的点作为q点并确定是否与p点单步匹配成功。在q点与p点单步匹配成功后,比较矩阵C 4中p点对应的值是否与q点在矩阵C 2中对应的索引值相同(即确定p点的预匹配散斑点是否为q点),若矩阵C 4中p点对应的值与q点在矩阵C 2中对应的索引值相同,则C 3矩阵中p点的值加2(此处第一步长 为2);
若矩阵C 4中p点对应的值与q点在矩阵C 2中对应的索引值不同,确定矩阵C 3中p点对应的值,若矩阵C 3中p点对应的值为0,说明之前p点没有单步匹配成功过,则矩阵C 3中p点的值加2(此处第二步长为2),将矩阵C 4中p点对应的值设为q点的索引值;若矩阵C 3中p点对应的值为1(置信度小于或等于第一阈值),说明p点之前预匹配成功的预匹配散斑点准确度并不高,预匹配结果可以作废,将矩阵C 3中p点对应的值加1(此处第三步长为1),并将矩阵C 4中p点对应的值设为q点的索引值;若矩阵C 3中p点对应的值大于1(置信度大于第二阈值,此处,第一阈值和第二阈值相等,均为1),则将矩阵C 3中p点对应的值减2(此处第四步长为2)。
2)对于预匹配中的第一种实现方式,将p 1点作为第一散斑点,将q 1点作为第二散斑点,将p 2点作为第三散斑点,将q 2点作为第三散斑点,进行示例性说明:
判断矩阵C 3中p 2点对应的值是否大于或等于T 2(T 2即为预设置信度),若p 2点对应的值大于或等于T 2,则将标记矩阵C 5中p 2点对应的值设置为0(即表示p 2不再需要进行单步匹配),如果与p 2点相匹配的点是q 2点,还可以将矩阵M中p 2点对应的值设置为(1+q 2的索引值),矩阵C 4中p 2点对应的值即为q 2的索引值。通常索引值从0开始,将索引值加1后,可以避免索引值为0的点被判定为背景。
取矩阵M中p 2周围R 1×R 1的窗口w 3(即第三区域),取矩阵C 2中q 2周围R 1×R 1的窗口w 4(即第四区域),同时遍历w 3和w 4中位置对应的点,如果w 3中的点p 1(即第一散斑点)与w 4中的点q 1(即第二散斑点)的矩阵值同时不为0(即点p 1与点q 1单步匹配成功),比较矩阵C 4中p 1点对应的值是否与矩阵C 2中q 1点对应的值相同(即确定p 1点已经单步匹配成功的点是否为q 1点),若矩阵C 4中p 1点对应的值与矩阵C 2中q 1点对应的值相同,说明之前p 1点已经与q 1点单步匹配成功,则矩阵C 3中p 1点对应的值加1(此处,第一步长为1)。
若矩阵C 4中p 1点对应的值与矩阵C 2中q 1点对应的值不同,确定矩阵C 3中p 1点对应的值,若矩阵C 3中p 1点对应的值为0,说明p 1点之前没有单步匹配成功,则将矩阵C 3中p 1点对应的值加1(此处,第二步长为1),并将矩阵C 4中p 1点位置对应的值设为矩阵C 2中对应的值(即将q 1点作为p 1点的预匹 配散斑点),若矩阵C 3中p 1点对应的值为其它(即p 1点的置信度大于第二阈值,此处第二阈值为0),则将矩阵C 3中p 1点对应的值减1(此处,第四步长为1)。
在本实施例中,可以先使用第一种实现方式得到一部分已经匹配的散斑点(即置信度大于或等于预设置信度的散斑点),然后使用第二种实现方式对已经匹配的散斑点周围的散斑点进行单步匹配,在利用第二种实现方式进行单步匹配的过程中,还可以利用第一种实现方式继续对其余的散斑点进行单步匹配,而且,在利用第一种实现方式和/或第二种实现方式进行单步匹配的过程中,可以对每一个散斑点进行置信度的判断,确定出置信度大于或等于预设置信度的散斑点作为新的已经匹配的散斑点,继续利用第二种实现方式对新的已经匹配的散斑点周围的散斑点进行单步匹配,这样从一个点开始,可以实现匹配的辐射,并且在辐射过程中不断更新散斑点的预匹配结果。如图5所示,图5为本申请实施例提供的一种匹配效果示意图,图5中,黑色的点表示已经标记匹配成功的散斑点,斜杠填充的点为预匹配中的散斑点(即置信度小于预设置信度的散斑点),利用第二种实现方式对已经标记匹配成功的散斑点周围的散斑点进行单步匹配,从两个已经标记匹配成功的散斑点向外辐射,得到了4个已经标记匹配成功的散斑点,当然,图5只是对匹配的效果进行示意,并不表示任何限定。
遍历矩阵M,将所有值为1的点匹配完成,将矩阵M中每个矩阵元素的值减1,即为与该点相匹配的点的索引值。根据索引值可得到散斑点的坐标信息,可以确定目标散斑图像中散斑点的位置相对于预设散斑图像中与其相匹配的散斑点的位置的偏移量,根据偏移量确定该点的深度。每台设备投射的散斑图像,散斑分布在局部是相近的,当拍摄对象表面有深度变化时,散斑局部分布变化较小,该区域散斑位置会整体有偏移量,根据偏移量确定该部位深度。
实施例二中,以矩阵C 3、矩阵C 4、矩阵C 5为例进行说明,这些矩阵所实现的功能也可以集成在一个矩阵中实现,本申请对此不作限制。
实施例三、
基于上述实施例一所描述的散斑图像匹配方法,本申请实施例提供一种散斑图像匹配装置,用于执行上述实施例一和实施例二所描述的散斑图像匹配方法,参照图6所示,图6为本申请实施例提供的一种散斑图像匹配装置的结构图,该散斑图像匹配装置60包括:预匹配模块601、结果处理模块602和散 斑匹配模块603;
其中,预匹配模块601,用于将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配;
结果处理模块602,用于在目标散斑图像中的第一散斑点与预设散斑图像中的第二散斑点单步匹配成功后,调整第一散斑点的预匹配结果,预匹配结果指示第一散斑点进行0次或至少一次单步匹配后的匹配结果,预匹配结果指示与第一散斑点预匹配成功的预匹配散斑点,以及第一散斑点与预匹配散斑点之间的置信度;
散斑匹配模块603,用于在第一散斑点的预匹配结果指示第一散斑点与预匹配散斑点之间的置信度大于或等于预设置信度时,将第一散斑点与预匹配散斑点标记为匹配成功的散斑点对。
实施例四
基于上述实施例一所描述的散斑图像匹配方法,本申请实施例提供一种电子设备,用于执行上述实施例一和实施例二所描述的散斑图像匹配方法,本申请实施例提供一种电子设备,参照图7所示,图7为本申请实施例提供的一种电子设备的结构图,该电子设备70包括:包括:至少一个处理器701、存储器702,至少一个处理器701和存储器702电连接;
存储器702,用于存储至少一个程序712;
存储器702作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的(确定电容屏触摸位置方法)对应的程序指令/模块。处理器810通过运行存储在存储器702中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例中(确定电容屏触摸位置方法)。
存储器702可以包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需要的应用程序;存储数据区可存储根据(确定电容屏触摸位置装置)的使用所创建的数据等。此外,存储器702可以包括高速随机存取存储器702,还可以包括非易失性存储器702,例如至少一个磁盘存储器702件、闪存器件、或其他非易失性固态存储器702件。在一些实施例中,存储器702可选包括相对于处理器810远程设置的存储器702,这些远程存储器702可以通过网络连接至(确定电容屏触摸位置装置)。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
当至少一个处理器701执行至少一个程序712时,实现如实施例一和实施例二中所描述的方法。
实施例五、
基于上述实施例一所描述的散斑图像匹配方法,本申请实施例提供一种存储介质,其特征在于,存储介质上存储有计算机程序,在处理器执行计算机程序时,实现如实施例一和实施例二中所描述的方法。
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。
本申请实施例的电子设备以多种形式存在,包括但不限于:
(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话音、数据通信为主要目标。这类终端包括:智能手机(例如iPhone)、多媒体手机、功能性手机,以及低端手机等。
(2)超移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类终端包括:PDA、MID和UMPC设备等,例如iPad。
(3)便携式娱乐设备:这类设备可以显示和播放多媒体内容。该类设备包括:音频、视频播放器(例如iPod),掌上游戏机,电子书,以及智能玩具和便携式车载导航设备。
(4)服务器:提供计算服务的设备,服务器的构成包括处理器810、硬盘、内存、***总线等,服务器和通用的计算机架构类似,但是由于需要提供高可靠的服务,因此在处理能力、稳定性、可靠性、安全性、可扩展性、可管理性等方面要求较高。
(5)其他具有数据交互功能的电子设备。
至此,已经对本主题的特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作可以按照不同的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序,以实现期望的结果。在某些实施方式中,多任务处理和并行处理可以是有利的。
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进 (对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字***“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
上述实施例阐明的***、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。
本领域内的技术人员应明白,本申请的实施例可提供为方法、***、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、 CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本领域技术人员应明白,本申请的实施例可提供为方法、***或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定事务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行事务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于***实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (14)

  1. 一种散斑图像匹配方法,其特征在于,包括:
    将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配;
    在所述目标散斑图像中的第一散斑点与所述预设散斑图像中的第二散斑点单步匹配成功后,调整所述第一散斑点的预匹配结果,所述预匹配结果指示所述第一散斑点进行0次或至少一次单步匹配后的匹配结果,所述预匹配结果指示与所述第一散斑点预匹配成功的预匹配散斑点,以及所述第一散斑点与所述预匹配散斑点之间的置信度;
    在所述第一散斑点的预匹配结果指示所述第一散斑点与所述预匹配散斑点之间的置信度大于或等于预设置信度时,将所述第一散斑点与所述预匹配散斑点标记为匹配成功的散斑点对。
  2. 根据权利要求1所述的方法,其特征在于,将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配,包括:
    在所述预设散斑图像中确定所述第一散斑点对应的匹配范围;将所述第一散斑点与所述匹配范围中的散斑点进行所述单步匹配。
  3. 根据权利要求2所述的方法,其特征在于,将所述第一散斑点与所述匹配范围中的散斑点进行所述单步匹配,包括:
    根据所述第一散斑点确定所述第一散斑点周围的第一区域,根据所述第二散斑点确定所述第二散斑点周围的第二区域,所述第二散斑点在所述匹配范围中;
    在所述第一区域和所述第二区域中位置对应的散斑点数量大于或等于预设数量时,确定所述第一散斑点和所述第二散斑点单步匹配成功。
  4. 根据权利要求1所述的方法,其特征在于,将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配,包括:
    根据所述目标散斑图像中的第三散斑点确定所述第三散斑点周围的第三区域,根据所述预设散斑图像中的第四散斑点确定所述第四散斑点周围的第四区域,所述第三散斑点和所述第四散斑点是标记匹配成功的散斑点对;
    在所述第三区域中的所述第一散斑点与所述第四区域中的所述第二散斑点位置对应时,确定所述第一散斑点和所述第二散斑点单步匹配成功。
  5. 根据权利要求1所述的方法,其特征在于,调整所述第一散斑点的预匹配结果,包括:
    在所述第一散斑点的预匹配结果指示的所述预匹配散斑点是所述第二散斑 点时,将所述第一散斑点与所述预匹配散斑点之间的置信度增加第一步长。
  6. 根据权利要求1所述的方法,其特征在于,调整所述第一散斑点的预匹配结果,包括:
    在所述第一散斑点的预匹配结果指示所述第一散斑点无预匹配散斑点时,将所述第二散斑点确定为所述预匹配散斑点,并将所述第一散斑点与所述预匹配散斑点之间的置信度增加第二步长。
  7. 根据权利要求1所述的方法,其特征在于,调整所述第一散斑点的预匹配结果,包括:
    在所述第一散斑点的预匹配结果指示所述预匹配散斑点与所述第二散斑点不同,且所述第一散斑点与所述预匹配散斑点的置信度小于或等于第一阈值时,将所述第二散斑点确定为所述预匹配散斑点,并将所述第一散斑点与所述预匹配散斑点之间的置信度增加第三步长。
  8. 根据权利要求1所述的方法,其特征在于,调整所述第一散斑点的预匹配结果,包括:
    在所述第一散斑点的预匹配结果指示所述预匹配散斑点与所述第二散斑点不同,且所述第一散斑点与所述预匹配散斑点的置信度大于第二阈值时,将所述第一散斑点与所述预匹配散斑点之间的置信度减少第四步长。
  9. 根据权利要求1-8任一项所述的方法,其特征在于,将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配,包括:
    根据所述目标散斑图像确定所述目标散斑图像的目标散斑矩阵,根据所述预设散斑图像确定所述预设散斑图像的预设散斑矩阵;
    将所述目标散斑矩阵中的矩阵元素和所述预设散斑矩阵中的矩阵元素进行单步匹配。
  10. 根据权利要求9所述的方法,其特征在于,根据所述目标散斑图像确定所述目标散斑图像的目标散斑矩阵,包括:
    将所述目标散斑矩阵中,与所述目标散斑图像中的散斑点位置对应的矩阵元素设置为1,其余矩阵元素设置为0。
  11. 根据权利要求9所述的方法,其特征在于,根据所述预设散斑图像确定所述预设散斑图像的预设散斑矩阵,包括:
    将所述预设散斑矩阵中,与所述预设散斑图像中的散斑点位置对应的矩阵元素设置为1,并将与散斑点位置对应的矩阵元素预设范围内的矩阵元素设置 为1,其余矩阵元素设置为0。
  12. 一种散斑图像匹配装置,其特征在于,包括:预匹配模块、结果处理模块和散斑匹配模块;
    其中,所述预匹配模块,用于将目标散斑图像中的第一散斑点与预设散斑图像中的散斑点进行单步匹配;
    所述结果处理模块,用于在所述目标散斑图像中的第一散斑点与所述预设散斑图像中的第二散斑点单步匹配成功后,调整所述第一散斑点的预匹配结果,所述预匹配结果指示所述第一散斑点进行0次或至少一次单步匹配后的匹配结果,所述预匹配结果指示与所述第一散斑点预匹配成功的预匹配散斑点,以及所述第一散斑点与所述预匹配散斑点之间的置信度;
    所述散斑匹配模块,用于在所述第一散斑点的预匹配结果指示所述第一散斑点与所述预匹配散斑点之间的置信度大于或等于预设置信度时,将所述第一散斑点与所述预匹配散斑点标记为匹配成功的散斑点对。
  13. 一种电子设备,包括:至少一个处理器、存储器,所述至少一个处理器和所述存储器电连接;
    存储器,用于存储至少一个程序;
    当所述至少一个处理器执行所述至少一个程序时,实现如权利要求1-11中任一项所述的方法。
  14. 一种存储介质,其特征在于,所述存储介质上存储有计算机程序,在处理器执行所述计算机程序时,实现如权利要求1-11中任一项所述的方法。
PCT/CN2019/115435 2019-11-04 2019-11-04 散斑图像匹配方法、装置及存储介质 WO2021087692A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980002726.XA CN113168681A (zh) 2019-11-04 2019-11-04 散斑图像匹配方法、装置及存储介质
PCT/CN2019/115435 WO2021087692A1 (zh) 2019-11-04 2019-11-04 散斑图像匹配方法、装置及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/115435 WO2021087692A1 (zh) 2019-11-04 2019-11-04 散斑图像匹配方法、装置及存储介质

Publications (1)

Publication Number Publication Date
WO2021087692A1 true WO2021087692A1 (zh) 2021-05-14

Family

ID=75848668

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/115435 WO2021087692A1 (zh) 2019-11-04 2019-11-04 散斑图像匹配方法、装置及存储介质

Country Status (2)

Country Link
CN (1) CN113168681A (zh)
WO (1) WO2021087692A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103839258A (zh) * 2014-02-13 2014-06-04 西安交通大学 一种二值化激光散斑图像的深度感知方法
US20170347043A1 (en) * 2016-05-27 2017-11-30 Verily Life Sciences Llc Systems and Methods for Surface Topography Acquisition Using Laser Speckle
CN109461181A (zh) * 2018-10-17 2019-03-12 北京华捷艾米科技有限公司 基于散斑结构光的深度图像获取方法及***
CN110009673A (zh) * 2019-04-01 2019-07-12 四川深瑞视科技有限公司 深度信息检测方法、装置及电子设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101496032B (zh) * 2006-02-27 2011-08-17 普莱姆传感有限公司 使用斑纹解相关的距离映射的方法及设备
CN109405765B (zh) * 2018-10-23 2020-11-20 北京的卢深视科技有限公司 一种基于散斑结构光的高精度深度计算方法及***

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103839258A (zh) * 2014-02-13 2014-06-04 西安交通大学 一种二值化激光散斑图像的深度感知方法
US20170347043A1 (en) * 2016-05-27 2017-11-30 Verily Life Sciences Llc Systems and Methods for Surface Topography Acquisition Using Laser Speckle
CN109461181A (zh) * 2018-10-17 2019-03-12 北京华捷艾米科技有限公司 基于散斑结构光的深度图像获取方法及***
CN110009673A (zh) * 2019-04-01 2019-07-12 四川深瑞视科技有限公司 深度信息检测方法、装置及电子设备

Also Published As

Publication number Publication date
CN113168681A (zh) 2021-07-23

Similar Documents

Publication Publication Date Title
US11842438B2 (en) Method and terminal device for determining occluded area of virtual object
TWI733127B (zh) 資訊的檢測方法、裝置及設備
US11074706B2 (en) Accommodating depth noise in visual slam using map-point consensus
WO2020220968A1 (zh) 一种视频数据处理方法和相关装置
US9215530B2 (en) Augmented reality system
WO2019085906A1 (zh) 曝光度计算方法、装置、终端及可读存储介质
US20220375258A1 (en) Image processing method and apparatus, device and storage medium
WO2019218388A1 (zh) 一种事件数据流的处理方法及计算设备
WO2021196718A1 (zh) 关键点检测的方法和装置、电子设备、存储介质及计算机程序
TWI729675B (zh) 互動界面的顯示方法、裝置及設備
CN110930497B (zh) 一种全局光照相交加速方法、装置及计算机存储介质
WO2020233137A1 (zh) 损失函数取值的确定方法、装置和电子设备
US10884691B2 (en) Display control methods and apparatuses
US20170169546A1 (en) Method and electronic device for adjusting panoramic video
WO2018149376A1 (zh) 一种视频摘要的生成方法及装置
WO2021056450A1 (zh) 图像模板的更新方法、设备及存储介质
US10437351B2 (en) Method for detecting input device and detection device
WO2021087692A1 (zh) 散斑图像匹配方法、装置及存储介质
US11287526B2 (en) Locating spatialized sounds nodes for echolocation using unsupervised machine learning
WO2023077665A1 (zh) 手掌位置确定方法、装置、电子设备及存储介质
WO2020206644A1 (zh) 一种触控屏中引线的制作方法、触控屏及电子设备
TWI719379B (zh) 光線追蹤方法與電腦程式產品
US20240169650A1 (en) Particle rendering method and apparatus
TWI817540B (zh) 深度圖像獲取方法、電子設備及計算機可讀存儲媒體
US20240137483A1 (en) Image processing method and virtual reality display system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19952101

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19952101

Country of ref document: EP

Kind code of ref document: A1