Blind guiding glasses and anti-collision early warning method thereof
Technical Field
The invention belongs to the technical field of wearable equipment, and particularly relates to blind guiding glasses and an anti-collision early warning method thereof.
Background
The visual system is one of the most important systems for human perception of the objective world, and the human obtains more than 80% of the external information. Therefore, the lack or decline of visual information makes it difficult for visually impaired people to perceive the surrounding environment information, and the free travel is hindered, and the aspects of life self-care and the like are also limited, which brings much inconvenience and trouble to the daily life of the group and is a main factor causing the reduction of the quality of life. The world health organization predicts that the number of global vision-impaired people will increase to 7500 thousands of people in 2020, the sixth census of China and the second disabled people survey data statistics of China show that the number of the vision-impaired people in China reaches 877 thousands of people, and the world is the most country. And as the aging population of China continuously increases, the number of the visually impaired people also increases sharply, so that the problem of safe trip of the visually impaired people is solved, the life quality of the visually impaired people is improved, and the visually impaired people are attracted by social attention.
At present, the travel of the visually impaired people mainly depends on the blind road and the handheld blind stick, but the limitation of the blind road area and the space information amount provided by the blind stick can not enable the visually impaired people to safely travel. In addition, only a few visually-impaired people use the guide dog to lead a trip, but the guide dog training learning time is long, the cost is high, and the actual requirements of visually-impaired people are difficult to meet. The blind guiding robot integrates various sensors on the movable carrier, so that the blind guiding robot can sense environmental information and guide visually impaired people to safely go out. However, the blind guiding robot has low capability of adapting to the environment and limited application range. The blind guiding and walking aid device in the prior art is often provided with a movable carrier, or cannot be carried about due to large volume, or brings unnecessary trouble to the use of the visually impaired people due to troublesome operation and the like.
Disclosure of Invention
The invention aims to provide blind guiding glasses which can be carried about, are convenient to operate and control and effectively remind a user of the distance between the user and an obstacle.
The technical scheme adopted by the invention is as follows: a pair of blind guiding glasses comprises a glasses frame and lenses arranged on the glasses frame, wherein the front side of the glasses frame is respectively provided with a camera, a lighting lamp and a light sensor, the camera is positioned at the center of the front side of the glasses frame, the end part of one supporting leg of the glasses frame is provided with an earphone, the outer side of the end part of the other supporting leg of the glasses frame is provided with a control key,
also comprises a control box, a main controller, an image processor, a battery, a vibration module, a voice module, a Bluetooth communication module and a WiFi communication module which are connected with the main controller are arranged in the control box,
the camera is connected with an image processor in the control box through a video line, the control keys and the earphone are respectively connected with the main controller and the voice module in the control box through data lines, the illuminating lamp and the light sensor are both connected with the main controller in the control box through the data lines, and the control box controls the opening and closing of the illuminating lamp according to light intensity signals transmitted by the light sensor.
The present invention is also characterized in that,
different key areas are divided on the control keys, and braille characters are arranged on each key area, so that the operation of the blind is facilitated.
The spectacle frame is made of hard aluminum alloy materials, so that the spectacle frame is convenient to be attached to the face without falling off.
The second technical scheme adopted by the invention is that the anti-collision early warning method for the blind guiding glasses is implemented according to the following steps:
step 1, shooting to obtain a plurality of continuous images of the traveling direction of a user of the blind guiding glasses;
step 2, preprocessing a plurality of continuous images, increasing the image contrast and reducing the image noise;
step 3, extracting blind road characteristics according to the color characteristics and the texture characteristics of the preprocessed image, identifying the blind road, re-shooting the picture if the blind road characteristics cannot be extracted, returning to the step 1, and otherwise, performing the step 4;
step 4, identifying obstacles in the blind road area, determining static obstacles and dynamic obstacles, if the static obstacles and the dynamic obstacles cannot be determined, re-shooting the picture, returning to the step 1 to start, and otherwise, performing the step 5;
and 5, calculating the distance between the obstacle and the blind guiding glasses user according to the static obstacle and the dynamic obstacle determined in the step 4, and giving an early warning to the blind guiding glasses user.
The preprocessing process in the step 2 is to process a plurality of continuous images by adopting a histogram equalization and homomorphic filtering algorithm.
Step 3 is specifically implemented according to the following steps:
step 3.1, converting the RGB model of the preprocessed image into a Lab color space model by adopting a color space conversion model to obtain b-component characteristics of the blind road image in the Lab color space model, wherein the color space conversion model is as follows:
wherein X, Y, Z are the three stimulus values of the image, X0、Y0、Z0Three stimulus values, L, for CTE standard illumination*Representing the brightness of the image, a*、b*Representing image chromaticity;
step 3.2, adopting a gray level co-occurrence matrix, and selecting four direction angles of 0 degree, 45 degrees, 90 degrees and 135 degrees to perform statistics on the image to obtain four gray level co-occurrence matrices of P0 degrees, P45 degrees, P90 degrees and P135 degrees respectively;
step 3.3, combining the b-component characteristic of the blind road image obtained in the step 3.1 and the four gray level co-occurrence matrixes respectively of P0 degrees, P45 degrees, P90 degrees and P135 degrees obtained in the step 3.2, and segmenting the image by adopting a maximum inter-class variance method to preliminarily obtain a blind road region;
and 3.4, extracting blind channel edge characteristics from the blind channel region obtained primarily in the step 3.3 by adopting a Canny operator, and extracting the blind channel edge characteristics through Hough transformation to obtain a final complete blind channel region.
Step 4 is specifically implemented according to the following steps:
step 4.1, determining static obstacles
Step 4.1.1, neglecting the upper area of the blind road area in each image, and extracting the blind road area;
step 4.1.2, calculating the gray values of the blind road region obtained in the step 4.1.1 in the vertical direction and the horizontal direction, calculating the entropy of the blind road region obtained in the step 4.1.1 to judge whether a static obstacle exists in the blind road region, and judging whether the static obstacle exists when the gray values of the blind road region in the vertical direction and the horizontal direction are both smaller than the entropy of the blind road region;
step 4.2, determining dynamic obstacle
Step 4.2.1, detecting every three adjacent images by adopting a three-frame difference method, wherein the formula of the three-frame difference method is as follows
Wherein, Fk-1(x,y)、Fk(x,y)、Fk+1(x, y) is the k-1, k +1 frame image in succession, G1(x,y)、G2(x, y) is the frame-differenced image;
step 4.2.2, image G after frame difference1(x,y)、G2(x, y) selecting a threshold value T for binarization processing, wherein the binarization processing process comprises the following steps:
wherein T is a threshold value and D1(x,y)、D2(x, y) is the binarized image,
wherein the threshold T is based on the frame-corrupted image G1(x,y)、G2(x, y) selecting the distribution of gray values;
step 4.2.3, the binarized image D obtained in the step 4.2.21(x,y)、D2(x, y) performing a logical AND operation:
in the formula, R (x, y) is an image obtained after AND operation;
and 4.2.4, performing gray projection on the image obtained after the AND operation in the horizontal and vertical directions by adopting a gray projection algorithm to obtain two curves of the image obtained after the AND operation in the two directions, performing cross-correlation calculation on the two curves by using a cross-correlation function to obtain cross-correlation curves of the two curves, and determining the dynamic obstacle by using a peak point on the cross-correlation curves.
Step 5 is specifically implemented according to the following steps:
step 5.1, substituting the static obstacle and dynamic obstacle information obtained in the step 4 into a distance measurement formula to calculate the distance between the static obstacle and the dynamic obstacle and a user of the blind guiding glasses, wherein the distance measurement formula is as follows:
h is the installation height of the camera, H is the height of a static obstacle or a dynamic obstacle, f is the focal length of the camera, u, v, u0,v0,ax,ayThe internal parameters of the camera are taken as the parameters;
step 5.2, according to the distance between the static barrier and the dynamic barrier calculated in the step 5.1 and the blind guiding glasses user, giving an early warning to the blind guiding glasses user: when the distance is less than 3 meters, the blind guiding glasses user is in an unsafe area, the control box sends out a warning about the existence of the obstacle to the blind guiding glasses user through the voice module and the vibration module, when the distance is greater than 7 meters, the control box sends out a safe voice signal, and when the distance is greater than 3 meters and less than 7 meters, the system sends out a warning signal about the existence of the obstacle.
The invention has the beneficial effects that: the blind guiding glasses are simple in preparation process and low in cost, are suitable for large-scale production and popularization, can be carried about, are convenient to operate and control, can effectively remind a user of the distance between the user and an obstacle through an anti-collision early warning method, avoid the user from colliding with the obstacle on a blind road, and bring great convenience to the user in traveling.
Drawings
FIG. 1 is a view of the structure of the appearance of a pair of blind-guiding spectacles according to the present invention;
fig. 2 is a flow chart of an anti-collision early warning method of blind guide glasses according to the present invention.
The device comprises an earphone 1, an illuminating lamp 2, a camera 3, a lens 4, an eyeglass frame 5, a control box 6, a control button 7 and a light sensor 8.
Detailed Description
The following detailed description of the embodiments of the invention refers to the accompanying drawings and accompanying claims.
The invention provides a pair of blind guiding glasses, as shown in figure 1, comprising a glasses frame 5 and a lens 4 arranged on the glasses frame 5, wherein the front side of the glasses frame 5 is respectively provided with a camera 3, a lighting lamp 2 and a light sensor 8, the camera 3 is positioned at the center of the front side of the glasses frame 5, the end part of one supporting leg of the glasses frame 5 is provided with an earphone 1, the outer side of the end part of the other supporting leg of the glasses frame 5 is provided with a control key 7,
also comprises a control box 6, a main controller, an image processor, a battery, a vibration module, a voice module, a Bluetooth communication module and a WiFi communication module which are connected with the main controller are arranged in the control box 6,
camera 3 passes through the video line and is connected with the image processor in the control box 6, control button 7, earphone 1 passes through the master controller in data line and the control box 6 respectively, voice module is connected, light 2, light sensor 8 all is connected with the master controller in the control box 6 through the data line, control box 6 is closed according to opening of the strong and weak signal control light 2 of light sensor 8 transmission, thereby when light is dark, control light 2 is opened supplementary camera 3 and is shot clear photo.
Furthermore, different key areas are divided on the control keys 7, and braille characters are arranged on each key area, so that the operation of the blind is facilitated.
Furthermore, the spectacle frame 5 is made of hard aluminum alloy materials, so that the spectacle frame 5 is convenient to be attached to the face without falling off.
An anti-collision early warning method based on the blind-guiding glasses is specifically implemented according to the following steps as shown in fig. 2:
step 1, shooting to obtain a plurality of continuous images of the traveling direction of a user of the blind guiding glasses;
step 2, preprocessing a plurality of continuous images, increasing the image contrast and reducing the image noise;
step 3, extracting blind road characteristics according to the color characteristics and the texture characteristics of the preprocessed image, identifying the blind road, re-shooting the picture if the blind road characteristics cannot be extracted, returning to the step 1, and otherwise, performing the step 4;
step 4, identifying obstacles in the blind road area, determining static obstacles and dynamic obstacles, if the static obstacles and the dynamic obstacles cannot be determined, re-shooting the picture, returning to the step 1 to start, and otherwise, performing the step 5;
and 5, calculating the distance between the obstacle and the blind guiding glasses user according to the static obstacle and the dynamic obstacle determined in the step 4, and giving an early warning to the blind guiding glasses user.
Further, the preprocessing process in step 2 is to process a plurality of continuous images by using histogram equalization and homomorphic filtering algorithm.
Step 3 is specifically implemented according to the following steps:
step 3.1, converting the RGB model of the preprocessed image into a Lab color space model by adopting a color space conversion model to obtain b-component characteristics of the blind road image in the Lab color space model, wherein the color space conversion model is as follows:
wherein X, Y, Z are the three stimulus values of the image, X0、Y0、Z0Three stimulus values, L, for CTE standard illumination*Representing the brightness of the image, a*、b*Representing image chromaticity;
step 3.2, adopting a gray level co-occurrence matrix, and selecting four direction angles of 0 degree, 45 degrees, 90 degrees and 135 degrees to perform statistics on the image to obtain four gray level co-occurrence matrices of P0 degrees, P45 degrees, P90 degrees and P135 degrees respectively;
step 3.3, combining the b-component characteristic of the blind road image obtained in the step 3.1 and the four gray level co-occurrence matrixes respectively of P0 degrees, P45 degrees, P90 degrees and P135 degrees obtained in the step 3.2, and segmenting the image by adopting a maximum inter-class variance method to preliminarily obtain a blind road region;
and 3.4, extracting blind channel edge characteristics from the blind channel region obtained primarily in the step 3.3 by adopting a Canny operator, and extracting the blind channel edge characteristics through Hough transformation to obtain a final complete blind channel region.
Step 4 is specifically implemented according to the following steps:
step 4.1, determining static obstacles
Step 4.1.1, neglecting the upper area of the blind road area in each image, and extracting the blind road area;
step 4.1.2, calculating the gray values of the blind road region obtained in the step 4.1.1 in the vertical direction and the horizontal direction, calculating the entropy of the blind road region obtained in the step 4.1.1 to judge whether a static obstacle exists in the blind road region, and judging whether the static obstacle exists when the gray values of the blind road region in the vertical direction and the horizontal direction are both smaller than the entropy of the blind road region;
step 4.2, determining dynamic obstacle
Step 4.2.1, detecting every three adjacent images by adopting a three-frame difference method, wherein the formula of the three-frame difference method is as follows
G1(x,y)=|Fk(x,y)-Fk-1(x,y)| (2)
G2(x,y)=|Fk+1(x,y)-Fk(x,y)|
Wherein, Fk-1(x,y)、Fk(x,y)、Fk+1(x, y) is the k-1, k +1 frame image in succession, G1(x,y)、G2(x, y) is the frame-differenced image;
step 4.2.2, image G after frame difference1(x,y)、G2(x, y) selecting a threshold value T for binarization processing, wherein the binarization processing process comprises the following steps:
in the formula (I), the compound is shown in the specification,t is a threshold value, D1(x,y)、D2(x, y) is the binarized image,
wherein the threshold T is based on the frame-corrupted image G1(x,y)、G2(x, y) selecting the distribution of gray values;
step 4.2.3, the binarized image D obtained in the step 4.2.21(x,y)、D2(x, y) performing a logical AND operation:
in the formula, R (x, y) is an image obtained after AND operation;
and 4.2.4, performing gray projection on the image obtained after the AND operation in the horizontal and vertical directions by adopting a gray projection algorithm to obtain two curves of the image obtained after the AND operation in the two directions, performing cross-correlation calculation on the two curves by using a cross-correlation function to obtain cross-correlation curves of the two curves, and determining the dynamic obstacle by using a peak point on the cross-correlation curves.
Step 5 is specifically implemented according to the following steps:
step 5.1, substituting the static obstacle and dynamic obstacle information obtained in the step 4 into a distance measurement formula to calculate the distance between the static obstacle and the dynamic obstacle and a user of the blind guiding glasses, wherein the distance measurement formula is as follows:
h is the installation height of the camera, H is the height of a static obstacle or a dynamic obstacle, f is the focal length of the camera, u, v, u0,v0,ax,ayThe internal parameters of the camera are taken as the parameters;
step 5.2, according to the distance between the static barrier and the dynamic barrier calculated in the step 5.1 and the blind guiding glasses user, giving an early warning to the blind guiding glasses user: when the distance is less than 3 meters, the blind guiding glasses user is in an unsafe area, the control box 6 sends out a warning about the existence of the obstacle to the blind guiding glasses user through the voice module and the vibration module, when the distance is greater than 7 meters, the control box 6 sends out a safe voice signal, and when the distance is greater than 3 meters and less than 7 meters, the system sends out a warning signal about the existence of the obstacle.
The blind guiding glasses are simple in preparation process and low in cost, are suitable for large-scale production and popularization, can be carried about, are convenient to operate and control, can effectively remind a user of the distance between the user and an obstacle through an anti-collision early warning method, avoid the user from colliding with the obstacle on a blind road, and bring great convenience to the user in traveling.
The invention discloses an anti-collision early warning method for blind guiding glasses, which is a blind road identification detection algorithm integrating color features and texture features. Extracting yellow b component of the blind road in Lab color space, segmenting the blind road image by a maximum inter-class variance method, preliminarily extracting edge points of the blind road by adopting a Canny operator through texture features of the blind road, further optimizing the edge points of the blind road through Hough transformation, and simultaneously fusing segmented blind road regions to effectively identify the blind road.
Because the environment along the blind road is complex, and the appearance of the obstacle has unpredictability and uncertainty, the method adopts the single-frame-based image to process the obstacle right ahead, establishes an interested area for the acquired image, namely ignores the area above the blind road area in each image, extracts the blind road area to reduce the search range of the obstacle, further reduces the area of the obstacle by respectively carrying out edge detection in two directions on the area, and finally calculates the entropy of the image to judge whether the area really has the obstacle.
The invention adopts sequence-based images to process the moving obstacles suddenly appearing on both sides of the blind road, and combines a gray projection algorithm to detect the moving obstacles on the basis of a three-frame difference method.
On the basis of realizing the detection and positioning of the cataract obstacle in the blind road area, the invention designs early warning reminding, determines the geometric relation between a world coordinate system and an image coordinate system through the calibration of a vision system on the premise of assuming that the road surface of the blind road is horizontal, estimates the actual distance between the visually impaired and the obstacle through distance measurement, and sends out a safe voice signal, an early warning signal and a warning signal in 3 different forms according to the actual distance, thereby effectively ensuring the personal safety of visually impaired people.