Carpet identification method and device, storage medium, program and cleaning robot
By using detecting light in the sweeping robot to construct point cloud data and perform feature value decomposition, the time lag problem of sweeping robots when detecting carpets is solved, and the carpets are recognized in advance and accurate.
Patent Information
- Application Number
- CN202310774402.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2024-12-31
AI Technical Summary
The existing sweeping robots have a time lag when detecting carpets, and they cannot make accurate judgments in advance, resulting in the inability to pre-identify the carpets.
By sending detection light to the detected direction, building point cloud data, decomposition of eigenvalues and eigenvectors, determining the carpet identification results, and matching the threshold range and angle range of eigenvalues and eigenvectors, realizing the carpet's early identification .
The carpet is recognized in advance, overcoming the time lag problem of sweepers during the inspection of carpet surfaces, and improving the accuracy and credibility of identification.
Smart Images

Figure CN119224780A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a carpet recognition method, device, storage medium, program and cleaning robot. Background Art
[0002] There are more and more long-haired carpets in the current home environment, and the sweeping robot needs to choose whether to avoid long-haired carpets and other operations according to user needs. Therefore, the detection of long-haired carpets is crucial to the cleaning effect of the sweeping robot.
[0003] In related technical solutions, a sweeping robot generally detects carpets by using ultrasonic sensors or a device for measuring the three-axis attitude angle and acceleration of an object (Inertial Measurement Unit, IMU for short). However, due to the structure of the sweeping robot, ultrasonic waves or IMUs require the sweeping robot to be on the carpet surface to perform carpet detection. Due to the detection time lag, the sweeping robot cannot make a more accurate judgment in advance, that is, it cannot pre-identify the carpet. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art or related art.
[0005] To this end, a first aspect of the present invention is to provide a carpet identification method.
[0006] A second aspect of the present invention is to provide a carpet identification device.
[0007] A third aspect of the present invention is to provide another carpet identification device.
[0008] A fourth aspect of the present invention provides a readable storage medium.
[0009] A fifth aspect of the present invention provides a computer program product.
[0010] A sixth aspect of the present invention is to provide a cleaning robot.
[0011] In view of this, according to a first aspect of the present invention, the present invention provides a carpet recognition method for a cleaning robot, the cleaning robot comprising a detection device, the recognition method comprising: controlling the detection device to emit a detection light to a detected position, and receiving the detection light fed back from the detected position to obtain point cloud data in a first coordinate system; determining a data matrix corresponding to the point cloud data; processing the data matrix to obtain eigenvalues and eigenvectors; and determining a carpet recognition result based at least in part on the eigenvalues and eigenvectors.
[0012] The technical solution of the present application proposes a carpet recognition method. Carpet recognition can be achieved by running the above-mentioned carpet recognition method. During this process, the cleaning robot sends detection light to the detected position so as to collect carpet information at the detected position according to the detection light fed back by the detected position, and the carpet is recognized by processing the collected information.
[0013] During this process, the cleaning robot does not need to walk to the location of the carpet and then identify the carpet, which enables the carpet to be identified in advance. This overcomes the problem that the sweeping robot can only detect the carpet when it is on the carpet surface and is unable to make a more accurate judgment in advance due to the detection time lag.
[0014] The technical solution of the present application is implemented based on the following principles. Specifically, after obtaining the detection light fed back from the detected orientation, point cloud data of the detected direction can be constructed according to the detection light fed back from the detected orientation. By organizing the point cloud data, the above data can be converted into a corresponding data matrix, and then by performing eigenvalue decomposition on the data matrix, its eigenvector and its corresponding eigenvalue can be obtained, thereby realizing carpet recognition.
[0015] In one of the technical solutions, the first coordinate system may be a geodetic coordinate system or other coordinate systems, which may be selected according to actual control needs.
[0016] In one of the technical solutions, the detection light and the detection light can be visible light, such as red and green visible light, or invisible light, such as infrared light.
[0017] In addition, the carpet identification method proposed in this application also has the following additional technical features.
[0018] In the above technical solution, the recognition result of the carpet is determined at least in part based on the eigenvalue and the eigenvector, specifically including: determining a first angle between the eigenvector and the target vector in the first coordinate system, the target vector being the vector expression of the ground where the cleaning robot is located in the first coordinate system; determining a first comparison result between the eigenvalue and the eigenthreshhold range; determining a second comparison result between the first angle and the angle range; and determining the recognition result of the carpet based on the first comparison result and the second comparison result.
[0019] In this technical solution, under the same feature vector, the feature threshold range corresponding to each type of carpet is different, so the feature value and feature vector mentioned above can be used to realize carpet recognition.
[0020] In the above technical solution, the first angle is the angle between the feature vector and the target vector. By obtaining the above angle, the comparison result between the first angle and the angle range can be used to determine whether the feature vector is a feature vector for identifying a carpet, thereby ensuring that the two sides being compared, that is, the feature value and the feature threshold range are matched, so as to ensure the credibility and accuracy of carpet identification.
[0021] In the above technical solution, the recognition result of the carpet is determined according to the first comparison result and the second comparison result, specifically including: when the characteristic value is within the characteristic threshold range and the first angle is within the angle range, it is determined that the target carpet is recognized; when the characteristic value is not within the characteristic threshold range and / or the first angle is not within the angle range, it is determined that the target carpet is not recognized; wherein the target carpet corresponds to the characteristic threshold range and the angle range.
[0022] In this technical solution, when the feature value is within the feature threshold range and the first angle is also within the angle range, the identified carpet is considered to match the target carpet, and the carpet laid at the detected position is identified as the target carpet. In the case of inconsistency in the above comparison, it is considered that the target carpet is not identified.
[0023] In this process, the combined use of the characteristic value and the first angle ensures the recognition accuracy and reliability of the target carpet.
[0024] In one of the technical solutions, the carpet recognition method further includes: determining a feature threshold range and an angle range according to the target carpet.
[0025] In this technical solution, the names of different carpets, the corresponding relationship between the feature threshold ranges and the angle ranges corresponding to the different carpets can be pre-stored, and then in the process of carpet identification, the identification of different carpets can be achieved according to the above corresponding relationship.
[0026] In one of the technical solutions, the target carpet can be a high-pile carpet or a low-pile carpet.
[0027] In any of the above technical solutions, the data matrix is processed to obtain eigenvalues and eigenvectors, specifically including: performing zero mean conversion on the data of each dimension in the data matrix to obtain a target matrix; determining a covariance matrix corresponding to the target matrix; and diagonalizing the covariance matrix to obtain eigenvectors and an eigenvalue matrix whose diagonal elements are eigenvalues.
[0028] In this technical solution, the data matrix is zero-meaned to determine the covariance matrix, thereby achieving decomposition of eigenvalues and eigenvectors.
[0029] Specifically, the point cloud data is m×3, where m is the number of point clouds, 3 is the dimension of the point cloud, and x, y, and z are the three-dimensional coordinates of the point cloud. The point cloud data is organized into a matrix X with 3 rows and m columns, that is, the data matrix:
[0030]
[0031] Calculate the average value of each dimension and zero-mean the data in each row.
[0032]
[0033] in, and are the average values of the corresponding dimensions, x1, ...x m , y1, ...y m , z1, ... z m is the value of the three-dimensional coordinate.
[0034] Compute the covariance matrix of Y, where Y is the target matrix and Z is the covariance matrix.
[0035]
[0036] Among them, Y T is the transpose of Y. In order to extract the principal components, the other elements outside the diagonal are set to 0, and the elements on the diagonal are arranged from large to small and from top to bottom. i , b i 、c i The value of i in is 1, ..., m, which is the value after zero mean in the above text.
[0037] Let the covariance matrix corresponding to the mean-valued matrix Y be Z, P is a set of matrices arranged in rows, let C = PY, then C is the data after the basis transformation of P. Let the covariance matrix of C be D, then:
[0038]
[0039] Among them, C T is the transpose of C, (PY) T is the transpose of (PY), P T is the transpose of P.
[0040] In summary, the optimization goal becomes to find a matrix P such that after the transformation, D is a diagonal matrix, and the elements on the diagonal are arranged in descending order, then the first K rows of P are the basis after the transformation.
[0041] Since the covariance matrix Z is a symmetric matrix, the eigenvectors corresponding to its different eigenvalues are orthogonal, and there are linearly independent unit orthogonal eigenvectors.
[0042] Let the unit eigenvector E of Z be:
[0043] E = (e1e2e3);
[0044] Then for the covariance matrix Z we have:
[0045]
[0046] Among them, E T is the transpose of E, Λ is a diagonal matrix, and its diagonal elements λ1, λ2, and λ3 are the eigenvalues corresponding to each eigenvector. Combining the above derivation, we finally get:
[0047] P=E T ;
[0048] That is, P is a matrix in which the eigenvectors of the covariance matrix Z are normalized and arranged in rows.
[0049] According to the eigenvalue Λ and the eigenvector P, the thresholds of the first two principal components corresponding to the long-haired carpet are set. The eigenvalue thresholds of the first component and the second component are set to [λ l1 ,λ h1 ]、[λ l2 ,λ h2 ], let the angle between the eigenvector corresponding to the first eigenvalue and the ground be θ, and its threshold be [θ l1 ,θ h1 ], then for long-haired carpets, the following conditions should be met:
[0050]
[0051] Among them, the eigenvalue threshold [λ l1 ,λ h1 ]、[λ l2 ,λ h2 ] is also the feature threshold range mentioned above, [θ l1 ,θ h1 ]That is, the angle range mentioned above.
[0052] In any of the above technical solutions, it also includes: executing a cleaning program corresponding to the identification result of the carpet.
[0053] In this technical solution, by running a cleaning program corresponding to the identification result of the carpet, it is ensured that different cleaning strategies can be implemented according to different carpets, thereby ensuring the cleaning effect of the cleaning robot.
[0054] In any of the above technical solutions, the detection device is a line laser sensor.
[0055] In this technical solution, by selecting a line laser sensor and utilizing the high intensity of the light emitted by the line laser sensor, the interference of other light on the detection light is reduced, thereby improving the accuracy of the point cloud data.
[0056] According to a second aspect of the present invention, the present invention provides a carpet recognition device for a cleaning robot, the cleaning robot comprising a detection device, the recognition device comprising: a control unit, for controlling the detection device to emit a detection light to a detected position, and receiving the detection light fed back from the detected position to obtain point cloud data in a first coordinate system; a determination unit, for determining a data matrix corresponding to the point cloud data; a processing unit, for processing the data matrix to obtain eigenvalues and eigenvectors; and an recognition unit, for determining a carpet recognition result based at least in part on the eigenvalues and eigenvectors.
[0057] The technical solution of the present application proposes a carpet recognition device that can realize carpet recognition. During this process, the cleaning robot sends a detection light to the detected position so as to collect carpet information at the detected position according to the detection light fed back by the detected position, and processes the collected information to realize carpet recognition.
[0058] During this process, the cleaning robot does not need to walk to the location of the carpet and then identify the carpet, which enables the carpet to be identified in advance. This overcomes the problem that the sweeping robot can only detect the carpet when it is on the carpet surface and is unable to make a more accurate judgment in advance due to the detection time lag.
[0059] The technical solution of the present application is implemented based on the following principles. Specifically, after obtaining the detection light fed back from the detected orientation, point cloud data of the detected direction can be constructed according to the detection light fed back from the detected orientation. By organizing the point cloud data, the above data can be converted into a corresponding data matrix, and then by performing eigenvalue decomposition on the data matrix, its eigenvector and its corresponding eigenvalue can be obtained, thereby realizing carpet recognition.
[0060] In one of the technical solutions, the first coordinate system may be a geodetic coordinate system or other coordinate systems, which may be selected according to actual control needs.
[0061] In one of the technical solutions, the detection light and the detection light can be visible light, such as red and green visible light, or invisible light, such as infrared light.
[0062] In addition, the carpet identification device proposed in this application also has the following additional technical features.
[0063] In the above technical solution, the identification unit is specifically used to determine a first angle between a feature vector and a target vector in a first coordinate system, where the target vector is a vector expression of the ground where the cleaning robot is located in the first coordinate system; determine a first comparison result between the feature value and the feature threshold range; determine a second comparison result between the first angle and the angle range; and determine the identification result of the carpet based on the first comparison result and the second comparison result.
[0064] In this technical solution, under the same feature vector, the feature threshold range corresponding to each type of carpet is different, so the feature value and feature vector mentioned above can be used to identify the carpet. In the above technical solution, the first angle is the angle between the feature vector and the target vector. By obtaining the above angle, the comparison result between the first angle and the angle range can be used to know whether the feature vector is a feature vector for identifying the carpet, thereby ensuring that the two sides to be compared, that is, the feature value and the feature threshold range are matched, so as to ensure the credibility and accuracy of carpet identification.
[0065] In the above technical solution, the identification unit is specifically used to: determine that the target carpet is identified when the characteristic value is within the characteristic threshold range and the first angle is within the angle range; determine that the target carpet is not identified when the characteristic value is not within the characteristic threshold range and / or the first angle is not within the angle range; wherein the target carpet corresponds to the characteristic threshold range and the angle range.
[0066] In this technical solution, when the feature value is within the feature threshold range and the first angle is also within the angle range, the identified carpet is considered to match the target carpet, and the carpet laid at the detected position is identified as the target carpet. In the case of inconsistency in the above comparison, it is considered that the target carpet is not identified.
[0067] In this process, the combined use of the characteristic value and the first angle ensures the recognition accuracy and reliability of the target carpet.
[0068] In one of the technical solutions, the carpet recognition method further includes: determining a feature threshold range and an angle range according to the target carpet.
[0069] In this technical solution, the names of different carpets, the corresponding relationship between the feature threshold ranges and the angle ranges corresponding to the different carpets can be pre-stored, and then in the process of carpet identification, the identification of different carpets can be achieved according to the above corresponding relationship.
[0070] In one of the technical solutions, the target carpet can be a high-pile carpet or a low-pile carpet.
[0071] In any of the above technical solutions, the processing unit is specifically used to: perform zero mean conversion on the data of each dimension in the data matrix to obtain a target matrix; determine the covariance matrix corresponding to the target matrix; diagonalize the covariance matrix to obtain eigenvectors and an eigenvalue matrix whose diagonal elements are eigenvalues.
[0072] In this technical solution, the data matrix is zero-meaned to determine the covariance matrix, thereby achieving decomposition of eigenvalues and eigenvectors.
[0073] In any of the above technical solutions, the identification unit is further used to: execute a cleaning program corresponding to the identification result of the carpet.
[0074] In this technical solution, by running a cleaning program corresponding to the identification result of the carpet, it is ensured that different cleaning strategies can be implemented according to different carpets, thereby ensuring the cleaning effect of the cleaning robot.
[0075] In any of the above technical solutions, the detection device is a line laser sensor.
[0076] In this technical solution, by selecting a line laser sensor and utilizing the high intensity of the light emitted by the line laser sensor, the interference of other light on the detection light is reduced, thereby improving the accuracy of the point cloud data.
[0077] According to a third aspect of the present invention, a carpet recognition device is provided, comprising: a processor and a memory, wherein the memory stores programs or instructions executable on the processor, and when the programs or instructions are executed by the processor, the steps of any of the above methods are implemented.
[0078] According to a fourth aspect of the present invention, the present invention provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of any of the above methods are implemented.
[0079] According to a fifth aspect of the present invention, the present invention provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the steps of any one of the above methods.
[0080] According to a sixth aspect of the present invention, the present invention provides a cleaning robot, comprising: a recognition device as any of the above-mentioned carpets; and / or the above-mentioned readable storage medium; and / or the above-mentioned computer program product.
[0081] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0083] Figure 1 One of the flow charts of the carpet identification method in the embodiment of the present invention is shown;
[0084] Figure 2 A schematic diagram of the structure of a cleaning robot in an embodiment of the present invention is shown;
[0085] Figure 3 The second flowchart of the carpet identification method in the embodiment of the present invention is shown;
[0086] Figure 4 A schematic block diagram of a carpet recognition device according to an embodiment of the present invention is shown;
[0087] Figure 5 A schematic block diagram of another carpet recognition device in an embodiment of the present invention is shown.
[0088] in, Figure 2 The corresponding relationship between the reference numerals and the component names is as follows:
[0089] 202 detection device. DETAILED DESCRIPTION
[0090] In order to more clearly understand the above aspects, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0091] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0092] In one embodiment of the present application, Figure 1 and Figure 2 As shown, a carpet recognition method is provided for a cleaning robot, the cleaning robot includes a detection device 202, and the recognition method includes:
[0093] Step 102, controlling the detection device to emit detection light to the detected position, and receiving the detection light fed back from the detected position, so as to obtain point cloud data in the first coordinate system;
[0094] Step 104, determining a data matrix corresponding to the point cloud data;
[0095] Step 106, processing the data matrix to obtain eigenvalues and eigenvectors;
[0096] Step 108, determining a carpet identification result based at least in part on the eigenvalues and the eigenvectors.
[0097] An embodiment of the present application proposes a carpet recognition method. Carpet recognition can be achieved by running the above-mentioned carpet recognition method. During this process, the cleaning robot sends a detection light to the detected position so as to collect the carpet information at the detected position according to the detection light fed back by the detected position, and the carpet is recognized by processing the collected information.
[0098] During this process, the cleaning robot does not need to walk to the location of the carpet and then identify the carpet, which enables the carpet to be identified in advance. This overcomes the problem that the sweeping robot can only detect the carpet when it is on the carpet surface and is unable to make a more accurate judgment in advance due to the detection time lag.
[0099] The embodiments of the present application are implemented based on the following principles. Specifically, after obtaining the detection light fed back from the detected orientation, point cloud data of the detected direction can be constructed according to the detection light fed back from the detected orientation. By organizing the point cloud data, the above data can be converted into a corresponding data matrix, and then by performing eigenvalue decomposition on the data matrix, its eigenvector and its corresponding eigenvalue can be obtained, thereby realizing carpet recognition.
[0100] In one embodiment, the first coordinate system may be a geodetic coordinate system or other coordinate systems, which may be selected according to actual control needs.
[0101] In one embodiment, the detection light and the detection light can be visible light, such as red and green visible light, or non-visible light, such as infrared light.
[0102] In one of the embodiments, optionally, the recognition result of the carpet is determined at least partially based on the eigenvalue and the eigenvector, specifically including: determining a first angle between the eigenvector and the target vector in a first coordinate system, the target vector being a vector expression of the ground where the cleaning robot is located in the first coordinate system; determining a first comparison result of the eigenvalue and the eigenthre threshold range; determining a second comparison result of the first angle and the angle range; and determining the recognition result of the carpet based on the first comparison result and the second comparison result.
[0103] In this embodiment, under the same feature vector, the feature threshold range corresponding to each type of carpet is different, so the feature value and feature vector mentioned above can be used to realize carpet recognition.
[0104] In the above embodiment, the first angle is the angle between the feature vector and the target vector. By obtaining the above angle, it is possible to determine whether the feature vector is a feature vector for identifying a carpet by comparing the first angle with the angle range, thereby ensuring that the two sides to be compared, that is, the feature value and the feature threshold range, are matched, so as to ensure the credibility and accuracy of carpet identification.
[0105] In the above embodiment, the identification result of the carpet is determined according to the first comparison result and the second comparison result, specifically including: when the feature value is within the feature threshold range and the first angle is within the angle range, it is determined that the target carpet is identified; when the feature value is not within the feature threshold range and / or the first angle is not within the angle range, it is determined that the target carpet is not identified; wherein the target carpet corresponds to the feature threshold range and the angle range.
[0106] In this embodiment, when the feature value is within the feature threshold range and the first angle is also within the angle range, it is considered that the identified carpet matches the target carpet, and the carpet laid at the detected position is identified as the target carpet. In the case of inconsistency in the above comparison, it is considered that the target carpet is not identified.
[0107] In this process, the combined use of the characteristic value and the first angle ensures the recognition accuracy and reliability of the target carpet.
[0108] In one of the embodiments, the carpet recognition method further includes: determining a feature threshold range and an angle range according to the target carpet.
[0109] In this embodiment, the names of different carpets, the corresponding relationships between the feature threshold ranges and the angle ranges corresponding to the different carpets may be pre-stored, and then in the process of carpet identification, the identification of different carpets may be achieved according to the above corresponding relationships.
[0110] In one embodiment, the target carpet may be a high-pile carpet or a low-pile carpet.
[0111] In any of the above embodiments, the data matrix is processed to obtain eigenvalues and eigenvectors, specifically including: performing zero mean on the data of each dimension in the data matrix to obtain a target matrix; determining a covariance matrix corresponding to the target matrix; and diagonalizing the covariance matrix to obtain eigenvectors and an eigenvalue matrix whose diagonal elements are eigenvalues.
[0112] In this embodiment, the data matrix is zero-meaned to determine the covariance matrix, thereby achieving decomposition of eigenvalues and eigenvectors.
[0113] Specifically, the point cloud data is m×3, where m is the number of point clouds, 3 is the dimension of the point cloud, and x, y, and z are the three-dimensional coordinates of the point cloud. The point cloud data is organized into a matrix X with 3 rows and m columns, that is, the data matrix:
[0114]
[0115] Calculate the average value of each dimension and zero-mean the data in each row.
[0116]
[0117] in, and are the average values of the corresponding dimensions, x1, ...x m , y1, ...y m , z1, ... z m is the value of the three-dimensional coordinate.
[0118] Compute the covariance matrix of Y, where Y is the target matrix and Z is the covariance matrix.
[0119]
[0120] Among them, Y T is the transpose of Y. In order to extract the principal components, the other elements outside the diagonal are set to 0, and the elements on the diagonal are arranged from large to small and from top to bottom. i , b i 、c i The value of i in is 1, ..., m, which is the value after zero mean in the above text.
[0121] Let the covariance matrix corresponding to the mean-valued matrix Y be Z, P is a set of matrices arranged in rows, let C = PY, then C is the data after the basis transformation of P. Let the covariance matrix of C be D, then:
[0122]
[0123] Among them, C T is the transpose of C, (PY) T is the transpose of (PY), P T is the transpose of P.
[0124] In summary, the optimization goal becomes to find a matrix P such that after the transformation, D is a diagonal matrix, and the elements on the diagonal are arranged in descending order, then the first K rows of P are the basis after the transformation.
[0125] Since the covariance matrix Z is a symmetric matrix, the eigenvectors corresponding to its different eigenvalues are orthogonal, and there are linearly independent unit orthogonal eigenvectors.
[0126] Let the unit eigenvector E of Z be:
[0127] E = (e1e2e3);
[0128] Then for the covariance matrix Z we have:
[0129]
[0130] Among them, E T is the transpose of E, Λ is a diagonal matrix, and its diagonal elements λ1, λ2, and λ3 are the eigenvalues corresponding to each eigenvector. Combining the above derivation, we finally get:
[0131] P=E T ;
[0132] That is, P is a matrix in which the eigenvectors of the covariance matrix Z are normalized and arranged in rows.
[0133] According to the eigenvalue Λ and the eigenvector P, the thresholds of the first two principal components corresponding to the long-haired carpet are set. The eigenvalue thresholds of the first component and the second component are set to [λ l1 ,λ h1 ]、[λ l2 ,λ h2 ], let the angle between the eigenvector corresponding to the first eigenvalue and the ground be θ, and its threshold be [θ l1 ,θ h1 ], then for long-haired carpets, the following conditions should be met:
[0134]
[0135] Among them, the eigenvalue threshold [λ l1 ,λ h1 ]、[λ l2 ,λ h2 ] is also the feature threshold range mentioned above, [θ l1 ,θ h1 ]That is, the angle range mentioned above.
[0136] In any of the above embodiments, the method further includes: executing a cleaning program corresponding to the identification result of the carpet.
[0137] In this embodiment, a cleaning program corresponding to the identification result of the carpet is run to ensure that different cleaning strategies can be implemented according to different carpets, thereby ensuring the cleaning effect of the cleaning robot.
[0138] In any of the above embodiments, the detection device 202 is a line laser sensor.
[0139] In this embodiment, by selecting a line laser sensor and utilizing the high intensity of the light emitted by the line laser sensor, interference of other light on the detection light is reduced, thereby improving the accuracy of the point cloud data.
[0140] In one embodiment, if Figure 3 As shown, the identification methods of carpets include:
[0141] Step 302, receiving line laser data;
[0142] Step 304, arranging the data into a matrix X with 3 rows and m columns;
[0143] Step 306, perform zero mean conversion to obtain matrix Y;
[0144] Step 308, obtaining the covariance matrix to obtain Z;
[0145] Step 310, obtaining the eigenvalues and eigenvectors of the covariance matrix;
[0146] Step 312, determine whether the eigenvalue and the eigenvector are within the threshold, if the determination result is yes, execute step 314, if the determination result is no, execute step 302;
[0147] Step 314: output the detection result.
[0148] Specifically, a shaggy carpet is laid on the ground, and a sweeper is placed on the carpet, and its line laser sensor can detect the carpet; the line laser detection function of the shaggy carpet is turned on; the line laser sensor is turned on, and the sweeper obtains the sensed point cloud data of the carpet; according to the point cloud data, the corresponding data matrix X is generated; the matrix X is zero-meaned to obtain the matrix Y; the covariance matrix of the matrix Y is obtained to obtain the matrix Z; the matrix Z is eigenvalue decomposed to obtain the eigenvalue and eigenvector; it is determined whether the eigenvalue Λ and the eigenvector P meet the preset threshold; if the preset threshold is met, it is output that there is a shaggy carpet in front.
[0149] In one embodiment, if Figure 4 As shown, the present invention provides a carpet recognition device 400, which is used for a cleaning robot. The cleaning robot includes a detection device, and the recognition device includes: a control unit 402, which is used to control the detection device to emit detection light to the detected position and receive the detection light fed back from the detected position to obtain point cloud data in a first coordinate system; a determination unit 404, which is used to determine a data matrix corresponding to the point cloud data; a processing unit 406, which is used to process the data matrix to obtain eigenvalues and eigenvectors; and an identification unit 408, which is used to determine the recognition result of the carpet at least partially based on the eigenvalues and eigenvectors.
[0150] The embodiment of the present application proposes a carpet recognition device 400, which can realize carpet recognition. During this process, the cleaning robot sends a detection light to the detected position so as to collect the carpet information at the detected position according to the detection light fed back by the detected position, and processes the collected information to realize carpet recognition.
[0151] During this process, the cleaning robot does not need to walk to the location of the carpet and then identify the carpet, which enables the carpet to be identified in advance. This overcomes the problem that the sweeping robot can only detect the carpet when it is on the carpet surface and is unable to make a more accurate judgment in advance due to the detection time lag.
[0152] The embodiments of the present application are implemented based on the following principles. Specifically, after obtaining the detection light fed back from the detected orientation, point cloud data of the detected direction can be constructed according to the detection light fed back from the detected orientation. By organizing the point cloud data, the above data can be converted into a corresponding data matrix, and then by performing eigenvalue decomposition on the data matrix, its eigenvector and its corresponding eigenvalue can be obtained, thereby realizing carpet recognition.
[0153] In one of the embodiments, optionally, the identification unit is specifically used to determine a first angle between a feature vector and a target vector in a first coordinate system, where the target vector is a vector expression of the ground where the cleaning robot is located in the first coordinate system; determine a first comparison result between the feature value and the feature threshold range; determine a second comparison result between the first angle and the angle range; and determine an identification result of the carpet based on the first comparison result and the second comparison result.
[0154] In this embodiment, under the same feature vector, the feature threshold range corresponding to each type of carpet is different, so the feature value and feature vector mentioned above can be used to realize carpet recognition.
[0155] In one embodiment, the first coordinate system may be a geodetic coordinate system or other coordinate systems, which may be selected according to actual control needs.
[0156] In one embodiment, the detection light and the detection light can be visible light, such as red and green visible light, or non-visible light, such as infrared light.
[0157] In the above embodiment, the first angle is the angle between the feature vector and the target vector. By obtaining the above angle, it is possible to determine whether the feature vector is a feature vector for identifying a carpet by comparing the first angle with the angle range, thereby ensuring that the two sides to be compared, that is, the feature value and the feature threshold range, are matched, so as to ensure the credibility and accuracy of carpet identification.
[0158] In the above embodiment, the identification unit 408 is specifically used to: determine that the target carpet is identified when the feature value is within the feature threshold range and the first angle is within the angle range; determine that the target carpet is not identified when the feature value is not within the feature threshold range and / or the first angle is not within the angle range; wherein the target carpet corresponds to the feature threshold range and the angle range.
[0159] In this embodiment, when the feature value is within the feature threshold range and the first angle is also within the angle range, it is considered that the identified carpet matches the target carpet, and the carpet laid at the detected position is identified as the target carpet. In the case of inconsistency in the above comparison, it is considered that the target carpet is not identified.
[0160] In this process, the combined use of the characteristic value and the first angle ensures the recognition accuracy and reliability of the target carpet.
[0161] In one of the embodiments, the carpet recognition method further includes: determining a feature threshold range and an angle range according to the target carpet.
[0162] In this embodiment, the names of different carpets, the corresponding relationships between the feature threshold ranges and the angle ranges corresponding to the different carpets may be pre-stored, and then in the process of carpet identification, the identification of different carpets may be achieved according to the above corresponding relationships.
[0163] In one embodiment, the target carpet may be a high-pile carpet or a low-pile carpet.
[0164] In any of the above embodiments, the processing unit 406 is specifically used to: perform zero mean conversion on the data of each dimension in the data matrix to obtain a target matrix; determine the covariance matrix corresponding to the target matrix; diagonalize the covariance matrix to obtain eigenvectors and an eigenvalue matrix whose diagonal elements are eigenvalues.
[0165] In this embodiment, the data matrix is zero-meaned to determine the covariance matrix, thereby achieving decomposition of eigenvalues and eigenvectors.
[0166] In any of the above embodiments, the identification unit 408 is further configured to: execute a cleaning program corresponding to the identification result of the carpet.
[0167] In this embodiment, a cleaning program corresponding to the identification result of the carpet is run to ensure that different cleaning strategies can be implemented according to different carpets, thereby ensuring the cleaning effect of the cleaning robot.
[0168] In any of the above embodiments, the detection device is a line laser sensor.
[0169] In this embodiment, by selecting a line laser sensor and utilizing the high intensity of the light emitted by the line laser sensor, interference of other light on the detection light is reduced, thereby improving the accuracy of the point cloud data.
[0170] In one embodiment, if Figure 5 As shown, the present invention provides a carpet recognition device 500, including: a processor 502 and a memory 504, the memory 504 stores programs or instructions that can be run on the processor 502, and when the programs or instructions are executed by the processor, the steps of any of the above methods are implemented.
[0171] Among them, the memory 504 can be used to store software programs and various data. The memory 504 mainly includes a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area can store an operating system, an application program or instruction required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 504 may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.
[0172] In one embodiment, the present invention provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of any of the above methods are implemented.
[0173] In one embodiment, the present invention provides a computer program product. The computer program product is stored in a storage medium. The computer program product is executed by at least one processor to implement the steps of any one of the above methods.
[0174] In one embodiment, the present invention provides a cleaning robot, comprising: a carpet recognition device as described above; and / or a readable storage medium as described above; and / or a computer program product as described above.
[0175] In one embodiment, the cleaning robot is a sweeper.
[0176] The term "first" or "second" in the specification and claims of the present application may include one or more of the features explicitly or implicitly. In the textual description of the present invention, unless otherwise specified, "plurality" means two or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means that the objects connected before and after are in an "or" relationship.
[0177] In the claims, specification and drawings of the present invention, the term "multiple" refers to two or more than two. Unless otherwise clearly defined, the orientation or position relationship indicated by the terms "upper" and "lower" is based on the orientation or position relationship shown in the drawings, which is only for the purpose of more conveniently describing the present invention and making the description process simpler, rather than indicating or implying that the device or element referred to must have the specific orientation described, be constructed and operated in a specific orientation, so these descriptions cannot be understood as limiting the present invention; the terms "connect", "install", "fix" and the like should be understood in a broad sense. For example, "connection" can be a fixed connection between multiple objects, or a detachable connection between multiple objects, or an integral connection; it can be a direct connection between multiple objects, or an indirect connection between multiple objects through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood based on the specific circumstances of the above data.
[0178] In the claims, specification and drawings of the present invention, the description of the terms "one embodiment", "some embodiments", "specific embodiments" and the like means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In the claims, specification and drawings of the present invention, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0179] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A carpet recognition method for a cleaning robot, characterized in that: The cleaning robot includes a detection device, and the identification method includes: Controlling the detection device to emit detection light to the detected position and receiving the detection light fed back from the detected position to obtain point cloud data in the first coordinate system; Determining a data matrix corresponding to the point cloud data; Processing the data matrix to obtain eigenvalues and eigenvectors; Based at least in part on the feature value and the feature vector, an identification result of the carpet is determined.
2. The carpet identification method according to claim 1, characterized in that: The determining, at least in part based on the feature value and the feature vector, a recognition result of the carpet specifically comprises: Determine a first angle between the feature vector and a target vector in the first coordinate system, where the target vector is a vector expression of the ground where the cleaning robot is located in the first coordinate system; Determining a first comparison result of the characteristic value and the characteristic threshold range; Determine a second comparison result between the first angle and the angle range; The identification result of the carpet is determined according to the first comparison result and the second comparison result.
3. The carpet identification method according to claim 2, characterized in that: The determining the carpet recognition result according to the first comparison result and the second comparison result specifically includes: When the characteristic value is within the characteristic threshold range and the first angle is within the angle range, determining that the target carpet is identified; When the characteristic value is not within the characteristic threshold range and / or the first angle is not within the angle range, determining that the target carpet is not identified; The target carpet corresponds to the feature threshold range and the angle range.
4. The carpet identification method according to claim 1, characterized in that: The processing of the data matrix to obtain eigenvalues and eigenvectors specifically includes: Zero-meaning the data of each dimension in the data matrix to obtain a target matrix; Determining a covariance matrix corresponding to the target matrix; The covariance matrix is diagonalized to obtain eigenvectors and an eigenvalue matrix whose diagonal elements are eigenvalues.
5. The carpet identification method according to any one of claims 1 to 4, characterized in that: Also includes: A cleaning program corresponding to the identification result of the carpet is executed.
6. The carpet identification method according to any one of claims 1 to 4, characterized in that: The detection device is a line laser sensor.
7. A carpet recognition device for a cleaning robot, characterized in that: The cleaning robot comprises a detection device, and the identification device comprises: A control unit, used for controlling the detection device to emit detection light to the detected position and receive the detection light fed back from the detected position to obtain point cloud data in the first coordinate system; A determination unit, used to determine a data matrix corresponding to the point cloud data; A processing unit, used for processing the data matrix to obtain eigenvalues and eigenvectors; The recognition unit is configured to determine a recognition result of the carpet based at least in part on the feature value and the feature vector.
8. A carpet identification device, characterized in that: include: A processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product is stored in a storage medium, and the computer program product is executed by at least one processor to implement the steps of the method according to any one of claims 1 to 6.
11. A cleaning robot, characterized in that: include: The carpet identification device according to claim 7 or 8; and / or The readable storage medium according to claim 9; and / or The computer program product of claim 10.