The present application relates to the technical field of
robot intelligent control, and particularly relates to a multi-environment
motion control method and
system for a magnetic drive soft micro
robot. A current frame image of the
robot is acquired and preprocessed into a
grayscale image, a first threshold is used for segmentation to generate a first
binary image, rectangular regions with size errors meeting requirements are screened as candidate magnetic drive foot regions, and then a preset
size adjustment threshold is compared to determine a target magnetic drive
foot region. A second threshold is used for segmentation on a local region between the feet, an elongated rectangle is extracted as a candidate region of a connecting member, and a length-width and included angle adjustment threshold is used to obtain a connecting member region. A longitudinal expansion is performed on the region between the feet, a third threshold is used for segmentation to generate a third
binary image, a
pixel density adjustment threshold is used to obtain a target expansion region, and the robot
body position is determined accordingly. The current
pose information is obtained by combining the center of the connecting member and the
body position, an external
magnetic field driving instruction is generated accordingly, the robot is precisely driven, and the control precision is effectively improved.