Positioning device for a muscle stimulator

By combining an RGB-D camera and a pose estimation network with an individualized information determination module, the problem of muscle stimulators ignoring individual differences and lacking real-time performance in acupoint localization is solved. This achieves individualized, accurate, and stable acupoint localization, reducing costs and improving real-time performance.

CN122376437APending Publication Date: 2026-07-14ANYANG XIANGYU MEDICAL EQUIP

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANYANG XIANGYU MEDICAL EQUIP
Filing Date
2026-04-27
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing muscle stimulators ignore individual differences and real-time performance in acupoint location, are easily affected by environmental interference, and have insufficient positioning accuracy.

Method used

An RGB-D camera is used to acquire RGB and depth images. The MediaPipe and YOLOv8-pose pose estimation network are used to detect the pixel coordinates of key points. An individualized scale benchmark is generated through an individualized information determination module. Contours are extracted by combining RGB and depth images to plan a safe and comfortable stimulation path.

Benefits of technology

It achieves individualized, accurate, and stable acupoint positioning, reduces costs, improves real-time performance, and eliminates interference from environmental and physiological factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122376437A_ABST
    Figure CN122376437A_ABST
Patent Text Reader

Abstract

The application discloses a positioning device of a muscle stimulator, and relates to the technical field of intelligent medical equipment and machine vision. The positioning device of the muscle stimulator is composed of an image acquisition module, a coordinate detection module, an individual information determination module and an acupoint positioning module. An RGB image of a target subject is acquired, a preset posture estimation network is used to directly detect pixel coordinates of each key point, and then scale reference information that is special to the target is generated by the individual information determination module, so that the defect that a traditional fixed proportion or a standard template ignores individual body size differences is avoided, and real individual acupoint positioning is achieved. Meanwhile, based on the reference information and the key point coordinates, acupoint pixel coordinates are calculated, large-scale labeled data or complex algorithms are not needed, cost is significantly reduced, and real-time performance is ensured. In addition, the RGB image is used instead of infrared thermal imaging, physiological factor interference such as environmental temperature and sweating is completely eliminated, and the positioning result is more accurate and stable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent medical devices and machine vision technology, and in particular to a positioning device for a muscle stimulator. Background Technology

[0002] With the increasing aging of the global population and rising health awareness, there is a growing demand for intelligent muscle stimulators with standardized and sustainable service capabilities in the fields of rehabilitation assistance and daily health care, which can alleviate the shortage of professional medical personnel to some extent. The core function of such devices is to accurately locate acupoints in real-world scenarios and plan safe and comfortable stimulation paths based on the location results to achieve effective muscle stimulation.

[0003] However, existing muscle stimulators have poor accuracy in personalized acupoint location. Traditional solutions either rely on fixed proportions or standard templates, ignoring individual body shape differences, or require large-scale labeled data or complex algorithms, resulting in high costs and poor real-time performance. Infrared thermal imaging solutions are also susceptible to interference from environmental and physiological factors, making it difficult to meet the requirements for accurate and stable applications.

[0004] Given the above, how to address the issues of muscle stimulators neglecting individual differences and real-time performance in acupoint positioning, being susceptible to environmental interference, and having insufficient positioning accuracy is a problem that urgently needs to be solved by technicians in this field. Summary of the Invention

[0005] The purpose of this application is to provide a positioning device for a muscle stimulator to solve the problems of muscle stimulators ignoring individual differences and real-time performance in acupoint positioning, being susceptible to environmental interference, and having insufficient positioning accuracy.

[0006] To solve the above-mentioned technical problems, this application provides a positioning device for a muscle stimulator, comprising:

[0007] The image acquisition module is used to acquire RGB images of the target area of ​​the test target through a preset camera;

[0008] The coordinate detection module is used to detect the pixel coordinates of each key point in an RGB image based on a preset pose estimation network.

[0009] The individualized information determination module is used to determine the individualized scale reference information of the test target based on the pixel coordinates of each key point;

[0010] The acupoint location module is used to determine the pixel coordinates of each acupoint of the test target within the target area based on individualized scale reference information and the pixel coordinates of each key point.

[0011] On one hand, the coordinate detection module includes:

[0012] The keypoint coordinate detection module is used to detect the initial pixel coordinates of each keypoint in the RGB image using the MediaPipe pose estimation network and the YOLOv8-pose pose estimation network, respectively. Specifically, when the target area is the back, the keypoints include the left shoulder keypoint, right shoulder keypoint, left ear keypoint, right ear keypoint, left hip keypoint, and right hip keypoint; when the target area is the abdomen, the keypoints include the left shoulder keypoint, right shoulder keypoint, and navel keypoint.

[0013] The weighted average module is used to perform a weighted average of the initial pixel coordinates output by the MediaPipe pose estimation network and the initial pixel coordinates output by the YOLOv8-pose pose estimation network to generate the pixel coordinates of each key point.

[0014] On the other hand, the individualized information determination module includes:

[0015] The shoulder width determination module is used to determine the shoulder width of the test subject based on the key point pixel coordinates of the left shoulder key point and the key point pixel coordinates of the right shoulder key point.

[0016] The scaling factor calculation module is used to perform a preset scaling factor calculation on the shoulder width to obtain the individualized scale benchmark scaling factor of the test target.

[0017] The reference point determination module is used to determine the reference point pixel coordinates of reference points within the target area based on the pixel coordinates of each key point; where, when the target area is the back, the reference points are the Dazhui and Changqiang acupoints; when the target area is the abdomen, the reference point is the Shenque acupoint.

[0018] On the other hand, the acupoint location module includes:

[0019] The offset distance acquisition module is used to acquire the offset distance of each acupoint relative to each reference point within the target area;

[0020] The acupoint pixel coordinate calculation module is used to determine the pixel coordinates of each acupoint within the target area based on the pixel coordinates of each reference point, each offset distance, the individualized scale reference scaling factor, and the direction coefficient.

[0021] On the other hand, the default camera is an RGB-D camera, and the image acquisition module acquires RGB images and depth images of the target area of ​​the test target through the RGB-D camera;

[0022] Correspondingly, the device also includes:

[0023] The contour extraction module is used to generate a first candidate boundary for the end effector motion based on the RGB image and a second candidate boundary for the end effector motion based on the depth image.

[0024] The contour fusion module is used to generate a safety boundary for the end effector motion based on the first candidate boundary and the second candidate boundary.

[0025] The path control point determination module is used to determine the path control points corresponding to the pixel coordinates of each acupoint based on RGB and depth images through coordinate transformation and hand-eye calibration.

[0026] The initial trajectory generation module is used to perform interpolation and smoothing on each path control point to generate a pre-stimulation trajectory.

[0027] The trajectory processing module is used to perform local surface normal estimation and obstacle avoidance processing on each path trajectory point in the pre-stimulation trajectory to generate an executable stimulation trajectory.

[0028] The stimulus execution module is used to perform electrical stimulation on the target region based on an executable stimulus trajectory.

[0029] On the other hand, the contour extraction module includes:

[0030] The model building module is used to build a joint skin color probability model in the HSV and YCrCb color spaces based on the OpenCV function library;

[0031] The skin pixel determination module is used to determine the skin region pixels in the RGB image through a joint skin color probability model, and generate an initial binary mask based on the corresponding determination result.

[0032] The first image processing module is used to perform morphological denoising and hole filling on the initial binary mask to obtain the torso contour region.

[0033] The second image processing module is used to homogenize and smooth the original contour point sequence of the torso contour region to generate the first outer contour.

[0034] The third image processing module is used to perform morphological erosion operation on the binary mask corresponding to the first outer contour to generate the first inner contour, and use the first inner contour as the first candidate boundary.

[0035] On the other hand, the contour extraction module includes:

[0036] The normalization processing module is used to normalize the depth image to generate a pseudo-color image;

[0037] The depth mapping module is used to determine the depth value range of the target region and map it onto the pseudo-color image, based on the depth value corresponding to the center point of the pseudo-color image.

[0038] The first candidate contour generation module is used to perform region growth based on the depth image and preset growth criteria to obtain the first candidate contour.

[0039] The second candidate contour generation module is used to perform threshold segmentation in the HSV space of the pseudo-color image to obtain the second candidate contour.

[0040] The fourth image processing module is used to fuse the first candidate contour and the first candidate contour to obtain the fused contour;

[0041] The fifth image processing module is used to homogenize and smooth the fused contours to generate the second outer contour.

[0042] The sixth image processing module is used to perform morphological erosion operation on the binary mask corresponding to the second outer contour to generate the second inner contour, and use the second inner contour as the second candidate boundary.

[0043] On the other hand, the path control point determination module includes:

[0044] The depth value determination module is used to determine the depth value of each acupoint pixel coordinate in the RGB image based on the depth image;

[0045] The first coordinate transformation module is used to convert the pixel coordinates of each acupoint and the corresponding depth value into three-dimensional coordinates in the camera coordinate system using the camera intrinsic parameter matrix.

[0046] The transformation matrix determination module is used to determine the transformation matrix from the camera coordinate system to the end effector coordinate system through hand-eye calibration;

[0047] The second coordinate transformation module is used to transform each three-dimensional coordinate in the camera coordinate system to the end effector coordinate system through a transformation matrix, and to determine each transformed three-dimensional coordinate as a path control point.

[0048] On the other hand, the initial trajectory generation module includes:

[0049] The initial interpolation point generation module is used to generate initial interpolation points for two adjacent acupoints along the direction of the line connecting the two points, with a fixed step size, among all path control points.

[0050] The path trajectory point sequence generation module is used to project each initial interpolation point onto the point cloud surface of the test target and find the nearest point in the neighborhood as the path trajectory point to generate a path trajectory point sequence.

[0051] The pre-stimulation trajectory generation module is used to smooth the path trajectory point sequence through moving average filtering to generate the pre-stimulation trajectory.

[0052] On the other hand, the trajectory processing module includes:

[0053] The local point set generation module is used to select a preset number of nearest neighbor points in the point cloud of the test target to form a local point set for each path trajectory point;

[0054] The covariance matrix construction module is used to calculate the centroid of each local point set and construct the covariance matrix based on the coordinate difference between the centroid and each point in the corresponding local point set.

[0055] The initial normal vector generation module is used to perform singular value decomposition on the covariance matrix and select the eigenvector corresponding to the minimum singular value as the initial normal vector of the corresponding path trajectory point.

[0056] The dot product calculation module is used to set the negative Z-axis direction of the end effector coordinate system as the reference direction of the desired stimulus orientation, and to calculate the dot product of the initial normal vector and the reference direction.

[0057] The normal vector adjustment and constraint module is used to adjust the direction of the normal vector of the path trajectory points according to the dot product, and to apply constraints on the angle between the adjusted normal vector and the Z-axis of the end effector coordinate system.

[0058] The normal vector conversion module is used to convert the unit normal vectors of the adjusted and constrained path trajectory points into attitude quaternions of the end effector.

[0059] The spinal midline definition module is used to define the parametric expression of the spinal midline of the test target;

[0060] The distance calculation module is used to calculate the shortest distance from each path trajectory point on the pre-stimulation trajectory to the midline of the spine on the horizontal plane.

[0061] The safety judgment module is used to determine whether each shortest distance is not greater than a preset safety threshold; if so, it confirms that the corresponding path trajectory point has entered the spinal danger zone.

[0062] The trajectory update module is used to move the path trajectory points entering the spinal danger zone in the opposite direction of the corresponding normal vector to obtain new path trajectory points, so as to complete the update of the pre-stimulation trajectory.

[0063] An executable stimulus trajectory generation module is used to perform spline interpolation smoothing on the position and orientation sequence of the updated pre-stimulation trajectory to generate an executable stimulus trajectory.

[0064] The positioning device for the muscle stimulator provided in this application consists of an image acquisition module, a coordinate detection module, an individualized information determination module, and an acupoint positioning module. It acquires RGB images of the target subject and directly detects the pixel coordinates of each key point using a preset pose estimation network. The individualized information determination module then generates scale reference information specific to the target, thus avoiding the shortcomings of traditional fixed-ratio or standard templates that ignore individual body shape differences, achieving truly individualized acupoint positioning. Simultaneously, the acupoint pixel coordinates are calculated based on this reference information and key point coordinates, eliminating the need for large-scale labeled data or complex algorithms, significantly reducing costs and ensuring real-time performance. Furthermore, the use of RGB images instead of infrared thermal imaging completely eliminates interference from physiological factors such as ambient temperature and sweating, making the positioning results more accurate and stable. Attached Figure Description

[0065] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0066] Figure 1 A schematic diagram of a positioning device for a muscle stimulator provided in an embodiment of this application;

[0067] Figure 2 This is a system framework diagram of an adaptive muscle stimulator provided in an embodiment of this application;

[0068] Figure 3 This is a system architecture diagram of an adaptive muscle stimulator provided in an embodiment of this application;

[0069] Figure 4 This is a structural diagram of an embedded computer provided in an embodiment of this application. Detailed Implementation

[0070] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0071] The core of this application is to provide a positioning device for a muscle stimulator to solve the problems of muscle stimulators ignoring individual differences and real-time performance in acupoint positioning, being susceptible to environmental interference, and having insufficient positioning accuracy.

[0072] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0073] The core function of an intelligent muscle stimulator lies in accurately locating acupoints in real-world application scenarios and planning a safe and comfortable stimulation path based on the location results, thereby achieving effective muscle stimulation. Existing muscle stimulators suffer from the following shortcomings: they rely on fixed proportions or standard templates, ignoring individual body shape differences; or they depend on large-scale labeled data or complex algorithms, resulting in high costs and poor real-time performance. Infrared thermal imaging solutions are also susceptible to interference from environmental and physiological factors, leading to poor individualized acupoint location accuracy. To address these issues, this application provides a positioning device for a muscle stimulator.

[0074] It should be noted that the device provided in this application is based on the following hardware platform: The hardware platform consists of core equipment and auxiliary components. The core equipment includes a preset camera, a six-degree-of-freedom collaborative robotic arm, a force sensor, and an embedded computer. The auxiliary components include an adjustable massage bed, an ambient lighting device, and a device mounting bracket to ensure the relative position of the device is stable and adaptable to the acquisition environment. The preset camera is used to synchronously acquire RGB images, providing data support for subsequent positioning and contour extraction; the robotic arm, as an end effector, is responsible for performing muscle stimulation operations to ensure trajectory tracking accuracy; the force sensor is installed at the end of the robotic arm to collect and feedback contact force data in real time; the embedded computer is responsible for running various algorithms, realizing communication with the robotic arm, and data processing. The device provided in this application actually runs in an embedded computer. The software layer of the device is developed based on mainstream operating systems and programming languages, integrating software libraries related to image preprocessing, key point detection, point cloud processing, numerical calculation, and signal processing. Through modular design, the collaborative work of various functional components is achieved, ensuring efficient algorithm operation and smooth data flow. The device provided in this application is described in detail below:

[0075] Figure 1 This is a schematic diagram of a positioning device for a muscle stimulator provided in an embodiment of this application. Figure 1 As shown, the device includes:

[0076] The image acquisition module 10 is used to acquire RGB images of the target area of ​​the test target through a preset camera.

[0077] In practice, before image acquisition, the environment and the subject's condition need to be adjusted to avoid direct sunlight or shadows, ensuring uniform lighting in the acquisition area and realistic reproduction of skin color and clothing texture. The subject sits in an adjustable chair with their back or abdomen facing the preset camera, the massage area on their back or abdomen centered in the image field of view, and maintains a natural and relaxed posture, avoiding significant shaking. During image acquisition, the preset camera simultaneously acquires RGB images, which are then further filtered to remove noise.

[0078] It should be noted that the specific type of the preset camera is not limited in this embodiment and depends on the specific implementation. For example, in some embodiments, the preset camera is an RGB-D camera, which is a visual sensor capable of simultaneously acquiring color (RGB) images and depth images. It obtains the distance from each pixel to the camera through techniques such as infrared projection, stereo matching, or time-of-flight, thereby outputting image data with three-dimensional spatial information. Therefore, the image acquisition module 10 can acquire RGB images and depth images of the target area of ​​the test target through the RGB-D camera and transmit them to the computer for preprocessing. The RGB image is filtered to remove noise, and the depth image is filtered to eliminate isolated noise points. Hollow areas in the depth image are filled using a neighborhood interpolation method to ensure the integrity of the depth data and provide high-quality input data for subsequent modules.

[0079] The coordinate detection module 11 is used to detect the pixel coordinates of each key point in the RGB image based on a preset pose estimation network.

[0080] Pose estimation networks are deep learning-based computer vision models used to automatically detect the pixel coordinates or 3D spatial positions of key points on the human body (such as joints like the shoulders, elbows, and knees, as well as facial features) from images or videos. By analyzing visual features, they reconstruct the human skeletal structure and are widely used in motion recognition, rehabilitation assistance, and human-computer interaction. Therefore, to achieve key point localization, in this embodiment, the coordinate detection module 11 detects the pixel coordinates of each key point in the RGB image based on a preset pose estimation network.

[0081] It should be noted that this embodiment does not limit the specific type of preset pose estimation network used, such as MediaPipe, YOLOv8-pose, OpenPose, MoveNet, etc., depending on the specific implementation. Furthermore, this embodiment does not limit the key points, such as the left and right shoulders, left and right ears, left and right hips, navel, etc., depending on the specific implementation.

[0082] The individualized information determination module 12 is used to determine the individualized scale reference information of the test target based on the pixel coordinates of each key point.

[0083] To avoid the defect that traditional fixed ratios or standard templates ignore individual body shape differences and achieve true individualized acupoint positioning, in this embodiment, the individualized information determination module 12 specifically determines the individualized scale reference information of the test target according to the pixel coordinates of each key point. It should be noted that the individualized scale reference information refers to the mapping ratio between pixels calculated based on the actual body size of an individual and the traditional Chinese medicine "cun". For example, the shoulder width is corresponding to 16 cun to obtain the pixel length per cun. It is used to adaptively convert the relative offset cun number in acupoint positioning into the actual pixel offset in the image, thereby eliminating the positioning error caused by body shape differences and achieving accurate individualized acupoint positioning. In this embodiment, there is no limitation on the specific determination process of the individualized scale reference information, which depends on the specific implementation situation.

[0084] The acupoint positioning module 13 is used to determine the pixel coordinates of each acupoint of the test target in the target area according to the individualized scale reference information and the pixel coordinates of each key point.

[0085] After determining the individualized scale reference information, the acupoint positioning module 13 determines the pixel coordinates of each acupoint of the test target in the target area according to the individualized scale reference information and the pixel coordinates of each key point. In this embodiment, there is no limitation on the specific determination process of the acupoint pixel coordinates.

[0086] In this embodiment, the positioning device of the muscle stimulator is composed of an image acquisition module, a coordinate detection module, an individualized information determination module, and an acupoint positioning module; by collecting the RGB image of the test target and directly detecting the pixel coordinates of each key point using a preset pose estimation network, and then the individualized information determination module generates the scale reference information specific to this target, thus avoiding the defect that traditional fixed ratios or standard templates ignore individual body shape differences and achieving true individualized acupoint positioning; at the same time, based on this reference information and the key point coordinates, the acupoint pixel coordinates are calculated, without the need for large-scale labeled data or complex algorithms, significantly reducing the cost and ensuring real-time performance; in addition, using RGB images instead of infrared thermal imaging completely eliminates the interference of physiological factors such as environmental temperature and sweating, making the positioning result more accurate and stable.

[0087] Figure 2 This is the framework diagram of the adaptive muscle stimulator system provided by the embodiment of this application. As Figure 2 shown, based on the above embodiment, in some embodiments, the coordinate detection module 11 includes:

[0088] The key point coordinate detection module 111 is used to detect the initial pixel coordinates of each key point in the RGB image through the MediaPipe pose estimation network and the YOLOv8-pose pose estimation network respectively.

[0089] The weighted averaging module 112 is used to perform weighted averaging of the initial pixel coordinates output by the MediaPipe pose estimation network and the initial pixel coordinates output by the YOLOv8-pose pose estimation network to generate the pixel coordinates of each key point.

[0090] In the specific implementation, the keypoint coordinate detection module 111 uses the MediaPipe pose estimation network and the YOLOv8-pose pose estimation network to detect the initial pixel coordinates of each keypoint in the RGB image. MediaPipe is a lightweight real-time pose estimation framework with a built-in BlazePose model, which can efficiently detect multiple keypoints of the human body on mobile devices. YOLOv8-pose is the pose estimation branch of the YOLOv8 series, which uses a single-stage end-to-end approach to simultaneously detect the human body bounding box and keypoints, balancing high speed and high accuracy.

[0091] It should be noted that when the target area is the back of the test subject, the key points include the left shoulder key point, the right shoulder key point, the left ear key point, the right ear key point, the left hip key point, and the right hip key point; when the target area is the abdomen of the test subject, the key points include the left shoulder key point, the right shoulder key point, and the navel key point.

[0092] Subsequently, the weighted averaging module performs a weighted average of the initial pixel coordinates output by the MediaPipe pose estimation network and the initial pixel coordinates output by the YOLOv8-pose pose estimation network to generate accurate keypoint pixel coordinates for each keypoint. It should also be noted that if only one of the shoulder, hip, or ear keypoints is valid, the coordinates of the other keypoint are completed using symmetrical interpolation with the image midline as the line of symmetry. In this way, complete localization of the keypoint pixel coordinates in the target area is achieved.

[0093] Based on the above embodiments, in some embodiments, the individualized information determination module 12 includes:

[0094] The shoulder width determination module 121 is used to determine the shoulder width of the test target based on the key point pixel coordinates of the left shoulder key point and the key point pixel coordinates of the right shoulder key point.

[0095] The scaling factor calculation module 122 is used to perform a preset scaling factor calculation on the shoulder width to obtain the individualized scale benchmark scaling factor of the test target.

[0096] The reference point determination module 123 is used to determine the reference point pixel coordinates of the reference points within the target area based on the pixel coordinates of each key point; wherein, when the target area is the back, the reference points are the Dazhui acupoint and the Changqiang acupoint; when the target area is the abdomen, the reference point is the Shenque acupoint.

[0097] In this embodiment, based on the detected key point situation, a hierarchical calculation strategy is adopted to obtain an individualized scale reference. Specifically, the shoulder width determination module 121 calculates the straight-line distance according to the key point pixel coordinates of the left shoulder key point and the key point pixel coordinates of the right shoulder key point to determine the shoulder width of the test target. Subsequently, the proportional factor calculation module 122 performs a preset proportional calculation on the shoulder width. Specifically, taking the shoulder width as 16 cun in the traditional Chinese medicine proportional measurement method, a proportional calculation can obtain the individualized "three cun"; "Three cun" is a length unit in the traditional Chinese medicine same-body cun. Usually, the width of the patient's four fingers并拢 (index finger to little finger) is used as three cun for individualized acupoint selection. By calculating the individualized "three cun", the individualized scale reference proportional factor of the test target is obtained.

[0098] It should also be noted that the traditional Chinese medicine proportional measurement method, also known as the bone proportional measurement method, is a method of measuring based on the patient's own body parts when acupuncture points are selected. It divides the distance between specific anatomical parts into several equal parts in proportion, and each equal part is one cun. For example, the distance between the inner edges of the two scapular spines is 16 cun.

[0099] Furthermore, the reference point determination module 123 determines the reference point pixel coordinates of the reference points in the target area according to the pixel coordinates of each key point. It should be noted that when the target area is the back, the reference points are the Dazhui acupoint and the Changqiang acupoint; when the target area is the abdomen, the reference point is the Shenque acupoint. Therefore, when determining the reference point pixel coordinates, the connection line between the midpoints of the left and right shoulders and the midpoints of the left and right hips is the spinal midline. Then, through the "three cun" proportional calculation, the Dazhui acupoint and the Changqiang acupoint at the upper and lower ends of the back spine are calculated. For the abdomen, the umbilicus is detected and recognized by using the Hough circle detection in OpenCV near the spinal midline, and the pixel coordinates of the umbilicus are output.

[0100] In this way, the accurate calculation of the reference point pixel coordinates is achieved, which is convenient for subsequently determining the pixel coordinates of the remaining acupoints based on the reference point pixel coordinates.

[0101] Based on the above embodiment, in some embodiments, the acupoint positioning module 13 includes:

[0102] The offset distance acquisition module 131 is used to acquire the offset distances of each acupoint in the target area relative to each reference point.

[0103] The acupoint pixel coordinate calculation module 132 is used to determine the pixel coordinates of each acupoint in the target area according to the pixel coordinates of each reference point, each offset distance, the individualized scale reference proportional factor, and the direction coefficient.

[0104] After determining the reference point pixel coordinates, the calculation formula for each acupoint pixel coordinate is as follows:

[0105] ;

[0106] Where, The pixel coordinates of the acupoint; The reference point is the pixel coordinate; These are the horizontal and vertical offsets in inches, respectively. The offset in inches is the distance specified in the acupoint chart, such as 1.5 inches to the side or 3 inches up and down, which is the offset distance of the acupoint relative to the reference point. As an individualized scale benchmark, This is a directional coefficient used to distinguish between acupoints on the left, middle, and right sides.

[0107] In this way, the pixel coordinates of each acupoint within the target area are accurately determined. It should also be noted that, in Traditional Chinese Medicine, acupoints along the midline of the spine are determined by their corresponding spinal joints. Therefore, for acupoints along the midline of the spine, pixel coordinates are generated using linear interpolation. After localization, the system can visually annotate the acupoint coordinates on the RGB image for operator confirmation.

[0108] Besides the issue of poor accuracy in individualized acupoint positioning, existing muscle stimulators also suffer from the following problems in practical implementation: insufficient robustness of contour extraction in complex scenes; single RGB modality is greatly affected by lighting and clothing; single depth modality is prone to data gaps and noise; and multimodal fusion schemes suffer from model complexity and poor fusion results. Furthermore, path planning safety and fit are difficult to balance, obstacle avoidance strategies are rigid, individual spinal differences are not considered, and fit and obstacle avoidance are not uniformly optimized, easily leading to poor stimulation effects or safety hazards. Therefore, to solve the above problems, the device also includes:

[0109] The contour extraction module 14 is used to generate a first candidate boundary for the end effector motion based on the RGB image and a second candidate boundary for the end effector motion based on the depth image.

[0110] The contour fusion module 15 is used to generate a safe boundary for the end effector motion based on the first candidate boundary and the second candidate boundary.

[0111] To address the issue of insufficient robustness in contour extraction under complex scenes, this embodiment implements dual-modal contour extraction through a contour extraction module 14 and a contour fusion module 15. The dual-modal contour extraction method generates reliable motion safety boundaries for the end effector by fusing complementary information from RGB and depth images. Specifically, a first candidate boundary is extracted based on skin color features and texture information in the RGB image. This boundary accurately reflects the apparent contour of the human torso, making it particularly suitable for scenes with uniform lighting and simple backgrounds. Simultaneously, a second candidate boundary is extracted based on three-dimensional geometric information in the depth image. This boundary is unaffected by color, texture changes, and ambient lighting, and can still stably capture the human contour under complex backgrounds or low-contrast conditions. The contour fusion module comprehensively evaluates and optimizes the candidate boundaries of the two modalities, ultimately generating a safe boundary for the end effector's motion. This fusion strategy automatically balances the confidence levels of RGB and depth information based on the actual scene quality. When one modality fails due to environmental factors (such as excessive darkness, overexposure, occlusion, or reflection), the other modality can still provide effective boundary constraints, thereby significantly improving the system's scene adaptability and robustness.

[0112] It should be noted that this embodiment does not impose restrictions on the specific process of determining the first and second candidate boundaries, but depends on the specific implementation.

[0113] The path control point determination module 16 is used to determine the path control points corresponding to the pixel coordinates of each acupoint based on the RGB image and the depth image through coordinate transformation and hand-eye calibration.

[0114] The initial trajectory generation module 17 is used to perform interpolation and smoothing processing on each path control point to generate a pre-stimulation trajectory.

[0115] The trajectory processing module 18 is used to perform local surface normal estimation and obstacle avoidance processing on each path trajectory point in the pre-stimulation trajectory to generate an executable stimulation trajectory.

[0116] Stimulation execution module 19 is used to perform electrical stimulation on the target area based on an executable stimulus trajectory.

[0117] To address the challenge of balancing safety and fit in path planning, the path control point determination module 16 uses RGB and depth images to determine the path control points corresponding to the pixel coordinates of each acupoint through coordinate transformation and hand-eye calibration. Subsequently, the initial trajectory generation module 17 performs interpolation and smoothing on each path control point to generate a pre-stimulation trajectory. Further, the trajectory processing module 18 performs local surface normal estimation and obstacle avoidance processing on each path trajectory point in the pre-stimulation trajectory to generate an executable stimulation trajectory. The stimulation execution module 19 then performs electrical stimulation on the target area based on the executable stimulation trajectory. This modular design achieves a complete automated process from visual perception, spatial mapping, trajectory planning to safe execution, significantly reducing the difficulty of manual operation. Simultaneously, normal constraints and active obstacle avoidance mechanisms ensure the comfort and safety of the stimulation process. The specific composition and operation of each module are described in detail below:

[0118] In some embodiments, the contour extraction module 14 includes:

[0119] Model building module 141 is used to build a joint skin color probability model in the HSV color space and YCrCb color space based on the OpenCV function library.

[0120] The skin pixel judgment module 142 is used to judge the skin region pixels in the RGB image by means of a joint skin color probability model, and generate an initial binary mask based on the corresponding judgment result.

[0121] The first image processing module 143 is used to perform morphological denoising and hole filling on the initial binary mask to obtain the torso contour region.

[0122] The second image processing module 144 is used to homogenize and smooth the original contour point sequence of the torso contour region to generate the first outer contour.

[0123] The third image processing module 145 is used to perform morphological erosion operation on the binary mask corresponding to the first outer contour to generate the first inner contour, and use the first inner contour as the first candidate boundary.

[0124] Specifically, the model construction module 141 constructs a joint skin color probability model using OpenCV in the HSV and YCrCb dual color spaces. Then, the skin pixel judgment module 142 uses the joint skin color probability model to judge the skin region pixels in the RGB image, determining whether each pixel in the image belongs to a skin region, and generates an initial binary mask based on the judgment result. The binary mask M belonging to the skin region... skin (P) can be calculated as:

[0125] ;

[0126] Among them, I HSV (P), I YCrCb (P) are all indicator functions.

[0127] Further, the first image processing module 143 performs morphological denoising and hole filling on the initial binary mask to obtain the torso contour region. The second image processing module 144 performs homogenization and smoothing processing on the original contour point sequence of the torso contour region to generate a smooth and uniform first outer contour. Finally, the third image processing module 145 performs morphological erosion operation on the binary mask corresponding to the first outer contour to generate a first inner contour, which serves as the first candidate boundary for the end effector motion.

[0128] In some embodiments, the contour extraction module 14 includes:

[0129] The normalization processing module 146 is used to normalize the depth image to generate a pseudo-color image;

[0130] The depth mapping module 147 is used to determine the depth value range of the target region and map it onto the pseudo-color image, based on the depth value corresponding to the center point of the pseudo-color image.

[0131] The first candidate contour generation module 148 is used to perform region growth based on the depth image and preset growth criteria to obtain the first candidate contour.

[0132] The second candidate contour generation module 149 is used to perform threshold segmentation in the HSV space of the pseudo-color image to obtain the second candidate contour.

[0133] The fourth image processing module 150 is used to fuse the first candidate contour and the first candidate contour to obtain the fused contour.

[0134] The fifth image processing module 151 is used to homogenize and smooth the fused contour to generate a second outer contour.

[0135] The sixth image processing module 152 is used to perform morphological erosion operation on the binary mask corresponding to the second outer contour to generate the second inner contour, and use the second inner contour as the second candidate boundary.

[0136] Specifically, the normalization processing module 146 normalizes the depth image to generate a pseudo-color image, and the depth mapping module 147 uses the depth value corresponding to the center point of the pseudo-color image as a reference to determine the depth value range of the target region and map it onto the pseudo-color image to achieve adaptive threshold adjustment.

[0137] It should be noted that this embodiment employs a dual-branch strategy to generate candidate contours. Specifically, the first candidate contour generation module 148 performs region growing based on the depth image and a preset growing criterion to obtain the first candidate contour. The preset growing criterion is based on the continuity of depth values, and the specific formula is as follows:

[0138] |z(P)−z(q)| <T depth ,

[0139] Where z(P) is the depth value of pixel P, z(q) is the depth value of neighboring pixel q, and T depth A preset depth continuity threshold is used to determine whether two adjacent pixels belong to the same continuous torso region. This process can effectively capture torso regions with smooth depth changes.

[0140] Further, the second candidate contour generation module 149 obtains a binary mask of the second candidate contour in the HSV space of the pseudo-color image through thresholding. Finally, the fourth image processing module 150 fuses the first candidate contour and the first candidate contour to obtain the optimal fused contour. Let the first candidate contour obtained in branch one be C. depth Then, the two branches yield the following contour candidates and fused contours:

[0141] ;

[0142] Among them, C fusion The fused profile is obtained after fusion; C color This is the second candidate contour obtained from branch two (based on HSV spatial thresholding of pseudo-color images). `area(·)` calculates the area covered by the candidate contour; `γ` is a preset area threshold. In other words, this embodiment obtains the optimal contour through a fusion strategy, prioritizing the intersection of two candidates. If the intersection area is too small, the candidate with the larger area is selected as the fused contour.

[0143] Finally, the fifth image processing module 151 is used to homogenize and smooth the fused contour to generate a smooth and uniform second outer contour. The sixth image processing module 152 performs a morphological erosion operation on the binary mask corresponding to the second outer contour to generate a second inner contour, which serves as the second candidate boundary for the end effector motion.

[0144] like Figure 2 As shown, to achieve safe path planning, this embodiment specifically introduces a normal estimation technique based on Singular Value Decomposition (SVD) of local point clouds, combined with real-time distance detection of the spinal region and an active obstacle avoidance mechanism, to generate a muscle stimulation trajectory that is both safe and closely conforms to the human body surface. Specifically, the path control point determination module 16 includes:

[0145] The depth value determination module 161 is used to determine the depth value of each acupoint pixel coordinate in the RGB image based on the depth image.

[0146] The first coordinate transformation module 162 is used to convert the pixel coordinates of each acupoint and the corresponding depth value into three-dimensional coordinates in the camera coordinate system using the camera intrinsic parameter matrix.

[0147] The transformation matrix determination module 163 is used to determine the transformation matrix from the camera coordinate system to the end effector coordinate system through hand-eye calibration.

[0148] The second coordinate transformation module 164 is used to transform each three-dimensional coordinate in the camera coordinate system to the end effector coordinate system through a transformation matrix, and to determine each transformed three-dimensional coordinate as a path control point.

[0149] During trajectory generation, for the acupoint pixel coordinates obtained from the RGB image, the depth value determination module 161 determines the depth value of each acupoint pixel coordinate in the RGB image based on the depth image. The first coordinate transformation module 162 uses the camera intrinsic parameter matrix to complete the three-dimensional coordinate transformation from the image coordinate system to the camera coordinate system. The transformation matrix determination module 163 uses the transformation matrix from the camera coordinate system to the end effector coordinate system obtained by hand-eye calibration. Finally, the second coordinate transformation module 164 transforms the three-dimensional coordinates in the camera coordinate system to the end effector coordinate system to obtain the path control point at each acupoint.

[0150] Based on the above embodiments, in some embodiments, the initial trajectory generation module 17 includes:

[0151] The initial interpolation point generation module 171 is used to generate initial interpolation points for two adjacent acupoints along the direction of the line connecting the two points in all path control points.

[0152] The path trajectory point sequence generation module 172 is used to project each initial interpolation point onto the point cloud surface of the test target and find the nearest point in the neighborhood as the path trajectory point to generate a path trajectory point sequence.

[0153] The pre-stimulation trajectory generation module 173 is used to smooth the path trajectory point sequence through moving average filtering to generate a pre-stimulation trajectory.

[0154] After obtaining the path control points, the initial interpolation point generation module 171 generates initial interpolation points for two adjacent acupoints from all the path control points, along the direction of the line connecting the two points with a fixed step size. In this embodiment, the fixed step size is not limited and depends on the specific implementation.

[0155] Furthermore, the path trajectory point sequence generation module 172 projects each initial interpolation point onto the point cloud surface of the target subject, finds the nearest point in the neighborhood as the path trajectory point, and generates a path trajectory point sequence. Finally, the pre-stimulation trajectory generation module smooths the trajectory sequence using a moving average filter to obtain a preliminary pre-stimulation trajectory.

[0156] To ensure the end effector maintains a contact posture perpendicular to the body surface, local surface normal estimation is required for each path trajectory point. Therefore, based on the above embodiments, in some embodiments, the trajectory processing module 18 includes:

[0157] The local point set generation module 180 is used to select a preset number of nearest neighbor points in the point cloud of the test target to form a local point set for each path trajectory point.

[0158] The covariance matrix construction module 181 is used to calculate the centroid of each local point set and construct the covariance matrix based on the coordinate difference between the centroid and each point in the corresponding local point set.

[0159] The initial normal vector generation module 182 is used to perform singular value decomposition on the covariance matrix and select the eigenvector corresponding to the minimum singular value as the initial normal vector of the corresponding path trajectory point.

[0160] The dot product calculation module 183 is used to set the negative Z-axis direction of the end effector coordinate system as the reference direction of the desired stimulus orientation, and to calculate the dot product of the initial normal vector and the reference direction.

[0161] The normal vector adjustment and constraint module 184 is used to adjust the direction of the normal vector of the path trajectory point according to the dot product, and to apply a constraint on the angle between the adjusted normal vector and the Z-axis of the end effector coordinate system.

[0162] Normal vector conversion module 185 is used to convert the unit normal vectors of the adjusted and constrained path trajectory points into attitude quaternions of the end effector.

[0163] Specifically, firstly, taking the trajectory point as the center, the local point set generation module 180 selects a preset number of nearest neighbor points in the point cloud of the test target to form a local point set. In this embodiment, the size of the preset number is not limited and depends on the specific implementation. Further, the covariance matrix construction module 181 calculates the centroid of each local point set and constructs a covariance matrix C based on the coordinate difference between the centroid and each point in the corresponding local point set. The specific formula is as follows:

[0164] ;

[0165] Where k is the number of nearest neighbors, S i Let μ be the local point cloud near the path trajectory point, and let μ be the centroid of the local point set.

[0166] Further, the initial normal vector generation module 182 performs singular value decomposition on the covariance matrix and selects the eigenvector corresponding to the minimum singular value as the initial normal vector n0 of the corresponding path trajectory point. The dot product calculation module 183 sets the negative Z-axis direction d=[0,0,-1]T of the end effector coordinate system as the reference direction of the desired stimulus orientation and calculates the dot product between the initial normal vector n0 and the reference direction. Subsequently, the normal vector adjustment and constraint module 184 adjusts the normal vector direction of the path trajectory point according to the dot product to ensure that the normal vector n is oriented into the body. The adjustment method is: if n0·d<0, then let n=-n0; otherwise, n=n0. At the same time, a constraint is applied to the angle θ between the adjusted normal vector and the Z-axis of the end effector coordinate system to avoid excessive tilting of the end effector. The adjustment method is: if θ> Then adjust n to θ = Meanwhile, its horizontal azimuth angle remains unchanged. Finally, the normal vector conversion module 185 converts the unit normal vectors of the adjusted and constrained path trajectory points into attitude quaternions of the end effector, providing an attitude reference for the end effector.

[0167] The spinal region is a sensitive and contraindicated area, and electrical stimulation is prohibited. Therefore, this application employs an active obstacle avoidance mechanism based on real-time distance detection. The trajectory processing module 18 also includes:

[0168] The spinal midline definition module 186 is used to define the parametric expression of the spinal midline of the test target;

[0169] The distance calculation module 187 is used to calculate the shortest distance from each path trajectory point on the pre-stimulation trajectory to the midline of the spine on the horizontal plane.

[0170] The safety judgment module 188 is used to determine whether each shortest distance is not greater than a preset safety threshold; if so, it confirms that the corresponding path trajectory point has entered the spinal danger zone.

[0171] The trajectory update module 189 is used to move the path trajectory points entering the spinal danger zone in the opposite direction of the corresponding normal vector to obtain new path trajectory points, so as to complete the update of the pre-stimulation trajectory.

[0172] The executable stimulus trajectory generation module 190 is used to perform spline interpolation smoothing on the position and orientation sequence of the updated pre-stimulation trajectory to generate an executable stimulus trajectory.

[0173] Specifically, the spinal midline definition module 186 first defines the parametric expression of the spinal midline of the test target. Specifically, the spinal midline is defined using the three-dimensional coordinates of the Dazhui (GV14) and Changqiang (GV1) acupoints. Its parametric expression is as follows:

[0174] ;

[0175] Here, L(t) means that the midline of the spine is a continuous line segment connecting the Dazhui (GV14) and Changqiang (GV1) acupoints. The three-dimensional coordinates of the Dazhui acupoint are: The coordinates of the Yaoshu acupoint are shown in three dimensions.

[0176] For each trajectory point on the stimulus trajectory, the distance calculation module 187 calculates its shortest distance to the midline of the spine on the horizontal plane. The safety judgment module 188 determines whether each shortest distance is not greater than a preset safety threshold. If the distance is less than or equal to the preset safety threshold, the trajectory point is determined to have entered the dangerous area of ​​the spine.

[0177] For trajectory points within the danger zone, a vertical lifting strategy is adopted. Specifically, the trajectory update module 189 moves the path trajectory points entering the spinal danger zone in the opposite direction of the corresponding normal vector to obtain new path trajectory points, thereby completing the update of the pre-stimulation trajectory. At the same time, the original posture is maintained to ensure that the end effector safely passes through the spinal region with a smooth lifting-crossing-falling motion.

[0178] Finally, after completing the normal estimation and obstacle avoidance processing for all trajectory points, the executable stimulus trajectory generation module 190 performs spline interpolation smoothing on the position and attitude sequence of the updated pre-stimulation trajectory to ensure the high-order smoothness of the trajectory and generate the final executable stimulus trajectory.

[0179] Figure 3 This is a system architecture diagram of an adaptive muscle stimulator provided in an embodiment of this application. Figure 3 As shown, after obtaining the executable stimulus trajectory, the system obtains a fixed transformation matrix from the camera coordinate system to the end effector coordinate system through hand-eye calibration, and transforms the three-dimensional pose of the executable stimulus trajectory obtained by the safety path planning module to the end effector base coordinate system of the muscle stimulator to form the final executable motion command.

[0180] The system employs a force-position hybrid control strategy, rigorously tracking the planned position trajectory in the horizontal direction to ensure path accuracy; and maintaining a constant, safe contact force in the vertical direction through impedance control to guarantee the compliance and safety of the stimulation process. Simultaneously, the system supports parametric execution of various stimulation techniques, allowing operators to select appropriate combinations of stimulation techniques via host computer software.

[0181] The end effector performs stimulation operations according to the planned trajectory and posture. During the operation, the force sensor collects contact force data in real time and feeds it back to the control system to dynamically adjust the contact force and avoid excessive or insufficient contact force from affecting the stimulation effect and safety.

[0182] Figure 4This is a structural diagram of an embedded computer provided in an embodiment of this application. It is understood that the device in the above embodiment operates within an embedded computer. Figure 4 As shown, the embedded computer includes:

[0183] Memory 20 is used to store computer programs;

[0184] The processor 21 is configured to implement the steps of the embedded computer method as described in the above embodiments when executing a computer program.

[0185] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.

[0186] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 20 is used to store at least the following computer program 201, which, after being loaded and executed by the processor 21, is capable of running the positioning device of the muscle stimulator disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary storage or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, data related to the positioning device of the muscle stimulator.

[0187] In some embodiments, the embedded computer may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.

[0188] Those skilled in the art will understand that Figure 4 The structure shown does not constitute a limitation on embedded computers and may include more or fewer components than illustrated.

[0189] The positioning device for a muscle stimulator provided in this application has been described in detail above. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of this application.

[0190] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A positioning device for a muscle stimulator, characterized in that, include: The image acquisition module is used to acquire RGB images of the target area of ​​the test target through a preset camera; The coordinate detection module is used to detect the pixel coordinates of each key point in the RGB image based on a preset pose estimation network; An individualized information determination module is used to determine the individualized scale reference information of the test target based on the pixel coordinates of each key point; The acupoint positioning module is used to determine the pixel coordinates of each acupoint of the test target within the target area based on the individualized scale reference information and the pixel coordinates of each key point.

2. The positioning device of the muscle stimulator according to claim 1, characterized in that, The coordinate detection module includes: The keypoint coordinate detection module is used to detect the initial pixel coordinates of each keypoint in the RGB image using the MediaPipe pose estimation network and the YOLOv8-pose pose estimation network, respectively. Specifically, when the target region is the back, the keypoints include the left shoulder keypoint, right shoulder keypoint, left ear keypoint, right ear keypoint, left hip keypoint, and right hip keypoint; when the target region is the abdomen, the keypoints include the left shoulder keypoint, right shoulder keypoint, and navel keypoint. The weighted average module is used to perform a weighted average of the initial pixel coordinates output by the MediaPipe pose estimation network and the initial pixel coordinates output by the YOLOv8-pose pose estimation network to generate the pixel coordinates of each key point.

3. The positioning device of the muscle stimulator according to claim 2, characterized in that, The individualized information determination module includes: The shoulder width determination module is used to determine the shoulder width of the test target based on the key point pixel coordinates of the left shoulder key point and the key point pixel coordinates of the right shoulder key point; The scaling factor calculation module is used to perform a preset scaling factor calculation on the shoulder width to obtain the individualized scale reference scaling factor of the test target. The reference point determination module is used to determine the reference point pixel coordinates of the reference points within the target area based on the pixel coordinates of each of the key points; wherein, when the target area is the back, the reference points are the Dazhui acupoint and the Changqiang acupoint; when the target area is the abdomen, the reference point is the Shenque acupoint.

4. The positioning device of the muscle stimulator according to claim 3, characterized in that, The acupoint positioning module includes: Offset distance acquisition module is used to acquire the offset distance of each acupoint in the target area relative to each reference point; The acupoint pixel coordinate calculation module is used to determine the pixel coordinates of each acupoint within the target area based on the pixel coordinates of each reference point, each offset distance, the individualized scale reference scaling factor, and the direction coefficient.

5. The positioning device of the muscle stimulator according to claim 1, characterized in that, The preset camera is an RGB-D camera, and the image acquisition module acquires the RGB image and depth image of the target area of ​​the test target through the RGB-D camera; Correspondingly, it also includes: The contour extraction module is used to generate a first candidate boundary for the end effector motion based on the RGB image, and to generate a second candidate boundary for the end effector motion based on the depth image; The contour fusion module is used to generate a safety boundary for the motion of the end effector based on the first candidate boundary and the second candidate boundary; The path control point determination module is used to determine the path control point corresponding to the pixel coordinates of each acupoint based on the RGB image and the depth image through coordinate transformation and hand-eye calibration. The initial trajectory generation module is used to perform interpolation and smoothing processing on each of the path control points to generate a pre-stimulation trajectory; The trajectory processing module is used to perform local surface normal estimation and obstacle avoidance processing on each path trajectory point in the pre-stimulation trajectory to generate an executable stimulation trajectory. The stimulus execution module is used to perform electrical stimulation on the target region based on the executable stimulus trajectory.

6. The positioning device of the muscle stimulator according to claim 5, characterized in that, The contour extraction module includes: The model building module is used to build a joint skin color probability model in the HSV and YCrCb color spaces based on the OpenCV function library; The skin pixel determination module is used to determine the skin region pixels in the RGB image through the joint skin color probability model, and generate an initial binary mask based on the corresponding determination result. The first image processing module is used to perform morphological denoising and hole filling on the initial binary mask to obtain the torso contour region. The second image processing module is used to homogenize and smooth the original contour point sequence of the torso contour region to generate the first outer contour. The third image processing module is used to perform morphological erosion operation on the binary mask corresponding to the first outer contour to generate the first inner contour, and use the first inner contour as the first candidate boundary.

7. The positioning device of the muscle stimulator according to claim 5, characterized in that, The contour extraction module includes: The normalization processing module is used to normalize the depth image to generate a pseudo-color image; A depth mapping module is used to determine the depth value range of the target region based on the depth value corresponding to the center point of the pseudo-color image and map it onto the pseudo-color image. The first candidate contour generation module is used to perform region growth based on the depth image and preset growth criteria to obtain the first candidate contour. The second candidate contour generation module is used to perform threshold segmentation in the HSV space of the pseudo-color image to obtain the second candidate contour. The fourth image processing module is used to fuse the first candidate contour and the first candidate contour to obtain a fused contour; The fifth image processing module is used to homogenize and smooth the fused contour to generate a second outer contour; The sixth image processing module is used to perform morphological erosion operation on the binary mask corresponding to the second outer contour to generate the second inner contour, and use the second inner contour as the second candidate boundary.

8. The positioning device of the muscle stimulator according to claim 5, characterized in that, The path control point determination module includes: A depth value determination module is used to determine the depth value of each acupoint pixel coordinate in the RGB image based on the depth image; The first coordinate transformation module is used to convert the pixel coordinates of each acupoint and the corresponding depth value into three-dimensional coordinates in the camera coordinate system using the camera intrinsic parameter matrix. The transformation matrix determination module is used to determine the transformation matrix from the camera coordinate system to the end effector coordinate system through hand-eye calibration; The second coordinate transformation module is used to transform each of the three-dimensional coordinates in the camera coordinate system to the end effector coordinate system through the transformation matrix, and to determine each of the transformed three-dimensional coordinates as each of the path control points.

9. The positioning device of the muscle stimulator according to claim 5, characterized in that, The initial trajectory generation module includes: An initial interpolation point generation module is used to generate an initial interpolation point for two adjacent acupoints along the direction of the line connecting the two points, with a fixed step size, among all the path control points. The path trajectory point sequence generation module is used to project each of the initial interpolation points onto the point cloud surface of the test target, and find the nearest point in the neighborhood as the path trajectory point to generate a path trajectory point sequence. The pre-stimulation trajectory generation module is used to smooth the path trajectory point sequence through a moving average filter to generate the pre-stimulation trajectory.

10. The positioning device of the muscle stimulator according to claim 5, characterized in that, The trajectory processing module includes: The local point set generation module is used to select a preset number of nearest neighbor points in the point cloud of the test target to form a local point set for each of the path trajectory points. The covariance matrix construction module is used to calculate the centroid of each of the local point sets and construct the covariance matrix based on the coordinate difference between the centroid and each point in the corresponding local point set. The initial normal vector generation module is used to perform singular value decomposition on the covariance matrix and select the eigenvector corresponding to the minimum singular value as the initial normal vector of the corresponding path trajectory point. The dot product calculation module is used to set the negative Z-axis direction of the end effector coordinate system as the reference direction of the desired stimulus orientation, and to calculate the dot product of the initial normal vector and the reference direction. The normal vector adjustment and constraint module is used to adjust the direction of the normal vector of the path trajectory point according to the dot product, and to apply a constraint on the angle between the adjusted normal vector and the Z-axis of the end effector coordinate system. The normal vector conversion module is used to convert the unit normal vectors of the adjusted and constrained path trajectory points into attitude quaternions of the end effector; The spinal midline definition module is used to define the parametric expression of the spinal midline of the test target; The distance calculation module is used to calculate the shortest distance from each path trajectory point on the pre-stimulation trajectory to the midline of the spine on the horizontal plane. The safety judgment module is used to determine whether each of the shortest distances is not greater than a preset safety threshold; if so, it confirms that the corresponding path trajectory point has entered the spinal danger zone. The trajectory update module is used to move the path trajectory points entering the spinal danger zone in the opposite direction of the corresponding normal vector to obtain new path trajectory points, so as to complete the update of the pre-stimulation trajectory. An executable stimulus trajectory generation module is used to perform spline interpolation smoothing on the position and orientation sequence of the updated pre-stimulation trajectory to generate the executable stimulus trajectory.