A kind of gauge detection method and device
Technical field
This application involves detection technique fields, more particularly, to a kind of gauge detection method and device.
Background technique
To guarantee rail vehicle driving safety, periodically track need to be detected, and gauge detection is the one of track detecting
The essential detection of item.
In the prior art, contactless gauge detection is mainly carried out by way of image procossing, pass through acquisition trajectory figure
Picture then according to the pixel identification track in orbital image, and calculates gauge according to the distance between pixel in image,
It calculates in identification process, needs using the threshold parameter being manually set based on experience value, accuracy of identification is lower;And because not
With detection scene in, such as when detecting in tunnel gauge and detection gauge outside tunnel, required threshold parameter is simultaneously
It is not identical, therefore need to be arranged different threshold parameters for different detection scenes, detection efficiency is lower.
Summary of the invention
In view of this, the application's is designed to provide gauge detection method and device, to improve the efficiency of gauge detection
And accuracy rate.
In a first aspect, the embodiment of the present application provides a kind of gauge detection method, comprising:
Acquisition trajectory image, the orbital image include orbital region characteristics of image and non-orbital region characteristics of image;
Based on the Pixel Information of each of orbital image pixel, is extracted from the orbital image and include
There is the partial orbit image of the orbital region characteristics of image;
Based on the partial orbit image, determine interorbital away from.
With reference to first aspect, the embodiment of the present application provides the first possible embodiment of first aspect, wherein institute
State orbital image include by first camera acquire the first orbital image, and, pass through second camera acquisition the second orbital image;
Wherein, the first orbital image includes the orbital region characteristics of image of the first track and the orbital region of non-first track
Characteristics of image;
Second orbital image includes the orbital region characteristics of image of the second track and the orbital region of non-second track
Characteristics of image.
With reference to first aspect or the first possible embodiment of first aspect, the embodiment of the present application provide first party
The possible embodiment of second of face, wherein the Pixel Information includes gray value;
The Pixel Information based on each of orbital image pixel, extracts from the orbital image
Include the partial orbit image of the orbital region characteristics of image, specifically include:
The orbital image is converted into gray level image;
Selection meets the selected gray value of preset condition from the gray value for each pixel that the gray level image includes;
From the difference filtered out in each pixel that the gray level image includes between gray value and the selected gray value
Selected pixel within a preset range;
According to the selected pixel, the partial orbit image is determined.
The possible embodiment of second with reference to first aspect, the embodiment of the present application provide the third of first aspect
Possible embodiment, wherein extracted from the orbital image include the orbital region characteristics of image part
After orbital image, the method also includes:
According at least one of following operations, noise reduction and micronization processes are carried out to the partial orbit image:
Opening operation, closed operation, dilation operation, erosion operation.
The possible embodiment of with reference to first aspect the first, the embodiment of the present application provide the 4th kind of first aspect
Possible embodiment, wherein it is described to be based on the partial orbit image, determine interorbital away from specifically including:
Obtain the pitch information between the first camera and the second camera;
Determine that parameter matrix, the parameter matrix pass through the first camera and institute for describing according to the pitch information
State the relationship between the image spacing and actual physics spacing of second camera shooting;
According to the parameter matrix, the partial orbit image, determine interorbital away from.
Second aspect, the embodiment of the present application also provide a kind of gauge detection device, comprising: acquisition module, for acquiring rail
Road image, the orbital image include orbital region characteristics of image and non-orbital region characteristics of image;
Extraction module, for the Pixel Information based on each of orbital image pixel, from the trajectory diagram
As in extract include the orbital region characteristics of image partial orbit image;
Determining module, for be based on the partial orbit image, determine interorbital away from.
In conjunction with second aspect, the embodiment of the present application provides the first possible embodiment of second aspect, wherein institute
State orbital image include by first camera acquire the first orbital image, and, pass through second camera acquisition the second orbital image;
Wherein, the first orbital image includes the orbital region characteristics of image of the first track and the orbital region of non-first track
Characteristics of image;
Second orbital image includes the orbital region characteristics of image of the second track and the orbital region of non-second track
Characteristics of image.
In conjunction with the possible embodiment of the first of second aspect or second aspect, the embodiment of the present application provides second party
The possible embodiment of second of face, wherein the Pixel Information includes gray value;
The extraction module, in the Pixel Information based on each of orbital image pixel, from the track
It extracts when including the partial orbit image of the orbital region characteristics of image, is specifically used in image:
The orbital image is converted into gray level image;
Selection meets the selected gray value of preset condition from the gray value for each pixel that the gray level image includes;
From the difference filtered out in each pixel that the gray level image includes between gray value and the selected gray value
Selected pixel within a preset range;
According to the selected pixel, the partial orbit image is determined.
In conjunction with second of possible embodiment of second aspect, the embodiment of the present application provides the third of second aspect
Possible embodiment, wherein described device further include:
Processing module, for extracted from the orbital image include the orbital region characteristics of image part
After orbital image, according at least one of following operations, noise reduction and micronization processes are carried out to the partial orbit image:
Opening operation, closed operation, dilation operation, erosion operation.
In conjunction with the first possible embodiment of second aspect, the embodiment of the present application provides the 4th kind of second aspect
Possible embodiment, wherein the determining module is being based on the partial orbit image, determine interorbital away from when, it is specific to use
In:
Obtain the pitch information between the first camera and the second camera;
Determine that parameter matrix, the parameter matrix pass through the first camera and institute for describing according to the pitch information
State the relationship between the image spacing and actual physics spacing of second camera shooting;
According to the parameter matrix, the partial orbit image, determine interorbital away from.
The third aspect, the embodiment of the present application also provide a kind of electronic equipment, comprising: processor, memory and bus, it is described
Memory is stored with the executable machine readable instructions of the processor, when electronic equipment operation, the processor with it is described
By bus communication between memory, the machine readable instructions executed when being executed by the processor it is above-mentioned in a first aspect, or
Step in any possible embodiment of first aspect.
Fourth aspect, the embodiment of the present application also provide a kind of computer readable storage medium, the computer-readable storage medium
Computer program is stored in matter, which executes above-mentioned in a first aspect, or first aspect times when being run by processor
A kind of step in possible embodiment.
Gauge detection method and device provided by the embodiments of the present application include orbital region characteristics of image and non-by acquisition
The orbital image of orbital region characteristics of image is then based on the analog information of each of orbital image pixel, from track
Extracted in image include orbital region characteristics of image partial orbit image, finally be based on partial orbit image, determine rail
Road spacing.Partial orbit image is extracted from orbital image, then in such a way that partial orbit image obtains gauge, is avoided
Directly to carry out orbital image identification and obtain during gauge because identify precisely caused by error, improve gauge inspection
The accuracy of survey, and a variety of different application scenarios are suitable for the processing of orbital image, avoid different application scene lower threshold value
The process of adjustment improves the efficiency of gauge detection.
To enable the above objects, features, and advantages of the application to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate
Appended attached drawing, is described in detail below.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in the embodiment attached
Figure is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore is not construed as pair
The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this
A little attached drawings obtain other relevant attached drawings.
Fig. 1 shows a kind of flow diagram of gauge detection method provided by the embodiment of the present application;
Fig. 2 shows a kind of flow charts of the method for partial orbit image zooming-out provided by the embodiment of the present application;
Fig. 3 shows a kind of erosion operation effect diagram provided by the embodiment of the present application;
Fig. 4 shows a kind of dilation operation effect diagram provided by the embodiment of the present application;
Fig. 5 shows a kind of opening operation effect diagram provided by the embodiment of the present application;
Fig. 6 shows a kind of closed operation effect diagram provided by the embodiment of the present application;
Fig. 7 shows a kind of schematic diagram of the method for two-value projection provided by the embodiment of the present application;
Fig. 8 shows a kind of track bianry image perspective view provided by the embodiment of the present application;
Fig. 9 shows a kind of configuration diagram of gauge detection device 900 provided by the embodiment of the present application;
Figure 10 shows the structural schematic diagram of a kind of electronic equipment 1000 provided by the embodiment of the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application
Middle attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only
It is some embodiments of the present application, instead of all the embodiments.The application being usually described and illustrated herein in the accompanying drawings is real
The component for applying example can be arranged and be designed with a variety of different configurations.Therefore, below to the application's provided in the accompanying drawings
The detailed description of embodiment is not intended to limit claimed scope of the present application, but is merely representative of the selected reality of the application
Apply example.Based on embodiments herein, those skilled in the art institute obtained without making creative work
There are other embodiments, shall fall in the protection scope of this application.
In view of existing gauge detection method is influenced by detection environment, calculated gauge accuracy is lower, is based on
This, the embodiment of the present application provides a kind of gauge detection method and device, is described below by embodiment.
Method provided herein can be applied in gauge detection device, wherein gauge detection device includes at least
One camera, at least one camera under the control of a processor, acquisition trajectory image;Processor is acquired according at least one camera
Orbital image, determine gauge.In the embodiment of another possibility, gauge detection device can also include that light source emits
Device, the light for emitting particular color irradiate in orbit, at least one camera can add optical filter, only permission and light
The identical light of color of transmitter transmitting is by camera lens, at least one camera is in acquisition trajectory image, only light
The ground of irradiation can show that for processor when determining gauge according to orbital image, accuracy is higher on in-orbit road image.
For convenient for understanding the present embodiment, first to a kind of gauge detection method disclosed in the embodiment of the present application into
Row is discussed in detail.
Embodiment one
The executing subject of the application is gauge detection device, shown in Figure 1, is a kind of rail provided by the embodiments of the present application
The flow diagram of distance detecting method, comprising the following steps:
S101, acquisition trajectory image.
Wherein, orbital image includes orbital region characteristics of image and non-orbital region characteristics of image.In acquisition trajectory figure
When picture, the first orbital image can be acquired by the first camera in gauge detection device;And by gauge detection device
Second camera acquire the second orbital image, the first orbital image includes the orbital region characteristics of image and non-first of the first track
The orbital region characteristics of image of track, the second orbital image include the orbital region characteristics of image and non-second track of the second track
Orbital region characteristics of image.
Because the spacing between two tracks is wider in track detecting, such as the spacing between certain tracks can reach
To 1.5 meters, if be easy to causeing rail flanges unintelligible, to cause by an image of the camera shooting comprising two tracks
Gauge measuring accuracy reduces, and therefore, in order to improve the accuracy of gauge measurement, acquires two tracks using two cameras respectively
Image, orbital image edge can be made to be more clear in this way, when carrying out edge division, more accurate, the gauge detected
Also just more accurate.
In a kind of possible embodiment, light source emitter can be configured in gauge detection device.To adapt to not
Same detection environment can control the irradiation of light source emitter transmitting light in orbit, if detection ring before acquisition trajectory image
Border is in tunnel, and due to the dark in tunnel, the orbital image that acquisition has light to irradiate is more advantageous to carry out orbital region
The extraction of characteristics of image.Furthermore it is also possible to add optical filter to first camera and second camera, only allow particular light ray by the
The optical lens of one camera and second camera, such as can add on the camera lens of first camera and second camera and only allow
The optical filter that green light passes through only allows green light by the camera lens of first camera and second camera, then in acquisition trajectory image,
The light of light source emitter transmitting can be set as green light, first camera and second camera after acquiring the image, only there is green light
The part of irradiation may be displayed on image, so either in tunnel or outside tunnel, only have green light in the image of acquisition
The image of irradiation is more advantageous to the extraction for carrying out partial orbit image.
It in specific implementation, only irradiating in orbit, can may also be shone because of reasons such as light scatterings because not can guarantee light source
It penetrates around track, therefore, in the orbital image of acquisition, in addition to track, it is also possible to comprising the environment around track, therefore, need
The orbital image of acquisition is further processed, the method specifically handled will be unfolded to illustrate in step s 102.
S102, the Pixel Information based on each of orbital image pixel, extract from orbital image and include
The partial orbit image of orbital region characteristics of image.
Wherein, Pixel Information includes gray value.
When extraction includes the partial orbit image of orbital region characteristics of image from orbital image, it is referred to Fig. 2
Shown in method, comprising the following steps:
S201, orbital image is converted into gray level image.
It is color image by the collected orbital image of camera, in an example, in order to extract local rail according to gray value
Colored orbital image first can be converted to gray level image by road image.
Color image by red, green, three Color Channels of yellow variation and they mutual be superimposed
It arrives, by adjusting the display of Color Channel, color image can be made to be converted into the gray level image of different gray values.
In one example, when converting gray level image for colored orbital image, adjustable Color Channel is single channel, so
Display passes through single pass each pixel afterwards.Each pixel of color image can be presented after single channel it is different
Gray value, the available gray level image comprising different gray-value pixel points.
It is color image by the image that camera acquires, after being converted into gray level image, gray value be will be different, but be had
The gray value of the track of light source irradiation is close, therefore can extract from orbital image according to the difference of gray value and include
The partial orbit image of orbital region characteristics of image.
In the embodiment of another possibility, when acquiring information to track, because orbital environment is more complicated, adopt
Collect color image out may clarity it is lower, therefore image can also be acquired by extraordinary camera, which can be
Light source emitter is arranged in camera internal, substitutes the light source emitter in the present embodiment in gauge detection device.Pass through the special type phase
When machine acquisition trajectory image, active light source can be emitted by the light source emitter of camera control camera internal, and it is possible to directly
The gray level image for connecting the special type camera acquisition trajectory, avoids color image from being converted into the process of gray level image.
S202, selection meets the selected gray value of preset condition from the gray value for each pixel that gray level image includes.
Wherein, preset condition can be gray value highest.Gray value highest in gray level image is determined as selected gray scale
Value.
S203, difference between gray value and selected gray value is filtered out from each pixel that gray level image includes pre-
If the selected pixel in range.
After colored orbital image is converted into gray level image, there is the gray value of the rail portion of light direct irradiation higher,
Can by from the difference screened in each pixel that gray level image is included between gray value and selected gray value in default model
Enclose interior selected pixel, wherein selected pixel is largely corresponding in color image the pixel for the track for having light to irradiate
Point.
S204, basis select pixel, determine partial orbit image.
Because image is made of multiple pixels, selected pixel is filtered out from each pixel that gray level image includes
Later, partial orbit image can be determined by selected pixel.
In specific implementation, selected pixel might have part and be not representing the pixel of track, alternatively, there is part expression
The pixel of track is not determined to selected pixel, therefore, can by but at least one of be not limited only to following operations,
Noise reduction and micronization processes are carried out to local orbital image:
Opening operation, closed operation, dilation operation, erosion operation.
Wherein, opening operation, closed operation, dilation operation, erosion operation are all at the morphological images applied to bianry image
Reason method, therefore before carrying out noise reduction and micronization processes to local orbital image, it can also first convert partial orbit image to
Bianry image.
In specific implementation, erosion operation can eliminate boundary point, shrink boundary internally, can eliminate small and meaningless
Point, such as the pixel at edge in bianry image can be eliminated, so that the edge of bianry image is more clear.
As shown in figure 3, being respectively the bianry image without erosion operation and the bianry image by erosion operation, corrosion
Operation can eliminate edge pixel point, but may change the size of bianry image.
Dilation operation is all background dots contacted with object can be merged into the object, expands outwardly boundary
Process can be used to fill up the cavity in object, for example, can fill in the corresponding bianry image of partial orbit image for table
Show point empty in the part of track.
As shown in figure 4, being respectively the bianry image without dilation operation and the bianry image by dilation operation, expansion
Operation can eliminate the point of image interior void, but may also can expand at the edge of bianry image, accordingly, it is possible to change two
It is worth the size of image.
Opening operation is one and first corrodes the process expanded afterwards, and main function is similar to corrosion, can compared with erosion operation
To keep the original size of target constant substantially.
As shown in figure 5, being respectively the bianry image without opening operation and the bianry image by opening operation, opening operation can
While eliminating edge pixel point, to keep the size of former bianry image not change.
Closed operation is the operation for first expanding post-etching, is used to minuscule hole in filler body, connection approaching object, puts down
It is not obvious while its sliding boundary and changes its area.
As shown in fig. 6, being respectively without the bianry image of closed operation and the bianry image Jing Guo closed operation, closed operation can
While eliminating image interior void, to keep the size of former bianry image not change.
By aforesaid operations, sharp-edged bianry image corresponding to partial orbit image can be obtained.
In specific implementation, can using a camera come acquisition trajectory image, but because interorbital away from larger, using one
The orbital image rail flanges of a camera acquisition may be unintelligible, therefore in a kind of possible embodiment, can be using the
One camera acquires the first orbital image, and second camera acquires the second orbital image.
Further, the second orbital image of the first orbital image and second camera acquisition that first camera can be acquired
The processing for passing through step S102 respectively, respectively obtains sharp-edged first bianry image for indicating the first track and expression
Sharp-edged second bianry image of second track determines first then according to the first bianry image and the second bianry image
Interorbital between track and the second track away from.
S103, be based on partial orbit image, determine interorbital away from.
In the example of the application, by way of binocular ranging, the gauge between track is determined, described in detail below:
It is possible, firstly, to obtain the pitch information between first camera and second camera;Then according to first camera and second
Pitch information between camera determines parameter matrix, and wherein parameter matrix is clapped for describing by first camera and second camera
Relationship between the image spacing taken the photograph and actual physics spacing;Finally according to the first trajectory diagram after parameter matrix, edge segmentation
The second orbital image after picture and edge segmentation, determines the gauge between track.
In specific implementation, the first coordinate system can be established between first camera and second camera, such as can be with first
Camera is the origin of the first coordinate system, and the position of second camera is then determined in the first coordinate system;And according to second camera
Position determines parameter matrix, wherein parameter matrix be used for describe by first camera and second camera shooting image spacing and
Relationship between actual physics spacing.
After obtaining parameter matrix, the second coordinate system is established further according to parameter matrix, by the first bianry image and the second two-value
Image, which respectively corresponds, is added to the second coordinate system, and obtains the first bianry image and the second bianry image middle orbit edge respectively
The coordinate of pixel determines then according to the coordinate of the pixel of the rail flanges of the first bianry image and the second bianry image
Under the second coordinate system, the first gauge between the first track and the second track obtains the first gauge pair further according to parameter matrix
The practical gauge answered.
It, can also be by the first bianry image and the second bianry image according to transverse direction in the embodiment of another possibility
Binaryzation projection is carried out with longitudinal mode, as shown in fig. 7, the schematic diagram of the method for two-value projection.
In bianry image, the pixel value of image only has 0 or 1, as first figure is bianry image, second figure in Fig. 7
For the image for obtaining bianry image progress transverse projection, third figure is the figure for obtaining bianry image progress longitudinal projection
Picture, if the value that pixel is 1 in a certain transverse direction is more, can obtain one by taking transverse projection as an example in corresponding projected image
A projection peak value.
It is shown in Figure 8, if the image of the top Fig. 8 is the bianry image of partial orbit image, wherein may include
The noise jamming that can not be eliminated, Fig. 8 following image are after the bianry image of partial orbit image to be carried out to binaryzation projection
Image, it can be seen that indicate track part there is projection peak value.By the first bianry image and the second bianry image point
Not after two-value projects, indicate that the part of track will appear two peak values, the edge of peak value can indicate rail flanges, then
The first bianry image and the second bianry image after binaryzation is projected, which respectively correspond, to be added in the second coordinate system, and determines two
The coordinate at a peak value edge, by calculating the distance between two peak value edges, determine under the second coordinate system two tracks it
Between the first gauge obtain the corresponding practical gauge of the first gauge then according to parameter matrix.
Method provided by the embodiment of the present application includes orbital region characteristics of image and non-orbital region image by acquisition
The orbital image of feature is then based on the analog information of each of orbital image pixel, extracts from orbital image
Include the partial orbit image of orbital region characteristics of image, finally be based on partial orbit image, determine interorbital away from.From track
Partial orbit image is extracted in image, then in such a way that partial orbit image obtains gauge, is avoided directly to progress rail
Road image recognition and during obtaining gauge because identify precisely caused by error, improve the accuracy of gauge detection,
And a variety of different application scenarios are suitable for the processing of orbital image, the process for avoiding different application scene lower threshold value from adjusting,
Improve the efficiency of gauge detection.
Embodiment two
The embodiment of the present application provides a kind of gauge detection device, shown in Figure 9, is rail provided by the embodiments of the present application
The configuration diagram of device for detecting distance 900, the device 900 include: acquisition module 901, extraction module 902 and determining module
903, specific:
Acquisition module 901 is used for acquisition trajectory image, and the orbital image includes orbital region characteristics of image and non-track
Area image feature;
Extraction module 902, for the Pixel Information based on each of orbital image pixel, from the track
Extracted in image include the orbital region characteristics of image partial orbit image;
Determining module 903, for be based on the partial orbit image, determine interorbital away from.
In a kind of possible design, the orbital image include the first orbital image is acquired by first camera, and, it is logical
It crosses second camera and acquires the second orbital image;
Wherein, the first orbital image includes the orbital region characteristics of image of the first track and the orbital region of non-first track
Characteristics of image;
Second orbital image includes the orbital region characteristics of image of the second track and the orbital region of non-second track
Characteristics of image.
In a kind of possible design, the Pixel Information includes gray value;
The extraction module 902, in the Pixel Information based on each of orbital image pixel, from the rail
It extracts when including the partial orbit image of the orbital region characteristics of image, is specifically used in road image:
The orbital image is converted into gray level image;
Selection meets the selected gray value of preset condition from the gray value for each pixel that the gray level image includes;
From the difference filtered out in each pixel that the gray level image includes between gray value and the selected gray value
Selected pixel within a preset range;
According to the selected pixel, the orbit information image is determined.
In a kind of possible design, described device further include:
Processing module 904, for including the orbital region characteristics of image being extracted from the orbital image
After partial orbit image, according at least one of following operations, noise reduction and micronization processes are carried out to the partial orbit image:
Opening operation, closed operation, dilation operation, erosion operation.
In a kind of possible design, the determining module 903 is being based on the partial orbit image, determine interorbital away from
When, it is specifically used for:
Obtain the pitch information between the first camera and the second camera;
Determine that parameter matrix, the parameter matrix pass through the first camera and institute for describing according to the pitch information
State the relationship between the image spacing and actual physics spacing of second camera shooting;
According to the parameter matrix, the partial orbit image, determine interorbital away from.
By device provided by the embodiments of the present application, can acquire including orbital region characteristics of image and non-orbital region figure
As the orbital image of feature, it is then based on the analog information of each of orbital image pixel, is extracted from orbital image
Out include the partial orbit image of orbital region characteristics of image, finally be based on partial orbit image, determine interorbital away from.From rail
Partial orbit image is extracted in road image, then in such a way that partial orbit image obtains gauge, is avoided directly to progress
Orbital image identify and obtain during gauge because identify precisely caused by error, improve the accurate of gauge detection
Degree, and a variety of different application scenarios are suitable for the processing of orbital image, the mistake for avoiding different application scene lower threshold value from adjusting
Journey improves the efficiency of gauge detection.
Embodiment three
It as shown in Figure 10, is the structural schematic diagram of a kind of electronic equipment 1000 provided by the embodiment of the present application three, comprising:
Processor 1001, memory 1002 and bus 1004;
Above-mentioned memory 1002 is stored with the executable machine readable instructions of above-mentioned processor 1001 (for example, including in Fig. 9
Acquisition module 901, extraction module 902 and determining module 903 is corresponding executes instruction), when electronic equipment 1000 is run
When, it is communicated between above-mentioned processor 1001 and above-mentioned memory 1002 by bus 1004, above-mentioned machine readable instructions are above-mentioned
Following processing is executed when processor 1001 executes:
Acquisition trajectory image, the orbital image include orbital region characteristics of image and non-orbital region characteristics of image;
Based on the Pixel Information of each of orbital image pixel, is extracted from the orbital image and include
There is the partial orbit image of the orbital region characteristics of image;
Based on the partial orbit image, determine interorbital away from.
Optionally, in the processing that processor 1002 executes, the orbital image includes acquiring the first rail by first camera
Road image, and, the second orbital image is acquired by second camera;
Wherein, the first orbital image includes the orbital region characteristics of image of the first track and the orbital region of non-first track
Characteristics of image;
Second orbital image includes the orbital region characteristics of image of the second track and the orbital region of non-second track
Characteristics of image.
Optionally, in the processing that processor 1002 executes, the Pixel Information includes gray value;
The Pixel Information based on each of orbital image pixel, extracts from the orbital image
Include the partial orbit image of the orbital region characteristics of image, specifically include:
The orbital image is converted into gray level image;
Selection meets the selected gray value of preset condition from the gray value for each pixel that the gray level image includes;
From the difference filtered out in each pixel that the gray level image includes between gray value and the selected gray value
Selected pixel within a preset range;
According to the selected pixel, the partial orbit image is determined.
It optionally, include the track being extracted from the orbital image in the processing that processor 1002 executes
After the partial orbit image of area image feature, further includes:
According at least one of following operations, noise reduction and micronization processes are carried out to the partial orbit image:
Opening operation, closed operation, dilation operation, erosion operation.
Optionally, processor 1002 execute processing in, it is described be based on the partial orbit image, determine interorbital away from,
It specifically includes:
Obtain the pitch information between the first camera and the second camera;
Determine that parameter matrix, the parameter matrix pass through the first camera and institute for describing according to the pitch information
State the relationship between the image spacing and actual physics spacing of second camera shooting;
According to the parameter matrix, the partial orbit image, determine interorbital away from.
Example IV
The embodiment of the present application also provides a kind of computer readable storage medium, is stored on the computer readable storage medium
Computer program, the computer program execute any of the above-described gauge detection method as described in the examples when being run by processor
Step.
Specifically, which can be general storage medium, such as mobile disk, hard disk, on the storage medium
Computer program when being run, the step of being able to carry out above-mentioned gauge detection method, to be suitable for the rail under varying environment
Away from detection, the accuracy of gauge detection is improved.
The computer program product of gauge detection method is carried out provided by the embodiment of the present application, including stores processor
The computer readable storage medium of executable non-volatile program code, the instruction that said program code includes can be used for executing
Previous methods method as described in the examples, specific implementation can be found in embodiment of the method, and details are not described herein.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed systems, devices and methods, it can be with
It realizes by another way.The apparatus embodiments described above are merely exemplary, for example, the division of the unit,
Only a kind of logical function partition, there may be another division manner in actual implementation, in another example, multiple units or components can
To combine or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or beg for
The mutual coupling, direct-coupling or communication connection of opinion can be through some communication interfaces, device or unit it is indirect
Coupling or communication connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product
It is stored in the executable non-volatile computer-readable storage medium of a processor.Based on this understanding, the application
Technical solution substantially the part of the part that contributes to existing technology or the technical solution can be with software in other words
The form of product embodies, which is stored in a storage medium, including some instructions use so that
One computer equipment (can be personal computer, server or the network equipment etc.) executes each embodiment institute of the application
State all or part of the steps of method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read-Only
Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. is various to deposit
Store up the medium of program code.
Finally, it should be noted that embodiment described above, the only specific embodiment of the application, to illustrate the application
Technical solution, rather than its limitations, the protection scope of the application is not limited thereto, although with reference to the foregoing embodiments to this Shen
It please be described in detail, those skilled in the art should understand that: anyone skilled in the art
Within the technical scope of the present application, it can still modify to technical solution documented by previous embodiment or can be light
It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make
The essence of corresponding technical solution is detached from the spirit and scope of the embodiment of the present application technical solution, should all cover the protection in the application
Within the scope of.Therefore, the protection scope of the application shall be subject to the protection scope of the claim.