One kind based on RGB-D camera and stereosonic visually impaired people's barrier early warning system and
Method
Technical field
The invention belongs to visually impaired people's ancillary technique, binocular vision technology, three-dimensional environment cognition technology, stereo interactive skills
Art field.The present invention includes a kind of based on RGB-D camera and stereosonic visually impaired people's barrier method for early warning, is related to a kind of benefit
Sightless near-infrared static speckles are projected with using infrared projector, are acquired using two infrared cameras and a RGB camera
Image, compact processor handle the image of acquisition, obtain depth image, and carry out piecemeal to depth image, finally will
The depth information of piecemeal is converted into stereo signal, finally passes to the barrier that visually impaired people is assisted using bone conduction earphone
Hinder object method for early warning.
Background technique
It is counted according to world health organization, there are 2.85 hundred million dysopia personages in the whole world.Visually impaired people has lost normally
Vision, all highly difficult to the understanding of color, shape, distance, movement, their live in daily life, trip etc. all receives
Tremendous influence.
Traditional visually impaired people's auxiliary tool such as bland person walking stick, visually impaired people need to move repeatedly walking stick, can just know
It is the case where in front, both time-consuming or laborious.The detection range of bland person walking stick is limited, can only detect the barrier on foot side, also can not be anti-
Reflect distant place and aerial situation.Seeing-eye dog can provide help for visually impaired people, but the training of seeing-eye dog and maintenance costs are
High, average family is difficult to undertake.Some occasions, seeing-eye dog cannot accompany blind person's entrance, such as bus and railway station, because
The auxiliary of this seeing-eye dog is limited.Bionic eye can help visually impaired people's recovered part vision, but the implantation of bionic eye
It needs to perform the operation, expense is high.Bionic eye, which is only applicable to retinal pigment degeneration or senile macular degeneration, leads to the blind person of blindness.
The visually impaired people of optic nerve damage can not be by implantation bionic eye come recovered part vision.
The auxiliary tool visually impaired of electronic type mainly uses ultrasonic technology, laser ranging technique, binocular vision technology, laser
Speckle encoding technology, laser radar technique, millimetre-wave radar technology, thermal imaging, global positioning system (GPS).Based on super
The ranging range of technology of acoustic wave and laser ranging technique is limited, can only realize single-point ranging, the information content of acquisition is very little, and power consumption
More, equipment is heavy, can only realize warning function, is easy by environmental disturbances.Auxiliary based on binocular vision technology depends on environment
The abundant degree of middle characteristic point and texture, the scene failure single for some textures, such as indoor white wall, smooth earth etc..
Binocular vision technology can be by the deception of the special cases such as mirror-reflection, to cause to fail to judge or judge by accident.It is compiled based on laser speckle
The auxiliary of code technology is in outdoor failure, because actively the structure light of projection is flooded by sunlight, so that the speckle of coding can not be identified.
Laser speckle coding techniques is since by power limit, there are maximum distances, and the object more than maximum distance can not be to its ranging.
Supplementary costs based on laser radar technique is high, and usual sample rate is low, sensitive to dust, haze, rainwater, and can not obtain face
Color and texture information.Auxiliary resolution ratio based on millimetre-wave radar is low, and signal processing is difficult.Auxiliary based on thermal imaging
Resolution ratio is low, and calibration process is complicated, and can only detect the thermal objects such as humans and animals.Auxiliary precision based on GPS is low, has letter
Number loss, cannot use indoors, and the obstacle information of local dynamic station can not be obtained.
The interactive mode of traditional visually impaired people's auxiliary mainly has voice prompting, tactile vibration.Semanteme prompt usually casting barrier
Distance and the direction for hindering object, need the regular hour to play, and cause delay and accident risk, and transferable information content is few.
Tactile vibration is hardware by vibration waistband or vibration vest, and to shake the orientation to prompt barrier, shaking device can be with
It solves the problems, such as delay, but brings burden to visually impaired people, the wearing feeling of different people is by difference.
Summary of the invention
In view of the above-mentioned deficiencies in the prior art, it is an object of the present invention to provide a kind of based on RGB-D camera and stereosonic view
Hinder personage's barrier early warning system and method.
The purpose of the present invention is what is be achieved through the following technical solutions: a kind of based on RGB-D camera and stereosonic visually impaired
Personage's barrier early warning system, the system include an infrared projector, two identical infrared cameras, a colored phase
Machine, a usb hub, a compact processor, a bone conduction earphone module, two osteoacusis shock modules, an electricity
Pond module.Infrared projector, two infrared cameras, color camera are connected by usb hub with compact processor, battery module
It is connected with compact processor.Color camera and infrared projector are located between two infrared cameras.Two infrared cameras, colored phase
The optical axis of machine is parallel to each other.Compact processor controls the infrared projector sightless static near-infrared of three-dimensional scenic projection forwards
Speckle, two infrared cameras acquire two width infrared images of the three-dimensional scenic after projecting in real time, and color camera is adopted in real time
Collect the color image of three-dimensional scenic.Two width infrared images and a width color image are transmitted to compact processor by usb hub.It is small-sized
Processor handles two width infrared images, the width color image of acquisition, obtains the depth image of three-dimensional scenic.Small-sized place
It manages device and piecemeal is carried out to depth image, and convert stereo signal for the depth information after piecemeal, and be transmitted to bone conduction earphone
Module.Stereo signal is switched to osteoacusis vibration signal by bone conduction earphone module, is transmitted to two osteoacusis shock modules.Two
Osteoacusis shock module, transmitting osteoacusis vibration signal give user visually impaired, realize barrier early warning.
A kind of barrier method for early warning, comprising the following steps:
(1) a binocular camera calibration is carried out to two infrared cameras, obtains the focal length f of two infrared camerasIR, left infrared
Principle point location (the c of cameraIR-x,cIR-y), the parallax range B of two infrared camerasIR-IR。
(2) camera calibration is carried out to color camera, obtains the focal length f of color cameracolor, principle point location (cCOLOR-x,
cCOLOR-y)。
(3) a binocular camera calibration is carried out to the infrared camera of color camera and left side, obtains left infrared camera and coloured silk
The parallax range B of form and aspect machineIR-COLOR。
(4) infrared projector projects sightless static near-infrared speckle into three-dimensional scenic in real time.
Two infrared image IR of (5) two infrared camera acquisition three-dimensional scenicsleftAnd IRright。
(6) the color image Color of color camera three-dimensional scenic.
(7) usb hub is by two width infrared image IRleftAnd IRright, a width color image Color is transmitted to small-sized processing
Device.
(8) compact processor is to two infrared image IRleftAnd IRrightThe edge Sobel is extracted, two sides Sobel are obtained
Edge image SobelleftAnd Sobelright。
(9) with left Sobel edge image SobelleftOn the basis of, to two Sobel edge image SobelleftWith
SobelrightImages match image block based is carried out, a series of available point E={ e matched are obtained1,e2,e3,...,eM}。
In left Sobel edge image SobelleftIn, each available point is e=(u, v, d)T, u is abscissa pixel value, and v is vertical sits
Pixel value is marked, d is parallax value.
(10) on the basis of the available point E matched, every three available points may make up a disparity plane, i-th of parallax
The equation of plane is d=aiu+biv+ci, wherein ai, bi, ciFor the coefficient of i-th of disparity plane.
It (11), will not matched pixel (u', v', d') on the basis of these disparity planesTBeing converted to matched has
It imitates point (u, v, d)T;Specifically: the pixel (u', v', d')TDistance to the i-th disparity plane isIf energy function isWherein ε, σ are constant.
To the pixel, all parallax value d'={ d' of disparity search range are traversedmin,...,d'max, it finds out so that energy function
Energy (d') the smallest parallax value, as the parallax value d of the pixel.In addition, u=u', v=v'.
(12) all not matched pixels are traversed, the parallax value of each not matched pixel is obtained, are obtained with left red
Anaglyph Disparity on the basis of outer cameraleft。
(13) according to the focal length f of two infrared camerasIRWith parallax range BIR-IR, traverse anaglyph in every bit (u,
V, d), depth value isTherefore depth image DepthleftMiddle every bit corresponds to (u, v, depth), from
And obtain the depth image Depth on the basis of left infrared cameraleft。
(14) depth image Depth is utilizedleftWith color image Color, the focal length f of two infrared camerasIR, left infrared phase
Principle point location (the c of machineIR-x,cIR-y), the focal length f of color cameracolor, principle point location (cCOLOR-x,cCOLOR-y), and it is left infrared
The parallax range B of camera and color cameraIR-COLOR, depth image and color image can be aligned, obtain color camera view
The depth image Depth of fieldcolor。
(15) by the depth image Depth of color camera visual fieldcolorFrom left to right it is divided into K block, calculates each piece of depth map
As DepthKMean depth depthK.(value of K is generally between 2 to 10)
(16) K block depth image Depth is indicated with the (instrumental) ensemble of the musical instrument of different tone colorsK: the depth image of different masses
DepthKWith the instruments sound of different tone colors.The mean depth depth of the loudness Volume of musical instrument sound and each block of imageKAt
Inverse ratio, it may be assumed that barrier is closer, mean depth depthKSmaller, loudness Volume is bigger;Barrier is remoter, mean depth depthK
Bigger, loudness Volume is smaller.The musical instrument sound in each direction is stereo.The optional piano of musical instrument, violin, gong, trumpet, wood
Qin etc. has special tone color and melodious.
(17) stereo signal is transmitted to bone conduction earphone module by compact processor.
(18) stereo signal is switched to osteoacusis vibration signal by bone conduction earphone module.
(19) osteoacusis vibration signal is passed to user visually impaired by osteoacusis shock module.
This method is essentially consisted in compared to the advantage of previous visually impaired people's householder method:
1, ambient adaptability.Due to using infrared projector and two infrared cameras, this method indoors, outdoor environment all
Use can be compatible with.When indoors, the static near-infrared hot spot of infrared projector projection increases texture to three-dimensional scenic, favorably
In the depth image that acquisition is dense.At outdoor, the near-infrared part of sunlight and three-dimensional scenic are combined, and are conducive to obtain dense
Depth image.Dense depth image can guarantee the accuracy of piecemeal depth and the experience effect of auxiliary interaction.
2, applicability day and night.Due to using infrared projector and two infrared cameras, this method daytime, night all
Use can be compatible with.During the day, the near-infrared ingredient in the static near-infrared hot spot and daylight of infrared projector projection all may be used
To increase texture to three-dimensional scenic, be conducive to dense depth image.At night, the static near-infrared of infrared projector projection
Hot spot increases texture to nearby three-dimensional scenic, also the depth image of available nearby three-dimensional scenic.This method is in day and night
Reliable depth image can be obtained, to guarantee the accuracy of piecemeal depth and the experience effect of auxiliary interaction.
3, it can detect aerial barrier.Traditional bland person walking stick can only detect the road conditions on foot side, and it is empty cannot to look after front
In situation, the barrier that this method can be aerial with early warning, to prevent user visually impaired from colliding the objects such as aerial branch or door beam
Body.
4, ears are not take up.This method delivers a signal to user visually impaired using bone conduction earphone, does not interfere user to listen to outer
The sound on boundary.Visually impaired people is dependent on extraneous sound to carry out some interpretations, as judged road according to wagon flow sound mostly
Towards etc..
5, both hands are not take up.The auxiliary device of this method is wearable, and compact processor is portable, can be placed on pocket or small
Bao Li, both will not bring very big burden to visually impaired, take auxiliary tool with hand without visually impaired people.
6, user will not be bothered.The stereo interactive mode of this method will not give use visually impaired using melodious instruments sound
Family causes to bother, and allows user visually impaired to listen melodious music energy avoidance when in use current.
7, sufficient information content is fed back.Compared to the voice broadcast of semantic formula, stereosonic interaction feedback utilizes different loudness,
The musical instrument of different tone colors indicates the distance of barrier, can simultaneously, fully transmit the road conditions of front different directions, early warning barrier
Hinder the presence of object.
8, learnability and Comprehensible.Compared to the acoustic coding of complex form, the interaction of neutral body sound of the present invention is based on deep
The piecemeal of figure is spent, treated that depth information will not be very lengthy and jumbled for piecemeal, and user visually impaired can learn rapidly and understand stereo
The meaning of signal, and according to stereo signal avoiding obstacles.
9, it timely feeds back.Compared to the voice broadcast of semantic formula, stereosonic interaction feedback is timely, not postpone.
To visually impaired people can timely avoiding obstacles, ensure that the safety of this method.
10, there is good forewarning function to barrier nearby.When close to barrier, the mean depth of corresponding direction
It is small, therefore the loudness of corresponding musical instrument is big, user visually impaired can be helped to predict the approaching of barrier well, to avoid urgent
Barrier.
11, tiny barrier can be detected.When there is tiny barrier, the mean depth of corresponding direction is changed,
Therefore the loudness of corresponding musical instrument is big, user visually impaired can be helped to predict the presence of tiny barrier well, to avoid tiny
Barrier.
Detailed description of the invention
Fig. 1 is the module connection diagram of visually impaired people's barrier early warning system;
Fig. 2 is the structural schematic diagram of visually impaired people's barrier early warning system;
Fig. 3 is the depth image Depth of color image Color and color camera visual fieldcolor, depth image pseudo-colours table
Show, color is more blue, and depth is bigger, and color is redder, and depth is smaller.
Fig. 4 is K block depth image DepthK, each piece of color indicates each piece of depth image DepthKMean depth
depthK, mean depth is bigger, and color is more blue, and mean depth is closer, and color is redder.
Fig. 5, which is that musical instrument is stereo, instrumental ensembles the schematic diagram for indicating barrier.
Specific embodiment
As shown in Figure 1, a kind of be based on RGB-D camera and stereosonic visually impaired people's barrier early warning system, the system
Include an infrared projector, two identical infrared cameras, a color camera, a usb hub, a small-sized processing
Device, a bone conduction earphone module, two osteoacusis shock modules, a battery module.Infrared projector, two infrared phases
Machine, color camera are connected by usb hub with compact processor, and battery module is connected with compact processor.Color camera and
Infrared projector is located between two infrared cameras.Two infrared cameras, the optical axis of color camera are parallel to each other.Compact processor
Controlling infrared projector, the sightless static near-infrared speckle of three-dimensional scenic projection, two infrared cameras acquire in real time forwards
Two width infrared images of the three-dimensional scenic after projecting, color camera acquire the color image of three-dimensional scenic in real time.USB set line
Two width infrared images and a width color image are transmitted to compact processor by device.Compact processor to two width infrared images of acquisition,
One width color image is handled, and the depth image of three-dimensional scenic is obtained.Compact processor carries out piecemeal to depth image, and will
Depth information after piecemeal is converted into stereo signal, and is transmitted to bone conduction earphone module.Bone conduction earphone module will be stereo
Signal switchs to osteoacusis vibration signal, is transmitted to two osteoacusis shock modules.Two osteoacusis shock modules, transmitting osteoacusis shake
Dynamic signal gives user visually impaired, realizes barrier early warning.The system can be designed analogous to glasses described in Fig. 2, to reach beauty
See effect.
The method for early warning of above system the following steps are included:
(1) a binocular camera calibration is carried out to two infrared cameras, obtains the focal length f of two infrared camerasIR, left infrared
Principle point location (the c of cameraIR-x,cIR-y), the parallax range B of two infrared camerasIR-IR。
(2) camera calibration is carried out to color camera, obtains the focal length f of color cameracolor, principle point location (cCOLOR-x,
cCOLOR-y)。
(3) a binocular camera calibration is carried out to the infrared camera of color camera and left side, obtains left infrared camera and coloured silk
The parallax range B of form and aspect machineIR-COLOR。
(4) infrared projector projects sightless static near-infrared speckle into three-dimensional scenic in real time.
Two infrared image IR of (5) two infrared camera acquisition three-dimensional scenicsleftAnd IRright。
(6) the color image Color of color camera three-dimensional scenic.
(7) usb hub is by two width infrared image IRleftAnd IRright, a width color image Color is transmitted to small-sized processing
Device.
(8) compact processor is to two infrared image IRleftAnd IRrightThe edge Sobel is extracted, two sides Sobel are obtained
Edge image SobelleftAnd Sobelright。
(9) with left Sobel edge image SobelleftOn the basis of, to two Sobel edge image SobelleftWith
SobelrightImages match image block based is carried out, a series of available point E={ e matched are obtained1,e2,e3,...,eM}。
In left Sobel edge image SobelleftIn, each available point is e=(u, v, d)T, u is abscissa pixel value, and v is vertical sits
Pixel value is marked, d is parallax value.
(10) on the basis of the available point E matched, every three available points may make up a disparity plane, i-th of parallax
The equation of plane is d=aiu+biv+ci, wherein ai, bi, ciFor the coefficient of i-th of disparity plane.
It (11), will not matched pixel (u', v', d') on the basis of these disparity planesTBeing converted to matched has
It imitates point (u, v, d)T;Specifically: the pixel (u', v', d')TDistance to the i-th disparity plane isIf energy function isWherein ε, σ are constant.
To the pixel, all parallax value d'={ d' of disparity search range are traversedmin,...,d'max, it finds out so that energy function
Energy (d') the smallest parallax value, as the parallax value d of the pixel.In addition, u=u', v=v'.
(12) all not matched pixels are traversed, the parallax value of each not matched pixel is obtained, are obtained with left red
Anaglyph Disparity on the basis of outer cameraleft。
(13) according to the focal length f of two infrared camerasIRWith parallax range BIR-IR, traverse anaglyph in every bit (u,
V, d), depth value isTherefore depth image DepthleftMiddle every bit corresponds to (u, v, depth), from
And obtain the depth image Depth on the basis of left infrared cameraleft。
(14) depth image Depth is utilizedleftWith color image Color, the focal length f of two infrared camerasIR, left infrared phase
Principle point location (the c of machineIR-x,cIR-y), the focal length f of color cameracolor, principle point location (cCOLOR-x,cCOLOR-y), and it is left infrared
The parallax range B of camera and color cameraIR-COLOR, depth image and color image can be aligned, obtain color camera view
The depth image Depth of fieldcolor。
(15) by the depth image Depth of color camera visual fieldcolorFrom left to right it is divided into K block, calculates each piece of depth map
As DepthKMean depth depthK.(value of K is generally between 2 to 10)
(16) K block depth image Depth is indicated with the (instrumental) ensemble of the musical instrument of different tone colorsK: the depth image of different masses
DepthKWith the instruments sound of different tone colors.The mean depth depth of the loudness Volume of musical instrument sound and each block of imageKAt
Inverse ratio, it may be assumed that barrier is closer, mean depth depthKSmaller, loudness Volume is bigger;Barrier is remoter, mean depth depthK
Bigger, loudness Volume is smaller.The musical instrument sound in each direction is stereo.The optional piano of musical instrument, violin, gong, trumpet, wood
Qin etc. has special tone color and melodious.
(17) stereo signal is transmitted to bone conduction earphone module by compact processor.
(18) stereo signal is switched to osteoacusis vibration signal by bone conduction earphone module.
(19) osteoacusis vibration signal is passed to user visually impaired by osteoacusis shock module.