Method and system for dynamically updating SLAM map of pension community
By using surveillance cameras in elderly care communities to align images with semantic SLAM maps and perform local SLAM processing, areas of environmental change are automatically detected and updated. This solves the problems of low map update efficiency and insufficient accuracy in existing technologies, and achieves efficient and accurate dynamic updates of SLAM maps.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- OB TELECOM ELECTRONICS
- Filing Date
- 2025-12-12
- Publication Date
- 2026-05-15
AI Technical Summary
Existing SLAM map update methods for senior living communities rely on manual operation, resulting in low efficiency. Furthermore, dynamic SLAM methods cannot effectively detect and update persistent changes in facilities, affecting the accuracy of positioning and navigation.
By acquiring RGB images from surveillance cameras and aligning them with pre-generated semantic SLAM maps, areas of environmental change are detected, and local SLAM processing is performed to generate local 3D map fragments, which are then merged and updated into a new map.
It enables automated map updates, improving the timeliness and accuracy of maps, and ensuring the continuity of intelligent services and long-term adaptability to the environment.
Smart Images

Figure CN122049261A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer vision, in particular to a SLAM map dynamic updating method and system for a pension community. BACKGROUND
[0002] With the increasing trend of population aging, intelligent pension has become an important direction to improve the quality of life and nursing efficiency of the elderly. In the intelligent pension community, functions such as indoor positioning, path navigation, service robot cruising, and environmental monitoring are highly dependent on the accuracy and semantic integrity of the environment map. The high-precision and semantic map generated based on the Simultaneous Localization and Mapping (SLAM) technology has become the core foundation of building an intelligent pension service system. However, the environment of the pension community is not static and unchanging, and is affected by factors such as daily cleaning, facility maintenance, and functional area reconstruction, resulting in frequent adjustments of indoor layout. The dynamic nature of such environment puts higher requirements on the timeliness and accuracy of the SLAM map.
[0003] Current mainstream SLAM systems are mostly based on the assumption of static environment, and the core goal is to build a global map that is stable in time and continuous in space. After the mapping is completed, the map is used for subsequent positioning and navigation tasks, without considering the case where the environment structure may change. To deal with the problem of map failure, there are currently two main strategies: one is periodic global map reconstruction, that is, periodically dispatch personnel carrying mapping equipment (such as laser radar, RGB-D camera, etc.) to re-traverse the entire pension community to reconstruct the global map; the other is to introduce dynamic SLAM method to extract stable background by filtering out short-time dynamic objects (such as pedestrians) to improve the robustness of mapping.
[0004] However, the existing periodic global map reconstruction method relies on manual operation and is prone to cause interruption of intelligent services during mapping, resulting in low overall execution efficiency; at the same time, the existing dynamic SLAM method mainly targets short-time moving objects and cannot effectively perceive and update the mechanism for persistent changes in facilities, which is prone to cause map distortion and thus affect the accuracy of positioning and navigation. SUMMARY
[0005] In view of the above deficiencies of the prior art, the purpose of the embodiments of the present application is to provide a SLAM map dynamic updating method for a pension community, which can solve the technical problems that the existing periodic global map reconstruction method relies on manual operation and is prone to cause interruption of intelligent services during mapping, resulting in low overall execution efficiency; at the same time, the existing dynamic SLAM method mainly targets short-time moving objects and cannot effectively perceive and update the mechanism for persistent changes in facilities, which is prone to cause map distortion and thus affect the accuracy of positioning and navigation.
[0006] A first aspect of this invention proposes a method for dynamically updating SLAM maps of elderly care communities, comprising: S1: Obtain RGB images captured by surveillance cameras with known poses in the elderly care community; S2: Load a pre-generated community semantic SLAM map, wherein the SLAM map includes historical keyframe images and a 3D point cloud; S3: Perform image alignment operation between the RGB image and the historical keyframe image of the pose nearest neighbor in the community semantic SLAM map to obtain the aligned historical image; S4: Based on the aligned historical image, the environmental change areas in the RGB image are detected by image reprojection and difference calculation. S5: Perform local SLAM processing on the current frame image and subsequent frame images of the environmental change area to generate local 3D map fragments; S6: Fuse the local 3D map fragment with the community semantic SLAM map, and update the 3D point cloud and corresponding semantic labels in the environmental change area to generate an updated SLAM map.
[0007] A second aspect of this invention provides a dynamic update system for SLAM maps of elderly care communities, comprising: a processor and a memory; The memory stores programs or instructions that can run on the processor, which, when executed by the processor, implement the steps of the dynamic update method for SLAM maps of elderly care communities as described in the first aspect.
[0008] A third aspect of the present invention provides a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the dynamic update method for SLAM maps of elderly care communities as described in the first aspect.
[0009] The beneficial effects of the technical solutions provided by the embodiments of the present invention include at least the following: In this embodiment of the invention, RGB images are acquired by deploying surveillance cameras with known poses and aligned with historical keyframe images in a semantic SLAM map. This enables automatic perception and localization of the environmental state, avoiding the need for manual re-traversal of the environment, effectively improving map update efficiency and ensuring the continuity of intelligent services. Simultaneously, through image reprojection and difference detection, areas of permanent change in the environment can be identified. Local SLAM mapping and 3D map fragment generation are then performed on these areas, which are subsequently merged and updated with the original SLAM map. This achieves accurate correction of point clouds and semantic labels in changed areas, ensuring the timeliness and reliability of map content and enhancing the system's long-term adaptability to the environment. Attached Figure Description
[0010] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0011] Figure 1 This is a flowchart illustrating a method for dynamically updating a SLAM map of an elderly care community, as provided in an embodiment of the present invention.
[0012] Figure 2 This is a schematic diagram of the structure of a dynamic SLAM map update system for elderly care communities provided in an embodiment of the present invention. Detailed Implementation
[0013] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0014] The following description, in conjunction with the accompanying drawings, details the method for dynamically updating SLAM maps of elderly care communities provided by the present invention through specific embodiments and application scenarios.
[0015] Reference manual attached Figure 1 The diagram illustrates a flowchart of a method for dynamically updating a SLAM map of an elderly care community, as provided in an embodiment of the present invention.
[0016] This invention provides a method for dynamically updating SLAM maps of elderly care communities, which may include the following steps: S1: Acquire RGB images captured by surveillance cameras with known poses in the senior living community.
[0017] Among them, RGB images refer to three-channel color images of red, green and blue captured by surveillance cameras. They have rich texture, edge and color information and can be used for tasks such as visual feature extraction, image registration and semantic recognition.
[0018] Specifically, real-time monocular RGB images of fixed surveillance cameras installed in the elderly care community are acquired, and the known pose of each camera in the map coordinate system is also acquired.
[0019] S2: Load a pre-generated community semantic SLAM map, which includes historical keyframe images and a 3D point cloud.
[0020] A SLAM map, in particular, refers to a three-dimensional environmental representation structure gradually constructed through movement or data acquisition within the environment using a visual SLAM system. This map typically includes keyframe images, camera pose, sparse or dense 3D point cloud data, and optional semantic labeling information. SLAM maps not only reflect the geometric structure of the environment but also provide spatial references for subsequent tasks such as localization, navigation, and environmental analysis, serving as the core data foundation for perception systems in intelligent environments.
[0021] It should be noted that loading the pre-generated community semantic SLAM map aims to provide a stable and reliable spatial reference benchmark when the environment changes, so as to support accurate comparison and difference detection between the current image and the historical environment.
[0022] S3: Perform image alignment operation between the RGB image and the historical keyframe image of the pose nearest neighbor in the community semantic SLAM map to obtain the aligned historical image.
[0023] It should be noted that image alignment refers to transforming one image to the viewpoint or coordinate system of another image by calculating the geometric transformation relationship between the two images, so that the same physical scene described in the two images is aligned as consistently as possible in space. Specifically, in this invention, it refers to remapping the historical keyframe image in the SLAM map that is closest to the current camera pose using image feature matching and geometric transformation (such as homography matrix), thereby generating an "aligned historical image" with the same viewpoint as the current RGB image.
[0024] In one possible implementation, S3 specifically includes: S301: Based on the known global pose of the surveillance camera, use KD-Tree to search in the community semantic SLAM map and select the historical keyframe image that is the nearest neighbor of the known global pose.
[0025] KD-Tree (K-Dimensional Tree) is a spatial partitioning data structure used for fast retrieval of data points in high-dimensional space, commonly used in nearest neighbor search tasks. In this invention, KD-Tree is used in the keyframe database of a SLAM map to quickly retrieve the historical keyframe closest to the current location based on the camera's known global pose. By spatially indexing and hierarchically partitioning the keyframe poses, KD-Tree can significantly improve the efficiency of finding the nearest neighbor frame in multi-frame data, thereby accelerating the change detection process, reducing computational resource consumption, and ensuring the system has real-time response capabilities.
[0026] Optionally, find the top N (e.g., N=3) historical keyframes that are closest to the known global pose in Euclidean distance.
[0027] S302: Extract local feature points from RGB images and historical keyframe images.
[0028] It should be noted that local feature points refer to information points in an image that have significant local structures such as obvious texture, corner points, edge intersections, or abrupt changes in brightness. They can maintain strong recognizability and stability under image transformations (such as rotation, scaling, and changes in viewpoint).
[0029] S303: Based on Hamming distance, perform feature point matching between local feature points of RGB images and local feature points of historical keyframe images.
[0030] Hamming distance is a distance metric used to measure the degree of difference between two binary strings of equal length. It is defined as the sum of the number of distinct bits in corresponding positions of the two strings. In this invention, Hamming distance is used to calculate the similarity between local image feature descriptors, and is particularly suitable for feature matching tasks that use binary descriptors, such as ORB.
[0031] Optionally, the Hamming distance can be used for feature descriptor matching. For ORB, the Hamming distance is calculated as the number of 1s in the XOR operation between two binary strings.
[0032] It should be noted that Hamming distance calculation only involves bit operations (XOR + counting), so it has extremely high computational efficiency when processing a large number of feature point matching, making it particularly suitable for image alignment and change detection tasks with high real-time requirements.
[0033] In this embodiment of the invention, the matching method using Hamming distance for binary descriptors has the advantages of fast computation speed and low resource overhead, and is especially suitable for feature points using ORB descriptors. This matching method can complete large-scale matching operations with only bitwise operations, significantly improving the overall system efficiency while ensuring matching accuracy.
[0034] S304: The RANSAC algorithm is used to perform geometric consistency verification on the feature point matching results, filter out mismatched points, and estimate the homography matrix between the RGB image and the historical keyframe image.
[0035] RANSAC (Random Sample Consensus) is a robust parameter estimation algorithm primarily used to estimate model parameters from data containing a large number of outliers. In this invention, RANSAC is used to perform geometric consistency checks on image feature point matching results, effectively filtering out mismatched points and estimating the homography matrix or fundamental matrix between the current image and historical keyframes.
[0036] It should be noted that geometric consistency verification refers to the process of verifying the spatial geometric constraints of the preliminary matching results during image feature point matching. The purpose is to eliminate mismatched points (external points) with unreasonable positional relationships and retain the correct matching points (internal points) that satisfy the geometric transformation model.
[0037] In this embodiment of the invention, the RANSAC algorithm, even in the presence of mismatched points, can effectively identify interior point matching pairs that conform to global geometric constraints through random sampling and consistency evaluation, and estimate the homography matrix between images. This algorithm exhibits strong robustness, significantly improves image registration quality, reduces error propagation, and provides a reliable foundation for subsequent reprojection and difference analysis.
[0038] S305: Based on the homography matrix, align the historical keyframe images to the viewpoint of the RGB image to obtain the aligned historical image: ; in, This represents the pixel coordinates of a pixel in a historical keyframe image after homography matrix transformation, as seen in the current RGB image viewpoint. Represents the homography matrix. Represents the pixels in the historical keyframe image. The x-coordinate of the historical image (pixels). Represents the pixel ordinate of the historical image. This represents the transpose of a matrix.
[0039] Specifically, for each pixel in the historical keyframe, its position in the aligned image is transformed from homogeneous coordinates to non-homogeneous coordinates.
[0040] In this embodiment of the invention, this step efficiently integrates spatial fast retrieval (KD-Tree), image description abstraction (local features), matching optimization (Hamming distance), geometric constraint screening (RANSAC), and projection transformation to construct a high-precision and robust image alignment process. This lays a rigorous perceptual foundation for subsequent identification and local mapping of areas with environmental changes, while also possessing good real-time performance and scalability. It is particularly suitable for scenarios such as elderly care communities where system stability and response efficiency are critical. S4: Based on aligned historical images, environmental change areas in RGB images are detected through image reprojection and difference calculation.
[0041] Image reprojection refers to the process of transforming the pixel content of an image to another viewpoint based on known geometric transformation relationships (such as homography matrix or camera pose transformation). In this invention, image reprojection transforms historical keyframe images to the current camera viewpoint by using the homography matrix estimated between the current image and historical keyframes, generating an "aligned historical image" or "desired image".
[0042] Difference calculation refers to comparing the current image with the reprojected historical image at the pixel level to quantify the degree of change in brightness, texture, or structure between the two images. In this invention, difference calculation typically uses pixel absolute value difference, that is, performing difference operations on the pixel values at the same location to generate a difference image.
[0043] In one possible implementation, S4 specifically includes: S401: Calculate the pixel-level difference between the aligned historical image and the current frame image to obtain the difference image: ; in, Indicates the pixel position of the difference image ( x , y The pixel difference at position ) Represents absolute value. Indicates the pixel position of the current frame image ( x , y The grayscale value of ) This indicates the position of a historical keyframe image after transformation according to the homography matrix. x , y The pixel value at ().
[0044] It should be noted that by performing pixel-by-pixel absolute difference between the current frame image and the reprojected image, subtle but real local changes in the image can be effectively captured. This calculation method is highly sensitive to changes in image brightness, structure, and texture, and can quickly reflect newly added, removed, or moved object regions in the scene, exhibiting high change detection accuracy.
[0045] S402: Perform thresholding on the difference image to generate a binary image. ; in, This indicates that the binary image generated after thresholding has a pixel count of ( ). x , y The value at ) This indicates the difference threshold.
[0046] In this embodiment of the invention, by setting a threshold to binarize the difference map, the significantly changing regions can be separated from the overall image, and the originally continuous pixel differences can be transformed into clear change masks, effectively reducing background interference and improving the target focus of subsequent processing.
[0047] S403: Perform opening and closing operations on the binary image sequentially to obtain connected regions.
[0048] A connected region is a set of pixels in an image that are continuous and consistent under certain discrimination conditions (such as grayscale value, binarization value of 1, etc.).
[0049] It should be noted that opening operations are performed on the difference image to remove small noise points, and then closing operations are performed to fill the holes, resulting in connected regions.
[0050] S404: Perform connected component analysis on the connected regions, mark all independent connected regions, and form a binary connected region mask.
[0051] It should be noted that Connected Component Analysis (CCA) is an image processing technique used to identify, label, and separate all independent connected regions in a binary image. In this invention, CCA is used to analyze a binary image after thresholding and morphological operations, dividing the set of pixels with a value of 1 (i.e., foreground pixels) that are spatially connected into independent "connected components." Each connected component corresponds to a potential region of environmental change.
[0052] S405: Perform area filtering on the binary connected region mask, and determine the region that meets the preset area threshold as the environmental change region.
[0053] It should be noted that those skilled in the art can set the size of the preset area threshold according to actual needs, and this invention does not limit this.
[0054] In this embodiment of the invention, a complete detection chain is constructed through image reprojection and pixel difference analysis, from image comparison to difference extraction to connected region identification to changed region confirmation. This method not only achieves high-precision identification of persistent environmental changes but also features a clear algorithm structure, high computational efficiency, and strong anti-interference capabilities. Unlike traditional SLAM which only performs background mapping, this step endows the system with the ability to perceive and respond to changing environments. It is a key triggering mechanism for subsequent local mapping and map updates, significantly improving the long-term adaptability and application robustness of SLAM maps.
[0055] S5: Perform local SLAM processing on the current frame image and subsequent frame images of the environmental change area to generate local 3D map fragments.
[0056] Local SLAM processing refers to the simultaneous localization and mapping (SLAM) process performed independently on a specific local spatial region (e.g., a region where changes have been detected) based on a known global environment map. In this invention, when the system identifies a potentially changing region in the environment through image comparison, it triggers the local SLAM process, performing feature point extraction, feature tracking, triangulation, and pose optimization operations only on the changed region and its surroundings, thereby constructing a new local 3D map fragment.
[0057] In one possible implementation, S5 specifically includes: S501: Using the current frame image that triggers the change as the starting frame, cache the current frame image to subsequent frame images in the environmental change area to form a local keyframe sequence.
[0058] S502: In areas of environmental change, feature points are extracted from each frame of the local keyframe sequence, and the extracted feature points are tracked using the KLT optical flow algorithm to form feature point trajectories.
[0059] Among them, the KLT optical flow method (Kanade–Lucas–Tomasi optical flow algorithm) is a sparse optical flow estimation algorithm based on local window matching, which is widely used for inter-frame motion tracking of feature points in image sequences. Its core idea is: assuming that the image changes slowly over time and the brightness of local regions is constant, the positional offset of a point between the current frame and the next frame can be solved by minimizing the brightness difference between the two inter-frame image patches.
[0060] S503: Based on the pixel coordinates of the feature point trajectory in different frames and the corresponding camera pose, the three-dimensional spatial coordinates of each feature point are recovered through triangulation to generate a local map fragment containing a three-dimensional point cloud.
[0061] Among them, the triangulation method is a 3D reconstruction technique based on multi-view geometry. It is used to deduce the coordinate position of the point in 3D space by combining the 2D projection position of the same scene point in different image frames with the extrinsic pose of the corresponding camera.
[0062] S504: Perform local bundle adjustment optimization on local map fragments to obtain optimized local 3D map images by minimizing the reprojection error of feature points.
[0063] It should be noted that local bundle adjustment refers to the joint optimization of the camera's pose parameters (rotation and translation) and the coordinates of observed 3D points within a local area. The aim is to minimize the reprojection error of these 3D points on each frame of the image, thereby improving the geometric consistency and accuracy of the local map.
[0064] In one possible implementation, S504 specifically includes: S5041: Constructing the cost function for reprojection error: ; in, The parameter represents the parameter that minimizes the objective function. T Indicates camera pose. P Represents the coordinates of a three-dimensional point. Represents a robust kernel function. Indicates the first i The 3D map point is at the... j 2D pixel coordinates observed on keyframe images Represents the camera projection function. Indicates camera intrinsic parameters. Indicates the first j Camera pose of keyframes Indicates the first i The three-dimensional coordinates of a point on a three-dimensional map.
[0065] S5042: The local 3D map is obtained by solving the problem using the Levenberg-Marquardt algorithm with the goal of minimizing the cost function.
[0066] In this embodiment of the invention, by locally triggering a lightweight SLAM process in areas of environmental change, incremental completion of a 3D map without global reconstruction is achieved. This process is based on feature point tracking and triangulation, combined with local bundle adjustment optimization, to generate high-quality, spatially aligned, and accuracy-optimized local 3D map fragments.
[0067] S6: Integrate local 3D map fragments with the community semantic SLAM map, update the 3D point cloud and corresponding semantic labels in the area of environmental change, and generate an updated SLAM map.
[0068] In one possible implementation, S6 specifically includes: S601: Locate local 3D map fragments in the global coordinate system and establish feature matching associations between points in the new local map and the old global map.
[0069] It should be noted that feature matching association refers to a "consistency correspondence between new and old map points" established by comparing the feature descriptors and spatial locations of newly generated 3D points in the local map with those of existing historical 3D points in the global SLAM map.
[0070] In this embodiment of the invention, establishing a consistency matching relationship between old and new map points can identify which local points are newly added content and which are repeated observations of existing objects. This matching not only ensures the consistency of data fusion but also significantly reduces the generation of redundant point clouds and improves map storage efficiency.
[0071] S602: Based on feature matching and association, construct an optimized graph structure that includes local keyframes, local new map points, and global old map points.
[0072] S603: Add local reprojection error edges and projection consistency constraint edges between old and new map points to the optimized graph structure, construct a joint optimization cost function, and perform joint optimization by minimizing the cost function to obtain spatially aligned local point cloud results.
[0073] In one possible implementation, the cost function in S603 is specifically: ; in, The parameter represents the parameter that minimizes the objective function. Indicates local observation error. Represents the L2 norm, Represents the camera projection function. Indicates camera pose. Represents the three-dimensional coordinates of points on the old map. Represents the three-dimensional coordinates of the new map point.
[0074] In this embodiment of the invention, a joint cost function is constructed, incorporating a local reprojection error term (to improve local consistency) and a projection consistency constraint term between old and new points (to maintain the continuity of historical structures). The error is then minimized through nonlinear optimization (such as the LM algorithm), resulting in a precisely aligned local point cloud. This multi-constraint optimization method improves the fusion accuracy between the local and global maps, preventing structural drift or distortion.
[0075] S604: Based on the aligned local point cloud results, perform map point addition, deletion, and modification operations on the global map, and update the map point cloud.
[0076] S605: Synchronize the semantic labels extracted from the semantic segmentation results to the newly added or updated map point cloud to obtain a SLAM map with global semantics.
[0077] Specifically, the new point cloud is registered with the old point cloud of the corresponding region in the global map. It is found that the old point cloud is a set of point clouds representing the old chair, while the new point cloud is a set of point clouds representing the new cabinet. The fusion algorithm is executed as follows: a) the old point cloud is marked as invalid; b) the new point cloud is added to the global map and assigned a semantic label for "cabinet" (from the semantic segmentation result of the current frame), and the global map is updated.
[0078] In this embodiment of the invention, by introducing a complete process of "matching-mapping-optimization-fusion-semantic synchronization," the spatial, structural, and semantic multidimensional consistency fusion between local 3D map fragments and the global SLAM map is achieved. This process not only ensures the geometric continuity and semantic integrity of the map but also enhances the system's adaptability to dynamic environmental changes. Compared to traditional SLAM systems that only support static mapping or global reconstruction, the fusion strategy of this invention has higher processing efficiency, map accuracy, and semantic expression capabilities, providing a solid and reliable data foundation for long-term map maintenance and intelligent applications.
[0079] In one possible implementation, the process after S6 includes: S7: Establish a record of the map version after each map update.
[0080] Specifically, each update is recorded in the version management database: timestamp, camera ID, 3D bounding box of the changed area, and a summary of the changes ("Removed chair, added cabinet"), and the v1.2 version map is archived. All applications that rely on this map will automatically receive the latest v1.3 version map on their next request, thus ensuring accurate positioning.
[0081] It should be noted that giving SLAM map systems a "software engineering" version evolution capability makes the map no longer a static resource, but a dynamic asset with the ability to record evolution and switch states.
[0082] The method for dynamically updating SLAM maps of elderly care communities provided in this application can be executed by a device for dynamically updating SLAM maps of elderly care communities. This application uses the example of a device for dynamically updating SLAM maps of elderly care communities executing the method to illustrate the device provided in this application.
[0083] Reference manual attached Figure 2 The diagram shows a structural schematic of a dynamic SLAM map update system for elderly care communities provided in an embodiment of the present invention.
[0084] This invention provides a dynamic SLAM map update system 20 for elderly care communities, comprising: a processor 201 and a memory 202; The memory 202 stores programs or instructions that can run on the processor 201. When the program or instructions are executed by the processor 201, they implement the steps of the above-described method for dynamically updating the SLAM map of the elderly care community and achieve the same technical effect. To avoid repetition, the present invention will not repeat the above-described steps.
[0085] It should be understood that the processor 201 in this embodiment of the invention may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0086] It should also be understood that the memory 202 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DR RAM).
[0087] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0088] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0089] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0090] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0091] In the embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0092] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0093] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0094] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0095] This invention provides a readable storage medium comprising: storing a program or instructions on the readable storage medium, wherein when the program or instructions are executed by a processor, the program or instructions implement the steps of the above-described method for dynamically updating a SLAM map of an elderly care community, and can achieve the same technical effect. To avoid repetition, this invention will not elaborate further.
[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the protection scope of the present invention.
Claims
1. A method for dynamically updating SLAM maps of elderly care communities, characterized in that, include: S1: Acquire RGB images captured by surveillance cameras with known poses in the elderly care community; S2: Load a pre-generated community semantic SLAM map, wherein the SLAM map includes historical keyframe images and a 3D point cloud; S3: Perform image alignment operation between the RGB image and the historical keyframe image of the pose nearest neighbor in the community semantic SLAM map to obtain the aligned historical image; S4: Based on the aligned historical image, the environmental change areas in the RGB image are detected by image reprojection and difference calculation. S5: Perform local SLAM processing on the current frame image and subsequent frame images of the environmental change area to generate local 3D map fragments; S6: Fuse the local 3D map fragment with the community semantic SLAM map, and update the 3D point cloud and corresponding semantic labels in the environmental change area to generate an updated SLAM map.
2. The method for dynamic updating of SLAM maps for elderly care communities according to claim 1, characterized in that, S3 specifically includes: S301: Based on the known global pose of the surveillance camera, use KD-Tree to search in the community semantic SLAM map and select the historical keyframe image that is closest to the known global pose; S302: Extract local feature points from the RGB image and the historical keyframe image; S303: Based on Hamming distance, perform feature point matching between the local feature points of the RGB image and the local feature points of the historical keyframe image; S304: Using the RANSAC algorithm, perform geometric consistency verification on the feature point matching results, filter out mismatched points, and estimate the homography matrix between the RGB image and the historical keyframe image; S305: Based on the homography matrix, align the historical keyframe image to the viewpoint of the RGB image to obtain the aligned historical image: ; in, This represents the pixel coordinates of a pixel in a historical keyframe image after homography matrix transformation, as seen in the current RGB image viewpoint. Represents the homography matrix. Represents the pixels in the historical keyframe image. The x-coordinate of the historical image (pixels). Represents the pixel ordinate of the historical image. This represents the transpose of a matrix.
3. The method for dynamic updating of SLAM maps for elderly care communities according to claim 1, characterized in that, S4 specifically includes: S401: Calculate the pixel-level difference between the aligned historical image and the current frame image to obtain the difference image: ; in, Indicates the pixel position of the difference image ( x , y The pixel difference at position ) Represents absolute value. Indicates the pixel position of the current frame image ( x , y grayscale value of ) This indicates the position of a historical keyframe image after transformation according to the homography matrix. x , y The pixel value at () S402: Perform threshold segmentation on the difference image to generate a binary image. ; in, This indicates that the binary image generated after thresholding has a pixel count of ( ). x , y The value at ) Indicates the difference threshold; S403: Perform opening and closing operations on the binary image sequentially to obtain connected regions; S404: Perform connectivity component analysis on the connected regions, mark all independent connected regions, and form a binary connected region mask; S405: Perform area filtering on the binary connected region mask, and determine the region that meets the preset area threshold as the environmental change region.
4. The method for dynamic updating of SLAM maps for elderly care communities according to claim 1, characterized in that, S5 specifically includes: S501: Using the current frame image that triggers the change as the starting frame, cache the current frame image to the subsequent frame images of the environmental change area to form a local keyframe sequence. S502: Within the area of environmental change, feature points are extracted from each frame of the local keyframe sequence, and the extracted feature points are tracked using the KLT optical flow algorithm to form a feature point trajectory; S503: Based on the pixel coordinates of the feature point trajectory in different frames and the corresponding camera pose, the three-dimensional spatial coordinates of each feature point are recovered by triangulation to generate a local map fragment containing a three-dimensional point cloud. S504: Perform local bundle adjustment optimization on the local map fragment to obtain an optimized local 3D map by minimizing the reprojection error of feature points.
5. The method for dynamic updating of SLAM maps for elderly care communities according to claim 4, characterized in that, Specifically, S504 includes: S5041: Constructing the cost function for reprojection error: ; in, The parameter represents the parameter that minimizes the objective function. T Indicates camera pose. P Represents the coordinates of a three-dimensional point. Represents a robust kernel function. Indicates the first i The 3D map point is at the... j 2D pixel coordinates observed on keyframe images Represents the camera projection function. Indicates camera intrinsic parameters. Indicates the first j Camera pose of keyframes Indicates the first i The 3D coordinates of a point on a 3D map; S5042: With the goal of minimizing the cost function, the local 3D map is obtained by solving the problem using the Levenberg-Marquardt algorithm.
6. The method for dynamic updating of SLAM maps for elderly care communities according to claim 1, characterized in that, S6 specifically includes: S601: Locate the local 3D map fragment in the global coordinate system and establish feature matching association between points in the new local map and the old global map; S602: Based on the feature matching association, construct an optimized graph structure that includes local keyframes, local new map points, and global old map points; S603: Add local reprojection error edges and projection consistency constraint edges between old and new map points to the optimized graph structure, construct a joint optimization cost function, and perform joint optimization by minimizing the cost function to obtain spatially aligned local point cloud results; S604: Based on the aligned local point cloud results, perform map point addition, deletion, and modification operations on the global map, and update the map point cloud; S605: Synchronize the semantic labels extracted from the semantic segmentation results to the newly added or updated map point cloud to obtain a SLAM map with global semantics.
7. The method for dynamic updating of SLAM maps for elderly care communities according to claim 6, characterized in that, The cost function in S603 is specifically as follows: ; in, The parameter represents the parameter that minimizes the objective function. Indicates local observation error. Represents the L2 norm, Represents the camera projection function. Indicates camera pose. Represents the three-dimensional coordinates of points on the old map. Represents the three-dimensional coordinates of the new map point.
8. The method for dynamically updating SLAM maps of elderly care communities according to claim 1, characterized in that, Following S6, the following is also included: S7: Establish a record of the map version after each map update.
9. A dynamic update system for SLAM maps of elderly care communities, characterized in that, include: Processor and memory; The memory stores programs or instructions that can run on the processor, which, when executed by the processor, implement the steps of the dynamic update method for SLAM maps of elderly care communities as described in any one of claims 1 to 8.
10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the dynamic update method for SLAM maps of elderly care communities as described in any one of claims 1 to 8.