WO2021128834A1 - Navigation method and apparatus based on computer vision, computer device, and medium - Google Patents

Navigation method and apparatus based on computer vision, computer device, and medium Download PDF

Info

Publication number
WO2021128834A1
WO2021128834A1 PCT/CN2020/105015 CN2020105015W WO2021128834A1 WO 2021128834 A1 WO2021128834 A1 WO 2021128834A1 CN 2020105015 W CN2020105015 W CN 2020105015W WO 2021128834 A1 WO2021128834 A1 WO 2021128834A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
obstacle
target
recognition
data
Prior art date
Application number
PCT/CN2020/105015
Other languages
French (fr)
Chinese (zh)
Inventor
温桂龙
Original Assignee
深圳壹账通智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2021128834A1 publication Critical patent/WO2021128834A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
    • G01C11/02Picture taking arrangements specially adapted for photogrammetry or photographic surveying, e.g. controlling overlapping of pictures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
    • G01C11/04Interpretation of pictures
    • G01C11/30Interpretation of pictures by triangulation
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/20Instruments for performing navigational calculations
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/3407Route searching; Route guidance specially adapted for specific applications
    • G01C21/3415Dynamic re-routing, e.g. recalculating the route when the user deviates from calculated route or after detecting real-time traffic data or accidents

Definitions

  • the field of artificial intelligence navigation of this application in particular, relates to a navigation method, device, computer equipment, and storage medium based on computer vision.
  • Existing navigation systems generally have functions such as speech synthesis, text reading, zoom in and zoom out, and touch feedback, which provide users with convenience, help users plan routes and provide travel mode suggestions.
  • the inventor found that users with inconvenient eyes cannot perceive the real-time road conditions on the navigation route in real time, making them prone to danger when moving according to the navigation route. Users with inconvenient eyes here It can be a visually impaired user or a user who cannot concentrate on watching the real-time road conditions due to other reasons.
  • the embodiments of the present application provide a computer vision-based navigation method, device, computer equipment, and storage medium to solve the problem that users who are inconvenient to use the navigation route recommended by the existing navigation system are prone to danger when moving.
  • a navigation method based on computer vision including:
  • the navigation request information includes a starting point position and an ending point position
  • a computer vision tool is used to perform binocular distance measurement on the obstacle to determine the distance data between the user's current position and the obstacle;
  • the voice playback system is used to play the evasion reminder information.
  • a navigation device based on computer vision including:
  • a navigation request information acquisition module configured to acquire navigation request information, where the navigation request information includes a starting point position and an ending point position;
  • the first target route acquisition module is configured to perform route planning according to the starting point position and the ending point position, acquire the first target route, and play the navigation voice data corresponding to the first target route by using a voice playback system;
  • the current recognition result obtaining module is used to obtain the real-time video of the road conditions corresponding to the first target route, extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain the target recognition image, and use the target
  • the obstacle recognition model recognizes the target recognition image and obtains the current recognition result
  • the distance data acquisition module is configured to, if the current recognition result is that there is an obstacle, use a computer vision tool to perform binocular distance measurement on the obstacle, and determine the distance data between the user's current position and the obstacle;
  • the evasion reminder information acquisition module is configured to obtain corresponding evasion reminder information according to the distance data and preset alarm conditions, and use the voice playback system to play the evasion reminder information.
  • a computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, wherein the processor implements the following steps when the processor executes the computer-readable instructions:
  • the navigation request information includes a starting point position and an ending point position
  • a computer vision tool is used to perform binocular distance measurement on the obstacle to determine the distance data between the user's current position and the obstacle;
  • the voice playback system is used to play the evasion reminder information.
  • One or more readable storage media storing computer readable instructions, where when the computer readable instructions are executed by one or more processors, the one or more processors execute the following steps:
  • the navigation request information includes a starting point position and an ending point position
  • a computer vision tool is used to perform binocular distance measurement on the obstacle to determine the distance data between the user's current position and the obstacle;
  • the voice playback system is used to play the evasion reminder information.
  • the above-mentioned computer vision-based navigation method, device, computer equipment and storage medium carry out route planning according to the starting point position and the ending point position, obtain the first target route, and use the voice playback system to play the corresponding first target route Navigation voice data in order to provide users with voice navigation, which is convenient for users to travel based on the navigation voice data they hear.
  • Acquire a real-time video of the road condition corresponding to the first target route extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain a target recognition image, and use a target obstacle recognition model to recognize the target The image is recognized, and the current recognition result is obtained to determine whether there is an obstacle when the user advances along the first target route.
  • a computer vision tool is used to perform binocular distance measurement on the obstacle to quickly determine the distance data between the user's current position and the obstacle.
  • Pre-set alarm conditions based on the distance data obtain the corresponding evasion reminder information and use the voice playback system to play, so as to provide a barrier-free forward solution for users with eye inconvenience, avoiding the inconvenience of eyes or other inability to view road conditions in real time
  • Fig. 1 is a schematic diagram of an application environment of a computer vision-based navigation method in an embodiment of the present application
  • Fig. 2 is a flowchart of a computer vision-based navigation method in an embodiment of the present application
  • Fig. 3 is a flowchart of a computer vision-based navigation method in an embodiment of the present application
  • Fig. 4 is a flowchart of a computer vision-based navigation method in an embodiment of the present application.
  • Fig. 5 is a flowchart of a computer vision-based navigation method in an embodiment of the present application.
  • Fig. 6 is a flowchart of a computer vision-based navigation method in an embodiment of the present application.
  • Fig. 7 is a flowchart of a computer vision-based navigation method in an embodiment of the present application.
  • Fig. 8 is a functional block diagram of a navigation device based on computer vision in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of the principle of binocular ranging in an embodiment of the present application.
  • Fig. 10 is a schematic diagram of a computer device in an embodiment of the present application.
  • the computer vision-based navigation method provided by the embodiments of the present application can be applied to the application environment as shown in FIG. 1.
  • the computer vision-based navigation method is applied to a navigation system.
  • the navigation system includes a client and a server as shown in FIG. It is convenient for users with eyes to provide navigation and provide corresponding circumvention solutions to ensure user travel safety.
  • the client is also called the client, which refers to the program that corresponds to the server and provides local services to the client.
  • the client can be installed on, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server can be implemented as an independent server or a server cluster composed of multiple servers.
  • a computer vision-based navigation method is provided. Taking the method applied to the server in FIG. 1 as an example for description, the method includes the following steps:
  • S201 Acquire navigation request information, where the navigation request information includes a starting point position and an ending point position.
  • the navigation request information refers to the information that the user sends to the server through the client, and requests the server to plan the route according to the starting point and the ending point.
  • the starting point location is the location where the starting point of the navigation route is determined independently by the user.
  • the end position is the position where the end point of the navigation route needs to be determined independently by the user.
  • S202 Carry out route planning according to the starting point position and the ending point position, obtain the first target route, and use the voice playback system to play the navigation voice data corresponding to the first target route.
  • the first target route refers to a route from the starting point position to the ending position obtained by planning according to the navigation request information.
  • Navigation voice data refers to the voice data that provides navigation for the user.
  • the navigation voice data corresponds to the first target route.
  • the navigation voice data can be "please walk xx meters to the left and then turn right" or "you have deviated Route etc.”.
  • Voice playback system playback refers to a system used for voice playback.
  • the voice playback system can play the first target route.
  • the server After the server obtains the navigation request information, it inputs the start position and the end position in the navigation request information into the navigation system, and obtains the first target route fed back by the navigation system, and uses the voice playback system to play the first target route.
  • Corresponding navigation voice data so as to provide users with voice navigation, so that users who are inconvenient to use can obtain the corresponding first target route according to the played navigation voice data.
  • the route with the shortest walking time may be selected as the first target route.
  • S203 Obtain a real-time video of the road condition corresponding to the first target route, extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain the target recognition image, use the target obstacle recognition model to recognize the target recognition image, and obtain the current recognition result.
  • the real-time video of road conditions refers to the video captured by the client in real time when the user is walking according to the navigation voice data.
  • the image to be recognized refers to the image that needs to be recognized.
  • the video image extraction software is used to extract the image to be recognized in the real-time video of the road condition.
  • the frequency of the image extraction using the video image extraction software can be to extract one image to be recognized in the real-time video of the road condition every 10 seconds; or
  • the image acquisition port extracts the image to be identified in the real-time video of the road condition.
  • the frequency of the image acquisition port can be 10 seconds to extract an image to be identified from the real-time video of the road condition.
  • the target recognition image refers to the image obtained by preprocessing the image to be recognized.
  • the target obstacle recognition model is a model used to recognize obstacle objects in an image.
  • the target obstacle recognition model is used to recognize the target recognition image, so as to determine whether there is an obstacle on the road that prevents the user from moving forward when the user walks along the first target route.
  • the current recognition result is the recognition result of the target recognition image by the target obstacle recognition model.
  • Obstacle objects refer to objects that hinder the user's progress when the user advances along the first target route.
  • the client's camera is turned on for video recording to obtain real-time video of the road condition, and the image to be recognized is extracted from the real-time video of the road condition by using video image extraction software or the image collection port, and the image to be recognized is grayed out.
  • the target recognition image use the target obstacle recognition model to recognize the target recognition image, and obtain the current recognition result of whether there may be obstacles when the user moves along the first target route, so that the subsequent avoidance can be performed based on the current recognition result. Handling of obstacles to ensure the safety of users’ travel.
  • Computer vision refers to machine vision that uses cameras and computers instead of human eyes to identify, track, and measure obstacles.
  • Computer vision tools include but are not limited to Halcon, MATLAB+Simulink and OpenCV.
  • the user's current location refers to the user's current location.
  • the distance data refers to the data of the distance between the user's current position and the obstacle. The distance data is specifically the distance between the three-dimensional coordinates of the obstacle and the three-dimensional coordinates of the user's current position.
  • the three-dimensional coordinates of the user's current position are the origin coordinates.
  • Binocular distance measurement refers to the process of calculating the image extracted from the real-time video of road conditions through computer vision tools to determine the distance between the user's current position and the obstacle.
  • this embodiment uses the OpenCV tool to calculate the image extracted from the real-time video of the road condition to quickly learn from the user’s current location to the obstacle.
  • the distance data of the object position When the user’s eyes are inconvenient, the distance data between the user and the obstacle can be calculated according to the computer vision tool, so that it can accurately determine whether the obstacle will hinder the user from moving forward, so that the corresponding evasion reminder information corresponding to the obstacle can be obtained later to provide data to ensure User travel safety.
  • S205 Obtain corresponding evasion reminder information according to the distance data and preset alarm conditions, and use a voice playback system to play the evasion reminder information.
  • the preset alarm condition refers to a preset alarm condition, and the alarm condition is set according to whether the obstacle will hinder the user from moving forward.
  • Evasion reminder information refers to the reminder information generated by judging distance data and preset alarm conditions. For example, when obstacles will not hinder the user, the evasion reminder message can be "Please pay attention to the presence of xx obstacles x meters in front of the left.
  • the avoidance reminder message can be "Please note that there is an xx obstacle at x meters from the front left, please stop", or the obstacle prevents the user from moving forward At the time, the avoidance reminder message may be "Please note that there is an xx obstacle at x meters in front of the left, request to change the first target route", etc.
  • the avoidance reminder information can provide users with a barrier-free forwarding solution, avoid the danger that may be caused by the inconvenience of the user's eyes and the inability to see the existing obstacles, and ensure the user's travel safety.
  • route planning is performed according to the starting point and the ending point, the first target route is obtained, and the voice playback system is used to play the navigation voice data corresponding to the first target route, so as to provide users with Voice navigation makes it convenient for users to travel based on the navigation voice data they hear.
  • Obtain the real-time video of the road condition corresponding to the first target route extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain the target recognition image, use the target obstacle recognition model to recognize the target recognition image, and obtain the current recognition result, To determine whether there is an obstacle when the user moves along the first target route.
  • a computer vision tool is used to perform binocular distance measurement on the obstacle to quickly determine the distance data between the user's current position and the obstacle.
  • Preset warning conditions based on the distance data obtain the corresponding evasion reminder information and use the voice playback system to play, so as to provide a barrier-free forward plan for users with eye inconvenience, avoiding the situation that users with eye inconvenience or other situations where the user cannot view the road conditions in real time , The danger that may be caused by the inability to see the existing obstacles, to ensure the safety of users.
  • the navigation request information in step S201 is the information corresponding to the start position and the end position independently input by the user. Specifically, it may be the start position and the end position input by the user directly on the client by text input, or It is the start and end positions determined by automatic positioning technology, and the start and end positions can also be input by voice input. As shown in Figure 3, step S201, namely obtaining navigation request information, includes:
  • S301 Use the voice playback system to input reminder data at the playback position, and receive the to-be-recognized voice data input by the voice collection system based on the position reminder data.
  • the location input reminder data refers to the data issued by the voice playback system to remind the user to input the location.
  • the position input reminder data specifically includes the start position input reminder data and the end position input reminder data.
  • the start position input reminder data may be "please enter the start position".
  • the voice data to be recognized is the data that the user said contains the starting position or the ending position.
  • the voice collection system is a system used to collect user voice data, which can be a microphone built into the client.
  • the user can independently select the voice input mode through the client.
  • the voice playback system is used to play the position to input the reminder data.
  • the user enters the reminder data according to the position within the preset waiting time.
  • the voice collection system collects the voice data to be recognized and sends it to the server.
  • the preset waiting time is a preset time for waiting for user feedback data. For example, the preset waiting time may be 1 minute.
  • S302 Use a voice recognition model to recognize the voice data to be recognized, and obtain the target text.
  • the voice recognition model is a model that is pre-trained to recognize the text content in the voice data to be recognized.
  • the target text refers to the text corresponding to the voice data to be recognized, specifically the text corresponding to the start position or the end position.
  • the voice recognition model is used to recognize the voice data to be recognized, and the target text including the starting point or the ending point can be quickly obtained, so as to subsequently plan a route for the user.
  • S303 Use the speech synthesis technology to perform speech synthesis on the target text, and obtain the to-be-confirmed speech data corresponding to the target text.
  • speech synthesis technology is a technology that converts text information generated or input by a computer into speech output.
  • the voice data to be confirmed refers to the voice data obtained after speech synthesis processing is performed on the target text.
  • speech synthesis is performed on the target text to obtain the to-be-confirmed speech data corresponding to the target text for the user to determine whether the starting point or the ending point is accurate, so as to ensure the accuracy of the subsequently generated route.
  • S304 Use the voice playback system to play the voice data to be confirmed, receive the location confirmation information sent by the client, and determine the navigation request information based on the target text and the location confirmation information.
  • the position confirmation information refers to the information that the user confirms that the start position or the end position of the target text is accurate.
  • the voice playback system is used to play the voice data to be confirmed, and the location confirmation information sent by the client is received within a preset waiting time.
  • the location confirmation information may be confirmation information, that is, information used to confirm that the target text is accurate and correct. ; It can also be the confirmation of incorrect information, that is, the information that needs to be modified to confirm that the target text is inaccurate.
  • Determine the navigation request information based on the target text and location confirmation information including: if the location confirmation information is confirmed and correct, then the navigation request information is determined based on the target text; if the location confirmation information is confirmed to be incorrect, the voice playback system is repeated Enter the reminder data at the playback position, and receive the to-be-recognized voice data input by the voice collection system based on the position reminder data and the subsequent steps, that is, repeat steps S301-S304 until the correct information is obtained, and the navigation request information is determined according to the target text .
  • the user interacts with the client by means of human-computer interaction such as a voice playback system, so as to provide an intelligent location input method for users who are inconvenient with eyes, so as to plan a route later.
  • the voice playback system plays the position input reminder data that needs to be determined by the user, and receives the voice data to be recognized by the voice collection system, recognizes the voice data to be recognized, and obtains the target text in order to Follow up to plan the first target route for the user.
  • the speech synthesis technology is used to synthesize the target text to obtain the to-be-confirmed speech data corresponding to the target text, so that the user can determine whether the starting point or the ending point is accurate, so as to ensure the accuracy of the first target route generated subsequently.
  • Use the voice playback system to play the voice data to be confirmed receive the location confirmation information sent by the client, determine the navigation request information based on the target text and location confirmation information, and realize the interaction between the user and the client by means of human-computer interaction such as the voice playback system.
  • Users with limited eyesight provide an intelligent location input method for subsequent route planning.
  • step S203 that is, preprocessing the image to be recognized to obtain the target recognition image, includes:
  • S401 Perform grayscale and binarization processing on the image to be recognized, and obtain the image to be processed.
  • grayscale refers to the process of converting a color image to be recognized into a grayscale image to be recognized, so as to reduce the workload of subsequent image processing.
  • Binarization refers to processing the image obtained after the image to be identified is grayed out to generate an image with only two gray levels, and the image with only two gray levels is determined as the image to be processed. Perform grayscale and binarization processing on each image to be recognized to obtain the image to be processed to speed up the processing of subsequent images.
  • S402 Use an edge detection algorithm and a straight line detection algorithm to process the image to be processed, and obtain a road condition recognition image.
  • the edge detection algorithm is used to measure, detect and locate the gray level change of the image to be processed, so as to determine the part of the image to be recognized with significant brightness change, and provide technical support for the subsequent segmentation of obstacles and background.
  • the detection algorithm includes but is not limited to the Canny edge detection algorithm.
  • the straight line detection algorithm is an algorithm used to identify a straight line from the image to be processed.
  • the straight line detection algorithm includes but is not limited to the Hough transform.
  • the Hough transform is used to process the image to be processed, and the straight lines in the image to be processed are extracted to determine the sidewalk, blind side, or highway on the road, and obtain the road condition recognition image.
  • the edge detection algorithm is used to process the image to be processed to detect the parts with significant brightness changes in the image to be processed
  • the straight line detection algorithm is used to determine the road in the image to be processed, so as to efficiently identify the sidewalk and the blind on the road in the image to be processed And road conditions such as highways.
  • S403 Use a threshold selection method to segment the obstacle object and the background of the road condition recognition image, and obtain a target recognition image.
  • the threshold selection method refers to the process of using the gray level difference between the target and the background to be extracted in the image, and dividing the pixel level into several categories by setting the gray threshold to realize the separation of the target and the background.
  • the gray threshold is preset, and is used to distinguish obstacles from the background.
  • the target recognition image refers to the image obtained after processing the road condition recognition image. Specifically, it is an image determined based on the comparison result of the gray level difference between the obstacle object and the background extracted from the road condition recognition image and the gray threshold value.
  • the target recognition image is an image that is likely to be an obstacle.
  • Threshold selection methods include, but are not limited to, threshold selection methods based on genetic algorithms.
  • the threshold selection method is used to segment the road condition recognition image into the obstacle object and the background, and the part of the road condition recognition image whose gray value is greater than the gray threshold value is determined as the obstacle object, which has the advantage of small calculation amount and can be obtained quickly.
  • Target recognition image The gray level threshold is preset, and is used to distinguish the value of obstacles and background in the road condition recognition image.
  • the image to be recognized in the real-time video of road conditions is extracted, the image to be recognized is grayed and binarized, and the image to be processed is obtained to speed up the processing of subsequent images.
  • Use edge detection algorithm to process the image to be processed determine the part of the image to be processed with significant brightness changes, provide technical support for the subsequent segmentation of obstacles and background, and use straight line detection algorithm to process the image to be processed to efficiently identify the road surface Road conditions.
  • the threshold selection method is used to segment the obstacle object and the background of the road condition recognition image, which has the advantage of small calculation amount and can quickly obtain the target recognition image.
  • the target recognition image includes a left-eye recognition image and a right-eye recognition image.
  • a computer vision tool is used to perform binocular distance measurement on the obstacle to determine the distance between the user’s current position and the obstacle. Data, including:
  • S501 Use Zhang Zhengyou's calibration method to calibrate to obtain the parameter data of the binocular camera.
  • the binocular camera refers to the left and right cameras on the user client.
  • the distance data between the user's current position and the obstacle obtained by the binocular camera is more than the distance data between the user's current position and the obstacle obtained by the monocular camera. accurate.
  • the Zhang Zhengyou calibration method is a single-plane checkerboard camera calibration method proposed by Professor Zhang Zhengyou in 1998 to obtain the parameter data of the binocular camera.
  • the parameter data includes internal parameter data and external parameter data, the internal parameter data includes focal length and lens distortion parameters, and the external parameter data includes rotation matrix and translation matrix.
  • the binocular camera is used in advance to obtain multiple sets of calibration images at different angles and different distances, and then the Zhang Zhengyou calibration method is used to calibrate multiple sets of calibration images to obtain the parameter data of the binocular camera to identify the image and the right eye for the subsequent left eye. Recognize the image and provide technical support for image correction.
  • the calibration image refers to an image used for calibration, specifically an image used to calculate and determine the parameter data of the binocular camera.
  • the calibration image includes a left target image and a right target image.
  • the image to be recognized includes the left-eye original image and the right-eye original image.
  • the left-eye recognition image is the left-eye original image extracted from the real-time video of the road condition captured by the left camera, and then the left-eye original image is preprocessed.
  • the right-eye recognition image is the right-eye original image extracted from the real-time video of the road condition captured by the right camera, and then the right-eye original image is preprocessed to obtain the image. It should be noted that the left-eye recognition image and the right-eye recognition image must be images obtained from real-time video of road conditions at the same time to ensure the accuracy of the distance data calculated later.
  • S502 Perform image correction on the left-eye recognition image and the right-eye recognition image based on the parameter data, and obtain a left-eye correction image and a right-eye correction image.
  • image correction refers to the method of mapping and transforming the left-eye recognition image and the right-eye recognition image according to the parameter data, so that the polar line of the matching point on the left-eye recognition image and the right-eye recognition image is collinear, and the collinear epipolar line can be understood as the left-eye recognition
  • the matching points on the image and the right-eye recognition image are on the same horizontal line.
  • Image correction based on the parameter data of the binocular camera can ensure the accuracy of the subsequent calculation of the distance data between the user's current position and the obstacle, and effectively reduce the amount of calculation.
  • the matching point on the left-eye recognition image and the right-eye recognition image refers to the point at the same position of the same object in the left-eye recognition image and the right-eye recognition image, for example, a point on the left ear of the same user on the left-eye recognition image and the right-eye recognition image .
  • the left-eye correction image is an image obtained after correcting the left-eye recognition image.
  • the right-eye correction image is an image obtained after correcting the right-eye recognition image.
  • the left-eye recognition image and the right-eye recognition image obtained by the binocular camera have image distortion. If the left-eye recognition image and the right-eye recognition image are directly used to calculate the user’s current The distance data of the position and obstacle objects, there is a large error in the obtained distance data.
  • the parameter data obtained by calibration is input into OpenCV, and the affine transformation function of OpenCV is used to realize the mapping transformation processing on the left target image and the right target image.
  • the mapping transformation includes but is not limited to translation, rotation, and scaling.
  • the left-eye image mapping table reflects the left target image and after the mapping transformation
  • the right-eye image mapping table reflects the mapping relationship between the right target image and the sum and the right-eye correction image after the mapping transformation.
  • the left-eye recognition image is corrected according to the left-eye image mapping table to obtain the left-eye correction image.
  • the right-eye recognition image is corrected according to the right-eye image mapping table to obtain the right-eye correction image. Perform image correction on the left-eye recognition image and the right-eye recognition image to eliminate the influence of image distortion on the subsequent ranging and ensure the reliability of the subsequent calculation of the distance between the user's current position and the obstacle.
  • S503 Use a stereo matching algorithm to perform stereo matching on the left-eye corrected image and the right-eye corrected image to obtain a disparity map.
  • the disparity map refers to an image whose image size is equal to the size of any one of the left-eye correction image and the right-eye correction image, and the element value is the disparity value.
  • the disparity value is the difference between the x-coordinates corresponding to the same point or object imaged by the left-eye camera and the right-eye camera.
  • Stereo matching refers to finding matching pixels in the left-eye correction image and right-eye correction image, and using the positional relationship between the corresponding pixels to obtain a disparity map.
  • Stereo matching algorithms include, but are not limited to, the local BM algorithm and the global SGBM algorithm provided in OpenCV.
  • the stereo matching algorithm used in this embodiment is a global SGBM.
  • the idea of SGBM is to select the disparity of each pixel to form a disparity map, and set a global energy function related to the disparity map to minimize this energy function. To achieve the purpose of solving the optimal disparity of each pixel.
  • the stereo matching algorithm is used to select the disparity of the corresponding pixels in the left eye correction image and the right eye correction image to form a disparity map, set a global energy function related to the disparity map, and minimize the energy cost function to solve
  • the optimal disparity of each pixel, the optimal disparity of each pixel is used as the disparity value of the pixel to generate a disparity map, and then the distance data between the user's current position and the obstacle can be accurately calculated based on the disparity map.
  • S504 Determine the distance data between the current position of the user and the obstacle based on the disparity map.
  • the location of the obstacle is point P
  • the width of the left-eye camera and the right-eye camera is l
  • the focal length of the binocular camera is f
  • the distance between the left-eye camera and the right-eye camera is T
  • x l and x r represents the abscissa of the projection point of the obstacle in the left eye correction image and the right eye correction image
  • y r represents the ordinate of the projection point of the obstacle in the right eye correction image
  • the imaging point of the obstacle in the left eye camera is P l
  • the obstacle is in
  • the imaging point on the right-eye camera is P r
  • the Zhang Zhengyou calibration method is used for calibration to obtain parameter data of the binocular camera, which provides technical support for subsequent image correction of the left-eye recognition image and the right-eye recognition image.
  • the stereo matching algorithm is used to perform stereo matching on the left-eye correction image and the right-eye correction image to obtain a disparity map. According to the disparity map, the distance data between the user's current position and the obstacle can be accurately calculated, so as to provide the user with corresponding navigation based on the distance data.
  • the computer vision-based navigation method further includes:
  • S601 Obtain a training image and a test image, where the training image and the test image carry the type of obstacle and the tag of the obstacle.
  • the training image is an image used to train the neural network model to generate a target obstacle recognition model.
  • the test image is an image used to verify the original obstacle recognition model.
  • the obstacle type refers to the type of the object that hinders the user from moving forward.
  • the obstacle type may be a movable obstacle or a fixed obstacle.
  • Obstructive object tags are tags of objects that hinder the user from moving forward.
  • obstructive object tags may be people, dogs, bicycles, trees, and so on.
  • S602 Input the training image into the neural network model for training, and obtain the original obstacle recognition model.
  • the training image with the obstacle object type and obstacle object label is input into the neural network model.
  • the neural network model converges, the original obstacle recognition model is obtained, and the neural network model is trained to quickly identify the obstacle in the subsequent object.
  • S603 Input the test image into the original obstacle recognition model, and obtain the recognition accuracy rate output by the original obstacle recognition model.
  • the recognition accuracy refers to the probability that the original obstacle recognition model can accurately identify the type of obstacle and the tag of the obstacle in the test image.
  • the recognition accuracy rate of obtaining the original obstacle recognition model refers to the quotient of the original recognition result of the recognition accuracy and the number of images of all test images.
  • the preset accuracy threshold is preset, and is used to determine whether the original obstacle recognition model can accurately recognize the type of obstacle and the threshold of the obstacle tag.
  • the preset accuracy threshold may be 90%.
  • the recognition accuracy rate is greater than the preset accuracy threshold, it indicates that the original obstacle recognition model is successfully trained, and the original obstacle recognition model is determined as the target obstacle recognition model, so as to ensure that there are obstacles in the target recognition image according to the target obstacle recognition model. Ensure the accuracy of obstacle recognition.
  • the training image is input into the neural network model for training, and the original obstacle recognition model is obtained so as to quickly identify obstacle objects in the subsequent.
  • the test image is input into the original obstacle recognition model, and the recognition accuracy rate output by the original obstacle recognition model is obtained to verify whether the original obstacle recognition model is successful.
  • the recognition accuracy is greater than the preset accuracy threshold, the original obstacle recognition model is determined as the target obstacle recognition model, so as to ensure that there are obstacles in the target recognition image according to the target obstacle recognition model, and to ensure the accuracy of obstacle recognition.
  • the obstacle object also carries an obstacle object type, and the obstacle object type includes, but is not limited to, a fixed obstacle object and a movable obstacle object.
  • the corresponding evasion reminder information is obtained according to the distance data and preset alarm conditions, and the evasion reminder information is played by the voice playback system, including:
  • the genetic algorithm is used for path planning, the second target route is obtained, and the second target route is obtained.
  • the voice playback system is used to play the evasion reminder message.
  • the genetic algorithm is a computational model that simulates the biological evolution process of natural selection and genetic mechanism of Darwin's biological evolution theory, and is a way to search for the optimal solution by simulating the natural evolution process.
  • the server uses a genetic algorithm according to the user's current position and the end position. Perform path planning to obtain the second target route, use the second target route as the avoidance reminder information, and use the voice playback system to play the avoidance reminder information to the user, so that the user can walk without obstacles based on the avoidance reminder information, so that the user does not need to use his eyes directly To check, you can safely navigate to the end position, especially for users with eye inconvenience or other situations where the road conditions cannot be checked in real time. Based on the distance data and preset alarm conditions, the route is planned for the user to ensure the user's travel safety.
  • the obstacle may or may not move at this time, the user is first reminded to stop, and then the obstacle is detected. If an obstacle-free object is detected within the preset stop time, the first target line is used as the avoidance reminder message, and the voice playback system is used to play the avoidance reminder message to remind the user to continue walking; if the obstacle is detected within the preset stop time
  • genetic algorithm is used to plan the path, the second target route is obtained, the second target route is used as the avoidance reminder information, and the voice playback system is used to play the avoidance reminder information.
  • the voice playback system is used to play the continue walking information according to the distance the user walks.
  • the continue walking information can be "You have walked XX meters, please walk straight ahead XX Turn left after a meter, XX meters away from the target location"; or a reminder time threshold may be used.
  • the reminder time threshold may be 5 minutes.
  • the voice playback system is used to play the message of continuing walking.
  • the genetic algorithm is used for path planning based on the user's current position and the end position , Acquire the second target route, use the second target route as the avoidance reminder information, and use the voice playback system to play the avoidance reminder information.
  • the obstacle type is a fixed obstacle
  • the second target route is planned for the user as the avoidance reminder information at this time, So that users can walk without obstacles based on the avoidance reminder information, so that users can safely navigate to the end position without directly checking with their eyes, especially for users with eye inconvenience or other situations where the road conditions cannot be checked in real time, ensuring user travel safety .
  • the obstacle is detected, and the evasion reminder is generated based on the detection result, and the voice playback system is used to play the evasion reminder so that the user can follow the evasion
  • the reminder information can be walked without barriers, so that the user can safely navigate to the target location without directly viewing it with his eyes.
  • a computer vision-based navigation device corresponds to the computer vision-based navigation method in the above-mentioned embodiment in a one-to-one correspondence.
  • the computer vision-based navigation device includes a navigation request information acquisition module 801, a first target route acquisition module 802, a current recognition result acquisition module 803, a distance data acquisition module 804, and an avoidance reminder information acquisition module 805.
  • the detailed description of each functional module is as follows:
  • the navigation request information obtaining module 801 is used to obtain navigation request information, and the navigation request information includes a starting point position and an ending point position.
  • the first target route acquisition module 802 is used for route planning according to the starting point position and the ending point position, acquiring the first target route, and playing the navigation voice data corresponding to the first target route by using a voice playback system.
  • the current recognition result acquisition module 803 is used to acquire the real-time video of the road condition corresponding to the first target route, extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain the target recognition image, and use the target obstacle recognition model to recognize the target The image is recognized and the current recognition result is obtained.
  • the distance data acquisition module 804 is configured to, if the current recognition result is that there is an obstacle, use a computer vision tool to perform binocular distance measurement on the obstacle, and determine the distance data between the user's current position and the obstacle.
  • the evasion reminder information acquisition module 805 is configured to acquire corresponding evasion reminder information according to the distance data and preset alarm conditions, and use a voice playback system to play the evasion reminder information.
  • the navigation request information acquisition module 801 includes: a location input reminder data playback unit, a target text acquisition unit, a speech synthesis unit, and a location confirmation information receiving unit.
  • the location input reminder data playback unit is used to use the voice playback system to play the location to input reminder data, and receive the voice data to be recognized based on the location reminder data input by the voice collection system.
  • the target text acquisition unit is used to recognize the voice data to be recognized by using a voice recognition model to obtain the target text.
  • the speech synthesis unit is used to synthesize the target text with speech synthesis technology, and obtain the to-be-confirmed speech data corresponding to the target text.
  • the location confirmation information receiving unit is used to play the voice data to be confirmed using the voice playback system, receive the location confirmation information sent by the client, and determine the navigation request information based on the target text and the location confirmation information.
  • the current recognition result acquisition module 803 includes: a to-be-processed image acquisition unit, a road condition recognition image acquisition unit, and a target recognition image acquisition unit.
  • the to-be-processed image acquisition unit is used to perform grayscale and binarization processing on the to-be-identified image to acquire the to-be-processed image.
  • the road condition recognition image acquisition unit is used to process the image to be processed by adopting the edge detection algorithm and the straight line detection algorithm to obtain the road condition recognition image.
  • the target recognition image acquisition unit is used to segment the obstacle object and the background of the road condition recognition image by using the threshold selection method to obtain the target recognition image.
  • the target recognition image includes a left-eye recognition image and a right-eye recognition image.
  • the distance data acquisition module 804 includes: a parameter data acquisition unit, an image correction unit, a disparity map acquisition unit, and a distance data determination unit.
  • the parameter data acquisition unit is used for calibration by Zhang Zhengyou calibration method to obtain parameter data of the binocular camera.
  • the image correction unit is used to perform image correction on the left-eye recognition image and the right-eye recognition image based on the parameter data, and obtain the left-eye correction image and the right-eye correction image.
  • the disparity map acquiring unit is used to perform stereo matching on the left-eye corrected image and the right-eye corrected image by using a stereo matching algorithm to obtain a disparity map.
  • the distance data determining unit is used to determine the distance data between the current position of the user and the obstacle based on the disparity map.
  • the computer vision-based navigation device further includes: training image and test image acquisition unit, original obstacle recognition model acquisition unit, recognition accuracy rate acquisition unit, and target obstacle recognition model determination unit.
  • the training image and test image acquisition unit is used to acquire the training image and the test image, and the training image and the test image carry the obstacle object type and the obstacle object label.
  • the original obstacle recognition model acquisition unit is used to input training images into the neural network model for training, and obtain the original obstacle recognition model.
  • the recognition accuracy rate acquisition unit is used to input the test image into the original obstacle recognition model to obtain the recognition accuracy rate output by the original obstacle recognition model.
  • the target obstacle recognition model determination unit is configured to determine the original obstacle recognition model as the target obstacle recognition model if the recognition accuracy rate is greater than the preset accuracy threshold.
  • the obstacle also carries the type of the obstacle;
  • the avoidance reminder information acquisition module 805 includes: a first judgment unit and a second judgment unit.
  • the first judging unit is configured to, if the distance data meets the preset warning condition, and the type of obstacle carried by the obstacle is a fixed obstacle, based on the user's current position and end position, the genetic algorithm is used to plan the path to obtain the second target route, The second target route is used as the evasion reminder information, and the voice playback system is used to play the evasion reminder information.
  • the second judging unit is used to detect the obstacle if the distance data meets the preset alarm condition and the obstacle type carried by the obstacle is a movable obstacle, generate an avoidance reminder message based on the detection result, and use the voice playback system to play the avoidance Reminder information.
  • the various modules in the above-mentioned computer vision-based navigation device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 10.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a readable storage medium and an internal memory.
  • the readable storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer readable instructions in the readable storage medium.
  • the database of the computer equipment is used to store evasion reminder information.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instructions are executed by the processor to realize a navigation method based on computer vision.
  • a computer device including a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor.
  • the processor executes the computer-readable instructions to implement the The steps of the computer vision navigation method, such as steps S201-S205 shown in FIG. 2, or the steps shown in FIG. 3 to FIG. 7, are not repeated here in order to avoid repetition.
  • the functions of the modules/units in the embodiment of the computer vision-based navigation device are implemented, for example, as shown in FIG. 802.
  • the functions of the current recognition result acquisition module 803, the distance data acquisition module 804, and the avoidance reminder information acquisition module 805 are not repeated here to avoid repetition.
  • one or more readable storage media storing computer readable instructions are provided.
  • the readable storage medium stores computer readable instructions.
  • the computer readable instructions are executed by a processor, the foregoing implementation is implemented.
  • the steps of the computer vision-based navigation method in the example such as steps S201-S205 shown in FIG. 2, or the steps shown in FIG. 3 to FIG. 7, are not repeated here to avoid repetition.
  • the processor executes the computer-readable instructions, the functions of the modules/units in the embodiment of the computer vision-based navigation device are implemented, for example, as shown in FIG. 802.
  • the functions of the current recognition result acquisition module 803, the distance data acquisition module 804, and the avoidance reminder information acquisition module 805 are not repeated here to avoid repetition.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Automation & Control Theory (AREA)
  • Navigation (AREA)
  • Traffic Control Systems (AREA)

Abstract

A navigation method and apparatus based on computer vision, a computer device, and a storage medium. The method comprises: obtaining a first target route, and using a voice broadcasting system to broadcast navigation voice data corresponding to the first target route; obtaining a real-time road condition video corresponding to the first target route, extracting, from the real-time road condition video, an image to be identified, preprocessing the image to be identified so as to obtain a target identification image, and using a target barrier identification model to identify the target identification image so as to obtain the current identification result; if the current identification result is that there is a barrier object, using a computer vision tool to perform binocular distance measurement on the barrier object so as to determine distance data between the current position of a user and the barrier object; and obtaining corresponding avoidance prompting information according to the distance data and a preset alarm condition, using the voice broadcasting system to broadcast the avoidance prompting information, and planning a navigation route for the user, thereby ensuring the traveling safety of the user.

Description

基于计算机视觉的导航方法、装置、计算机设备及介质Computer vision-based navigation method, device, computer equipment and medium
本申请要求于 20191225日提交中国专利局、申请号为201911356786.X,发明名称为“基于计算机视觉的导航方法、装置、计算机设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。 This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on December 25 , 2019 , the application number is 201911356786.X, and the invention title is "Computer Vision-based Navigation Methods, Devices, Computer Equipment and Media", all of which The content is incorporated in this application by reference.
技术领域Technical field
本申请人工智能导航领域,尤其涉及一种基于计算机视觉的导航方法、装置、计算机设备及存储介质。The field of artificial intelligence navigation of this application, in particular, relates to a navigation method, device, computer equipment, and storage medium based on computer vision.
背景技术Background technique
越来越多的用户在客户端上安装导航软件,以便根据起点和终点为用户提供路线导航。现有导航系统中一般有语音合成、朗读文字、放大缩小和触摸反馈等功能,为用户提供了便利,帮助用户规划路线和提供出行方式建议等。采用现有导航系统进行路线导航过程中,发明人发现用眼不方便的用户无法实时感知导航路线上的实时路况,使其依据导航路线运动时容易出现危险,此处的用眼不方便的用户可以是视力障碍用户或者由于其他原因不能专注观看实时路况的用户。More and more users install navigation software on the client to provide users with route navigation based on the starting point and ending point. Existing navigation systems generally have functions such as speech synthesis, text reading, zoom in and zoom out, and touch feedback, which provide users with convenience, help users plan routes and provide travel mode suggestions. In the process of route navigation using the existing navigation system, the inventor found that users with inconvenient eyes cannot perceive the real-time road conditions on the navigation route in real time, making them prone to danger when moving according to the navigation route. Users with inconvenient eyes here It can be a visually impaired user or a user who cannot concentrate on watching the real-time road conditions due to other reasons.
发明内容Summary of the invention
本申请实施例提供一种基于计算机视觉的导航方法、装置、计算机设备及存储介质,以解决用眼不方便的用户根据现有导航系统推荐的导航路线运动过程中容易出现危险的问题。The embodiments of the present application provide a computer vision-based navigation method, device, computer equipment, and storage medium to solve the problem that users who are inconvenient to use the navigation route recommended by the existing navigation system are prone to danger when moving.
一种基于计算机视觉的导航方法,包括:A navigation method based on computer vision, including:
获取导航请求信息,所述导航请求信息包含起点位置和终点位置;Acquiring navigation request information, where the navigation request information includes a starting point position and an ending point position;
根据所述起点位置和所述终点位置进行路线规划,获取第一目标路线,采用语音播放系统播放与所述第一目标路线相对应的导航语音数据;Perform route planning according to the starting point position and the ending point position, obtain a first target route, and use a voice playback system to play navigation voice data corresponding to the first target route;
获取所述第一目标路线对应的路况实时视频,从所述路况实时视频中提取待识别图像,对所述待识别图像进行预处理,获取目标识别图像,采用目标障碍识别模型对所述目标识别图像进行识别,获取当前识别结果;Acquire a real-time video of the road condition corresponding to the first target route, extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain a target recognition image, and use a target obstacle recognition model to recognize the target Recognize the image and obtain the current recognition result;
若所述当前识别结果为存在障碍物体,则采用计算机视觉工具对所述障碍物体进行双目测距,确定用户当前位置与所述障碍物体的距离数据;If the current recognition result is that there is an obstacle, a computer vision tool is used to perform binocular distance measurement on the obstacle to determine the distance data between the user's current position and the obstacle;
根据所述距离数据与预设告警条件,获取对应的规避提醒信息,采用所述语音播放系统播放所述规避提醒信息。According to the distance data and preset alarm conditions, the corresponding evasion reminder information is obtained, and the voice playback system is used to play the evasion reminder information.
一种基于计算机视觉的导航装置,包括:A navigation device based on computer vision, including:
导航请求信息获取模块,用于获取导航请求信息,所述导航请求信息包含起点位置和终点位置;A navigation request information acquisition module, configured to acquire navigation request information, where the navigation request information includes a starting point position and an ending point position;
第一目标路线获取模块,用于根据所述起点位置和所述终点位置进行路线规划,获取第一目标路 线,采用语音播放系统播放与所述第一目标路线相对应的导航语音数据;The first target route acquisition module is configured to perform route planning according to the starting point position and the ending point position, acquire the first target route, and play the navigation voice data corresponding to the first target route by using a voice playback system;
当前识别结果获取模块,用于获取所述第一目标路线对应的路况实时视频,从所述路况实时视频中提取待识别图像,对所述待识别图像进行预处理,获取目标识别图像,采用目标障碍识别模型对所述目标识别图像进行识别,获取当前识别结果;The current recognition result obtaining module is used to obtain the real-time video of the road conditions corresponding to the first target route, extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain the target recognition image, and use the target The obstacle recognition model recognizes the target recognition image and obtains the current recognition result;
距离数据获取模块,用于若所述当前识别结果为存在障碍物体,则采用计算机视觉工具对所述障碍物体进行双目测距,确定用户当前位置与所述障碍物体的距离数据;The distance data acquisition module is configured to, if the current recognition result is that there is an obstacle, use a computer vision tool to perform binocular distance measurement on the obstacle, and determine the distance data between the user's current position and the obstacle;
规避提醒信息获取模块,用于根据所述距离数据与预设告警条件,获取对应的规避提醒信息,采用所述语音播放系统播放所述规避提醒信息。The evasion reminder information acquisition module is configured to obtain corresponding evasion reminder information according to the distance data and preset alarm conditions, and use the voice playback system to play the evasion reminder information.
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其中,所述处理器执行所述计算机可读指令时实现如下步骤:A computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, wherein the processor implements the following steps when the processor executes the computer-readable instructions:
获取导航请求信息,所述导航请求信息包含起点位置和终点位置;Acquiring navigation request information, where the navigation request information includes a starting point position and an ending point position;
根据所述起点位置和所述终点位置进行路线规划,获取第一目标路线,采用语音播放系统播放与所述第一目标路线相对应的导航语音数据;Perform route planning according to the starting point position and the ending point position, obtain a first target route, and use a voice playback system to play navigation voice data corresponding to the first target route;
获取所述第一目标路线对应的路况实时视频,从所述路况实时视频中提取待识别图像,对所述待识别图像进行预处理,获取目标识别图像,采用目标障碍识别模型对所述目标识别图像进行识别,获取当前识别结果;Acquire a real-time video of the road condition corresponding to the first target route, extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain a target recognition image, and use a target obstacle recognition model to recognize the target Recognize the image and obtain the current recognition result;
若所述当前识别结果为存在障碍物体,则采用计算机视觉工具对所述障碍物体进行双目测距,确定用户当前位置与所述障碍物体的距离数据;If the current recognition result is that there is an obstacle, a computer vision tool is used to perform binocular distance measurement on the obstacle to determine the distance data between the user's current position and the obstacle;
根据所述距离数据与预设告警条件,获取对应的规避提醒信息,采用所述语音播放系统播放所述规避提醒信息。According to the distance data and preset alarm conditions, the corresponding evasion reminder information is obtained, and the voice playback system is used to play the evasion reminder information.
一个或多个存储有计算机可读指令的可读存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:One or more readable storage media storing computer readable instructions, where when the computer readable instructions are executed by one or more processors, the one or more processors execute the following steps:
获取导航请求信息,所述导航请求信息包含起点位置和终点位置;Acquiring navigation request information, where the navigation request information includes a starting point position and an ending point position;
根据所述起点位置和所述终点位置进行路线规划,获取第一目标路线,采用语音播放系统播放与所述第一目标路线相对应的导航语音数据;Perform route planning according to the starting point position and the ending point position, obtain a first target route, and use a voice playback system to play navigation voice data corresponding to the first target route;
获取所述第一目标路线对应的路况实时视频,从所述路况实时视频中提取待识别图像,对所述待识别图像进行预处理,获取目标识别图像,采用目标障碍识别模型对所述目标识别图像进行识别,获取当前识别结果;Acquire a real-time video of the road condition corresponding to the first target route, extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain a target recognition image, and use a target obstacle recognition model to recognize the target Recognize the image and obtain the current recognition result;
若所述当前识别结果为存在障碍物体,则采用计算机视觉工具对所述障碍物体进行双目测距,确定用户当前位置与所述障碍物体的距离数据;If the current recognition result is that there is an obstacle, a computer vision tool is used to perform binocular distance measurement on the obstacle to determine the distance data between the user's current position and the obstacle;
根据所述距离数据与预设告警条件,获取对应的规避提醒信息,采用所述语音播放系统播放所述规避提醒信息。According to the distance data and preset alarm conditions, the corresponding evasion reminder information is obtained, and the voice playback system is used to play the evasion reminder information.
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。The details of one or more embodiments of the present application are presented in the following drawings and description, and other features and advantages of the present application will become apparent from the description, drawings and claims.
上述基于计算机视觉的导航方法、装置、计算机设备及存储介质,根据所述起点位置和所述终点 位置进行路线规划,获取第一目标路线,采用语音播放系统播放与所述第一目标路线相对应的导航语音数据,以便为用户提供语音导航,方便用户根据听到的导航语音数据进行出行。获取所述第一目标路线对应的路况实时视频,从所述路况实时视频中提取待识别图像,对所述待识别图像进行预处理,获取目标识别图像,采用目标障碍识别模型对所述目标识别图像进行识别,获取当前识别结果,以判断用户沿第一目标路线前进时是否存在障碍物体。在所述当前识别结果为存在障碍物体,则采用计算机视觉工具对所述障碍物体进行双目测距,以快速确定用户当前位置与所述障碍物体的距离数据。根据距离数据预设告警条件,获取对应的规避提醒信息并采用所述语音播放系统播放,从而为用眼不便的用户提供无障碍的前进方案,规避了由于用户用眼不便或者其他无法实时查看路况的情况,因不能看到存在的障碍物体而可能造成的危险,保障用户出行安全。The above-mentioned computer vision-based navigation method, device, computer equipment and storage medium carry out route planning according to the starting point position and the ending point position, obtain the first target route, and use the voice playback system to play the corresponding first target route Navigation voice data in order to provide users with voice navigation, which is convenient for users to travel based on the navigation voice data they hear. Acquire a real-time video of the road condition corresponding to the first target route, extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain a target recognition image, and use a target obstacle recognition model to recognize the target The image is recognized, and the current recognition result is obtained to determine whether there is an obstacle when the user advances along the first target route. When the current recognition result is that there is an obstacle, a computer vision tool is used to perform binocular distance measurement on the obstacle to quickly determine the distance data between the user's current position and the obstacle. Pre-set alarm conditions based on the distance data, obtain the corresponding evasion reminder information and use the voice playback system to play, so as to provide a barrier-free forward solution for users with eye inconvenience, avoiding the inconvenience of eyes or other inability to view road conditions in real time Under the circumstances, the danger that may be caused by the inability to see the existing obstacles, to ensure the safety of users’ travel.
附图说明Description of the drawings
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.
图1是本申请一实施例中基于计算机视觉的导航方法的一应用环境示意图;Fig. 1 is a schematic diagram of an application environment of a computer vision-based navigation method in an embodiment of the present application;
图2是本申请一实施例中基于计算机视觉的导航方法的一流程图;Fig. 2 is a flowchart of a computer vision-based navigation method in an embodiment of the present application;
图3是本申请一实施例中基于计算机视觉的导航方法的一流程图;Fig. 3 is a flowchart of a computer vision-based navigation method in an embodiment of the present application;
图4是本申请一实施例中基于计算机视觉的导航方法的一流程图;Fig. 4 is a flowchart of a computer vision-based navigation method in an embodiment of the present application;
图5是本申请一实施例中基于计算机视觉的导航方法的一流程图;Fig. 5 is a flowchart of a computer vision-based navigation method in an embodiment of the present application;
图6是本申请一实施例中基于计算机视觉的导航方法的一流程图;Fig. 6 is a flowchart of a computer vision-based navigation method in an embodiment of the present application;
图7是本申请一实施例中基于计算机视觉的导航方法的一流程图;Fig. 7 is a flowchart of a computer vision-based navigation method in an embodiment of the present application;
图8是本申请一实施例中基于计算机视觉的导航装置的一原理框图;Fig. 8 is a functional block diagram of a navigation device based on computer vision in an embodiment of the present application;
图9是本申请一实施例中双目测距的原理示意图;FIG. 9 is a schematic diagram of the principle of binocular ranging in an embodiment of the present application;
图10是本申请一实施例中计算机设备的一示意图。Fig. 10 is a schematic diagram of a computer device in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本申请实施例提供的基于计算机视觉的导航方法,该基于计算机视觉的导航方法可应用如图1所示的应用环境中。具体地,该基于计算机视觉的导航方法应用在导航系统中,该导航系统包括如图1所示的客户端和服务器,客户端与服务器通过网络进行通信,该导航系统采用计算机视觉工具实现为不方便用眼的用户提供导航,并提供相应的规避方案,保障用户出行安全。其中,客户端又称为用户端,是指与服务器相对应,为客户提供本地服务的程序。客户端可安装在但不限于各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备上。服务器可以用独立的服务器或者是多个服务器组成 的服务器集群来实现。The computer vision-based navigation method provided by the embodiments of the present application can be applied to the application environment as shown in FIG. 1. Specifically, the computer vision-based navigation method is applied to a navigation system. The navigation system includes a client and a server as shown in FIG. It is convenient for users with eyes to provide navigation and provide corresponding circumvention solutions to ensure user travel safety. Among them, the client is also called the client, which refers to the program that corresponds to the server and provides local services to the client. The client can be installed on, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server can be implemented as an independent server or a server cluster composed of multiple servers.
在一实施例中,如图2所示,提供一种基于计算机视觉的导航方法,以该方法应用在图1中的服务器为例进行说明,包括如下步骤:In an embodiment, as shown in FIG. 2, a computer vision-based navigation method is provided. Taking the method applied to the server in FIG. 1 as an example for description, the method includes the following steps:
S201:获取导航请求信息,导航请求信息包含起点位置和终点位置。S201: Acquire navigation request information, where the navigation request information includes a starting point position and an ending point position.
其中,导航请求信息是指用户通过客户端发送给服务器,请求服务器根据起点位置和终点位置进行路线规划的信息。起点位置是用户自主确定的需要进行导航路线的起点所在的位置。终点位置是用户自主确定的需要根据导航路线的终点所在的位置。Among them, the navigation request information refers to the information that the user sends to the server through the client, and requests the server to plan the route according to the starting point and the ending point. The starting point location is the location where the starting point of the navigation route is determined independently by the user. The end position is the position where the end point of the navigation route needs to be determined independently by the user.
S202:根据起点位置和终点位置进行路线规划,获取第一目标路线,采用语音播放系统播放与第一目标路线相对应的导航语音数据。S202: Carry out route planning according to the starting point position and the ending point position, obtain the first target route, and use the voice playback system to play the navigation voice data corresponding to the first target route.
其中,第一目标路线是指根据导航请求信息进行规划获得的从起点位置走到终点位置的路线。导航语音数据是指为用户提供导航的语音数据,该导航语音数据与第一目标路线相对应,例如,导航语音数据可以是“请往左前方走xx米,然后右转”或者“您已偏离路线等”。语音播放系统播放是指用于进行语音播放的系统,例如,语音播放系统可以播放第一目标路线。Among them, the first target route refers to a route from the starting point position to the ending position obtained by planning according to the navigation request information. Navigation voice data refers to the voice data that provides navigation for the user. The navigation voice data corresponds to the first target route. For example, the navigation voice data can be "please walk xx meters to the left and then turn right" or "you have deviated Route etc.". Voice playback system playback refers to a system used for voice playback. For example, the voice playback system can play the first target route.
具体地,服务器获取到导航请求信息后,将导航请求信息中的起点位置和终点位置输入至导航系统中,并获取导航系统反馈的第一目标路线,采用语音播放系统播放与第一目标线路相对应的导航语音数据,以便为用户提供语音导航,以使用眼不方便的用户可以根据播放的导航语音数据,获取相应的第一目标路线。作为一示例,导航系统根据起点位置和终点位置规划得到的导航路线可以有多条,本实施例中可以选取行走时间最短的路线作为第一目标路线。Specifically, after the server obtains the navigation request information, it inputs the start position and the end position in the navigation request information into the navigation system, and obtains the first target route fed back by the navigation system, and uses the voice playback system to play the first target route. Corresponding navigation voice data, so as to provide users with voice navigation, so that users who are inconvenient to use can obtain the corresponding first target route according to the played navigation voice data. As an example, there may be multiple navigation routes planned by the navigation system according to the starting position and the ending position. In this embodiment, the route with the shortest walking time may be selected as the first target route.
S203:获取第一目标路线对应的路况实时视频,从路况实时视频中提取待识别图像,对待识别图像进行预处理,获取目标识别图像,采用目标障碍识别模型对目标识别图像进行识别,获取当前识别结果。S203: Obtain a real-time video of the road condition corresponding to the first target route, extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain the target recognition image, use the target obstacle recognition model to recognize the target recognition image, and obtain the current recognition result.
其中,路况实时视频是指用户根据导航语音数据行走时,客户端实时拍摄的视频。待识别图像是指需要进行识别的图像。本实施例中,采用视频提取图片软件提取路况实时视频中的待识别图像,例如,采用视频提取图片软件提取图像的频率可以为每10秒在路况实时视频中提取一张待识别图像;或者采用图像采集端口提取路况实时视频中的待识别图像,例如,采用图像采集端口的频率可以为10秒在路况实时视频中提取一张待识别图像。目标识别图像是指对待识别图像进行预处理获得的图像。Among them, the real-time video of road conditions refers to the video captured by the client in real time when the user is walking according to the navigation voice data. The image to be recognized refers to the image that needs to be recognized. In this embodiment, the video image extraction software is used to extract the image to be recognized in the real-time video of the road condition. For example, the frequency of the image extraction using the video image extraction software can be to extract one image to be recognized in the real-time video of the road condition every 10 seconds; or The image acquisition port extracts the image to be identified in the real-time video of the road condition. For example, the frequency of the image acquisition port can be 10 seconds to extract an image to be identified from the real-time video of the road condition. The target recognition image refers to the image obtained by preprocessing the image to be recognized.
目标障碍识别模型是用于识别图像中的障碍物体的模型。本实施例中,采用目标障碍识别模型对目标识别图像进行识别,以判断用户沿第一目标路线前进行走时,路上是否出现妨碍用户前进的障碍物体。当前识别结果是目标障碍识别模型对目标识别图像的识别结果。障碍物体是指用户沿第一目标路线前进时,妨碍用户前进的物体。The target obstacle recognition model is a model used to recognize obstacle objects in an image. In this embodiment, the target obstacle recognition model is used to recognize the target recognition image, so as to determine whether there is an obstacle on the road that prevents the user from moving forward when the user walks along the first target route. The current recognition result is the recognition result of the target recognition image by the target obstacle recognition model. Obstacle objects refer to objects that hinder the user's progress when the user advances along the first target route.
具体地,在用户根据导航语音数据行走前,开启客户端的摄像头进行视频录制,以获取路况实时视频,采用视频提取图片软件或者图像采集端口从路况实时视频中提取待识别图像,对待识别图像进行灰度化等预处理以获取目标识别图像,采用目标障碍识别模型对目标识别图像进行识别,获取用户沿第一目标路线前进时是否可能存在障碍物体的当前识别结果,以便后续根据当前识别结果进行避障处理,保障用户出行安全。Specifically, before the user walks according to the navigation voice data, the client's camera is turned on for video recording to obtain real-time video of the road condition, and the image to be recognized is extracted from the real-time video of the road condition by using video image extraction software or the image collection port, and the image to be recognized is grayed out. To obtain the target recognition image, use the target obstacle recognition model to recognize the target recognition image, and obtain the current recognition result of whether there may be obstacles when the user moves along the first target route, so that the subsequent avoidance can be performed based on the current recognition result. Handling of obstacles to ensure the safety of users’ travel.
S204:若当前识别结果为存在障碍物体,则采用计算机视觉工具对障碍物体进行双目测距,确定用户当前位置与障碍物体的距离数据。S204: If the current recognition result is that there is an obstacle, use a computer vision tool to perform binocular distance measurement on the obstacle, and determine the distance data between the user's current position and the obstacle.
其中,计算机视觉是指用摄影机和电脑代替人眼睛对障碍物体进行识别、跟踪和测量等机器视觉。计算机视觉工具包括但不限于Halcon、MATLAB+Simulink和OpenCV等。用户当前位置是指用户当前所在位置。距离数据是指用户当前位置到障碍物体的距离的数据,距离数据具体是障碍物体的三维坐标与用户当前位置的三维坐标对应的距离,用户当前位置的三维坐标为原点坐标。双目测距是指通过计算机视觉工具对从路况实时视频中提取的图像进行计算,以确定用户当前位置与障碍物体的距离的过程。Among them, computer vision refers to machine vision that uses cameras and computers instead of human eyes to identify, track, and measure obstacles. Computer vision tools include but are not limited to Halcon, MATLAB+Simulink and OpenCV. The user's current location refers to the user's current location. The distance data refers to the data of the distance between the user's current position and the obstacle. The distance data is specifically the distance between the three-dimensional coordinates of the obstacle and the three-dimensional coordinates of the user's current position. The three-dimensional coordinates of the user's current position are the origin coordinates. Binocular distance measurement refers to the process of calculating the image extracted from the real-time video of road conditions through computer vision tools to determine the distance between the user's current position and the obstacle.
具体地,若当前识别结果为存在障碍物体,为了判断该障碍物体是否会影响用户前进,本实施例采用OpenCV工具对从路况实时视频中提取的图像进行计算,以快速获知从用户当前位置到障碍物体位置的距离数据。在用户用眼不便的情况下,根据计算机视觉工具计算用户与障碍物体的距离数据,从而可以准确判断障碍物体是否会妨碍用户前进,以便后续得出障碍物体对应的规避提醒信息提供数据,以保障用户出行安全。Specifically, if the current recognition result is that there is an obstacle, in order to determine whether the obstacle will affect the user's progress, this embodiment uses the OpenCV tool to calculate the image extracted from the real-time video of the road condition to quickly learn from the user’s current location to the obstacle. The distance data of the object position. When the user’s eyes are inconvenient, the distance data between the user and the obstacle can be calculated according to the computer vision tool, so that it can accurately determine whether the obstacle will hinder the user from moving forward, so that the corresponding evasion reminder information corresponding to the obstacle can be obtained later to provide data to ensure User travel safety.
S205:根据距离数据与预设告警条件,获取对应的规避提醒信息,采用语音播放系统播放规避提醒信息。S205: Obtain corresponding evasion reminder information according to the distance data and preset alarm conditions, and use a voice playback system to play the evasion reminder information.
其中,预设告警条件是指预先设定,根据障碍物体是否会妨碍用户前进而设置提醒条件。规避提醒信息是指通过对距离数据与预设告警条件进行判断后生成的提醒信息,例如,在障碍物体不会妨碍到用户时,规避提醒信息可以是“请注意左前方x米处存在xx障碍,请继续往前走”,或者,在障碍物体较可能妨碍到用户时,规避提醒信息可以是“请注意左前方x米处存在xx障碍,请止步”,或者,在障碍物体使用户无法前进时,规避提醒信息可以是“请注意左前方x米处存在xx障碍,请求更换第一目标路线”等。该规避提醒信息可以为用户提供无障碍的前进方案,规避了由于用户用眼不便,不能看到存在的障碍物体而可能造成的危险,保障用户出行安全。Among them, the preset alarm condition refers to a preset alarm condition, and the alarm condition is set according to whether the obstacle will hinder the user from moving forward. Evasion reminder information refers to the reminder information generated by judging distance data and preset alarm conditions. For example, when obstacles will not hinder the user, the evasion reminder message can be "Please pay attention to the presence of xx obstacles x meters in front of the left. , Please continue to move forward", or, when an obstacle is likely to hinder the user, the avoidance reminder message can be "Please note that there is an xx obstacle at x meters from the front left, please stop", or the obstacle prevents the user from moving forward At the time, the avoidance reminder message may be "Please note that there is an xx obstacle at x meters in front of the left, request to change the first target route", etc. The avoidance reminder information can provide users with a barrier-free forwarding solution, avoid the danger that may be caused by the inconvenience of the user's eyes and the inability to see the existing obstacles, and ensure the user's travel safety.
具体地,采用双目测距对存在障碍物体的目标识别图像进行测距,以获取用户用户当前位置和障碍物体的距离数据,然后根据距离数据和预设告警条件,获取对应的规避提醒信息,并采用语音播放系统播放所获取的规避提醒信息,从而为用眼不便的用户提供无障碍的前进方案,规避了由于用户用眼不便或者其他无法实时查看路况的情况,因不能看到存在的障碍物体而可能造成的危险,保障用户出行安全。相比现有导航系统只能为用户提供线路,本实施例中,通过对障碍物体进行识别并采用计算机视觉工具进行双目测距,以快速获取用户当前位置和障碍物体距离的距离数据,生成相应的规避提醒信息,确保用眼不便的用户可以依据规避提醒信息正常出行,保障用户出行安全。Specifically, using binocular ranging to measure the target recognition image with obstacles to obtain the user’s current location and distance data of the obstacle, and then obtain the corresponding evasion reminder information based on the distance data and preset alarm conditions, And use the voice playback system to play the obtained avoidance reminder information, so as to provide a barrier-free forward solution for users with eye inconvenience, avoiding the obstacles that cannot be seen due to the inconvenience of eyes or other situations where the user cannot view the road conditions in real time. The possible dangers caused by objects, to ensure the safety of users. Compared with the existing navigation system, which can only provide users with routes, in this embodiment, obstacles are identified and computer vision tools are used for binocular distance measurement to quickly obtain the distance data of the user’s current position and the distance of the obstacles. Corresponding evasion reminder information ensures that users who are inconvenient can travel normally based on the evasion reminder information and protect users' travel safety.
本实施所提供的基于计算机视觉的导航方法中,根据起点位置和终点位置进行路线规划,获取第一目标路线,采用语音播放系统播放与第一目标路线相对应的导航语音数据,以便为用户提供语音导航,方便用户根据听到的导航语音数据进行出行。获取第一目标路线对应的路况实时视频,从路况实时视频中提取待识别图像,对待识别图像进行预处理,获取目标识别图像,采用目标障碍识别模型对目标识别图像进行识别,获取当前识别结果,以判断用户沿第一目标路线前进时是否存在障碍物体。在当前识别结果为存在障碍物体,则采用计算机视觉工具对障碍物体进行双目测距,以快速确定用户当前位置与障碍物体的距离数据。根据距离数据预设告警条件,获取对应的规避提醒信息并采用语音播放系统播放,从而为用眼不便的用户提供无障碍的前进方案,规避了由于用户用眼不便或者其他无法实时查看路况的 情况,因不能看到存在的障碍物体而可能造成的危险,保障用户出行安全。In the computer vision-based navigation method provided in this implementation, route planning is performed according to the starting point and the ending point, the first target route is obtained, and the voice playback system is used to play the navigation voice data corresponding to the first target route, so as to provide users with Voice navigation makes it convenient for users to travel based on the navigation voice data they hear. Obtain the real-time video of the road condition corresponding to the first target route, extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain the target recognition image, use the target obstacle recognition model to recognize the target recognition image, and obtain the current recognition result, To determine whether there is an obstacle when the user moves along the first target route. When the current recognition result is that there is an obstacle, a computer vision tool is used to perform binocular distance measurement on the obstacle to quickly determine the distance data between the user's current position and the obstacle. Preset warning conditions based on the distance data, obtain the corresponding evasion reminder information and use the voice playback system to play, so as to provide a barrier-free forward plan for users with eye inconvenience, avoiding the situation that users with eye inconvenience or other situations where the user cannot view the road conditions in real time , The danger that may be caused by the inability to see the existing obstacles, to ensure the safety of users.
在一实施例中,步骤S201中的导航请求信息是用户自主输入的起点位置和终点位置对应的信息,具体可以是用户直接在客户端上以文字输入方式输入的起点位置和终点位置,也可以是采用自动定位技术确定的起点位置和终点位置,还可采用语音输入方式输入的起点位置和终点位置。如图3所示,步骤S201,即获取导航请求信息,包括:In an embodiment, the navigation request information in step S201 is the information corresponding to the start position and the end position independently input by the user. Specifically, it may be the start position and the end position input by the user directly on the client by text input, or It is the start and end positions determined by automatic positioning technology, and the start and end positions can also be input by voice input. As shown in Figure 3, step S201, namely obtaining navigation request information, includes:
S301:采用语音播放系统播放位置输入提醒数据,接收语音采集系统基于位置提醒数据输入的待识别语音数据。S301: Use the voice playback system to input reminder data at the playback position, and receive the to-be-recognized voice data input by the voice collection system based on the position reminder data.
其中,位置输入提醒数据是指语音播放系统发出的,提醒用户输入位置的数据。位置输入提醒数据具体包括起点位置输入提醒数据和终点位置输入提醒数据,例如,起点位置输入提醒数据可以是“请输入起点位置”。待识别语音数据是用户说的包含起点位置或者终点位置的数据。语音采集系统是用于采集用户语音数据的系统,可以是客户端内置的麦克风。Among them, the location input reminder data refers to the data issued by the voice playback system to remind the user to input the location. The position input reminder data specifically includes the start position input reminder data and the end position input reminder data. For example, the start position input reminder data may be "please enter the start position". The voice data to be recognized is the data that the user said contains the starting position or the ending position. The voice collection system is a system used to collect user voice data, which can be a microphone built into the client.
具体地,用户可通过客户端自主选择语音输入模式,在语音输入模式下,采用语音播放系统播放位置输入提醒数据,用户在预设等待时间内根据位置输入提醒数据说出与位置输入提醒数据相对应的待识别语音数据,语音采集系统采集到待识别语音数据并发送给服务器。预设等待时间是预先设置的等待用户反馈数据的时间,例如,预设等待时间可以是1分钟。Specifically, the user can independently select the voice input mode through the client. In the voice input mode, the voice playback system is used to play the position to input the reminder data. The user enters the reminder data according to the position within the preset waiting time. Corresponding to the voice data to be recognized, the voice collection system collects the voice data to be recognized and sends it to the server. The preset waiting time is a preset time for waiting for user feedback data. For example, the preset waiting time may be 1 minute.
S302:采用语音识别模型对待识别语音数据进行识别,获取目标文字。S302: Use a voice recognition model to recognize the voice data to be recognized, and obtain the target text.
语音识别模型是预先训练好的,以用于识别待识别语音数据中的文字内容的模型。目标文字是指待识别语音数据对应的文字,具体是起点位置或者终点位置所对应的文字。本实施例中,采用语音识别模型对待识别语音数据进行识别,可以快速获取包含起点位置或者终点位置的目标文字,以便后续为用户规划路线。The voice recognition model is a model that is pre-trained to recognize the text content in the voice data to be recognized. The target text refers to the text corresponding to the voice data to be recognized, specifically the text corresponding to the start position or the end position. In this embodiment, the voice recognition model is used to recognize the voice data to be recognized, and the target text including the starting point or the ending point can be quickly obtained, so as to subsequently plan a route for the user.
S303:采用语音合成技术对目标文字进行语音合成,获取与目标文字相对应的待确认语音数据。S303: Use the speech synthesis technology to perform speech synthesis on the target text, and obtain the to-be-confirmed speech data corresponding to the target text.
其中,语音合成技术是将计算机产生的或输入的文字信息转变为语音输出的技术。待确认语音数据是指对目标文字进行语音合成处理后获得的语音数据。本实施例中,对目标文字进行语音合成,以便获取与目标文字相对应的待确认语音数据,以供用户确定起点位置或者终点位置是否准确,确保后续生成的路线的准确性。Among them, speech synthesis technology is a technology that converts text information generated or input by a computer into speech output. The voice data to be confirmed refers to the voice data obtained after speech synthesis processing is performed on the target text. In this embodiment, speech synthesis is performed on the target text to obtain the to-be-confirmed speech data corresponding to the target text for the user to determine whether the starting point or the ending point is accurate, so as to ensure the accuracy of the subsequently generated route.
S304:采用语音播放系统播放待确认语音数据,接收客户端发送的位置确认信息,基于目标文字和位置确认信息,确定导航请求信息。S304: Use the voice playback system to play the voice data to be confirmed, receive the location confirmation information sent by the client, and determine the navigation request information based on the target text and the location confirmation information.
其中,位置确认信息是指用户确认目标文字的起点位置或者终点位置是准确的信息。本实施例中,采用语音播放系统播放待确认语音数据,在预设等待时间内接收客户端发送的位置确认信息,该位置确认信息可以是确认无误信息,即用于确认目标文字准确无误的信息;也可以是确认有误信息,即用于确认目标文字不准确需要进行修改的信息。Wherein, the position confirmation information refers to the information that the user confirms that the start position or the end position of the target text is accurate. In this embodiment, the voice playback system is used to play the voice data to be confirmed, and the location confirmation information sent by the client is received within a preset waiting time. The location confirmation information may be confirmation information, that is, information used to confirm that the target text is accurate and correct. ; It can also be the confirmation of incorrect information, that is, the information that needs to be modified to confirm that the target text is inaccurate.
基于目标文字和位置确认信息,确定导航请求信息,具体包括:若位置确认信息是确认无误信息,则基于目标文字确定导航请求信息;若位置确认信息是确定有误信息,则重复采用语音播放系统播放位置输入提醒数据,接收语音采集系统基于位置提醒数据输入的待识别语音数据的步骤及其以后的步骤,即重复执行步骤S301-S304,直至获取到确认无误信息,根据目标文字确定导航请求信息。本实施例通 过语音播放系统等人机交互的方式实现用户与客户端交互,实现为用眼不便的用户提供智能化的位置输入方法,以便后续进行规划路线。Determine the navigation request information based on the target text and location confirmation information, including: if the location confirmation information is confirmed and correct, then the navigation request information is determined based on the target text; if the location confirmation information is confirmed to be incorrect, the voice playback system is repeated Enter the reminder data at the playback position, and receive the to-be-recognized voice data input by the voice collection system based on the position reminder data and the subsequent steps, that is, repeat steps S301-S304 until the correct information is obtained, and the navigation request information is determined according to the target text . In this embodiment, the user interacts with the client by means of human-computer interaction such as a voice playback system, so as to provide an intelligent location input method for users who are inconvenient with eyes, so as to plan a route later.
本实施例所提供的基于计算机视觉的导航方法中,通过语音播放系统播放需要用户确定的位置输入提醒数据,并接收语音采集系统待识别语音数据,对待识别语音数据进行识别,获取目标文字,以便后续为用户规划第一目标路线。采用语音合成技术对目标文字进行语音合成,获取与目标文字相对应的待确认语音数据,以供用户确定起点位置或者终点位置是否准确,确保后续生成的第一目标路线的准确性。采用语音播放系统播放待确认语音数据,接收客户端发送的位置确认信息,基于目标文字和位置确认信息,确定导航请求信息,通过语音播放系统等人机交互的方式实现用户与客户端交互,为用眼不便的用户提供智能化的位置输入方法,以便后续进行规划路线。In the computer vision-based navigation method provided in this embodiment, the voice playback system plays the position input reminder data that needs to be determined by the user, and receives the voice data to be recognized by the voice collection system, recognizes the voice data to be recognized, and obtains the target text in order to Follow up to plan the first target route for the user. The speech synthesis technology is used to synthesize the target text to obtain the to-be-confirmed speech data corresponding to the target text, so that the user can determine whether the starting point or the ending point is accurate, so as to ensure the accuracy of the first target route generated subsequently. Use the voice playback system to play the voice data to be confirmed, receive the location confirmation information sent by the client, determine the navigation request information based on the target text and location confirmation information, and realize the interaction between the user and the client by means of human-computer interaction such as the voice playback system. Users with limited eyesight provide an intelligent location input method for subsequent route planning.
在一实施例中,如图4所示,步骤S203,即对待识别图像进行预处理,获取目标识别图像,包括:In an embodiment, as shown in FIG. 4, step S203, that is, preprocessing the image to be recognized to obtain the target recognition image, includes:
S401:对待识别图像进行灰度化和二值化处理,获取待处理图像。S401: Perform grayscale and binarization processing on the image to be recognized, and obtain the image to be processed.
其中,灰度化是指将彩色的待识别图像转化成为灰度的待识别图像过程,以减少后续的图像处理的工作量。二值化是指对待识别图像进行灰度化处理后获得图像进行处理,生成只有两个灰度级的图像,将只有两个灰度级的图像确定为待处理图像。对每一待识别图像进行灰度化和二值化处理,获取待处理图像,以加快后续图像的处理速度。Among them, grayscale refers to the process of converting a color image to be recognized into a grayscale image to be recognized, so as to reduce the workload of subsequent image processing. Binarization refers to processing the image obtained after the image to be identified is grayed out to generate an image with only two gray levels, and the image with only two gray levels is determined as the image to be processed. Perform grayscale and binarization processing on each image to be recognized to obtain the image to be processed to speed up the processing of subsequent images.
S402:采用边缘检测算法和直线检测算法对待处理图像进行处理,获取路况识别图像。S402: Use an edge detection algorithm and a straight line detection algorithm to process the image to be processed, and obtain a road condition recognition image.
其中,边缘检测算法用于对待处理图象的灰度变化进行度量、检测和定位的算法,以便确定待识别图像中亮度变化显著的部分,为后续进行障碍物体与背景进行分割提供技术支持,边缘检测算法包括但不限于Canny边缘检测算法。Among them, the edge detection algorithm is used to measure, detect and locate the gray level change of the image to be processed, so as to determine the part of the image to be recognized with significant brightness change, and provide technical support for the subsequent segmentation of obstacles and background. The detection algorithm includes but is not limited to the Canny edge detection algorithm.
直线检测算法是用于从待处理图像中识别出直线的算法,直线检测算法包括但不限于霍夫变换。本实施例中,采用霍夫变换对待处理图像进行处理,提取待处理图像中的直线,以确定路面上的人行道、盲人道或者公路等,获取路况识别图像。The straight line detection algorithm is an algorithm used to identify a straight line from the image to be processed. The straight line detection algorithm includes but is not limited to the Hough transform. In this embodiment, the Hough transform is used to process the image to be processed, and the straight lines in the image to be processed are extracted to determine the sidewalk, blind side, or highway on the road, and obtain the road condition recognition image.
采用边缘检测算法对待处理图像进行处理,以检测出待处理图像中亮度变化显著的部分,并采用直线检测算法确定待处理图像中的道路,以高效识别待处理图像中路面上的人行道、盲人道和公路等道路情况。The edge detection algorithm is used to process the image to be processed to detect the parts with significant brightness changes in the image to be processed, and the straight line detection algorithm is used to determine the road in the image to be processed, so as to efficiently identify the sidewalk and the blind on the road in the image to be processed And road conditions such as highways.
S403:采用阈值选取方法对路况识别图像进行障碍物体与背景进行分割,获取目标识别图像。S403: Use a threshold selection method to segment the obstacle object and the background of the road condition recognition image, and obtain a target recognition image.
其中,阈值选取方法是指利用图像中要提取的目标与背景在灰度上的灰度差异,通过设置灰度阈值来把像素级分成若干类,从而实现目标与背景的分离的过程。灰度阈值是预先设定的,用于区分障碍物体与背景的值。目标识别图像是指对路况识别图像进行处理后获取的图像,具体是基于路况识别图像中所提取的障碍物体和背景在灰度上的灰度差异与灰度阈值的比较结果确定的图像,该目标识别图像是有较大可能为存在障碍物体的图像。阈值选取方法包括但不限于基于基于遗传算法的阈值选取方法。本实施例中,采用阈值选取方法将路况识别图像对障碍物体与背景进行分割,将路况识别图像中灰度值大于灰度阈值的部分确定为障碍物体,具有计算量小的优点,可快速得到目标识别图像。灰度阈值是预先设定的,用于区分路况识别图像中的障碍物体和背景的值。Among them, the threshold selection method refers to the process of using the gray level difference between the target and the background to be extracted in the image, and dividing the pixel level into several categories by setting the gray threshold to realize the separation of the target and the background. The gray threshold is preset, and is used to distinguish obstacles from the background. The target recognition image refers to the image obtained after processing the road condition recognition image. Specifically, it is an image determined based on the comparison result of the gray level difference between the obstacle object and the background extracted from the road condition recognition image and the gray threshold value. The target recognition image is an image that is likely to be an obstacle. Threshold selection methods include, but are not limited to, threshold selection methods based on genetic algorithms. In this embodiment, the threshold selection method is used to segment the road condition recognition image into the obstacle object and the background, and the part of the road condition recognition image whose gray value is greater than the gray threshold value is determined as the obstacle object, which has the advantage of small calculation amount and can be obtained quickly. Target recognition image. The gray level threshold is preset, and is used to distinguish the value of obstacles and background in the road condition recognition image.
本实施例所提供的基于计算机视觉的导航方法中,提取路况实时视频中的待识别图像,对待识别 图像进行灰度化和二值化处理,获取待处理图像,以加快后续图像的处理速度。采用边缘检测算法待处理图像进行处理,确定待处理图像中亮度变化显著的部分,为后续进行障碍物体与背景进行分割提供技术支持,采用直线检测算法对待处理图像进行处理,以高效识别出路面上的道路情况。采用阈值选取方法对路况识别图像进行障碍物体与背景进行分割,具有计算量小的优点,可快速得到目标识别图像。In the computer vision-based navigation method provided in this embodiment, the image to be recognized in the real-time video of road conditions is extracted, the image to be recognized is grayed and binarized, and the image to be processed is obtained to speed up the processing of subsequent images. Use edge detection algorithm to process the image to be processed, determine the part of the image to be processed with significant brightness changes, provide technical support for the subsequent segmentation of obstacles and background, and use straight line detection algorithm to process the image to be processed to efficiently identify the road surface Road conditions. The threshold selection method is used to segment the obstacle object and the background of the road condition recognition image, which has the advantage of small calculation amount and can quickly obtain the target recognition image.
在一实施例中,如图5所示,目标识别图像包括左目识别图像和右目识别图像,步骤S204中的采用计算机视觉工具对障碍物体进行双目测距,确定用户当前位置与障碍物体的距离数据,包括:In an embodiment, as shown in FIG. 5, the target recognition image includes a left-eye recognition image and a right-eye recognition image. In step S204, a computer vision tool is used to perform binocular distance measurement on the obstacle to determine the distance between the user’s current position and the obstacle. Data, including:
S501:采用张正友标定法进行标定,获得双目摄像头的参数数据。S501: Use Zhang Zhengyou's calibration method to calibrate to obtain the parameter data of the binocular camera.
其中,双目摄像头是指用户客户端上的左摄像头和右摄像头,根据双目摄像头获得的用户当前位置与障碍物体的距离数据比采用单目摄像头获得的用户当前位置与障碍物体的距离数据更加准确。张正友标定法是张正友教授于1998年提出的单平面棋盘格的摄像机标定方法,以获得双目摄像头的参数数据。参数数据包括内参数据和外参数据,内参数据包括焦距长度和透镜畸变参数,外参数据包括旋转矩阵和平移矩阵。Among them, the binocular camera refers to the left and right cameras on the user client. The distance data between the user's current position and the obstacle obtained by the binocular camera is more than the distance data between the user's current position and the obstacle obtained by the monocular camera. accurate. The Zhang Zhengyou calibration method is a single-plane checkerboard camera calibration method proposed by Professor Zhang Zhengyou in 1998 to obtain the parameter data of the binocular camera. The parameter data includes internal parameter data and external parameter data, the internal parameter data includes focal length and lens distortion parameters, and the external parameter data includes rotation matrix and translation matrix.
具体地,预先采用双目摄像头获取多组不同角度和不同距离的标定图像,然后采用张正友标定法对多组标定图像进行标定,以便获得双目摄像头的参数数据,为后续对左目识别图像和右目识别图像进行图像校正提供技术支持。其中,标定图像是指用于进行标定的图像,具体是用于计算确定双目摄像头的参数数据的图像。标定图像包括左目标定图像和右目标定图像。其中,待识别图像包括左目原始图像和右目原始图像,左目识别图像是从左摄像头拍摄的路况实时视频中提取的左目原始图像,然后对左目原始图像进行预处理后获得的图像。同理地,右目识别图像是从右摄像拍摄的路况实时视频中提取的右目原始图像,然后对右目原始图像进行预处理后获得的图像。需要说明的是,左目识别图像和右目识别图像必须是同一时间的路况实时视频获得的图像,确保后续计算的距离数据的准确性。Specifically, the binocular camera is used in advance to obtain multiple sets of calibration images at different angles and different distances, and then the Zhang Zhengyou calibration method is used to calibrate multiple sets of calibration images to obtain the parameter data of the binocular camera to identify the image and the right eye for the subsequent left eye. Recognize the image and provide technical support for image correction. Among them, the calibration image refers to an image used for calibration, specifically an image used to calculate and determine the parameter data of the binocular camera. The calibration image includes a left target image and a right target image. The image to be recognized includes the left-eye original image and the right-eye original image. The left-eye recognition image is the left-eye original image extracted from the real-time video of the road condition captured by the left camera, and then the left-eye original image is preprocessed. Similarly, the right-eye recognition image is the right-eye original image extracted from the real-time video of the road condition captured by the right camera, and then the right-eye original image is preprocessed to obtain the image. It should be noted that the left-eye recognition image and the right-eye recognition image must be images obtained from real-time video of road conditions at the same time to ensure the accuracy of the distance data calculated later.
S502:基于参数数据对左目识别图像和右目识别图像进行图像校正,获取左目校正图像和右目校正图像。S502: Perform image correction on the left-eye recognition image and the right-eye recognition image based on the parameter data, and obtain a left-eye correction image and a right-eye correction image.
其中,图像校正是指根据参数数据对左目识别图像和右目识别图像进行映射变换的方法,使左目识别图像和右目识别图像上的匹配点所在极线共线,极线共线可以理解为左目识别图像和右目识别图像上匹配点处于同一水平线上。基于双目摄像头的参数数据进行图像校正可保证后续计算用户当前位置与障碍物体的距离数据的准确性,而且有效减少计算量。其中,左目识别图像和右目识别图像上的匹配点是指左目识别图像和右目识别图像中同一物体的相同位置的点,例如,左目识别图像和右目识别图像上同一用户的左耳上的一个点。左目校正图像是对左目识别图像进行校正后获得的图像。右目校正图像是对右目识别图像进行校正后获得的图像。Among them, image correction refers to the method of mapping and transforming the left-eye recognition image and the right-eye recognition image according to the parameter data, so that the polar line of the matching point on the left-eye recognition image and the right-eye recognition image is collinear, and the collinear epipolar line can be understood as the left-eye recognition The matching points on the image and the right-eye recognition image are on the same horizontal line. Image correction based on the parameter data of the binocular camera can ensure the accuracy of the subsequent calculation of the distance data between the user's current position and the obstacle, and effectively reduce the amount of calculation. Among them, the matching point on the left-eye recognition image and the right-eye recognition image refers to the point at the same position of the same object in the left-eye recognition image and the right-eye recognition image, for example, a point on the left ear of the same user on the left-eye recognition image and the right-eye recognition image . The left-eye correction image is an image obtained after correcting the left-eye recognition image. The right-eye correction image is an image obtained after correcting the right-eye recognition image.
具体地,由于双目摄像头受到透镜径向畸变和透镜切向畸变的影响,利用双目摄像头获得的左目识别图像和右目识别图像存在图像畸变,若直接利用左目识别图像和右目识别图像计算用户当前位置和障碍物体的距离数据,则获得距离数据存在较大误差。本实施例中,将标定得到的参数数据输入OpenCV中,利用OpenCV的仿射变换函数实现对左目标定图像和右目标定图像进行映射变换处理,映射变换包括但不限于是平移、旋转和缩放,使得左目标定图像和右目标定图像上匹配点所在极线共线,基于映射变换确定获得左目图像映射表和右目图像映射表,左目图像映射表反映了左目标定图像和经过映射变换 后的左目校正图像的映射关系,同理地,右目图像映射表反映了右目标定图像与和和经过映射变换后的右目校正图像的映射关系。本实施例中,依据左目图像映射表对左目识别图像进行校正,获得左目校正图像,同理地,依据右目图像映射表对右目识别图像进行校正,获得右目校正图像。对左目识别图像和右目识别图像进行图像校正,以消除图像畸变对后续测距的影响,确保后续计算用户当前位置与障碍物体的距离数据的可靠性。Specifically, because the binocular camera is affected by the lens radial distortion and the lens tangential distortion, the left-eye recognition image and the right-eye recognition image obtained by the binocular camera have image distortion. If the left-eye recognition image and the right-eye recognition image are directly used to calculate the user’s current The distance data of the position and obstacle objects, there is a large error in the obtained distance data. In this embodiment, the parameter data obtained by calibration is input into OpenCV, and the affine transformation function of OpenCV is used to realize the mapping transformation processing on the left target image and the right target image. The mapping transformation includes but is not limited to translation, rotation, and scaling. , Make the polar line of the matching point on the left target image and the right target image collinear, determine the left-eye image mapping table and the right-eye image mapping table based on the mapping transformation, the left-eye image mapping table reflects the left target image and after the mapping transformation Similarly, the right-eye image mapping table reflects the mapping relationship between the right target image and the sum and the right-eye correction image after the mapping transformation. In this embodiment, the left-eye recognition image is corrected according to the left-eye image mapping table to obtain the left-eye correction image. Similarly, the right-eye recognition image is corrected according to the right-eye image mapping table to obtain the right-eye correction image. Perform image correction on the left-eye recognition image and the right-eye recognition image to eliminate the influence of image distortion on the subsequent ranging and ensure the reliability of the subsequent calculation of the distance between the user's current position and the obstacle.
S503:采用立体匹配算法对左目校正图像和右目校正图像进行立体匹配,获取视差图。S503: Use a stereo matching algorithm to perform stereo matching on the left-eye corrected image and the right-eye corrected image to obtain a disparity map.
其中,视差图是指图像大小等于左目校正图像和右目校正图像中任一幅图像的大小,元素值为视差值的图像。视差值是同一个点或者物体在左目摄像头和右目摄像头成像所对应的x坐标的差值。Among them, the disparity map refers to an image whose image size is equal to the size of any one of the left-eye correction image and the right-eye correction image, and the element value is the disparity value. The disparity value is the difference between the x-coordinates corresponding to the same point or object imaged by the left-eye camera and the right-eye camera.
立体匹配是指通过在左目校正图像和右目校正图像中寻找相匹配的像素点,利用对应的像素点间位置关系,以获得视差图。立体匹配算法包括但不限于OpenCV中提供局部的BM算法和全局的SGBM算法等。本实施例中采用立体匹配算法是全局的SGBM,SGBM的思路是通过选取每个像素点的disparity,组成一个disparity map,设置一个和disparity map相关的全局能量函数,使这个能量函数最小化,以达到求解每个像素点最优disparity的目的。Stereo matching refers to finding matching pixels in the left-eye correction image and right-eye correction image, and using the positional relationship between the corresponding pixels to obtain a disparity map. Stereo matching algorithms include, but are not limited to, the local BM algorithm and the global SGBM algorithm provided in OpenCV. The stereo matching algorithm used in this embodiment is a global SGBM. The idea of SGBM is to select the disparity of each pixel to form a disparity map, and set a global energy function related to the disparity map to minimize this energy function. To achieve the purpose of solving the optimal disparity of each pixel.
具体地,采用立体匹配算法选取左目校正图像和右目校正图像中相对应的像素点的disparity,组成一个disparity map,设置一个和disparity map相关的全局能量函数,通过使该能量代价函数最小化以求解每个像素点最优disparity,将每个像素点最优disparity作为该像素点的视差值,生成视差图,后续根据视差图可准确计算用户当前位置与障碍物体的距离数据。Specifically, the stereo matching algorithm is used to select the disparity of the corresponding pixels in the left eye correction image and the right eye correction image to form a disparity map, set a global energy function related to the disparity map, and minimize the energy cost function to solve The optimal disparity of each pixel, the optimal disparity of each pixel is used as the disparity value of the pixel to generate a disparity map, and then the distance data between the user's current position and the obstacle can be accurately calculated based on the disparity map.
S504:基于视差图确定用户当前位置与障碍物体的距离数据。S504: Determine the distance data between the current position of the user and the obstacle based on the disparity map.
具体地,如图9所示,障碍物体所在位置为P点,左目摄像头和右目摄像头的宽度为l,双目摄像头的焦距为f,左目摄像头和右目摄像头之间的距离为T,x l和x r分别表示障碍物体在左目校正图像和右目校正图像中投影点横坐标,y r表示障碍物体在右目校正图像中投影点纵坐标,障碍物体在左目摄像头的成像点为P l,障碍物体在右目摄像头上的成像点为P r,设障碍物体P的坐标为(X,Y,Z),由三角形相似原理可得
Figure PCTCN2020105015-appb-000001
化简得到
Figure PCTCN2020105015-appb-000002
由于视差已知的d=x l-x r,因此,
Figure PCTCN2020105015-appb-000003
以右目摄像头为基准,可得
Figure PCTCN2020105015-appb-000004
Figure PCTCN2020105015-appb-000005
Figure PCTCN2020105015-appb-000006
从而获得障碍物体的距离数据,以便后续根据距离数据为用户提供相应的导航。
Specifically, as shown in Figure 9, the location of the obstacle is point P, the width of the left-eye camera and the right-eye camera is l, the focal length of the binocular camera is f, and the distance between the left-eye camera and the right-eye camera is T, x l and x r represents the abscissa of the projection point of the obstacle in the left eye correction image and the right eye correction image, y r represents the ordinate of the projection point of the obstacle in the right eye correction image, the imaging point of the obstacle in the left eye camera is P l , and the obstacle is in The imaging point on the right-eye camera is P r , and the coordinates of the obstacle P is (X, Y, Z), which can be obtained by the triangle similarity principle
Figure PCTCN2020105015-appb-000001
Simplify to get
Figure PCTCN2020105015-appb-000002
Since the disparity is known as d=x l -x r , therefore,
Figure PCTCN2020105015-appb-000003
Taking the right-eye camera as the benchmark, we can get
Figure PCTCN2020105015-appb-000004
which is
Figure PCTCN2020105015-appb-000005
which is
Figure PCTCN2020105015-appb-000006
In this way, the distance data of the obstacle can be obtained, so as to provide the user with corresponding navigation according to the distance data.
本实施例所提供的基于计算机视觉的导航方法中,采用张正友标定法进行标定,获得双目摄像头的参数数据,为后续对左目识别图像和右目识别图像进行图像校正提供技术支持。基于参数数据对左目识别图像和右目识别图像进行图像校正,获取左目校正图像和右目校正图像,以消除图像畸变对后续测距的影响,确保后续计算用户当前位置与障碍物体的距离数据的可靠性。采用立体匹配算法对左目校正图像和右目校正图像进行立体匹配,获取视差图,根据视差图可准确计算用户当前位置与障碍物体的距 离数据,以便后续根据距离数据为用户提供相应的导航。In the computer vision-based navigation method provided in this embodiment, the Zhang Zhengyou calibration method is used for calibration to obtain parameter data of the binocular camera, which provides technical support for subsequent image correction of the left-eye recognition image and the right-eye recognition image. Perform image correction on the left-eye recognition image and the right-eye recognition image based on the parameter data, and obtain the left-eye correction image and the right-eye correction image to eliminate the influence of image distortion on the subsequent distance measurement and ensure the reliability of the subsequent calculation of the distance between the user’s current position and the obstacle. . The stereo matching algorithm is used to perform stereo matching on the left-eye correction image and the right-eye correction image to obtain a disparity map. According to the disparity map, the distance data between the user's current position and the obstacle can be accurately calculated, so as to provide the user with corresponding navigation based on the distance data.
在一实施例中,如图6所示,在步骤S203之前,即在采用目标障碍识别模型对目标识别图像进行识别,获取当前识别结果之前,基于计算机视觉的导航方法还包括:In one embodiment, as shown in FIG. 6, before step S203, that is, before the target obstacle recognition model is used to recognize the target recognition image and the current recognition result is obtained, the computer vision-based navigation method further includes:
S601:获取训练图像和测试图像,训练图像和测试图像携带有障碍物体类型和障碍物体标签。S601: Obtain a training image and a test image, where the training image and the test image carry the type of obstacle and the tag of the obstacle.
其中,训练图像是用于对神经网络模型进行训练的图像,以生成目标障碍识别模型。测试图像是用于对原始障碍识别模型进行验证的图像。障碍物体类型是指妨碍用户前进的物体的类型,例如,障碍物体类型可以是可移动障碍物体或者固定障碍物体等。障碍物体标签是妨碍用户前进的物体的标签,例如,障碍物体标签可以是人、狗、单车和树木等。进一步地,在训练模型时,还可以对交通灯和盲道进行识别,进而引导用眼不便的用户在盲道行走,或者在交通等为红灯时为色盲患者提醒。Among them, the training image is an image used to train the neural network model to generate a target obstacle recognition model. The test image is an image used to verify the original obstacle recognition model. The obstacle type refers to the type of the object that hinders the user from moving forward. For example, the obstacle type may be a movable obstacle or a fixed obstacle. Obstructive object tags are tags of objects that hinder the user from moving forward. For example, obstructive object tags may be people, dogs, bicycles, trees, and so on. Furthermore, when training the model, it is also possible to identify traffic lights and blind roads, thereby guiding users with eye inconvenience to walk in the blind roads, or reminding color-blind patients when the traffic is red.
S602:将训练图像输入到神经网络模型中进行训练,获取原始障碍识别模型。S602: Input the training image into the neural network model for training, and obtain the original obstacle recognition model.
具体地,将带有障碍物体类型和障碍物体标签的训练图像输入到神经网络模型中,当神经网络模型收敛时,以获取原始障碍识别模型,对采用神经网络模型进行训练,以便后续快速识别障碍物体。Specifically, the training image with the obstacle object type and obstacle object label is input into the neural network model. When the neural network model converges, the original obstacle recognition model is obtained, and the neural network model is trained to quickly identify the obstacle in the subsequent object.
S603:将测试图像输入到原始障碍识别模型中,获取原始障碍识别模型输出的识别准确率。S603: Input the test image into the original obstacle recognition model, and obtain the recognition accuracy rate output by the original obstacle recognition model.
其中,识别准确率是指原始障碍识别模型可以准确识别出测试图像中障碍物体类型和障碍物体标签的概率。Among them, the recognition accuracy refers to the probability that the original obstacle recognition model can accurately identify the type of obstacle and the tag of the obstacle in the test image.
具体地,将多张测试图像输入到原始障碍识别模型中,获取原始障碍识别模型的原始识别结果,并将每一原始识别结果和对应的测试图像的障碍物体类型和障碍物体标签进行比较,以获取原始障碍识别模型的识别准确率,以验证原始障碍识别模型是否成功。其中,获取原始障碍识别模型的识别准确率是指原始识别结果为识别准确的识别准确数量与所有测试图像的图像数量的商。Specifically, input multiple test images into the original obstacle recognition model, obtain the original recognition result of the original obstacle recognition model, and compare each original recognition result with the obstacle object type and obstacle object label of the corresponding test image to Obtain the recognition accuracy of the original obstacle recognition model to verify whether the original obstacle recognition model is successful. Among them, the recognition accuracy rate of obtaining the original obstacle recognition model refers to the quotient of the original recognition result of the recognition accuracy and the number of images of all test images.
S604:若识别准确率大于预设准确阈值,则将原始障碍识别模型确定为目标障碍识别模型。S604: If the recognition accuracy rate is greater than the preset accuracy threshold, determine the original obstacle recognition model as the target obstacle recognition model.
其中,预设准确阈值是预先设定的,用于判断原始障碍识别模型是否能够准确识别障碍物体类型和障碍物体标签的阈值,例如,预设准确阈值可以是90%。Among them, the preset accuracy threshold is preset, and is used to determine whether the original obstacle recognition model can accurately recognize the type of obstacle and the threshold of the obstacle tag. For example, the preset accuracy threshold may be 90%.
具体地,当识别准确率大于预设准确阈值,则说明原始障碍识别模型训练成功,将原始障碍识别模型确定为目标障碍识别模型,以便后续根据目标障碍识别模型确保目标识别图像是否存在障碍物体,确保障碍物体识别的准确性。Specifically, when the recognition accuracy rate is greater than the preset accuracy threshold, it indicates that the original obstacle recognition model is successfully trained, and the original obstacle recognition model is determined as the target obstacle recognition model, so as to ensure that there are obstacles in the target recognition image according to the target obstacle recognition model. Ensure the accuracy of obstacle recognition.
本实施例所提供的基于计算机视觉的导航方法中,将训练图像输入到神经网络模型中进行训练,获取原始障碍识别模型,以便后续快速识别障碍物体。将测试图像输入到原始障碍识别模型中,获取原始障碍识别模型输出的识别准确率,以验证原始障碍识别模型是否成功。当识别准确率大于预设准确阈值,则将原始障碍识别模型确定为目标障碍识别模型,以便后续根据目标障碍识别模型确保目标识别图像是否存在障碍物体,确保障碍物体识别的准确性。In the computer vision-based navigation method provided in this embodiment, the training image is input into the neural network model for training, and the original obstacle recognition model is obtained so as to quickly identify obstacle objects in the subsequent. The test image is input into the original obstacle recognition model, and the recognition accuracy rate output by the original obstacle recognition model is obtained to verify whether the original obstacle recognition model is successful. When the recognition accuracy is greater than the preset accuracy threshold, the original obstacle recognition model is determined as the target obstacle recognition model, so as to ensure that there are obstacles in the target recognition image according to the target obstacle recognition model, and to ensure the accuracy of obstacle recognition.
在一实施例中,如图7所示,障碍物体还携带有障碍物体类型,障碍物体类型包括但不限于固定障碍物体和可移动障碍物体。步骤S205中,即根据距离数据与预设告警条件,获取对应的规避提醒信息,采用语音播放系统播放规避提醒信息,包括:In an embodiment, as shown in FIG. 7, the obstacle object also carries an obstacle object type, and the obstacle object type includes, but is not limited to, a fixed obstacle object and a movable obstacle object. In step S205, the corresponding evasion reminder information is obtained according to the distance data and preset alarm conditions, and the evasion reminder information is played by the voice playback system, including:
S701:若距离数据符合预设告警条件,且障碍物体携带的障碍物体类型为固定障碍物体,基于用户当前位置和终点位置,采用遗传算法进行路径规划,获取第二目标路线,将第二目标路线作为规避提 醒信息,采用语音播放系统播放规避提醒信息。S701: If the distance data meets the preset warning conditions, and the type of obstacle carried by the obstacle is a fixed obstacle, based on the user's current position and the end position, the genetic algorithm is used for path planning, the second target route is obtained, and the second target route is obtained. As the evasion reminder message, the voice playback system is used to play the evasion reminder message.
其中,遗传算法(GeneticAlgorithm)是模拟达尔文生物进化论的自然选择和遗传学机理的生物进化过程的计算模型,是一种通过模拟自然进化过程搜索最优解。Among them, the genetic algorithm (GeneticAlgorithm) is a computational model that simulates the biological evolution process of natural selection and genetic mechanism of Darwin's biological evolution theory, and is a way to search for the optimal solution by simulating the natural evolution process.
具体地,当距离数据符合预设告警条件,且障碍物体携带的障碍物体类型为固定障碍物体,则说明此时第一目标线路不能前行,因此,服务器根据用户当前位置和终点位置采用遗传算法进行路径规划,以获取第二目标路线,将第二目标路线作为规避提醒信息,采用语音播放系统播放规避提醒信息给用户,以便用户依据规避提醒信息可无障碍行走,实现用户不需直接用眼去查看,即可安全导航到终点位置,特别是对于用眼不便的用户或者其他无法实时查看路况的情况,根据距离数据与预设告警条件,为用户规划路线,保证用户出行安全。Specifically, when the distance data meets the preset alarm conditions, and the type of obstacle carried by the obstacle is a fixed obstacle, it means that the first target line cannot go forward at this time. Therefore, the server uses a genetic algorithm according to the user's current position and the end position. Perform path planning to obtain the second target route, use the second target route as the avoidance reminder information, and use the voice playback system to play the avoidance reminder information to the user, so that the user can walk without obstacles based on the avoidance reminder information, so that the user does not need to use his eyes directly To check, you can safely navigate to the end position, especially for users with eye inconvenience or other situations where the road conditions cannot be checked in real time. Based on the distance data and preset alarm conditions, the route is planned for the user to ensure the user's travel safety.
S702:若距离数据符合预设告警条件,且障碍物体携带的障碍物体类型为可移动障碍物体,对障碍物体进行检测,基于检测结果生成规避提醒信息,采用语音播放系统播放规避提醒信息。S702: If the distance data meets the preset warning condition, and the type of obstacle carried by the obstacle is a movable obstacle, the obstacle is detected, and evasion reminder information is generated based on the detection result, and the evasion reminder information is played by a voice playback system.
具体地,当距离数据符合预设告警条件,且障碍物体携带的障碍物体类型为可移动障碍物体,此时存在障碍物体可能移动也可能不移动,先提醒用户止步,然后对障碍物体进行检测,若在预设停止时间内,检测到无障碍物体,则将第一目标线路作为规避提醒信息,采用语音播放系统播放规避提醒信息,提醒用户继续行走;若在预设停止时间内,检测到障碍物体,基于用户当前位置和终点位置,采用遗传算法进行路径规划,获取第二目标路线,将第二目标路线作为规避提醒信息,采用语音播放系统播放规避提醒信息。Specifically, when the distance data meets the preset warning conditions, and the type of obstacle carried by the obstacle is a movable obstacle, the obstacle may or may not move at this time, the user is first reminded to stop, and then the obstacle is detected. If an obstacle-free object is detected within the preset stop time, the first target line is used as the avoidance reminder message, and the voice playback system is used to play the avoidance reminder message to remind the user to continue walking; if the obstacle is detected within the preset stop time For the object, based on the user's current position and end position, genetic algorithm is used to plan the path, the second target route is obtained, the second target route is used as the avoidance reminder information, and the voice playback system is used to play the avoidance reminder information.
进一步地,当距离数据不符合预设告警条件,则根据用户行走的路程,利用语音播放系统播放继续行走信息,例如,继续行走信息可以是“您已走了XX米,请往正前方行走XX米后左转,距离目标位置XX米”;或者可以提醒时间阈值,例如,提醒时间阈值可以是5分钟,当用户行走的时间等于提醒时间阈值时,则利用语音播放系统播放继续行走信息。Further, when the distance data does not meet the preset alarm conditions, the voice playback system is used to play the continue walking information according to the distance the user walks. For example, the continue walking information can be "You have walked XX meters, please walk straight ahead XX Turn left after a meter, XX meters away from the target location"; or a reminder time threshold may be used. For example, the reminder time threshold may be 5 minutes. When the user's walking time is equal to the reminder time threshold, the voice playback system is used to play the message of continuing walking.
本实施例所提供的基于计算机视觉的导航方法中,若距离数据符合预设告警条件,且障碍物体携带的障碍物体类型为固定障碍物体,基于用户当前位置和终点位置,采用遗传算法进行路径规划,获取第二目标路线,将第二目标路线作为规避提醒信息,采用语音播放系统播放规避提醒信息,在障碍物体类型为固定障碍物体,则此时为用户规划第二目标路线作为规避提醒信息,以便用户依据规避提醒信息可无障碍行走,实现用户不需直接用眼去查看,即可安全导航到终点位置,特别是对于用眼不便的用户或者其他无法实时查看路况的情况,保证用户出行安全。若距离数据符合预设告警条件,且障碍物体携带的障碍物体类型为可移动障碍物体,对障碍物体进行检测,基于检测结果生成规避提醒信息,采用语音播放系统播放规避提醒信息,以便用户依据规避提醒信息可无障碍行走,实现用户不需直接用眼去查看,即可安全导航到目标位置。In the computer vision-based navigation method provided in this embodiment, if the distance data meets the preset warning conditions, and the type of obstacle carried by the obstacle is a fixed obstacle, the genetic algorithm is used for path planning based on the user's current position and the end position , Acquire the second target route, use the second target route as the avoidance reminder information, and use the voice playback system to play the avoidance reminder information. If the obstacle type is a fixed obstacle, then the second target route is planned for the user as the avoidance reminder information at this time, So that users can walk without obstacles based on the avoidance reminder information, so that users can safely navigate to the end position without directly checking with their eyes, especially for users with eye inconvenience or other situations where the road conditions cannot be checked in real time, ensuring user travel safety . If the distance data meets the preset alarm conditions, and the type of obstacle carried by the obstacle is a movable obstacle, the obstacle is detected, and the evasion reminder is generated based on the detection result, and the voice playback system is used to play the evasion reminder so that the user can follow the evasion The reminder information can be walked without barriers, so that the user can safely navigate to the target location without directly viewing it with his eyes.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence number of each step in the foregoing embodiment does not mean the order of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
在一实施例中,提供一种基于计算机视觉的导航装置,该基于计算机视觉的导航装置与上述实施例中基于计算机视觉的导航方法一一对应。如图8所示,该基于计算机视觉的导航装置包括导航请求信息获取模块801、第一目标路线获取模块802、当前识别结果获取模块803、距离数据获取模块804和 规避提醒信息获取模块805。各功能模块详细说明如下:In one embodiment, a computer vision-based navigation device is provided, and the computer vision-based navigation device corresponds to the computer vision-based navigation method in the above-mentioned embodiment in a one-to-one correspondence. As shown in FIG. 8, the computer vision-based navigation device includes a navigation request information acquisition module 801, a first target route acquisition module 802, a current recognition result acquisition module 803, a distance data acquisition module 804, and an avoidance reminder information acquisition module 805. The detailed description of each functional module is as follows:
导航请求信息获取模块801,用于获取导航请求信息,导航请求信息包含起点位置和终点位置。The navigation request information obtaining module 801 is used to obtain navigation request information, and the navigation request information includes a starting point position and an ending point position.
第一目标路线获取模块802,用于根据起点位置和终点位置进行路线规划,获取第一目标路线,采用语音播放系统播放与第一目标路线相对应的导航语音数据。The first target route acquisition module 802 is used for route planning according to the starting point position and the ending point position, acquiring the first target route, and playing the navigation voice data corresponding to the first target route by using a voice playback system.
当前识别结果获取模块803,用于获取第一目标路线对应的路况实时视频,从路况实时视频中提取待识别图像,对待识别图像进行预处理,获取目标识别图像,采用目标障碍识别模型对目标识别图像进行识别,获取当前识别结果。The current recognition result acquisition module 803 is used to acquire the real-time video of the road condition corresponding to the first target route, extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain the target recognition image, and use the target obstacle recognition model to recognize the target The image is recognized and the current recognition result is obtained.
距离数据获取模块804,用于若当前识别结果为存在障碍物体,则采用计算机视觉工具对障碍物体进行双目测距,确定用户当前位置与障碍物体的距离数据。The distance data acquisition module 804 is configured to, if the current recognition result is that there is an obstacle, use a computer vision tool to perform binocular distance measurement on the obstacle, and determine the distance data between the user's current position and the obstacle.
规避提醒信息获取模块805,用于根据距离数据与预设告警条件,获取对应的规避提醒信息,采用语音播放系统播放规避提醒信息。The evasion reminder information acquisition module 805 is configured to acquire corresponding evasion reminder information according to the distance data and preset alarm conditions, and use a voice playback system to play the evasion reminder information.
进一步地,导航请求信息获取模块801,包括:位置输入提醒数据播放单元、目标文字获取单元、语音合成单元和位置确认信息接收单元。Further, the navigation request information acquisition module 801 includes: a location input reminder data playback unit, a target text acquisition unit, a speech synthesis unit, and a location confirmation information receiving unit.
位置输入提醒数据播放单元,用于采用语音播放系统播放位置输入提醒数据,接收语音采集系统基于位置提醒数据输入的待识别语音数据。The location input reminder data playback unit is used to use the voice playback system to play the location to input reminder data, and receive the voice data to be recognized based on the location reminder data input by the voice collection system.
目标文字获取单元,用于采用语音识别模型对待识别语音数据进行识别,获取目标文字。The target text acquisition unit is used to recognize the voice data to be recognized by using a voice recognition model to obtain the target text.
语音合成单元,用于采用语音合成技术对目标文字进行语音合成,获取与目标文字相对应的待确认语音数据。The speech synthesis unit is used to synthesize the target text with speech synthesis technology, and obtain the to-be-confirmed speech data corresponding to the target text.
位置确认信息接收单元,用于采用语音播放系统播放待确认语音数据,接收客户端发送的位置确认信息,基于目标文字和位置确认信息,确定导航请求信息。The location confirmation information receiving unit is used to play the voice data to be confirmed using the voice playback system, receive the location confirmation information sent by the client, and determine the navigation request information based on the target text and the location confirmation information.
进一步地,当前识别结果获取模块803,包括:待处理图像获取单元、路况识别图像获取单元和目标识别图像获取单元。Further, the current recognition result acquisition module 803 includes: a to-be-processed image acquisition unit, a road condition recognition image acquisition unit, and a target recognition image acquisition unit.
待处理图像获取单元,用于对待识别图像进行灰度化和二值化处理,获取待处理图像。The to-be-processed image acquisition unit is used to perform grayscale and binarization processing on the to-be-identified image to acquire the to-be-processed image.
路况识别图像获取单元,用于采用边缘检测算法和直线检测算法对待处理图像进行处理,获取路况识别图像。The road condition recognition image acquisition unit is used to process the image to be processed by adopting the edge detection algorithm and the straight line detection algorithm to obtain the road condition recognition image.
目标识别图像获取单元,用于采用阈值选取方法对路况识别图像进行障碍物体与背景进行分割,获取目标识别图像。The target recognition image acquisition unit is used to segment the obstacle object and the background of the road condition recognition image by using the threshold selection method to obtain the target recognition image.
进一步地,目标识别图像包括左目识别图像和右目识别图像,距离数据获取模块804,包括:参数数据获取单元、图像校正单元、视差图获取单元和距离数据确定单元。Further, the target recognition image includes a left-eye recognition image and a right-eye recognition image. The distance data acquisition module 804 includes: a parameter data acquisition unit, an image correction unit, a disparity map acquisition unit, and a distance data determination unit.
参数数据获取单元,用于采用张正友标定法进行标定,获得双目摄像头的参数数据。The parameter data acquisition unit is used for calibration by Zhang Zhengyou calibration method to obtain parameter data of the binocular camera.
图像校正单元,用于基于参数数据对左目识别图像和右目识别图像进行图像校正,获取左目校正图像和右目校正图像。The image correction unit is used to perform image correction on the left-eye recognition image and the right-eye recognition image based on the parameter data, and obtain the left-eye correction image and the right-eye correction image.
视差图获取单元,用于采用立体匹配算法对左目校正图像和右目校正图像进行立体匹配,获取视差图。The disparity map acquiring unit is used to perform stereo matching on the left-eye corrected image and the right-eye corrected image by using a stereo matching algorithm to obtain a disparity map.
距离数据确定单元,用于基于视差图确定用户当前位置与障碍物体的距离数据。The distance data determining unit is used to determine the distance data between the current position of the user and the obstacle based on the disparity map.
进一步地,在当前识别结果获取模块803之前,基于计算机视觉的导航装置还包括:训练图像和测试图像获取单元、原始障碍识别模型获取单元、识别准确率获取单元和目标障碍识别模型确定单元。Further, before the current recognition result acquisition module 803, the computer vision-based navigation device further includes: training image and test image acquisition unit, original obstacle recognition model acquisition unit, recognition accuracy rate acquisition unit, and target obstacle recognition model determination unit.
训练图像和测试图像获取单元,用于获取训练图像和测试图像,训练图像和测试图像携带有障碍物体类型和障碍物体标签。The training image and test image acquisition unit is used to acquire the training image and the test image, and the training image and the test image carry the obstacle object type and the obstacle object label.
原始障碍识别模型获取单元,用于将训练图像输入到神经网络模型中进行训练,获取原始障碍识别模型。The original obstacle recognition model acquisition unit is used to input training images into the neural network model for training, and obtain the original obstacle recognition model.
识别准确率获取单元,用于将测试图像输入到原始障碍识别模型中,获取原始障碍识别模型输出的识别准确率。The recognition accuracy rate acquisition unit is used to input the test image into the original obstacle recognition model to obtain the recognition accuracy rate output by the original obstacle recognition model.
目标障碍识别模型确定单元,用于若识别准确率大于预设准确阈值,则将原始障碍识别模型确定为目标障碍识别模型。The target obstacle recognition model determination unit is configured to determine the original obstacle recognition model as the target obstacle recognition model if the recognition accuracy rate is greater than the preset accuracy threshold.
进一步地,障碍物体还携带有障碍物体类型;规避提醒信息获取模块805,包括:第一判断单元和第二判断单元。Further, the obstacle also carries the type of the obstacle; the avoidance reminder information acquisition module 805 includes: a first judgment unit and a second judgment unit.
第一判断单元,用于若距离数据符合预设告警条件,且障碍物体携带的障碍物体类型为固定障碍物体,基于用户当前位置和终点位置,采用遗传算法进行路径规划,获取第二目标路线,将第二目标路线作为规避提醒信息,采用语音播放系统播放规避提醒信息。The first judging unit is configured to, if the distance data meets the preset warning condition, and the type of obstacle carried by the obstacle is a fixed obstacle, based on the user's current position and end position, the genetic algorithm is used to plan the path to obtain the second target route, The second target route is used as the evasion reminder information, and the voice playback system is used to play the evasion reminder information.
第二判断单元,用于若距离数据符合预设告警条件,且障碍物体携带的障碍物体类型为可移动障碍物体,对障碍物体进行检测,基于检测结果生成规避提醒信息,采用语音播放系统播放规避提醒信息。The second judging unit is used to detect the obstacle if the distance data meets the preset alarm condition and the obstacle type carried by the obstacle is a movable obstacle, generate an avoidance reminder message based on the detection result, and use the voice playback system to play the avoidance Reminder information.
关于基于计算机视觉的导航装置的具体限定可以参见上文中对于基于计算机视觉的导航方法的限定,在此不再赘述。上述基于计算机视觉的导航装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific definition of the navigation device based on computer vision, please refer to the above definition of the navigation method based on computer vision, which will not be repeated here. The various modules in the above-mentioned computer vision-based navigation device can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图10所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括可读存储介质、内存储器。该可读存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为可读存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储规避提醒信息。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种基于计算机视觉的导航方法。In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. 10. The computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a readable storage medium and an internal memory. The readable storage medium stores an operating system, computer readable instructions, and a database. The internal memory provides an environment for the operation of the operating system and computer readable instructions in the readable storage medium. The database of the computer equipment is used to store evasion reminder information. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer-readable instructions are executed by the processor to realize a navigation method based on computer vision.
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现上述实施例中基于计算机视觉的导航方法的步骤,例如图2所示的步骤S201-S205,或者图3至图7中所示的步骤,为避免重复,这里不再赘述。或者,处理器执行计算机可读指令时实现基于计算机视觉的导航装置这一实施例中的各模块/单元的功能,例如图8所示的包括导航请求信息获取模块801、第一目标路线获取模块802、当前识别结果获取模块803、距离数据获取模块804和规避提醒信息获取模块805的功能,为避免重复,这里不再赘述。In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor. The processor executes the computer-readable instructions to implement the The steps of the computer vision navigation method, such as steps S201-S205 shown in FIG. 2, or the steps shown in FIG. 3 to FIG. 7, are not repeated here in order to avoid repetition. Or, when the processor executes the computer-readable instructions, the functions of the modules/units in the embodiment of the computer vision-based navigation device are implemented, for example, as shown in FIG. 802. The functions of the current recognition result acquisition module 803, the distance data acquisition module 804, and the avoidance reminder information acquisition module 805 are not repeated here to avoid repetition.
在一实施例中,提供了一个或多个存储有计算机可读指令的可读存储介质,该可读存储介质上存 储有计算机可读指令,该计算机可读指令被处理器执行时实现上述实施例中基于计算机视觉的导航方法的步骤,例如图2所示的步骤S201-S205,或者图3至图7中所示的步骤,为避免重复,这里不再赘述。或者,处理器执行计算机可读指令时实现基于计算机视觉的导航装置这一实施例中的各模块/单元的功能,例如图8所示的包括导航请求信息获取模块801、第一目标路线获取模块802、当前识别结果获取模块803、距离数据获取模块804和规避提醒信息获取模块805的功能,为避免重复,这里不再赘述。In an embodiment, one or more readable storage media storing computer readable instructions are provided. The readable storage medium stores computer readable instructions. When the computer readable instructions are executed by a processor, the foregoing implementation is implemented. The steps of the computer vision-based navigation method in the example, such as steps S201-S205 shown in FIG. 2, or the steps shown in FIG. 3 to FIG. 7, are not repeated here to avoid repetition. Or, when the processor executes the computer-readable instructions, the functions of the modules/units in the embodiment of the computer vision-based navigation device are implemented, for example, as shown in FIG. 802. The functions of the current recognition result acquisition module 803, the distance data acquisition module 804, and the avoidance reminder information acquisition module 805 are not repeated here to avoid repetition.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the methods of the foregoing embodiments can be implemented by instructing relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile computer. In a readable storage medium, when the computer-readable instructions are executed, they may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database, or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。Those skilled in the art can clearly understand that for the convenience and conciseness of description, only the division of the above functional units and modules is used as an example. In practical applications, the above functions can be allocated to different functional units and modules as required. Module completion, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, a person of ordinary skill in the art should understand that it can still implement the foregoing The technical solutions recorded in the examples are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in Within the scope of protection of this application.

Claims (20)

  1. 一种基于计算机视觉的导航方法,其中,包括:A navigation method based on computer vision, which includes:
    获取导航请求信息,所述导航请求信息包含起点位置和终点位置;Acquiring navigation request information, where the navigation request information includes a starting point position and an ending point position;
    根据所述起点位置和所述终点位置进行路线规划,获取第一目标路线,采用语音播放系统播放与所述第一目标路线相对应的导航语音数据;Perform route planning according to the starting point position and the ending point position, obtain a first target route, and use a voice playback system to play navigation voice data corresponding to the first target route;
    获取所述第一目标路线对应的路况实时视频,从所述路况实时视频中提取待识别图像,对所述待识别图像进行预处理,获取目标识别图像,采用目标障碍识别模型对所述目标识别图像进行识别,获取当前识别结果;Acquire a real-time video of the road condition corresponding to the first target route, extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain a target recognition image, and use a target obstacle recognition model to recognize the target Recognize the image and obtain the current recognition result;
    若所述当前识别结果为存在障碍物体,则采用计算机视觉工具对所述障碍物体进行双目测距,确定用户当前位置与所述障碍物体的距离数据;If the current recognition result is that there is an obstacle, a computer vision tool is used to perform binocular distance measurement on the obstacle to determine the distance data between the user's current position and the obstacle;
    根据所述距离数据与预设告警条件,获取对应的规避提醒信息,采用所述语音播放系统播放所述规避提醒信息。According to the distance data and preset alarm conditions, the corresponding evasion reminder information is obtained, and the voice playback system is used to play the evasion reminder information.
  2. 如权利要求1所述的基于计算机视觉的导航方法,其中,所述获取导航请求信息,包括:The computer vision-based navigation method according to claim 1, wherein said obtaining navigation request information comprises:
    采用语音播放系统播放位置输入提醒数据,接收语音采集系统基于所述位置提醒数据输入的待识别语音数据;Use a voice playback system to play the position to input reminder data, and receive the to-be-recognized voice data input by the voice collection system based on the position reminder data;
    采用语音识别模型对所述待识别语音数据进行识别,获取目标文字;Recognizing the to-be-recognized voice data using a voice recognition model to obtain the target text;
    采用语音合成技术对所述目标文字进行语音合成,获取与所述目标文字相对应的待确认语音数据;Using speech synthesis technology to perform speech synthesis on the target text, and obtain the to-be-confirmed speech data corresponding to the target text;
    采用所述语音播放系统播放所述待确认语音数据,接收客户端发送的位置确认信息,基于所述目标文字和所述位置确认信息,确定导航请求信息。The voice playback system is used to play the voice data to be confirmed, receive the location confirmation information sent by the client, and determine the navigation request information based on the target text and the location confirmation information.
  3. 如权利要求1所述的基于计算机视觉的导航方法,其中,所述对所述待识别图像进行预处理,获取目标识别图像,包括:The computer vision-based navigation method according to claim 1, wherein the preprocessing the image to be recognized to obtain the target recognition image comprises:
    对所述待识别图像进行灰度化和二值化处理,获取待处理图像;Performing grayscale and binarization processing on the image to be recognized to obtain the image to be processed;
    采用边缘检测算法和直线检测算法对所述待处理图像进行处理,获取路况识别图像;Use an edge detection algorithm and a straight line detection algorithm to process the to-be-processed image to obtain a road condition recognition image;
    采用阈值选取方法对所述路况识别图像进行障碍物体与背景进行分割,获取目标识别图像。The threshold selection method is adopted to segment the obstacle object and the background of the road condition recognition image to obtain the target recognition image.
  4. 如权利要求1所述的基于计算机视觉的导航方法,其中,所述目标识别图像包括左目识别图像和右目识别图像,The computer vision-based navigation method of claim 1, wherein the target recognition image includes a left-eye recognition image and a right-eye recognition image,
    所述采用计算机视觉工具对所述障碍物体进行双目测距,确定用户当前位置与所述障碍物体的距离数据,包括:The binocular distance measurement of the obstacle by using a computer vision tool to determine the distance data between the user's current position and the obstacle includes:
    采用张正友标定法进行标定,获得双目摄像头的参数数据;Use Zhang Zhengyou calibration method to calibrate to obtain the parameter data of the binocular camera;
    基于所述参数数据对所述左目识别图像和所述右目识别图像进行图像校正,获取左目校正图像和右目校正图像;Performing image correction on the left-eye recognition image and the right-eye recognition image based on the parameter data to obtain a left-eye correction image and a right-eye correction image;
    采用立体匹配算法对所述左目校正图像和右目校正图像进行立体匹配,获取视差图;Using a stereo matching algorithm to perform stereo matching on the left-eye corrected image and the right-eye corrected image to obtain a disparity map;
    基于所述视差图确定用户当前位置与所述障碍物体的距离数据。Determine the distance data between the current position of the user and the obstacle based on the disparity map.
  5. 如权利要求1所述的基于计算机视觉的导航方法,其中,在所述采用目标障碍识别模型对所述 目标识别图像进行识别,获取当前识别结果之前,所述基于计算机视觉的导航方法还包括:The computer vision-based navigation method according to claim 1, wherein, before the target recognition image is recognized by the target obstacle recognition model and the current recognition result is obtained, the computer vision-based navigation method further comprises:
    获取训练图像和测试图像,所述训练图像和所述测试图像携带有障碍物体类型和障碍物体标签;Acquiring a training image and a test image, where the training image and the test image carry the type of obstacle and the tag of the obstacle;
    将所述训练图像输入到神经网络模型中进行训练,获取原始障碍识别模型;Input the training image into a neural network model for training, and obtain an original obstacle recognition model;
    将所述测试图像输入到所述原始障碍识别模型中,获取所述原始障碍识别模型输出的识别准确率;Inputting the test image into the original obstacle recognition model, and obtaining the recognition accuracy rate output by the original obstacle recognition model;
    若所述识别准确率大于预设准确阈值,则将原始障碍识别模型确定为目标障碍识别模型。If the recognition accuracy rate is greater than the preset accuracy threshold, the original obstacle recognition model is determined as the target obstacle recognition model.
  6. 如权利要求1所述的基于计算机视觉的导航方法,其中,所述障碍物体还携带有障碍物体类型;The computer vision-based navigation method according to claim 1, wherein the obstacle object also carries the obstacle object type;
    所述根据所述距离数据与预设告警条件,获取对应的规避提醒信息,采用所述语音播放系统播放所述规避提醒信息,包括:The acquiring corresponding evasion reminder information according to the distance data and preset alarm conditions, and playing the evasion reminder information by using the voice playback system includes:
    若所述距离数据符合所述预设告警条件,且所述障碍物体携带的所述障碍物体类型为固定障碍物体,基于所述用户当前位置和所述终点位置,采用遗传算法进行路径规划,获取第二目标路线,将所述第二目标路线作为规避提醒信息,采用所述语音播放系统播放所述规避提醒信息;If the distance data meets the preset warning condition, and the type of obstacle carried by the obstacle is a fixed obstacle, based on the current position of the user and the end position, a genetic algorithm is used for path planning to obtain A second target route, using the second target route as evasion reminder information, and playing the evasion reminder information by using the voice playback system;
    若所述距离数据符合所述预设告警条件,且所述障碍物体携带的所述障碍物体类型为可移动障碍物体,对所述障碍物体进行检测,基于检测结果生成规避提醒信息,采用所述语音播放系统播放所述规避提醒信息。If the distance data meets the preset warning conditions, and the type of obstacle carried by the obstacle is a movable obstacle, the obstacle is detected, and evasion reminder information is generated based on the detection result, and the The voice playback system plays the evasion reminder message.
  7. 一种基于计算机视觉的导航装置,其中,包括:A navigation device based on computer vision, which includes:
    导航请求信息获取模块,用于获取导航请求信息,所述导航请求信息包含起点位置和终点位置;A navigation request information acquisition module, configured to acquire navigation request information, where the navigation request information includes a starting point position and an ending point position;
    第一目标路线获取模块,用于根据所述起点位置和所述终点位置进行路线规划,获取第一目标路线,采用语音播放系统播放与所述第一目标路线相对应的导航语音数据;The first target route acquisition module is configured to perform route planning according to the starting point position and the end point position, acquire a first target route, and use a voice playback system to play navigation voice data corresponding to the first target route;
    当前识别结果获取模块,用于获取所述第一目标路线对应的路况实时视频,从所述路况实时视频中提取待识别图像,对所述待识别图像进行预处理,获取目标识别图像,采用目标障碍识别模型对所述目标识别图像进行识别,获取当前识别结果;The current recognition result obtaining module is used to obtain the real-time video of the road conditions corresponding to the first target route, extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain the target recognition image, and use the target The obstacle recognition model recognizes the target recognition image and obtains the current recognition result;
    距离数据获取模块,用于若所述当前识别结果为存在障碍物体,则采用计算机视觉工具对所述障碍物体进行双目测距,确定用户当前位置与所述障碍物体的距离数据;The distance data acquisition module is configured to, if the current recognition result is that there is an obstacle, use a computer vision tool to perform binocular distance measurement on the obstacle, and determine the distance data between the user's current position and the obstacle;
    规避提醒信息获取模块,用于根据所述距离数据与预设告警条件,获取对应的规避提醒信息,采用所述语音播放系统播放所述规避提醒信息。The evasion reminder information acquisition module is configured to obtain corresponding evasion reminder information according to the distance data and preset alarm conditions, and use the voice playback system to play the evasion reminder information.
  8. 如权利要求7所述的基于计算机视觉的导航装置,其中,导航请求信息获取模块,包括:8. The computer vision-based navigation device according to claim 7, wherein the navigation request information acquisition module comprises:
    位置输入提醒数据播放单元,用于采用语音播放系统播放位置输入提醒数据,接收语音采集系统基于所述位置提醒数据输入的待识别语音数据;The location input reminder data playback unit is configured to use the voice playback system to play location input reminder data, and receive the voice data to be recognized input by the voice collection system based on the location reminder data;
    目标文字获取单元,用于采用语音识别模型对所述待识别语音数据进行识别,获取目标文字;The target text acquisition unit is configured to recognize the to-be-recognized voice data using a voice recognition model to acquire the target text;
    语音合成单元,用于采用语音合成技术对所述目标文字进行语音合成,获取与所述目标文字相对应的待确认语音数据;A speech synthesis unit, configured to use speech synthesis technology to perform speech synthesis on the target text, and obtain the to-be-confirmed speech data corresponding to the target text;
    位置确认信息接收单元,用于采用所述语音播放系统播放所述待确认语音数据,接收客户端发送的位置确认信息,基于所述目标文字和所述位置确认信息,确定导航请求信息。The location confirmation information receiving unit is configured to use the voice playback system to play the voice data to be confirmed, receive the location confirmation information sent by the client, and determine the navigation request information based on the target text and the location confirmation information.
  9. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其中,所述处理器执行所述计算机可读指令时实现如下步骤:A computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, wherein the processor implements the following steps when the processor executes the computer-readable instructions:
    获取导航请求信息,所述导航请求信息包含起点位置和终点位置;Acquiring navigation request information, where the navigation request information includes a starting point position and an ending point position;
    根据所述起点位置和所述终点位置进行路线规划,获取第一目标路线,采用语音播放系统播放与所述第一目标路线相对应的导航语音数据;Perform route planning according to the starting point position and the ending point position, obtain a first target route, and use a voice playback system to play navigation voice data corresponding to the first target route;
    获取所述第一目标路线对应的路况实时视频,从所述路况实时视频中提取待识别图像,对所述待识别图像进行预处理,获取目标识别图像,采用目标障碍识别模型对所述目标识别图像进行识别,获取当前识别结果;Acquire a real-time video of the road condition corresponding to the first target route, extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain a target recognition image, and use a target obstacle recognition model to recognize the target Recognize the image and obtain the current recognition result;
    若所述当前识别结果为存在障碍物体,则采用计算机视觉工具对所述障碍物体进行双目测距,确定用户当前位置与所述障碍物体的距离数据;If the current recognition result is that there is an obstacle, a computer vision tool is used to perform binocular distance measurement on the obstacle to determine the distance data between the user's current position and the obstacle;
    根据所述距离数据与预设告警条件,获取对应的规避提醒信息,采用所述语音播放系统播放所述规避提醒信息。According to the distance data and preset alarm conditions, the corresponding evasion reminder information is obtained, and the voice playback system is used to play the evasion reminder information.
  10. 如权利要求9所述的计算机设备,其中,所述获取导航请求信息,包括:9. The computer device according to claim 9, wherein said obtaining navigation request information comprises:
    采用语音播放系统播放位置输入提醒数据,接收语音采集系统基于所述位置提醒数据输入的待识别语音数据;Use a voice playback system to play the position to input reminder data, and receive the to-be-recognized voice data input by the voice collection system based on the position reminder data;
    采用语音识别模型对所述待识别语音数据进行识别,获取目标文字;Recognizing the to-be-recognized voice data using a voice recognition model to obtain the target text;
    采用语音合成技术对所述目标文字进行语音合成,获取与所述目标文字相对应的待确认语音数据;Using speech synthesis technology to perform speech synthesis on the target text, and obtain the to-be-confirmed speech data corresponding to the target text;
    采用所述语音播放系统播放所述待确认语音数据,接收客户端发送的位置确认信息,基于所述目标文字和所述位置确认信息,确定导航请求信息。The voice playback system is used to play the voice data to be confirmed, receive the location confirmation information sent by the client, and determine the navigation request information based on the target text and the location confirmation information.
  11. 如权利要求9所述的计算机设备,其中,所述对所述待识别图像进行预处理,获取目标识别图像,包括:9. The computer device according to claim 9, wherein the preprocessing the image to be recognized to obtain the target recognition image comprises:
    对所述待识别图像进行灰度化和二值化处理,获取待处理图像;Performing grayscale and binarization processing on the image to be recognized to obtain the image to be processed;
    采用边缘检测算法和直线检测算法对所述待处理图像进行处理,获取路况识别图像;Use an edge detection algorithm and a straight line detection algorithm to process the to-be-processed image to obtain a road condition recognition image;
    采用阈值选取方法对所述路况识别图像进行障碍物体与背景进行分割,获取目标识别图像。The threshold selection method is adopted to segment the obstacle object and the background of the road condition recognition image to obtain the target recognition image.
  12. 如权利要求9所述的计算机设备,其中,所述目标识别图像包括左目识别图像和右目识别图像,所述采用计算机视觉工具对所述障碍物体进行双目测距,确定用户当前位置与所述障碍物体的距离数据,包括:The computer device of claim 9, wherein the target recognition image includes a left-eye recognition image and a right-eye recognition image, and the computer vision tool is used to perform binocular distance measurement on the obstacle to determine the current position of the user and the Distance data of obstacles, including:
    采用张正友标定法进行标定,获得双目摄像头的参数数据;Use Zhang Zhengyou calibration method to calibrate to obtain the parameter data of the binocular camera;
    基于所述参数数据对所述左目识别图像和所述右目识别图像进行图像校正,获取左目校正图像和右目校正图像;Performing image correction on the left-eye recognition image and the right-eye recognition image based on the parameter data to obtain a left-eye correction image and a right-eye correction image;
    采用立体匹配算法对所述左目校正图像和右目校正图像进行立体匹配,获取视差图;Using a stereo matching algorithm to perform stereo matching on the left-eye corrected image and the right-eye corrected image to obtain a disparity map;
    基于所述视差图确定用户当前位置与所述障碍物体的距离数据。Determine the distance data between the current position of the user and the obstacle based on the disparity map.
  13. 如权利要求9所述的计算机设备,其中,在所述采用目标障碍识别模型对所述目标识别图像进行识别,获取当前识别结果之前,所述基于计算机视觉的导航方法还包括:9. The computer device according to claim 9, wherein, before the target recognition image is recognized by the target obstacle recognition model and the current recognition result is obtained, the computer vision-based navigation method further comprises:
    获取训练图像和测试图像,所述训练图像和所述测试图像携带有障碍物体类型和障碍物体标签;Acquiring a training image and a test image, where the training image and the test image carry the type of obstacle and the tag of the obstacle;
    将所述训练图像输入到神经网络模型中进行训练,获取原始障碍识别模型;Input the training image into a neural network model for training, and obtain an original obstacle recognition model;
    将所述测试图像输入到所述原始障碍识别模型中,获取所述原始障碍识别模型输出的识别准确率;Inputting the test image into the original obstacle recognition model, and obtaining the recognition accuracy rate output by the original obstacle recognition model;
    若所述识别准确率大于预设准确阈值,则将原始障碍识别模型确定为目标障碍识别模型。If the recognition accuracy rate is greater than the preset accuracy threshold, the original obstacle recognition model is determined as the target obstacle recognition model.
  14. 如权利要求9所述的计算机设备,其中,所述障碍物体还携带有障碍物体类型;9. The computer device according to claim 9, wherein the obstacle object also carries an obstacle object type;
    所述根据所述距离数据与预设告警条件,获取对应的规避提醒信息,采用所述语音播放系统播放所述规避提醒信息,包括:The acquiring corresponding evasion reminder information according to the distance data and preset alarm conditions, and playing the evasion reminder information by using the voice playback system includes:
    若所述距离数据符合所述预设告警条件,且所述障碍物体携带的所述障碍物体类型为固定障碍物体,基于所述用户当前位置和所述终点位置,采用遗传算法进行路径规划,获取第二目标路线,将所述第二目标路线作为规避提醒信息,采用所述语音播放系统播放所述规避提醒信息;If the distance data meets the preset warning condition, and the type of obstacle carried by the obstacle is a fixed obstacle, based on the current position of the user and the end position, a genetic algorithm is used for path planning to obtain A second target route, using the second target route as evasion reminder information, and playing the evasion reminder information by using the voice playback system;
    若所述距离数据符合所述预设告警条件,且所述障碍物体携带的所述障碍物体类型为可移动障碍物体,对所述障碍物体进行检测,基于检测结果生成规避提醒信息,采用所述语音播放系统播放所述规避提醒信息。If the distance data meets the preset warning conditions, and the type of obstacle carried by the obstacle is a movable obstacle, the obstacle is detected, and evasion reminder information is generated based on the detection result, and the The voice playback system plays the evasion reminder message.
  15. 一个或多个存储有计算机可读指令的可读存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:One or more readable storage media storing computer readable instructions, where when the computer readable instructions are executed by one or more processors, the one or more processors execute the following steps:
    获取导航请求信息,所述导航请求信息包含起点位置和终点位置;Acquiring navigation request information, where the navigation request information includes a starting point position and an ending point position;
    根据所述起点位置和所述终点位置进行路线规划,获取第一目标路线,采用语音播放系统播放与所述第一目标路线相对应的导航语音数据;Perform route planning according to the starting point position and the ending point position, obtain a first target route, and use a voice playback system to play navigation voice data corresponding to the first target route;
    获取所述第一目标路线对应的路况实时视频,从所述路况实时视频中提取待识别图像,对所述待识别图像进行预处理,获取目标识别图像,采用目标障碍识别模型对所述目标识别图像进行识别,获取当前识别结果;Acquire a real-time video of the road condition corresponding to the first target route, extract the image to be recognized from the real-time video of the road condition, preprocess the image to be recognized, obtain a target recognition image, and use a target obstacle recognition model to recognize the target Recognize the image and obtain the current recognition result;
    若所述当前识别结果为存在障碍物体,则采用计算机视觉工具对所述障碍物体进行双目测距,确定用户当前位置与所述障碍物体的距离数据;If the current recognition result is that there is an obstacle, a computer vision tool is used to perform binocular distance measurement on the obstacle to determine the distance data between the user's current position and the obstacle;
    根据所述距离数据与预设告警条件,获取对应的规避提醒信息,采用所述语音播放系统播放所述规避提醒信息。According to the distance data and preset alarm conditions, the corresponding evasion reminder information is obtained, and the voice playback system is used to play the evasion reminder information.
  16. 如权利要求15所述的可读存储介质,其中,所述获取导航请求信息,包括:The readable storage medium according to claim 15, wherein said obtaining navigation request information comprises:
    采用语音播放系统播放位置输入提醒数据,接收语音采集系统基于所述位置提醒数据输入的待识别语音数据;Use a voice playback system to play the position to input reminder data, and receive the to-be-recognized voice data input by the voice collection system based on the position reminder data;
    采用语音识别模型对所述待识别语音数据进行识别,获取目标文字;Recognizing the to-be-recognized voice data using a voice recognition model to obtain the target text;
    采用语音合成技术对所述目标文字进行语音合成,获取与所述目标文字相对应的待确认语音数据;Using speech synthesis technology to perform speech synthesis on the target text, and obtain the to-be-confirmed speech data corresponding to the target text;
    采用所述语音播放系统播放所述待确认语音数据,接收客户端发送的位置确认信息,基于所述目标文字和所述位置确认信息,确定导航请求信息。The voice playback system is used to play the voice data to be confirmed, receive the location confirmation information sent by the client, and determine the navigation request information based on the target text and the location confirmation information.
  17. 如权利要求15所述的可读存储介质,其中,所述对所述待识别图像进行预处理,获取目标识别图像,包括:15. The readable storage medium of claim 15, wherein the preprocessing the image to be recognized to obtain the target recognition image comprises:
    对所述待识别图像进行灰度化和二值化处理,获取待处理图像;Performing grayscale and binarization processing on the image to be recognized to obtain the image to be processed;
    采用边缘检测算法和直线检测算法对所述待处理图像进行处理,获取路况识别图像;Use an edge detection algorithm and a straight line detection algorithm to process the to-be-processed image to obtain a road condition recognition image;
    采用阈值选取方法对所述路况识别图像进行障碍物体与背景进行分割,获取目标识别图像。The threshold selection method is adopted to segment the obstacle object and the background of the road condition recognition image to obtain the target recognition image.
  18. 如权利要求15所述的可读存储介质,其中,所述目标识别图像包括左目识别图像和右目识别图像,15. The readable storage medium of claim 15, wherein the target recognition image includes a left-eye recognition image and a right-eye recognition image,
    所述采用计算机视觉工具对所述障碍物体进行双目测距,确定用户当前位置与所述障碍物体的距离数据,包括:The binocular distance measurement of the obstacle by using a computer vision tool to determine the distance data between the user's current position and the obstacle includes:
    采用张正友标定法进行标定,获得双目摄像头的参数数据;Use Zhang Zhengyou calibration method to calibrate to obtain the parameter data of the binocular camera;
    基于所述参数数据对所述左目识别图像和所述右目识别图像进行图像校正,获取左目校正图像和右目校正图像;Performing image correction on the left-eye recognition image and the right-eye recognition image based on the parameter data to obtain a left-eye correction image and a right-eye correction image;
    采用立体匹配算法对所述左目校正图像和右目校正图像进行立体匹配,获取视差图;Using a stereo matching algorithm to perform stereo matching on the left-eye corrected image and the right-eye corrected image to obtain a disparity map;
    基于所述视差图确定用户当前位置与所述障碍物体的距离数据。Determine the distance data between the current position of the user and the obstacle based on the disparity map.
  19. 如权利要求15所述的可读存储介质,其中,在所述采用目标障碍识别模型对所述目标识别图像进行识别,获取当前识别结果之前,所述基于计算机视觉的导航方法还包括:15. The readable storage medium of claim 15, wherein, before the target recognition image is recognized by the target obstacle recognition model and the current recognition result is obtained, the computer vision-based navigation method further comprises:
    获取训练图像和测试图像,所述训练图像和所述测试图像携带有障碍物体类型和障碍物体标签;Acquiring a training image and a test image, where the training image and the test image carry the type of obstacle and the tag of the obstacle;
    将所述训练图像输入到神经网络模型中进行训练,获取原始障碍识别模型;Input the training image into a neural network model for training, and obtain an original obstacle recognition model;
    将所述测试图像输入到所述原始障碍识别模型中,获取所述原始障碍识别模型输出的识别准确率;Inputting the test image into the original obstacle recognition model, and obtaining the recognition accuracy rate output by the original obstacle recognition model;
    若所述识别准确率大于预设准确阈值,则将原始障碍识别模型确定为目标障碍识别模型。If the recognition accuracy rate is greater than the preset accuracy threshold, the original obstacle recognition model is determined as the target obstacle recognition model.
  20. 如权利要求15所述的可读存储介质,其中,所述障碍物体还携带有障碍物体类型;The readable storage medium according to claim 15, wherein the obstacle object also carries the obstacle object type;
    所述根据所述距离数据与预设告警条件,获取对应的规避提醒信息,采用所述语音播放系统播放所述规避提醒信息,包括:The acquiring corresponding evasion reminder information according to the distance data and preset alarm conditions, and playing the evasion reminder information by using the voice playback system includes:
    若所述距离数据符合所述预设告警条件,且所述障碍物体携带的所述障碍物体类型为固定障碍物体,基于所述用户当前位置和所述终点位置,采用遗传算法进行路径规划,获取第二目标路线,将所述第二目标路线作为规避提醒信息,采用所述语音播放系统播放所述规避提醒信息;If the distance data meets the preset warning condition, and the type of obstacle carried by the obstacle is a fixed obstacle, based on the current position of the user and the end position, a genetic algorithm is used for path planning to obtain A second target route, using the second target route as evasion reminder information, and playing the evasion reminder information by using the voice playback system;
    若所述距离数据符合所述预设告警条件,且所述障碍物体携带的所述障碍物体类型为可移动障碍物体,对所述障碍物体进行检测,基于检测结果生成规避提醒信息,采用所述语音播放系统播放所述规避提醒信息。If the distance data meets the preset warning conditions, and the type of obstacle carried by the obstacle is a movable obstacle, the obstacle is detected, and evasion reminder information is generated based on the detection result, and the The voice playback system plays the evasion reminder message.
PCT/CN2020/105015 2019-12-25 2020-07-28 Navigation method and apparatus based on computer vision, computer device, and medium WO2021128834A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911356786.XA CN111060074A (en) 2019-12-25 2019-12-25 Navigation method, device, computer equipment and medium based on computer vision
CN201911356786.X 2019-12-25

Publications (1)

Publication Number Publication Date
WO2021128834A1 true WO2021128834A1 (en) 2021-07-01

Family

ID=70303426

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/105015 WO2021128834A1 (en) 2019-12-25 2020-07-28 Navigation method and apparatus based on computer vision, computer device, and medium

Country Status (2)

Country Link
CN (1) CN111060074A (en)
WO (1) WO2021128834A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111060074A (en) * 2019-12-25 2020-04-24 深圳壹账通智能科技有限公司 Navigation method, device, computer equipment and medium based on computer vision
CN112083908B (en) * 2020-07-29 2023-05-23 联想(北京)有限公司 Method for simulating relative movement direction of object and audio output device
CN111932792B (en) * 2020-08-14 2021-12-17 西藏洲明电子科技有限公司 Movable datamation storage mechanism
CN112902987B (en) * 2021-02-02 2022-07-15 北京三快在线科技有限公司 Pose correction method and device
CN113687810A (en) * 2021-05-25 2021-11-23 青岛海尔科技有限公司 Voice navigation method and device, storage medium and electronic equipment
CN113419257A (en) * 2021-06-29 2021-09-21 深圳市路卓科技有限公司 Positioning calibration method, device, terminal equipment, storage medium and program product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130258078A1 (en) * 2012-03-27 2013-10-03 Yu-Chien Huang Guide device for the blind
KR20180097962A (en) * 2017-02-24 2018-09-03 전자부품연구원 Situation determining guide apparatus and method based image analysis
CN108743266A (en) * 2018-06-29 2018-11-06 合肥思博特软件开发有限公司 A kind of blindmen intelligent navigation avoidance trip householder method and system
CN108844545A (en) * 2018-06-29 2018-11-20 合肥信亚达智能科技有限公司 A kind of auxiliary traveling method and system based on image recognition
CN109059920A (en) * 2018-06-29 2018-12-21 合肥信亚达智能科技有限公司 A kind of blind traffic safety monitoring intelligent navigation methods and systems
CN111060074A (en) * 2019-12-25 2020-04-24 深圳壹账通智能科技有限公司 Navigation method, device, computer equipment and medium based on computer vision

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102389361B (en) * 2011-07-18 2014-06-25 浙江大学 Blindman outdoor support system based on computer vision
CN102973395B (en) * 2012-11-30 2015-04-08 中国舰船研究设计中心 Multifunctional intelligent blind guiding method, processor and multifunctional intelligent blind guiding device
CA2950791C (en) * 2013-08-19 2019-04-16 State Grid Corporation Of China Binocular visual navigation system and method based on power robot
CN105105992B (en) * 2015-09-11 2017-09-22 广州杰赛科技股份有限公司 A kind of obstacle detection method, device and intelligent watch
CN106871906B (en) * 2017-03-03 2020-08-28 西南大学 Navigation method and device for blind person and terminal equipment
CN108618356A (en) * 2018-07-05 2018-10-09 上海草家物联网科技有限公司 A kind of intelligent school bag and its management system with barrier prompting function
CN109029452B (en) * 2018-07-10 2020-02-21 深圳先进技术研究院 Wearable navigation equipment and navigation method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130258078A1 (en) * 2012-03-27 2013-10-03 Yu-Chien Huang Guide device for the blind
KR20180097962A (en) * 2017-02-24 2018-09-03 전자부품연구원 Situation determining guide apparatus and method based image analysis
CN108743266A (en) * 2018-06-29 2018-11-06 合肥思博特软件开发有限公司 A kind of blindmen intelligent navigation avoidance trip householder method and system
CN108844545A (en) * 2018-06-29 2018-11-20 合肥信亚达智能科技有限公司 A kind of auxiliary traveling method and system based on image recognition
CN109059920A (en) * 2018-06-29 2018-12-21 合肥信亚达智能科技有限公司 A kind of blind traffic safety monitoring intelligent navigation methods and systems
CN111060074A (en) * 2019-12-25 2020-04-24 深圳壹账通智能科技有限公司 Navigation method, device, computer equipment and medium based on computer vision

Also Published As

Publication number Publication date
CN111060074A (en) 2020-04-24

Similar Documents

Publication Publication Date Title
WO2021128834A1 (en) Navigation method and apparatus based on computer vision, computer device, and medium
US11727593B1 (en) Automated data capture
US11900619B2 (en) Intelligent vehicle trajectory measurement method based on binocular stereo vision system
WO2022083402A1 (en) Obstacle detection method and apparatus, computer device, and storage medium
TWI798305B (en) Systems and methods for updating highly automated driving maps
Peng et al. A smartphone-based obstacle sensor for the visually impaired
WO2021056841A1 (en) Positioning method, path determining method and apparatus, robot, and storage medium
JP2016029564A (en) Target detection method and target detector
US20170003132A1 (en) Method of constructing street guidance information database, and street guidance apparatus and method using street guidance information database
EP2720193A2 (en) Method and system for detecting uneven road surface
CA3083430C (en) Urban environment labelling
Shunsuke et al. GNSS/INS/on-board camera integration for vehicle self-localization in urban canyon
US20230326247A1 (en) Information processing device
WO2022041869A1 (en) Road condition prompt method and apparatus, and electronic device, storage medium and program product
WO2022227761A1 (en) Target tracking method and apparatus, electronic device, and storage medium
CN104123776A (en) Object statistical method and system based on images
WO2020133488A1 (en) Vehicle detection method and device
CN106920260B (en) Three-dimensional inertial blind guiding method, device and system
US20210150745A1 (en) Image processing method, device, electronic apparatus, and computer readable storage medium
Gundewar et al. A review on an obstacle detection in navigation of visually impaired
KR20180068483A (en) System and method for building a location information database of road sign, apparatus and method for estimating location of vehicle using the same
CN101964054A (en) Friendly track detection system based on visual processing
CN107844749B (en) Road surface detection method and device, electronic device and storage medium
CN113469045B (en) Visual positioning method and system for unmanned integrated card, electronic equipment and storage medium
TWI451990B (en) System and method for lane localization and markings

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20907472

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04/11/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20907472

Country of ref document: EP

Kind code of ref document: A1