Gesture-based clothes drying rack control method, clothes drying rack and intelligent clothes drying system
Patent Information
- Application Number
- CN202611442951.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-17
- Publication Date
- 2026-10-20
AI Technical Summary
[0003]基于此,有必要针对现有技术中传感器设置于主机部位,悬挂于晾杆上的晾晒物对传感器的信号传输路径形成物理遮挡,导致晾杆的下降位置不准确的技术问题,提出了一种基于手势控制的晾衣机控制方法、晾衣机及智能晾衣系统
[0007]本申请的有益效果:飞行时间传感模组通过线缆与晾衣机连接且贴于墙面设置,这一安装方式使传感器的信号传输路径避开晾杆上悬挂的晾晒物,有助于消除晾晒物对信号的物理遮挡。相较于将传感器设置于主机部位的现有技术,该布局保证了传感器所采集的深度图数据能够完整反映晾衣机下方用户的三维空间信息,不会因衣物遮挡而导致数据缺失或失真。在此基础上,通过获取飞行时间传感模组采集的深度图数据并写入缓冲存储器,使得后续对手部运动轨迹的跨帧追踪和对人体目标的识别均以连续多帧的稳定数据为基础,可以避免单帧数据因信号波动而引入的检测偏差。当识别到下降手势时,根据当前帧深度图数据生成点云数据,并从中分割出人体点云和地面参考平面,通过检测头部端点与脚部端点、将脚部端点投影至地面参考平面,计算出沿地面参考平面法线方向的距离作为用户身高。该身高测量方式以实际地面为基准,不受传感器安装角度偏差或地面坡度的影响。在此基础上,本申请进一步根据晾杆当前高度与用户身高计算下降量,并以该下降量驱动电机带动晾杆执行下降操作。由此,整个控制链路从数据采集、人体识别、手势判定、身高测量到下降量计算均基于无遮挡的深度图数据完成,消除了晾晒物遮挡对信号采集的干扰,使得晾杆的最终停止位置能够与用户身高准确匹配,解决了现有技术中因传感器信号被遮挡而导致的晾杆下降位置不准确的问题。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the field of smart furniture technology, and in particular to a gesture-based clothes drying rack control method, a clothes drying rack, and a smart clothes drying system. Background Technology
[0002] With the development of smart home technology, clothes drying racks, as a common household appliance, are seeing continuous improvement in their intelligent control capabilities. Current clothes drying racks are equipped with sensors in the main unit to acquire user's physical or environmental parameters during the descent of the drying rod, helping to determine the rod's descent distance. However, in actual use, clothes drying racks typically have clothes, bedding, and other items hanging on the drying rod. When the rod rises to its highest position, these items, vertically positioned between the sensor and the area below the drying rack, physically obstruct the sensor's signal transmission path. Due to this obstruction, the sensor cannot accurately acquire target signals from the area below the drying rack, leading to deviations in judging the rod's current position or detecting targets below, thus affecting the accuracy of the rod's descent distance or position. Summary of the Invention
[0003] Based on this, it is necessary to address the technical problem in the existing technology where the sensor is located on the main unit and the clothes hanging on the drying rod physically obstruct the signal transmission path of the sensor, resulting in inaccurate descent position of the drying rod. Therefore, a gesture-based clothes drying rack control method, clothes drying rack, and intelligent clothes drying system are proposed.
[0004] In a first aspect, this application provides a gesture-based clothes drying rack control method, which is applied to a clothes drying rack and a time-of-flight sensing module. The time-of-flight sensing module is connected to the clothes drying rack via a cable and is mounted on a wall. The method includes: The depth map data collected by the time-of-flight sensing module is acquired, the depth map data is written into a buffer memory, and human targets are identified based on the depth map data in the buffer memory. When the human target is present and the duration of the human target's stay in the preset designated area exceeds a preset duration threshold, it is determined that the system is in a ready state. In response to the ready state, depth map data is read from the buffer memory; Based on the read continuous multi-frame depth map data, cross-frame tracking of the hand in the multi-frame depth map data is performed to extract the hand movement trajectory; When the hand movement trajectory matches the preset descent gesture template, corresponding point cloud data is generated based on the current frame in the continuous multi-frame depth map data. The human point cloud corresponding to the human target is segmented from the point cloud data, and a ground reference plane is fitted from the point cloud data. The head endpoint and foot endpoint in the human point cloud are detected, the foot endpoint is projected onto the ground reference plane, and the distance between the head endpoint and the projection point along the normal direction of the ground reference plane is calculated as the user's height. Obtain the current height of the drying rack and calculate the descent amount based on the current height and the user's height; The motor is controlled to rotate based on the descent amount, thereby driving the drying rack to perform the descent operation.
[0005] Secondly, this application provides a clothes drying rack, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the above-described method.
[0006] Thirdly, this application provides an intelligent clothes drying system, comprising: Clothes drying rack and time-of-flight sensing module; The time-of-flight sensing module is connected to the clothes drying rack via a cable, and the time-of-flight sensing module is mounted on the wall. The time-of-flight sensing module is used to collect depth map data and transmit the depth map data to the clothes drying rack via the cable. The clothes drying rack is used to acquire the depth map data, write the depth map data into a buffer memory, and identify human targets based on the depth map data in the buffer memory. The clothes drying rack is also used to determine that it is ready when the human target is present and the duration of the human target in the preset designated area exceeds a preset duration threshold. The clothes drying rack is also configured to, in response to the ready state, read depth map data from the buffer memory, and perform cross-frame tracking of the hand in the multi-frame depth map data based on the read continuous multi-frame depth map data, and extract the hand movement trajectory; The clothes drying rack is also used to generate corresponding point cloud data based on the current frame in the continuous multi-frame depth map data when the hand movement trajectory matches the preset descent gesture template, segment the human point cloud corresponding to the human target from the point cloud data, and fit the ground reference plane from the point cloud data. The clothes drying rack is also used to detect the head endpoint and foot endpoint in the human point cloud, project the foot endpoint onto the ground reference plane, and calculate the distance between the head endpoint and the projection point along the normal direction of the ground reference plane as the user's height. The clothes drying machine is also used to obtain the current height of the drying rod, calculate the descent amount based on the current height and the user's height, and control the motor to rotate based on the descent amount to drive the drying rod to perform the descent operation.
[0007] The beneficial effects of this application are as follows: The time-of-flight sensing module is connected to the clothes drying rack via cable and mounted on the wall. This installation method ensures that the sensor's signal transmission path avoids the clothes hanging on the drying rack, helping to eliminate physical obstruction of the signal by the clothes. Compared to existing technologies that place the sensor on the main unit, this layout ensures that the depth map data collected by the sensor can completely reflect the three-dimensional spatial information of the user below the clothes drying rack, without data loss or distortion due to clothing obstruction. Furthermore, by acquiring the depth map data collected by the time-of-flight sensing module and writing it into a buffer memory, subsequent cross-frame tracking of hand movement trajectories and recognition of human targets are based on stable data from multiple consecutive frames, avoiding detection bias introduced by signal fluctuations in single-frame data. When a descent gesture is detected, point cloud data is generated based on the current frame's depth map data, and the human point cloud and ground reference plane are segmented from it. By detecting the head endpoint and foot endpoint, projecting the foot endpoint onto the ground reference plane, the distance along the normal direction of the ground reference plane is calculated as the user's height. This height measurement method uses the actual ground as a reference, and is not affected by sensor installation angle deviation or ground slope. Based on this, this application further calculates the descent amount based on the current height of the drying rod and the user's height, and uses this descent amount to drive the motor to perform the descent operation. Therefore, the entire control chain, from data acquisition, human body recognition, gesture determination, height measurement to descent amount calculation, is completed based on unobstructed depth map data, eliminating interference from the drying clothes obstructing signal acquisition. This ensures that the final stopping position of the drying rod accurately matches the user's height, solving the problem of inaccurate descent position of the drying rod caused by sensor signal obstruction in existing technologies. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] in: Figure 1 This is a scene architecture diagram of the intelligent clothes drying system provided in the embodiments of this application; Figure 2 This is a flowchart illustrating a gesture-based clothes drying rack control method in one embodiment. Figure 3This is a schematic diagram of a computer storage medium provided in this application; Figure 4 This is a structural schematic diagram of a clothes drying rack provided in this application. Detailed Implementation
[0010] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0011] like Figure 1 As shown in the figure, this application embodiment provides a scene architecture diagram of an intelligent clothes drying system, which includes a clothes drying machine 1 and a time-of-flight sensing module 2.
[0012] The clothes drying rack 1 is installed on the ceiling or wall indoors, with a height-adjustable drying rod below it. The clothes drying rack 1 integrates a processor, motor, motor drive module, motor encoder, and buffer memory. The processor is connected to the motor drive module, motor encoder, buffer memory, indicator lights, and a buzzer. The motor drive module receives control signals from the processor and drives the motor accordingly. The motor, through a reel and rope, raises or lowers the drying rod. The motor encoder continuously monitors the number of rotations and direction of rotation, feeding the results back to the processor. The processor calculates the current height of the drying rod based on the encoder's feedback. Indicator lights and a buzzer are located on the main housing of the clothes drying rack 1 or on the drying rod. The processor uses different colors on the indicator lights and different beeps on the buzzer to provide feedback to the user on the current device status.
[0013] The Time-of-Flight (ToF) sensor module 2 is a 3D-ToF multi-point array sensor module, which integrates a light emitter, a light receiver, an image sensor, and processing circuitry. It can emit modulated light pulses and receive light pulses reflected back from the scene. By measuring the time of flight of the light pulses, it calculates the distance between each spatial point in the scene and the Time-of-Flight sensor module 2, and uses this to generate depth map data. The Time-of-Flight sensor module 2 is mounted on the wall and is parallel to the side of a person standing below the clothes dryer 1. That is, the field of view of the Time-of-Flight sensor module 2 is offset from the vertical drying area of the clothes dryer 1. The field of view of the Time-of-Flight sensor module 2 covers the designated area below the clothes dryer 1 for the user to stand and perform gesture operations, but does not cover the area where the clothes are hanging on the drying rod.
[0014] A communication connection is established between the clothes drying rack 1 and the time-of-flight sensing module 2 via a cable. One end of the cable is connected to the processor interface of the clothes drying rack 1, and the other end is connected to the data output interface of the time-of-flight sensing module 2. The depth map data collected by the time-of-flight sensing module 2 is transmitted in real time to the processor of the clothes drying rack 1 via this cable. After receiving the depth map data, the processor writes it into a buffer memory and performs a series of operations based on the depth map data in the buffer memory, including human target recognition, readiness state determination, hand movement trajectory extraction, gesture template matching, point cloud data generation, human point cloud segmentation, ground reference plane fitting, user height measurement, descent calculation, and motor drive control. The clothes drying rack 1 and the time-of-flight sensing module 2 cooperate with each other through the above-mentioned cable connection to jointly execute the gesture-based clothes drying rack control method provided in this application.
[0015] The time-of-flight sensing module 2 transmits the depth map data it collects to the clothes drying rack 1 via a cable. After processing, the processor of the clothes drying rack 1 sends configuration parameters or control commands to the time-of-flight sensing module 2 via the cable. This application does not limit the specific type of cable; the cable can be any of a universal serial bus, controller area network bus, serial peripheral interface bus, or integrated circuit bus. The cable also integrates a power cord, through which the clothes drying rack 1 supplies power to the time-of-flight sensing module 2. This eliminates the need for a separate power supply module for the time-of-flight sensing module 2, simplifying installation and maintenance.
[0016] like Figure 2 As shown in the diagram, in one embodiment, a flowchart of a gesture-based clothes drying rack control method is provided, which specifically includes the following steps: S1. Acquire depth map data collected by the time-of-flight sensing module, write the depth map data into a buffer memory, and identify human targets based on the depth map data in the buffer memory.
[0017] Depth map data refers to two-dimensional image data output by the time-of-flight sensing module. Each pixel in this image corresponds to a depth value, which represents the distance between the time-of-flight sensing module and the actual spatial point corresponding to that pixel. After acquiring this depth map data, the processor performs background modeling and foreground segmentation on multiple consecutive frames of depth map data, and extracts connected regions with human geometric features from the foreground, thereby identifying human targets from the depth map data. The human target refers to the set of pixel regions in the depth map data corresponding to a real human object. Subsequent operations by the processor, such as cross-frame tracking of the hand, segmentation of the human point cloud, and height measurement, are all based on this human target.
[0018] S2. When a human target is present and the duration of the human target's stay in the preset designated area exceeds a preset duration threshold, the system is determined to enter the ready state.
[0019] The preset designated area refers to a three-dimensional spatial range located below the clothes drying rack. This range is pre-calibrated based on the field of view of the time-of-flight sensor module and its installation position, and is used to define the effective area for interaction between the user and the clothes drying rack. The subsequent readiness determination process is only triggered when the processor identifies the position coordinates of a human target falling within this designated area. This eliminates interference from distant, irrelevant personnel and avoids mistakenly identifying passersby as the operator. This designated area can be adaptively set according to the installation height of different clothes drying rack models, the length of the drying rod, and user operating habits. For example, it can be set as a spatial range with the ground directly below the clothes drying rack as the reference point, horizontally covering the projection area of the drying rod and extending outward by 0.5 meters, and vertically extending from the ground to a height of 2.5 meters.
[0020] The preset time threshold is a parameter used to determine the time required to confirm that the user has a genuine intention to operate and is not just passing through. It is determined by sampling and statistically analyzing the actual dwell time of a large number of users from entering the designated area to making a gesture command, and setting it in a balance between preventing accidental triggering and user experience. If the time threshold is set too short, the ready state may be accidentally triggered due to normal user movement; if it is set too long, users will have to wait a long time under the clothes dryer before they can operate, affecting the user experience. A typical value can be 1.5 seconds to 2 seconds. For example, when set to 1.5 seconds, after the user enters the designated area and stays there for 1.5 seconds, the processor confirms that the ready state has been entered, and only then can the user perform a gesture operation.
[0021] S3. In response to the ready state, read the depth map data from the buffer memory.
[0022] S4. Based on the read continuous multi-frame depth map data, perform cross-frame tracking of the hand in the multi-frame depth map data and extract the hand motion trajectory.
[0023] Hand motion trajectory refers to the sequence of position changes formed by the processor tracking the same hand across multiple frames of depth map data, recording the hand's three-dimensional spatial position in different frames, and arranging these positions in chronological order. This sequence not only includes the hand's movement path in three-dimensional space but also implicitly contains the direction and distance of displacement between each frame. By analyzing this position change sequence, the processor extracts the direction and magnitude of the displacement vector and compares these motion features with preset gesture templates for descent, ascent, and pause to determine the user's current gesture intention.
[0024] Specifically, when the processor detects a hand moving continuously downwards in the vertical direction and the magnitude of the displacement vector exceeds a preset displacement threshold, it is determined to be a descent gesture; when it detects a hand moving continuously upwards in the vertical direction and the magnitude of the displacement vector exceeds the preset displacement threshold, it is determined to be an ascending gesture; when it detects a hand swinging back and forth in the horizontal direction and the swing amplitude exceeds a preset threshold, it is determined to be a pause gesture. Gestures in the same direction need to accumulate to a preset number of times within a preset time window before the processor confirms them as valid gesture commands. The hand movement trajectory is a high-level motion feature extracted by the processor from the raw depth map data. It connects the lower-level image data with the higher-level semantic gesture commands, constituting the core data object of the gesture recognition process.
[0025] S5. When the hand movement trajectory matches the preset descent gesture template, generate the corresponding point cloud data based on the current frame in the continuous multi-frame depth map data, segment the human point cloud corresponding to the human target from the point cloud data, and fit the ground reference plane from the point cloud data.
[0026] In this application, the ground reference plane refers to a three-dimensional spatial plane fitted by the processor from the current frame point cloud data collected by the time-of-flight sensing module. This plane serves as the height reference for subsequent calculations of the user's height. The processor uses a random sample consensus algorithm to extract the maximum plane from the point cloud data and compares the normal direction of this maximum plane with the vertical direction. When the angle between the two is less than a preset angle threshold, the maximum plane is identified as the ground reference plane. This ground reference plane does not simply treat the ground as a horizontal plane, but is dynamically fitted based on the actual point cloud data in the current scene. Even if there is a slight deviation in the sensor installation angle or a certain slope on the ground, the processor can still fit a reference plane that matches the actual ground. The role of the ground reference plane in height measurement is twofold: First, the processor's foot endpoint detection results may not be accurately located on the actual ground due to human posture or point cloud noise. In this case, the processor projects the foot endpoint onto the ground reference plane along the normal direction to obtain the corrected foot projection point. Second, using this plane as a reference, the processor calculates the distance along the normal direction between the head endpoint and the foot projection point as the user's height. Because the time-of-flight sensor module is mounted laterally against the wall, the point cloud data it collects completely covers the ground in the user's standing area, providing a reliable data foundation for accurate fitting of the ground reference plane.
[0027] S6. Detect the head endpoint and foot endpoint in the human point cloud, project the foot endpoint onto the ground reference plane, and calculate the distance between the head endpoint and the projection point along the normal direction of the ground reference plane as the user's height.
[0028] S7. Obtain the current height of the drying rack and calculate the descent amount based on the current height and the user's height.
[0029] S8. The motor is rotated based on the descent amount to drive the drying rack to perform the descent operation.
[0030] In one possible implementation, obtaining the current height of the drying rack and calculating the descent amount based on the current height and the user's height includes: S71. Calculate the target height based on the formula H_target = H_user + H_margin.
[0031] After obtaining the user's height, the processor reads a preset height margin from memory. This preset height margin is the distance reserved between the clothesline and the user's head after it is lowered. The processor calculates the target height according to the formula H_target = H_user + H_margin, where H_user represents the user's height, H_margin represents the preset height margin, and H_target represents the target height. This target height refers to the height of the clothesline's final position relative to the ground after the descent. The value of the preset height margin must balance the convenience and safety of the user's reach. If the value is too large, the clothesline will not descend sufficiently, and the user will still need to stand on tiptoe or raise their hand too high to retrieve clothes. If the value is too small, the clothesline may touch the user's head. After calculating the target height, the processor further compares it with the mechanical lower limit of the clothesline. If the target height is lower than the mechanical lower limit of the clothesline, the mechanical lower limit of the clothesline is used as the target height. The processor temporarily stores the calculated target height in memory.
[0032] For example, the processor calculates the user's height H_user to be 1.75 meters in step S6, and reads the preset height margin H_margin from memory as 0.2 meters. This preset height margin is set in advance based on ergonomic data and is suitable for the comfortable operating height of most users. The processor calculates the target height H_target to be 1.95 meters according to the formula H_target = 1.75 + 0.2. The processor reads that the mechanical lower limit of the drying rack is 0.5 meters. Since 1.95 meters is higher than 0.5 meters, the processor determines that the target height does not exceed the mechanical lower limit of the drying rack, and temporarily stores 1.95 meters as the target height in memory.
[0033] S72, According to the formula ΔH=H_current H_target calculates the descent amount, where H_user is the user's height, H_margin is the preset distance between the drying rack and the user's head after descent, and H_current is the current height of the drying rack.
[0034] The processor obtains the current height H_current of the drying rack from the feedback signal of the motor encoder. The motor encoder records the number of rotations and the direction of rotation of the motor in real time. Based on the transmission ratio of the motor and the diameter of the winding reel, the processor converts the encoder pulse signal into the current height value of the drying rack. This current height value refers to the actual height of the drying rack relative to the ground before the current descent operation is performed. The processor reads the target height H_target from the memory and calculates the descent amount according to the formula ΔH=H_current-H_target, where ΔH represents the descent amount, that is, the distance required for the drying rack to descend from the current height to the target height. If the calculated descent amount is positive, it indicates that the current height of the drying rack is higher than the target height, and the descent operation needs to be performed; if the calculated descent amount is negative, it indicates that the current height of the drying rack is lower than the target height, and the processor does not perform the descent operation and issues a prompt. If the descent amount is positive, the processor also compares the descent amount with the maximum descent stroke of the motor. If the descent amount exceeds the maximum descent stroke of the motor, the processor uses the maximum descent stroke of the motor as the actual execution value.
[0035] For example, the processor reads the current height H_current of the drying rack from the feedback signal of the motor encoder as 2.2 meters, and reads the target height H_target calculated in step S71 as 1.95 meters from the memory. The processor calculates the descent amount ΔH as 0.25 meters according to the formula ΔH = 2.2 - 1.95. Since this descent amount is positive, the processor determines that a descent operation needs to be performed. The processor reads the maximum descent stroke of the motor from the memory as 1.2 meters, compares 0.25 meters with 1.2 meters, and finds that 0.25 meters does not exceed 1.2 meters. The processor uses 0.25 meters as the execution value for this descent operation and transmits this value to the motor drive module to drive the motor to perform the descent action.
[0036] In one possible implementation, identifying the human target based on the depth map data in the buffer memory includes: S11. Perform statistical analysis on the depth map data of multiple consecutive frames to establish a background depth model in an unmanned state.
[0037] After acquiring depth map data from the time-of-flight sensing module, the processor writes the data into a buffer memory. The buffer memory stores multiple consecutive frames of depth map data, which the processor statistically analyzes to build a background depth model for unmanned operation. Specifically, the processor calculates the arithmetic mean and standard deviation of the depth values for each pixel in N consecutive frames of depth map data in the buffer memory, where the value of N must balance the stability and real-time performance of the statistical results. For each pixel location in each frame of depth map, the processor sums the depth values at that location across N frames and divides by N to obtain the average value, while simultaneously calculating the dispersion of the N depth values at that location relative to the average value as the standard deviation. The processor stores the average value and standard deviation corresponding to each pixel location in memory, forming the background depth model. This background depth model characterizes the reference distance and its fluctuation range of each spatial point in the scene relative to the time-of-flight sensing module in an unmanned environment. In subsequent processing, the processor continuously acquires new depth map data and updates the background depth model using a sliding window to adapt to the effects of ambient light and temperature changes on the depth values.
[0038] For example, the processor uses the most recent 50 frames of depth map data as a statistical sample. For a pixel location with coordinates (u, v) in the image, the processor reads the depth value sequence of that location across the 50 frames, sums these depth values, and divides them by 50 to obtain an average value of 2.0 meters. Simultaneously, it calculates the standard deviation of this sequence relative to the average value, which is 0.02 meters. The processor performs the above calculations for every pixel location in the image, storing the average value and standard deviation of all pixel locations in memory, thus completing the establishment of the background depth model.
[0039] S12. Perform pixel-by-pixel difference operation between the current frame depth map data and the background depth model, and mark pixels whose difference exceeds a preset difference threshold as foreground pixels.
[0040] After the background depth model is built, the processor acquires the current frame depth map data and performs pixel-by-pixel differencing operations between the current frame depth map data and the background depth model. Specifically, for each pixel location in the current frame, the processor reads the depth value at that location and reads the average value of the corresponding location from the background depth model, calculating the absolute value of the difference between the depth value and the average value. The processor compares this absolute value of the difference with a preset difference threshold, which is related to the standard deviation of the corresponding location in the background depth model, typically set to 2 to 3 times the standard deviation of that location in the background model. When the absolute value of the difference exceeds the preset difference threshold, it indicates that the depth value of the pixel location has changed significantly relative to the background, and the processor marks the pixel as a foreground pixel; when the absolute value of the difference does not exceed the preset difference threshold, the processor marks the pixel as a background pixel. The processor traverses all pixel locations in the current frame to complete the foreground and background classification of the entire image.
[0041] For example, if the depth value of a pixel in the current frame is 2.5 meters, and the average depth value at that location in the background depth model is 2.0 meters, the absolute value of the difference is 0.5 meters. The preset difference threshold for this location is 2.5 times the standard deviation of the background model. If the standard deviation of the background model is 0.02 meters, then the preset difference threshold is 0.05 meters. Since 0.5 meters is greater than 0.05 meters, the processor marks this pixel as a foreground pixel. After performing the above difference operation on all pixels in the image, the processor uses the set of all foreground pixels as the initial result for the foreground region.
[0042] S13. Perform connected component analysis on the foreground pixels to extract the area features, aspect ratio features, and contour shape features of the connected regions.
[0043] After marking foreground pixels, the processor performs connected component analysis on all foreground pixels. The goal of connected component analysis is to aggregate adjacent foreground pixels into independent connected regions, each corresponding to a foreground object in the scene. The processor uses an 8-connectivity or 4-connectivity criterion, meaning that two foreground pixels are grouped into the same connected region if they are adjacent in the horizontal, vertical, or diagonal directions. After traversing all foreground pixels, the processor obtains one or more connected regions, each containing a set of interconnected foreground pixels. For each extracted connected region, the processor calculates its area feature, aspect ratio feature, and contour shape feature. The area feature is the total number of pixels contained in the connected region. The aspect ratio feature is the ratio of the width of the bounding rectangle of the connected region in the horizontal direction to its height in the vertical direction. The contour shape feature is the geometric description of the boundary curve of the connected region, specifically the angular distribution and radial distance distribution of the boundary points relative to the center of the region. These features together constitute a feature vector describing the geometric properties of the connected region.
[0044] For example, after connected component analysis, the processor extracts a connected region containing 3000 foreground pixels, with an area feature of 3000 pixels. The bounding rectangle of this connected region has a width of 60 pixels and a height of 150 pixels, with an aspect ratio of 60 divided by 150 equaling 0.4. The processor extracts the contour boundary points of this connected region, calculates the radial distance of each boundary point relative to the center of the region, and forms a contour shape feature vector.
[0045] S14. Match the area feature, the aspect ratio feature, and the contour shape feature with a preset human body template. When the matching degree exceeds a preset matching threshold, the connected region is determined to be the human body target.
[0046] The processor matches the area features, aspect ratio features, and contour shape features of the connected regions extracted in step S13 with a preset human body template. The preset human body template is a standard feature vector pre-trained based on a large number of depth image samples of humans in different poses. This template includes the typical area range, aspect ratio range, and contour shape distribution of the human body in the depth image. Specifically, the processor calculates the similarity between the area features of the connected regions and the area features in the human body template, the similarity between the aspect ratio features and the aspect ratio features in the human body template, and the similarity between the contour shape features and the contour shape features in the human body template. These three similarities are then weighted and summed to obtain the overall matching degree between the connected regions and the human body template. The processor compares this overall matching degree with a preset matching threshold. When the overall matching degree exceeds the preset matching threshold, the processor determines the connected regions as human targets. This human target is the basis for subsequent hand detection and tracking in step S4 and human point cloud segmentation in step S5.
[0047] For example, the processor calculates that the area feature of a connected region has a similarity of 90% to the area feature of a human body template, the aspect ratio feature has a similarity of 85% to the aspect ratio feature of a human body template, and the contour shape feature has a similarity of 80% to the contour shape feature of a human body template. The weighting coefficients for these three similarities are 0.3, 0.3, and 0.4, respectively. Therefore, the overall matching degree is 0.9 multiplied by 0.3 plus 0.85 multiplied by 0.3 plus 0.8 multiplied by 0.4 equals 0.845, or 84.5%. With a preset matching threshold of 70%, 84.5% exceeds 70%, and the processor classifies the connected region as a human target.
[0048] The recognition method in this embodiment does not rely on color or texture information. It can accurately identify human targets in complex scenes using only depth data. It has strong environmental adaptability and anti-interference ability, and provides a reliable input data foundation for subsequent gesture recognition and height measurement.
[0049] In one possible implementation, determining the entry into the ready state when the human target is present and the duration of the human target's entry into the preset designated area exceeds a preset duration threshold includes: S21. Calculate the position coordinates of the human target in three-dimensional space.
[0050] In step S14, the processor has identified the connected region as a human target, which corresponds to a pixel region in the depth map data. The processor calculates the position coordinates of the human target in three-dimensional space. Specifically, the processor reads the depth value of each pixel in the pixel region where the human target is located from the depth map data, and converts these pixel coordinates and depth values into three-dimensional spatial coordinates according to the calibration parameters of the time-of-flight sensing module. The calibration parameters of the time-of-flight sensing module include lens focal length, principal point coordinates, and distortion coefficients, which are obtained in advance through a calibration program and stored in memory. During the conversion process, the processor first performs distortion correction on the pixel coordinates, and then maps the corrected pixel coordinates and depth values into X-axis, Y-axis, and Z-axis coordinate values in three-dimensional space according to the pinhole camera projection model. The Z-axis coordinate value represents the distance of the spatial point corresponding to the pixel relative to the time-of-flight sensing module along the optical axis, and the X-axis and Y-axis coordinate values represent the horizontal and vertical positions of the spatial point in the direction perpendicular to the optical axis. The processor averages the three-dimensional spatial coordinates of all pixels within the pixel region where the human target is located to obtain the single position coordinates of the human target in three-dimensional space. These position coordinates represent the centroid position of the human target.
[0051] For example, the processor reads 1500 pixels from the depth map data representing the human target area. For a pixel located at coordinates (320, 240) with a depth of 2.0 meters, the processor calculates its corresponding 3D spatial coordinates as (0.5 meters, 1.6 meters, 2.0 meters) based on the calibration parameters of the time-of-flight sensor module. The processor performs the above transformation on all pixels within the human target area, obtaining 1500 3D spatial coordinates. The processor averages these 3D spatial coordinates along the X, Y, and Z axes to obtain the human target's position coordinates as (0.45 meters, 1.55 meters, 2.05 meters), where the X-axis represents the left-right offset of the human target relative to the horizontal centerline of the clothes dryer, the Y-axis represents the height of the human target relative to the ground, and the Z-axis represents the distance of the human target relative to the time-of-flight sensor module along the optical axis.
[0052] S22. Determine whether the location coordinates fall within the specified area.
[0053] After calculating the position coordinates of the human target in three-dimensional space, the processor determines whether these coordinates fall within a preset designated area. This preset designated area is a predefined three-dimensional spatial range, defined in the coordinate system of the time-of-flight sensing module by the lower and upper limits of the X-axis, Y-axis, and Z-axis. The designated area is set based on the effective interactive space below the clothes dryer where users can stand and perform gesture operations. Its range needs to cover the body positions of users of different heights while excluding irrelevant areas on both sides and behind the clothes dryer. The processor compares the X-axis, Y-axis, and Z-axis components of the human target's position coordinates with the corresponding boundary values of the designated area. If the X-axis component is between the lower and upper limits of the X-axis, the Y-axis component is between the lower and upper limits of the Y-axis, and the Z-axis component is between the lower and upper limits of the Z-axis, the processor determines that the position coordinates fall within the designated area. If any coordinate component exceeds the corresponding boundary value range, the processor determines that the position coordinates do not fall within the designated area. An indicator light is installed on the clothes drying rod, and this indicator light is controlled by the processor. In the non-ready state, the processor control indicator light is red. When the processor determines that the human target's position coordinates fall within the designated area, the processor keeps the indicator light red and waits for timing confirmation.
[0054] For example, the preset designated area ranges from -0.8 meters to 0.8 meters in the X-axis direction, from 0.2 meters to 2.2 meters in the Y-axis direction, and from 1.0 meter to 3.0 meters in the Z-axis direction. The processor calculates the human target's position coordinates as 0.45 meters in the X-axis, 1.55 meters in the Y-axis, and 2.05 meters in the Z-axis. The processor compares the X-axis component 0.45 meters with the X-axis range of -0.8 meters to 0.8 meters; 0.45 meters falls within this range. It compares the Y-axis component 1.55 meters with the Y-axis range of 0.2 meters to 2.2 meters; 1.55 meters falls within this range. It compares the Z-axis component 2.05 meters with the Z-axis range of 1.0 meters to 3.0 meters; 2.05 meters falls within this range. Since all three coordinate components are within their corresponding boundary values, the processor determines that the human target's position coordinates fall within the designated area. At this point, the processor is not yet in a ready state, and the indicator light remains red.
[0055] S23. When the location coordinates fall into the designated area, the timing function is started to begin timing.
[0056] After determining that the human target's position coordinates have fallen into the designated area, the processor initiates a timing function. This timing function is implemented by the processor's internal timer module. The processor writes a start command to the timer module, and the timer module begins accumulating counts based on the system clock. During the timing process, the processor continuously monitors the human target's position coordinates and repeats steps S21 and S22 at preset sampling intervals to determine whether the human target remains within the designated area. If the human target remains within the designated area, the timer module continues to accumulate counts. If the processor determines that the human target has left the designated area during a sampling, it immediately writes a clear command to the timer module, resetting the count to zero and waiting for the human target to re-enter the designated area before restarting the timing. If the human target remains within the designated area but undergoes a slight positional movement, as long as its position coordinates remain within the boundary of the designated area, the timing function is unaffected and continues to accumulate counts. During the timing process, since the processor has not yet confirmed that it has entered the ready state, the indicator light remains red.
[0057] For example, once the processor determines that a human target has fallen into the designated area, it immediately starts an internal timer. Every 100 milliseconds, the processor recalculates the human target's position coordinates and determines if it remains within the designated area. At the 1st second, the processor detects that the human target's position coordinates are still within the designated area, and the timer continues to increment to 1 second. At the 1.2th second, the processor detects that the human target has moved to a position 0.9 meters on the X-axis due to adjusting its posture. This position exceeds the upper limit of the designated area's X-axis by 0.8 meters. The processor determines that the human target has left the designated area, immediately resets the timer, and the indicator light remains red. Afterward, the human target returns to a position 0.5 meters on the X-axis, and the processor restarts the timing function.
[0058] S24. When the timing duration exceeds the duration threshold, determine to enter the ready state.
[0059] During the timing function, the processor continuously compares the current timing duration with a preset duration threshold. The preset duration threshold is a time value pre-stored in memory, used to distinguish between intentional gesture operation by the user and accidental or brief pauses. When the processor detects that the current timing value of the timer module exceeds the preset duration threshold, the processor determines that it is entering a ready state. This ready state is a state indicator of the processor's internal state machine. Once in the ready state, the processor executes step S3 to read depth map data from the buffer memory and begin the gesture recognition process. Simultaneously with confirming entry into the ready state, the processor outputs a control signal to the indicator light driver module on the drying rack, switching the indicator light from red to green to indicate to the user that they are now in a state where gesture operation is possible. After entering the ready state, even if the human target subsequently leaves the designated area or the processor fails to detect the human target during a sampling, the triggered ready state remains valid, and the indicator light remains green until gesture recognition is completed or a timeout reset occurs. When the gesture recognition process ends or the ready state is reset due to a timeout, the processor controls the indicator light to switch back from green to red, reverting to the non-ready state.
[0060] For example, the preset duration threshold is 1.5 seconds. After the processor starts the timing function, it continuously monitors the timer's countdown. When the countdown reaches 0.5 seconds, the user is still within the designated area, and the indicator light remains red. When the countdown reaches 1.0 second, the user is still within the designated area, and the indicator light remains red. When the countdown reaches 1.5 seconds, the processor detects that the timer countdown equals the duration threshold and determines that it has entered the ready state. The processor sets the internal state machine flag to ready and simultaneously outputs a control signal to the indicator light driver module, causing the indicator light to switch from red to green. Once the user observes the green light, they can begin performing gesture operations. Subsequently, the processor executes step S3 to read depth map data from the buffer memory to begin the gesture recognition process. During the ready state, even if the user temporarily leaves the designated area or no human target is detected, the indicator light remains green. After the gesture recognition is completed or the ready state times out and resets, the processor controls the indicator light to switch back to red.
[0061] In one possible implementation, the step of performing cross-frame tracking of the hand in the depth map data based on read consecutive multi-frame depth map data and extracting the hand motion trajectory includes: S41. Within the range of the human target, the hand region is extracted by depth threshold segmentation.
[0062] In step S14, the processor has identified a human target from the depth map data, which corresponds to a pixel region in the depth map data. Within the range of the human target, the processor extracts the hand region through depth threshold segmentation. Specifically, the processor obtains the depth value of each pixel within the human target region and arranges these depth values in descending order. A larger depth value indicates that the spatial point corresponding to the pixel is farther from the time-of-flight sensing module, and a smaller depth value indicates that the distance is closer. In a standing posture, the hand is usually located in front of or to the side of the torso. Therefore, the hand region in the depth map data is represented by a set of pixels with smaller depth values than the torso region, i.e., closer to the sensor. The processor sets a depth offset threshold based on the median depth value of the human target region and extracts pixels with depth values less than the median minus the depth offset threshold as candidate hand pixels. The processor performs connected component analysis again on the candidate hand pixels, aggregating adjacent candidate hand pixels into connected regions and calculating the area and geometry of each connected region. Based on prior information about the size of the hand, the processor identifies connected regions whose area and geometry match the characteristics of the hand as hand regions.
[0063] S42. Perform cross-frame association matching on the hand region in the depth map data of multiple consecutive frames to determine the position of the same hand in different frames.
[0064] After extracting the hand region from each frame of depth map data across multiple consecutive frames, the processor performs cross-frame association matching on these hand regions to determine the position of the same hand in different frames. The purpose of cross-frame association matching is to resolve the correspondence between the same hand in adjacent frames. Because the position of the same hand changes with user movements in consecutive frames, the processor needs to associate the left hand region in the current frame with the left hand region in the previous frame, and the right hand region with the right hand region in the previous frame. Specifically, the processor obtains the center positions of the left and right hand regions from the depth map data of the previous frame, and obtains the center positions of the left and right hand regions in the depth map data of the current frame respectively. It then calculates the Euclidean distance between the center of the left hand region in the previous frame and the centers of the two hand regions in the current frame, as well as the Euclidean distance between the center of the right hand region in the previous frame and the centers of the two hand regions in the current frame. The processor uses a nearest neighbor matching strategy, identifying the pair with the smallest distance as the cross-frame association of the same hand. When multiple hand regions exist between two adjacent frames, the processor must also ensure that the matching relationship is one-to-one, meaning that a hand region in the current frame can be associated with at most one hand region in the previous frame as the same hand. The processor traverses multiple consecutive frames of depth map data, performing the above cross-frame association matching frame by frame, thereby determining the position trajectory of the same hand throughout the entire time series.
[0065] S43. Record the sequence of position changes of the same hand in different frames.
[0066] After completing cross-frame correlation matching of the hand region in consecutive multi-frame depth map data, the processor records the position change sequence of the same hand in different frames. The position change sequence refers to the set of center position coordinates of the same hand over time. Each element in this set corresponds to the three-dimensional spatial center position of the hand region in a particular frame, and the elements are arranged sequentially according to the time order of the frames. Starting from the initial frame, the processor sequentially reads the center position coordinates of the hand in each frame and writes these coordinates into a designated area of memory in chronological order, forming an ordered queue of position coordinates. When the processor processes a new frame, it appends the position coordinates of the hand in the new frame to the end of the queue, and the length of the queue increases with the number of frames. By maintaining this position change sequence, the processor completely records the evolution of the hand's spatial position over time throughout the entire movement process.
[0067] S44. Calculate the hand displacement vector based on the position change sequence to generate the hand movement trajectory.
[0068] The processor calculates the hand displacement vector based on the position change sequence to generate the hand motion trajectory. The displacement vector describes the direction and distance of the hand's position change in three-dimensional space from one frame to another. The processor sequentially reads the hand position coordinates of two adjacent frames from the position change sequence, calculates the difference between the position coordinates of the later frame and the position coordinates of the previous frame, and obtains the displacement vector within that time interval. The processor calculates the displacement vector for all adjacent frames in the position change sequence sequentially, obtaining a set of displacement vector sequences. This displacement vector sequence, together with the position change sequence, constitutes the hand motion trajectory. The hand motion trajectory includes both the absolute spatial position of the hand in each frame and the relative direction and distance of movement between frames. The processor uses the hand motion trajectory as input data for gesture template matching in step S5. In the subsequent gesture template matching process, the processor analyzes the direction, magnitude, and continuity of each displacement vector in the hand motion trajectory to determine whether it matches a preset descending gesture template, ascending gesture template, or pause gesture template.
[0069] In one possible implementation, when the hand movement trajectory matches a preset descent gesture template, generating corresponding point cloud data based on the current frame in the continuous multi-frame depth map data includes: S51. Compare the hand movement trajectory with the downward gesture template to determine whether the hand movement trajectory moves continuously downward in the vertical direction and whether the magnitude of the displacement vector exceeds a preset displacement threshold.
[0070] After generating the hand movement trajectory in step S44, the processor compares the trajectory with a preset descent gesture template. The preset descent gesture template is stored in memory and includes the characteristic judgment conditions for the descent gesture, specifically including continuous downward movement of the hand in the vertical direction and the magnitude of the displacement vector exceeding a preset displacement threshold. The processor extracts each displacement vector from the hand movement trajectory and checks the vertical component of each vector one by one. A displacement vector is a three-dimensional vector containing X-axis, Y-axis, and Z-axis components, where the Y-axis is the vertical direction. The processor determines whether the Y-axis component of each displacement vector is negative; a negative value indicates that the hand is moving downward in the vertical direction. When the processor detects that the Y-axis components of multiple consecutive displacement vectors in the hand movement trajectory are all negative, it determines that the hand movement trajectory is continuously moving downward in the vertical direction. Simultaneously, the processor calculates the magnitude of each displacement vector. The magnitude of a displacement vector refers to its total length in three-dimensional space, calculated by squaring the X-axis, Y-axis, and Z-axis components of the displacement vector, summing them, and then taking the square root. The processor compares the magnitudes of the calculated displacement vectors with a preset displacement threshold. The preset displacement threshold is a distance value pre-stored in memory, determined to be a critical value that can distinguish between intentional hand gestures and unintentional minor hand tremors. When the hand movement trajectory continuously moves downwards in the vertical direction and the magnitudes of all displacement vectors exceed the preset displacement threshold, the processor determines that the hand movement trajectory matches the downward gesture template. In actual implementation, the processor also sets a minimum consecutive frame count condition, requiring that the number of consecutive downward movements be no less than the preset minimum frame count, to avoid misjudging occasional short-term hand tremors as valid gestures.
[0071] For example, the processor extracts displacement vectors from the hand movement trajectory across five consecutive frames. The Y-axis components of each displacement vector are -0.1m, -0.12m, -0.09m, -0.11m, and -0.1m, all negative values, indicating continuous downward movement of the hand in the vertical direction. The processor calculates the magnitude of each displacement vector: the magnitude of the displacement vector from frame 1 to frame 2 is 0.11m, from frame 2 to frame 3 is 0.13m, from frame 3 to frame 4 is 0.10m, from frame 4 to frame 5 is 0.12m, and from frame 5 to frame 6 is 0.11m. With a preset displacement threshold of 0.08m, and since the magnitude of each displacement vector is greater than 0.08m, the processor determines that the hand movement trajectory matches the downward gesture template. Simultaneously, the processor checks that the number of consecutive downward movements is 5 frames, which is greater than the preset minimum number of frames (3 frames), further confirming the validity of the matching result.
[0072] S52. When the hand movement trajectory matches the descent gesture template, the last frame that triggered the matching in the continuous multi-frame depth map data is determined as the current frame.
[0073] After determining in step S51 that the hand movement trajectory matches the descent gesture template, the processor determines the current frame from the continuous multi-frame depth map data. The continuous multi-frame depth map data refers to a set of depth map frames for hand tracking read from the buffer memory in step S4. This set of frames is arranged in chronological order, forming a complete time sequence from the start frame to the end frame. In step S51, the processor determines the descent gesture frame by frame. When the arrival of a certain frame causes the processor to determine for the first time that the hand movement trajectory matches the descent gesture template, that frame is the frame that triggers the matching. However, to ensure the stability and reliability of the matching, the processor usually confirms a successful match only after multiple consecutive frames have met the matching conditions. Therefore, the last frame that triggers the matching refers to the last frame in the continuous multi-frame set that meets the matching conditions, i.e., the current frame when the matching is confirmed to be successful. The processor determines this last frame that triggers the matching as the current frame. This frame contains the scene depth information at the moment the user's gesture command is issued, which is the data basis for subsequently generating point cloud data for height measurement. After determining the current frame, the processor reads the complete depth map data of the frame from the buffer memory and temporarily stores it in the working memory for subsequent processing.
[0074] For example, the processor reads 10 consecutive frames of depth map data from the buffer memory for hand tracking, labeled as frames 1 to 10. Starting from frame 1, the processor calculates the displacement vector frame by frame and compares it with the descending gesture template. The magnitudes of the displacement vectors in frames 1 to 4 are all less than a preset displacement threshold, failing to meet the matching condition. From frame 5 onwards, the magnitude of the displacement vector exceeds the preset displacement threshold and is vertically downward, indicating that the processor is detecting a matching trend. Frames 5, 6, and 7 all meet the matching condition, and the processor confirms a successful match in frame 7, designating it as the last frame to trigger matching, i.e., the current frame. The processor reads the complete depth map data for frame 7 from the buffer memory and temporarily stores it in the working memory.
[0075] S53. Based on the calibration parameters of the time-of-flight sensing module, the depth value of each pixel in the current frame depth map data is converted into three-dimensional spatial coordinates to generate the point cloud data.
[0076] After determining the current frame, the processor converts the depth value of each pixel in the current frame's depth map data into three-dimensional spatial coordinates based on the calibration parameters of the time-of-flight (TOF) sensor module, generating point cloud data. The TOF sensor module's calibration parameters include the camera intrinsic matrix and distortion coefficients. The camera intrinsic matrix contains focal length parameters and principal point coordinate parameters, which are pre-obtained through calibration experiments on the TOF sensor module and stored in memory. During the conversion process, the processor reads the pixel coordinates and depth value of each pixel from the current frame's depth map data. The pixel coordinates include the u-value in the horizontal direction and the v-value in the vertical direction, and the depth value is the distance between the corresponding spatial point and the TOF sensor module. The processor first performs distortion correction on the pixel coordinates using the distortion coefficients to obtain the corrected pixel coordinates. Subsequently, the processor establishes a mapping relationship from pixel coordinates and depth values to three-dimensional spatial coordinates based on the camera intrinsic matrix. Specifically, it multiplies the corrected pixel coordinates by the depth value and divides by the focal length parameter to obtain the pixel's X-axis and Y-axis coordinates in three-dimensional space. The Z-axis coordinate is directly taken as the pixel's depth value. The processor performs the above transformation on each pixel in the current frame's depth map data, resulting in a set of three-dimensional spatial coordinate points, which constitutes the point cloud data. Each point in the point cloud data contains three values: X-axis coordinate, Y-axis coordinate, and Z-axis coordinate, representing the horizontal, vertical, and depth positions of the point in three-dimensional space, respectively. The processor stores the generated point cloud data in its working memory as input data for human body point cloud segmentation and ground reference plane fitting in step S5.
[0077] In one possible implementation, segmenting the human point cloud corresponding to the human target from the point cloud data and fitting a ground reference plane from the point cloud data includes: S54. Based on the pixel region of the human target in the depth map data, extract the point cloud of the corresponding region from the point cloud data as the human point cloud.
[0078] The point cloud data generated by the processor in step S53 has a one-to-one correspondence with the current frame depth map data at the pixel level. Each three-dimensional spatial point in the point cloud data originates from the depth value transformation of the corresponding pixel in the current frame depth map data. Therefore, the point cloud data retains the mapping relationship between each point and the pixel coordinates in the depth map data. In step S14, the processor has determined the pixel region corresponding to the human target in the depth map data. This pixel region contains a set of pixel coordinates. Based on this set of pixel coordinates, the processor extracts the three-dimensional spatial points corresponding to the set of pixel coordinates from the point cloud data, obtaining a set of three-dimensional spatial points, which is the human point cloud corresponding to the human target. Since the human point cloud may contain a small number of background noise points or outliers caused by depth jumps between the human edge region and the background region in the depth map data, the processor further performs outlier filtering after extracting the human point cloud. Specifically, the processor calculates the average distance between each point in the human point cloud and its neighboring points, and determines points whose average distance exceeds a preset outlier threshold as outliers and removes them from the human point cloud, obtaining the filtered human point cloud. This human point cloud serves as the data foundation for detecting the head and foot endpoints in the subsequent step S6.
[0079] For example, in step S14, the processor determines that the pixel region corresponding to the human target contains 8000 pixels located in the range of pixel coordinates (300, 200) to (500, 450). Based on these pixel coordinates, the processor extracts the corresponding 8000 three-dimensional spatial points from the point cloud data generated in step S53 to form an initial human point cloud. The processor calculates the average distance between each point and its five nearest neighbors, and finds that the average distance of 15 points exceeds a preset outlier threshold of 0.05 meters. These 15 points are identified as outliers and removed, resulting in a filtered human point cloud with a total of 7985 three-dimensional spatial points.
[0080] S55. The maximum plane is extracted from the point cloud data using the random sampling consistency algorithm.
[0081] After segmenting the human point cloud, the processor uses a random sample consensus algorithm to extract the largest plane from all point cloud data generated in step S53. The random sample consensus algorithm is an iterative method for estimating mathematical model parameters from data containing noise and outliers. Its core idea is to find model parameters that best explain the data distribution through random sampling and consensus checks. Specifically, the processor randomly selects three non-collinear points from all point cloud data and calculates initial parameters for a plane equation based on the three-dimensional coordinates of these three points. This plane equation is expressed as the normal direction vector and the distance from the plane to the origin. The processor iterates through each point in the entire point cloud data, calculating the perpendicular distance from that point to the initial plane. If the perpendicular distance is less than a preset distance threshold, the point is marked as an interior point, i.e., a point that conforms to the plane model; if the perpendicular distance is greater than or equal to the preset distance threshold, the point is marked as an exterior point, i.e., a point that does not conform to the plane model. The processor counts the number of all interior points as a score for the plane model. The processor repeatedly executes the above-described processes of random sampling, plane parameter calculation, and interior point statistics. Each iteration generates a plane model and its corresponding number of interior points and interior point set. When the number of iterations reaches a preset maximum or the proportion of the number of interior points of the current best plane model to the total number of point clouds exceeds a preset threshold, the processor terminates the iteration and determines the plane model with the most interior points as the maximum plane. This maximum plane is the plane structure with the largest area and the most concentrated distribution in the point cloud data, typically corresponding to major planes such as the ground, walls, or ceiling in the scene.
[0082] For example, the processor randomly selects three non-collinear points from the entire point cloud data: (0.1 m, 0.0 m, 2.0 m), (0.5 m, 0.0 m, 1.8 m), and (0.8 m, 0.0 m, 2.1 m). Based on these three points, the normal direction of the plane equation is calculated to be (0.01, 0.99, 0.02), and the distance from the plane to the origin is 0.02 meters. The processor iterates through all 100,000 point cloud points, calculating the vertical distance from each point to the plane. Points with a vertical distance less than a preset distance threshold of 0.02 meters are marked as interior points, resulting in 85,000 interior points. The processor repeats this process 100 times. The 35th iteration yields a plane model with 92,000 interior points, the maximum value across all iterations. The processor determines this plane model as the maximum plane. This maximum plane contains the vast majority of points in the point cloud data and corresponds to the ground in the scene.
[0083] S56. Compare the normal direction of the maximum plane with the vertical direction. When the angle between the normal direction and the vertical direction is less than a preset angle threshold, the maximum plane is determined as the ground reference plane.
[0084] After obtaining the normal direction of the maximum plane in step S55, the processor compares this normal direction with the vertical direction. The vertical direction is a predefined reference direction in three-dimensional space, usually based on the direction of gravity. In the coordinate system of the time-of-flight sensing module, the vertical direction corresponds to the Y-axis. The processor calculates the angle between the normal direction of the maximum plane and the vertical direction. Specifically, the processor calculates the dot product between the normal vector of the maximum plane and the unit vector of the vertical direction, divides the dot product by the product of the magnitude of the normal vector and the magnitude of the unit vector of the vertical direction to obtain the cosine of the angle, and then calculates the angle value using the inverse cosine function. The processor compares this angle with a preset angle threshold, which is an angle value pre-stored in memory, and its value is based on the maximum allowable tilt angle of the ground relative to the horizontal plane. When the angle between the normal direction and the vertical direction is less than the preset angle threshold, it indicates that the normal direction of the maximum plane is approximately parallel to the vertical direction, that is, the maximum plane is approximately horizontal, which conforms to the geometric characteristics of the ground, and the processor determines the maximum plane as the ground reference plane. When the ground has a slight slope, the normal direction of the largest plane will deviate from the vertical direction accordingly. However, as long as the deviation angle is less than a preset angle threshold, the largest plane is still considered as the ground reference plane. If the angle between the normal direction and the vertical direction is greater than or equal to the preset angle threshold, it indicates that the largest plane is not the ground. The processor discards the largest plane and re-executes step S55 to find the second largest plane for judgment, until a ground reference plane that meets the conditions is found.
[0085] For example, the processor obtains the normal direction of the maximum plane in step S55 as (0.01, 0.98, 0.02) and the vertical direction as (0, 1, 0). The processor calculates the angle between the normal direction and the vertical direction. The dot product of the normal vector (0.01, 0.98, 0.02) and the vertical unit vector (0, 1, 0) is 0.98, and the magnitude of the normal vector is 0.98. Dividing the dot product by the magnitude yields the cosine of the angle, which is 1.0. Using the inverse cosine function, the angle is calculated to be approximately 1.2 degrees. With a preset angle threshold of 5 degrees, 1.2 degrees is less than 5 degrees, so the processor determines this maximum plane as the ground reference plane. This ground reference plane is subsequently used for the projection correction of the foot endpoints and the calculation of the user's height in step S6.
[0086] In one possible implementation, detecting the head endpoint and foot endpoint in the human point cloud, projecting the foot endpoint onto the ground reference plane, and calculating the distance between the head endpoint and the projection point along the normal direction of the ground reference plane as the user's height includes: S61. Find the point with the largest vertical coordinate value in the human body point cloud, and take the point with the largest coordinate value as the head endpoint.
[0087] In step S54, the processor obtains the filtered human point cloud. Each 3D point in the human point cloud contains three values: X-axis coordinate, Y-axis coordinate, and Z-axis coordinate. The Y-axis coordinate represents the vertical height of the point. The processor iterates through each point in the human point cloud, reads the Y-axis coordinate value of that point, and finds the point with the largest Y-axis coordinate value through a comparison operation. Specifically, the processor initializes a variable to store the currently found maximum Y-axis coordinate value, with the initial value set to a minimum. Then, it sequentially reads the Y-axis coordinate of each point in the human point cloud. When the read Y-axis coordinate is greater than the currently stored maximum value, the Y-axis coordinate value of that point is updated to the new maximum value, and the complete 3D coordinates of that point are recorded simultaneously. After the processor has traversed all points, the recorded 3D coordinates are the points with the largest vertical coordinate values in the human point cloud. This point corresponds to the highest position of the human body in the vertical direction when standing, i.e., the position of the top of the human head. Because depth map data may contain a small number of noise points or outliers in the head region due to occlusion by hair, hats, etc., the processor further smooths the data by incorporating the average value of the local neighborhood when determining the head endpoint. Specifically, after finding the candidate point with the largest Y-axis coordinate value, the processor selects neighboring points within a 5-centimeter radius of that point, calculates the average Y-axis coordinate of these neighboring points, and uses the position corresponding to this average value as the final head endpoint. This head endpoint serves as the upper reference point for subsequent calculations of the user's height.
[0088] S62. Find the point with the smallest vertical coordinate value in the human body point cloud, and take the point with the smallest coordinate value as the foot endpoint.
[0089] The processor searches for the point with the smallest vertical coordinate value in the human body point cloud. Specifically, the processor initializes a variable to store the currently found minimum Y-axis coordinate value, initially setting it to a maximum value. Then, it sequentially reads the Y-axis coordinate of each point in the human body point cloud. When the read Y-axis coordinate is less than the currently stored minimum value, the processor updates the Y-axis coordinate of that point to the new minimum value and simultaneously records the complete 3D coordinates of that point. After the processor has traversed all points, the recorded 3D coordinates are the point with the smallest vertical coordinate value in the human body point cloud. This point corresponds to the lowest position of the human body in the vertical direction when standing, i.e., the position of the soles of the feet. In a normal standing posture, the soles of the feet should be in contact with the ground. However, due to the measurement noise of the time-of-flight sensor module and the influence of factors such as shoe sole material and lighting conditions on the human foot area point cloud, there may be a slight distance deviation between the detected foot endpoints in the human body point cloud and the actual ground. After finding the foot endpoints, the processor temporarily stores these points in memory for subsequent projection correction in step S63.
[0090] S63. Project the foot endpoint along the normal direction of the ground reference plane onto the ground reference plane to obtain the foot projection point.
[0091] After obtaining the foot endpoint in step S62, the processor projects the foot endpoint onto the ground reference plane along the normal direction of the ground reference plane to obtain the foot projection point. The goal of the projection operation is to correct the foot endpoint onto the ground reference plane, eliminating the height deviation between the foot endpoint and the actual ground caused by measurement noise or human posture, so that the reference point for height measurement is accurately located on the ground. The ground reference plane has been fitted by the processor in step S56 and stored in the memory. This plane is defined by the normal direction vector of the plane equation and the distance from the plane to the origin. The processor reads the normal direction vector of the ground reference plane from the memory and projects the three-dimensional coordinates of the foot endpoint onto the ground reference plane along the normal direction. The specific calculation method for projection is as follows: The processor calculates the vector between the foot endpoint and any point on the ground reference plane, then calculates the dot product between this vector and the normal direction vector of the ground reference plane. The dot product value is divided by the square of the magnitude of the normal direction vector to obtain the projection distance coefficient. The processor multiplies the projection distance coefficient by the normal direction vector to obtain the projection displacement vector. The processor subtracts the projection displacement vector from the three-dimensional coordinates of the foot endpoint to obtain the three-dimensional coordinates of the foot projection point. This foot projection point is located on the ground reference plane and serves as the lower reference point for subsequent calculations of the user's height.
[0092] S64. Calculate the distance along the normal direction between the head endpoint and the foot projection point, and use the distance as the user's height.
[0093] After obtaining the head endpoint in step S61 and the foot projection point in step S63, the processor calculates the distance between the head endpoint and the foot projection point along the normal direction of the ground reference plane. Specifically, the processor calculates the vector between the head endpoint and the foot projection point, i.e., the difference vector obtained by subtracting the head endpoint coordinates from the foot projection point coordinates. Then, the processor calculates the component of this difference vector along the normal direction of the ground reference plane, which is the distance between the head endpoint and the foot projection point along the normal direction. This distance represents the actual height of the human body in the vertical direction and is not affected by ground tilt or sensor installation angle deviation, because this distance is measured along the normal direction of the ground reference plane, and the normal direction is perpendicular to the ground reference plane. The processor uses this distance as the user's height and stores the user's height value in memory for use in calculating the target height in step S71. During the calculation process, if the component of the difference vector between the head endpoint and the foot projection point in the normal direction is positive, then this positive value is directly used as the user's height; if it is negative, then the absolute value is taken as the user's height.
[0094] In one embodiment of this application, the method further includes: A1. In the ready state, when the hand movement trajectory matches the preset upward gesture template, the motor is driven to drive the drying rack to perform an upward operation.
[0095] After determining the ready state in step S24, the processor continuously monitors the hand movement trajectory. In the ready state, the processor compares the hand movement trajectory with a preset descending gesture template and also with a preset ascending gesture template. The preset ascending gesture template is stored in memory and contains the characteristic judgment conditions for the ascending gesture, specifically including continuous upward movement of the hand in the vertical direction and the magnitude of the displacement vector exceeding a preset displacement threshold. The processor extracts each displacement vector from the hand movement trajectory and checks the vertical component, i.e., the Y-axis component, of each displacement vector one by one. The processor determines whether the Y-axis component of each displacement vector is positive; a positive value indicates that the hand is moving upward in the vertical direction. When the processor detects that the Y-axis components of multiple consecutive displacement vectors in the hand movement trajectory are all positive, it determines that the hand movement trajectory is continuously moving upward in the vertical direction. At the same time, the processor calculates the magnitude of each displacement vector and compares the calculated magnitude of each displacement vector with the preset displacement threshold. When the hand movement trajectory continuously moves upward in the vertical direction and the magnitude of each displacement vector exceeds a preset displacement threshold, the processor determines that the hand movement trajectory matches the rising gesture template. After successful matching, the processor outputs a rising control signal to the motor drive module, driving the motor to perform the rising operation by moving the drying rack at a preset rising speed. The rising operation is a continuous action. During the rising process, the processor continuously monitors the hand movement trajectory. If a pause gesture is detected during the rising process, the rising is stopped immediately. If the drying rack is detected to have reached the mechanical upper limit, the rising is automatically stopped. During the execution of the rising operation, the processor monitors the number of rotations and the direction of rotation of the motor in real time through the feedback signal of the motor encoder to ensure that the actual rising distance of the drying rack is consistent with the expectation.
[0096] For example, the processor extracts displacement vectors from the hand movement trajectory over five consecutive frames. The Y-axis components of each displacement vector are positive (0.12m, 0.10m, 0.11m, 0.13m, and 0.09m), all positive values, indicating continuous upward movement of the hand in the vertical direction. The processor calculates the magnitudes of each displacement vector to be 0.13m, 0.11m, 0.12m, 0.14m, and 0.10m, respectively. With a preset displacement threshold of 0.08m, and since the magnitude of each displacement vector is greater than 0.08m, the processor determines that the hand movement trajectory matches the upward gesture template. The processor then outputs an upward control signal to the motor drive module, driving the motor to move the drying rack at a speed of 0.1m per second to perform the upward operation. During the upward movement, the processor continuously reads the motor encoder feedback signal to monitor the actual upward distance.
[0097] A2. In the ready state, when the hand movement trajectory matches the preset pause gesture template, the motor is controlled to stop running.
[0098] In the ready state, the processor also compares the hand movement trajectory with a preset pause gesture template. The preset pause gesture template is stored in memory and includes the characteristic judgment conditions for the pause gesture, specifically including the reciprocating swing of the hand in the horizontal direction and the swing amplitude exceeding a preset amplitude threshold. The processor extracts each displacement vector from the hand movement trajectory and checks the changes in the horizontal component (X-axis component and Z-axis component) of each displacement vector one by one. The typical characteristic of the pause gesture is the left-right swing of the hand in the horizontal direction, that is, alternating positive and negative displacement in the X-axis direction. The processor determines whether there are multiple consecutive alternating changes in the horizontal displacement direction in the hand movement trajectory and whether the magnitude of the horizontal component of each displacement vector exceeds the preset amplitude threshold. When the processor detects that the hand movement trajectory meets the above conditions, it determines that the hand movement trajectory matches the pause gesture template. The matching conditions for the pause gesture are clearly distinguishable from those for the descending and ascending gestures in terms of movement direction. The descending and ascending gestures are characterized by unidirectional continuous movement in the vertical direction, while the pause gesture is characterized by reciprocating swing in the horizontal direction. The differences in the movement direction characteristics of the different gestures are significant and not easily confused. After determining that the hand movement trajectory matches the pause gesture template, the processor outputs a stop signal to the motor drive module, controlling the motor to stop operating. If the motor is currently stationary, the stop signal keeps the motor stationary; if the motor is currently ascending or descending, the stop signal immediately brakes the motor and maintains the current height. After the motor stops operating, the processor confirms that the pause command has been executed by using an indicator light with a specific flashing pattern or by emitting a buzzer sound, informing the user that the system has responded to their pause operation.
[0099] For example, the processor extracts displacement vectors from the hand movement trajectory over six consecutive frames. The X-axis components of each displacement vector are positive 0.15 meters, negative 0.13 meters, positive 0.16 meters, negative 0.14 meters, positive 0.12 meters, and negative 0.15 meters, respectively. This means the X-axis components of the displacement vectors alternate between positive and negative values, indicating that the hand is swinging back and forth in the horizontal direction. The horizontal component magnitudes of each displacement vector are 0.15 meters, 0.13 meters, 0.16 meters, 0.14 meters, 0.12 meters, and 0.15 meters, respectively. The preset amplitude threshold is 0.10 meters. Since the horizontal component magnitudes of each displacement vector are all greater than 0.10 meters, the processor determines that the hand movement trajectory matches the pause gesture template. Assuming the motor is currently performing an upward operation, the processor immediately outputs a stop signal to the motor drive module after determining a successful match, controlling the motor to stop operating. The drying rack stops at the current height, and the processor controls the indicator light to flash green three times at a frequency of twice per second and emits two short beeps to confirm that the pause command has been executed.
[0100] In one possible implementation, an infrared sensor is installed below the clothes drying rod of the clothes dryer, and the method further includes: B1. During the process of driving the motor to drive the drying rod to perform the lowering operation, the electrical signal output by the infrared sensor is acquired.
[0101] An infrared sensor is installed beneath the clothes drying rack's rod. This sensor is connected to the rack's processor and is used to detect the presence of a human body beneath the rod. The infrared sensor typically employs a passive infrared detection principle, containing a pyroelectric infrared sensing element. This element detects changes in infrared radiation emitted by a human body within its field of view. When a human enters the sensor's detection area, the infrared radiation emitted by the human is received by the sensing element and converted into a weak voltage change signal. This voltage change signal is amplified by an internal amplifier circuit and output as an electrical signal to the processor's analog-to-digital converter (ADC). During this step, the processor continuously acquires the electrical signal output by the infrared sensor, i.e., reads the sampled values from the ADC to obtain the corresponding digital value. Throughout the entire descent of the drying rack, the processor continuously acquires the infrared sensor's electrical signal at a preset sampling frequency, ensuring timely detection of any sudden human presence beneath the drying rack. The infrared sensor's detection field of view covers the area directly beneath the drying rack, corresponding to the space below the interaction area specified in step S2. When a human is standing directly beneath the drying rack, they are within the effective detection range of the infrared sensor.
[0102] B2. Determine whether there is a human body under the drying rack based on the amplitude of the electrical signal.
[0103] After acquiring the electrical signal output by the infrared sensor, the processor determines whether a human body is present under the drying rack based on the amplitude of the signal. The amplitude of the electrical signal refers to its voltage value, which is related to the presence of a human body within the detection range of the infrared sensor and the distance between the human body and the sensor. When no one is present, there is no heat source movement within the detection area of the infrared sensor, and its output electrical signal remains at a low baseline level. When a human body enters the detection area, the infrared radiation emitted by the human body causes a change in charge in the pyroelectric sensitive element, increasing the amplitude of the output electrical signal. The increased amplitude level is related to the distance between the human body and the sensor; the closer the distance, the larger the amplitude. The processor reads the voltage value of the electrical signal from the analog-to-digital conversion result and compares this voltage value with a preset amplitude threshold. This preset amplitude threshold is a voltage value predetermined based on experimental calibration, which is higher than the signal fluctuation level caused by environmental noise and lower than the signal level generated by a human body at the minimum safe distance. When the amplitude of the electrical signal read by the processor is greater than the preset amplitude threshold, it is determined that a human body is present under the drying rack; when the amplitude of the electrical signal is less than or equal to the preset amplitude threshold, it is determined that no human body is present under the drying rack. To improve the reliability of detection and avoid misjudgments caused by transient noise interference, the processor also adopts a strategy of multiple sampling and comprehensive judgment when making a judgment. That is, the presence of a human body is only determined when multiple consecutive sample values exceed the preset amplitude threshold.
[0104] For example, the preset amplitude threshold is 0.2 volts. During the descent of the clothesline, if the processor repeatedly reads an amplitude of 0.8 volts from the infrared sensor, which exceeds the preset threshold of 0.2 volts, the processor determines that a person is present under the clothesline. If the amplitude drops to 0.1 volts in subsequent sampling, the processor determines that the person has left the area under the clothesline. The processor only determines the presence of a person after detecting an amplitude exceeding 0.2 volts in three consecutive samples, to avoid false triggering due to momentary noise interference.
[0105] B3. When the presence of the human body is detected, a stop signal is output to the motor to control the motor to stop running.
[0106] When the processor determines in step B2 that a human body is under the drying rack, it immediately outputs a stop signal to the motor drive module, controlling the motor to stop operating. The stop signal is a level signal or command message. Upon receiving this signal, the motor drive module interrupts its current power supply, braking the motor and maintaining its current state. This stop operation has the same final effect as the stop operation in step A2 in response to a pause gesture—both stop the drying rack at its current height. However, their triggering sources differ: the stop in step A2 originates from a user-initiated pause gesture, while the stop in this step originates from an automatic response to danger by the safety protection mechanism. After outputting the stop signal, the processor will also issue a warning through an indicator light in a specific warning mode and a buzzer sound, informing the user that the automatic stop has been triggered due to the detection of a human body under the drying rack. After the drying rack stops, the processor continues to monitor the infrared sensor's electrical signal. If no human body is detected within the preset safe waiting time, the processor can automatically resume the previously interrupted descent operation or wait for the user to re-trigger the descent operation via a gesture command. This safety protection mechanism can immediately stop the motor when a human body is detected under the drying rack, effectively avoiding the risk of the drying rack hitting the user's head during descent and protecting the user's personal safety.
[0107] See Figure 3 The diagram shown is a schematic of a computer storage medium provided in an embodiment of this application. The computer storage medium 3 can store multiple instructions (i.e., Figure 3 The computer program shown above), the instructions are adapted to be loaded and executed by a processor as described above. Figure 2 The method steps of the illustrated embodiment can be found in the following documentation for detailed execution. Figure 2 The specific details of the illustrated embodiments will not be elaborated here.
[0108] This application also provides a computer program product that stores at least one instruction, which is loaded and executed to implement the methods described in the above embodiments.
[0109] like Figure 4 As shown in the figure, this application embodiment provides a structural schematic diagram of a clothes drying rack 400. The clothes drying rack 400 includes a processor 401, a communication bus 402, a motor 403, a communication module 404, and a memory 405.
[0110] The processor 401 is the control core of the clothes drying rack 400. It can be a central processing unit, digital signal processor, general-purpose processor, application-specific integrated circuit, field-programmable gate array, or other programmable logic device. The processor 401 is connected to the motor 403, communication module 404, and memory 405 via a communication bus 402. It executes computer programs or instructions stored in the memory 405 to implement the steps in the various method embodiments of this application. Specifically, the processor 401 receives depth map data collected by the time-of-flight sensing module via the communication module 404, writes the depth map data into the memory 405 as a buffer, and performs a series of operations based on the depth map data in the memory 405, including human target recognition, readiness state determination, hand motion trajectory extraction, gesture template matching, point cloud data generation, human point cloud segmentation, ground reference plane fitting, user height measurement, descent calculation, and motor drive control. During the execution of the above operations, the processor 401 reads data from and writes data to the memory 405 via the communication bus 402.
[0111] The communication bus 402 is used to realize data communication between the processor 401, the motor 403, the communication module 404, and the memory 405. The communication bus 402 can be an industry-standard architecture bus, a peripheral component interconnection standard bus, or an extended industry-standard architecture bus, etc. The communication bus 402 can be divided into an address bus, a data bus, and a control bus, which are shown in the accompanying drawings for ease of representation. Figure 4 The communication bus 402 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.
[0112] Motor 403 is connected to the reel and rope of clothes drying rack 400, and is used to drive the drying rod to perform raising or lowering operations. Motor 403 is controlled by processor 401, which outputs pulse width modulation control signals to motor 403. Motor 403 operates at a corresponding speed and direction according to the duty cycle and direction of the control signal. Motor 403 is also equipped with an encoder, which detects the number of rotations and the direction of rotation of motor 403 in real time and feeds the detection results back to processor 401. Processor 401 calculates the current height of the drying rod based on the feedback signal from the encoder. Motor 403 can be any of a brushless DC motor, stepper motor, or servo motor.
[0113] The communication module 404 is used to establish a communication connection between the clothes drying rack 400 and the time-of-flight sensing module. The communication module 404 is connected to the data output interface of the time-of-flight sensing module via a cable, receives depth map data collected by the time-of-flight sensing module, and transmits the depth map data to the processor 401. The communication module 404 also sends configuration parameters or control commands to the time-of-flight sensing module via a cable. The communication module 404 supports any one of the following communication protocols: Universal Serial Bus (USB), Controller Area Network (CAN) Bus (CAN), Serial Peripheral Interface (SPI) Bus ...
[0114] The memory 405 serves as the storage medium for the clothes drying rack 400, used to store computer programs or instructions and various data. The memory 405 can be any combination of one or more of the following: random access memory, read-only memory, programmable read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, or flash memory. The memory 405 also includes a buffer storage area. Depth map data received by the processor 401 from the communication module 404 is first written into this buffer storage area. The processor 401 subsequently reads the depth map data from this buffer storage area to perform operations such as human target recognition and hand motion trajectory extraction. The memory 405 also stores preset parameters such as the spatial range parameters of a designated area, preset duration thresholds, preset descent gesture templates, preset ascent gesture templates, preset pause gesture templates, preset height margins, preset differential thresholds, preset matching thresholds, preset displacement thresholds, preset angle thresholds, and preset maximum motor descent stroke. Furthermore, the calibration parameters of the time-of-flight sensing module are also pre-stored in the memory 405.
[0115] Furthermore, the clothes drying rack 400 also includes indicator lights and a buzzer. Figure 4 (Not shown in the diagram) The indicator light and buzzer are connected to the processor 401. In the non-ready state, the processor 401 controls the indicator light to display red. After confirming that it has entered the ready state, the processor 401 controls the indicator light to switch from red to green. When a gesture is confirmed or an action is completed, the processor 401 controls the indicator light to flash or the buzzer to emit a prompt sound.
[0116] The clothes drying rack 400 provided in this application embodiment is connected to and cooperates with the time-of-flight sensing module via a cable. The processor 401 executes the computer program stored in the memory 405 to implement the steps in the various method embodiments of this application. The specific working process and beneficial effects of the clothes drying rack 400 can be found in the relevant descriptions in the method embodiments, and will not be repeated here.
[0117] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0118] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0119] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of protection of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this patent application should be determined by the appended claims.
Claims
1. A gesture-based control method for a clothes drying rack, characterized in that, It is applied to clothes drying racks and time-of-flight sensing modules. The time-of-flight sensing module is connected to the clothes drying rack via a cable and is mounted on the wall. The method includes: The depth map data collected by the time-of-flight sensing module is acquired, the depth map data is written into a buffer memory, and human targets are identified based on the depth map data in the buffer memory. When the human target is present and the duration of the human target's stay in the preset designated area exceeds a preset duration threshold, it is determined that the system is in a ready state. In response to the ready state, depth map data is read from the buffer memory; Based on the read continuous multi-frame depth map data, cross-frame tracking of the hand in the multi-frame depth map data is performed to extract the hand movement trajectory; When the hand movement trajectory matches the preset descent gesture template, corresponding point cloud data is generated based on the current frame in the continuous multi-frame depth map data. The human point cloud corresponding to the human target is segmented from the point cloud data, and a ground reference plane is fitted from the point cloud data. The head endpoint and foot endpoint in the human point cloud are detected, the foot endpoint is projected onto the ground reference plane, and the distance between the head endpoint and the projection point along the normal direction of the ground reference plane is calculated as the user's height. Obtain the current height of the drying rack and calculate the descent amount based on the current height and the user's height; The motor is controlled to rotate based on the descent amount, thereby driving the drying rack to perform the descent operation.
2. The method according to claim 1, characterized in that, The step of obtaining the current height of the drying rack and calculating the descent amount based on the current height and the user's height includes: The target height is calculated based on the formula H_target = H_user + H_margin; According to the formula ΔH=H_current H_target calculates the descent amount, where H_user is the user's height, H_margin is the preset distance between the drying rack and the user's head after descent, and H_current is the current height of the drying rack.
3. The method according to claim 1, characterized in that, The method of identifying human targets based on depth map data in the buffer memory includes: Statistical analysis is performed on multiple consecutive frames of the depth map data to establish a background depth model in an unmanned state; Perform pixel-by-pixel difference operation between the current frame depth map data and the background depth model, and mark pixels whose difference exceeds a preset difference threshold as foreground pixels; Perform connected component analysis on the foreground pixels to extract the area features, aspect ratio features, and contour shape features of the connected regions; The area feature, aspect ratio feature, and contour shape feature are matched with a preset human body template. When the matching degree exceeds a preset matching threshold, the connected region is determined to be the human body target.
4. The method according to claim 1, characterized in that, The step of determining to enter the ready state when the human target is present and the duration of the human target's stay in the preset designated area exceeds a preset duration threshold includes: Calculate the position coordinates of the human target in three-dimensional space; Determine whether the location coordinates fall within the specified area; When the location coordinates fall into the designated area, the timing function is activated to start timing; When the timeout period exceeds the specified duration threshold, the system is determined to enter the ready state.
5. The method according to claim 1, characterized in that, The method of tracking the hand across frames based on read continuous multi-frame depth map data and extracting the hand motion trajectory includes: Within the range of the human target, the hand region is extracted by depth threshold segmentation; Perform cross-frame correlation matching on the hand region in multiple consecutive frames of the depth map data to determine the position of the same hand in different frames; Record the sequence of positional changes of the same hand in different frames; The hand displacement vector is calculated based on the position change sequence to generate the hand movement trajectory.
6. The method according to claim 5, characterized in that, When the hand movement trajectory matches a preset descent gesture template, the corresponding point cloud data is generated based on the current frame in the continuous multi-frame depth map data, including: The hand movement trajectory is compared with the downward gesture template to determine whether the hand movement trajectory moves continuously downward in the vertical direction and whether the magnitude of the displacement vector exceeds a preset displacement threshold. When the hand movement trajectory matches the descent gesture template, the last frame that triggered the match in the continuous multi-frame depth map data is determined as the current frame; Based on the calibration parameters of the time-of-flight sensing module, the depth value of each pixel in the current frame depth map data is converted into three-dimensional spatial coordinates to generate the point cloud data.
7. The method according to claim 1, characterized in that, The step of segmenting the human point cloud corresponding to the human target from the point cloud data and fitting a ground reference plane from the point cloud data includes: Based on the pixel region of the human target in the depth map data, the point cloud of the corresponding region is extracted from the point cloud data as the human point cloud; The maximum plane is extracted from the point cloud data using a random sampling consensus algorithm; The normal direction of the maximum plane is compared with the vertical direction. When the angle between the normal direction and the vertical direction is less than a preset angle threshold, the maximum plane is determined as the ground reference plane.
8. The method according to claim 1, characterized in that, The process of detecting the head endpoint and foot endpoint in the human point cloud, projecting the foot endpoint onto the ground reference plane, and calculating the distance between the head endpoint and the projected point along the normal direction of the ground reference plane as the user's height includes: Find the point with the largest vertical coordinate value in the human body point cloud, and take the point with the largest coordinate value as the head endpoint; Find the point with the smallest vertical coordinate value in the human body point cloud, and take the point with the smallest coordinate value as the foot endpoint; The foot endpoint is projected onto the ground reference plane along the normal direction of the ground reference plane to obtain the foot projection point; Calculate the distance along the normal direction between the head endpoint and the foot projection point, and use this distance as the user's height.
9. The method according to claim 1, characterized in that, Also includes: In the ready state, when the hand movement trajectory matches the preset upward gesture template, the motor is driven to drive the drying pole to perform an upward operation; In the ready state, when the hand movement trajectory matches the preset pause gesture template, the motor is controlled to stop running.
10. The method according to claim 1, characterized in that, An infrared sensor is installed below the clothes drying rod of the clothes drying rack, and the method further includes: During the process of driving the motor to lower the drying rod, the electrical signal output by the infrared sensor is acquired; The presence of a human body under the drying rack is determined based on the amplitude of the electrical signal. When the presence of the human body is detected, a stop signal is output to the motor to control the motor to stop operating.
11. A clothes drying rack, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed as described in any one of claims 1 to 10.
12. An intelligent clothes drying system, characterized in that, include: Clothes drying rack and time-of-flight sensing module; The time-of-flight sensing module is connected to the clothes drying rack via a cable, and the time-of-flight sensing module is mounted on the wall. The time-of-flight sensing module is used to collect depth map data and transmit the depth map data to the clothes drying rack via the cable. The clothes drying rack is used to acquire the depth map data, write the depth map data into a buffer memory, and identify human targets based on the depth map data in the buffer memory. The clothes drying rack is also used to determine that it is ready when the human target is present and the duration of the human target in the preset designated area exceeds a preset duration threshold. The clothes drying rack is also configured to, in response to the ready state, read depth map data from the buffer memory, and perform cross-frame tracking of the hand in the multi-frame depth map data based on the read continuous multi-frame depth map data, and extract the hand movement trajectory; The clothes drying rack is also used to generate corresponding point cloud data based on the current frame in the continuous multi-frame depth map data when the hand movement trajectory matches the preset descent gesture template, segment the human point cloud corresponding to the human target from the point cloud data, and fit the ground reference plane from the point cloud data. The clothes drying rack is also used to detect the head endpoint and foot endpoint in the human point cloud, project the foot endpoint onto the ground reference plane, and calculate the distance between the head endpoint and the projection point along the normal direction of the ground reference plane as the user's height. The clothes drying machine is also used to obtain the current height of the drying rod, calculate the descent amount based on the current height and the user's height, and control the motor to rotate based on the descent amount to drive the drying rod to perform the descent operation.