Road recognition method, device, computer equipment and storage medium

By performing road detection and pixel transformation processing on the target image, identifying road edge pixels is solved, and the problem of low road recognition accuracy in the prior art is achieved, and higher road recognition accuracy is achieved.

CN113762044BActive Publication Date: 2025-05-06TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110488443.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-06
Publication Date
2025-05-06
Estimated Expiration
2041-05-06

AI Technical Summary

Technical Problem

Existing road identification methods cannot accurately identify roads, resulting in low recognition accuracy.

Method used

By acquiring the target image, performing road detection, determining the pixel transformation value, forming a transformed image, identifying the road edge pixels, and then identifying the target road.

Benefits of technology

The accuracy of road recognition is improved and road information in the image can be detected more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113762044B_ABST
    Figure CN113762044B_ABST
Patent Text Reader

Abstract

The present application relates to a road recognition method, device, computer equipment and storage medium. The method comprises: performing road detection on a target image to obtain a target road detection value corresponding to each target pixel in the target image; determining a pixel transformation value corresponding to each target pixel based on the target road detection value, arranging the pixel transformation value in the order of pixel arrangement, and obtaining a transformation image corresponding to the target image; determining the transformation value change information of the target pixel in the transformation image relative to the reference pixel in the transformation image, and determining the edge pixel corresponding to the road in the target image based on the transformation value change information; and obtaining the target road in the target image based on edge pixel identification. The use of this method can improve the accuracy of road recognition. In the road recognition method provided in the present application, a neural network model based on artificial intelligence can be used to perform road detection on the target image. This method is applied in a blind guide scenario to improve the safety of blind people walking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition technology, and in particular to a road recognition method, device, computer equipment and storage medium. Background Art

[0002] With the continuous construction of roads, the number of roads is increasing, and the relationship between roads is becoming more and more complex. Real-time and accurate understanding of the distribution of roads is of great significance to vehicles or users moving on the road. For example, for vehicles driving on the road, understanding the distribution of roads can guide the vehicles to drive correctly, and for users walking on the road, understanding the distribution of roads can guide users to walk correctly.

[0003] Currently, there are many methods for identifying roads. For example, an artificial intelligence-based neural network model can be used to detect images to obtain road information in the image.

[0004] However, existing road recognition methods cannot accurately recognize roads, resulting in low accuracy of road recognition. Summary of the invention

[0005] Based on this, it is necessary to provide a road recognition method, device, computer equipment and storage medium that can improve the accuracy of road recognition in order to solve the above technical problems.

[0006] A road recognition method, the method comprising: acquiring a target image to be road recognized; performing road detection on the target image to obtain target road detection values ​​corresponding to each target pixel point in the target image; determining pixel transformation values ​​corresponding to each target pixel point in the target image based on the target road detection values, arranging the pixel transformation values ​​corresponding to the target pixel points in a pixel arrangement order, and obtaining a transformation image corresponding to the target image; determining transformation value change information of the target pixel points in the transformation image relative to a reference pixel point in the transformation image, and determining edge pixels corresponding to the road in the target image based on the transformation value change information; and obtaining a target road in the target image based on the edge pixel recognition.

[0007] A road recognition device, the device comprising: a target image acquisition module, used to acquire a target image to be road recognized; a road detection value acquisition module, used to perform road detection on the target image and obtain target road detection values ​​corresponding to each target pixel in the target image; a transformation image acquisition module, used to determine pixel transformation values ​​corresponding to each target pixel in the target image based on the target road detection values, and arrange the pixel transformation values ​​corresponding to the target pixel in a pixel arrangement order to obtain a transformation image corresponding to the target image; an edge pixel determination module, used to determine transformation value change information of the target pixel in the transformation image relative to a reference pixel in the transformation image, and determine edge pixels corresponding to the road in the target image based on the transformation value change information; a target road acquisition module, used to obtain a target road in the target image based on the edge pixel recognition.

[0008] In some embodiments, the road detection value obtaining module includes: a target user type obtaining unit, used to obtain the target user type corresponding to the target image; a first road detection model obtaining unit, used to obtain a trained road detection model corresponding to the target user type, wherein the trained road detection model is obtained by training using a target training image corresponding to the target user type; the first road detection value obtaining unit is used to input the target image into the trained road detection model for road detection, and obtain the target road detection value corresponding to each target pixel in the target image.

[0009] In some embodiments, the road detection model obtaining module for obtaining the trained road detection model includes: a target user type determination unit, used to determine the target user type corresponding to the road detection model to be trained; a first target training image obtaining unit, used to obtain a plurality of candidate training images corresponding to the target user type from a candidate training image set as target training images; a pixel label value obtaining unit, used to obtain the road position corresponding to the road in the target training image, and determine the pixel label value corresponding to each training pixel point in the target training image based on the road position; a road detection model obtaining unit, used to train the road detection model to be trained based on the target training image and the pixel label value to obtain a trained road detection model.

[0010] In some embodiments, the target training image obtaining module for obtaining the target training image includes: a road behavior information obtaining unit, used to obtain the road behavior information of the target user corresponding to the target user type; a mobile control information generating unit, used to generate mobile control information corresponding to the virtual user based on the road behavior information; a second target training image obtaining unit, used to control the virtual user to move along the road using the mobile control information, and obtain the image collected by the virtual user during the movement as the target training image.

[0011] In some embodiments, the transformed image obtaining module includes: a road pixel point obtaining unit, which is used to obtain target pixel points that meet the road detection value screening conditions from each target pixel point of the target image based on the target road detection value, as road pixel points; a pixel transformation value obtaining unit, which is used to use the road pixel value corresponding to the road as the pixel transformation value corresponding to the road pixel point, and use the shielded pixel value as the pixel transformation value corresponding to the non-road pixel point in the target image.

[0012] In some embodiments, the edge pixel determination module includes: a current pixel point acquisition unit, used to acquire the current pixel point from each pixel point of the transformed image; a reference pixel point acquisition unit, used to acquire the adjacent pixel points of the current pixel point from the transformed image, and determine the reference pixel point corresponding to the current pixel point based on the adjacent pixel points; a transformation value change information acquisition unit, used to acquire the transformation value difference between the current pixel point and the reference pixel point corresponding to the current pixel point, and obtain the transformation value change information of the current pixel point relative to the reference pixel point based on the transformation value difference.

[0013] In some embodiments, the reference pixel point of the current pixel point includes adjacent pixel points in multiple pixel arrangement directions, and the transformation value change information includes the transformation value change degree and the transformation value change direction angle; the transformation value change information obtaining unit is also used to obtain the transformation value difference corresponding to the current pixel point in each pixel arrangement direction based on the pixel transformation value of the current pixel point and the pixel transformation value of the reference pixel point of the current pixel point in each pixel arrangement direction; and determine the transformation value change degree and the transformation value change direction angle of the current pixel point relative to the reference pixel point in combination with the transformation value differences corresponding to each pixel arrangement direction.

[0014] In some embodiments, the transformation value change information obtaining unit is also used to perform statistical operations on the transformation value differences corresponding to the current pixel point in each of the pixel arrangement directions to obtain the transformation value change degree; the transformation value differences corresponding to the current pixel point in each of the pixel arrangement directions are used as the side length of the direction edge in the corresponding pixel arrangement direction, and the angle of the connecting edge connecting the direction edge is determined based on the side length, and the angle is used as the transformation value change direction angle.

[0015] In some embodiments, the transformation value change information includes the transformation value change degree and the transformation value change direction angle, and the edge pixel determination module includes: a candidate pixel point acquisition unit, used to obtain pixel points that meet the change degree screening condition from each pixel point of the transformation image as candidate pixel points; a contrast transformation value change degree acquisition unit, used to obtain the contrast transformation value change degree of the candidate pixel point at the transformation value change direction angle; a change degree difference acquisition unit, used to determine the change degree difference of the transformation value change degree of the candidate pixel point relative to the contrast transformation value change degree; an edge pixel acquisition unit, used to use the candidate pixel point as the edge pixel corresponding to the road in the target image when the change degree difference is greater than the change degree difference threshold.

[0016] In some embodiments, there are multiple edge pixels, and the target road acquisition module includes: a current edge line determination unit, which is used to determine the current edge line corresponding to the edge pixel, determine the current edge line distance between the current edge line and the reference position, and determine the current edge line angle between the current edge line and a preset reference direction line; a road edge line acquisition unit, which is used to use the current edge line distance and the current edge line angle as current edge line parameters to be adjusted, and adjust the current edge line parameters of each current edge line until the parameter adjustment stop condition is met, and use the edge direction line corresponding to the current edge line parameters that meet the parameter adjustment condition as the road edge line corresponding to the road in the target image, and the parameter adjustment stop condition includes at least one of the difference between the edge line distances being less than a distance difference threshold or the difference between the edge line angles being less than an angle difference threshold; a target road determination unit, which is used to determine the target road in the target image based on the road edge line.

[0017] In some embodiments, the target image acquisition module is also used to acquire the target image uploaded by the terminal, and use the target image as the target image to be subjected to road identification; the road detection value acquisition module includes: a second road detection model acquisition unit, used to acquire the target user type corresponding to the terminal, and acquire the trained road detection model corresponding to the target user type, wherein the trained road detection model is obtained by training using the target training image corresponding to the target user type; the second road detection value acquisition unit is used to input the target image into the trained road detection model for road detection, and obtain the target road detection value corresponding to each target pixel in the target image; the device also includes: a user movement prompt information determination module, used to determine the user movement prompt information based on the position corresponding to the target road and the position of the terminal; a user movement prompt information sending module, used to send the user movement prompt information to the terminal, so that the terminal performs movement prompts according to the user movement prompt information.

[0018] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned road recognition method when executing the computer program.

[0019] A computer-readable storage medium stores a computer program, which implements the steps of the road recognition method when executed by a processor.

[0020] In some embodiments, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.

[0021] The above-mentioned road recognition method, device, computer equipment and storage medium obtain a target image to be road recognized, perform road detection on the target image, obtain a target road detection value corresponding to each target pixel in the target image, determine a pixel transformation value corresponding to each target pixel in the target image based on the target road detection value, arrange the pixel transformation values ​​corresponding to the target pixel in accordance with the pixel arrangement order, obtain a transformed image corresponding to the target image, determine transformation value change information of the target pixel in the transformed image relative to the reference pixel in the transformed image, determine edge pixels corresponding to the road in the target image based on the transformation value change information, obtain the target road in the target image based on edge pixel identification, and because the image can be transformed based on the target road detection value so that the transformed image better reflects the road information in the image, the corresponding edge pixels in the target image can be accurately detected based on the transformation value change information of the target pixel relative to the reference pixel in the transformed image, thereby improving the accuracy of road recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A diagram showing an application environment of a road recognition method in some embodiments;

[0023] Figure 2 is a schematic flow chart of a road recognition method in some embodiments;

[0024] Figure 3 A schematic diagram of using a road detection model to perform road detection in some embodiments;

[0025] Figure 4 is a schematic diagram of pixel label values ​​in some embodiments;

[0026] Figure 5 A schematic diagram of obtaining a road edge line and a road center line in some embodiments;

[0027] Figure 6 is a schematic flow chart of a road recognition method in some embodiments;

[0028] Fig. 7A A schematic diagram of obtaining a road edge line and a road center line in some embodiments;

[0029] Figure 7B A schematic diagram of obtaining a road edge line and a road center line in some embodiments;

[0030] Figure 8 is a structural block diagram of a road recognition device in some embodiments;

[0031] Fig. 9 is an internal structure diagram of a computer device in some embodiments;

[0032] Fig.101 is a diagram of the internal structure of a computer device in some embodiments. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0034] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0035] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0036] Computer Vision (CV) is a science that studies how to make machines "see". To put it more specifically, it refers to machine vision such as using cameras and computers to replace human eyes to identify and measure targets, and further perform graphic processing so that computer processing becomes an image that is more suitable for human eye observation or transmission to instrument detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and map construction, and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.

[0037] The key technologies of speech technology include automatic speech recognition technology (ASR), text-to-speech technology (TTS) and voiceprint recognition technology. Enabling computers to listen, see, speak and feel is the future development direction of human-computer interaction, among which speech has become one of the most promising human-computer interaction methods in the future.

[0038] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.

[0039] Autonomous driving technology usually includes high-precision maps, environmental perception, behavioral decision-making, path planning, motion control and other technologies. Autonomous driving technology has broad application prospects.

[0040] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, smart customer service, etc. I believe that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0041] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.

[0042] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, image websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.

[0043] Cloud computing refers to the delivery and use model of IT infrastructure, which means obtaining required resources through the network in an on-demand and easily scalable manner; in a broad sense, cloud computing refers to the delivery and use model of services, which means obtaining required services through the network in an on-demand and easily scalable manner. This service can be IT and software, Internet-related, or other services. Cloud computing is the product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing.

[0044] With the development of the Internet, real-time data streams, and the diversification of connected devices, as well as the demand for search services, social networks, mobile commerce, and open collaboration, cloud computing has developed rapidly. Different from the previous parallel distributed computing, the emergence of cloud computing will promote revolutionary changes in the entire Internet model and enterprise management model from a conceptual perspective.

[0045] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.

[0046] At present, the storage method of the storage system is: create a logical volume, and when creating a logical volume, allocate physical storage space for each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, stores the data on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, ID entity). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.

[0047] The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.

[0048] In short, a database can be seen as an electronic filing cabinet - a place where electronic files are stored, and users can add, query, update, delete, and other operations on the data in the files. The so-called "database" is a collection of data that is stored together in a certain way, can be shared with multiple users, has as little redundancy as possible, and is independent of the application.

[0049] A database management system (DBMS) is a computer software system designed for managing databases. It generally has basic functions such as storage, retrieval, security, and backup. Database management systems can be classified according to the database model they support, such as relational, XML (Extensible Markup Language); or according to the type of computer they support, such as server clusters, mobile phones; or according to the query language used, such as SQL (Structured Query Language), XQuery; or according to the performance focus, such as maximum scale, maximum operating speed; or other classification methods. Regardless of the classification method used, some DBMS can cross categories, for example, supporting multiple query languages ​​at the same time.

[0050] Big data refers to a collection of data that cannot be captured, managed, and processed by conventional software tools within a certain time frame. It is a massive, high-growth, and diverse information asset that requires new processing models to have stronger decision-making power, insight discovery, and process optimization capabilities. With the advent of the cloud era, big data has also attracted more and more attention. Big data requires special technologies to effectively process large amounts of data within a tolerable time frame. Technologies applicable to big data include large-scale parallel processing databases, data mining, distributed file systems, distributed databases, cloud computing platforms, the Internet, and scalable storage systems.

[0051] The solution provided in the embodiments of the present application involves artificial intelligence machine learning and image recognition technologies, which are specifically described by the following embodiments:

[0052] The road recognition method provided by this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. Specifically, the terminal 102 can collect images of the road and send the collected images to the server 104. The server 104 can use the images sent by the terminal 102 as the target images to be identified by the road. Of course, the terminal 102 can also collect videos of the road and send the collected videos to the server 104. The server 104 can extract video images from the videos sent by the terminal 102 and use the extracted video images as the target images to be identified by the road. The server 104 can perform road detection on the target image, obtain the target road detection value corresponding to each target pixel point in the target image, determine the pixel transformation value corresponding to each target pixel point in the target image based on the target road detection value, arrange the pixel transformation values ​​corresponding to the target pixel points according to the pixel arrangement order, obtain the transformation image corresponding to the target image, determine the transformation value change information of the target pixel points in the transformation image relative to the reference pixel points in the transformation image, determine the edge pixels corresponding to the road in the target image based on the transformation value change information, and obtain the target road in the target image based on the edge pixel recognition. The server 104 may determine user movement prompt information based on the location of the target road and the location of the terminal 102 , and send the user movement prompt information to the terminal 102 . The terminal 102 may provide movement prompts to the user corresponding to the terminal according to the user movement prompt information.

[0053] Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The terminal 102 can also be a guide device for the blind. At least one of an image acquisition device or a video acquisition device can be installed on the guide device for the blind. The guide device is used to guide the blind to walk, and the guide device can include at least one of guide glasses or guide sticks. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application is not limited here.

[0054] It can be understood that the above application scenario is only an example and does not constitute a limitation on the road recognition method provided in the embodiment of the present application. The method provided in the embodiment of the present application can also be applied in other application scenarios. For example, the road recognition method provided in the present application can be executed by the terminal 102. The terminal 102 can determine the user movement prompt information based on the location of the target road and the location of the terminal 102, and provide a movement prompt to the user corresponding to the terminal 102 based on the user movement prompt information. The terminal 102 can also upload the target road in the obtained target image to the server 104. The server 104 can store the target road in the target image, and can also forward the target road in the target image to other terminal devices.

[0055] In some embodiments, Figure 2 As shown, a road recognition method is provided. The method can be executed by a terminal or a server, or by both the terminal and the server. In the embodiment of the present application, the method is applied to Figure 1 Taking the server 104 in the example as an example, the following steps are included:

[0056] S202, obtaining a target image for road recognition.

[0057] Among them, road recognition refers to identifying one or more types of roads from the image, and multiple types refers to at least two. The road type may include at least one of a motor vehicle lane, a non-motor vehicle lane, or a sidewalk, wherein the sidewalk may include at least one of a crosswalk or a blind path.

[0058] The target image refers to the road image to be recognized, and the road image refers to an image including the road. The target image can be a road image pre-stored in the server, or a road image acquired by the server from the terminal in real time, for example, a road image acquired in real time by guide glasses.

[0059] Specifically, the terminal can collect road images in real time and send the collected road images to the server. The server can use the received road images as target images to be identified, perform road detection on the target images, and determine the location of the roads in the target images.

[0060] In some embodiments, the server may pre-store road images corresponding to one or more user types, where multiple means at least two. The user type may be divided according to the user's movement mode on the road. For example, the user type may include at least one of a user driving a motor vehicle, a user driving a non-motor vehicle, or a walking user. Among them, the walking user may include a walking user with visual impairment or a walking user without visual impairment. The user with visual impairment may also be called a blind person. The road image corresponding to the user type refers to the road image collected by the terminal carried by the user of the user type, such as the road image collected by the guide glasses worn by the blind or the road image collected by the mobile phone carried by the blind.

[0061] In some embodiments, the server may obtain a road image corresponding to the target user type from the stored road images, and use the road image corresponding to the target user type as the target image to be used for road recognition. The target user type may be preset or determined as needed, for example, a walking user with visual impairment.

[0062] S204, performing road detection on the target image to obtain a target road detection value corresponding to each target pixel point in the target image.

[0063] Among them, road detection refers to detecting roads in an image, and the target pixel point is a pixel point in the target image. The road detection value is used to indicate the probability that a pixel point is a road pixel point, and the target road detection value is used to indicate the probability that a target pixel point is a road pixel point. The larger the target road detection value, the greater the probability that the target pixel point is a road pixel point, and the smaller the target road detection value, the smaller the probability that the target pixel point is a road pixel point. The target road detection value can be, for example, 0.7 or 0.9. Road pixel points refer to the pixel points that form roads in an image, that is, the pixel points at the position where the road is located in the image.

[0064] Specifically, the server can use the road detection model to perform road detection on the target image. The road detection model refers to a model used to detect the road in the image, and the position of the road in the image can be detected. The road detection model can be a neural network model based on artificial intelligence, for example, it can be a deep learning model, for example, it can be at least one of a semantic segmentation model or an instance segmentation model. The semantic segmentation model can include at least one of UNet (U-type network), FCN (Fully Convolution Network), YOLACT (You Only Look At CoefficienTs) or DeepLab. The specific model used can be determined based on the hardware operation limitations of the device that deploys the trained road detection model. The road detection model can be, for example, a road segmentation model, and the road segmentation model can determine the location of the road from the image. The road determined by the road detection model can also be different for different user types. For example, when the user is a user driving a vehicle, the road detection model can determine the location of the motor vehicle lane, and when the user is a walking blind person, the road detection model can determine the blind lane or sidewalk.

[0065] In some embodiments, the road detection model may include a feature extraction network. The server can obtain a trained road detection model, input the target image into the feature extraction network of the trained road detection model for feature extraction, use the extracted features as image extraction features, and determine the target road detection value corresponding to each target pixel point in the target image based on the image extraction features.

[0066] In some embodiments, the server can obtain the image area corresponding to the feature value in the image extraction feature from the target image, obtain the image area corresponding to each feature value, and determine the target road detection value corresponding to each target pixel point in the image area based on the feature value. For example, the feature value can be used as the target road detection value corresponding to each target pixel point in the corresponding image area, or the feature value can be scaled and the scaled feature value can be used as the scaled feature value, and the scaled feature value can be used as the target road detection value corresponding to each target pixel point in the corresponding image area.

[0067] S206, determining pixel transformation values ​​corresponding to each target pixel point in the target image based on the target road detection value, arranging the pixel transformation values ​​corresponding to the target pixel points according to the pixel arrangement order, and obtaining a transformation image corresponding to the target image.

[0068] The pixel transformation value is determined according to the target road detection value. The pixel transformation value can be any one of the road pixel value and the shielded pixel value. The road pixel value is used to indicate that the pixel point is a road pixel point, and the shielded pixel value is used to indicate that the pixel point is a non-road pixel point. The non-road pixel point refers to the pixel point other than the road pixel point in the image. The pixel value corresponding to the pixel point in the transformed image is the pixel transformation value. The pixel point arrangement order refers to the position of the target pixel point in the target image.

[0069] Specifically, based on the target road detection value, the server can obtain target pixel points that meet the road detection value screening condition from each target pixel point of the target image as road pixel points, and use the road pixel value as the pixel transformation value corresponding to the road pixel point, and use the target pixel points that do not meet the road detection value screening condition as non-road pixel points, and use the shielding pixel value as the pixel transformation value corresponding to the non-road pixel point in the target image. The road detection value screening condition may include at least one of the target road detection value being greater than the detection value threshold or the road detection value being ranked before the detection value ranking threshold. The shielding pixel value is different from the road pixel value, and the shielding pixel value is used to indicate that the pixel point is a non-road pixel point, for example, the road pixel value may be 1, and the shielding pixel value may be 0.

[0070] The detection value threshold may be preset, for example, a fixed value such as 0.8 or 0.9, or may be obtained by calculating the detection values ​​of each target road. For example, the server may calculate the mean of the detection values ​​of each target road to obtain the mean of the road detection values, obtain a preset detection value coefficient, multiply the detection value coefficient by the mean of the detection value, and use the result of the multiplication as the detection value threshold. The detection value coefficient may be a value greater than 1, for example, 1.2.

[0071] Road detection value sorting refers to the sorting of target road detection values ​​in the road detection value sequence. The road detection value sequence is a sequence obtained by arranging each target road detection value in order from large to small. The larger the target road detection value, the higher the ranking in the road detection value sequence.

[0072] The detection value sorting threshold can be preset, for example, a fixed value such as 9 or 10, or can be calculated based on the number of target road detection values. For example, the server can obtain a preset sorting coefficient, multiply the sorting coefficient by the number of target road detection values, and use the result of the multiplication as the detection value sorting threshold. The sorting coefficient can be a value less than 1, for example, a fixed value such as 0.5 or 0.3.

[0073] In some embodiments, the server may compare the target road detection value with a detection value threshold. When the target road detection value is greater than the detection value threshold, the target pixel point is regarded as a road pixel point. When the target road detection value is less than the detection value threshold, the target pixel point is regarded as a non-road pixel point.

[0074] In some embodiments, the server may compare the target road detection value with the detection value threshold. When the target road detection value is greater than the detection value threshold, the target pixel point is used as the preliminary pixel point. The server may obtain the road pixel point based on the preliminary pixel point. For example, the server may use each preliminary pixel point as a road pixel point, or further screen each preliminary pixel point to obtain a road pixel point. For example, the server may arrange the preliminary pixel points based on the target road detection value from large to small to obtain a preliminary pixel point sequence. The larger the target road detection value, the higher the ranking of the preliminary pixel point in the preliminary pixel point sequence. The server may obtain each preliminary pixel point whose pixel point ranking is before the pixel point ranking threshold from the preliminary pixel point sequence, and use each preliminary pixel point whose pixel point ranking is before the pixel point ranking threshold as a road pixel point. Pixel point ranking refers to the ranking of the preliminary pixel points in the preliminary pixel point sequence. In this embodiment, the preliminary pixel points are firstly screened according to the target road detection value, and then the preliminary pixel points are sorted, which can speed up the sorting speed and improve the calculation efficiency.

[0075] In some embodiments, the server may arrange the target pixels according to their positions in the target image to obtain a transformed image corresponding to the target image, and the position of the same target pixel in the target image is consistent with that in the transformed image.

[0076] In some embodiments, arranging the pixel transformation values ​​corresponding to the target pixel points in the pixel arrangement order to obtain the transformation image corresponding to the target image includes: updating the pixel values ​​corresponding to the target pixel points in the target image to the pixel transformation values ​​corresponding to the target pixel points, and using the updated target image as the transformation image.

[0077] S208, determining transformation value change information of a target pixel point in the transformation image relative to a reference pixel point in the transformation image, and determining edge pixels corresponding to the road in the target image based on the transformation value change information.

[0078] Among them, the reference pixel point is a pixel point that has a positional association relationship with the target pixel point, and the positional association relationship may include at least one of being adjacent or having a pixel distance less than a first pixel distance threshold. The pixel distance refers to the distance between two pixels. The first pixel distance threshold may be preset or set as needed. The reference pixel point may, for example, be a pixel point adjacent to the target pixel point.

[0079] The transformation value change information is used to reflect the difference between the pixel transformation value of the target pixel and the pixel transformation value of the reference pixel. The larger the transformation value change information, the larger the difference between the pixel transformation value of the target pixel and the pixel transformation value of the reference pixel. The smaller the transformation value change information, the smaller the difference between the pixel transformation value of the target pixel and the pixel transformation value of the reference pixel. Edge pixels refer to pixels located at the edge of the road.

[0080] Specifically, the server can obtain the pixel transformation value corresponding to the target pixel point as the target pixel transformation value, obtain the pixel transformation value of the reference pixel point corresponding to the target pixel point as the reference pixel transformation value, calculate the difference between the target pixel transformation value and the reference pixel transformation value, use the calculated difference as the transformation value difference, and obtain the transformation value change information based on the transformation value difference.

[0081] In some embodiments, the reference pixel of the target pixel may include the adjacent pixel of the target pixel, and the adjacent pixel refers to the pixel adjacent to the target pixel in the pixel arrangement direction, and the pixel arrangement direction includes at least one of the horizontal pixel arrangement direction and the vertical pixel arrangement direction. The horizontal pixel arrangement direction is, for example, the horizontal direction, and the vertical pixel arrangement direction is, for example, the vertical direction. The adjacent pixel may include horizontal adjacent pixel and vertical adjacent pixel, and the horizontal adjacent pixel refers to the pixel adjacent to the target pixel in the horizontal adjacent pixel, and the vertical adjacent pixel refers to the pixel adjacent to the target pixel in the vertical adjacent pixel. The server may obtain a horizontal transformation value difference based on the difference between the pixel transformation value of the target pixel and the pixel transformation value of the horizontal adjacent pixel, obtain a vertical transformation value difference based on the difference between the pixel transformation value of the target pixel and the pixel transformation value of the vertical adjacent pixel, and determine the transformation value change information based on the horizontal transformation value difference and the vertical transformation value difference.

[0082] In some embodiments, the server may perform statistical operations based on the horizontal transformation value difference and the vertical transformation value difference to obtain the transformation value change degree, perform ratio operations based on the horizontal transformation value difference and the vertical transformation value difference to obtain the transformation value change direction angle, and use the transformation value change degree and the transformation value change direction angle as the transformation value change information. Among them, the transformation value change degree refers to the size of the pixel transformation value change, which is used to reflect the speed of the pixel transformation value change, and the transformation value change direction angle refers to the direction of the pixel transformation value change.

[0083] S210, obtaining a target road in the target image based on edge pixel recognition.

[0084] Specifically, the target road refers to a road in the target image. The server may fit each edge pixel and use the fitted straight line as the road edge line of the target road, where the road edge line refers to a straight line where the edge of the road is located.

[0085] In some embodiments, the server may obtain multiple edge pixels from each edge pixel to form an edge pixel set, where multiple refers to at least two. For example, the server may form all edge pixels into an edge pixel set, or obtain a specific number of edge pixels from each edge pixel to form an edge pixel set. The specific number may be preset or calculated based on the total number of edge pixels. The total number of edge pixels refers to the number of all edge pixels. For example, a quantity coefficient may be obtained, and the quantity coefficient and the total number of edge pixels may be multiplied, and the result of the operation may be used as the feature quantity. The quantity coefficient may be a pre-set positive number less than 1, such as 0.6. The server may determine the edge lines corresponding to each edge pixel in the edge pixel set. The edge line refers to a straight line passing through the edge pixel. The edge line may correspond to an edge line parameter. The edge line parameter may uniquely determine a straight line. Different edge line parameters correspond to different edge lines. Different edge lines may be obtained by adjusting the edge line parameters. The server may adjust the edge line parameters corresponding to each edge pixel in the edge pixel set, and obtain the road edge line corresponding to the target road based on the adjusted edge line.

[0086] In some embodiments, the edge line parameters include edge line distance and edge line angle. The edge line distance refers to the distance between the edge line and the reference position. The reference position can be a preset position or a position set as needed, such as the origin of the coordinates, that is, the intersection of the coordinate axes. The edge line angle refers to the angle between the edge line and the reference direction line. The reference direction line can be preset or set as needed, such as the horizontal axis (X axis) or the vertical axis (Y axis). The server can adjust the edge line parameters corresponding to each edge pixel in the edge pixel point set until the parameter adjustment stop condition is met, and determine the road edge line corresponding to the target road based on the edge line corresponding to the edge line parameters that meet the parameter adjustment stop condition. Among them, the parameter adjustment stop condition can include at least one of the difference between the distances of each edge line is less than the distance difference threshold or the difference between the angles of each edge line is less than the angle difference threshold. The distance difference threshold and the angle difference threshold can be preset.

[0087] In some embodiments, the server may use any one of the edge lines corresponding to the edge line parameters of the parameter adjustment stop condition as the road edge line corresponding to the target road. For example, the edge pixel set includes 10 edge pixels. By adjusting the edge line parameters of the edge lines corresponding to the 10 edge pixels, the adjusted edge lines corresponding to the 10 edge pixels are obtained. When the parameter adjustment stop condition is met, the adjusted edge line corresponding to any one of the 10 edge pixels may be used as the road edge line of the target road.

[0088] In some embodiments, the server may obtain parameters of each edge line that meets the parameter adjustment stop condition, perform statistical operations on each edge line parameter to obtain parameter statistical values, and use the straight line determined by the parameter statistical values ​​as the road edge line. For example, the server may perform statistical operations on the angles of each edge line that meets the parameter adjustment stop condition to obtain angle statistical values, perform statistical operations on the distances of each edge line that meets the parameter adjustment condition to obtain distance statistical values, and use the straight line determined by the angle statistical values ​​and the distance statistical values ​​as the road edge line of the target road. The statistical operation may be, for example, a mean operation. The parameter statistical values ​​include at least one of the angle statistical values ​​or the distance statistical values.

[0089] In some embodiments, the server can determine the road edge line of the target road based on the edge pixels, and based on the road edge line, the road center line and the direction of the road can be determined. The server can calculate the relative position relationship between the target road and the terminal, thereby obtaining the relative position relationship between the target road and the user.

[0090] In the above road recognition method, a target image to be road recognized is obtained, road detection is performed on the target image, a target road detection value corresponding to each target pixel in the target image is obtained, pixel transformation values ​​corresponding to each target pixel in the target image are determined based on the target road detection value, the pixel transformation values ​​corresponding to the target pixel are arranged in the pixel arrangement order, a transformed image corresponding to the target image is obtained, transformation value change information of the target pixel in the transformed image relative to the reference pixel in the transformed image is determined, edge pixels corresponding to the road in the target image are determined based on the transformation value change information, and the target road in the target image is obtained based on edge pixel identification. Since the image can be transformed based on the target road detection value so that the transformed image better reflects the road information in the image, the corresponding edge pixels in the target image can be accurately detected based on the transformation value change information of the target pixel relative to the reference pixel in the transformed image, thereby improving the accuracy of road recognition.

[0091] The road recognition method provided in the present application can realize real-time detection of blind paths and crosswalks based on a segmentation network, and utilize image processing and deep neural network technology to perform real-time segmentation and detection of blind paths and crosswalks in images in video streams, so as to accurately obtain the positions of the blind path areas and crosswalk areas in the images, and determine the relative positions of the blind paths and crosswalks and the blind.

[0092] The road recognition method provided by the present application can be deployed in a mobile phone or in a wearable device, for example, it can be deployed in guide glasses. When deployed in guide glasses, the guide glasses can use the road recognition method provided by the present application to identify the position of the road in the image of the collected road image, such as identifying the edge line and center line of the road in the image, and can point out the position and direction of the blind path and crosswalk to guide the blind, thereby improving the travel method of the blind, improving the safety of the blind's travel, and reducing the danger of the blind's travel.

[0093] In some embodiments, performing road detection on a target image to obtain a target road detection value corresponding to each target pixel in the target image includes: obtaining a target user type corresponding to the target image; obtaining a trained road detection model corresponding to the target user type, the trained road detection model being trained using a target training image corresponding to the target user type; inputting the target image into the trained road detection model to perform road detection, and obtaining a target road detection value corresponding to each target pixel in the target image.

[0094] The target user type refers to the type of user to which the terminal that captured the target image belongs, that is, the target image is a road image captured by a terminal carried by a user of the target user type. For example, when the target image is a road image captured by a terminal carried by a walking user with visual impairment, the target user is a walking user with visual impairment, and the target user refers to a user of the target user type. The target training image is a road image corresponding to the target user type, and is used to train a road detection model corresponding to the target user type. The target training image can be an image captured under different environmental factors, such as an image captured under different light or weather conditions.

[0095] The road image corresponding to the user type may be a road image captured by a terminal carried by a user of the user type, for example, it may be a road image captured by a guide glasses carried by a visually impaired user. The road image corresponding to the user type may also be a road image captured by a virtual user corresponding to the user type. A virtual user refers to a device that moves in the same way as a real user on the road. A virtual user may move on the road in the same way as a real user on the road. For example, the virtual user may be at least one of a robot that imitates the walking of a blind person or an aircraft that moves in the same way as a blind person. For example, the server may obtain the user's road behavior information and control the movement of the virtual user based on the road behavior information. The road behavior information refers to the movement information of the target user on the road and may include the speed of movement.

[0096] Specifically, the server may store trained road detection models corresponding to various user types. The trained road detection model corresponding to each user type may be a model trained using road images corresponding to the user type. For example, the trained road detection model corresponding to a visually impaired user may be a model trained using road images corresponding to the visually impaired user.

[0097] In some embodiments, the server may input the target image into a trained road detection model to perform road detection, obtain the target road detection value corresponding to each target pixel in the target image, and determine the pixel transformation value corresponding to the target pixel based on the target road detection value. The road detection model may be, for example, Figure 3 The segmentation algorithm model in (b) will Figure 3 The image in the real-time video stream including the blind road in (a) is input into the segmentation algorithm model, and the road detection value corresponding to each pixel point of the image in the video stream can be obtained. According to the road detection value, the pixel transformation value corresponding to each pixel point can be obtained, and the transformation image can be obtained based on the pixel transformation value. Figure 3 (c) in the figure is the transformed image. It can be seen from the figure that the pixel transformation values ​​of the pixels in the blind path area are the pixel values ​​corresponding to the white area, and the pixel transformation values ​​of the pixels outside the blind path area are the pixel values ​​corresponding to the black area.

[0098] In this embodiment, the target user type corresponding to the target image is obtained, the trained road detection model corresponding to the target user type is obtained, the target image is input into the trained road detection model for road detection, and the target road detection value corresponding to each target pixel in the target image is obtained. Since the trained road detection model is trained using the target training image corresponding to the target user type, the accuracy of the road detection model for detecting the target user type is improved, thereby improving the accuracy of road detection.

[0099] In some embodiments, the step of obtaining a trained road detection model includes: determining the target user type corresponding to the road detection model to be trained; obtaining multiple candidate training images corresponding to the target user type from the candidate training image set as target training images; obtaining the road position corresponding to the road in the target training image, and determining the pixel label value corresponding to each training pixel point in the target training image based on the road position; training the road detection model to be trained based on the target training image and the pixel label value to obtain a trained road detection model.

[0100] The candidate training image set may include multiple candidate training images, where multiple refers to at least two, and the candidate training images belong to road images. The candidate training image set may include candidate training images corresponding to multiple user types. The trained road detection model may be obtained through one or more trainings, that is, obtained through one or more parameter adjustments, and parameter adjustment refers to adjusting the model parameters of the road detection model. Model parameters refer to variable parameters within the model, and for a neural network model, they may also be called neural network weights.

[0101] The road detection model to be trained refers to the road detection model that needs to be trained, which can be an untrained road detection model or a road detection model that has undergone one or more rounds of training. The road detection model can be a deep neural network model, which can have a multi-layer neural network structure. The neural network structure can include multiple stacked convolutional layers and pooling layers, and the neural network structure can also be connected across layers. Feature extraction refers to extracting image information to obtain image features. For example, a convolution kernel can be used for feature extraction to obtain a feature map output by each neural network layer. The feature map refers to the features of the image obtained by processing the input image using model parameters, such as convolution processing. The road detection model can be a model based on a semantic segmentation algorithm.

[0102] Road position refers to the position of the road in the road image. Training pixel points refer to the pixel points in the target training image. Pixel label values ​​are used to determine the type of training pixel points. The type of training pixel points can be either road pixel points or non-road pixel points. Pixel label values ​​can be either road label values ​​or non-road label values. The road label value is used to indicate that the training pixel point is a road pixel point, and the non-road label value is used to indicate that the training pixel point is a non-road pixel point. The road label value is different from the non-road label value. The road label value and the non-road label value can be preset or determined as needed. For example, the road label value can be 1, and the non-road label value can be 0. Figure 4 As shown, Figure 4 (a1) in the figure is an image that only includes the crosswalk. Figure 4 (b1) in the figure is an image that only includes the blind path. Figure 4 (c1) in the figure is an image including the crosswalk and the blind path. Figure 4 (a2) in the figure shows the pixel label values ​​corresponding to each pixel in (a1). Figure 4 (b2) in the figure shows the pixel label values ​​corresponding to each pixel in (b1). Figure 4 (c2) in the figure shows the pixel label values ​​corresponding to each pixel in (c1).

[0103] Specifically, when it is determined that the road detection model to be trained is a model for performing road detection on a road image of a target user type, the server may obtain a candidate training image corresponding to the target user type from a candidate training image set, and use the candidate training image corresponding to the target user type as a target training image. The server may determine each training pixel point at a road position from the target training image, use the road label value as the pixel label value corresponding to the training pixel point at the road position, determine each training pixel point outside the road position, and use the non-road label value as the pixel label value corresponding to the training pixel point outside the road position.

[0104] In some embodiments, the server may input the target training image into the road detection model to be trained to perform road detection and obtain a road detection result. The road detection result may include training road detection values ​​corresponding to each training pixel point, and the training road detection value refers to the road detection value obtained by the road detection model performing road detection on the target training image. The server may determine the model loss value based on the training road detection value corresponding to each training pixel point and the pixel label value, and adjust the model parameters of the road detection model based on the model loss value to obtain a trained road detection model. Wherein, when the pixel label value of the training pixel point is a road label value, the model loss value is negatively correlated with the training road detection value, and when the pixel label value of the training pixel point is a non-road label value, the model loss value is positively correlated with the training road detection value.

[0105] Among them, positive correlation means: when other conditions remain unchanged, the two variables change in the same direction, and when one variable changes from large to small, the other variable also changes from large to small. It can be understood that the positive correlation here means that the direction of change is consistent, but it does not require that when one variable changes a little, the other variable must also change. For example, when variable a is 10 to 20, variable b can be set to 100, and when variable a is 20 to 30, variable b can be set to 120. In this way, the direction of change of a and b is that when a becomes larger, b also becomes larger. But when a is in the range of 10 to 20, b can be unchanged. Negative correlation means: when other conditions remain unchanged, the two variables change in opposite directions, and when one variable changes from large to small, the other variable changes from small to large. It can be understood that the negative correlation here means that the direction of change is opposite, but it does not require that when one variable changes a little, the other variable must also change.

[0106] In this embodiment, the target user type corresponding to the road detection model to be trained is determined, and multiple candidate training images corresponding to the target user type are obtained from the candidate training image set as the target training image. The road position corresponding to the road in the target training image is obtained, and the pixel label value corresponding to each training pixel point in the target training image is determined based on the road position. The road detection model to be trained is trained based on the target training image and the pixel label value to obtain a trained road detection model. It is realized that the road detection model is trained using the road image corresponding to the target user type, the detection ability of the road detection model for the road image of the target user type is improved, and the road detection accuracy is improved.

[0107] In some embodiments, the step of obtaining a target training image includes: obtaining road behavior information of a target user corresponding to a target user type; generating movement control information corresponding to a virtual user based on the road behavior information; controlling the virtual user to move along the road using the movement control information, and obtaining images collected by the virtual user during the movement as target training images.

[0108] Among them, the target user refers to a user of the target user type, and the road behavior information refers to the movement information of the target user on the road, which may include the speed of movement. The movement control information is the information for controlling the movement of the virtual user, and may control the virtual user to move along the road in the same way as the target user walks on the road, for example, to move along the road at the speed at which the target user walks on the road. The height of the image acquisition device installed on the virtual user from the ground may be consistent with the height of the image acquisition device carried by the target user from the ground, and the angle at which the image acquisition device installed on the virtual user captures images may be consistent with the angle at which the image acquisition device carried by the target user captures images, for example, the angles at which images are captured are all directly in front, and directly in front refers to directly in front of the virtual user or directly in front of the target user. Of course, the angle at which images are captured may also be other angles, which are not limited here.

[0109] Specifically, when the virtual user moves along the road, the server can control the virtual user to collect images of the road to obtain road images. The virtual user can send the collected road images to the server, and the server can use the road images sent by the virtual user as target training images.

[0110] In this embodiment, road behavior information of the target user corresponding to the target user type is obtained, and movement control information corresponding to the virtual user is generated based on the road behavior information. The movement of the virtual user along the road is controlled by using the movement control information, and images collected by the virtual user during the movement are obtained as target training images, so that the method of collecting target training images is consistent with the method of collecting images by the real user's device, thereby improving the accuracy of model training when using the target training images for model training.

[0111] In some embodiments, determining the pixel transformation value corresponding to each target pixel point in the target image based on the target road detection value includes: based on the target road detection value, obtaining the target pixel point that meets the road detection value screening condition from each target pixel point in the target image as the road pixel point; using the road pixel value corresponding to the road as the pixel transformation value corresponding to the road pixel point, and using the shielded pixel value as the pixel transformation value corresponding to the non-road pixel point in the target image.

[0112] The road detection value screening condition may include at least one of a target road detection value being greater than a detection value threshold or a road detection value ranking being before a detection value ranking threshold. A non-road pixel point refers to a target pixel point that does not meet the road detection value screening condition.

[0113] In this embodiment, based on the target road detection value, the target pixel points that meet the road detection value screening conditions are obtained from each target pixel point of the target image as the road pixel points, the road pixel value corresponding to the road is used as the pixel transformation value corresponding to the road pixel point, and the shielded pixel value is used as the pixel transformation value corresponding to the non-road pixel point in the target image, so that the road pixel points and the non-road pixel points are quickly and accurately divided through the road detection value.

[0114] In some embodiments, determining the transformation value change information of a target pixel point in a transformed image relative to a reference pixel point in the transformed image includes: obtaining a current pixel point from each pixel point of the transformed image; obtaining adjacent pixel points of the current pixel point from the transformed image, and determining a reference pixel point corresponding to the current pixel point based on the adjacent pixel points; obtaining a transformation value difference between the current pixel point and the reference pixel point corresponding to the current pixel point, and obtaining the transformation value change information of the current pixel point relative to the reference pixel point based on the transformation value difference.

[0115] The current pixel may be any pixel in the transformed image. The adjacent pixel of the current pixel refers to the pixel adjacent to the current pixel in each pixel arrangement direction. The pixel arrangement direction may include at least one of a horizontal arrangement direction and a vertical arrangement direction. There may be multiple adjacent pixels of the current pixel.

[0116] The adjacent pixels may include at least one of horizontally adjacent pixels or vertically adjacent pixels, wherein the horizontally adjacent pixels refer to pixels adjacent to the current pixel in the horizontal arrangement direction, and the vertically adjacent pixels refer to pixels adjacent to the current pixel in the vertical arrangement direction. The horizontally adjacent pixels may include at least one of the forward horizontally adjacent pixels or the backward horizontally adjacent pixels, and the vertically adjacent pixels may include at least one of the forward vertically adjacent pixels or the backward vertically adjacent pixels, wherein the forward horizontally adjacent pixels refer to horizontally adjacent pixels adjacent to the current pixel and arranged before the current pixel, and the backward horizontally adjacent pixels refer to horizontally adjacent pixels adjacent to the current pixel and arranged after the current pixel. The forward vertically adjacent pixels refer to vertically adjacent pixels adjacent to the current pixel and arranged before the current pixel, and the backward vertically adjacent pixels refer to vertically adjacent pixels adjacent to the current pixel and arranged after the current pixel.

[0117] The reference pixel point may include at least one of the adjacent pixel points of the current pixel point, for example, the reference pixel point may include at least one of the backward horizontal adjacent pixel point or the backward vertical adjacent pixel point.

[0118] Specifically, the server may determine the transformation value change information based on the difference between the pixel transformation value of the current pixel and the pixel transformation value of the reference pixel. For example, the server may use the pixel transformation value of the current pixel as the current pixel transformation value, use the pixel transformation value of the reference pixel as the reference pixel transformation value, respectively calculate the difference between the current pixel transformation value and each reference pixel transformation value, obtain each transformation value difference, and obtain the transformation value change information based on each transformation value difference.

[0119] In some embodiments, the server may perform statistical operations on each transformation value difference to obtain the transformation value variation degree, may perform ratio operations on each transformation value difference to obtain the transformation value variation degree, and use the transformation value variation degree and the transformation value variation degree as transformation value variation information.

[0120] In this embodiment, the current pixel point is obtained from each pixel point of the transformed image, and the adjacent pixel points of the current pixel point are obtained from the transformed image as the reference pixel point corresponding to the current pixel point. The transformation value difference between the current pixel point and the reference pixel point corresponding to the current pixel point is obtained, and the transformation value change information of the current pixel point relative to the reference pixel point is obtained based on the transformation value difference, thereby improving the accuracy of the transformation value change information.

[0121] In some embodiments, the reference pixel points of the current pixel point include adjacent pixel points in multiple pixel arrangement directions, and the transformation value change information includes the degree of transformation value change and the direction angle of transformation value change; obtaining the transformation value difference between the current pixel point and the reference pixel point corresponding to the current pixel point, and obtaining the transformation value change information of the current pixel point relative to the reference pixel point based on the transformation value difference includes: obtaining the transformation value difference corresponding to the current pixel point in each pixel arrangement direction based on the pixel transformation value of the current pixel point and the pixel transformation value of the reference pixel point of the current pixel point in each pixel arrangement direction; determining the degree of transformation value change and the direction angle of transformation value change of the current pixel point relative to the reference pixel point in combination with the transformation value differences corresponding to each pixel arrangement direction.

[0122] The reference pixel of the current pixel includes adjacent pixels in each pixel arrangement direction. For example, the reference pixel of the current pixel may include at least one of a rearward horizontal adjacent pixel or a rearward vertical adjacent pixel. The rearward horizontal adjacent pixel refers to a pixel arranged after the current pixel in the horizontal arrangement direction, and the rearward vertical adjacent pixel refers to a pixel arranged after the current pixel in the vertical arrangement direction.

[0123] Specifically, the server may calculate the difference between the pixel transformation value of the current pixel and the pixel transformation value of the backward horizontally adjacent pixel, and obtain a horizontal difference value based on the difference. For example, the horizontal difference value corresponding to the current pixel may be obtained based on the result obtained by subtracting the pixel transformation value of the current pixel from the pixel transformation value of the backward horizontally adjacent pixel. For example, the result obtained by subtracting the pixel transformation value of the current pixel from the pixel transformation value of the backward horizontally adjacent pixel may be used as the horizontal difference value corresponding to the current pixel. The server may calculate the difference between the pixel transformation value of the current pixel and the pixel transformation value of the backward vertically adjacent pixel, and obtain a vertical difference value corresponding to the current pixel based on the difference. For example, the vertical difference value may be obtained based on the result obtained by subtracting the pixel transformation value of the current pixel from the pixel transformation value of the backward vertically adjacent pixel. For example, the result obtained by subtracting the pixel transformation value of the current pixel from the pixel transformation value of the backward vertically adjacent pixel may be used as the vertical difference value corresponding to the current pixel. The server may use the horizontal difference value and the vertical difference value as the transformation value difference.

[0124] In some embodiments, the server may use the pixel transformation value corresponding to the current pixel as the current pixel transformation value, the pixel transformation value of the backward horizontally adjacent pixel corresponding to the current pixel as the backward horizontal transformation value, the pixel transformation value of the backward vertically adjacent pixel corresponding to the current pixel as the first backward vertical transformation value, and the pixel transformation value of the backward vertically adjacent pixel corresponding to the backward horizontally adjacent pixel of the current pixel as the second backward vertical transformation value. The server may calculate the difference between the current pixel transformation value and the backward horizontal transformation value, and use the difference as the first difference value, for example, the result of subtracting the current pixel transformation value from the backward horizontal transformation value may be used as the first difference value, calculate the difference between the first backward vertical transformation value and the second backward vertical transformation value, and use the difference as the second difference value, for example, the result of subtracting the first backward vertical transformation value from the second backward vertical transformation value may be used as the second difference value, perform statistical operations on the first difference value and the second difference value, for example, perform mean operations, and use the result of the operations as the horizontal difference value corresponding to the current pixel.

[0125] In some embodiments, the server may calculate the difference between the current pixel transformation value and the first backward longitudinal transformation value, and use the difference as the third difference value. For example, the result of subtracting the current pixel transformation value from the first backward longitudinal transformation value may be used as the third difference value. The server may calculate the difference between the backward horizontal transformation value and the second backward longitudinal transformation value, and use the difference as the fourth difference value. For example, the result of subtracting the backward horizontal transformation value from the second backward longitudinal transformation value may be used as the fourth difference value. The server may perform statistical operations on the third difference value and the fourth difference value, such as performing mean operations, and use the result of the operations as the longitudinal difference value corresponding to the current pixel point.

[0126] In some embodiments, the server can determine the degree of change of the transformation value and the direction angle of the transformation value change based on the lateral difference value and the longitudinal difference value. For example, the server can perform statistical operations based on the lateral difference value and the longitudinal difference value to obtain the degree of change of the transformation value, and perform ratio operations based on the lateral difference value and the longitudinal difference value to obtain the direction angle of the transformation value change.

[0127] In this embodiment, based on the pixel transformation value of the current pixel and the pixel transformation value of the reference pixel determined for the current pixel in each pixel arrangement direction, the transformation value difference corresponding to the current pixel in each pixel arrangement direction is obtained, and the transformation value change degree and transformation value change direction angle of the current pixel relative to the reference pixel are determined in combination with the transformation value difference corresponding to each pixel arrangement direction, thereby improving the accuracy of the transformation value change information.

[0128] In some embodiments, determining the degree of change of the transformation value and the direction angle of the transformation value change of the current pixel relative to the reference pixel in combination with the transformation value differences corresponding to each pixel arrangement direction includes: performing statistical operations on the transformation value differences corresponding to the current pixel in each pixel arrangement direction to obtain the degree of change of the transformation value; using the transformation value differences corresponding to the current pixel in each pixel arrangement direction as the side length of the directional edge in the corresponding pixel arrangement direction, determining the angle of the connecting edge connecting the directional edge based on the side length, and using the angle as the direction angle of the transformation value change.

[0129] The directional edge is a line segment with a difference in transformation value as its length, and the directional edge may include at least one of a horizontal directional edge or a vertical directional edge. The horizontal directional edge is a line segment with a horizontal difference value as its length in the horizontal pixel arrangement direction, and the vertical directional edge is a line segment with a vertical difference value as its length in the vertical pixel arrangement direction. The horizontal directional edge, the vertical directional edge, and the connecting edge may form a right triangle, and the connecting edge is the hypotenuse in the formed right triangle. The angle of the connecting edge refers to the angle between the connecting edge and the horizontal pixel arrangement direction.

[0130] Specifically, the transformation value difference may include a horizontal difference value and a vertical difference value. The server may perform a square operation on the horizontal difference value to obtain a horizontal square value, perform a square operation on the vertical difference value to obtain a vertical square value, perform a statistical operation on the horizontal square value and the vertical square value to obtain a transformation value variation degree, for example, the horizontal square value and the vertical square value may be added together, and the result of the operation may be used as the transformation value variation degree, or the horizontal square value and the vertical square value may be added together, a square root operation may be performed on the result of the addition operation, and the result of the square root operation may be used as the transformation value variation degree.

[0131] In some embodiments, the server can calculate the ratio of the horizontal difference value to the vertical difference value to obtain the difference ratio, and determine the direction angle of change of the transformation value based on the difference ratio. For example, the server can perform an inverse tangent operation on the difference ratio and use the result of the operation as the direction angle of change of the transformation value.

[0132] In this embodiment, statistical calculations are performed on the transformation value differences corresponding to the current pixel point in each pixel arrangement direction to obtain the degree of transformation value change. The transformation value differences corresponding to the current pixel point in each pixel arrangement direction are used as the side length of the directional edge in the corresponding pixel arrangement direction. The angle of the connecting edge of the connecting directional edge is determined based on the side length. The angle is used as the transformation value change directional angle, thereby improving the accuracy of the transformation value change directional angle.

[0133] In some embodiments, the transformation value change information includes the transformation value change degree and the transformation value change direction angle. Determining the edge pixels corresponding to the road in the target image based on the transformation value change information includes: obtaining pixel points that meet the change degree screening conditions from each pixel point of the transformation image as candidate pixel points; obtaining the contrast transformation value change degree of the candidate pixel points at the transformation value change direction angle; determining the difference in the transformation value change degree of the candidate pixel point relative to the contrast transformation value change degree; when the change degree difference is greater than the change degree difference threshold, using the candidate pixel point as the edge pixel corresponding to the road in the target image.

[0134] Among them, the degree of change screening condition may include a transformation value change degree greater than the transformation value change degree of each associated pixel point, and the associated pixel point may be each pixel point in the transformed image whose distance from the target pixel point is less than the second pixel distance threshold. Candidate pixel points refer to each pixel point in the transformed image that meets the degree of change screening condition. The contrast transformation value change degree refers to the transformation value change degree corresponding to the contrast pixel point, and the contrast pixel point may include at least one of the pixel points whose distance from the candidate pixel point in the transformation value change direction angle is less than the third pixel distance threshold. The second pixel distance threshold and the third pixel distance threshold may be preset or set as needed.

[0135] The degree of change difference refers to the difference between the degree of change of the transformation value of the candidate pixel and the degree of change of the contrast transformation value. For example, the result obtained by subtracting the degree of change of the contrast transformation value from the degree of change of the transformation value of the candidate pixel can be used as the degree of change difference. The degree of change difference threshold can be preset, for example, it can be 0, or it can be set as needed.

[0136] Specifically, the server can obtain the current target pixel point from the target pixel points of the transformed image, and the current target pixel point can be any one of the target pixel points. The server can obtain the target pixel points whose distance from the current target pixel point is less than the pixel distance threshold from the target pixel points of the transformed image (excluding the current target pixel point), as the associated pixel points corresponding to the current target pixel point, obtain the transformation value change degree of each associated pixel point, and compare the transformation value change degree of the current target pixel point with the transformation value change degree of each associated pixel point. When it is determined that the transformation value change degree of the current target pixel point is greater than the transformation value change degree of each associated pixel point, it is determined that the current target pixel point meets the change degree screening condition, and the current target pixel point is used as a candidate pixel point.

[0137] In some embodiments, the server may use the result obtained by subtracting the comparison transformation value change from the transformation value change of the candidate pixel point as the variation difference, and compare the variation difference with the variation difference threshold. When the variation difference is greater than the variation difference threshold, the candidate pixel point is used as the edge pixel corresponding to the road in the target image.

[0138] In some embodiments, when the degree of change difference is less than the degree of change difference threshold, the server may update the pixel transformation value of the candidate pixel point in the transformation image from the road pixel value to the non-edge pixel value, and the non-edge pixel value is used to indicate that the pixel point is not an edge pixel. The non-edge pixel value can be set as needed, and the non-edge pixel value is different from the road pixel value, for example, the non-edge pixel value can be the same as the shielding pixel value, for example, the non-edge pixel value can be 0.

[0139] In this embodiment, pixel points that meet the degree of change screening condition are obtained from each target pixel point of the transformed image as candidate pixel points, the degree of change of the contrast transformation value of the candidate pixel point in the direction angle of the transformation value change is obtained, and the degree of change difference of the transformation value change degree of the candidate pixel point relative to the contrast transformation value change degree is determined. When the degree of change difference is greater than the degree of change difference threshold, the candidate pixel point is used as the edge pixel corresponding to the road in the target image, thereby improving the accuracy of the edge pixel.

[0140] In some embodiments, there are multiple edge pixels, and obtaining a target road in a target image based on edge pixel identification includes: determining a current edge line corresponding to the edge pixel, determining a current edge line distance between the current edge line and a reference position, and determining a current edge line angle between the current edge line and a preset reference direction line; using the current edge line distance and the current edge line angle as current edge line parameters to be adjusted, adjusting the current edge line parameters of each current edge line until a parameter adjustment stop condition is met, and using the edge direction line corresponding to the current edge line parameters that meet the parameter adjustment condition as a road edge line corresponding to the road in the target image, wherein the parameter adjustment stop condition includes at least one of a difference between edge line distances being less than a distance difference threshold or a difference between each edge line angle being less than an angle difference threshold; determining the target road in the target image based on the road edge line.

[0141] Among them, the edge line refers to the straight line passing through the edge pixel. The current edge line refers to the straight line passing through the edge pixel at the current moment. The current edge line distance refers to the distance between the current edge line and the reference position. The current edge line angle refers to the angle between the current edge line and the reference direction line. The current edge image parameters include the current edge line distance and the current edge line angle.

[0142] The reference position can be a preset position or a position set as needed, for example, it can be the origin of the coordinate system, that is, the intersection of the coordinate axes. The reference direction line can be preset or set as needed, for example, it can be any one of the horizontal axis (X axis) or the vertical axis (Y axis).

[0143] Specifically, the server can calculate the difference between each current edge line distance and other current edge line distances to obtain the differences in each edge line distance. For example, when the edge pixel is 3, there are 3 current edge lines, namely, the current edge line a, the current edge line b and the current edge line c. The current edge line distance of the current edge line a is d1, the current edge line distance of the current edge line b is d2, and the current edge line distance of the current edge line c is d3. Then, the difference between the current edge line distance d1 and the current edge line distance d2 can be calculated to obtain the first edge line distance difference, the difference between the current edge line distance d1 and the current edge line distance d3 can be calculated to obtain the second edge line distance difference, and the difference between the current edge line distance d2 and the current edge line distance d3 can be calculated to obtain the third edge line distance difference. The server can perform statistical operations on the edge line distance differences, such as addition operations or mean operations, and use the results of the operations as distance difference statistics. The distance difference statistics are compared with the distance difference threshold. When the distance difference statistics are less than the distance difference threshold, it is determined that the parameter adjustment stop condition is met.

[0144] In some embodiments, the server can calculate the difference between each current edge line angle and other current edge line angles to obtain the differences in the edge line angles. For example, the current edge line angle of the current edge line a is θ1, the current edge line angle of the current edge line b is θ2, and the current edge line angle of the current edge line c is θ3. Then the difference between the current edge line angle θ1 and the current edge line angle θ2 can be calculated to obtain the first edge line angle difference, the difference between the current edge line angle θ1 and the current edge line angle θ3 can be calculated to obtain the second edge line angle difference, and the difference between the current edge line angle θ2 and the current edge line angle θ3 can be calculated to obtain the third edge line angle difference. The server can perform statistical operations on the differences in the edge line angles, such as addition operations or mean operations, and use the results of the operations as angle difference statistics, compare the angle difference statistics with the angle difference threshold, and when the angle difference statistics is less than the angle difference threshold, it is determined that the parameter adjustment stop condition is met.

[0145] In some embodiments, when the angle difference statistic is less than the angle difference threshold and the distance difference statistic is less than the distance difference threshold, it is determined that the parameter adjustment stop condition is met.

[0146] In some embodiments, the parameter adjustment stop condition may also include that the target parameter number is greater than the parameter number threshold, and the target parameter number is the maximum number of the same current edge line parameters in each current edge line parameter. Specifically, the server may use the current edge line distance and the current edge line angle as the current edge line parameters to be adjusted, adjust the current edge image parameters of each current edge line, that is, adjust each current edge line distance and each current edge line angle, classify each current edge line parameter, classify the same current edge line parameter into one category, obtain each current edge line parameter set, the current edge line parameters in the current edge line parameter set are the same edge line parameters, count the number of each current edge line parameter set, obtain the number of parameters corresponding to each current edge line parameter set, obtain the maximum number of parameters from each parameter number, as the target parameter number, compare the target parameter number with the edge parameter number threshold, and when it is determined that the target parameter number is greater than the parameter number threshold, it is determined that the parameter adjustment stop condition is met, and the server may use the edge line corresponding to the current edge line parameter in the current edge line parameter set corresponding to the target parameter number as the road edge line corresponding to the road in the target image. The parameter quantity threshold may be preset or calculated according to the number of edge pixels. For example, a quantity coefficient may be obtained, and the number of edge pixels and the quantity coefficient may be multiplied, and the result of the operation may be used as the parameter quantity threshold. The quantity coefficient may be a preset positive number less than 1, such as 0.8. The same current edge line parameter may include at least one of the same current edge line distance or the same current edge line angle.

[0147] In some embodiments, the server can also use an algorithm to fine-tune the edge of the road. The road edge line can include a left road edge line and a right road edge line. The center line direction of the blind path can be calculated based on the left road edge line and the right road edge line. The server can send the position of the road edge line and the direction of the center line to the terminal through the protocol. The terminal can display the road edge line and the center line in real time. The terminal can also make voice broadcasts based on the center line direction to guide the blind person to move forward.

[0148] In this embodiment, the current edge line corresponding to the edge pixel is determined, the current edge line distance from the reference position is determined, the current edge line angle between the current edge line and the preset reference direction line is determined, the current edge line distance and the current edge line angle are used as current edge line parameters to be adjusted, and the current edge line parameters of each current edge line are adjusted until the parameter adjustment stop condition is met, and the edge line corresponding to the current edge line parameters that meet the parameter adjustment condition is used as the road edge line corresponding to the road in the target image. Since the parameter adjustment stop condition includes at least one of the difference between the distances of each edge line being less than the distance difference threshold or the difference between the angles of each edge line being less than the angle difference threshold, the edge line that passes through as many edge pixels as possible at the same time can be obtained, and the target road in the target image is determined based on the road edge line, thereby improving the accuracy of road detection.

[0149] In some embodiments, obtaining a target image to be road identified includes: obtaining a target image uploaded by a terminal, and using the target image as the target image to be road identified; performing road detection on the target image, and obtaining a target road detection value corresponding to each target pixel in the target image includes: obtaining a target user type corresponding to the terminal, and obtaining a trained road detection model corresponding to the target user type, wherein the trained road detection model is trained using a target training image corresponding to the target user type; inputting the target image into the trained road detection model for road detection, and obtaining a target road detection value corresponding to each target pixel in the target image; the method also includes: determining user movement prompt information based on the position corresponding to the target road and the position of the terminal; and sending user movement prompt information to the terminal, so that the terminal performs movement prompts according to the user movement prompt information.

[0150] Among them, the target user type corresponding to the terminal refers to the type of user carrying the terminal. The position corresponding to the target road can be the position of the target road relative to the terminal, or it can be the position of the target road in the image. The position of the terminal refers to the location of the terminal, which can be obtained in real time through the positioning system. The position of the terminal can be represented by latitude and longitude, for example, or by other methods, which are not limited here. The user movement prompt information is used to assist user movement, and can include at least one of the distance of the target road relative to the user or the direction of the target road relative to the user. For example, the user movement prompt information can be "go straight 50 meters ahead to enter the crosswalk" or "the crosswalk is 50 meters ahead."

[0151] Specifically, the server can receive the target image sent by the terminal. The server can determine the target user type based on the terminal. For example, when the terminal is a pair of guide glasses, it can be determined that the terminal corresponds to a blind person. Of course, the server can also store the user types corresponding to each user. When sending the target image to the server, the terminal can also send a user ID to the server. The server can determine the user type based on the user ID, and the user ID is used to uniquely identify the user. The server can store trained road detection models corresponding to each user type. The server can obtain the model corresponding to the target user type from each trained road detection model, and use the obtained trained road detection model to perform road detection on the target image to obtain the target road detection value corresponding to each target pixel in the target image. The server can determine the pixel transformation value corresponding to the target pixel based on the target road detection value, determine the edge pixels of the target road in the target image based on the pixel transformation value, obtain the road edge line of the target road based on the edge pixels, and can also determine the road center line and the direction of the road based on the road edge line. Figure 5 As shown, Figure 5 The image in the video stream in (a) is input into the trained model in (b) to obtain the road detection value corresponding to the pixel point, and the transformed image shown in (c) is obtained based on the road detection value. The road edge line and road center line in (d) are obtained based on the transformed image. The direction of the arrow in (d) indicates the direction of the road.

[0152] In some embodiments, the server can obtain the location of the terminal in real time. For example, the terminal can be located through a positioning system and send the positioning information to the server. The server can determine the relative position between the target road and the terminal based on the position of the target road in the target image, generate user movement prompt information based on the relative position between the target road and the terminal, and send the user movement prompt information to the terminal. The terminal can display the user movement prompt information, play the user movement prompt information through voice, or convert the user movement prompt information into vibration information. The terminal can vibrate according to the vibration information to assist the user in moving. For example, when the user is blind, by converting the user movement prompt information into vibration information, the user can be more effectively assisted in moving.

[0153] In this embodiment, a target image uploaded by a terminal is obtained, the target image is used as a target image to be subjected to road recognition, the target user type corresponding to the terminal is obtained, a trained road detection model corresponding to the target user type is obtained, the target image is input into the trained road detection model for road detection, a target road detection value corresponding to each target pixel point in the target image is obtained, user movement prompt information is determined based on the position corresponding to the target road and the position of the terminal, and the user movement prompt information is sent to the terminal, so that the terminal performs movement prompts according to the user movement prompt information, thereby assisting the user in moving and improving the safety of moving on the road.

[0154] In some embodiments, Figure 6 As shown, a road recognition method is provided, comprising the following steps:

[0155] S602: Determine a road detection model to be trained corresponding to a visually impaired user.

[0156] The road detection model may be a model based on a semantic segmentation algorithm. By training the road detection model, a model capable of segmenting the blind path and the pedestrian crossing from the background image may be obtained.

[0157] S604: Acquire candidate training images collected by devices carried by multiple visually impaired users from the candidate training image set as target training images.

[0158] Among them, the target training image may include any one of the blind path or the crosswalk. The target training image may be an image captured under different environmental factors, for example, it may be an image captured under different light or weather. The target training image may be an image captured by simulating the perspective of a blind person. For example, a mobile phone may be hung on the chest or glasses with a camera may be worn like a blind person to capture a video in a real scene, and a video frame may be obtained from the video as a target training image. For example, an image may be obtained from the video at 1 frame per second. Therefore, by using the target training image for training, the influence of the model on light, weather, shooting angle and blind path type can be reduced, and the position of the blind path and the crosswalk relative to the user can be detected more accurately and efficiently. Improve the safety of blind people's travel.

[0159] In some embodiments, the target training image may include positive samples and negative samples, where the positive sample refers to an image including at least one of a blind path or a crosswalk, and the negative sample refers to an image not including the blind path or the crosswalk.

[0160] S606: Obtain the road positions of the blind paths and the pedestrian crossings in the target training image, and determine the pixel label values ​​corresponding to the training pixels in the target training image based on the road positions.

[0161] The target training image can be outdoor data collected from the walking angle of the model blind person. The pixel label value of the pixel point at the road position is the road label value, and the pixel label value of the pixel point at the position other than the road position is the non-road label value. The road position refers to the position of the blind path or crosswalk in the image. The road position can be automatically obtained or manually marked by the user.

[0162] S608 , training the road detection model to be trained based on the target training image and the pixel label values ​​to obtain a trained road detection model.

[0163] The trained road detection model may be a semantic segmentation model that can detect blind paths and pedestrian crossings from an image. After the trained road detection model is obtained, the trained road detection model may be deployed to a mobile phone or to a wearable device such as glasses.

[0164] S610: Acquire a road image sent by a terminal of a target user with visual impairment, and use the road image as a target image to be subjected to road recognition.

[0165] S612: Obtain a trained road detection model corresponding to the visually impaired user, input the target image into the trained road detection model to perform road detection, and obtain a target road detection value corresponding to each target pixel in the target image.

[0166] Among them, the road segmentation model can determine the location of the blind path and the location of the crosswalk from the image.

[0167] S614. Based on the target road detection value, the target pixel points that meet the road detection value screening condition are obtained from each target pixel point of the target image as the road pixel points, the road pixel values ​​corresponding to the roads are used as the pixel transformation values ​​corresponding to the road pixel points, and the shielded pixel values ​​are used as the pixel transformation values ​​corresponding to the non-road pixel points in the target image.

[0168] S616: Arrange the pixel transformation values ​​corresponding to the target pixel points according to the pixel arrangement order to obtain a transformation image corresponding to the target image.

[0169] S618: Obtain a current pixel from each pixel of the transformed image, obtain adjacent pixels of the current pixel from the transformed image, and determine a reference pixel corresponding to the current pixel based on the adjacent pixels.

[0170] S620: Obtain transformation value differences corresponding to the current pixel in each pixel arrangement direction based on the pixel transformation value of the current pixel and the pixel transformation values ​​of the reference pixel in each pixel arrangement direction of the current pixel.

[0171] S622: Perform statistical calculations on the transformation value differences corresponding to the current pixel point in each pixel arrangement direction to obtain a degree of change in the transformation value.

[0172] S624, taking the difference in transformation values ​​corresponding to the current pixel point in each pixel arrangement direction as the side length of the direction side in the corresponding pixel arrangement direction, determining the angle of the connecting side of the connecting direction side based on the side length, and taking the angle as the transformation value change direction angle.

[0173] S626. Pixel points that meet the degree of change screening condition are obtained from each pixel point of the transformed image as candidate pixel points, and the degree of change of the contrast transformation value of the candidate pixel point in the direction angle of the transformation value change is obtained, and the degree of change difference of the transformation value change degree of the candidate pixel point relative to the contrast transformation value change degree is determined. When the degree of change difference is greater than the degree of change difference threshold, the candidate pixel point is used as the edge pixel corresponding to the road in the target image.

[0174] S628: Determine the current edge line corresponding to the edge pixel, determine the distance between the current edge line and the current edge line at the reference position, and determine the current edge line angle between the current edge line and a preset reference direction line.

[0175] S630: Taking the current edge line distance and the current edge line angle as the current edge line parameters to be adjusted, and adjusting the current edge line parameters of each current edge line.

[0176] S632, determine whether the parameter adjustment stop condition is met, if not, return to step S630, if so, execute step S634.

[0177] The parameter adjustment stopping condition includes at least one of the following: the difference between the distances of the edge lines is less than a distance difference threshold or the difference between the angles of the edge lines is less than an angle difference threshold.

[0178] S634: Use the edge line corresponding to the current edge line parameters that meet the parameter adjustment conditions as the road edge line corresponding to the road in the target image.

[0179] S636: Determine the target road in the target image based on the road edge line.

[0180] The server can determine the road centerline and road direction based on the road edge line. Fig. 7A , showing the process of obtaining the road centerline, road edge line and road direction of the crosswalk, such as Figure 7B As shown, the process of obtaining the road center line, road edge line and road direction of the blind road is demonstrated.

[0181] In this embodiment, the server can use edge detection algorithms, statistical methods, etc. to calculate the directions of the blind path and the crosswalk, so as to guide the blind person to move forward.

[0182] It should be understood that although Figure 2 The steps in the flowchart of -7 are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 -At least part of the steps in 7 may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0183] In some embodiments, Figure 8 As shown, a road recognition device is provided. The device can adopt a software module or a hardware module, or a combination of the two to become a part of a computer device. The device specifically includes: a target image acquisition module 802, a road detection value acquisition module 804, a transformation image acquisition module 806, an edge pixel determination module 808 and a target road acquisition module 810, wherein:

[0184] The target image acquisition module 802 is used to acquire a target image for road recognition.

[0185] The road detection value obtaining module 804 is used to perform road detection on the target image and obtain the target road detection value corresponding to each target pixel point in the target image.

[0186] The transformed image obtaining module 806 is used to determine the pixel transformation value corresponding to each target pixel point in the target image based on the target road detection value, and arrange the pixel transformation values ​​corresponding to the target pixel points according to the pixel arrangement order to obtain the transformed image corresponding to the target image.

[0187] The edge pixel determination module 808 is used to determine the transformation value change information of the target pixel point in the transformation image relative to the reference pixel point in the transformation image, and determine the edge pixel corresponding to the road in the target image based on the transformation value change information.

[0188] The target road obtaining module 810 is used to obtain the target road in the target image based on edge pixel recognition.

[0189] In some embodiments, the road detection value obtaining module 804 includes:

[0190] The target user type acquisition unit is used to acquire the target user type corresponding to the target image.

[0191] The first road detection model acquisition unit is used to acquire a trained road detection model corresponding to the target user type, where the trained road detection model is obtained by training using a target training image corresponding to the target user type.

[0192] The first road detection value obtaining unit is used to input the target image into the trained road detection model to perform road detection, and obtain the target road detection value corresponding to each target pixel point in the target image.

[0193] In some embodiments, the road detection model obtaining module for obtaining the trained road detection model includes:

[0194] The target user type determination unit is used to determine the target user type corresponding to the road detection model to be trained.

[0195] The first target training image obtaining unit is used to obtain candidate training images corresponding to multiple target user types from the candidate training image set as target training images.

[0196] The pixel label value obtaining unit is used to obtain the road position corresponding to the road in the target training image, and determine the pixel label value corresponding to each training pixel point in the target training image based on the road position.

[0197] The road detection model obtaining unit is used to train the road detection model to be trained based on the target training image and the pixel label value to obtain a trained road detection model.

[0198] In some embodiments, the target training image obtaining module for obtaining the target training image includes:

[0199] The road behavior information acquisition unit is used to acquire the road behavior information of the target user corresponding to the target user type.

[0200] The mobile control information generating unit is used to generate the mobile control information corresponding to the virtual user based on the road behavior information.

[0201] The second target training image obtaining unit is used to control the virtual user to move along the road using the movement control information, and obtain images collected by the virtual user during the movement as target training images.

[0202] In some embodiments, the transformed image obtaining module 806 includes:

[0203] The road pixel point obtaining unit is used to obtain target pixel points that meet the road detection value screening condition from each target pixel point of the target image based on the target road detection value as road pixel points.

[0204] The pixel transformation value obtaining unit is used to use the road pixel value corresponding to the road as the pixel transformation value corresponding to the road pixel point, and to use the shielding pixel value as the pixel transformation value corresponding to the non-road pixel point in the target image.

[0205] In some embodiments, the edge pixel determination module 808 includes:

[0206] The current pixel point acquisition unit is used to acquire the current pixel point from each pixel point of the transformed image.

[0207] The reference pixel point obtaining unit is used to obtain the adjacent pixel points of the current pixel point from the transformed image, and determine the reference pixel point corresponding to the current pixel point based on the adjacent pixel points.

[0208] The transformation value change information obtaining unit is used to obtain the transformation value difference between the current pixel and the reference pixel corresponding to the current pixel, and obtain the transformation value change information of the current pixel relative to the reference pixel based on the transformation value difference.

[0209] In some embodiments, the reference pixel point of the current pixel point includes adjacent pixel points in multiple pixel arrangement directions, and the transformation value change information includes the transformation value change degree and the transformation value change direction angle; the transformation value change information obtaining unit is also used to obtain the transformation value difference corresponding to the current pixel point in each pixel arrangement direction based on the pixel transformation value of the current pixel point and the pixel transformation value of the reference pixel point of the current pixel point in each pixel arrangement direction; and determine the transformation value change degree and the transformation value change direction angle of the current pixel point relative to the reference pixel point in combination with the transformation value differences corresponding to each pixel arrangement direction.

[0210] In some embodiments, the transformation value change information obtaining unit is also used to perform statistical operations on the transformation value differences corresponding to the current pixel point in each pixel arrangement direction to obtain the degree of transformation value change; the transformation value differences corresponding to the current pixel point in each pixel arrangement direction are used as the side length of the direction edge in the corresponding pixel arrangement direction, and the angle of the connecting side of the connecting direction edge is determined based on the side length, and the angle is used as the transformation value change direction angle.

[0211] In some embodiments, the transformation value change information includes the transformation value change degree and the transformation value change direction angle, and the edge pixel determination module 808 includes:

[0212] The candidate pixel point obtaining unit is used to obtain pixel points that meet the change degree screening condition from each pixel point of the transformed image as candidate pixel points.

[0213] The contrast transformation value variation obtaining unit is used to obtain the contrast transformation value variation of the candidate pixel point in the transformation value variation direction angle.

[0214] The change degree difference obtaining unit is used to determine the change degree difference of the transformation value change degree of the candidate pixel point relative to the comparison transformation value change degree.

[0215] The edge pixel obtaining unit is used to take the candidate pixel point as the edge pixel corresponding to the road in the target image when the change difference is greater than the change difference threshold.

[0216] In some embodiments, there are multiple edge pixels, and the target road obtaining module 810 includes:

[0217] The current edge line determination unit is used to determine the current edge line corresponding to the edge pixel, determine the current edge line distance between the current edge line and the reference position, and determine the current edge line angle between the current edge direction line and the preset reference direction line.

[0218] A road edge line obtaining unit is used to use the current edge line distance and the current edge line angle as the current edge line parameters to be adjusted, adjust the current edge line parameters of each current edge line until the parameter adjustment stopping condition is met, and use the edge direction line corresponding to the current edge line parameters that meet the parameter adjustment condition as the road edge line corresponding to the road in the target image. The parameter adjustment stopping condition includes at least one of the difference between the edge line distances being less than a distance difference threshold or the difference between the edge line angles being less than an angle difference threshold.

[0219] The target road determining unit is used to determine the target road in the target image based on the road edge line.

[0220] In some embodiments, the target image acquisition module 802 is further used to acquire the target image uploaded by the terminal and use the target image as the target image to be used for road recognition; the road detection value acquisition module 804 includes:

[0221] The second road detection model acquisition unit is used to acquire the target user type corresponding to the terminal and acquire the trained road detection model corresponding to the target user type. The trained road detection model is trained using the target training image corresponding to the target user type.

[0222] The second road detection value obtaining unit is used to input the target image into the trained road detection model to perform road detection, and obtain the target road detection value corresponding to each target pixel point in the target image.

[0223] The device also includes:

[0224] The user movement prompt information determination module is used to determine the user movement prompt information based on the position corresponding to the target road and the position of the terminal.

[0225] The user movement prompt information sending module is used to send the user movement prompt information to the terminal, so that the terminal performs movement prompt according to the user movement prompt information.

[0226] For the specific definition of the road recognition device, please refer to the definition of the road recognition method above, which will not be repeated here. Each module in the above road recognition device can be implemented in whole or in part by software, hardware and their combination. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0227] In some embodiments, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a road recognition method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0228] In some embodiments, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Fig.10As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data related to the road recognition method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a road recognition method is implemented.

[0229] Those skilled in the art will understand that Fig. 9 and 10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0230] In some embodiments, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0231] In some embodiments, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.

[0232] In some embodiments, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.

[0233] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0234] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0235] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A road recognition method, characterized in that: The method comprises: Acquire a target image to be subjected to road recognition; Performing road detection on the target image to obtain a target road detection value corresponding to each target pixel point in the target image; Determine a pixel transformation value corresponding to each target pixel point in the target image based on the target road detection value, arrange the pixel transformation values ​​corresponding to the target pixel points in a pixel arrangement order, and obtain a transformation image corresponding to the target image; Determine transformation value change information of the target pixel point in the transformation image relative to the reference pixel point in the transformation image, wherein the transformation value change information includes a transformation value change degree and a transformation value change direction angle; Obtaining candidate pixel points that meet the change degree screening condition from each pixel point of the transformed image, obtaining the contrast transformation value change degree of the candidate pixel point at the transformation value change direction angle, determining the change degree difference of the transformation value change degree of the candidate pixel point relative to the contrast transformation value change degree, and when the change degree difference is greater than the change degree difference threshold, taking the candidate pixel point as the edge pixel corresponding to the road in the target image; A target road in the target image is obtained based on the edge pixel recognition.

2. The method according to claim 1, characterized in that The performing road detection on the target image to obtain a target road detection value corresponding to each target pixel point in the target image comprises: Acquire a target user type corresponding to the target image; Acquire a trained road detection model corresponding to the target user type, where the trained road detection model is trained using a target training image corresponding to the target user type; The target image is input into the trained road detection model to perform road detection, and a target road detection value corresponding to each target pixel point in the target image is obtained.

3. The method according to claim 2, characterized in that The step of obtaining the trained road detection model comprises: Determine the target user type corresponding to the road detection model to be trained; Acquire a plurality of candidate training images corresponding to the target user type from the candidate training image set as target training images; Acquire a road position corresponding to a road in the target training image, and determine a pixel label value corresponding to each training pixel point in the target training image based on the road position; The road detection model to be trained is trained based on the target training image and the pixel label value to obtain a trained road detection model.

4. The method according to claim 2, characterized in that: The step of obtaining the target training image comprises: Obtaining road behavior information of a target user corresponding to the target user type; Generate movement control information corresponding to the virtual user based on the road behavior information; The movement control information is used to control the virtual user to move along the road, and images collected by the virtual user during the movement are obtained as the target training images.

5. The method according to claim 1, characterized in that Determining the pixel transformation value corresponding to each target pixel point in the target image based on the target road detection value includes: Based on the target road detection value, acquiring target pixel points satisfying a road detection value screening condition from each target pixel point of the target image as road pixel points; The road pixel value corresponding to the road is used as the pixel transformation value corresponding to the road pixel point, and the shielding pixel value is used as the pixel transformation value corresponding to the non-road pixel point in the target image.

6. The method according to claim 1, characterized in that The determining of the transformation value change information of the target pixel point in the transformation image relative to the reference pixel point in the transformation image comprises: Obtaining a current pixel from each pixel of the transformed image; Acquire neighboring pixels of a current pixel from the transformed image, and determine a reference pixel corresponding to the current pixel based on the neighboring pixels; A transformation value difference between a current pixel and a reference pixel corresponding to the current pixel is obtained, and based on the transformation value difference, transformation value change information of the current pixel relative to the reference pixel is obtained.

7. The method according to claim 6, characterized in that The reference pixel point of the current pixel point includes adjacent pixel points in a plurality of pixel arrangement directions, and the transformation value change information includes a transformation value change degree and a transformation value change direction angle; The step of obtaining a transformation value difference between a current pixel and a reference pixel corresponding to the current pixel, and obtaining transformation value change information of the current pixel relative to the reference pixel based on the transformation value difference comprises: Based on the pixel transformation value of the current pixel point and the pixel transformation value of the reference pixel point of the current pixel point in each pixel arrangement direction, obtaining the transformation value difference corresponding to the current pixel point in each pixel arrangement direction; The degree of change of the transformation value of the current pixel point relative to the reference pixel point and the direction angle of the transformation value change are determined in combination with the transformation value differences corresponding to the pixel arrangement directions.

8. The method according to claim 7, characterized in that The step of determining the degree of change of the transformation value of the current pixel point relative to the reference pixel point and the direction angle of the transformation value change by combining the transformation value differences corresponding to the pixel arrangement directions comprises: Performing statistical calculations on the transformation value differences corresponding to the current pixel point in each of the pixel arrangement directions to obtain the transformation value variation degree; The difference in transformation values ​​corresponding to the current pixel point in each of the pixel arrangement directions is used as the side length of the direction side in the corresponding pixel arrangement direction, and the angle of the connecting side connecting the direction side is determined based on the side length, and the angle is used as the transformation value change direction angle.

9. The method according to claim 1, characterized in that: There are a plurality of edge pixels, and obtaining a target road in the target image based on the edge pixels includes: Determine the current edge line corresponding to the edge pixel, determine the distance between the current edge line and the current edge line of the reference position, and determine the current edge line angle between the current edge line and a preset reference direction line; The current edge line distance and the current edge line angle are used as the current edge line parameters to be adjusted, and the current edge line parameters of each current edge line are adjusted until a parameter adjustment stop condition is satisfied, and the edge line corresponding to the current edge line parameters satisfying the parameter adjustment condition is used as the road edge line corresponding to the road in the target image, wherein the parameter adjustment stop condition includes at least one of a difference between the edge line distances being less than a distance difference threshold or a difference between the edge line angles being less than an angle difference threshold; A target road in the target image is determined based on the road edge line.

10. The method according to claim 1, characterized in that The obtaining of a target image to be subjected to road recognition comprises: Acquire a target image uploaded by a terminal, and use the target image as a target image to be subjected to road recognition; The performing road detection on the target image to obtain a target road detection value corresponding to each target pixel point in the target image comprises: Acquire a target user type corresponding to the terminal, and acquire a trained road detection model corresponding to the target user type, wherein the trained road detection model is obtained by training using a target training image corresponding to the target user type; Inputting the target image into the trained road detection model to perform road detection, and obtaining a target road detection value corresponding to each target pixel point in the target image; The method further comprises: Determining user movement prompt information based on the position corresponding to the target road and the position of the terminal; The user movement prompt information is sent to the terminal, so that the terminal performs a movement prompt according to the user movement prompt information.

11. A road recognition device, characterized in that: The device comprises: A target image acquisition module, used to acquire a target image to be used for road recognition; A road detection value obtaining module is used to perform road detection on the target image to obtain a target road detection value corresponding to each target pixel point in the target image; A transformation image obtaining module, used for determining the pixel transformation value corresponding to each target pixel point in the target image based on the target road detection value, arranging the pixel transformation values ​​corresponding to the target pixel points according to the pixel point arrangement order, and obtaining a transformation image corresponding to the target image; an edge pixel determination module, for determining transformation value change information of the target pixel point in the transformation image relative to the reference pixel point in the transformation image, wherein the transformation value change information includes a transformation value change degree and a transformation value change direction angle, obtaining candidate pixel points that meet a change degree screening condition from each pixel point in the transformation image, obtaining a comparative transformation value change degree of the candidate pixel point at the transformation value change direction angle, determining a difference in the degree of change of the transformation value of the candidate pixel point relative to the comparative transformation value change degree, and when the difference in the degree of change is greater than a difference in the degree of change threshold, taking the candidate pixel point as an edge pixel corresponding to the road in the target image; The target road obtaining module is used to obtain the target road in the target image based on the edge pixel recognition.

12. The device according to claim 11, characterized in that The road detection value obtaining module includes: A target user type acquisition unit, used to acquire the target user type corresponding to the target image; A first road detection model acquisition unit is used to acquire a trained road detection model corresponding to the target user type, where the trained road detection model is trained using a target training image corresponding to the target user type; The first road detection value obtaining unit is used to input the target image into the trained road detection model to perform road detection, and obtain the target road detection value corresponding to each target pixel point in the target image.

13. The device according to claim 12, characterized in that The step of obtaining the trained road detection model comprises: Determine the target user type corresponding to the road detection model to be trained; Acquire a plurality of candidate training images corresponding to the target user type from the candidate training image set as target training images; Acquire a road position corresponding to a road in the target training image, and determine a pixel label value corresponding to each training pixel point in the target training image based on the road position; The road detection model to be trained is trained based on the target training image and the pixel label value to obtain a trained road detection model.

14. The device according to claim 12, characterized in that The step of obtaining the target training image comprises: Obtaining road behavior information of a target user corresponding to the target user type; Generate movement control information corresponding to the virtual user based on the road behavior information; The movement control information is used to control the virtual user to move along the road, and images collected by the virtual user during the movement are obtained as the target training images.

15. The device according to claim 11, characterized in that The transformed image obtaining module is further used for: Based on the target road detection value, acquiring target pixel points satisfying a road detection value screening condition from each target pixel point of the target image as road pixel points; The road pixel value corresponding to the road is used as the pixel transformation value corresponding to the road pixel point, and the shielding pixel value is used as the pixel transformation value corresponding to the non-road pixel point in the target image.

16. The device according to claim 11, characterized in that The edge pixel determination module is further used for: Obtaining a current pixel from each pixel of the transformed image; Acquire neighboring pixels of a current pixel from the transformed image, and determine a reference pixel corresponding to the current pixel based on the neighboring pixels; A transformation value difference between a current pixel and a reference pixel corresponding to the current pixel is obtained, and based on the transformation value difference, transformation value change information of the current pixel relative to the reference pixel is obtained.

17. The device according to claim 16, characterized in that The reference pixel point of the current pixel point includes adjacent pixel points in multiple pixel arrangement directions, and the transformation value change information includes the transformation value change degree and the transformation value change direction angle; the edge pixel determination module is further used to: Obtaining a difference in transformation values ​​corresponding to the current pixel in each of the pixel arrangement directions based on a pixel transformation value of the current pixel and a pixel transformation value of a reference pixel of the current pixel in each of the pixel arrangement directions; The degree of change of the transformation value of the current pixel point relative to the reference pixel point and the direction angle of the transformation value change are determined in combination with the transformation value differences corresponding to the pixel arrangement directions.

18. The device according to claim 17, characterized in that The edge pixel determination module is further used for: Performing statistical calculations on the transformation value differences corresponding to the current pixel point in each of the pixel arrangement directions to obtain the transformation value variation degree; The difference in transformation values ​​corresponding to the current pixel point in each of the pixel arrangement directions is used as the side length of the direction side in the corresponding pixel arrangement direction, and the angle of the connecting side connecting the direction side is determined based on the side length, and the angle is used as the transformation value change direction angle.

19. The device according to claim 11, characterized in that The number of edge pixels is multiple, and the target road obtaining module is further used for: Determine the current edge line corresponding to the edge pixel, determine the distance between the current edge line and the current edge line of the reference position, and determine the current edge line angle between the current edge line and a preset reference direction line; The current edge line distance and the current edge line angle are used as the current edge line parameters to be adjusted, and the current edge line parameters of each current edge line are adjusted until a parameter adjustment stop condition is satisfied, and the edge line corresponding to the current edge line parameters satisfying the parameter adjustment condition is used as the road edge line corresponding to the road in the target image, wherein the parameter adjustment stop condition includes at least one of a difference between the edge line distances being less than a distance difference threshold or a difference between the edge line angles being less than an angle difference threshold; A target road in the target image is determined based on the road edge line.

20. The device according to claim 11, characterized in that The target image acquisition module is further used for: Acquire a target image uploaded by the terminal, and use the target image as a target image to be used for road recognition; The road detection value obtaining module is also used for: Acquire a target user type corresponding to the terminal, and acquire a trained road detection model corresponding to the target user type, wherein the trained road detection model is obtained by training using a target training image corresponding to the target user type; Inputting the target image into the trained road detection model to perform road detection, and obtaining a target road detection value corresponding to each target pixel point in the target image; The device is also used for: Determining user movement prompt information based on the position corresponding to the target road and the position of the terminal; The user movement prompt information is sent to the terminal, so that the terminal performs a movement prompt according to the user movement prompt information.

21. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.

22. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

23. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • Lane line detection method based on vanishing point estimation and semantic segmentation

    CN111582083A

  • Boundary detection device and boundary detection program

    JP2012155399A