Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application section Example is further elaborated.It should be appreciated that specific embodiment described herein is only to explain
The application is not used to limit the application.However, it will be understood by those skilled in the art that the application each implementation
In example, in order to make the reader understand this application better, many technical details are proposed.But even if without these technical details
With the various changes and modifications based on following embodiment, the application technical solution claimed also may be implemented.
The first embodiment of the application is related to a kind of method of map load, and the method for map load can be adapted for adopting
With the electronic equipment of VSLAM technology building map, such as automatic driving vehicle, intelligent robot.The method of map load, tool
Body process is as shown in Figure 1:
Step 101: obtaining the current image data of environment.
Specifically, image data of the sensor acquisition environment at current time can be used e.g. to obtain by camera
Image data of the environment at current time includes M images in image data, and M is the integer greater than 1, the bat in multiple images
It takes the photograph content and covers the wider array of region of the environment.For example, it is assumed that environment is outdoor gymnasium, can be shot every 1 meter of distance
The gymnasium gets the image in 5 gymnasium in present period (assuming that a period shoots 5 images), then will shooting
5 gymnasium image as the gymnasium current time image data.It is understood that wide-angle lens can be used
Head, so that the content of shooting for including in the image of shooting is abundant, is not limited with increasing the range of camera shooting in the present embodiment
The type of camera.
In one concrete implementation, before obtaining the current image data of environment, need to construct the environment positioningly
Figure, and determine the positioning map and the corresponding relationship of period of the environment, and determine the Lighting information and pair of period of the environment
It should be related to, specific process is as shown in Figure 2.
Step 2011: in the image data of the day part acquisition environment in N number of period, N is the integer greater than 0.
Specifically, it can be divided into m period by one day, each period includes m period, and m is greater than 1
Integer, wherein N number of period can be continuous N number of period, be also possible to discontinuous N number of period, the present embodiment is with continuous
It is illustrated for N number of period.
In one concrete implementation, the image data of the environment is acquired in the same period in continuous N number of period, N is greater than 0
Integer;Acquire M images of the environment according to pre-determined distance interval respectively within each period, M is the integer greater than 1.
Specifically, no matter environment to be collected is indoor environment or outdoor environment, the intensity of illumination of the environment be with
The variation of time and change.For example, intensity of illumination of the road on daytime is greater than if environment to be collected is the road in park
Intensity of illumination of the road at night.It can be divided into m period by one day, m is the integer greater than 1, for example, m is 2, i.e., will
It is divided within one day two periods, respectively daytime period and the period in the evening;And the ring continuously is acquired in the same period in N number of period
The image data in border, as: the road image data of section and the park during the day for can be continuous 10 days acquisition parks
The image data of road period at night.
The image data that the environment is acquired in the same period in continuous N number of period, improves the positioning of period Yu the environment
The accuracy of corresponding relationship and the accuracy of period and Lighting information corresponding relationship between map.
M images of the environment are acquired according to pre-determined distance interval within each period, for example, if one sport of acquisition
The image data of shop section during the day can acquire the image in the gymnasium every 1 meter, the gymnasium always be obtained and working as
The M images of preceding locating period, the visual angle that M can be shot according to the size and camera in the gymnasium determines, certainly, for structure
The accuracy for the map built can reduce the pre-determined distance of acquisition.
Step 2012: respectively according to the image data that each period collects, the positioning map of constructing environment and determination
The corresponding relationship of the positioning map of period and environment.
Specifically, by VSLAM technology, the environment is constructed positioningly while acquiring the image data of the environment
Figure, and when the positioning map of the environment constructs completion, establish the corresponding relationship of the positioning map and period.For example,
The t1 period acquires the image data in gymnasium, positioning of the positioning map for using VSLAM technology to construct using " t1 " as the building
The mark of map, to establish the corresponding relationship between period and positioning map.It is understood that other can also be used
Mode establish the positioning map of the environment and the corresponding relationship of period, certainly, the period is corresponding with the positioning map of the environment
The form of relationship can be will not enumerate in the present embodiment with other modes.
Step 2013: respectively according to the image data that each period collects, it is respectively right in different periods to calculate environment
The second Lighting information answered.
Specifically, Lighting information can be the brightness value or gray value of the image collected, in the present embodiment
Using brightness value as Lighting information.
In one concrete implementation, the environment is calculated in the treatment process of a period corresponding second Lighting information are as follows:
According to the image data that the same period in N number of period collects, determine that the environment is respectively corresponded in the same period in N number of period
Third Lighting information;Respectively according to the image data that each period collects, determine the environment in the same a period of time in N number of period
The corresponding third Lighting information of section;Environment is calculated in same period corresponding third Lighting information in N number of period
Average value;And using the average value of third Lighting information as environment in corresponding second Lighting information of same period.Wherein, for
The image data that the same period in each period collects is handled as follows: it is respectively right to calculate M images in the period
The average value for the 4th Lighting information answered;And using the average value of the 4th Lighting information as environment a cycle the same period
Corresponding third Lighting information.Corresponding 4th Lighting information of one image is the pixel sum for including according to image and every
The Lighting information of one pixel, which calculates, to be determined.
It will be described in detail below and calculate environment in the process of corresponding second Lighting information of different periods.
With one day for a cycle, and it being divided into m period by one day, the M of each period acquisition environment opens images,
In, the image for including in image data is with sequence Pij mark, and i indicates that number of days, j indicate the serial number of period, and total number of days of acquisition is
N days.The calculating formula such as formula 2.1 of the corresponding 4th Lighting information h0 of so image Pij:
Wherein, f (x, y) is expressed as the Lighting information of each pixel of the image, i.e., the pixel value of each pixel, and B is
Pixel that the image includes sum, δ indicate one level off to zero positive nonzero number, e.g., 0.001, δ is for preventing to ask
The calculated result of logarithm tends to bear infinite situation.By formula 2.1, the corresponding 4th illumination letter of image Pij can be calculated
Breath.
Calculate the average value of M corresponding 4th Lighting informations of image in each period, it may be assumed that
Wherein, hij indicates the environment in the Lighting information of one day j period of serial number i, and as the environment is in a week
The a period corresponding third Lighting information of phase.
The environment is calculated in the average value of corresponding third Lighting information of same period in N number of period, that is,
HjIndicate the environment in corresponding second Lighting information of same period j.
Similarly, according to formula 2.1, formula 2.2 and formula 2.3 can be calculated the environment other day parts respectively
Corresponding second Lighting information.
Step 102: according to the current image data of environment, calculating current corresponding first Lighting information of environment.
One in the specific implementation, the current image data of environment includes M images, calculates separately the current image of the environment
Corresponding 4th Lighting information of each image in data;The environment is determined according to corresponding 4th Lighting information of each image
Current corresponding first Lighting information.
Specifically, the process of corresponding 4th Lighting information of each image in the current image data of the environment is calculated
It is roughly the same with the process of step 2013, i.e., each can be calculated in the current image data of the environment by formula 2.1
Corresponding 4th Lighting information of image, specific calculating process repeat no more.The current image data of the environment will be calculated
In the 4th Lighting information of each image bring formula 2.2 into the environment can be obtained in current corresponding first Lighting information.
Step 103: according to the first Lighting information, determining that the environment is presently in the period.
In one concrete implementation, by the first Lighting information respectively with the environment in corresponding second light of different periods
It is made the difference according to information, the period which is presently in is determined according to difference result.
Specifically, the first Lighting information is done with the environment in corresponding second Lighting information of different periods respectively
Difference, the period that the smallest difference result corresponding period is presently in as the environment.Wherein, the first Lighting information and the ring
Border is as follows in the mode that a period corresponding second Lighting information makes the difference:
HjIt is expressed as the environment second Lighting information corresponding to the j period,Indicate current the first illumination letter of the environment
Breath, selects the smallest j value, that is, can determine that the difference corresponding period.
Step 104: being presently in the corresponding relationship of period and period and positioning map according to the environment, determine to be loaded
Positioning map and load positioning map.
In terms of existing technologies, it is determined in the application section Example by the first Lighting information that environment is current
The period that the environment is presently in out may thereby determine that out and be presently in period corresponding positioning map with the environment.Due to
Period locating for illumination variation in environment and the environment, there are corresponding relationship, positioning map and periods there is also corresponding relationship, because
And first Lighting information current by environment, it can accurately determine out corresponding with the first current Lighting information of the environment
Positioning map, so that even if can also accurately determine positioning map in the case where the current illumination of the environment changes,
To ensure that the illumination of the positioning map currently loaded and the environment are small in the illumination difference of present period, even without illumination
Difference improves the success rate and accuracy rate of the framing to captured in real-time.
The second embodiment of the application is related to a kind of method of map load, second embodiment and first embodiment substantially phase
Together, it is in place of the main distinction, the present embodiment is before obtaining the current image data of environment without being acquired according to different periods
Obtained image data calculates the environment in corresponding second Lighting information of different periods.The present embodiment applies to have light
According in the environment of device, specific process is as shown in Figure 3:
Step 301: obtaining the current image data of environment.
Specifically, the step is roughly the same with the step 101 in first embodiment, is no longer repeated herein.
It should be noted that need to construct the positioning map of the environment before obtaining the current image data of the environment,
And determine the positioning map and the corresponding relationship of period of the environment, specific process is as shown in Figure 4:
Step 4011: in the image data of the day part acquisition environment in N number of period, N is the integer greater than 0.
Step 4012: respectively according to the image data that each period collects, the positioning map of constructing environment and determination
The corresponding relationship of the positioning map of period and environment.
Step 4011 and step 4012 in first embodiment step 2011 and step 2012 it is roughly the same, herein will not
It repeats again.
Step 302: according to the current M of the environment images, the current M of environment-identification opens the illumination apparatus in images.
Specifically, the current image data of the environment includes M images, and M is the integer greater than 1;Using deep learning
Mode, obtain the characteristic point in M images, identify the illumination apparatus in each image.Illumination apparatus includes various patterns
Lamp.
Step 303: calculating illumination apparatus in the current M of the environment images in any image or the illumination apparatus is pre-
If the 5th Lighting information in range, and the 5th illumination in the illumination apparatus of calculating or the illumination apparatus preset range is believed
Breath is as current corresponding first Lighting information of environment.
Specifically, the 5th Lighting information for calculating illumination apparatus in any image in the current M of the environment images, should
The calculation of 5th Lighting information h1 can be with reference formula 2.1, such as:Wherein, W is
Total pixel that illumination apparatus includes in the image, f (x, y) indicate the pixel value of the pixel of illumination apparatus in the image.It can
It, can also be in such a way that other calculate Lighting information with understanding.
Alternatively, calculating the 5th illumination in the current M of the environment images in any image in illumination apparatus preset range
Information, wherein illumination apparatus preset range can be centered on the mass center of illumination apparatus in the image, be half with presetted pixel
The region of diameter is also possible to other regions around illumination apparatus.For example, being with 8 pixels centered on the mass center of fluorescent lamp
The border circular areas of radius is as the fluorescent lamp preset range.Calculate the mode of the 5th Lighting information in illumination apparatus preset range
Roughly the same with the calculation of the 5th Lighting information of above-mentioned illumination apparatus, details are not described herein again.
Step 304: judging whether the 5th Lighting information in illumination apparatus or illumination apparatus preset range is more than default
Otherwise illumination threshold value, executes step 306 if so, thening follow the steps 305.
Specifically, different periods include daytime period and the period in the evening, and presetting illumination threshold value can be according to illumination apparatus
The Lighting information of section and Lighting information determine the period in the evening during the day.If illumination apparatus or illumination apparatus preset range
The 5th interior Lighting information is more than default illumination threshold value, then shows that illumination apparatus is opened, the illumination apparatus or the illumination apparatus
Illumination in preset range is partially bright, brightness value is high, that is, can determine that the environment is currently at the period in the evening, if illumination apparatus or light
It is less than default illumination threshold value according to the 5th Lighting information in device preset range, then shows that illumination apparatus is not opened, illumination dress
Set or the illumination apparatus preset range in illumination it is partially dark, brightness value is low, that is, can determine that the environment is currently at daytime period.
Step 305: determining that the environment is currently at the period in the evening.
Step 306: determining that the environment is currently at daytime period.
Step 307: being presently in the corresponding relationship of period and period and positioning map according to the environment, determine to be loaded
Positioning map and load positioning map.
Compared with prior art, the method for map provided in this embodiment load, in environment-identification current image date
Illumination apparatus, and believed according to the 5th illumination in the 5th Lighting information or illumination apparatus preset range of the illumination apparatus of identification
Breath, judges whether illumination apparatus is opened, so that it is determined that going out the period that the environment is presently in, and then determines current with the environment
Corresponding positioning map, this method only needs to calculate the 5th Lighting information in illumination apparatus or illumination apparatus preset range, meter
It calculates and judgement is simple, processing speed is fast, allows to quickly and accurately determine the positioning map of the environment.
The 3rd embodiment of the application is related to a kind of device 50 of map load, comprising: obtains module 501, first and determines
Module 502, the second determining module 503 and map loading module 504;The device specific structure of map load is as shown in Figure 5:
Module 501 is obtained for obtaining the current image data of environment;First determining module 502 is used for current according to environment
Image data, calculate current corresponding first Lighting information of environment;Second determining module 503 is used to be believed according to the first illumination
Breath, determines that environment is presently in the period;Map loading module 504 is used to be presently in period and period and positioning according to environment
The corresponding relationship of map determines positioning map to be loaded and loads positioning map.
The present embodiment is virtual bench embodiment corresponding with the method for above-mentioned map load, skill in above method embodiment
Art details is still applicable in the present embodiment, and details are not described herein again.
It should be noted that devices discussed above embodiment is only schematical, not to the protection model of the application
Enclose composition limit, in practical applications, those skilled in the art can select according to the actual needs part therein or
Whole modules achieve the purpose of the solution of this embodiment, herein with no restrictions.
The fourth embodiment of the application is related to a kind of electronic equipment, and structure is as shown in Figure 6.It include: at least one processing
Device 601;And the memory 602 with the communication connection of at least one processor 601.Memory 602 is stored with can be by least one
The instruction that processor 601 executes.Instruction is executed by least one processor 601, so that at least one processor 601 is able to carry out
The method of above-mentioned map load.
In the present embodiment, for processor is with central processing unit (Central Processing Unit, CPU), memory
By taking readable and writable memory (Random Access Memory, RAM) as an example.Processor, memory can by bus or its
He connects mode, in Fig. 6 for being connected by bus.Memory as a kind of non-volatile computer readable storage medium storing program for executing,
It can be used for storing non-volatile software program, non-volatile computer executable program and module, in the embodiment of the present application
Positioning map is stored in memory.Processor passes through operation non-volatile software program stored in memory, instruction
And module realizes the method for above-mentioned map load thereby executing the various function application and data processing of equipment.
Memory may include storing program area and storage data area, wherein storing program area can storage program area, extremely
Application program required for a few function;It storage data area can the Save option list etc..In addition, memory may include high speed
Random access memory, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or
Other non-volatile solid state memory parts.In some embodiments, it includes remotely located relative to processor that memory is optional
Memory, these remote memories can pass through network connection to external equipment.The example of above-mentioned network is including but not limited to mutual
Networking, intranet, local area network, mobile radio communication and combinations thereof.
One or more module stores in memory, when being executed by one or more processor, executes above-mentioned
The method that map loads in any means embodiment.
The method that the load of map provided by the embodiment of the present application can be performed in the said goods, has the corresponding function of execution method
Can module and beneficial effect, the not technical detail of detailed description in the present embodiment, reference can be made to provided by the embodiment of the present application
The method of map load.
The 5th embodiment of the application is related to a kind of computer readable storage medium, which is that computer can
Storage medium is read, is stored with computer instruction in the computer readable storage medium, which enables a computer to hold
The method of the load of map involved in row the application first or second embodiment of the method.
That is, it will be understood by those skilled in the art that implement the method for the above embodiments be can be with
Relevant hardware is instructed to complete by program, which is stored in a storage medium, including some instructions are to make
It obtains an equipment (can be single-chip microcontroller, chip etc.) or processor (processor) executes side described in each embodiment of the application
The all or part of the steps of method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey
The medium of sequence code.
It will be understood by those skilled in the art that the various embodiments described above are the specific embodiments of realization the application, and
In practical applications, can to it, various changes can be made in the form and details, without departing from spirit and scope.