Obstacle size prediction method based on fusion of image information and improved LSSVM
By fusing image information and improved LSSVM model, combined with genetic algorithm and whale optimization algorithm, the problem of mobile robots obtaining actual size information of obstacles is solved, high-precision obstacle size prediction is achieved, and the robot's path planning and obstacle avoidance capabilities are improved. .
Patent Information
- Application Number
- CN202210458661.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-24
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-04-24
AI Technical Summary
Existing technology is difficult to effectively obtain the actual size information of obstacles in the mobile robot environment, affecting the accuracy of its path planning and obstacle avoidance navigation.
Using fused image information and improved least squares support vector machine (LSSVM) combined with genetic algorithm and whale optimization algorithm to build an obstacle size prediction model, obtain obstacle pixel size information through machine vision, and optimize the regularization parameters of the LSSVM model and Kernel function width to predict the actual size of obstacles.
It achieves accurate quantitative perception of the size of obstacles, simplifies the measurement process, reduces costs, increases the breadth and depth of mobile robot applications, and provides high-precision path planning and obstacle avoidance navigation support.
Smart Images

Figure CN114758242B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mobile working robot environment perception, and in particular to an obstacle size prediction method integrating image information and improving LSSVM. Background Art
[0002] With the rapid development of the world economy and science and technology, mobile robots are widely used in human scientific research, production and life. They can replace humans to go to complex and dangerous environments to complete tasks autonomously, and have very broad application prospects. With the increasing demand for mobile robot tasks, their working environment has also changed from a simple structured environment to an outdoor unstructured environment. Therefore, this puts higher requirements on mobile robots for environmental perception and obstacle avoidance navigation.
[0003] Mobile robots perceive the environment through various types of sensors, and then use information fusion technology to make decisions and plan obstacle avoidance navigation paths. Environmental perception, as the eyes of mobile robots, can help mobile robots perceive the world around them. It plays a very important role in the development of mobile robots and is also the prerequisite for mobile robots to plan paths and avoid obstacles.
[0004] In order to improve the environmental perception ability of mobile robots, many scholars have carried out relevant research. EllipsMasehian et al. developed an inexpensive mobile robot with sensing capabilities, which can reliably build a multi-connected environmental map and obtain pits and convex obstacles. KKArun et al. proposed a tour method for an autonomous mobile robot with environmental perception based on fuzzy rules. By adapting to environmental conditions and then building response rules, the patrol and self-decision analysis of the programmed robot were improved. This method can achieve the best solution for instant adaptation to the environment. Sheng Liu et al. proposed a motion planning algorithm for dynamic obstacle avoidance with trend-aware motion planning (TAMP), which produces a trajectory away from dynamic obstacles while avoiding the movement trend of obstacles. Edgar Macias-Garcia et al. proposed a full perception system consisting of a continuous convolutional neural network in parallel and processing stages to generate collision-free trajectories according to the desired goals. The system was evaluated at each step in the actual environment and proved to be a powerful and fast system suitable for real-time applications through some performance tests. Ngangbam Herojit Singh et al. proposed a novel method to generate collision-free, near-optimal paths and velocities for mobile robots in dynamic environments containing moving and static obstacles using artificial neural networks. The results show that the method can effectively achieve a near-optimal path to the target location of the mobile robot. T.Ran et al. proposed a low-cost vision-based perception method to achieve indoor mobile robot navigation. The capability and robustness of the proposed navigation method were demonstrated through extensive experiments in static and dynamic unknown environments. KMadhava Krishna et al. discussed the advantages of incorporating cognitive and memory capabilities in sensor-based real-time navigation algorithms. The method has been tested in concave, maze-like, unstructured and changing environments and its effectiveness has been established. Li Wang et al. proposed a three-layer perception framework based on transfer learning, including a place recognition model, a rotation area recognition model and a "side" recognition model. Some experiments were conducted in a real indoor environment to demonstrate the effectiveness and robustness of the proposed perception framework. Xu Cui et al. proposed a method for constructing 3D semantic maps for mobile robots based on improved ORB-SALM2. The constructed 3D environmental thermal field map has high accuracy and real-time performance. Marco Visca et al. proposed a Conv1D energy-aware path planner for mobile robots in unstructured environments, which can provide estimates of driving energy consumption and energy recovery when the robot traverses complex and uneven terrain, and achieved good results.
[0005] The above research mainly focuses on the obstacle avoidance method proposed by environmental perception and has achieved relatively good research results, but the above research does not fully obtain environmental information, such as the actual size information of obstacles. In order to further improve the environmental perception performance of mobile robots and provide a data basis for mobile robot path planning and obstacle avoidance navigation, obtaining the actual size parameters of obstacles has become an urgent problem to be solved. Summary of the invention
[0006] In order to solve the above technical problems, the present invention provides an obstacle size prediction method of fusing image information and improving LSSVM with simple algorithm and convenient operation.
[0007] The technical solution of the present invention to solve the above technical problem is: a method for predicting obstacle size by fusing image information and improving LSSVM, comprising the following steps:
[0008] Step 1: Build an obstacle image information acquisition platform and use machine vision algorithms to obtain obstacle pixel size information;
[0009] Step 2: Use genetic algorithm combined with whale optimization algorithm to optimize the regularization parameter and kernel function width of the least squares support vector machine;
[0010] Step 3: Using the obstacle pixel size and the distance from the obstacle to the camera as input parameters and the actual size of the obstacle as output parameter, an obstacle size prediction model based on genetic algorithm, whale optimization algorithm and least squares support vector machine is constructed;
[0011] Step 4: Input the obstacle pixel size into the obstacle size prediction model to obtain the actual size of the obstacle.
[0012] In the above-mentioned obstacle size prediction method using fused image information and improved LSSVM, in step 1, the obstacle image information acquisition platform includes a camera for collecting surrounding environment information, a ranging sensor for collecting the distance from the obstacle to the camera, and a computer for control, and the camera and the ranging sensor are respectively connected to the computer.
[0013] In the above obstacle size prediction method using fused image information and improved LSSVM, in step 1, the specific process of using a machine vision algorithm to obtain obstacle pixel size information is as follows:
[0014] (1-1) Image preprocessing: Obtain the original image of the obstacle through the camera, use affine transformation to correct the translation and rotation angle of the original image, and correct the angle deviation in the camera shooting process; create an ROI in the obstacle area in the image, cut out the part of interest for processing, perform median filtering on the ROI area, use the gradient descent method to enhance the boundary contour, and obtain a three-channel color image;
[0015] (1-2) Image segmentation: The obtained three-channel color image is converted into three single-channel grayscale images, and the three single-channel images are converted from the RGB space to the HSV space to obtain grayscale images with obvious contrast. The image in the saturation-image space is segmented according to the amplitude of the pixel grayscale, and then binarized to segment the target from the image;
[0016] (1-3) Image morphological processing: Use the opening and closing operations in morphology to process the noise, holes and gaps in the segmented target image and optimize the target area;
[0017] (1-4) Edge detection: The Sobel operator is used to detect the edge of the target area by taking advantage of the phenomenon that the extreme value is reached at the edge point, and finally the obstacle contour is fitted;
[0018] (1-5) Obtain the pixel size of the obstacle.
[0019] The specific process of the obstacle size prediction method of the above-mentioned fusion image information and improved LSSVM is as follows:
[0020] (2-1) Determine the input and output parameters of the least squares support vector machine (LSSVM) model: the maximum pixel width w, the maximum pixel height h of the obstacle, and the distance L from the obstacle to the camera are used as the input parameters of the LSSVM model, and the maximum actual width W and the maximum actual height H of the obstacle are used as the output parameters of the LSSVM model;
[0021] (2-2) Data normalization: Normalize the input and output data so that the data range of each indicator is between [-1, 1];
[0022] (2-3) Set parameters and initialize them; the parameters set include the crossover probability P of the genetic algorithm GA c and mutation probability P m , the number of variables dim, the maximum number of iterations MaxIter, the number of whale populations n, and the upper limit of variables u of the whale optimization algorithm WOA max and variable lower limit u min , in the least squares support vector machine, set the algorithm type to regression prediction type and the kernel function to radial basis function;
[0023] The position Q of the humpback whale in the whale algorithm is expressed by the following formula:
[0024]
[0025] where q n,dimDenote the value at the n-th row and dim-th column in Q; according to the parameters set in step (2-3), calculate the first random population position Q1 of the whales according to the following formula, and set the iteration number t to 1;
[0026] Q1(i,j) = rand(i,j) × [u max (i) - u min (i)] + u min (i)
[0027] Q1(i,j) represents the value at the i-th row and j-th column in Q1, u max (i) and u min (i) are the upper and lower limits of the i-th humpback whale, and rand(i,j) is a random number in the interval [0,1];
[0028] (2-4) Calculate the fitness value: Take the root mean square error RMS of the LSSVM model prediction value as the fitness value, and obtain the optimal fitness value and its position of the current whale population individuals;
[0029] (2-5) Encircle the prey: In the whale optimization algorithm, the humpback whale identifies the position of the prey and encircles it. Set the best position as the target prey, and the remaining individuals in the population update their own positions towards the best position;
[0030] (2-6) Bubble attack: During the predation process, the humpback whale approaches the prey in a spiral motion while gradually shrinking the encirclement;
[0031] (2-7) Search for the prey: After the two stages of encircling predation and bubble attack, the humpback whale randomly searches for the prey within the encirclement;
[0032] (2-8) Crossover and mutation operations: Whale individuals are prone to falling into local optima during the prey search stage. Therefore, the crossover factor and mutation factor in the genetic algorithm are introduced to enable the whale optimization algorithm to obtain the global optimal solution;
[0033] (2-9) Determine whether the end condition of the loop iteration is satisfied: When the loop iteration condition is not satisfied, that is, t < MaxIter, return to step (2-4); when the loop iteration condition is satisfied, that is, t ≥ MaxIter, end the loop and return the optimal fitness value Leader_score and its position Leader_pos of the whale population individuals, so as to obtain the optimal regularization parameter and kernel function width of the least squares support vector machine LSSVM.
[0034] For the above obstacle size prediction method that fuses image information and improves LSSVM, in step (2-4), replace the regularization parameter γ and the kernel function width parameter σ of the LSSVM model with the positions Q(i,1) and Q(i,2) of the whales 2, the mean square error MSE of the predicted value of the LSSVM model is used as the fitness value through the following formula to obtain the optimal fitness value Leader_score and position Leader_pos of the current whale population individual;
[0035]
[0036] In the formula, y pred and true represents the predicted value and the experimental value, and N is the data sample point; in addition, the optimization problem is expressed as shown in the following formula:
[0037] minf(γ,σ 2 )=min(MSE).
[0038] In the above obstacle size prediction method of fusion image information and improved LSSVM, in step (2-5), the mathematical model used in the prey encirclement stage is:
[0039]
[0040]
[0041] in, represents the distance between the humpback whale and the target position, t is the current iteration number, and is the coefficient vector, is the position vector of the current optimal solution, is the current position vector of the humpback whale, Represents the position vector after the next iteration and should be updated immediately if a better feasible solution is available is a random vector in the interval [0,2], used to adjust the optimal individual Distance to current individual The degree of distance, when The influence becomes stronger when When the impact is reduced;
[0042] and The mathematical model is:
[0043]
[0044]
[0045] in, and is a random variable in the interval [0,1], is a linear function, t is the current number of iterations, MaxIter is the maximum number of iterations, and as t increases, will decrease linearly from 2 to 0, as shown in the following equation:
[0046]
[0047] In the above obstacle size prediction method of fusion image information and improved LSSVM, in the step (2-6), assuming that the probability of occurrence of the shrinking surrounding mechanism and the spiral model behavior is 50%, the mathematical model of the two behaviors occurring simultaneously is:
[0048]
[0049] Among them, ψ is a constant, l is a random number between [-1,1], and p is a random number between [0,1].
[0050] In the above obstacle size prediction method of fusion image information and improved LSSVM, in step (2-7), the mathematical model for searching prey is:
[0051]
[0052]
[0053] in is the position vector randomly selected from the individual; in the prey search phase, when When , the current whale individual performs the global optimal solution search; when When , the current whale individual searches towards the reference whale to search for the local optimal solution.
[0054] In the above obstacle size prediction method of fusion image information and improved LSSVM, in the steps (2-8), the crossover and mutation operations are shown as follows:
[0055]
[0056] Among them, the intermediate and are the crossover and mutation operators respectively.
[0057] The specific process of the obstacle size prediction method of the above-mentioned fusion image information and improved LSSVM is as follows:
[0058] (3-1) Input test data and perform normalization;
[0059] (3-2) Setting the optimal position of the individual whale, i.e. the optimal regularization parameter and kernel function width, into the LSSVM model, initializing and training the LSSVM model;
[0060] (3-3) Use the trained LSSVM model to make predictions, obtain output data, denormalize the output data, obtain actual data, and finally perform error analysis.
[0061] The beneficial effects of the present invention are:
[0062] 1. The obstacle size prediction method of the present invention integrates image information and GA-WOA-LSSVM model, and uses GA-WOA to optimize the regularization parameter and kernel function width of the LSSVM model, which solves the problem that the whale optimization algorithm (WOA) is prone to fall into the local optimal solution, and can obtain the global optimal regularization parameter and kernel function width.
[0063] 2. The present invention can quantitatively perceive the environment, simplify the measurement process, reduce the measurement cost, and improve the breadth and depth of mobile robot applications; through model comparison and analysis, the GA-WOA-LSSVM model has ideal prediction accuracy, can meet the actual needs of engineering, and provides a new solution for the popularization and engineering application of mobile robots. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a system structure diagram of the present invention.
[0065] Figure 2 This is the obstacle image information acquisition result diagram of the present invention.
[0066] Figure 3 The flowchart of the present invention is constructed based on the GA-WOA-LSSVM model.
[0067] Figure 4 This is a diagram of obstacle size prediction results based on the GA-WOA-LSSVM model of the present invention. DETAILED DESCRIPTION
[0068] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0069] like Figure 1 As shown, a method for predicting obstacle size by fusing image information and improving LSSVM includes the following steps:
[0070] Step 1: Build an obstacle image information acquisition platform and use machine vision algorithms to obtain obstacle pixel size information.
[0071] like Figure 1 As shown in (a), the obstacle image information acquisition platform includes a camera for collecting surrounding environment information, a ranging sensor for collecting the distance from the obstacle to the camera, and a computer for control. The camera and the ranging sensor are connected to the computer respectively.
[0072] The specific process of using machine vision algorithm to obtain obstacle pixel size information is as follows:
[0073] (1-1) Image preprocessing: Obtain the original image of the obstacle through the camera, such as Figure 2 As shown in (a), the original image is translated and rotated using affine transformation to correct the angle deviation of the camera shooting process; the obstacle area in the image is created into ROI, and the part of interest is cropped out for processing to reduce the amount of calculation and improve efficiency. The ROI area is subjected to median filtering to solve the problem of uneven illumination. The gradient descent method is used to solve the image blur problem caused by diffusion, and the boundary contour is enhanced to obtain a three-channel color image, as shown in Figure 2 As shown in (b).
[0074] (1-2) Image segmentation: The obtained three-channel color image is converted into three single-channel grayscale images, and the three single-channel images are converted from the RGB space to the HSV space to obtain grayscale images with obvious contrast. The image in the saturation-image space is segmented according to the pixel grayscale amplitude, and then binarized to segment the target from the image. The result is as follows: Figure 2 As shown in (c).
[0075] (1-3) Image morphological processing: Use the opening and closing operations in morphology to process the noise, holes and gaps in the segmented target image and optimize the target area. The results are as follows: Figure 2 As shown in (d).
[0076] (1-4) Edge detection: The Sobel operator is used to detect the edge of the target area by taking advantage of the phenomenon that the extreme value is reached at the edge point. The results are as follows: Figure 2 As shown in (e), the final obstacle contour is fitted, as Figure 2 As shown in (f).
[0077] (1-5) Get the pixel size of the obstacle.
[0078] Step 2: Use genetic algorithm combined with whale optimization algorithm to optimize the regularization parameter and kernel function width of the least squares support vector machine.
[0079] Regularization parameter γ and kernel function width parameter σ 2 The selection of determines the prediction accuracy of the LSSVM model. The regularization parameter γ controls the penalty error of samples that exceed the error. The smaller γ is, the greater the tolerance to error and the lower the learning complexity. On the contrary, the smaller the tolerance to error is, the higher the learning complexity is. The kernel function width parameter σ 2 is closely related to the range of the sample space, σ 2If it is too small, it will easily lead to underfitting, otherwise it will lead to overfitting and reduce the performance of the model. Therefore, the solution of LSSVM depends on the regularization parameter γ and the kernel function width parameter σ 2 , γ and σ 2 The selection of γ and σ directly affects its learning and generalization ability. This paper will use genetic algorithm combined with whale optimization algorithm to optimize γ and σ 2 Make optimizations.
[0080] The specific process is:
[0081] (2-1) Determine the input and output parameters of the least squares support vector machine (LSSVM) model: the maximum pixel width w, maximum pixel height h of the obstacle and the distance L from the obstacle to the camera are used as the input parameters of the LSSVM model, and the maximum actual width W and maximum actual height H of the obstacle are used as the output parameters of the LSSVM model.
[0082] (2-2) Data normalization: Normalize the input and output data so that the data range of each indicator is between [-1,1].
[0083] (2-3) Setting parameters; the set parameters include the crossover probability P of the genetic algorithm (GA) c is 0.7 and the mutation probability P m is 0.3; the number of variables dim of the Whale Optimization Algorithm (WOA) is 4, the maximum number of iterations MaxIter is 30, the number of whale populations n is 20, and the upper limit of variables u max For [10 3 ,10 3 ,10 2 ,10 2 ] and the variable lower limit u min For [10 -2 ,10 -2 ,10 -2 ,10 -2 ]; In the least squares support vector machine, the main setting algorithm type is regression prediction type, and the kernel function is radial basis function;
[0084] The position Q of the humpback whale in the whale algorithm is expressed by the following formula:
[0085]
[0086] where q n,dim represents the value of the nth row and dimth column in Q; according to the parameters set in step (2-3), the first random population position Q1 of the whale is calculated according to the following formula, and the number of iterations t is set to 1;
[0087] Q1(i,j)=rand(i,j)×[u max (i)-umin (i)]+u min (i)
[0088] Q1(i,j) represents the value of the i-th row and j-th column in Q1, u max (i) and u min (i) is the upper and lower limits of the i-th humpback whale, and rand(i,j) is a random number in the interval [0,1].
[0089] (2-4) Calculate the fitness value: Take the mean square error (RMS) of the predicted value of the LSSVM model as the fitness value, and obtain the optimal fitness value and position of the individuals in the current whale population.
[0090] Replace the regularization parameter γ and kernel function width parameter σ of the LSSVM model with the whale's positions Q(i,1) and Q(i,2) 2 , the mean square error MSE of the predicted value of the LSSVM model is used as the fitness value through the following formula to obtain the optimal fitness value Leader_score and position Leader_pos of the current whale population individual;
[0091]
[0092] In the formula, y pred and true represents the predicted value and the experimental value, and N is the data sample point; in addition, the optimization problem is expressed as shown in the following formula:
[0093] minf(γ,σ 2 )=min(MSE).
[0094] (2-5) Surrounding prey: In the whale optimization algorithm, humpback whales identify the location of prey and surround it, setting the optimal position as the target prey, and the remaining individuals in the population update their own positions towards the optimal position.
[0095] The mathematical model used in the encirclement stage is:
[0096]
[0097]
[0098] in, represents the distance between the humpback whale and the target position, t is the current iteration number, and is the coefficient vector, is the position vector of the current optimal solution, is the current position vector of the humpback whale, Represents the position vector after the next iteration and should be updated immediately if a better feasible solution is available is a random vector in the interval [0,2], used to adjust the optimal individual Distance to current individual The degree of distance, when The influence becomes stronger when When the impact is reduced;
[0099] and The mathematical model is:
[0100]
[0101]
[0102] in, and is a random variable in the interval [0,1], is a linear function, t is the current number of iterations, MaxIter is the maximum number of iterations, and as t increases, will decrease linearly from 2 to 0, as shown in the following equation:
[0103]
[0104] (2-6) Bubble attack: When hunting, humpback whales approach their prey in a spiral motion while gradually tightening the encirclement.
[0105] Assuming that the probability of the shrinking and encircling mechanism and the spiral model behavior is 50%, the mathematical model for the two behaviors to occur simultaneously is:
[0106]
[0107] Among them, ψ is a constant, l is a random number between [-1,1], and p is a random number between [0,1].
[0108] (2-7) Searching for prey: After the two stages of encirclement predation and bubble attack, humpback whales randomly search for prey within the encirclement.
[0109] The mathematical model for searching for prey is:
[0110]
[0111]
[0112] in is the position vector randomly selected from the individual; in the prey search phase, when When , the current whale individual performs the global optimal solution search; when When the time comes, the current whale individual searches towards the reference whale and conducts a local optimal solution search.
[0113] (2 - 8) Crossover and mutation operations: Whale individuals are prone to falling into local optima during the prey search phase. Therefore, the crossover factor and mutation factor in the genetic algorithm are introduced to enable the whale optimization algorithm to obtain the global optimal solution.
[0114] The crossover and mutation operations are shown as follows:
[0115]
[0116] Among them, the intermediate quantity and are the crossover and mutation operators respectively.
[0117] (2 - 9) Determine whether the end condition of the loop iteration is satisfied: When the loop iteration condition is not satisfied, that is, when t < MaxIter, return to step (2 - 4); when the loop iteration condition is satisfied, that is, when t ≥ MaxIter, end the loop and return the optimal fitness value Leader_score and its position Leader_pos of the whale population individuals, so as to obtain the optimal regularization parameter and kernel function width of the least squares support vector machine LSSVM.
[0118] Step three: Construct an obstacle size prediction model based on the genetic algorithm, whale optimization algorithm, and least squares support vector machine, with the obstacle pixel size and the distance from the obstacle to the camera as input parameters and the actual size of the obstacle as the output parameter.
[0119] The specific process is as follows:
[0120] (3 - 1) Input the test data and perform normalization processing;
[0121] (3 - 2) Set the optimal position of the whale individual, that is, the optimal regularization parameter and kernel function width, into the LSSVM model, initialize and train the LSSVM model;
[0122] (3 - 3) Use the trained LSSVM model for prediction, obtain the output data, perform denormalization on the output data to get the actual data, and finally conduct error analysis.
[0123] Table 1 gives an example of an obstacle size prediction method that fuses image information and improved LSSVM, by comparing the performance of five models: GA - WOA - LSSVM, WOA - LSSVM, PSO - LSSVM, LSSVM, and BP. According to the data in Table 1, the GA - WOA - LSSVM model has the best performance, and its Pearson correlation coefficient (R 2) is 0.995, the root mean square error (RMSE) is 0.496, and the mean absolute percentage error (MAPE) is 2.7%; followed by the WOA-LSSVM model, whose R 2 The lowest is the BP model, whose R 2 The correlation between the predicted value and the experimental value of the GA-WOA-LSSVM model reached 99.5%, the deviation between the predicted value and the experimental value was only 0.496cm, and the average absolute percentage error was only 2.7%. These data show that the performance indicators of the GA-WOA-LSSVM model are significantly better than the other four. It shows that the GA-WOA-LSSVM model has ideal prediction accuracy. It can meet the actual needs of engineering and provide a new solution for the popularization and engineering application of mobile robots.
[0124] Table 1
[0125]
[0126] According to the disclosure and description of the above specification, those skilled in the art to which the present invention belongs may also make changes and modifications to the above embodiments. Therefore, the present invention is not limited to the specific embodiments disclosed and described above, and some modifications and changes to the invention should also fall within the scope of protection of the claims of the present invention. In addition, although some specific terms are used in this specification, these terms are only for the convenience of description and do not constitute any limitation to the invention.
Claims
1. An obstacle size prediction method integrating image information and improved LSSVM, characterized in that: The following steps are involved: Step 1: Build an obstacle image information acquisition platform and use machine vision algorithms to obtain obstacle pixel size information; In step 1, the specific process of using the machine vision algorithm to obtain the obstacle pixel size information is as follows: (1-1) Image preprocessing: Obtain the original image of the obstacle through the camera, use affine transformation to correct the translation and rotation angle of the original image, and correct the angle deviation in the camera shooting process; create an ROI in the obstacle area in the image, cut out the part of interest for processing, perform median filtering on the ROI area, use the gradient descent method to enhance the boundary contour, and obtain a three-channel color image; (1-2) Image segmentation: The obtained three-channel color image is converted into three single-channel grayscale images, and the three single-channel images are converted from the RGB space to the HSV space to obtain grayscale images with obvious contrast. The image in the saturation-image space is segmented according to the amplitude of the pixel grayscale, and then binarized to segment the target from the image; (1-3) Image morphological processing: Use the opening and closing operations in morphology to process the noise, holes and gaps in the segmented target image and optimize the target area; (1-4) Edge detection: The Sobel operator is used to detect the edge of the target area by taking advantage of the phenomenon that the extreme value is reached at the edge point, and finally the obstacle contour is fitted; (1-5) Obtain the pixel size of the obstacle; Step 2: Use genetic algorithm combined with whale optimization algorithm to optimize the regularization parameter and kernel function width of the least squares support vector machine; The specific process of step 2 is: (2-1) Determine the input and output parameters of the least squares support vector machine (LSSVM) model: the maximum pixel width w, the maximum pixel height h of the obstacle, and the distance L from the obstacle to the camera are used as the input parameters of the LSSVM model, and the maximum actual width W and the maximum actual height H of the obstacle are used as the output parameters of the LSSVM model; (2-2) Data normalization: Normalize the input and output data so that the data range of each indicator is between [-1, 1]; (2-3) Set parameters and initialize them; the parameters set include the crossover probability P of the genetic algorithm GA c and mutation probability P m , the number of variables dim, the maximum number of iterations MaxIter, the number of whale populations n, and the upper limit of variables u of the whale optimization algorithm WOA max and variable lower limit u min , in the least squares support vector machine, set the algorithm type to regression prediction type and the kernel function to radial basis function; The position Q of the humpback whale in the whale algorithm is expressed by the following formula: where q n,dim represents the value of the nth row and dimth column in Q; according to the parameters set in step (2-3), the first random population position Q1 of the whale is calculated according to the following formula, and the number of iterations t is set to 1; Q1(i,j)=rand(i,j)×[u max (i)-u min (i)]+u min (i) Q1(i,j) represents the value of the i-th row and j-th column in Q1, u max (i) and u min (i) is the upper and lower limits of the i-th humpback whale, and rand(i,j) is a random number in the interval [0,1]; (2-4) Calculate the fitness value: Take the mean square error RMS of the predicted value of the LSSVM model as the fitness value, and obtain the optimal fitness value and position of the individual in the current whale population; (2-5) Surrounding prey: In the whale optimization algorithm, humpback whales identify the location of prey and surround it, setting the best position as the target prey, and the remaining individuals in the population update their own positions towards the best position; (2-6) Bubble attack: When hunting, humpback whales approach their prey in a spiral motion while gradually tightening the encirclement. (2-7) Searching for prey: After the two stages of encirclement predation and bubble attack, humpback whales randomly search for prey within the encirclement; (2-8) Crossover and mutation operations: Whale individuals are prone to fall into local optimality when searching for prey. Therefore, the crossover factor and mutation factor in the genetic algorithm are introduced to enable the whale optimization algorithm to obtain the global optimal solution. In the step (2-8), the crossover and mutation operations are shown as follows: Among them, the intermediate and are the crossover and mutation operators, respectively; (2-9) Determine whether the end condition of the loop iteration is met: when the loop iteration condition is not met, that is, t<MaxIter, return to step (2-4); when the loop iteration condition is met, that is, t≥MaxIter, end the loop and return the optimal fitness value Leader_score and position Leader_pos of the individual of the whale population, thereby obtaining the optimal regularization parameter and kernel function width of the least squares support vector machine LSSVM; Step 3: Using the obstacle pixel size and the distance from the obstacle to the camera as input parameters and the actual size of the obstacle as output parameter, an obstacle size prediction model based on genetic algorithm, whale optimization algorithm and least squares support vector machine is constructed; Step 4: Input the obstacle pixel size into the obstacle size prediction model to obtain the actual size of the obstacle.
2. The obstacle size prediction method based on fusion of image information and improved LSSVM according to claim 1, characterized in that: In the step 1, the obstacle image information acquisition platform includes a camera for collecting surrounding environment information, a distance sensor for collecting the distance from the obstacle to the camera, and a computer for control, and the camera and the distance sensor are connected to the computer respectively.
3. The obstacle size prediction method based on fusion of image information and improved LSSVM according to claim 1, characterized in that: In the steps (2-4), the whale positions Q(i,1) and Q(i,2) are substituted for the regularization parameter γ and kernel function width parameter σ of the LSSVM model. 2 , the mean square error MSE of the predicted value of the LSSVM model is used as the fitness value through the following formula to obtain the optimal fitness value Leader_score and position Leader_pos of the current whale population individual; In the formula, y pred and true represents the predicted value and experimental value, and N is the data sample point; in addition, the optimization problem is expressed as shown in the following formula: min f(γ,σ 2 )=min(MSE).
4. The obstacle size prediction method based on fusion of image information and improved LSSVM according to claim 3 is characterized in that: In the step (2-5), the mathematical model used in the stage of surrounding the prey is: in, represents the distance between the humpback whale and the target position, t is the current iteration number, and is the coefficient vector, is the position vector of the current optimal solution, is the current position vector of the humpback whale, Represents the position vector after the next iteration and should be updated immediately if a better feasible solution is available is a random vector in the interval [0,2], used to adjust the optimal individual Distance to current individual The degree of distance, when The influence becomes stronger when When the impact is reduced; and The mathematical model is: in, and is a random variable in the interval [0,1], is a linear function, t is the current number of iterations, MaxIter is the maximum number of iterations, and as t increases, will decrease linearly from 2 to 0, as shown in the following equation:
5. The obstacle size prediction method based on fusion of image information and improved LSSVM according to claim 4 is characterized in that: In the step (2-6), assuming that the probability of the occurrence of the shrinking and encircling mechanism and the spiral model behavior is 50%, the mathematical model of the two behaviors occurring simultaneously is: Among them, ψ is a constant, l is a random number between [-1,1], and p is a random number between [0,1].
6. The obstacle size prediction method based on fusion of image information and improved LSSVM according to claim 5, characterized in that: In the steps (2-7), the mathematical model for searching prey is: in is the position vector randomly selected from the individual; in the prey search phase, when When , the current whale individual performs the global optimal solution search; when When , the current whale individual searches towards the reference whale to search for the local optimal solution.
7. The obstacle size prediction method based on fusion of image information and improved LSSVM according to claim 1, characterized in that: The specific process of step three is: (3-1) Input test data and perform normalization; (3-2) Setting the optimal position of the individual whale, i.e. the optimal regularization parameter and kernel function width, into the LSSVM model, initializing and training the LSSVM model; (3-3) Use the trained LSSVM model to make predictions, obtain output data, denormalize the output data, obtain actual data, and finally perform error analysis.
