An infrared-based intelligent toilet seat temperature testing method and system
Through the infrared-based intelligent toilet seat ring temperature testing method, infrared image registration and feature vector analysis are used to solve the problem of low accuracy of seat ring temperature testing in the existing technology, achieve accurate detection of the seat ring heating process, and improve The factory quality control of smart toilets has been implemented.
Patent Information
- Application Number
- CN202311570548.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-23
- Publication Date
- 2024-10-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing seat ring temperature testing method has low test accuracy and is difficult to detect uneven heating during the seat ring heating process, making it difficult to identify potential quality defects.
An infrared-based smart toilet seat ring temperature testing method is used to obtain infrared images within the test cycle, perform image registration and feature vector extraction, calculate the deviation index, form a temperature test image, and conduct detection based on time and space dimensions to determine whether There are problem areas.
It improves the accuracy and reliability of the seat ring temperature test, can effectively reflect problems in the process of heating the seat ring to constant temperature, and ensures the factory quality of smart toilets.
Smart Images

Figure CN117664353B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of seat ring testing, and in particular to an infrared-based intelligent toilet seat ring temperature testing method and system. Background Art
[0002] After the production of the smart toilet is completed, a series of tests need to be carried out, such as various performance tests, life tests, anti-siphon tests, waterproof tests, anti-backflow tests, cleaning flow, water outlet temperature response, seat temperature tests, etc. The existing seat temperature test usually uses a temperature sensor test. This test method is simple and fast, but the test accuracy is low and the expected test effect cannot be achieved. There are also temperature tests based on infrared images, but the existing infrared test methods usually perform constant temperature tests, which are difficult to test potential problems and ignore the heating conditions of the seat during the heating process (the heating conditions of the seat during the heating process can reflect whether the heating part of the seat is qualified and whether there are potential quality defects. For example, during the heating process, uneven heating is more likely to cause accelerated aging and deformation of the seat). Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide an infrared-based smart toilet seat temperature testing method and system, by acquiring infrared images of a test cycle (including a first stage reflecting heating and a second stage reflecting constant temperature), using feature extraction to generate a feature vector reflecting each part of the seat, and performing seat temperature testing in a comprehensive time dimension and space dimension, thereby ensuring the accuracy and perfection of the test and improving the quality control of smart toilets before leaving the factory.
[0004] In order to achieve the above purpose, the embodiments of the present application are implemented in the following manner:
[0005] In a first aspect, an embodiment of the present application provides an infrared-based smart toilet seat temperature testing method, comprising: obtaining a seat image and an infrared image set of a smart toilet seat within a test cycle, wherein the test cycle includes a first stage and a second stage, the first stage uses a first frequency to collect infrared images, and the second stage uses a second frequency to collect infrared images; based on the seat image, each infrared image in the infrared image set is aligned; based on all the aligned infrared images, a feature vector of each pixel in a detection area is determined to obtain a feature vector set, wherein the detection area is part or all of the seat area; based on the feature vector set and a reference vector set, a deviation index corresponding to each feature vector is determined; wherein the reference vector set is determined in advance based on a qualified smart toilet seat; based on the deviation index corresponding to each feature vector in the feature vector set, a seat temperature test image is formed; the seat temperature test image is detected to determine whether there is a problem area, if so, it is determined that the smart toilet seat temperature test is unqualified, and if not, it is determined that the smart toilet seat temperature test is qualified.
[0006] In combination with the first aspect, in a first possible implementation method of the first aspect, a feature vector of each pixel in the detection area is determined based on all the registered infrared images, including: for each pixel in the detection area: obtaining the pixel value of each registered infrared image at the pixel respectively; arranging the pixel values on the pixel in chronological order to form a feature vector of the pixel.
[0007] In combination with the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, determining a deviation index corresponding to each feature vector based on the feature vector set and the reference vector set includes: for each feature vector in the feature vector set, using the following formula to calculate the deviation index corresponding to the feature vector:
[0008]
[0009] Among them, δ i is the i-th eigenvector F i The corresponding deviation index, m is the eigenvector F i The total number of elements, that is, the number of infrared images in the infrared image set, is also the reference vector C i The total amount of elements, F ij is the eigenvector F i The jth element of C ij is the reference vector C i The j-th element of .
[0010] In combination with the second possible implementation method of the first aspect, in a third possible implementation method of the first aspect, a seat circle temperature test image is formed based on the deviation index corresponding to each feature vector in the feature vector set, including: obtaining a reference index set corresponding to the reference vector set, the reference index set including a deviation index reference value corresponding to each reference vector in the reference vector set; determining the deviation corresponding to each feature vector based on the deviation index corresponding to each feature vector in the feature vector set and each deviation index reference value in the reference index set; forming a seat circle temperature test image based on the deviation corresponding to each feature vector and the pixel corresponding to the feature vector.
[0011] In combination with the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, based on the deviation index corresponding to each feature vector in the feature vector set and each deviation index reference value in the reference index set, determining the deviation corresponding to each feature vector includes: for each feature vector in the feature vector set, using the following formula to calculate the deviation corresponding to the feature vector:
[0012]
[0013] Among them, p i is the eigenvector F i The corresponding deviation, [*] indicates rounding, δ i is the eigenvector F i The corresponding deviation index, r i is the reference vector C i The corresponding deviation index reference value, i.e., the i-th deviation index reference value in the reference index set, r i >0.
[0014] In combination with the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, based on the deviation corresponding to each feature vector and the pixel corresponding to the feature vector, forming a seat ring temperature test image includes: obtaining a grayscale image template corresponding to the seat ring image, wherein the grayscale value of each pixel in the grayscale image template is 0; i The corresponding deviation p i As the feature vector F i The grayscale value of the corresponding pixel in the grayscale image template; after the deviations corresponding to all feature vectors are assigned in the grayscale image template, the grayscale image formed is the seat temperature test image.
[0015] In combination with the fifth possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the seat ring temperature test image is detected to determine whether there is a problem area, including: performing threshold processing on the seat ring temperature test image, retaining the grayscale values of pixels not lower than the set threshold, and assigning zero to the grayscale values of pixels lower than the set threshold, to obtain an intermediate image; performing connected area detection on the intermediate image to determine non-zero grayscale connected areas; for each non-zero grayscale connected area: determining whether the number of pixels in the non-zero grayscale connected area reaches a set number, if so, determining that the non-zero grayscale connected area is a problem area, and if not, determining that the non-zero grayscale connected area is a normal area.
[0016] In a second aspect, an embodiment of the present application provides an infrared-based smart toilet seat temperature testing system, comprising: an image acquisition unit, used to acquire a seat image and an infrared image set of the smart toilet seat within a test cycle, wherein the test cycle includes a first stage and a second stage, the first stage uses a first frequency to acquire infrared images, and the second stage uses a second frequency to acquire infrared images; an image registration unit, used to register each infrared image in the infrared image set based on the seat image; a feature extraction unit, used to determine a feature vector of each pixel in the detection area based on all the registered infrared images, and obtain a feature vector set , wherein the detection area is part or all of the seat area; an index calculation unit, used to determine the deviation index corresponding to each feature vector based on a feature vector set and a reference vector set; wherein the reference vector set is pre-determined based on a qualified smart toilet seat; an image generation unit, used to form a seat temperature test image based on the deviation index corresponding to each feature vector in the feature vector set; a seat test unit, used to detect the seat temperature test image to determine whether there is a problem area, if so, determine that the smart toilet seat temperature test is unqualified, if not, determine that the smart toilet seat temperature test is qualified.
[0017] In a third aspect, an embodiment of the present application provides a storage medium, which is disposed in an electronic device, and the storage medium includes a stored program, wherein when the program is running, the electronic device where the storage medium is located is controlled to execute the infrared-based smart toilet seat temperature testing method described in any one of the first aspect or the possible implementation methods of the first aspect.
[0018] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions, and when the program instructions are loaded and executed by the processor, an infrared-based smart toilet seat temperature testing method according to any one of the first aspect or any possible implementation methods of the first aspect is implemented.
[0019] Beneficial effects:
[0020] 1. Obtain the seat ring image and infrared image set of the smart toilet seat ring during the test cycle (characterizing the first stage of the heating period and the second stage of the constant temperature period), align each infrared image based on the seat ring image, further determine the feature vector of each pixel in the detection area (part or all of the seat ring area), and obtain the feature vector set; then combine the reference vector set to determine the deviation index corresponding to each feature vector, and then form a seat ring temperature test image to detect the seat ring temperature test image to determine whether there is a problem area. If so, determine that the smart toilet seat ring temperature test is unqualified; if not, determine that the smart toilet seat ring temperature test is qualified. This method can conduct seat ring temperature test by integrating the time dimension (spanning the entire process of heating the seat ring to constant temperature) and the spatial dimension (covering each pixel in the detection area originating from the seat ring area), which can effectively reflect the problems in the process of heating the seat ring to constant temperature, and can also reflect the problems in the seat ring area, thereby ensuring the accuracy and reliability of the seat ring temperature test, realizing effective detection of the seat ring temperature, and improving the factory quality control of smart toilets.
[0021] 2. Obtain the pixel value of each registered infrared image at the pixel (reflecting the temperature of the pixel), arrange the pixel values on the pixel in chronological order (reflecting the temperature at different times), form the feature vector of the pixel, and calculate the deviation index corresponding to the feature vector. Use the corresponding formula to measure the deviation index, which can reflect the deviation index between the element value of each pixel and the reference element at each moment, and further compare it with each deviation index reference value in the reference index set to calculate and measure the deviation degree, which is finally reflected in the grayscale value of the seat ring temperature test image. Use the connected region detection in the field of image processing to realize the determination and positioning of the problem area, which can effectively detect the problems and potential quality risks of the seat ring in the temperature test.
[0022] 3. Perform threshold processing on the seat temperature test image, retain the grayscale values of pixels not lower than the set threshold, and set the grayscale values of pixels lower than the set threshold to zero to obtain an intermediate image. Perform connected region detection on the intermediate image to determine the non-zero grayscale connected region. Threshold processing can effectively improve the efficiency of connected region detection and leave a certain amount of room for error tolerance. By judging whether the number of pixels in the non-zero grayscale connected region reaches the set number, it is determined whether this non-zero grayscale connected region is a problem area, so that the comprehensive test of the seat temperature can be reliably achieved and the factory quality of the smart toilet can be controlled.
[0023] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 A flow chart of an infrared-based smart toilet seat temperature testing method provided in an embodiment of the present application.
[0026] Figure 2 Schematic diagram of the infrared image set of the smart toilet during the test cycle.
[0027] Figure 3 A schematic diagram of an infrared-based smart toilet seat temperature testing system provided in an embodiment of the present application.
[0028] Icons: 10-infrared-based intelligent toilet seat temperature testing system; 11-image acquisition unit; 12-image registration unit; 13-feature extraction unit; 14-index calculation unit; 15-image generation unit; 16-seat testing unit. DETAILED DESCRIPTION
[0029] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0030] In this embodiment, the infrared-based intelligent toilet seat temperature test method can be implemented by electronic equipment (such as a server, a personal computer, a central control unit of a test device, etc.). Figure 1 The infrared-based intelligent toilet seat temperature testing method may include step S10, step S20, step S30, step S40, step S50 and step S60.
[0031] For the intelligent toilet seat temperature test, the electronic device may execute step S10.
[0032] Step S10: Acquire the seat image and infrared image set of the smart toilet seat in the test cycle, wherein the test cycle includes a first stage and a second stage, the first stage uses a first frequency to collect infrared images, and the second stage uses a second frequency to collect infrared images.
[0033] First, for a smart toilet that needs to undergo a seat temperature test, the smart toilet can be placed in a set position, such as a designated position of a test device (having a high-definition camera mechanism and an infrared camera mechanism for collecting images). When the smart toilet starts to heat the seat, the seat image is collected by the high-definition camera mechanism, and the infrared image is collected by the infrared camera mechanism. The test cycle includes a first stage (used to reveal a heating period, such as 0-180 seconds) and a second stage (used to reveal a constant temperature period, such as 181-300 seconds). In the first stage, infrared images are collected at a first frequency (for example, twice per second. Of course, in order to improve the test accuracy, 5 times per second or even 10 times per second can be selected. This is just an example and is not limited thereto). In the second stage, infrared images are collected at a second frequency (for example, once per second), thereby obtaining a seat image and an infrared image set of the smart toilet seat within the test period (such as Figure 2 as shown), and sent to the electronic device.
[0034] After the electronic device receives the seat circle image and the infrared image set, step S20 may be executed.
[0035] Step S20: registering each infrared image in the infrared image set based on the seat circle image.
[0036] In this embodiment, the electronic device can register each infrared image in the infrared image set with the seat circle image one by one (mainly the pixels of the seat circle area) so as to extract features later. In addition, the electronic device can determine the seat circle area from the seat circle image so as to analyze later. The seat circle area can be determined by edge detection and contour matching, and the seat circle area is determined from the seat circle image with a reference seat circle contour to ensure that the pixels of the seat circle area can have a one-to-one correspondence with the reference content (such as a reference vector set, a reference index set, etc.) in terms of pixels.
[0037] After the registration is completed, the electronic device may execute step S30.
[0038] Step S30: Based on all the registered infrared images, determine the feature vector of each pixel in the detection area to obtain a feature vector set, wherein the detection area is part or all of the seat area.
[0039] In this embodiment, the electronic device can determine the feature vector of each pixel in the detection area, where the detection area is part or all of the seat area, and this solution takes the entire seat area as the detection area as an example. In some other implementations, in order to improve efficiency, a core area that needs to be focused on detection can be determined from the seat area, which is not limited here.
[0040] Then, for each pixel in the detection area:
[0041] The electronic device can obtain the pixel value of each registered infrared image at the pixel, arrange the pixel value at the pixel in chronological order, and form a feature vector corresponding to the pixel. For example, the infrared image set collects a total of 480 infrared images (360 in the first stage and 120 in the second stage). Then, the pixel values (revealing the temperature) of these 480 infrared images at the pixel are arranged in chronological order to form a vector containing 480 element values as the feature vector corresponding to the pixel. This method is used to form the feature vector corresponding to each pixel in the detection area, thereby forming a feature vector set.
[0042] After obtaining the feature vector set, the electronic device may execute step S40.
[0043] Step S40: Based on the feature vector set and the reference vector set, a deviation index corresponding to each feature vector is determined, wherein the reference vector set is determined in advance based on a qualified smart toilet seat.
[0044] The electronic device can obtain a reference vector set, which includes a reference vector of each pixel in the reference seat area, and the reference seat area and the seat area also have a one-to-one correspondence in pixels. Therefore, the deviation index corresponding to each feature vector can be determined based on the reference vector set and the feature vector set.
[0045] Exemplarily, for each eigenvector in the eigenvector set, the deviation index corresponding to the eigenvector may be calculated using the following formula:
[0046]
[0047] Among them, δ i is the i-th eigenvector F i The corresponding deviation index, m is the eigenvector F i The total number of elements (e.g. 480), that is, the number of infrared images in the infrared image set (e.g. 480), and also the reference vector C i The total number of elements of F (then it is also 480), ij is the eigenvector F i The jth element of C ij is the reference vector C i The j-th element of .
[0048] In this way, the deviation index corresponding to each eigenvector can be determined, and then the electronic device can execute step S50.
[0049] Step S50: forming a seat ring temperature test image based on the deviation index corresponding to each feature vector in the feature vector set.
[0050] In this embodiment, the electronic device can obtain a reference index set corresponding to the reference vector set, and the reference index set includes a deviation index reference value corresponding to each reference vector in the reference vector set. Then, based on the deviation index corresponding to each feature vector in the feature vector set and each deviation index reference value in the reference index set, the deviation degree corresponding to each feature vector can be determined.
[0051] Exemplarily, for each feature vector in the feature vector set, the electronic device may use the following formula to calculate the deviation corresponding to the feature vector:
[0052]
[0053] Among them, p i is the eigenvector F i The corresponding deviation, [*] indicates rounding, δ i is the eigenvector F i The corresponding deviation index, r i is the reference vector C i The corresponding deviation index reference value, i.e., the i-th deviation index reference value in the reference index set, r i >0.
[0054] After determining the deviation corresponding to each eigenvector, the electronic device can further form a seat temperature test image based on the deviation corresponding to each eigenvector and the pixels corresponding to the eigenvector.
[0055] Exemplarily, the electronic device may obtain a grayscale image template corresponding to the sitting circle image, wherein the grayscale value of each pixel in the grayscale image template is 0 (the entire grayscale image template is a black template). The grayscale image template may be obtained in a pre-set manner, or by setting a grayscale image, using the sitting circle area of the sitting circle image, and determining the corresponding sitting circle area from the grayscale image, so as to subsequently assign values to pixels in the sitting circle area.
[0056] After obtaining the grayscale image template, the electronic device can convert the feature vector F i The corresponding deviation p i As the feature vector F i The grayscale value of the corresponding pixel in the grayscale template. After all the deviations corresponding to the feature vectors are assigned in the grayscale template in this way, the grayscale image formed is the seat ring temperature test image.
[0057] After obtaining the seat ring temperature test image, the electronic device may execute step S60.
[0058] Step S60: Detect the seat temperature test image to determine whether there is a problem area. If so, determine that the smart toilet seat temperature test fails. If not, determine that the smart toilet seat temperature test passes.
[0059] In this embodiment, the electronic device can detect the seat ring temperature test image:
[0060] First, the electronic device can perform threshold processing on the seat temperature test image, retain the grayscale values of pixels not lower than the set threshold, and set the grayscale values of pixels lower than the set threshold to zero to obtain an intermediate image. This set threshold can be a unified value, such as 50, or it can be different for different areas. For example, the detection area can be further subdivided into multiple sub-areas. Each sub-area has its own temperature characteristics during the process of heating and maintaining a constant temperature of the smart toilet seat, and the reasonable deviations that can exist are different. Therefore, it is necessary to set a different set threshold for each sub-area. This embodiment takes a unified set threshold as an example, but it is not limited to it.
[0061] After threshold processing, the electronic device can perform connected region detection on the obtained intermediate image to determine the non-zero grayscale connected region. This solution mainly detects the non-zero grayscale connected region, and the connected region detection method can be implemented by using the existing commonly used connected region detection algorithm (such as eight-neighborhood search algorithm, seed filling algorithm, connected component marking algorithm, etc.), which will not be described here.
[0062] After determining the non-zero grayscale connected regions, for each non-zero grayscale connected region:
[0063] The electronic device can determine whether the number of pixels in this non-zero grayscale connected area reaches a set number. If it reaches the set number, the non-zero grayscale connected area is determined to be a problem area. If it does not reach the set number, the non-zero grayscale connected area is determined to be a normal area.
[0064] In this way, the problem area detection of the seat ring temperature test image can be achieved.
[0065] If there is a problem area, the electronic device can determine that the smart toilet seat temperature test fails. If there is no problem area, the electronic device can determine that the smart toilet seat temperature test passes.
[0066] It should be noted that the reference vector set (including a corresponding number of reference vectors) mentioned in this embodiment, the source of each reference vector in the reference vector set, is to use a number of qualified smart toilet seats that have been inspected as temperature test objects, for each of the several qualified smart toilet seats, use the acquisition strategy in step S10 to collect each seat image and infrared image set, determine the corresponding feature vector set in turn, calculate the mean of the corresponding feature vectors of each feature vector set, that is, obtain the corresponding reference vector, thereby forming the reference vector set. And through the feature vector set corresponding to each qualified smart toilet seat of several qualified smart toilet seats, the reference vector set can be combined to calculate the corresponding deviation index set (here for the convenience of explanation, taking the feature vector set and the reference vector set of a qualified smart toilet seat as an example, the deviation index corresponding to each feature vector of the qualified smart toilet seat can be calculated, which is called the deviation index set), the deviation index set corresponding to each qualified smart toilet seat is integrated, and the corresponding mean calculation is also performed, and the average deviation index set obtained is used as the reference index set.
[0067] See also Figure 3 Based on the same inventive concept, an embodiment of the present application provides an infrared-based smart toilet seat temperature testing system 10, comprising: an image acquisition unit 11, for acquiring a seat image and an infrared image set of the smart toilet seat within a test cycle, wherein the test cycle includes a first stage and a second stage, the first stage uses a first frequency to collect infrared images, and the second stage uses a second frequency to collect infrared images.
[0068] The image registration unit 12 is used to register each infrared image in the infrared image set based on the seat circle image.
[0069] The feature extraction unit 13 is used to determine the feature vector of each pixel in the detection area based on all the registered infrared images to obtain a feature vector set, wherein the detection area is part or all of the seat area.
[0070] The index calculation unit 14 is used to determine the deviation index corresponding to each feature vector based on the feature vector set and the reference vector set, wherein the reference vector set is determined in advance based on a qualified smart toilet seat.
[0071] The image generating unit 15 is used to form a seat ring temperature test image based on the deviation index corresponding to each feature vector in the feature vector set.
[0072] The seat ring test unit 16 is used to detect the seat ring temperature test image to determine whether there is a problem area. If so, it is determined that the smart toilet seat ring temperature test is unqualified; if not, it is determined that the smart toilet seat ring temperature test is qualified.
[0073] In this embodiment, the feature extraction unit 13 is specifically used to: for each pixel in the detection area: obtain the pixel value of each registered infrared image on the pixel; arrange the pixel values on the pixel in chronological order to form a feature vector of the pixel.
[0074] In this embodiment, the index calculation unit 14 is specifically used to: for each feature vector in the feature vector set, calculate the deviation index corresponding to the feature vector using the following formula:
[0075]
[0076] Among them, δ i is the i-th eigenvector F i The corresponding deviation index, m is the eigenvector F i The total number of elements, that is, the number of infrared images in the infrared image set, is also the reference vector C i The total amount of elements, F ij is the eigenvector F i The jth element of C ij is the reference vector C i The j-th element of .
[0077] In this embodiment, the image generation unit 15 is specifically used to: obtain a reference index set corresponding to a reference vector set, the reference index set including a deviation index reference value corresponding to each reference vector in the reference vector set; determine the deviation corresponding to each feature vector based on the deviation index corresponding to each feature vector in the feature vector set and each deviation index reference value in the reference index set; and form a seat temperature test image based on the deviation corresponding to each feature vector and the pixel corresponding to the feature vector.
[0078] In this embodiment, the image generating unit 15 is specifically used to: for each feature vector in the feature vector set, calculate the deviation corresponding to the feature vector using the following formula:
[0079]
[0080] Among them, p i is the eigenvector F i The corresponding deviation, [*] indicates rounding, δ i is the eigenvector F i The corresponding deviation index, r i is the reference vector C i The corresponding deviation index reference value, i.e., the i-th deviation index reference value in the reference index set, r i >0.
[0081] In this embodiment, the image generation unit 15 is specifically used to: obtain a grayscale image template corresponding to the sitting circle image, wherein the grayscale value of each pixel in the grayscale image template is 0; i The corresponding deviation p i As the feature vector F i The grayscale value of the corresponding pixel in the grayscale image template; after the deviations corresponding to all feature vectors are assigned in the grayscale image template, the grayscale image formed is the seat temperature test image.
[0082] In this embodiment, the seat ring test unit 16 is specifically used to: perform threshold processing on the seat ring temperature test image, retain the grayscale values of pixels not lower than the set threshold, and set the grayscale values of pixels lower than the set threshold to zero, so as to obtain an intermediate image; perform connected area detection on the intermediate image to determine non-zero grayscale connected areas; for each non-zero grayscale connected area: determine whether the number of pixels in the non-zero grayscale connected area reaches the set number, if it reaches the set number, determine that the non-zero grayscale connected area is a problem area, if it does not reach the set number, determine that the non-zero grayscale connected area is a normal area.
[0083] An embodiment of the present application provides a storage medium, which is disposed in an electronic device. The storage medium includes a stored program, wherein when the program is run, the electronic device where the storage medium is located is controlled to execute an infrared-based smart toilet seat temperature test method.
[0084] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions. When the program instructions are loaded and executed by the processor, an infrared-based smart toilet seat temperature testing method is implemented.
[0085] In summary, the present application provides an infrared-based intelligent toilet seat temperature testing method and system:
[0086] By obtaining the seat ring image and infrared image set of the smart toilet seat ring during the test cycle (characterizing the first stage of the heating period and the second stage of the constant temperature period), each infrared image is registered based on the seat ring image, and the feature vector of each pixel in the detection area (part or all of the seat ring area) is further determined to obtain a feature vector set; then the deviation index corresponding to each feature vector is determined in combination with the reference vector set, and then the seat ring temperature test image is formed to detect the seat ring temperature test image to determine whether there is a problem area. If so, it is determined that the smart toilet seat ring temperature test is unqualified; if not, it is determined that the smart toilet seat ring temperature test is qualified. This method can conduct a seat ring temperature test by integrating the time dimension (spanning the entire process of heating the seat ring to a constant temperature) and the spatial dimension (covering each pixel in the detection area originating from the seat ring area), which can effectively reflect the problems in the process of heating the seat ring to a constant temperature, and can also reflect the problems in the seat ring area, thereby ensuring the accuracy and reliability of the seat ring temperature test, realizing effective detection of the seat ring temperature, and improving the factory quality control of smart toilets.
[0087] The pixel value of each registered infrared image at the pixel (reflecting the temperature of the pixel) is obtained respectively, and the pixel values on the pixel are arranged in chronological order (reflecting the temperature at different moments) to form a feature vector of the pixel. When calculating the deviation index corresponding to the feature vector, the corresponding formula is used to measure the deviation index, which can reflect the deviation index between the element value of each pixel and the reference element at each moment, and further compare it with each deviation index reference value in the reference index set to calculate and measure the deviation, which is finally reflected in the grayscale value of the seat ring temperature test image. The connected region detection in the field of image processing is used to realize the determination and positioning of the problem area, which can effectively detect the problems and potential quality risks of the seat ring in the temperature test.
[0088] Threshold processing is performed on the seat temperature test image, the grayscale values of pixels not lower than the set threshold are retained, and the grayscale values of pixels lower than the set threshold are assigned to zero to obtain an intermediate image. Connected region detection is performed on the intermediate image to determine the non-zero grayscale connected region. Threshold processing can effectively improve the efficiency of connected region detection and also leave a certain amount of room for error tolerance. By judging whether the number of pixels in the non-zero grayscale connected region reaches the set number, it is determined whether this non-zero grayscale connected region is a problem area, so that the comprehensive test of the seat temperature can be reliably achieved and the factory quality of the smart toilet can be controlled.
[0089] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0090] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for testing the temperature of an intelligent toilet seat ring based on infrared, characterized in that: include: Acquire a seat ring image and an infrared image set of the seat ring of the smart toilet during a test period, wherein the test period includes a first stage and a second stage, the first stage uses a first frequency to acquire infrared images, and the second stage uses a second frequency to acquire infrared images; Registering each infrared image in the infrared image set based on the sitting circle image; Based on all the registered infrared images, the feature vector of each pixel in the detection area is determined to obtain a feature vector set, wherein the detection area is part or all of the seat area; Based on the feature vector set and the reference vector set, a deviation index corresponding to each feature vector is determined, wherein the reference vector set is determined in advance based on a qualified smart toilet seat; Based on the deviation index corresponding to each eigenvector in the eigenvector set, a seat ring temperature test image is formed; Detect the seat temperature test image to determine whether there is a problem area. If so, determine that the smart toilet seat temperature test fails. If not, determine that the smart toilet seat temperature test passes. Based on all the registered infrared images, a feature vector of each pixel in the detection area is determined, including: for each pixel in the detection area: obtaining the pixel value of each registered infrared image at the pixel; arranging the pixel values at the pixel in chronological order to form a feature vector of the pixel; Based on the feature vector set and the reference vector set, a deviation index corresponding to each feature vector is determined, including: for each feature vector in the feature vector set, the deviation index corresponding to the feature vector is calculated using the following formula: , in, For the feature vector The corresponding deviation index, is the feature vector The total number of elements, that is, the number of infrared images in the infrared image set, is also the reference vector The total amount of elements, is the feature vector No. elements, is the reference vector No. elements.
2. The infrared-based intelligent toilet seat temperature testing method according to claim 1, characterized in that: Based on the deviation index corresponding to each eigenvector in the eigenvector set, a seat ring temperature test image is formed, including: Obtaining a reference index set corresponding to the reference vector set, the reference index set comprising a deviation index reference value corresponding to each reference vector in the reference vector set; Based on the deviation index corresponding to each eigenvector in the eigenvector set and each deviation index reference value in the reference index set, determining the deviation degree corresponding to each eigenvector; Based on the deviation corresponding to each eigenvector and the pixel corresponding to the eigenvector, a seat ring temperature test image is formed.
3. The infrared-based intelligent toilet seat temperature testing method according to claim 2, characterized in that: Based on the deviation index corresponding to each eigenvector in the eigenvector set and each deviation index reference value in the reference index set, the deviation degree corresponding to each eigenvector is determined, including: For each eigenvector in the eigenvector set, the deviation corresponding to the eigenvector is calculated using the following formula: , in, is the feature vector The corresponding deviation is Indicates rounding. is the feature vector The corresponding deviation index, is the reference vector The corresponding deviation index reference value, that is, the first A deviation index reference value, .
4. The infrared-based intelligent toilet seat temperature testing method according to claim 3, characterized in that: Based on the deviation corresponding to each eigenvector and the pixel corresponding to the eigenvector, a seat ring temperature test image is formed, including: Obtain the grayscale image template corresponding to the sitting circle image, wherein the grayscale value of each pixel in the grayscale image template is 0; The feature vector The corresponding deviation As a feature vector The gray value of the corresponding pixel in the grayscale image template; After the deviations corresponding to all eigenvectors are assigned in the grayscale image template, the resulting grayscale image is the seat ring temperature test image.
5. The infrared-based intelligent toilet seat temperature testing method according to claim 4, characterized in that: Inspect the seat temperature test image to determine if there are any problem areas, including: Threshold processing is performed on the seat ring temperature test image, the grayscale values of pixels not lower than the set threshold are retained, and the grayscale values of pixels lower than the set threshold are assigned to zero to obtain an intermediate image; Perform connected region detection on the intermediate image to determine the non-zero grayscale connected region; For each non-zero grayscale connected region: It is determined whether the number of pixels in the non-zero grayscale connected area reaches a set number. If it reaches the set number, the non-zero grayscale connected area is determined to be a problem area. If it does not reach the set number, the non-zero grayscale connected area is determined to be a normal area.
6. An infrared-based intelligent toilet seat temperature testing system, characterized in that: include: An image acquisition unit, used to acquire an image of a seat ring and an infrared image set of the seat ring of the intelligent toilet during a test period, wherein the test period includes a first stage and a second stage, the first stage uses a first frequency to acquire infrared images, and the second stage uses a second frequency to acquire infrared images; An image registration unit, used for registering each infrared image in the infrared image set based on the sitting circle image; A feature extraction unit is used to determine a feature vector of each pixel in a detection area based on all registered infrared images to obtain a feature vector set, wherein the detection area is part or all of the seat area; An index calculation unit, for determining a deviation index corresponding to each feature vector based on a feature vector set and a reference vector set, wherein the reference vector set is determined in advance based on a qualified smart toilet seat; An image generating unit, used for forming a seat ring temperature test image based on a deviation index corresponding to each eigenvector in the eigenvector set; A seat ring test unit is used to detect the seat ring temperature test image to determine whether there is a problem area. If so, it is determined that the smart toilet seat ring temperature test is unqualified; if not, it is determined that the smart toilet seat ring temperature test is qualified; The feature extraction unit is specifically used to: for each pixel in the detection area: respectively obtain the pixel value of each registered infrared image on the pixel; arrange the pixel values on the pixel in chronological order to form a feature vector of the pixel; The index calculation unit is specifically used to calculate the deviation index corresponding to each eigenvector in the eigenvector set using the following formula: , in, For the feature vector The corresponding deviation index, is the feature vector The total number of elements, that is, the number of infrared images in the infrared image set, is also the reference vector The total amount of elements, is the feature vector No. elements, is the reference vector No. elements.
7. A storage medium, characterized in that: The storage medium is arranged in an electronic device, and the storage medium includes a stored program, wherein when the program is running, the electronic device where the storage medium is located is controlled to execute the infrared-based intelligent toilet seat temperature testing method according to any one of claims 1 to 5.
8. An electronic device, characterized in that: It comprises a memory and a processor, the memory is used to store information including program instructions, the processor is used to control the execution of the program instructions, and the program instructions, when loaded and executed by the processor, implement the infrared-based intelligent toilet seat temperature testing method described in any one of claims 1 to 5.
