A multi-scenario coupling-based virtual environment generation method and system for home care of the elderly
Patent Information
- Application Number
- CN202610426254.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-02
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-04-02
AI Technical Summary
[0004]本发明的目的是为了解决现有技术中存在的深度修正或材质调整方法通常采用固定参数或单一阈值,难以针对不同地面区域的反射强度和异常程度进行差异化处理的缺点,而提出的一种基于多情境耦合的老年居家护理虚拟环境生成方法及系统
1、在本发明中,通过构建像素级的理论地面交点坐标与高程残差,并基于中位绝对偏差自适应提取近地层像素集合,实现了对地面区域真实几何结构的精准还原,有效剔除了由镜面反射、湿滑高光和测量误差引起的异常纵深拉长,基于统计分位数差异计算出的纵深异常比和几何修正系数,能够针对不同地面区域的深度失真程度自动调整校正强度,确保修正结果具有区域自适应性,避免一刀切修正造成的细节丢失。
Smart Images

Figure CN122312988B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of virtual environment generation technology, and in particular to a method and system for generating a virtual environment for elderly home care based on multi-context coupling. Background Technology
[0002] With the accelerating aging of the population, more and more families are relying on home care systems for the daily care and health management of the elderly. To improve the intelligence and human-computer interaction quality of home care, virtual reality technology is gradually being introduced into the modeling and visualization of elderly activity spaces, especially in typical care scenarios such as nighttime scenes, bedside environments, and corridor transition areas. This places higher demands on spatial accessibility, safe passage, and visual clarity. In constructing such virtual environments, it is often necessary to integrate 3D data collected by depth sensors and use image rendering technology to create virtual scenes that continuously switch between multiple scenarios. This makes it possible for the elderly to practice movements, make assisted judgments, or receive remote monitoring in a simulated environment. Especially in near-ground areas such as floors, bathroom floors, and carpet junctions, which are directly related to navigation safety and fall warnings, accurately representing the geometry and visual material characteristics of these areas becomes a crucial part of generating virtual care environments.
[0003] In existing technologies, point clouds are often directly generated from depth map data collected by depth sensors, and then the 3D model of the scene is constructed from the point cloud. However, during the modeling and rendering of the ground and its surrounding areas, various factors such as ambient light reflection, specular reflection from water stains or slippery areas, and depth sensor sensing errors often interfere, causing abnormal extension or elevation of depth measurements near the ground. This results in distortions such as elongated, floating, or sunken ground geometry. This distortion not only makes the ground structure in the virtual scene discontinuous but also leads to the visual illusion of excessive depth, collapse, or emptiness, affecting the accuracy of the system in path planning, obstacle recognition, and risk assessment. Existing depth correction or material adjustment methods usually use fixed parameters or a single threshold, making it difficult to differentiate the reflection intensity and anomaly degree of different ground areas, and also making it difficult to ensure the natural transition of ground textures in terms of brightness, smoothness, etc., resulting in rendering results lacking realism and stability. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing depth correction or material adjustment methods, which typically use fixed parameters or a single threshold, making it difficult to differentiate the reflection intensity and anomaly levels of different ground areas. Therefore, this invention proposes a method and system for generating a virtual environment for elderly home care based on multi-context coupling.
[0005] To address the problems existing in the prior art, the present invention adopts the following technical solution: A method for generating a virtual environment for home care for the elderly based on multi-context coupling, comprising: S1. Based on the intersection parameter between the reference ground plane and the pixel ray of the camera in the multi-context virtual scene, calculate the theoretical ground intersection point coordinates of the pixel coordinates in the depth map; S2. Based on the normal vector of the reference ground plane and the coordinates of the intersection point of the theoretical ground, generate a set of near-surface pixels for the depth map; S3. Calculate the geometric correction coefficient of the near-surface layer based on the near-surface pixel set; S4. Based on the geometric correction factor, generate the corrected depth value of the corrected near-surface location and depth map; S5. Based on the scene static mesh of the corrected near-surface location and indoor model library, generate the corrected scene mesh, and generate the corrected specular intensity and corrected roughness of the near-surface layer based on the geometric correction coefficient. S6. Based on the correction of depth value, scene mesh, specular intensity and roughness, perform 3D rendering of multi-scenario virtual scenes to generate nursing virtual environment.
[0006] Preferably, based on the intersection parameter between the reference ground plane of the multi-context virtual scene and the pixel ray of the camera, the theoretical ground intersection point coordinates of the pixel coordinates in the depth map are calculated, including: Depth maps of multi-scenario virtual scenes are captured using a camera; Calculate the intersection parameter between the reference ground plane of the multi-context virtual scene and the pixel ray of the camera. The formula for calculating the intersection parameter is as follows:
[0007] In the formula, Pixel coordinates in the depth map The corresponding intersection distance parameter, It is the normal vector of the reference ground plane. yes transpose, These are the optical center coordinates of the camera. It is a constant term of the reference ground plane. It is the direction vector of the pixel ray. These are the pixel coordinates of the depth map; Based on the intersection distance parameter, the optical center coordinates of the camera, and the direction vector of the pixel ray, the theoretical ground intersection point coordinates of the pixel coordinates are calculated.
[0008] Preferably, a near-surface pixel set for the depth map is generated based on the intersection coordinates of the normal vector of the reference ground plane and the theoretical ground point, including: The dot product of the intersection point of the transpose of the normal vector and the theoretical ground is obtained. Add the dot product result and the constant term of the reference ground plane to obtain the elevation residual of the intersection point between the reference ground plane and the pixel ray; Calculate the median absolute deviation of all elevation residuals; If the absolute value of the elevation residual is less than or equal to the median absolute deviation, then the pixel coordinates corresponding to the elevation residual are defined as near-surface pixels. All near-surface pixels are gathered into a near-surface pixel set.
[0009] Preferably, based on the near-surface pixel set, the geometric correction coefficient for the near-surface layer is calculated, including: Calculate the 50th and 95th percentiles based on the near-surface pixel set; Calculate the difference between the 95th and 50th quantiles; The larger value is obtained by taking the maximum value between the 50th quantile and the preset minimum positive number; Divide the quantile difference result by the larger value to obtain the depth anomaly ratio of the near-surface layer; By performing a monotonic mapping on the depth anomaly ratio, the geometric correction coefficient for the near-surface layer is obtained.
[0010] Preferably, based on geometric correction factors, the corrected depth values for the corrected near-surface location and depth map are generated, including: The displacement vector is obtained by multiplying the pixel depth value and the direction vector of the pixel ray in the depth map. The measurement point is obtained by vector addition of the displacement vector and the optical center coordinates of the camera; Within the near-surface pixel set, the coordinates of the intersection of the measured point and the theoretical ground point are linearly weighted and mixed based on the geometric correction coefficient to obtain the corrected near-surface position. Within the near-surface pixel set, the pixel depth values and intersection parameters of the depth map are linearly weighted and mixed based on geometric correction coefficients to obtain the corrected depth values of the depth map.
[0011] Preferably, a modified scene mesh is generated based on the modified near-surface location and the scene static mesh of the indoor model library, including: Triangulation is performed on the 3D point coordinates of the near-surface location within the near-surface pixel set to obtain the near-surface complete mesh. The near-ground complete mesh and the scene static mesh from the indoor model library are combined using nearest-point constraints to obtain the corrected scene mesh.
[0012] Preferably, generating the corrected specular intensity and corrected roughness of the near-surface layer based on geometric correction coefficients includes: Analytically recalibrating the initial specular intensity of the near-ground layer based on the geometric correction coefficient to obtain the corrected specular intensity of the near-ground layer; Analytically recalibrating the initial roughness of the near-ground layer based on the geometric correction coefficient to obtain the corrected roughness of the near-ground layer.
[0013] Preferably, the specific steps of 3D rendering include: Performing visibility determination on pixel fragments of the multi-scenario virtual scene based on the corrected depth value; Performing occlusion judgment and shadow calculation on the pixel fragments according to the corrected scene mesh; Applying PBR shading to the near-ground layer according to the corrected specular intensity and the corrected roughness.
[0014] To solve the above problems, the present invention further provides an elderly home care virtual environment generation system based on multi-scenario coupling, the system comprising: A ground intersection calculation module, configured to calculate the theoretical ground intersection coordinate of the pixel coordinate in the depth map based on the intersection distance parameter between the reference ground plane of the multi-scenario virtual scene and the pixel ray of the camera; A near-ground layer extraction module, configured to generate a near-ground layer pixel set of the depth map based on the normal vector of the reference ground plane and the theoretical ground intersection coordinate; A correction coefficient calculation module, configured to calculate the geometric correction coefficient of the near-ground layer based on the near-ground layer pixel set; A near-ground layer position correction module, configured to generate the corrected near-ground layer position and the corrected depth value of the depth map based on the geometric correction coefficient; A scene geometry and material correction module, configured to generate a corrected scene mesh based on the corrected near-ground layer position and the scene static mesh of the indoor model library, and generate the corrected specular intensity and corrected roughness of the near-ground layer based on the geometric correction coefficient; A care virtual environment rendering module, configured to perform 3D rendering on the multi-scenario virtual scene based on the corrected depth value, the corrected scene mesh, the corrected specular intensity and the corrected roughness, so as to generate a care virtual environment.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. In the present invention, by constructing pixel-level theoretical ground intersection coordinates and elevation residuals, and adaptively extracting the near-ground layer pixel set based on the median absolute deviation, the accurate restoration of the real geometric structure of the ground area is realized, and abnormal depth elongation caused by specular reflection, slippery highlights and measurement errors is effectively eliminated. The depth anomaly ratio and geometric correction coefficient calculated based on statistical quantile differences can automatically adjust the correction intensity according to the depth distortion degree of different ground areas, ensuring that the correction result has regional adaptivity and avoiding detail loss caused by uniform correction.
[0016] 2. In this invention, by weighted correction of near-ground position and depth values, combined with triangulation completion and nearest-point constraint stitching, a high-quality fusion of near-ground completion mesh and indoor static mesh is achieved, forming a topologically closed and normal-continuous corrected scene mesh. This provides a consistent geometric basis for functions such as occlusion judgment, shadow calculation and spatial interaction. Compared with traditional methods, it can eliminate ground gaps, misalignment and flickering phenomena, and improve the spatial stability and interactive accuracy of virtual scenes under multi-scenario switching.
[0017] 3. In this invention, geometric correction coefficients are used to analytically recalibrate the specular intensity and roughness of the near-surface layer. A physically based shading model is adopted to suppress visual illusions caused by ground highlights and reflections, making the material representation consistent with the geometric depth correction results. In the 3D rendering stage, visibility determination and lighting processing are performed based on the corrected depth value and the corrected scene mesh, ensuring that the virtual nursing environment presents a coherent, realistic and distortion-free ground visual effect in multiple scenarios such as bedrooms, corridors, and bathrooms. This provides higher visual credibility and interactive security for application scenarios such as elderly care training, remote assessment and daily monitoring. Attached Figure Description
[0018] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 This is a flowchart illustrating a method for generating a virtual home care environment for the elderly based on multi-context coupling, according to an embodiment of the present invention. Figure 2 This is a functional module diagram of a virtual environment generation system for elderly home care based on multi-context coupling, provided in an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0020] This embodiment provides a method for generating a virtual environment for elderly home care based on multi-context coupling. See [link to relevant documentation]. Figure 1 Specifically, including: S1. Based on the intersection parameter between the reference ground plane and the pixel ray of the camera in the multi-context virtual scene, calculate the theoretical ground intersection point coordinates of the pixel coordinates in the depth map; In an embodiment of the present invention, the theoretical ground intersection coordinates of pixel coordinates in the depth map are calculated based on the intersection parameter between the reference ground plane of the multi-context virtual scene and the pixel ray of the camera, including: Depth maps of multi-scenario virtual scenes are captured using a camera; Specifically, a multi-context virtual scene refers to a continuous, switchable, and combinable three-dimensional environment formed by uniformly modeling multiple functional spaces such as bedrooms, corridors, and bathrooms, as well as their interrelated geometric structures, lighting conditions, and interactive elements for home care tasks. This environment supports perception and rendering in different care scenarios. A depth map is a two-dimensional data image obtained by depth sensing or stereo computing. Each pixel records the distance from the corresponding line of sight to the camera's optical center, measured in meters or millimeters. This data is used for back-projection to obtain three-dimensional point coordinates, for calculating the ground intersection elevation residual near-surface pixel set, and for subsequent geometric correction and rendering processing.
[0021] Calculate the intersection parameter between the reference ground plane of the multi-context virtual scene and the pixel ray of the camera. The formula for calculating the intersection parameter is as follows:
[0022] In the formula, Pixel coordinates in the depth map The corresponding intersection distance parameter, It is the normal vector of the reference ground plane. yes transpose, These are the optical center coordinates of the camera. It is a constant term of the reference ground plane. It is the direction vector of the pixel ray. These are the pixel coordinates of the depth map; Specifically, the intersection parameter refers to the scale along the ray when the line of sight corresponding to the pixel coordinates intersects the camera optical center along the ray direction to the reference ground plane, and is used to determine the position of the intersection point in space; the normal vector describes the direction of the reference ground plane and its unit length relationship, and is used to characterize the ground orientation; the transpose of n is used to perform an inner product with a 3D point or direction to calculate the signed distance or algebraic value from the point to the plane; the camera optical center coordinates C represent the spatial position of the imaging system in world coordinates or camera coordinates and serve as the starting point of the ray; the constant term b of the reference ground plane and the normal vector together determine the absolute position and offset of the plane in space; the direction vector of the pixel ray gives the unit direction from the optical center to the pixel and serves as the direction reference of the ray; the pixel coordinates represent the row and column position of the corresponding pixel in the depth map on the 2D imaging plane and are used to index the depth of the pixel and related computational quantities.
[0023] Specifically, the calculation of the intersection parameter follows the spatial geometric laws of ray-plane intersection. The intersection point is determined using the algebraic relationship between the ray from the camera optical center to the pixel direction and the ground plane. The equation of the ground plane is determined by the normal vector and a constant term, indicating that the sum of the inner products of all normal vectors and a point on the plane plus the constant term is zero. The camera optical center is the starting point of the ray, and the pixel direction vector gives the direction of the ray. When the ray equation is substituted into the plane equation, a scaling factor along the ray direction from the optical center to the intersection point can be obtained, thus calculating the position where the ray intersects the plane. The numerator represents the algebraic distance between the plane normal vector and the optical center position, as well as the plane's own offset. The denominator represents the angle factor between the normal vector and the ray direction. The scaling factor obtained by dividing the two reflects the scale length required for the ray to extend from the optical center along the direction vector to intersect the plane. Therefore, the value calculated by this formula is the true intersection point parameter between the ray and the ground plane in space.
[0024] Based on the intersection distance parameter, the optical center coordinates of the camera, and the direction vector of the pixel ray, the theoretical ground intersection coordinates of the pixel coordinates are calculated.
[0025] Specifically, the optical center coordinates of the camera represent the position of the imaging system in three-dimensional space and are the common starting point of all pixel lines of sight; ray parameterization refers to determining the position of a unique point on a ray by combining the starting point and direction with a scale quantity, thereby transforming the abstract scale quantity into a definite three-dimensional coordinate; the theoretical ground intersection coordinates of pixel coordinates refer to the corresponding position on the ground calculated based on the geometric relationship between the ground model and the pixel lines of sight, which belongs to an ideal intersection point that is not affected by measurement noise.
[0026] Specifically, firstly, the optical center coordinates of the camera are obtained, which serve as the starting point of the pixel ray. Next, the direction vector of the corresponding pixel ray is obtained, which represents the spatial extension direction from the camera's optical center to the pixel. The intersection parameter is used as the scale for extending along the pixel ray direction vector from the camera's optical center coordinates. According to the calculation method of ray parameterization, the product of the camera's optical center coordinates, the intersection parameter, and the pixel ray direction vector is vector-added. The three-dimensional spatial coordinates obtained through this operation are the theoretical ground intersection coordinates corresponding to the pixel coordinates. This realizes the calculation of the theoretical ground intersection coordinates based on the intersection parameter, the camera's optical center coordinates, and the pixel ray direction vector.
[0027] Specifically, the above calculation process follows the solution logic of ray intersection with a plane in spatial geometry. The camera's optical center coordinates are the unique starting point of the pixel ray, clearly defining its initial position in three-dimensional space. The direction vector of the pixel ray defines the spatial extension path from the optical center to the corresponding pixel, ensuring that the ray accurately corresponds to the viewing direction of that pixel in the depth map. The intersection distance parameter is a specific scale quantity obtained by simultaneously solving the reference ground plane equation and the ray parameterization equation. Its physical meaning is the proportion of the length along the ray direction required for the ray to intersect the reference ground plane from the optical center. According to the basic geometric principles of ray parameterization, the spatial coordinates of any point on the ray can be uniquely determined by adding the product of the starting point coordinates, the scale quantity, and the direction vector. Therefore, by using the optical center coordinates as the starting point, the intersection distance parameter as the specific scale quantity for intersection with the reference ground plane, and the pixel ray direction vector as the extension path, the resulting coordinates after vector operations according to this parameterization relationship are necessarily the point where the pixel ray intersects the reference ground plane. Furthermore, this point is an ideal result derived based on the geometric relationship between the ground model and the ray, unaffected by actual measurement noise; therefore, it is the theoretical ground intersection point coordinate corresponding to the pixel coordinates.
[0028] Specifically, in low-light, slippery, and highly reflective indoor environments at night, ToF (Time-of-Flight) depth sensors are prone to errors when collecting depth data from near the ground (areas very low to the ground), often resulting in numerous errors in long-distance or maximum range readings. These errors can create the illusion that corridors are unnecessarily elongated or bathroom spaces are incorrectly deepened. If such erroneous depth data is used directly to render a virtual environment, it will incorrectly extend areas that are normally impassable, such as behind doors or walls, into passable ground, thus disrupting the occlusion relationships between objects, shadow projection logic, and interaction logic within the scene. This can lead to distortions in training or teaching related to elderly home care. The theoretical ground intersection coordinates corresponding to the pixel coordinates in the depth map are obtained through rigorous spatial geometric calculations based on the geometric model of the ground and the viewing direction of the pixels. This ideal intersection position is not affected by the measurement noise of the depth sensing device and can serve as a benchmark for subsequent judgment of whether the actual depth data has been erroneously stretched. This provides a basis for correcting the geometry of the near-ground layer, ensuring the correctness of occlusion, shadow and reflection effects during virtual environment rendering, and ultimately avoiding systemic rendering errors caused by abnormal depth in the free space of the near-ground layer. This ensures the naturalness of the visuals and the accuracy of the interaction in the virtual environment for elderly home care, and meets the needs of teaching and practice in nursing scenarios.
[0029] S2. Based on the normal vector of the reference ground plane and the coordinates of the intersection point of the theoretical ground, generate a set of near-surface pixels for the depth map; In an embodiment of the present invention, a near-surface pixel set of a depth map is generated based on the normal vector of a reference ground plane and the coordinates of the intersection point of a theoretical ground point, including: The dot product of the intersection point of the transpose of the normal vector and the theoretical ground is obtained. Add the dot product result and the constant term of the reference ground plane to obtain the elevation residual of the intersection point between the reference ground plane and the pixel ray; Specifically, the intersection between the reference ground plane and the pixel ray refers to the unique position formed in three-dimensional space when the line of sight of the pixel is extended from the camera optical center until it meets the ground plane. This position establishes a one-to-one correspondence between the two-dimensional pixel and the ground geometry, and is used to mark the ideal coordinates on the ground where the pixel should fall. This provides a unified spatial reference for the near-ground pixel screening elevation residual calculation and subsequent geometry and material correction.
[0030] Specifically, the transpose of the normal vector refers to using the unit vector describing the ground orientation as a row vector in the calculation. It uses the ground normal vector as a scale to measure the orientation component of any point to the plane. The theoretical ground intersection coordinates are the ideal intersection position obtained by the camera optical center, the pixel line of sight, and the ground model, representing the spatial point on the ground where the pixel should fall. The dot product result is a scalar obtained by taking the inner product of the ground normal vector and the intersection position, which is equivalent to the algebraic distance after projecting the point onto the normal direction. The constant term of the reference ground plane reflects the overall translation of the plane in space, and together with the normal vector, it determines the absolute position of the plane relative to the origin. The elevation residual is the value obtained by adding the above dot product result and the constant term. It is used to measure the vertical deviation of the intersection position of the pixel relative to the ground. The positive and negative signs indicate whether it is above or below the plane. Its magnitude reflects the height error of the deviation from the ground and is used for subsequent near-ground pixel screening and robust statistics.
[0031] Specifically, the reference ground plane is defined by a plane equation, which characterizes the positional relationship between a spatial point and the plane by multiplying the transpose of the normal vector with the coordinates of the spatial point and combining it with a constant term. The coordinates of the theoretical ground intersection point are the ideal spatial points where the pixel ray intersects the reference ground plane. Multiplying the transpose of the normal vector with the coordinates of the theoretical ground intersection point yields a result that measures the directed distance correlation between the intersection point and the plane along the normal vector direction. This dot product result is then added to the constant term of the reference ground plane. Since the constant term is used to determine the absolute position of the plane in space, this addition operation, combined with the structure of the plane equation, can calculate the degree of deviation of the theoretical ground intersection point from the reference ground plane in the elevation direction (perpendicular to the ground). This degree of deviation is the elevation residual of the intersection point between the reference ground plane and the pixel ray, which can be used to quantify the vertical deviation of the intersection point relative to the reference ground plane, providing a basis for subsequent near-surface correlation analysis.
[0032] Calculate the median absolute deviation of all elevation residuals; Specifically, the median absolute deviation is the average scale of the distance at which each point deviates from the median after taking the median of all elevation residuals. It is used to measure the stable range of overall height fluctuations of pixels near the ground.
[0033] Specifically, firstly, all elevation residual data are acquired and sorted by numerical value. Next, the median is determined from the sorted elevation residuals; this median is the middle value of all elevation residuals. Then, for each elevation residual, the absolute difference between it and the median is calculated. Finally, all calculated absolute differences are sorted again by numerical value, and the median of these absolute differences is determined. This median is the median absolute deviation of all elevation residuals, which measures the overall dispersion of the elevation residuals relative to its median, providing a quantitative basis for the subsequent selection of near-surface pixels.
[0034] If the absolute value of the elevation residual is less than or equal to the median absolute deviation, then the pixel coordinates corresponding to the elevation residual are defined as near-surface pixels. All near-surface pixels are gathered into a near-surface pixel set.
[0035] Specifically, the absolute value of the elevation residual represents the vertical offset of the spatial point corresponding to a single pixel relative to the ground. The smaller the value, the closer the pixel is to the ground. Near-ground pixels refer to pixels whose elevation residual amplitude between their corresponding spatial point and the reference ground plane is within the stable range defined by the median absolute deviation in the depth map. These pixels represent areas that are close to or adjacent to the ground and can be regarded as reliable observations of ground geometry. The near-ground pixel set refers to a dataset that aggregates all pixels that meet the above criteria according to image index, and is used to characterize continuous ground proximity zones in the scene.
[0036] Specifically, the median absolute deviation is obtained by statistically calculating all elevation residuals. It is a statistical measure that reflects the overall stable range of height fluctuations of pixels near the ground and characterizes the typical dispersion of elevation residuals in the vicinity of the ground. The absolute value of the elevation residual is used to characterize the vertical offset of the spatial point corresponding to a single pixel relative to the reference ground plane. The magnitude of this value directly reflects the proximity of the pixel to the ground. When the absolute value of the elevation residual corresponding to a pixel is less than or equal to the median absolute deviation, it indicates that the spatial point corresponding to the pixel is within the stable range defined by the statistical characteristics of the ground and belongs to the area close to or adjacent to the ground. Therefore, the pixel coordinates corresponding to the elevation residual are defined as near-ground pixels, thus providing accurate pixel-level basic data for subsequent near-ground geometry and material correction.
[0037] S3. Calculate the geometric correction coefficient of the near-surface layer based on the near-surface pixel set; In an embodiment of the present invention, the geometric correction coefficient for the near-surface layer is calculated based on the near-surface pixel set, including: Calculate the 50th and 95th percentiles based on the near-surface pixel set; Specifically, firstly, the depth value corresponding to the coordinates of each pixel is extracted from the near-surface pixel set, and all extracted depth values are organized into a near-surface depth value dataset. Next, this depth value dataset is sorted in ascending order to obtain an ordered depth value sequence. Then, the total number of depth values in the ordered depth value sequence is counted and recorded as the total data volume. Afterward, the position corresponding to the 50th quantile is calculated by multiplying the total data volume by 50%. If the calculated position is an integer, the depth value corresponding to that integer position in the ordered depth value sequence is taken as the 50th quantile. If the position is not an integer, the depth values corresponding to the two adjacent integer positions are taken and calculated using linear interpolation to obtain the 50th quantile. Simultaneously, the position corresponding to the 95th quantile is calculated by multiplying the total data volume by 95%. If the calculated position is an integer, the depth value corresponding to that integer position in the ordered depth value sequence is taken as the 95th quantile. If the position is not an integer, the depth values corresponding to the two adjacent integer positions are taken and calculated using linear interpolation to obtain the 95th quantile. This completes the calculation of the 50th and 95th quantiles of the near-surface pixel set.
[0038] Specifically, the near-surface pixel set refers to the dataset consisting of pixels in the depth map whose height difference with the reference ground is within a stable range, used to represent continuous areas close to the ground; the 50th percentile is the representative value in the middle position after sorting the pixel depths in the dataset from smallest to largest, reflecting the typical depth benchmark of the near-surface layer; the 95th percentile is the representative value in the upper tail section after sorting, reflecting the trend of a few pixels at a greater depth.
[0039] Calculate the difference between the 95th and 50th quantiles; The larger value is obtained by taking the maximum value between the 50th quantile and the preset minimum positive number; Specifically, the quantile difference result is the amplitude obtained by subtracting the 50th percentile from the 95th percentile. It is used to measure the degree of upper tail expansion of the near-surface depth distribution and to depict the intensity of the depth elongation anomaly caused by reflection or low illumination.
[0040] Specifically, the preset minimum positive number refers to a constant that is given in advance in the algorithm implementation and is greater than zero but has an extremely small order of magnitude. It is used as a lower limit of the denominator and a threshold protection to prevent unstable calculations caused by division by zero and division by the minimum number, while ensuring that the ratio and mapping function remain continuous and monotonic near zero.
[0041] It should be noted that the preset minimum positive number was selected during the algorithm development process. This was done by considering the typical numerical range of depth map data in nighttime home scenarios for the elderly, the accuracy characteristics of depth measurement, and the need to avoid computational instability due to an excessively small denominator in division operations. Multiple sets of depth data from nighttime home scenarios for the elderly with different reflectivity and illumination conditions were tested and verified. The selected value was a fixed and positive constant that met the requirements of computational stability and did not significantly affect the accuracy of depth anomaly ratio quantification. This ensures that subsequent calculations involving this minimum positive number have reliable numerical stability and rationality.
[0042] Divide the quantile difference result by the larger value to obtain the depth anomaly ratio of the near-surface layer; Specifically, the near-surface layer refers to the spatial zone within a limited height range above and below the reference ground. This spatial zone is formed by selecting pixels from the depth map whose height difference with the reference ground is within a stable threshold and aggregating their corresponding three-dimensional points. It is used to represent the actual area close to the ground, including elements such as floor carpets and local water accumulation, and serves as the most reliable source of observation for ground geometry and material.
[0043] By performing a monotonic mapping on the depth anomaly ratio, the geometric correction coefficient for the near-surface layer is obtained.
[0044] Specifically, the depth anomaly ratio of the near-surface layer is first obtained to characterize the degree of depth elongation anomaly caused by reflection or low illumination in the near-surface layer. The depth anomaly ratio is used as the numerator, and the sum of the value 1 and the depth anomaly ratio is used as the denominator for division. The result of this operation is the geometric correction coefficient of the near-surface layer. Since the depth anomaly ratio is a positive number, the value of the geometric correction coefficient is between 0 and 1. This allows the depth anomaly degree of the near-surface layer to be monotonically mapped to the correction intensity required for subsequent geometric and material processing, providing a dimensionless weighting basis for adaptively adjusting the spatial relationship and appearance of the near-surface layer.
[0045] Specifically, the near-surface depth anomaly ratio is a measure of the tail expansion degree of the near-surface pixel depth distribution to the typical depth scale. It is used to characterize the strength of the elongation phenomenon of the ground area caused by reflection or low illumination. The larger the value, the more the near-surface layer is misjudged as being farther away. The geometric correction coefficient is a dimensionless weight obtained by applying a thresholdless monotonic mapping to this ratio. It is used to adjust the correction intensity in geometric and material processing, so that the measurement point adaptively converges to the ground intersection point and simultaneously reduces the specular intensity and increases the roughness, thereby restoring the spatial relationship and appearance consistent with the real ground.
[0046] Specifically, the quantile difference between the 95th and 50th quantiles can quantify the expansion of the upper tail of the near-surface depth distribution relative to the typical depth, intuitively reflecting the degree of depth elongation anomaly caused by ground reflection or low illumination in nighttime scenarios at elderly people's homes. Taking the maximum value of the 50th quantile and the preset minimum positive number avoids the instability of division operations caused by an excessively small 50th quantile, and uses the 50th quantile as a reference benchmark for the typical depth scale of the near-surface layer, so that the ratio of the quantile difference result to this larger value can reasonably characterize the relative intensity of the near-surface depth anomaly. Furthermore, through monotonic mapping, the relative intensity of the depth anomaly can be transformed into a dimensionless coefficient in the range of 0 to 1. The physical essence of this coefficient is to transform the degree of near-surface depth anomaly into the intensity weight of geometric and material correction. The more significant the anomaly, the higher the correction intensity, thereby adaptively adjusting the spatial relationship and appearance of the near-surface layer, restoring the geometric shape and optical characteristics consistent with the real ground.
[0047] Specifically, in nighttime scenarios at home for the elderly, the ground is prone to depth measurement anomalies due to reflections or low illumination. This causes the spatial point depth corresponding to the near-ground layer pixels to exhibit a deviation of vertical elongation, disrupting the spatial relationship and appearance consistency between the near-ground layer and the real ground. The geometric correction coefficient of the near-ground layer can generate dimensionless correction intensity weights based on the degree of anomaly in the near-ground layer depth distribution. In this way, during the geometric and material processing, the measurement points can adaptively converge to the intersection with the real ground, and the mirror intensity and roughness can be adjusted in a matching manner. Ultimately, the spatial relationship and appearance of the near-ground layer consistent with the real ground are restored, providing an accurate foundation for subsequent depth map-based applications such as scene reconstruction and navigation.
[0048] S4. Based on the geometric correction factor, generate the corrected depth value of the corrected near-surface location and depth map; In an embodiment of the present invention, generating corrected depth values for a corrected near-surface location and depth map based on a geometric correction coefficient includes: The displacement vector is obtained by multiplying the pixel depth value and the direction vector of the pixel ray in the depth map. The measurement point is obtained by vector addition of the displacement vector and the optical center coordinates of the camera; Specifically, the pixel depth value in the depth map represents the distance scalar from the camera's optical center to the scene surface corresponding to that pixel's line of sight, used to quantify the geometric scale along the line of sight; the direction vector of the pixel ray gives the unit direction from the optical center to that pixel, serving as the directional basis for back-projecting the 2D pixel into 3D space; multiplying the depth value by the direction vector is equivalent to scaling along that unit direction by the distance scale, yielding the displacement vector moving along the line of sight from the optical center, used to describe the length and direction of the displacement; the camera's optical center coordinates describe the spatial position of the imaging system in the selected coordinate system and are the common starting point of all pixel rays.
[0049] Specifically, a measurement point refers to the spatial position obtained by moving along the pixel's line of sight from the camera's optical center and using the pixel's depth value as the scale. The generation process involves multiplying the pixel's depth by the corresponding unit direction vector to obtain the displacement from the optical center, and then adding the displacement to the optical center's three-dimensional coordinates component by component to obtain a three-dimensional coordinate point. This point represents the pixel's landing point in the real scene and serves as the basis for calculating the elevation residual and performing geometric correction and rendering by comparing it with the theoretical intersection point with the ground.
[0050] Specifically, the pixel depth value of the depth map is a scalar distance from the camera's optical center to the scene surface along the line of sight for that pixel, used to quantify the geometric scale along the line of sight. The direction vector of the pixel ray is a unit direction vector pointing from the camera's optical center to that pixel, serving as the directional basis for back-projecting the 2D pixel into 3D space. By multiplying the pixel depth value and the direction vector of the pixel ray, the unit direction vector can be scaled according to the depth distance scale to obtain the displacement vector moving along the line of sight from the camera's optical center, describing the length and direction of the displacement. The camera's optical center coordinates are used to describe the spatial position of the imaging system in the selected coordinate system and are the common starting point of all pixel rays. Subsequently, the displacement vector and the camera's optical center coordinates are vector-added to obtain the measurement point, which is the spatial position determined by moving along the pixel's line of sight from the camera's optical center, using the pixel depth value as the scale, representing the pixel's landing point in the real scene.
[0051] Within the near-surface pixel set, the coordinates of the intersection of the measured point and the theoretical ground point are linearly weighted and mixed based on the geometric correction coefficient to obtain the corrected near-surface position. Specifically, firstly, the three-dimensional coordinates of the measurement point and the three-dimensional coordinates of the intersection of the pixel's line of sight and the theoretical ground are extracted from the near-surface pixel set. Then, based on the pre-calculated geometric correction coefficient corresponding to the near-surface layer, the measurement point coordinates are used as the first weighting term, and the theoretical ground intersection coordinates are used as the second weighting term. The geometric correction coefficient is used to assign weights to the second weighting term, and the geometric correction coefficient is subtracted from the first weighting term by 1 to assign weights to the first weighting term. The results of the weighted calculations of each component are combined to obtain the corrected near-surface position corresponding to each near-surface pixel. This position can be adaptively adjusted between the original measurement point and the theoretical ground intersection, thereby eliminating the spatial deviation caused by the increased depth and restoring a position distribution that is closer to the actual ground.
[0052] Within the near-surface pixel set, the pixel depth values and intersection parameters of the depth map are linearly weighted and mixed based on geometric correction coefficients to obtain the corrected depth values of the depth map.
[0053] Specifically, firstly, the depth value of each pixel in the near-surface pixel set is extracted, along with the intersection parameter between the reference ground plane of the multi-scenario virtual scene and the camera pixel ray corresponding to that pixel. The near-surface geometric correction coefficient, previously calculated based on the near-surface pixel set, is also obtained. For each near-surface pixel, a weighting is determined, where the weighting weight for the intersection parameter is the geometric correction coefficient, and the weighting weight for the pixel depth value is 1 minus the geometric correction coefficient. Subsequently, weighted operations are performed on the intersection parameter and pixel depth value of that pixel, i.e., the intersection parameter is multiplied by the geometric correction coefficient, and the pixel depth value is multiplied by (1 - geometric correction coefficient), resulting in two independent weighted results. These two weighted results are then added together to obtain the depth map correction depth value corresponding to that near-surface pixel. Following the image index order of the pixels within the near-surface pixel set, the correction depth values corresponding to all pixels are sequentially associated and stored to form a complete depth map correction depth value dataset.
[0054] Specifically, the corrected near-surface position refers to the three-dimensional spatial position obtained by linearly weighting the coordinates of the intersection point of the measured point and the theoretical ground within the near-surface pixel set according to a geometric correction coefficient. This position is adaptively adjusted between the original measured point and the theoretical intersection point to eliminate the spatial deviation caused by the lengthening of the depth and restore a position distribution that is closer to the actual ground. The corrected depth value of the depth map is a scalar distance value obtained by weighting the original pixel depth and the intersection distance parameter according to the same geometric correction coefficient. It represents the real spatial distance between the pixel's line of sight and the corrected position and is used to replace the original depth value in visibility determination and occlusion rendering, thereby ensuring the consistency between the image rendering effect and the ground geometry.
[0055] Specifically, in the process of generating a virtual environment for home care for the elderly, factors such as reflections and low illumination within the scene can cause spatial position deviations in the original measurement points corresponding to near-ground pixels in the depth map captured by the camera. The original pixel depth values may also exhibit abnormal depth elongation, leading to a discrepancy between the spatial relationship between the near-ground layer and the real ground, thus affecting the accuracy of subsequent scene reconstruction and rendering. Generating and correcting the near-ground layer position involves linearly weighting and mixing the coordinates of the intersection of the original measurement points and the theoretical ground based on geometric correction coefficients. This allows the spatial position of the near-ground layer to adaptively adjust between abnormal measurement points and the theoretical position on the real ground, effectively eliminating spatial deviations and restoring the near-ground layer's position distribution to closely approximate the actual ground surface. The corrected depth value for generating the depth map can be obtained by linearly weighting the original pixel depth value and the intersection parameter using geometric correction coefficients. This yields a scalar value that reflects the true distance between the pixel's line of sight and the corrected near-surface position, replacing the anomalous original depth value. Together, these two values provide accurate foundational data for subsequent generation of corrected scene meshes based on the corrected near-surface position and the static mesh of the indoor model library scene, generation of near-surface corrected specular intensity and roughness based on geometric correction coefficients, and multi-scenario virtual scene 3D rendering based on parameters such as the corrected depth value. This ensures that the final generated virtual environment for elderly home care closely matches the real scene in both spatial geometry and visual representation, meeting the requirements of realism and reliability for the virtual care environment.
[0056] S5. Based on the scene static mesh of the corrected near-surface location and indoor model library, generate the corrected scene mesh, and generate the corrected specular intensity and corrected roughness of the near-surface layer based on the geometric correction coefficient. In an embodiment of the present invention, a modified scene mesh is generated based on the modified near-surface location and the scene static mesh of the indoor model library, including: Triangulation is performed on the 3D point coordinates of the near-surface location within the near-surface pixel set to obtain the near-surface complete mesh. Specifically, triangulation refers to connecting the corrected near-ground 3D points according to spatial adjacency to form a continuous surface composed of triangular facets, thus transforming the discrete point cloud into a renderable and computable geometric surface; near-ground completion mesh refers to the ground region mesh obtained from the above triangulation, used to fill gaps and deformations in the original scene within the near-ground region and provide complete ground geometry.
[0057] Specifically, firstly, the coordinates of all 3D points corresponding to the corrected near-surface positions are extracted from the near-surface pixel set. Then, based on the image index (i.e., row and column coordinates) of the near-surface pixels in the depth map, the spatial adjacency relationship between each 3D point is established, clarifying the association between each 3D point and its surrounding neighboring 3D points, providing a spatial connection basis for the subsequent construction of triangular patches. Subsequently, the Delaunay triangulation algorithm is used as the core triangulation rule. This algorithm can generate high-quality triangular patches by maximizing the minimum angle, effectively avoiding the generation of narrow or overlapping triangular patches and ensuring the geometric stability of the subsequent mesh. According to the spatial adjacency relationship established above, starting from the 3D points in the near-surface boundary region, the process gradually advances towards the interior region. The process involves sequentially connecting three adjacent 3D points to form triangular patches. During this process, it is ensured that the three vertices of each triangular patch originate from spatially adjacent 3D points, and that adjacent triangular patches share a common edge, achieving seamless and non-overlapping continuous patch construction. After completing the triangulation of all 3D points, the generated triangular patch set is validated, eliminating invalid triangular patches with collinear vertices or excessive deviations between the patch normal vector and the reference ground normal vector. Incomplete patches at the boundaries are supplemented and adjusted. Finally, all valid triangular patches are integrated according to their spatial location to form a geometrically continuous mesh structure covering the entire near-surface layer. This mesh structure is the near-surface completion mesh, which can be used to fill geometric gaps and deformations in the original scene within the near-surface layer.
[0058] The near-ground complete mesh and the scene static mesh from the indoor model library are combined using nearest-point constraints to obtain the corrected scene mesh.
[0059] Specifically, nearest-point constraint stitching refers to searching for the nearest vertex or boundary element on both sides at the seam between the near-ground complete mesh and the scene static mesh of the indoor model library, and applying constraints on position and normal continuity to achieve seamless alignment and robust fusion, eliminating gap overlap and misalignment; correcting the scene mesh refers to the overall scene geometry result after constraint stitching, which serves as the consistent geometric basis for subsequent occlusion shadow calculations and physically based shading.
[0060] Specifically, firstly, coordinate system unification processing is performed on the near-ground completed mesh and the scene static mesh of the indoor model library, transforming the two meshes to the same 3D coordinate system to eliminate spatial position deviations caused by different modeling bases and ensure the accuracy of subsequent nearest point search and constraint calculations. Next, the splicing seam area is determined. By analyzing the boundary topology relationship between the near-ground completed mesh (corresponding to near-ground geometry) and the scene static mesh (corresponding to fixed structures such as indoor walls and furniture), the connection range between the ground and other indoor static structures is located, identifying the key areas requiring splicing processing. Then, the nearest point search operation is performed within the seam area. For each boundary vertex of the near-ground completed mesh, a reasonable search radius is set near the corresponding boundary of the scene static mesh. The nearest vertex or boundary element within this radius is searched, and each successfully matched nearest point pair is recorded. Subsequently, dual constraints are applied to each pair of nearest points: one is position... First, continuous constraints are applied. An iterative optimization algorithm is used to adjust the spatial coordinates of the boundary vertices of the near-ground completion mesh, gradually bringing the spatial distance between each pair of closest points closer to zero. This achieves seamless geometric alignment of the two meshes at the junction. Second, continuous normal constraints are applied. The normal vectors of the mesh surfaces containing each pair of closest points are calculated. By fine-tuning the vertex positions of the near-ground completion mesh, the direction of the normal vectors at corresponding points is made consistent, avoiding abrupt changes in surface normal vectors after splicing that could affect subsequent lighting and shadow rendering. After constraint adjustment, the mesh triangular faces in the seam area are smoothed. By subdividing the triangular faces in the transition area or adjusting the weight distribution of adjacent vertices, potential geometric gaps, element overlaps, and spatial misalignment issues are eliminated. Finally, the constrained near-ground completion mesh is integrated with the static scene mesh in the indoor model library, merging them into a unified mesh with a complete topological structure and continuous geometry. This mesh is the corrected scene mesh.
[0061] Specifically, the static mesh of the indoor model library is a set of geometric meshes that are pre-built and stored in the indoor model library to represent the fixed and unchanging structures in the indoor environment of elderly people's homes, such as walls, basic floor frames, fixed furniture, door and window frames, etc. It is formed by splicing together a large number of triangular or polygonal facets according to a preset spatial topological relationship, and has clear three-dimensional spatial coordinates and surface geometric properties, which can accurately reflect the actual shape and spatial position of the fixed indoor structure. As the basic geometric framework of the indoor scene, this mesh does not change with the changes of dynamic elements in the virtual environment.
[0062] In general, the purpose of generating and correcting scene meshes is to structurally integrate the ground completion portion obtained from near-ground layer correction with the original indoor static mesh, thereby obtaining a unified model with geometrically continuous normals, smooth topological closure. This model eliminates ground layering and gaps caused by depth stretching and reflections, ensuring that occlusion judgment and shadow calculation are based on consistent geometry, guaranteeing the reliability of depth buffer comparison, avoiding ground being misjudged as farther away or exhibiting interlacing flickering, while providing stable surface normals and consistent spatial references for material shading, and providing a sustainable scene base for subsequent path planning, interaction detection, and multi-scenario switching, thus achieving synchronous and stable improvement of appearance and spatial relationships in the nursing virtual environment.
[0063] In an embodiment of the present invention, generating corrected specular intensity and corrected roughness of the near-surface layer based on geometric correction coefficients includes: The initial specular intensity of the near-surface layer is analytically recalibrated based on the geometric correction coefficient to obtain the corrected specular intensity of the near-surface layer. Specifically, the initial specular intensity is the proportion of specular reflection energy of the near-surface material before any correction. It is derived from the material library or sensor estimation and directly determines the significance of ground highlights and reflections. Analytical recalibration is a parametric adjustment process that uses a defined continuous monotonic mapping and linear weighting method to scale and offset this intensity according to geometric correction coefficients. Its characteristic is that it can be stably implemented without training and is consistent with depth geometry correction. Corrected specular intensity is the specular reflection parameter after the above recalibration is completed. It is used for subsequent physically based shading to reduce excessive reflection and the resulting illusion of depth elongation, so that the rendered appearance is consistent with the corrected ground geometry.
[0064] Specifically, the initial specular intensity of the near-surface layer before correction is obtained. This intensity characterizes the original specular reflection energy ratio of the near-surface layer material. It can be retrieved from a preset material library (containing specular intensity parameters of common ground materials such as tiles and wood flooring) or estimated in real time through scene sensing technology. Next, the pre-calculated geometric correction coefficient is retrieved. The geometric correction coefficient is a value between 0 and 1, which reflects the degree of correction of the near-surface layer depth anomaly. Then, according to the operation rules of analytical recalibration, the geometric correction coefficient is subtracted from 1, and the result is multiplied by the initial specular intensity to obtain the corrected specular intensity of the near-surface layer. The larger the value of the geometric correction coefficient, the more significant the near-surface layer depth anomaly is, the higher the correction level needs to be, and the greater the reduction in the initial specular intensity. This avoids the visual illusion of a deeper ground due to excessive specular reflection, so that the corrected specular intensity can match the geometrically corrected near-surface layer shape, providing accurate specular reflection parameters for the subsequent physically based shading process, and ensuring the coordination between the rendered appearance of the near-surface layer and the corrected geometry.
[0065] The initial roughness of the near-surface layer is analytically recalibrated based on the geometric correction coefficient to obtain the corrected roughness of the near-surface layer.
[0066] Specifically, initial roughness is a measure of the degree of surface microstructure undulation of near-surface material before correction. It is used to control the scattering width and energy distribution of specular highlights. The smaller the value, the smoother the surface and the sharper the specular highlights; the larger the value, the rougher the surface and the more diffused the specular highlights. Corrected roughness is the result of analytical recalibration of the initial value based on the geometric correction coefficient. Its goal is to moderately increase the scattering of surface microstructure in areas where reflections cause the depth to be misjudged as deeper, thereby suppressing specular reflection and increasing the proportion of diffuse reflection. This reduces the illusion of the ground being stretched in the rendering and keeps the scene depth consistent with the geometrically corrected scene depth, while ensuring continuous smoothness of parameters to maintain the stability and consistency of multi-scenario images.
[0067] Specifically, the initial roughness of the near-surface layer is first obtained. This initial roughness measures the degree of undulation of the surface microstructure of the near-surface layer material before correction. It can be retrieved from a preset material library or estimated in real time through scene sensing technology. Its value directly controls the scattering width and energy distribution of specular highlights. Next, the pre-calculated geometric correction coefficient is retrieved. Then, according to the operation rules of analytical recalibration, the result of subtracting the geometric correction coefficient from 1 is calculated. This result is then multiplied by the initial roughness, and the product is added to the geometric correction coefficient to obtain the corrected roughness of the near-surface layer. In this process, the larger the value of the geometric correction coefficient, the more significant the misjudgment of depth of the near-surface layer due to factors such as reflection is. The corrected roughness will increase accordingly, so that the scattering degree of the surface microstructure is moderately increased, thereby suppressing specular reflection and increasing the proportion of diffuse reflection. This reduces the visual illusion of the ground being stretched during the rendering process, while ensuring that the corrected roughness parameters are continuous and smooth, maintaining the stability and consistency of the image in multiple scenarios, and keeping the rendering effect of the near-surface layer consistent with the scene depth after geometric correction.
[0068] Specifically, the initial specular intensity of the near-surface layer is the proportion of specular reflection energy before correction, and the initial roughness is a measure of the degree of surface microstructure undulation before correction. These two directly determine the significance of near-surface highlights and reflections, scattering width, and energy distribution. However, since the original depth of the near-surface layer may have deviations, directly using the initial specular intensity and initial roughness for rendering can easily lead to an illusion of increased depth due to excessive reflection, or cause inconsistencies between the image and the corrected geometry due to specular scattering not conforming to the true microstructure characteristics. The geometric correction coefficient, on the other hand, is the core parameter for correcting the geometry of the near-surface layer and reflects the degree of correction to near-surface depth anomalies. Based on this coefficient, the initial specular intensity and initial roughness are analytically recalibrated. This allows the corrected specular intensity to reduce excessive reflection, and the corrected roughness to balance the proportion of specular and diffuse reflection by appropriately adjusting the scattering of surface microstructures. This reduces the visual illusion of the ground being stretched during rendering, ensuring that the specular highlights, reflections, and scattering of the near-ground material are consistent with the scene depth after geometric correction. At the same time, it ensures that the material parameters are continuous and smooth, maintaining the stability and consistency of the image in multiple scenarios. This provides accurate material parameters that are adapted to the geometry for subsequent physically based shading, ultimately generating a near-ground visual effect that conforms to a realistic virtual scene in multiple scenarios.
[0069] S6. Based on the correction of depth value, scene mesh, specular intensity and roughness, perform 3D rendering of multi-scenario virtual scenes to generate nursing virtual environment.
[0070] In embodiments of the present invention, the specific steps of 3D rendering include: Visibility determination of pixel fragments in multi-context virtual scenes based on modified depth values; Specifically, a pixel fragment in a multi-context virtual scene refers to the smallest rendering unit generated at a certain pixel position on the screen after the 3D scene is projected and rasterized. This unit carries attribute information obtained by scene geometry and material interpolation, including position, depth, normal, albedo, specular intensity, roughness, and lighting-related quantities.
[0071] Specifically, firstly, after projection and rasterization processing of the multi-scenario virtual scene, pixel fragments generated at each pixel position on the screen are acquired, along with the position, original depth, normal, and other attribute information carried by these pixel fragments. Next, a pre-calculated corrected depth value is retrieved. This corrected depth value is data that accurately reflects the true three-dimensional depth relationship of the scene after geometric correction of the original depth. Subsequently, for each pixel fragment, its original depth attribute is compared and analyzed with the corrected depth value of its corresponding spatial position. If the original depth of the pixel fragment conforms to the true depth hierarchy represented by the corrected depth value, i.e., the pixel fragment is within the depth range that should be observed from the current viewpoint, then the pixel fragment is determined to be visible; otherwise, it is determined to be invisible. By performing the above comparison and determination operation on all pixel fragments in the multi-scenario virtual scene one by one, the visibility determination of all pixel fragments in the entire scene is finally completed.
[0072] Occlusion detection and shadow calculation are performed on pixel fragments based on the modified scene mesh; Specifically, the pre-generated modified scene mesh is retrieved, containing continuous geometric information of the near-surface ground and indoor fixed structures. For each pixel fragment whose visibility has been determined in the multi-scenario virtual scene, its coordinate information in 3D space and the corresponding viewing direction vector (the vector from the camera optical center to the spatial position of the pixel fragment) are extracted. All triangular facet geometric elements in the modified scene mesh are traversed, and the intersection of each triangular facet with the viewing direction vector of the pixel fragment is calculated using a spatial geometric intersection detection algorithm. If a triangular facet intersects with the viewing direction vector, and the distance from the triangular facet to the camera optical center is less than the distance from the pixel fragment to the camera optical center, then the pixel fragment is determined to be occluded by the triangular facet. Mark as occlusion state; after completing the occlusion judgment, for the pixel fragments determined to be unoccluded, determine the preset light source position and illumination direction vector in the scene, emit shadow rays from the three-dimensional spatial coordinates of the pixel fragment along the illumination direction vector, and traverse the triangular facet geometric elements in the modified scene mesh again to check whether the shadow ray intersects with the triangular facets in the modified scene mesh. If there is an intersection and the distance from the intersection point to the pixel fragment's spatial coordinates is less than the distance from the pixel fragment's spatial coordinates to the light source position, then the pixel fragment is determined to be in the shadow area; otherwise, it is determined to be in the illuminated area. Finally, store the occlusion judgment result (occluded or unoccluded) and shadow calculation result (shadow area or illuminated area) of each pixel fragment.
[0073] PBR coloring of the near-surface layer was performed based on the correction of specular intensity and correction of roughness.
[0074] Specifically, PBR shading, or Physically Based Rendering Shading, is a shading method that conforms to the laws of physical lighting for the near-ground layer in the 3D rendering process of generating virtual environments for elderly home care. Its core is to combine the corrected specular intensity and corrected roughness of the near-ground layer, while incorporating the albedo, surface normal, and scene lighting information of the near-ground layer pixel fragments. By calculating the diffuse reflection component and specular reflection component, the two types of components are linearly superimposed according to physical laws and additional lighting contributions are incorporated to finally obtain the true light intensity and RGB color value of the near-ground layer pixel fragments.
[0075] Specifically, firstly, the corrected specular intensity and corrected roughness of the near-surface layer are retrieved. Simultaneously, the albedo, surface normal, and lighting information of the near-surface layer pixel fragments are extracted, including light source direction, light source intensity, and ambient irradiance. Next, using a physically based rendering (PBR) model, the diffuse component of the near-surface layer is calculated by multiplying the albedo by the cosine of the angle between the light source direction and the surface normal, and incorporating the ambient light diffuse reflection contribution to obtain the diffuse light intensity distribution. Then, the specular component of the near-surface layer is calculated. Using microsurface theory, the corrected roughness is substituted into a normal distribution function to describe the undulations of the surface microstructure. The corrected specular intensity is used as the energy proportionality coefficient for specular reflection, combined with the light source direction... The relationship between the direction of view, the line of sight, and the surface normal is used to calculate the specular reflection intensity at different viewing angles using the Fresnel equation, thus obtaining the specular reflection light intensity distribution. Subsequently, the diffuse reflection component and the specular reflection component are linearly superimposed according to the physical lighting law, while incorporating additional lighting contributions such as ambient light reflection and indirect lighting, to obtain the final light intensity value of the near-ground layer pixel fragments. Finally, the final light intensity value is mapped to the corresponding RGB color value to complete the PBR shading processing of each pixel fragment in the near-ground layer, so that the visual representation of the near-ground layer conforms to the lighting characteristics of real materials and is consistent with the corrected geometric shape and lighting effects, providing a realistic near-ground layer visual presentation for the subsequent generation of a complete virtual environment for elderly home care.
[0076] In an embodiment of the present invention, the specific steps for performing 3D rendering of a multi-scenario virtual scene based on corrected depth values, corrected scene meshes, corrected specular intensity, and corrected roughness to generate a nursing virtual environment are as follows: Specifically, firstly, the visibility determination results of pixel fragments in the multi-scenario virtual scene based on the corrected depth value are retrieved. Then, the occlusion and shadow states of pixel fragments are obtained based on the corrected scene mesh, and the PBR shading results of near-ground pixel fragments are calculated by combining corrected specular intensity and corrected roughness. A one-to-one correspondence is established according to the 3D spatial coordinates and screen projection coordinates of the pixel fragments in the scene, constructing a full-scene pixel fragment information association table to ensure that there are no mismatches among the three types of core data. Next, supplementary shading processing is performed on indoor static elements outside the near-ground layer, such as walls, furniture, doors, and windows. Based on the geometric properties of triangular facets, surface normals, and other geometric attributes of such elements in the scene mesh, as well as preset material parameters such as wall paint albedo, furniture wood roughness, and PBR shading logic, their RGB color values are calculated. If the pixel fragments of such elements are occluded by other structures, their shading results are marked as invisible and replaced with the shading results of the occluder. Subsequently, the entire scene spatial hierarchy is blended according to the near-object priority rendering hierarchy rule, first rendering elements that are closer in spatial position, such as the ground and low furniture, and then rendering elements that are farther away, such as the upper part of the walls and the ceiling. During the process, real-time calls are made. Pixel fragment occlusion data is used to skip rendering or overwrite occluded distant element fragments with the shading results of nearby elements, ensuring the realism of spatial hierarchy. Next, global calibration of lighting effects is performed, traversing all visible pixel fragments. If a fragment is in a shadow area, its PBR shading intensity is reduced according to a linear decay model of the shadow ray length; if it is in a lit area, its original intensity is maintained. Simultaneously, global ambient irradiance data is incorporated to fine-tune the color values of pixel fragments across the entire scene, avoiding harsh lighting transitions. Finally, a multi-sampling anti-aliasing algorithm is used to refine the screen edges and scene element outlines. For each pixel fragment, the color values of its 4-8 neighboring pixel fragments are taken and weighted averaged to eliminate jagged edges in the image. Finally, all the processed pixel fragment color data are arranged sequentially according to the preset screen resolution to generate a two-dimensional image frame. If the multi-scenario virtual scene contains different lighting angles or nursing layouts, the above-mentioned associated color fusion calibration optimization steps are repeated for each scenario to generate a corresponding image frame sequence. Finally, all scenario image frame sequences are integrated to form a virtual environment for elderly home care with accurate lighting and shadow effects and near-ground material representation.
[0077] In general, using corrected depth values for visibility determination ensures that depth buffer comparisons are based on corrected real distances, thus avoiding perspective elongation and flickering caused by near-ground layers being misjudged as farther away. Occlusion judgment and shadow calculation based on corrected scene meshes use a unified model with smooth, topologically closed geometric normals as the projection and shading benchmark, eliminating light leakage and shadow edge misalignment caused by gaps and layering, ensuring occlusion relationships and shadow outlines are consistent with real geometry. Using corrected specular intensity and roughness for physically based shading suppresses false deepening effects caused by excessively strong specular highlights and specular reflections near the ground layer, and increases diffuse reflection ratio, ensuring material appearance is consistent with the corrected geometric depth. These three methods work together to ensure that pixel fragments simultaneously satisfy accurate real-distance judgment, stable occlusion and shadows, and reliable material performance in continuous scenarios such as bedrooms, corridors, and bathrooms, resulting in a consistent rendering of the nursing virtual environment.
[0078] Specifically, addressing the challenges of implementing in-home nursing practice in the current field of elderly home care, and the limitations of existing market products such as fragmented elderly home care issues and single-scenario simulations that are detached from real-world scenarios, hindering the improvement of caregivers' comprehensive abilities, this solution proposes a scenario-based continuous situational simulation elderly home care training system. Utilizing virtual or virtual-real hybrid technologies, it constructs a virtual nursing environment based on the characteristics of the real elderly home environment, forming a complete service chain covering elderly home care assessment, daily care, and emergency response to sudden situations. This differs from existing fragmented products that can only simulate single scenarios, highlighting three key differentiating features: continuity of nursing scenarios, immersive nursing process, and adaptability to nursing education needs. Its design concept is to break away from the limitations of traditional single nursing problem simulation and shift to scenario-based full-process care simulation. The developed product can support operation on PC and VR terminals and reserves an adaptation interface for future virtual-real integration terminals. It can realize system-level scenario case design and development. From the perspective of technology implementation and market transformation, its future industrial application is feasible. It can provide practical training support for elderly home care workers that meets actual needs and effectively solve the shortcomings of existing training models in terms of scenario authenticity, process integrity and comprehensive ability training.
[0079] Example 2: Against the backdrop of an aging population and increasing demand for home-based elderly care, in-home nursing internships face real challenges such as resource scarcity, uncontrollable risks, and incomplete scenario coverage. Existing home-based elderly care training products on the market generally suffer from limitations such as fragmented problem-solving and single-scenario simulations divorced from reality. Most products focus only on single care steps like feeding and turning over, lacking the recreation of complex scenarios with multiple intertwined problems in real home environments. This makes it difficult for caregivers to develop systematic and comprehensive coping abilities. Therefore, the virtual environment generation of a scenario-based continuous situational simulation home-based elderly care training system should be based on a single entry point, a full-process, and multi-scenario coupling as its core logic. Starting from real needs, it constructs a virtual training space that combines realism, continuity, and teaching adaptability. The generation of this virtual environment begins with a deep understanding of real-world home scenarios for the elderly. Based on data collection and modeling, through field research on elderly housing in different cities and with different apartment types, including old communities without elevators and new communities with age-friendly renovations, key elements in the home environment were recorded, including floor materials such as non-slip tiles and wooden floors, furniture placement such as low sofas and chairs with armrests, age-friendly facilities such as bedside handrails and emergency call buttons in the bathroom, and daily necessities such as magnifying glasses and large-print medicine instructions. Then, by combining 3D scanning technology and VR modeling technology, these elements were accurately restored into the basic framework of the virtual environment. At the same time, physiological characteristic data of the elderly such as slow movement, blurred vision, hearing loss, signs of common chronic diseases and behavioral habits such as frequent nighttime urination and liking to dry items on the balcony were incorporated to ensure that the virtual environment is highly consistent with the real home scene in terms of visuals and spatial layout, laying a realistic environmental foundation for subsequent multi-scenario coupling.After the basic environment modeling is completed, the core step in virtual environment generation lies in the design and integration of multi-scenario coupling logic. This step needs to break through the limitations of single-scenario simulation and focus on the characteristics of multiple problems occurring simultaneously or continuously in real home care. First, the core care scenario modules in elderly home care are identified, including four categories: health assessment, daily care, rehabilitation training, and emergency response. The health assessment module covers consultation and communication to understand the elderly person's diet, sleep, and medication history; physical examination to measure blood pressure, blood sugar, and heart rate; and environmental safety assessment to identify fall risks and fire hazards. The daily care module includes dietary care, such as customized meals based on the elderly person's chronic diseases, assisting with eating to prevent choking, and personal hygiene assistance with bathing and oral care. The virtual environment provides a range of care modules, including clothing changing, assisting with getting up, turning over to prevent pressure sores, and making the bed; rehabilitation training modules covering limb function training to help the elderly walk and guide them in using walking aids; cognitive function training using puzzles and memory games to aid cognition; and emergency response modules covering scenarios such as sudden illnesses like myocardial infarction, stroke, and hypoglycemic coma; accidents like falls, burns, and choking; and environmental emergencies like power outages and leaking pipes. The system then designs the coupling relationships between these scenarios, not simply superimposing scenarios, but organically linking them based on real-world nursing logic. For example, in daily meal care, if a previous health assessment has recorded that the elderly person has diabetes and weak swallowing function, the virtual environment will automatically couple scenarios related to sudden changes in swallowing ability during meals. The dual challenges of choking and a sudden spike in postprandial blood sugar require caregivers to first address the choking by patting the back and performing the Heimlich maneuver, then quickly measure blood sugar and assist with administering hypoglycemic medication. Simultaneously, caregivers must be mindful of the emotional distress caused by choking and incorporate reassurance and communication. In nighttime care scenarios, the virtual environment may couple scenarios of an elderly person's unsteady gait due to dim lighting and the risk of falls due to water on the bathroom floor. Following a fall, based on the elderly person's pre-assessed osteoporosis status, a suspected fracture scenario may be triggered, requiring caregivers to first determine the cause of the fall, examine the injury, and then choose the appropriate method of transport to avoid further injury, while simultaneously triggering an emergency call process. Throughout this process, the virtual elderly person will... Real pain responses, such as limb curling and groaning, and verbal expressions like "I can't move my legs," are simulated. The system even uses tactile feedback technology to simulate the temperature and muscle tension of the elderly person's limbs, giving caregivers a sense of immersion. This multi-scenario coupling is not a fixed pattern, but rather a dynamic triggering mechanism established by AI algorithms. It can be adjusted in real time according to the caregiver's operation progress and response. If the caregiver quickly identifies and handles the choking problem, the system will further add the scenario of the elderly person forgetting to take their blood sugar medication to increase the difficulty. If the caregiver makes an improper operation in handling a fall, such as directly dragging the elderly person's limbs, the system will immediately pop up an error message and recreate the consequences of aggravated fractures, reinforcing the caregiver's memory of the standard operation.Building upon this foundation, the generation of virtual environments requires the further development of a comprehensive service chain, from assessment to emergency response, to ensure the continuity of scenarios rather than their isolated existence. Starting with caregivers logging into the system through a single entry point, the virtual environment will first present a virtual elderly person with a complete backstory, such as a 78-year-old living alone, suffering from hypertension and mild cognitive impairment, whose children visit weekly. Caregivers must first complete a comprehensive health assessment and environmental safety check. The results of this assessment will directly affect the generation of all subsequent scenarios. If the assessment reveals that the elderly person has poor memory and frequently forgets to turn off the gas, it will subsequently trigger a scenario where the elderly person forgets to turn off the stove after boiling water. In an emergency situation involving a gas leak, if the assessment reveals insufficient lower limb muscle strength in the elderly, there will be frequent instances during daily care where the elderly person is unsteady on their feet and requires assistance. The entire care process is not a single action but rather a series of changing scenarios that unfold over time. For example, from helping the elderly person get up in the morning and measuring their morning blood pressure, to preparing a low-salt, low-fat meal at noon and assisting with eating, to conducting limb rehabilitation training in the afternoon, addressing the elderly person's emotional distress due to missing their children in the evening, and dealing with sudden hypoglycemia symptoms at night, each stage's scenario is closely linked to the outcome of the previous stage, forming an assessment-care-feedback-adjustment cycle. The complete closed-loop system allows caregivers to experience the entire home care workflow in a virtual environment, rather than fragmented operational training. To highlight the differentiated characteristic of adaptability to teaching, the virtual environment must have flexible teaching parameter adjustment capabilities. It can be customized with different teaching objectives, such as introductory training for novice caregivers, specialized enhancement for experienced caregivers, and teaching scenarios such as school classroom training and internal training in elderly care institutions. For novice caregivers, the system generates simple, single-question scenarios with guiding prompts, such as triggering a scenario where the elderly person needs assistance dressing, and displaying text prompts when errors occur, focusing on cultivating basic operational standards. For experienced caregivers, the system generates scenarios without prompts, such as triggering a triple crisis of a sudden heart attack, a power outage at home, and poor telephone signal, testing comprehensive emergency response capabilities. Furthermore, the virtual environment automatically records every step of the caregiver's operation data, such as operation time, action standardization, and problem recognition speed, and generates a visual evaluation report, marking areas for improvement, such as incorrect handling after a fall or failure to clearly state the address during emergency calls. It also supports operation process replay, allowing trainers to review and explain key aspects, helping caregivers quickly improve their comprehensive capabilities.At the technical support level, the generation of this virtual environment needs to integrate virtual simulation and virtual-real combination technologies. On the one hand, VR devices can achieve an immersive visual and auditory experience, making caregivers feel as if they are in a real elderly person's home. On the other hand, a virtual-real combination operation mode is introduced, linking real care tools such as simulated blood pressure monitors, feeding spoons, and wheelchair models with the virtual environment. The caregiver's actions on the real tools will be reflected in the virtual environment in real time. For example, when a real blood pressure monitor is used to measure the blood pressure of a virtual elderly person, the virtual environment will display the corresponding blood pressure value change, avoiding the sense of alienation of purely virtual operation. In addition, AI technology is needed to endow the virtual elderly person with intelligent interactive capabilities, enabling them to respond to the caregiver's language and actions in a way that conforms to the physiological and psychological characteristics of the elderly. The system's responses, such as indicating difficulty in hearing when a caregiver speaks softly or expressing comfort when handled gently, enhance the realism of the scenario. This method of generating a virtual environment for elderly home care based on multi-scenario coupling not only effectively solves the practical problem of difficulty in in-home observation but also breaks through the limitations of existing products' fragmented scenarios. Through realistic environment restoration, organic coupling of multiple scenarios, and the construction of a complete process chain, caregivers can repeatedly practice coping methods for complex scenarios in a safe and controllable virtual space, gradually improving their comprehensive nursing capabilities. Simultaneously, its flexible teaching adaptability meets the training needs of different stages, ultimately cultivating more practically relevant professionals for the field of elderly home care and contributing to the overall improvement of elderly care service quality.
[0080] like Figure 2 The diagram shown is a functional block diagram of a virtual environment generation system for elderly home care based on multi-context coupling, provided by an embodiment of the present invention.
[0081] In this embodiment, the functions of each module / unit are as follows: The ground intersection calculation module is used to calculate the theoretical ground intersection coordinates of pixel coordinates in the depth map based on the intersection distance parameters between the reference ground plane and the pixel rays of the camera in a multi-scenario virtual scene. The near-surface layer extraction module is used to generate a set of near-surface layer pixels for the depth map based on the intersection coordinates of the normal vector of the reference ground plane and the theoretical ground plane. The correction coefficient calculation module is used to calculate the geometric correction coefficient of the near-surface layer based on the near-surface pixel set; The near-surface location correction module is used to generate corrected depth values for near-surface location and depth maps based on geometric correction coefficients. The Scene Geometry and Material Correction Module is used to generate a corrected scene mesh based on the corrected near-surface location and the static scene mesh in the indoor model library, and to generate corrected specular intensity and corrected roughness of the near-surface layer based on geometric correction coefficients. The nursing virtual environment rendering module is used to perform 3D rendering of multi-scenario virtual scenes based on corrected depth values, corrected scene meshes, corrected specular intensity, and corrected roughness to generate nursing virtual environments.
[0082] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for generating a virtual environment for home care of the elderly based on multi-context coupling, characterized in that, Includes the following steps: S1. Based on the intersection parameter between the reference ground plane and the pixel ray of the camera in the multi-scenario virtual scene, calculate the theoretical ground intersection point coordinates of the pixel coordinates in the depth map; The specific steps for calculating the coordinates of the theoretical ground intersection point are as follows: Depth maps of multi-scenario virtual scenes are captured using a camera; Calculate the intersection parameter between the reference ground plane of the multi-context virtual scene and the pixel ray of the camera. The formula for calculating the intersection parameter is as follows: , In the formula, Pixel coordinates in the depth map The corresponding intersection distance parameter, It is the normal vector of the reference ground plane. yes transpose, These are the optical center coordinates of the camera. It is a constant term of the reference ground plane. It is the direction vector of the pixel ray. These are the pixel coordinates of the depth map; Based on the intersection parameter, the optical center coordinates of the camera, and the direction vector of the pixel ray, calculate the theoretical ground intersection point coordinates of the pixel coordinates; S2. Based on the normal vector of the reference ground plane and the coordinates of the intersection point of the theoretical ground, generate a set of near-surface pixels for the depth map; S3. Calculate the geometric correction coefficient of the near-surface layer based on the near-surface pixel set; S4. Based on the geometric correction factor, generate the corrected depth value of the corrected near-surface location and depth map; S5. Based on the scene static mesh of the corrected near-surface location and indoor model library, generate the corrected scene mesh, and generate the corrected specular intensity and corrected roughness of the near-surface layer based on the geometric correction coefficient. S6. Based on the correction of depth value, scene mesh, specular intensity and roughness, perform 3D rendering of multi-scenario virtual scenes to generate nursing virtual environment.
2. The method for generating a virtual environment for elderly home care based on multi-context coupling according to claim 1, characterized in that, Based on the normal vector of the reference ground plane and the coordinates of the intersection point of the theoretical ground, a near-surface pixel set of the depth map is generated, including: The dot product of the intersection point of the transpose of the normal vector and the theoretical ground is obtained. Add the dot product result and the constant term of the reference ground plane to obtain the elevation residual of the intersection point between the reference ground plane and the pixel ray; Calculate the median absolute deviation of all elevation residuals; If the absolute value of the elevation residual is less than or equal to the median absolute deviation, then the pixel coordinates corresponding to the elevation residual are defined as near-surface pixels. All near-surface pixels are gathered into a near-surface pixel set.
3. The method for generating a virtual environment for elderly home care based on multi-context coupling according to claim 1, characterized in that, Based on the near-surface pixel set, the geometric correction coefficient for the near-surface layer is calculated, including: Calculate the 50th and 95th percentiles based on the near-surface pixel set; Calculate the difference between the 95th and 50th quantiles; The larger value is obtained by taking the maximum value between the 50th quantile and the preset smallest positive number; Divide the quantile difference result by the larger value to obtain the depth anomaly ratio of the near-surface layer; By performing a monotonic mapping on the depth anomaly ratio, the geometric correction coefficient for the near-surface layer is obtained.
4. The method for generating a virtual environment for elderly home care based on multi-context coupling according to claim 1, characterized in that, Based on geometric correction factors, corrected depth values are generated for the corrected near-surface location and depth map, including: The displacement vector is obtained by multiplying the pixel depth value and the direction vector of the pixel ray in the depth map. The measurement point is obtained by vector addition of the displacement vector and the optical center coordinates of the camera; Within the near-surface pixel set, the coordinates of the intersection of the measured point and the theoretical ground point are linearly weighted and mixed based on the geometric correction coefficient to obtain the corrected near-surface position. Within the near-surface pixel set, the pixel depth values and intersection parameters of the depth map are linearly weighted and mixed based on geometric correction coefficients to obtain the corrected depth values of the depth map.
5. The method for generating a virtual environment for home care for the elderly based on multi-context coupling according to claim 1, characterized in that, Based on the scene static mesh from the modified near-surface location and indoor model library, a modified scene mesh is generated, including: Triangulation is performed on the 3D point coordinates of the near-surface location within the near-surface pixel set to obtain the near-surface complete mesh. The near-ground complete mesh and the scene static mesh from the indoor model library are combined using nearest-point constraints to obtain the corrected scene mesh.
6. The method for generating a virtual environment for home care of the elderly based on multi-context coupling according to claim 1, characterized in that, The near-surface corrected mirror intensity and corrected roughness are generated based on geometric correction factors, including: The initial specular intensity of the near-surface layer is analytically recalibrated based on the geometric correction coefficient to obtain the corrected specular intensity of the near-surface layer. The initial roughness of the near-surface layer is analytically recalibrated based on the geometric correction coefficient to obtain the corrected roughness of the near-surface layer.
7. The method for generating a virtual environment for elderly home care based on multi-context coupling according to claim 1, characterized in that, The specific steps of 3D rendering include: Visibility determination of pixel fragments in multi-context virtual scenes based on modified depth values; Occlusion detection and shadow calculation are performed on pixel fragments based on the modified scene mesh; PBR coloring of the near-surface layer was performed based on the correction of specular intensity and correction of roughness.
8. A virtual environment generation system for elderly home care based on multi-context coupling, characterized in that, The system includes: The ground intersection calculation module is used to calculate the theoretical ground intersection coordinates of pixel coordinates in the depth map based on the intersection distance parameters between the reference ground plane and the pixel rays of the camera in a multi-scenario virtual scene. The specific steps for calculating the coordinates of the theoretical ground intersection point are as follows: Depth maps of multi-scenario virtual scenes are captured using a camera; Calculate the intersection parameter between the reference ground plane of the multi-context virtual scene and the pixel ray of the camera. The formula for calculating the intersection parameter is as follows: , In the formula, Pixel coordinates in the depth map The corresponding intersection distance parameter, It is the normal vector of the reference ground plane. yes transpose, These are the optical center coordinates of the camera. It is a constant term of the reference ground plane. It is the direction vector of the pixel ray. These are the pixel coordinates of the depth map; Based on the intersection parameter, the optical center coordinates of the camera, and the direction vector of the pixel ray, calculate the theoretical ground intersection point coordinates of the pixel coordinates; The near-surface layer extraction module is used to generate a set of near-surface layer pixels for the depth map based on the intersection coordinates of the normal vector of the reference ground plane and the theoretical ground plane. The correction coefficient calculation module is used to calculate the geometric correction coefficient of the near-surface layer based on the near-surface pixel set; The near-surface location correction module is used to generate corrected depth values for near-surface location and depth maps based on geometric correction coefficients. The Scene Geometry and Material Correction Module is used to generate a corrected scene mesh based on the corrected near-surface location and the static scene mesh in the indoor model library, and to generate corrected specular intensity and corrected roughness of the near-surface layer based on geometric correction coefficients. The nursing virtual environment rendering module is used to perform 3D rendering of multi-scenario virtual scenes based on corrected depth values, corrected scene meshes, corrected specular intensity, and corrected roughness to generate nursing virtual environments.
Citation Information
Patent Citations
Semantic element ranging methods, devices, and electronic equipment based on sparse direct methods
CN113177984B
Rendering method and system of virtual environment three-dimensional model
CN118447152A
Monocular camera-based ground height map determination method and device, and medium
CN121391955A