Control method and system for camping vehicle driving
By obtaining the view of the camping venue, image division and the collection of drone areas, determine the slope and road attributes of camping vehicles, solve the problem of insufficient planning of the Lu operating routes in large camping venues, and realize the safe driving of camping vehicles. Essence
Patent Information
- Application Number
- CN202411557775.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-11-04
AI Technical Summary
In large camping sites, if the driving route of camping vehicles is not planned in advance, driving accidents may occur.
By obtaining the upper view of the camping venue, the image division and the use of the drone area are performed to determine the slope and road attributes of the division parts to form and adjust the planning route to control the safe driving of camping cars.
The efficiency of route planning is improved, the driving safety of camping vehicles is ensured, and the risk of driving accidents is reduced.
Smart Images

Figure CN119067282B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to data processing technology, and in particular to a control method and system for camping vehicle driving. Background Art
[0002] In recent years, the popularity of camping activities has continued to rise and gradually entered the lives of the general public. More and more people choose to camp in their leisure time to get close to nature and experience outdoor life.
[0003] The inventor discovered during research that when a camping site is too large, tourists will take a camping vehicle to reach the camping location. Failure to plan the route of the camping vehicle in advance may result in a traffic accident involving the camping vehicle in the camping site. Summary of the invention
[0004] Based on the above problems, the present invention is proposed to provide a control method and system for camper driving that overcomes the above problems or at least partially solves the above problems.
[0005] According to one aspect of the present invention, there is provided a control method for driving a camper, comprising the following steps:
[0006] Acquire a top view corresponding to the camping site, and perform array-based image segmentation on the top view to obtain segmented parts;
[0007] Controlling the drone to perform regional acquisition for each divided part during level flight based on a preset altitude, and determining the slope attribute of each divided part based on the elevation of each area acquired by the regional acquisition, wherein the slope attribute includes a flat slope attribute, an uphill attribute, and a downhill attribute;
[0008] Performing image recognition on the top view, and determining the road surface attributes of each divided part based on the recognition result, wherein the road surface attributes include river attributes, grassland attributes, and road attributes;
[0009] In response to receiving a route planning request sent by a user terminal, sending the upper view to the user terminal, and acquiring a driving start position and a driving camping position determined by the user terminal based on the upper view;
[0010] Determine two divided parts corresponding to the driving starting position and the driving camping position as a starting part and a terminating part, and form a planned route connecting the starting part and the terminating part based on the top view;
[0011] The planned route is adjusted based on the slope attributes and the road surface attributes of each divided portion of the planned route, and the camping vehicle is controlled to reach the terminal portion based on the obtained updated planned route.
[0012] Optionally, in the method according to the present invention, a top view corresponding to the camping site is obtained, and the top view is divided into image parts based on an array form to obtain the divided parts, including:
[0013] Acquire a center point of the camping site corresponding to the camping site, and control the drone to fly to the center point of the camping site to photograph the camping site, so as to obtain a rectangular captured image surrounding the camping site;
[0014] Performing image recognition on the rectangular captured image to obtain each image pixel constituting the rectangular captured image, and performing a difference calculation between each image pixel and a reference pixel of a corresponding site fence to obtain each pixel difference;
[0015] Determine each image pixel point whose corresponding pixel difference is within a preset difference interval as a to-be-determined set, and perform pixel connection between adjacent positions based on each image pixel point in the to-be-determined set to obtain each pixel connection segment;
[0016] Performing pixel connection on the first pixel endpoint and the second pixel endpoint corresponding to the same pixel connection segment respectively, and determining the pixel connection segments forming the ring structure after the pixel connection as the ring connection segments respectively;
[0017] Determine whether there is an encircling relationship between the circular connection segments based on a preset overlap determination strategy, and circularly merge the corresponding circular connection segments that have an encircling relationship to obtain updated circular connection segments;
[0018] Comparing the areas of the circular connecting segments respectively, and determining the circular connecting segment with the largest area as the site outline corresponding to the camping site;
[0019] The rectangular captured image is cut based on the site outline to obtain a top view corresponding to the camping site, and the top view is divided into image parts based on an array form to obtain divided parts.
[0020] Optionally, in the method according to the present invention, determining whether there is an encircling relationship between the circular connection segments based on a preset overlap determination strategy, and merging the corresponding circular connection segments with the encircling relationship in a circular manner to obtain updated circular connection segments includes:
[0021] Coordinate processing is performed on the rectangular acquisition image, and based on the obtained image coordinate system, each circular coordinate point located in the same circular connection segment is obtained, and each circular coordinate point is formed into a circular coordinate group corresponding to the circular connection segment, so as to obtain each circular coordinate group corresponding to each circular connection segment;
[0022] Compare each of the circular coordinate groups with each other, and determine whether there is an enclosing relationship between the circular coordinate groups based on the comparison results;
[0023] The circular coordinate groups having an enclosing relationship are merged into the same circular connection segment, and the circular coordinate groups located in the rectangular acquisition image are determined.
[0024] Optionally, in the method according to the present invention, the upper view is divided into images in an array form to obtain the divided parts, including:
[0025] Generating vertical dividing lines corresponding to the same horizontal spacing and generating horizontal dividing lines corresponding to the same vertical spacing for the top view respectively, to obtain the divided parts;
[0026] Determine each divided part located at the edge position of the upper view and determine it as a set to be merged;
[0027] Determine a reference area corresponding to the divided part based on the horizontal spacing and the vertical spacing, and determine the area of each divided part in the to-be-merged set to obtain each divided area corresponding to each divided part;
[0028] Determine the ratio of each divided area to the reference area to obtain the ratio of each area;
[0029] Each divided part whose corresponding area ratio is smaller than a preset ratio is merged with the divided parts located outside the to-be-merged set and in adjacent positions to obtain updated divided parts.
[0030] Optionally, in the method according to the present invention, the drone is controlled to perform regional acquisition on each divided part during level flight based on a preset altitude, and the slope attribute of each divided part is determined based on the elevation of each area acquired by the regional acquisition, wherein the slope attribute includes a flat slope attribute, an uphill attribute and a downhill attribute, including:
[0031] Corresponding array points are formed in each divided part, and the UAV is controlled to perform regional acquisition of each array point located in the same divided part during level flight based on a preset altitude, so as to obtain the elevation of each point corresponding to each array point;
[0032] The elevation difference of each point corresponding to each array point at adjacent positions is calculated to obtain the difference of each point;
[0033] Point groups are performed on the array points located at adjacent positions based on the point differences corresponding to the same divided part, to obtain at least one of a flat slope point group corresponding to a continuous flat slope trend, an uphill point group corresponding to a continuous uphill trend, and a downhill point group corresponding to a continuous downhill trend;
[0034] When any divided part includes only one point group, determining the slope attribute corresponding to the divided part based on the trend corresponding to the point group;
[0035] When any divided part includes two or more point groups, the slope attribute corresponding to the divided part is determined based on a preset multi-trend processing strategy.
[0036] Optionally, in the method according to the present invention, when any divided part includes more than or equal to two point groups, determining the slope attribute corresponding to the divided part based on a preset multi-trend processing strategy includes:
[0037] When any divided part includes more than or equal to two point groups, determine the number of each point of the array points included in each point group, and determine the ratio based on the number of each point to obtain the point ratio corresponding to each point group;
[0038] When the ratio of any point is greater than a first preset ratio, determining a slope attribute corresponding to the divided portion based on a trend corresponding to the ratio of the point;
[0039] When any point ratio is less than a second preset ratio, determining the slope attribute corresponding to the divided part based on the trends respectively corresponding to the remaining other point ratios;
[0040] When all point ratios are between the second preset ratio and the first preset ratio, the slope attributes corresponding to the divided parts are determined based on the trends respectively corresponding to all point ratios.
[0041] Optionally, in the method according to the present invention, image recognition is performed on the top view, and road surface attributes of each divided portion are determined based on the recognition result, wherein the road surface attributes include river attributes, grassland attributes and road attributes, including:
[0042] Retrieving a river channel pixel value corresponding to a river channel attribute, a grassland pixel value corresponding to a grassland attribute, and a road pixel value corresponding to a road attribute, and determining the river channel pixel value, the grassland pixel value, and the road pixel value as pixel reference values;
[0043] Acquire each image pixel point constituting the upper view, and determine all other image pixel points except those corresponding to the pixel connection segment among the image pixel points as a pixel identification set;
[0044] Performing pixel comparison between each image pixel point in the pixel identification set and a pixel reference value, and grouping each image pixel point based on the comparison result to obtain a river channel pixel group corresponding to the river channel attribute, a grassland pixel group corresponding to the grassland attribute, and a road pixel group corresponding to the road attribute;
[0045] Connecting pixels at adjacent positions of the image pixels respectively included in the river pixel group, the grassland pixel group and the road pixel group to obtain a river pixel area corresponding to the river pixel group, a grassland pixel area corresponding to the grassland pixel group and a road pixel area corresponding to the road pixel group;
[0046] Determine whether there is a pixel area corresponding to other road surface attributes in the pixel area corresponding to any road surface attribute, and if so, obtain the number of pixels in the pixel area corresponding to other road surface attributes;
[0047] When the number of pixels is less than or equal to a preset number, converting the pixel area corresponding to other road surface attributes to have the same road surface attribute as the pixel area corresponding to any road surface attribute;
[0048] The divided parts respectively included in the different pixel areas are determined, and the corresponding road surface attributes are determined for the divided parts corresponding to the same pixel area.
[0049] Optionally, in the method according to the present invention, in response to receiving a route planning request sent by a user terminal, sending the upper view to the user terminal, and obtaining a driving starting position and a driving camping position determined by the user terminal based on the upper view, comprises:
[0050] Determine an endpoint connection line connecting the first pixel endpoint and the second pixel endpoint corresponding to the pixel connection segment corresponding to the site outline as a campsite entry and exit line segment, and mark each divided part corresponding to different road attributes with different colors in the top view;
[0051] Determine each divided portion corresponding to the campsite entry and exit line segment in the upper view as a driving start set, determine all remaining divided portions as a driving camping set, and configure the upper view with a first interactive interface and a second interactive interface based on the driving start set and the driving camping set respectively;
[0052] In response to receiving a route planning request sent by a user terminal, sending the top view to the user terminal, and providing a first interactive interface to the user terminal for display;
[0053] In response to the user terminal performing a first interaction on the first interaction interface, determining a driving start position based on the first interaction, and providing a second interaction interface to the user terminal for display;
[0054] In response to the user terminal performing a second interaction on the second interaction interface, a driving camping location is determined based on the second interaction.
[0055] Optionally, in the method according to the present invention, adjusting the planned route based on the slope attribute and the road surface attribute of each divided portion of the planned route includes:
[0056] If the road surface attribute of any segment of the planned route is the river attribute, the segment and other segments having the same road surface attribute as the segment and arranged continuously in the planned route are determined as a road surface exclusion set;
[0057] In the planned route, two divided parts located at both ends of the road surface exclusion set are respectively determined as a first adjacent part and a second adjacent part;
[0058] Acquire a river channel pixel region including the road surface exclusion set, and divide a region contour corresponding to the river channel pixel region into a first contour segment and a second contour segment based on the first adjacent portion and the second adjacent portion;
[0059] The segment lengths of the first contour segment and the second contour segment are respectively obtained, and the road surface exclusion set is replaced based on the contour segment with the smallest corresponding segment length to obtain a planned route updated based on the road surface attribute;
[0060] If the road surface attribute of any divided portion of the planned route after the route is updated based on the road surface attribute is an uphill attribute or a downhill attribute, determine the slope angle corresponding to the divided portion, and judge whether the slope angle is within the preset first angle interval or the preset second angle interval;
[0061] When the slope angle is within any angle interval, the divided portion and other divided portions having the same slope angle as the divided portion and being arranged continuously in the planned route are determined as a slope exclusion set;
[0062] In the planned route, two divided parts located at both ends of the slope exclusion set are respectively determined as the third adjacent part and the fourth adjacent part, and the divided parts located on both sides of the planned route, which are continuously arranged with the third adjacent part and the fourth adjacent part and whose corresponding slope angles are outside the preset first angle interval and the preset second angle interval, are determined as the first slope set and the second slope set;
[0063] Connecting each of the divided parts in the first slope set with each of the divided parts in the second slope set in pairs to obtain each divided line;
[0064] Determine each divided part passing through each divided line respectively, and determine all the divided lines whose slope angles corresponding to all the divided parts are outside the preset first angle interval and the preset second angle area as a slope line set;
[0065] Determine the line segment distance between each division line in the slope line set and the planned route, and determine the division line with the smallest corresponding line segment distance as the middle replacement line;
[0066] Connecting two divided parts located at both ends of the middle replacement line with the third adjacent part and the fourth adjacent part respectively to obtain a first edge replacement line and a second edge replacement line;
[0067] The slope exclusion set is replaced based on the first edge replacement link, the middle replacement link, and the second edge replacement link to obtain a planned route that is updated based on the slope attribute.
[0068] Optionally, in the method according to the present invention, the method further comprises:
[0069] Determine each channel pixel area corresponding to the channel attribute in the upper view, and obtain each area outline corresponding to each channel pixel area;
[0070] Determine each contour coordinate point corresponding to the contour of the same area based on the image coordinate system, and adjust the coordinates of each contour coordinate point based on the preset fence generation coefficient to obtain each fence coordinate point constituting the river fence;
[0071] Connecting the coordinates of adjacent positions of each fence coordinate point to obtain each regional fence surrounding each of the river channel pixel areas;
[0072] Acquire the driving track of the camper in real time, and compare the position of the obtained driving track with the fences of each area;
[0073] When the driving track overlaps with the regional fence, the camping vehicle is controlled to brake.
[0074] According to another aspect of the present invention, there is provided a control system for driving a camper, comprising:
[0075] An image division module is configured to obtain a top view corresponding to the camping site, and perform array-based image division on the top view to obtain divided parts;
[0076] The area acquisition module is configured to control the UAV to perform area acquisition on each divided part respectively during the level flight based on the preset altitude, and determine the slope attribute of each divided part based on the elevation of each area obtained by the area acquisition, wherein the slope attribute includes a flat slope attribute, an uphill attribute, and a downhill attribute;
[0077] an image recognition module, configured to perform image recognition on the top view, and determine the road surface attributes of each divided part based on the recognition result, wherein the road surface attributes include river attributes, grass attributes and road attributes;
[0078] a planning request module, configured to, in response to receiving a route planning request sent by a user terminal, send the upper view to the user terminal, and obtain a driving start position and a driving camping position determined by the user terminal based on the upper view;
[0079] a route planning module, configured to determine two divided parts corresponding to the driving starting position and the driving camping position as a starting part and a terminating part, and form a planned route connecting the starting part and the terminating part based on the top view;
[0080] The route adjustment module is configured to adjust the planned route based on the slope attributes and road surface attributes of each divided part of the planned route, and control the camping vehicle to reach the terminal part based on the obtained updated planned route.
[0081] According to the solution of the present invention, the server first obtains the upper view corresponding to the camping site, and then divides the upper view into images, thereby obtaining each divided part, so as to facilitate the subsequent server to plan the driving route of the camping vehicle in more detail. Then, the server controls the drone to perform regional acquisition on each divided part during the level flight at a preset height, thereby obtaining the regional elevation of each divided part. At this time, the server can determine the slope attribute of each divided part according to the elevation of each area. Then, the server performs image recognition on the upper view of the camping site, and then determines the road surface attribute of each divided part according to the recognition result. And when the server receives the route planning request sent by the user end, it will send the upper view of the camping site to the user end, and obtain the driving starting position and driving camping position determined by the user end, and then respectively determine the two divided parts corresponding to the driving starting position and the driving camping position as the starting part and the ending part, and form a planned route according to the upper view. Since there may be divided parts that are not convenient for camping vehicles to drive in the current planned route, the server will adjust the planned route according to the slope attribute and road surface attribute of each divided part of the planned route. Then, the server will control the camping vehicle to reach the end portion according to the updated planned route. The present invention can improve the efficiency of route planning, so that the final planned route can ensure the driving safety of the camping vehicle, and has certain feasibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] Figure 1 A flow chart showing a control method for camping vehicle driving according to an embodiment of the present invention is shown;
[0083] Figure 2 A schematic diagram of generating campsite entry and exit line segments according to an embodiment of the present invention is shown;
[0084] Figure 3 A schematic diagram showing generation of a first contour segment and a second contour segment according to an embodiment of the present invention is shown;
[0085] Figure 4 A structural block diagram of a control system applied to camping vehicle driving according to another embodiment of the present invention is shown. DETAILED DESCRIPTION
[0086] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0087] In recent years, the popularity of camping activities has continued to rise and gradually entered the lives of the general public. More and more people choose to camp in their leisure time to get close to nature and experience outdoor life.
[0088] The inventor discovered during research that when a camping site is too large, tourists will take a camping vehicle to reach the camping location. Failure to plan the route of the camping vehicle in advance may result in a traffic accident involving the camping vehicle in the camping site.
[0089] To solve the problems existing in the above-mentioned prior art, the inventor proposes the solution of the present invention. One embodiment of the present invention provides a control method for driving a camper, which can be executed in a computing device, wherein the computing device can be understood as a terminal with data processing function, such as a mobile phone or a computer.
[0090] Figure 1 FIG. 1 is a flow chart showing a control method for camping vehicle driving according to an embodiment of the present invention. Figure 1 As shown, the control method for camping vehicle driving proposed in this embodiment starts at step S102. In step S102, the following contents are included:
[0091] A top view corresponding to the camping site is obtained, and the top view is divided into image parts based on an array form to obtain divided parts.
[0092] For example, in this embodiment, the server first obtains the top view corresponding to the camping site, and then divides the top view into array-based image segments to obtain rectangles, i.e., divided parts, so that the server can subsequently plan the driving route of the camper in more detail.
[0093] Furthermore, the above-mentioned “obtaining a top view corresponding to the camping site, and performing array-based image division on the top view to obtain divided parts” further includes the following steps:
[0094] Acquire a center point of the camping site corresponding to the camping site, and control the drone to fly to the center point of the camping site to photograph the camping site, so as to obtain a rectangular captured image surrounding the camping site;
[0095] Performing image recognition on the rectangular captured image to obtain each image pixel constituting the rectangular captured image, and performing a difference calculation between each image pixel and a reference pixel of a corresponding site fence to obtain each pixel difference;
[0096] Determine each image pixel point whose corresponding pixel difference is within a preset difference interval as a to-be-determined set, and perform pixel connection between adjacent positions based on each image pixel point in the to-be-determined set to obtain each pixel connection segment;
[0097] Performing pixel connection on the first pixel endpoint and the second pixel endpoint corresponding to the same pixel connection segment respectively, and determining the pixel connection segments forming the ring structure after the pixel connection as the ring connection segments respectively;
[0098] Determine whether there is an encircling relationship between the circular connection segments based on a preset overlap determination strategy, and circularly merge the corresponding circular connection segments that have an encircling relationship to obtain updated circular connection segments;
[0099] Comparing the areas of the circular connecting segments respectively, and determining the circular connecting segment with the largest area as the site outline corresponding to the camping site;
[0100] The rectangular captured image is cut based on the site outline to obtain a top view corresponding to the camping site, and the top view is divided into image parts based on an array form to obtain divided parts.
[0101] For example, in this embodiment, the server will first obtain the center point of the camping site, and control the drone to fly to the center point of the site to take pictures of the camping site. Since the images captured by the drone are all rectangular, the server can obtain a rectangular image surrounding the camping site.
[0102] Then, the server will perform image recognition on the obtained rectangular captured image to obtain the individual image pixels that make up the rectangular captured image. Since there is a wall, i.e., a site fence, set up outside the camping site, and usually the color of the site fence is different from the color of the river, grassland and other areas, the server can determine the site outline of the camping site by the pixel value of the image pixel.
[0103] First, the server will calculate the difference of the corresponding pixel values between each image pixel and the reference pixel of the corresponding site fence, thereby obtaining each pixel difference. A preset difference interval is preset in the server. When the pixel difference is within the preset difference interval, it means that the image pixel is relatively close to the reference pixel, that is, the image pixel can be determined as an image pixel constituting the site fence. Therefore, the server will determine each image pixel whose corresponding pixel difference is within the preset difference interval as a to-be-determined set, and then connect the pixels between adjacent positions of each image pixel in the to-be-determined set, thereby obtaining each pixel connection segment. It can be understood that when there is an entrance and exit to the camping site, the color of the entrance and exit is also different from the color of the site fence, so the server will obtain an open pixel connection segment.
[0104] After obtaining each pixel connection segment, the server will connect the two endpoints corresponding to the same pixel connection segment, that is, connect the first pixel endpoint and the second pixel endpoint of the pixel connection segment by pixels, thereby forming each pixel connection segment of the ring structure. Then, the server will determine each pixel connection segment of the ring structure as each ring connection segment.
[0105] Since the wall of the public toilet in the camping site may be the same color as the site fence, corresponding circular connection segments will be formed, resulting in circular connection segments with an encirclement relationship. Therefore, the server will determine whether there is an encirclement relationship between the circular connection segments based on a preset overlap determination strategy, and merge the circular connection segments with an encirclement relationship into circles to obtain updated circular connection segments.
[0106] Since there may be facilities such as power towers in the ancillary areas outside the camping site, in order to ensure the safety of pedestrians and prevent pedestrians from close contact with the facilities, corresponding fences will be set up around these facilities, and the color of the fence may be the same as the color of the site fence, so corresponding circular connection segments will be formed. In order to determine which circular connection segment corresponds to the site outline of the camping site, the server will compare the areas of all circular connection segments. Since the area of facilities such as power towers must be smaller than that of the camping site, the server will determine the circular connection segment with the largest area as the site outline of the corresponding camping site.
[0107] Next, the server will perform image segmentation on the rectangular captured image according to the site outline to obtain a top view corresponding to the camping site, and then perform array-based image segmentation on the top view to obtain various segmented parts.
[0108] Furthermore, the above-mentioned “determining whether there is an encircling relationship between the circular connection segments based on a preset overlap determination strategy, and merging the corresponding circular connection segments with an encircling relationship in a circular shape to obtain updated circular connection segments” also includes the following steps:
[0109] Coordinate processing is performed on the rectangular acquisition image, and based on the obtained image coordinate system, each circular coordinate point located in the same circular connection segment is obtained, and each circular coordinate point is formed into a circular coordinate group corresponding to the circular connection segment, so as to obtain each circular coordinate group corresponding to each circular connection segment;
[0110] Compare each of the circular coordinate groups with each other, and determine whether there is an enclosing relationship between the circular coordinate groups based on the comparison results;
[0111] The circular coordinate groups having an enclosing relationship are merged into the same circular connection segment, and the circular coordinate groups located in the rectangular acquisition image are determined.
[0112] For example, in this embodiment, the server will first coordinate the rectangular captured image, thereby obtaining each circular coordinate point located in the same circular connection segment according to the obtained image coordinate system, and then organize each circular coordinate point into a circular coordinate group corresponding to the circular connection segment, thereby obtaining each circular coordinate group corresponding to each circular connection segment.
[0113] Next, the server will compare all the circular coordinate groups with each other, and determine whether there is an enclosing relationship between the circular coordinate groups based on the comparison results, and then merge the circular coordinate groups with an enclosing relationship into the same circular connection segment, thereby determining the circular coordinate groups located in the rectangular acquisition image.
[0114] This embodiment can determine whether there is an enclosing relationship between the circular connection segments according to whether there is an enclosing relationship between the circular coordinate groups, and has a certain degree of accuracy.
[0115] Furthermore, the above-mentioned “dividing the top view into image segments in array form to obtain divided parts” further includes the following steps:
[0116] Generating vertical dividing lines corresponding to the same horizontal spacing and generating horizontal dividing lines corresponding to the same vertical spacing for the top view respectively, to obtain the divided parts;
[0117] Determine each divided part located at the edge position of the upper view and determine it as a set to be merged;
[0118] Determine a reference area corresponding to the divided part based on the horizontal spacing and the vertical spacing, and determine the area of each divided part in the to-be-merged set to obtain each divided area corresponding to each divided part;
[0119] Determine the ratio of each divided area to the reference area to obtain the ratio of each area;
[0120] Each divided part whose corresponding area ratio is smaller than a preset ratio is merged with the divided parts located outside the to-be-merged set and in adjacent positions to obtain updated divided parts.
[0121] For example, in this embodiment, the server generates vertical dividing lines with the same horizontal spacing and horizontal dividing lines with the same vertical spacing in the upper view, thereby obtaining each divided part. Since the area of the divided part at the edge of the upper view may be small, the server determines each divided part at the edge of the upper view as a set to be merged, and determines the maximum area of the divided part according to the horizontal spacing and the vertical spacing, that is, the reference area, and then determines the area of each divided part in the set to be merged, thereby obtaining each divided area corresponding to each divided part.
[0122] Next, the server will determine the ratio of each divided area to the reference area, thereby obtaining each area ratio. A preset ratio is set in advance in the server. When the area ratio is greater than or equal to the preset ratio, it means that the area of the divided part corresponding to the area ratio is not small, so the server does not need to merge the divided part with other divided parts; when the area ratio is less than the preset ratio, it means that the area of the divided part corresponding to the area ratio is too small, so the server will merge the divided part whose corresponding area ratio is less than the preset ratio with the divided part located outside the set to be merged and in an adjacent position, thereby obtaining each updated divided part.
[0123] This embodiment can merge the divided parts with too small area ratio with other divided parts by determining the area ratio of the divided area to the reference area, thereby reducing the amount of data processing by the subsequent server.
[0124] In step S104, the following contents are included:
[0125] The drone is controlled to perform regional collection on each divided part during level flight based on a preset altitude, and the slope attribute of each divided part is determined based on the elevation of each area obtained by the regional collection, wherein the slope attribute includes a flat slope attribute, an uphill attribute, and a downhill attribute.
[0126] For example, in this embodiment, the server controls the drone to perform regional collection on each divided part during the level flight at a preset height, thereby obtaining the elevation of each area of each divided part according to the regional collection. At this time, the server can determine the slope attribute of each divided part according to the elevation of each area, and the slope attribute includes an uphill attribute and a downhill attribute, and also includes a flat slope attribute with a relatively gentle slope or no slope.
[0127] Furthermore, the above-mentioned “controlling the drone to perform regional collection for each divided part during level flight based on a preset altitude, and determining the slope attribute of each divided part based on the elevation of each area obtained by the regional collection, wherein the slope attribute includes a flat slope attribute, an uphill attribute, and a downhill attribute” also includes the following steps:
[0128] Corresponding array points are formed in each divided part, and the UAV is controlled to perform regional acquisition of each array point located in the same divided part during level flight based on a preset altitude, so as to obtain the elevation of each point corresponding to each array point;
[0129] The elevation difference of each point corresponding to each array point at adjacent positions is calculated to obtain the difference of each point;
[0130] Point groups are performed on the array points located at adjacent positions based on the point differences corresponding to the same divided part, so as to obtain at least one of a flat slope point group corresponding to a continuous flat slope trend, an uphill point group corresponding to a continuous uphill trend, and a downhill point group corresponding to a continuous downhill trend;
[0131] When any divided part includes only one point group, determining the slope attribute corresponding to the divided part based on the trend corresponding to the point group;
[0132] When any divided part includes two or more point groups, the slope attribute corresponding to the divided part is determined based on a preset multi-trend processing strategy.
[0133] For example, in this embodiment, in order to more accurately determine the slope attributes of each divided part in the future, the server will first set the points in each divided part, thereby forming corresponding array points respectively, and then control the drone to perform regional collection on each array point in the same divided part during level flight at a preset altitude, thereby obtaining the point elevation of each array point.
[0134] Next, the server will calculate the difference of the point elevations of each array point located at adjacent positions, thereby obtaining the point difference. The server can determine the slope trend between the two array points based on the obtained point difference. For example, if the point difference is small or zero, the slope trend between the two array points corresponding to the point difference is a flat slope trend. Then, the server will group the array points located at adjacent positions according to the point difference corresponding to the same divided part, that is, the array points located at adjacent positions and having the same slope trend are divided into the same point group.
[0135] Since the number of point groups that may be included in a divided part is not one, the server will obtain at least one of a flat slope point group corresponding to a continuous flat slope trend, an uphill point group corresponding to a continuous uphill trend, and a downhill point group corresponding to a continuous downhill trend.
[0136] When any divided part includes only one point group, the server will determine the trend corresponding to the point group as the slope attribute corresponding to the divided part; when the number of point groups included in any divided part is greater than or equal to two, the server will further determine the slope attribute corresponding to the divided part according to the preset multi-trend processing strategy.
[0137] Furthermore, the above-mentioned “when any divided part includes more than or equal to two point groups, determining the slope attribute corresponding to the divided part based on the preset multi-trend processing strategy” further includes the following steps:
[0138] When any divided part includes more than or equal to two point groups, determine the number of each point of the array points included in each point group, and determine the ratio based on the number of each point to obtain the point ratio corresponding to each point group;
[0139] When the ratio of any point is greater than a first preset ratio, determining a slope attribute corresponding to the divided portion based on a trend corresponding to the ratio of the point;
[0140] When any point ratio is less than a second preset ratio, determining the slope attribute corresponding to the divided part based on the trends respectively corresponding to the remaining other point ratios;
[0141] When all point ratios are between the second preset ratio and the first preset ratio, the slope attributes corresponding to the divided parts are determined based on the trends respectively corresponding to all point ratios.
[0142] For example, in this embodiment, when the number of point groups included in any divided part is greater than or equal to two, the server will determine the number of each point of the array points included in each point group, and determine the ratio according to the number of each point, so as to obtain the point ratio corresponding to each point group. A first preset ratio is set in advance in the server, for example, the first preset ratio can be 90%. When the ratio of any point is greater than the first preset ratio, it means that the proportion of the point ratio is very high, so the server will determine the trend corresponding to the point ratio as the slope attribute corresponding to the divided part.
[0143] A second preset ratio is set in advance in the server. For example, the second preset ratio can be 10%. When the ratio of any point is less than the second preset ratio, it means that the proportion of the point is very low. Therefore, when the server determines the slope attribute of the divided part, it only needs to determine the slope attribute corresponding to the divided part according to the trends corresponding to the remaining other point ratios, which can also reduce a certain amount of calculation of the server.
[0144] When all point ratios are between the second preset ratio and the first preset ratio, it means that the proportions of all point ratios are relatively even, so the server will determine the trends corresponding to all point ratios as the slope attributes corresponding to the divided parts. For example, the point ratio of the flat slope point group is 30%, and the point ratio of the uphill point group is 40%. Both point ratios are between the second preset ratio and the first preset ratio, so the server will determine the slope attributes of the divided part as two, namely, the flat slope attribute and the uphill attribute.
[0145] This embodiment can use the point ratio to carefully determine the slope attribute when the number of point groups included in the divided part is greater than or equal to two, which not only has high accuracy but also can reduce a certain amount of calculation on the server.
[0146] In step S106, the following contents are included:
[0147] Image recognition is performed on the top view, and road surface attributes of each divided portion are determined based on the recognition result, wherein the road surface attributes include river attributes, grassland attributes, and road attributes.
[0148] For example, in this embodiment, the server performs image recognition on the top view of the camping site, and determines the road surface attributes of each divided part according to the recognition result, and the road surface attributes include river attributes, grassland attributes and road attributes.
[0149] Furthermore, the above-mentioned “performing image recognition on the top view, and determining the road surface attributes of each divided part based on the recognition result, wherein the road surface attributes include river attributes, grass attributes, and road attributes” also includes the following steps:
[0150] Retrieving a river channel pixel value corresponding to a river channel attribute, a grassland pixel value corresponding to a grassland attribute, and a road pixel value corresponding to a road attribute, and determining the river channel pixel value, the grassland pixel value, and the road pixel value as pixel reference values;
[0151] Acquire each image pixel point constituting the upper view, and determine all other image pixel points except those corresponding to the pixel connection segment among the image pixel points as a pixel identification set;
[0152] Performing pixel comparison between each image pixel point in the pixel identification set and a pixel reference value, and grouping each image pixel point based on the comparison result to obtain a river channel pixel group corresponding to the river channel attribute, a grassland pixel group corresponding to the grassland attribute, and a road pixel group corresponding to the road attribute;
[0153] Connecting pixels at adjacent positions of the image pixels respectively included in the river pixel group, the grassland pixel group and the road pixel group to obtain a river pixel area corresponding to the river pixel group, a grassland pixel area corresponding to the grassland pixel group and a road pixel area corresponding to the road pixel group;
[0154] Determine whether there is a pixel area corresponding to other road surface attributes in the pixel area corresponding to any road surface attribute, and if so, obtain the number of pixels in the pixel area corresponding to other road surface attributes;
[0155] When the number of pixels is less than or equal to a preset number, converting the pixel area corresponding to other road surface attributes to have the same road surface attribute as the pixel area corresponding to any road surface attribute;
[0156] The divided parts respectively included in the different pixel areas are determined, and the corresponding road surface attributes are determined for the divided parts corresponding to the same pixel area.
[0157] For example, in this embodiment, since the colors of the river, grass and road are obviously different, the server will retrieve the river pixel values corresponding to the river attributes, the grass pixel values corresponding to the grass attributes and the road pixel values corresponding to the road attributes, and determine the retrieved river pixel values, grass pixel values and road pixel values as pixel reference values.
[0158] Then, the server will obtain the image pixels that make up the upper view. Since the image pixels of the corresponding pixel connection segment have been confirmed in the previous step, in this embodiment, the server will determine all image pixels except the corresponding pixel connection segment as a pixel identification set in each image pixel point, avoiding secondary identification of each image pixel point of the corresponding pixel connection segment, which can reduce the server's calculation amount to a certain extent.
[0159] At this time, the server will perform pixel comparison between each image pixel point in the pixel identification set and the pixel reference value, and then group each image pixel point according to the comparison result, so as to obtain a river channel pixel group corresponding to the river channel attribute, a grassland pixel group corresponding to the grassland attribute, and a road pixel group corresponding to the road attribute. Then, pixel connections are performed on each image pixel point having an adjacent relationship in the river channel pixel group, the grassland pixel group, and the road pixel group, so as to obtain a river channel pixel area corresponding to the river channel pixel group, a grassland pixel area corresponding to the grassland pixel group, and a road pixel area corresponding to the road pixel group.
[0160] Since plants on the grass may spread to other areas during their growth, such as covering the road pixel area, the server will further determine whether there is a pixel area corresponding to other road attributes in the pixel area corresponding to any road attribute. If so, the server will obtain the number of pixels in the pixel area corresponding to other road attributes. When the number of pixels is less than or equal to the preset number, it means that the current situation is caused by the incorrect growth of plants, rather than being set manually. Therefore, the server will convert the pixel area corresponding to other road attributes to have the same road attributes as the pixel area corresponding to any road attribute, which can avoid affecting the accuracy of the server's determination of road attributes due to the incorrect growth of plants.
[0161] Finally, the server will determine the divided parts included in each different pixel area, so as to determine the corresponding road surface attributes of the divided parts corresponding to the same pixel area, for example, determine the road surface attributes of the divided parts corresponding to the road pixel area as road attributes.
[0162] In step S108, the following contents are included:
[0163] In response to receiving a route planning request sent by a user terminal, the upper view is sent to the user terminal, and a driving starting position and a driving camping position determined by the user terminal based on the upper view are obtained.
[0164] For example, in this embodiment, when the server receives a route planning request sent by the user terminal, it will send the upper view of the camping site to the user terminal, so that the user terminal can select the location to enter the camping site and the location where it wants to camp according to the upper view. Then, the server will obtain the driving starting location and driving camping location determined by the user terminal to facilitate subsequent driving route planning.
[0165] Furthermore, the above-mentioned “in response to receiving a route planning request sent by a user terminal, sending the upper view to the user terminal, and obtaining the driving starting position and the driving camping position determined by the user terminal based on the upper view” also includes the following steps:
[0166] Determine an endpoint connection line connecting the first pixel endpoint and the second pixel endpoint corresponding to the pixel connection segment corresponding to the site outline as a campsite entry and exit line segment, and mark each divided part corresponding to different road attributes with different colors in the top view;
[0167] Determine each divided portion corresponding to the campsite entry and exit line segment in the upper view as a driving start set, determine all remaining divided portions as a driving camping set, and configure the upper view with a first interactive interface and a second interactive interface based on the driving start set and the driving camping set respectively;
[0168] In response to receiving a route planning request sent by a user terminal, sending the top view to the user terminal, and providing a first interactive interface to the user terminal for display;
[0169] In response to the user terminal performing a first interaction on the first interaction interface, determining a driving start position based on the first interaction, and providing a second interaction interface to the user terminal for display;
[0170] In response to the user terminal performing a second interaction on the second interaction interface, a driving camping location is determined based on the second interaction.
[0171] For example, in this embodiment, the server will connect the first pixel endpoint and the second pixel endpoint of the pixel connection segment corresponding to the site outline to obtain an endpoint connection line. Since the position corresponding to the endpoint connection line is the location of the camping site entrance and exit, the server will determine the endpoint connection line as the camping site entrance and exit line segment, such as Figure 2 Then, the server will mark each divided part corresponding to different road attributes with different colors in the upper view, which can improve the identification when the subsequent user makes corresponding selections.
[0172] Then, the server will determine each division of the corresponding campsite entry and exit line segments in the upper view as the driving start set, and then determine all the remaining divisions as the driving camping set. In order to facilitate the user to determine the driving start position and the driving camping position, the server will configure the upper view with a first interactive interface according to the driving start set, and then configure the upper view with a second interactive interface according to the driving camping set.
[0173] When the server receives the route planning request sent by the user terminal, it will send the top view of the camping site to the user terminal and provide the user terminal with a first interaction interface for the user terminal to select a driving starting position. When the user terminal performs a first interaction on the first interaction interface, the server will determine the divided part of the user terminal performing the first interaction as the driving starting position.
[0174] Next, the server provides the user terminal with a second interaction interface for the user terminal to select a driving camping location. After the user terminal performs a second interaction on the second interaction interface, the server determines the divided portion of the user terminal performing the second interaction as the driving camping location.
[0175] This embodiment requires the user terminal to determine the driving starting position and the driving camping position in sequence, which can avoid the situation where the user terminal selects two driving camping positions.
[0176] In step S110, the following contents are included:
[0177] Two divided parts corresponding to the driving starting position and the driving camping position are determined as a starting part and a terminating part, and a planned route connecting the starting part and the terminating part is formed based on the top view.
[0178] For example, in this embodiment, the server will respectively determine the two divided parts corresponding to the driving starting position and the driving camping position as the starting part and the ending part, and form a line segment connecting the starting part and the ending part according to the top view, that is, the planned route.
[0179] In step S112, the following contents are included:
[0180] The planned route is adjusted based on the slope attributes and the road surface attributes of each divided portion of the planned route, and the camping vehicle is controlled to reach the terminal portion based on the obtained updated planned route.
[0181] For example, in this embodiment, since there may be a division with river attributes or a division with uphill attributes in the current planned route, which are not convenient for camping vehicles to drive, the server will adjust the planned route according to the slope attributes and road attributes of each division of the planned route, so that the updated planned route can ensure the driving safety of the camping vehicle. Then, the server will control the camping vehicle to reach the terminal part according to the updated planned route.
[0182] Furthermore, the above-mentioned “adjusting the planned route based on the slope attributes and the road surface attributes of each divided part of the planned route” further includes the following steps:
[0183] If the road surface attribute of any segment of the planned route is the river attribute, the segment and other segments having the same road surface attribute as the segment and arranged continuously in the planned route are determined as a road surface exclusion set;
[0184] In the planned route, two divided parts located at both ends of the road surface exclusion set are respectively determined as a first adjacent part and a second adjacent part;
[0185] Acquire a river channel pixel area including the road surface exclusion set, and divide a region contour corresponding to the river channel pixel area into a first contour segment and a second contour segment based on the first adjacent portion and the second adjacent portion;
[0186] The segment lengths of the first contour segment and the second contour segment are respectively obtained, and the road surface exclusion set is replaced based on the contour segment with the smallest corresponding segment length to obtain a planned route updated based on the road surface attribute;
[0187] If the road surface attribute of any divided portion of the planned route after the route is updated based on the road surface attribute is an uphill attribute or a downhill attribute, determine the slope angle corresponding to the divided portion, and judge whether the slope angle is within the preset first angle interval or the preset second angle interval;
[0188] When the slope angle is within any angle interval, the divided portion and other divided portions having the same slope angle as the divided portion and being arranged continuously in the planned route are determined as a slope exclusion set;
[0189] In the planned route, two divided parts located at both ends of the slope exclusion set are respectively determined as the third adjacent part and the fourth adjacent part, and the divided parts located on both sides of the planned route, which are continuously arranged with the third adjacent part and the fourth adjacent part and whose corresponding slope angles are outside the preset first angle interval and the preset second angle interval, are determined as the first slope set and the second slope set;
[0190] Connecting each of the divided parts in the first slope set with each of the divided parts in the second slope set in pairs to obtain each divided line;
[0191] Determine each divided part passing through each divided line respectively, and determine all the divided lines whose slope angles corresponding to all the divided parts are outside the preset first angle interval and the preset second angle area as a slope line set;
[0192] Determine the line segment distance between each division line in the slope line set and the planned route, and determine the division line with the smallest corresponding line segment distance as the middle replacement line;
[0193] Connecting two divided parts located at both ends of the middle replacement line with the third adjacent part and the fourth adjacent part respectively to obtain a first edge replacement line and a second edge replacement line;
[0194] The slope exclusion set is replaced based on the first edge replacement link, the middle replacement link, and the second edge replacement link to obtain a planned route that is updated based on the slope attribute.
[0195] For example, in this embodiment, when the road surface attribute of any divided part of the route planning is a river attribute, it may be the case that the road surface attributes of other divided parts adjacent to the divided part are also river attributes. Therefore, the server will determine the divided part and other divided parts that have the same road surface attributes as the divided part and are arranged continuously as a road surface exclusion set in the planned route.
[0196] Then, the server will determine the two divided parts located at both ends of the road exclusion set in the planned route as the first adjacent part and the second adjacent part respectively, such as Figure 3 Next, the server obtains the river channel pixel area including the road surface exclusion set, and divides the area contour of the river channel pixel area into a first contour segment and a second contour segment according to the positions of the first adjacent portion and the second adjacent portion, as shown in FIG. Figure 3 The dotted line portion is shown.
[0197] Since the segment lengths of the first contour segment and the second contour segment may be different, in order to reduce the driving distance of subsequent camping vehicles, the server will obtain the segment lengths of the first contour segment and the second contour segment respectively, and replace the contour segment with the smallest segment length with the road exclusion set, thereby obtaining a planned route updated based on road attributes.
[0198] Since a large slope angle when the road surface attribute is an uphill attribute or a downhill attribute is not conducive to driving, when the road surface attribute of any divided part of the planned route after the path is updated based on the road surface attribute is an uphill attribute or a downhill attribute, the server will further determine the slope angle of the divided part. A preset first angle interval corresponding to the uphill attribute and a preset second angle interval corresponding to the downhill attribute are set in advance in the server, and the server will determine whether the slope angle of the divided part is within the preset first angle interval or the preset second angle interval.
[0199] When the slope angle is in any angle interval, it means that the slope angle is too large and is not conducive to driving. Therefore, the server will determine the segmented part and other segmented parts with the same slope angle as the segmented part and arranged continuously in the planned route as the slope exclusion set. Therefore, the two segmented parts at the two ends of the slope exclusion set are respectively determined as the third adjacent part and the fourth adjacent part in the planned route, and the segmented parts located on both sides of the planned route that are arranged continuously with the third adjacent part and the fourth adjacent part and whose corresponding slope angles are outside the first preset angle interval and the preset second angle interval are determined as the first slope set and the second slope set, and then the segmented parts in the first slope set are connected to the segmented parts in the second slope set in pairs, so as to obtain the segmented lines.
[0200] Next, the server determines the slope angles of each divided part passing through each divided line, and determines all the divided lines whose slope angles of all the divided parts are outside the first preset angle range and the preset second angle range as a slope line set. In order to shorten the driving distance of the camper as much as possible, the server determines the line segment distance between each divided line in the slope line set and the planned route, and determines the divided line with the smallest corresponding line segment distance as the middle replacement line.
[0201] Then, the server will connect the two divided parts at both ends of the middle replacement line with the third adjacent part and the fourth adjacent part respectively, so as to obtain the first edge replacement line and the second edge replacement line. Then, the slope exclusion set is replaced according to the first edge replacement line, the middle replacement line and the second edge replacement line, so as to obtain the planned route updated based on the slope attribute.
[0202] This embodiment can update the planned route in sequence according to the road surface attributes and the slope attributes, so that the updated planned route is more suitable for camping vehicles to drive, and shortens the corresponding driving time while ensuring driving safety.
[0203] Furthermore, the above method further comprises the following steps:
[0204] Determine each channel pixel area corresponding to the channel attribute in the upper view, and obtain each area outline corresponding to each channel pixel area;
[0205] Determine each contour coordinate point corresponding to the contour of the same area based on the image coordinate system, and adjust the coordinates of each contour coordinate point based on the preset fence generation coefficient to obtain each fence coordinate point constituting the river fence;
[0206] Connecting the coordinates of adjacent positions of each fence coordinate point to obtain each regional fence surrounding each of the river channel pixel areas;
[0207] Acquire the driving track of the camper in real time, and compare the position of the obtained driving track with the fences of each area;
[0208] When the driving track overlaps with the regional fence, the camping vehicle is controlled to brake.
[0209] For example, in this embodiment, in order to prevent camping vehicles from driving in a non-planned route and causing dangers such as falling into the river, the server will first determine the various river channel pixel areas corresponding to the river channel attributes in the upper view, and obtain the contours of each area corresponding to each river channel pixel area. Then, the various contour coordinate points corresponding to the contour of the same area are determined according to the image coordinate system, and the coordinates of each contour coordinate point are adjusted according to the preset fence generation coefficient. For example, if the preset fence generation coefficient is 1.2, the server will multiply each contour coordinate point by 1.2 to obtain the coordinate points of each fence constituting the river channel fence.
[0210] Next, the server will connect the coordinates of each fence point that has a neighboring relationship, so as to obtain each regional fence that surrounds each river pixel area. The driving trajectory of the camper is obtained in real time, and the obtained driving trajectory is compared with the position of each regional fence. When the driving trajectory of the camper overlaps with the regional fence, it means that the camper is about to reach the river pixel area with river attributes. At this time, the server will control the camper to brake to avoid dangerous situations.
[0211] According to the solution of the present invention, the server first obtains the upper view corresponding to the camping site, and then divides the upper view into images, thereby obtaining each divided part, so as to facilitate the subsequent server to plan the driving route of the camping vehicle in more detail. Then, the server controls the drone to perform regional acquisition on each divided part during the level flight at a preset height, thereby obtaining the regional elevation of each divided part. At this time, the server can determine the slope attribute of each divided part according to the elevation of each area. Then, the server performs image recognition on the upper view of the camping site, and then determines the road surface attribute of each divided part according to the recognition result. And when the server receives the route planning request sent by the user end, it will send the upper view of the camping site to the user end, and obtain the driving starting position and driving camping position determined by the user end, and then respectively determine the two divided parts corresponding to the driving starting position and the driving camping position as the starting part and the ending part, and form a planned route according to the upper view. Since there may be divided parts that are not convenient for camping vehicles to drive in the current planned route, the server will adjust the planned route according to the slope attribute and road surface attribute of each divided part of the planned route. Then, the server will control the camping vehicle to reach the end portion according to the updated planned route. The present invention can improve the efficiency of route planning, so that the final planned route can ensure the driving safety of the camping vehicle, and has certain feasibility.
[0212] Another embodiment of the present invention provides a control system for camping vehicle driving. Figure 4 As a corresponding device block diagram, the system includes:
[0213] An image division module is configured to obtain a top view corresponding to the camping site, and perform array-based image division on the top view to obtain divided parts;
[0214] The area acquisition module is configured to control the UAV to perform area acquisition on each divided part respectively during the level flight based on the preset altitude, and determine the slope attribute of each divided part based on the elevation of each area obtained by the area acquisition, wherein the slope attribute includes a flat slope attribute, an uphill attribute, and a downhill attribute;
[0215] an image recognition module, configured to perform image recognition on the top view, and determine the road surface attributes of each divided part based on the recognition result, wherein the road surface attributes include river attributes, grass attributes and road attributes;
[0216] a planning request module, configured to, in response to receiving a route planning request sent by a user terminal, send the upper view to the user terminal, and obtain a driving start position and a driving camping position determined by the user terminal based on the upper view;
[0217] a route planning module, configured to determine two divided parts corresponding to the driving starting position and the driving camping position as a starting part and a terminating part, and form a planned route connecting the starting part and the terminating part based on the top view;
[0218] The route adjustment module is configured to adjust the planned route based on the slope attributes and road surface attributes of each divided part of the planned route, and control the camping vehicle to reach the terminal part based on the obtained updated planned route.
[0219] In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the examples of the present invention. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to implement the content of the present invention described herein, and the above description of specific languages is for the purpose of disclosing the preferred embodiment of the present invention.
[0220] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0221] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof.
[0222] Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in the devices described in the embodiment, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the foregoing examples may be combined into one module or may be divided into multiple submodules.
[0223] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of submodules or subunits or subcomponents.
[0224] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present invention and to form different embodiments.
[0225] In addition, some of the embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices that perform the functions. Therefore, a processor with necessary instructions for implementing the method or method elements forms a device for implementing the method or method elements. In addition, the elements described herein of the device embodiments are examples of devices for implementing the functions performed by the elements for the purpose of implementing the invention.
[0226] As used herein, unless otherwise specified, the use of ordinal numbers "first," "second," "third," etc. to describe common objects merely indicates that different instances of similar objects are involved, and is not intended to imply that the objects so described must have a given order in time, space, order, or in any other manner.
[0227] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is primarily selected for readability and instructional purposes, rather than for explaining or limiting the subject matter of the present invention.
Claims
1. A control method for driving a camping vehicle, characterized in that: The following steps are involved: Acquire a top view corresponding to the camping site, and perform array-based image segmentation on the top view to obtain segmented parts; Controlling the drone to perform regional acquisition for each divided part during level flight based on a preset altitude, and determining the slope attribute of each divided part based on the elevation of each area acquired by the regional acquisition, wherein the slope attribute includes a flat slope attribute, an uphill attribute, and a downhill attribute; Performing image recognition on the top view, and determining the road surface attributes of each divided part based on the recognition result, wherein the road surface attributes include river attributes, grassland attributes, and road attributes; In response to receiving a route planning request sent by a user terminal, sending the upper view to the user terminal, and acquiring a driving start position and a driving camping position determined by the user terminal based on the upper view; Determine two divided parts corresponding to the driving starting position and the driving camping position as a starting part and a terminating part, and form a planned route connecting the starting part and the terminating part based on the top view; Adjusting the planned route based on the slope attributes and the road surface attributes of each divided portion of the planned route, and controlling the camping vehicle to reach the terminal portion based on the obtained updated planned route; The top view corresponding to the camping site is obtained, and the top view is divided into image parts based on an array form to obtain the divided parts, including: Acquire a center point of the camping site corresponding to the camping site, and control the drone to fly to the center point of the camping site to photograph the camping site, so as to obtain a rectangular captured image surrounding the camping site; Performing image recognition on the rectangular captured image to obtain each image pixel constituting the rectangular captured image, and performing a difference calculation between each image pixel and a reference pixel of a corresponding site fence to obtain each pixel difference; Determine each image pixel point whose corresponding pixel difference is within a preset difference interval as a to-be-determined set, and perform pixel connection between adjacent positions based on each image pixel point in the to-be-determined set to obtain each pixel connection segment; Performing pixel connection on the first pixel endpoint and the second pixel endpoint corresponding to the same pixel connection segment respectively, and determining the pixel connection segments forming the ring structure after the pixel connection as the ring connection segments respectively; Determine whether there is an encircling relationship between the circular connection segments based on a preset overlap determination strategy, and circularly merge the corresponding circular connection segments that have an encircling relationship to obtain updated circular connection segments; Comparing the areas of the circular connecting segments respectively, and determining the circular connecting segment with the largest area as the site outline corresponding to the camping site; Performing image segmentation on the rectangular captured image based on the site outline to obtain a top view corresponding to the camping site, and performing image segmentation on the top view based on an array form to obtain various segmented parts; The drone is controlled to perform regional collection on each divided part during level flight based on a preset altitude, and the slope attribute of each divided part is determined based on the elevation of each area obtained by the regional collection, wherein the slope attribute includes a flat slope attribute, an uphill attribute, and a downhill attribute, including: Corresponding array points are formed in each divided part, and the UAV is controlled to perform regional acquisition of each array point located in the same divided part during level flight based on a preset altitude, so as to obtain the elevation of each point corresponding to each array point; The elevation difference of each point corresponding to each array point at adjacent positions is calculated to obtain the difference of each point; Point groups are performed on the array points located at adjacent positions based on the point differences corresponding to the same divided part, to obtain at least one of a flat slope point group corresponding to a continuous flat slope trend, an uphill point group corresponding to a continuous uphill trend, and a downhill point group corresponding to a continuous downhill trend; When any divided part includes only one point group, determining the slope attribute corresponding to the divided part based on the trend corresponding to the point group; When any divided part includes two or more point groups, the slope attribute corresponding to the divided part is determined based on a preset multi-trend processing strategy.
2. The control method for camping vehicle driving according to claim 1, characterized in that: Determine whether there is an encircling relationship between the circular connection segments based on a preset overlap determination strategy, and circularly merge the corresponding circular connection segments that have an encircling relationship to obtain updated circular connection segments, including: Coordinate processing is performed on the rectangular acquisition image, and based on the obtained image coordinate system, each circular coordinate point located in the same circular connection segment is obtained, and each circular coordinate point is formed into a circular coordinate group corresponding to the circular connection segment, so as to obtain each circular coordinate group corresponding to each circular connection segment; Compare each of the circular coordinate groups with each other, and determine whether there is an enclosing relationship between the circular coordinate groups based on the comparison results; The circular coordinate groups having an enclosing relationship are merged into the same circular connection segment, and the circular coordinate groups located in the rectangular acquisition image are determined.
3. The control method for camping vehicle driving according to claim 1, characterized in that: The upper view is divided into image parts based on an array form to obtain divided parts, including: Generating vertical dividing lines corresponding to the same horizontal spacing and generating horizontal dividing lines corresponding to the same vertical spacing for the top view respectively, to obtain the divided parts; Determine each divided part located at the edge position of the upper view and determine it as a set to be merged; Determine a reference area corresponding to the divided part based on the horizontal spacing and the vertical spacing, and determine the area of each divided part in the to-be-merged set to obtain each divided area corresponding to each divided part; Determine the ratio of each divided area to the reference area to obtain the ratio of each area; Each divided part whose corresponding area ratio is smaller than a preset ratio is merged with the divided parts located outside the to-be-merged set and in adjacent positions to obtain updated divided parts.
4. The control method for camping vehicle driving according to claim 1, characterized in that: When any divided part includes two or more point groups, the slope attribute corresponding to the divided part is determined based on a preset multi-trend processing strategy, including: When any divided part includes more than or equal to two point groups, determine the number of each point of the array points included in each point group, and determine the ratio based on the number of each point to obtain the point ratio corresponding to each point group; When the ratio of any point is greater than a first preset ratio, determining a slope attribute corresponding to the divided portion based on a trend corresponding to the ratio of the point; When any point ratio is less than a second preset ratio, determining the slope attribute corresponding to the divided part based on the trends respectively corresponding to the remaining other point ratios; When all point ratios are between the second preset ratio and the first preset ratio, the slope attributes corresponding to the divided parts are determined based on the trends respectively corresponding to all point ratios.
5. The control method for camping vehicle driving according to claim 2, characterized in that: Perform image recognition on the top view, and determine the road surface attributes of each divided part based on the recognition result, wherein the road surface attributes include river attributes, grassland attributes, and road attributes, including: Retrieving a river channel pixel value corresponding to a river channel attribute, a grassland pixel value corresponding to a grassland attribute, and a road pixel value corresponding to a road attribute, and determining the river channel pixel value, the grassland pixel value, and the road pixel value as pixel reference values; Acquire each image pixel point constituting the upper view, and determine all other image pixel points except those corresponding to the pixel connection segment among the image pixel points as a pixel identification set; Performing pixel comparison between each image pixel point in the pixel identification set and a pixel reference value, and grouping each image pixel point based on the comparison result to obtain a river channel pixel group corresponding to the river channel attribute, a grassland pixel group corresponding to the grassland attribute, and a road pixel group corresponding to the road attribute; Connecting pixels at adjacent positions of the image pixels respectively included in the river pixel group, the grassland pixel group and the road pixel group to obtain a river pixel area corresponding to the river pixel group, a grassland pixel area corresponding to the grassland pixel group and a road pixel area corresponding to the road pixel group; Determine whether there is a pixel area corresponding to other road surface attributes in the pixel area corresponding to any road surface attribute, and if so, obtain the number of pixels in the pixel area corresponding to other road surface attributes; When the number of pixels is less than or equal to a preset number, converting the pixel area corresponding to other road surface attributes to have the same road surface attribute as the pixel area corresponding to any road surface attribute; The divided parts respectively included in the different pixel areas are determined, and the corresponding road surface attributes are determined for the divided parts corresponding to the same pixel area.
6. The control method for camping vehicle driving according to claim 1, characterized in that: In response to receiving a route planning request sent by a user terminal, sending the upper view to the user terminal, and obtaining a driving start position and a driving camping position determined by the user terminal based on the upper view, including: Determine an endpoint connection line connecting the first pixel endpoint and the second pixel endpoint corresponding to the pixel connection segment corresponding to the site outline as a campsite entry and exit line segment, and mark each divided part corresponding to different road attributes with different colors in the top view; Determine each divided portion corresponding to the campsite entry and exit line segment in the upper view as a driving start set, determine all remaining divided portions as a driving camping set, and configure the upper view with a first interactive interface and a second interactive interface based on the driving start set and the driving camping set respectively; In response to receiving a route planning request sent by a user terminal, sending the top view to the user terminal, and providing a first interactive interface to the user terminal for display; In response to the user terminal performing a first interaction on the first interaction interface, determining a driving start position based on the first interaction, and providing a second interaction interface to the user terminal for display; In response to the user terminal performing a second interaction on the second interaction interface, a driving camping location is determined based on the second interaction.
7. The control method for camping vehicle driving according to claim 5, characterized in that: The planned route is adjusted based on the slope attributes and the road surface attributes of each divided portion of the planned route, including: If the road surface attribute of any segment of the planned route is the river attribute, the segment and other segments having the same road surface attribute as the segment and arranged continuously in the planned route are determined as a road surface exclusion set; In the planned route, two divided parts located at both ends of the road surface exclusion set are respectively determined as a first adjacent part and a second adjacent part; Acquire a river channel pixel region including the road surface exclusion set, and divide a region contour corresponding to the river channel pixel region into a first contour segment and a second contour segment based on the first adjacent portion and the second adjacent portion; The segment lengths of the first contour segment and the second contour segment are respectively obtained, and the road surface exclusion set is replaced based on the contour segment with the smallest corresponding segment length to obtain a planned route updated based on the road surface attribute; If the road surface attribute of any divided portion of the planned route after the route is updated based on the road surface attribute is an uphill attribute or a downhill attribute, determine the slope angle corresponding to the divided portion, and judge whether the slope angle is within the preset first angle interval or the preset second angle interval; When the slope angle is within any angle interval, the divided portion and other divided portions having the same slope angle as the divided portion and being arranged continuously in the planned route are determined as a slope exclusion set; In the planned route, two divided parts located at both ends of the slope exclusion set are respectively determined as the third adjacent part and the fourth adjacent part, and the divided parts located on both sides of the planned route, which are continuously arranged with the third adjacent part and the fourth adjacent part and whose corresponding slope angles are outside the preset first angle interval and the preset second angle interval, are determined as the first slope set and the second slope set; Connecting each of the divided parts in the first slope set with each of the divided parts in the second slope set in pairs to obtain each divided line; Determine each divided part passing through each divided line respectively, and determine all the divided lines whose slope angles corresponding to all the divided parts are outside the preset first angle interval and the preset second angle area as a slope line set; Determine the line segment distance between each division line in the slope line set and the planned route, and determine the division line with the smallest corresponding line segment distance as the middle replacement line; Connecting two divided parts located at both ends of the middle replacement line with the third adjacent part and the fourth adjacent part respectively to obtain a first edge replacement line and a second edge replacement line; The slope exclusion set is replaced based on the first edge replacement link, the middle replacement link, and the second edge replacement link to obtain a planned route that is updated based on the slope attribute.
8. The control method for camping vehicle driving according to claim 7, characterized in that: The method further comprises: Determine each channel pixel area corresponding to the channel attribute in the upper view, and obtain each area outline corresponding to each channel pixel area; Determine each contour coordinate point corresponding to the contour of the same area based on the image coordinate system, and adjust the coordinates of each contour coordinate point based on a preset fence generation coefficient to obtain each fence coordinate point constituting the river fence; Connecting the coordinates of adjacent positions of each fence coordinate point to obtain each regional fence surrounding each of the river channel pixel areas; Acquire the driving track of the camper in real time, and compare the position of the obtained driving track with the fences of each area; When the driving track overlaps with the regional fence, the camping vehicle is controlled to brake.
9. A control system for camping vehicle driving, characterized in that: include: An image division module is configured to obtain a top view corresponding to the camping site, and perform array-based image division on the top view to obtain divided parts; The area acquisition module is configured to control the UAV to respectively perform area acquisition on each divided part during a level flight based on a preset altitude, and determine the slope attribute of each divided part based on the elevation of each area obtained by the area acquisition, wherein the slope attribute includes a flat slope attribute, an uphill attribute, and a downhill attribute; an image recognition module, configured to perform image recognition on the top view, and determine the road surface attributes of each divided part based on the recognition result, wherein the road surface attributes include river attributes, grass attributes and road attributes; a planning request module, configured to, in response to receiving a route planning request sent by a user terminal, send the upper view to the user terminal, and obtain a driving start position and a driving camping position determined by the user terminal based on the upper view; a route planning module, configured to determine two divided parts corresponding to the driving starting position and the driving camping position as a starting part and a terminating part, and form a planned route connecting the starting part and the terminating part based on the top view; a route adjustment module configured to adjust the planned route based on the slope attribute and the road surface attribute of each divided portion of the planned route, and control the camping vehicle to reach the terminal portion based on the obtained updated planned route; The top view corresponding to the camping site is obtained, and the top view is divided into image parts based on an array form to obtain the divided parts, including: Acquire a center point of the camping site corresponding to the camping site, and control the drone to fly to the center point of the camping site to photograph the camping site, so as to obtain a rectangular captured image surrounding the camping site; Performing image recognition on the rectangular captured image to obtain each image pixel constituting the rectangular captured image, and performing a difference calculation between each image pixel and a reference pixel of a corresponding site fence to obtain each pixel difference; Determine each image pixel point whose corresponding pixel difference is within a preset difference interval as a to-be-determined set, and perform pixel connection between adjacent positions based on each image pixel point in the to-be-determined set to obtain each pixel connection segment; Performing pixel connection on the first pixel endpoint and the second pixel endpoint corresponding to the same pixel connection segment respectively, and determining the pixel connection segments forming the ring structure after the pixel connection as the ring connection segments respectively; Determine whether there is an encircling relationship between the circular connection segments based on a preset overlap determination strategy, and circularly merge the corresponding circular connection segments that have an encircling relationship to obtain updated circular connection segments; Comparing the areas of the circular connecting segments respectively, and determining the circular connecting segment with the largest area as the site outline corresponding to the camping site; Performing image segmentation on the rectangular captured image based on the site outline to obtain a top view corresponding to the camping site, and performing image segmentation on the top view based on an array form to obtain various segmented parts; The drone is controlled to perform regional collection on each divided part during level flight based on a preset altitude, and the slope attribute of each divided part is determined based on the elevation of each area obtained by the regional collection, wherein the slope attribute includes a flat slope attribute, an uphill attribute, and a downhill attribute, including: Corresponding array points are formed in each divided part, and the UAV is controlled to perform regional acquisition of each array point located in the same divided part during level flight based on a preset altitude, so as to obtain the elevation of each point corresponding to each array point; The elevation difference of each point corresponding to each array point at adjacent positions is calculated to obtain the difference of each point; Point groups are performed on the array points located at adjacent positions based on the point differences corresponding to the same divided part, to obtain at least one of a flat slope point group corresponding to a continuous flat slope trend, an uphill point group corresponding to a continuous uphill trend, and a downhill point group corresponding to a continuous downhill trend; When any divided part includes only one point group, determining the slope attribute corresponding to the divided part based on the trend corresponding to the point group; When any divided part includes two or more point groups, the slope attribute corresponding to the divided part is determined based on a preset multi-trend processing strategy.
Citation Information
Patent Citations
Vehicle-machine cooperative control and path optimization method based on unmanned aerial vehicle assistance
CN112558608A
Vehicle control method and device and vehicle
CN114895689A