Summary of the invention
The invention provides a kind of vehicle-logo location method and vehicle-logo location device, the accurate position of car mark can be extracted in vehicle band mist image.
The invention provides a kind of vehicle-logo location method, comprising:
Mist elimination process is carried out to vehicle band mist image and obtains vehicle mist elimination image;
Forward car mark candidate region is extracted from described vehicle mist elimination image;
The background image removing described forward car mark candidate region obtains prospect forward car mark candidate region;
By the accurate position of Morphological scale-space determination car mark.
Describedly mist elimination process is carried out to vehicle band mist image obtain vehicle mist elimination image and preferably include:
Determine vehicle band mist iconic model: I (x)=J (x) t (x)+A (1-t (x))., wherein, x is the pixel in image, and I is automobile belt mist image; J is automobile mist elimination image, and A is atmosphere light, and t is the distribution of estimation transmissivity;
Choose brightness in the dark primary of vehicle band mist image maximum 0.1% pixel, in described pixel, the pixel that in input vehicle band mist image, intensity is maximum is defined as described A;
Carry out dark primary priori, show that the minimum value of light intensity in vehicle mist elimination image levels off to 0;
The minimum value of light intensity in described vehicle mist elimination image is utilized to calculate described t;
Described A, t are brought into described vehicle band mist iconic model and obtain vehicle mist elimination iconic model.
Describedly from described vehicle mist elimination image, extract forward car mark candidate region preferably include:
Car plate is extracted from described vehicle mist elimination image;
According to described car plate and car target position relationship determination car mark candidate region;
Utilize bilinear interpolation to carry out forward rectification to described car mark candidate region and obtain forward car mark candidate region;
Described car plate and car target position relationship comprise: described car is marked in the region of 1-3 car plate of the top of described car plate, or described car is marked in the region of 1-6 car plate of the top of described car plate.
Describedly utilize bilinear interpolation to carry out forward to described car mark candidate region to correct and obtain forward car mark candidate region and preferably include:
Utilize Binarization methods, the region binaryzation of car plate is obtained license plate binary figure;
License plate binary figure extracts horizontal edge information and forms horizontal edge figure;
Horizontal edge figure is carried out angle rotation to set interval within the scope of set angle, the horizontal projection value that after rotating, before statistics, four lines is maximum;
The anglec of rotation corresponding to described maximum horizontal projection value is defined as forward RA;
By car mark candidate region according to described forward RA, utilize bilinear interpolation to carry out rectification and obtain described forward car mark candidate region.
The background image of described removal described forward car mark candidate region obtains prospect forward car mark candidate region and preferably includes:
Gray processing is carried out to described forward car mark candidate region;
Utilize structural element to carry out an opening operation to the described forward car mark candidate region after described gray processing process, remove background image and obtain prospect forward car mark candidate region.
Describedly to be preferably included by the accurate position of Morphological scale-space determination car mark:
Binary conversion treatment is carried out to described prospect forward car mark candidate region and obtains binary map;
Determine that white connected domain is car mark target area boundaries according to binary map;
By axis split plot design, described car mark target area boundaries is split, choose the described car mark target area boundaries be on axis, and be mapped to forward car mark candidate region and obtain the described accurate position of car mark.
Describedly to be preferably included by the accurate position of Morphological scale-space determination car mark:
Morphologic edge detection is carried out to described prospect forward car mark candidate region and obtains edge image;
Described edge image is removed do not form described car target straight line obtain process image;
The region adopting mathematical morphology filter to remove dispersion obtains processing image;
Utilize watershed segmentation methods to described process Image Segmentation Using, determine the coordinate of car mark region;
From described forward car mark candidate region, the accurate position of car mark is obtained by described coordinate.
Present invention also offers a kind of vehicle-logo location device using vehicle-logo location method described in above-mentioned any one, comprising:
First processing components, obtains vehicle mist elimination image for carrying out mist elimination process to vehicle band mist image;
First extraction assembly, for extracting forward car mark candidate region from described vehicle mist elimination image;
Second extraction assembly, the background image for removing described forward car mark candidate region obtains prospect forward car mark candidate region;
3rd extraction assembly, for by the accurate position of Morphological scale-space determination car mark.
Described 3rd extraction assembly preferably includes:
Binary map securing component, obtains binary map for carrying out binary conversion treatment to described prospect forward car mark candidate region;
Car mark target area boundaries securing component, for determining that according to binary map the connected domain of white is car mark target area boundaries;
Car mark accurate position securing component, for being split described car mark target area boundaries by axis split plot design, chooses the described car mark target area boundaries be on axis, and is mapped to forward car mark candidate region and obtains the described accurate position of car mark.
Described 3rd extraction assembly preferably includes:
Edge image securing component, obtains edge image for carrying out morphologic edge detection to described prospect forward car mark candidate region;
Process image first securing component, does not form described car target straight line obtain processing image for removing on described edge image;
Process image second securing component, the prospect forward car mark candidate region for adopting mathematical morphology filter to remove dispersion obtains processing image;
Segmentation assembly, for utilizing watershed segmentation methods to described process Image Segmentation Using, determines the coordinate of car mark region;
Map component, for obtaining the accurate position of car mark by described coordinate from described forward car mark candidate region.
By the invention provides a kind of vehicle-logo location method and vehicle-logo location device, following beneficial effect can be reached:
Vehicle-logo location method of the present invention, comprising: carry out mist elimination process to vehicle band mist image and obtain vehicle mist elimination image; Forward car mark candidate region is extracted from described vehicle mist elimination image; The background image removing described forward car mark candidate region obtains prospect forward car mark candidate region; By the accurate position of Morphological scale-space determination car mark.Vehicle-logo location device is a set of hardware unit adopting above-mentioned vehicle-logo location method.Car marker tape mist image, because unintelligible accurately location car target brings difficulty, is first carried out mist elimination process and obtains vehicle mist elimination image by vehicle band mist image in this vehicle-logo location method; The sharpness of this vehicle mist elimination image and identification can being obtained for and significantly improving, then just slightly determines car mark candidate region and carries out forward further, to facilitate next step process and the degree of accuracy that improves when car mark is accurately located.Consider the impact of background on car mark region, additionally use in the method and remove the technology of background, then by various Morphological scale-space mode determination car target exact position by the method increasing the pinpoint accuracy and efficiency of car mark.
Embodiment
Carry out clear, complete description below with reference to accompanying drawing to the technical scheme of various embodiments of the present invention, obviously, described embodiment is only a part of embodiment of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, other embodiments all that those of ordinary skill in the art obtain under the prerequisite not making creative work, all belong to the scope that the present invention protects.
The invention provides a kind of vehicle-logo location method, comprising:
Mist elimination process is carried out to vehicle band mist image and obtains vehicle mist elimination image;
Forward car mark candidate region is extracted from described vehicle mist elimination image;
The background image removing described forward car mark candidate region obtains prospect forward car mark candidate region;
By the accurate position of Morphological scale-space determination car mark.
Present invention also offers a kind of vehicle-logo location device using described vehicle-logo location method, comprising:
First processing components, obtains vehicle mist elimination image for carrying out mist elimination process to vehicle band mist image;
First extraction assembly, for extracting forward car mark candidate region from described vehicle mist elimination image;
Second extraction assembly, the background image for removing described forward car mark candidate region obtains prospect forward car mark candidate region;
3rd extraction assembly, for by the accurate position of Morphological scale-space determination car mark.
Vehicle-logo location device is a set of hardware unit adopting above-mentioned vehicle-logo location method.
Vehicle band mist image, because unintelligible, accurately located car target and is brought difficulty, first car marker tape mist image is carried out mist elimination process and obtain vehicle mist elimination image in this vehicle-logo location method; The sharpness of this vehicle mist elimination image and identification can being obtained for and significantly improving, then just slightly determines car mark candidate region and carries out forward further, to facilitate next step process and the degree of accuracy that improves when car mark is accurately located.Consider the impact of background on car mark region, additionally use in the method and remove the technology of background, then by various Morphological scale-space mode determination car target exact position by the method increasing the pinpoint accuracy and efficiency of car mark.
Next, the present invention will be described in detail by a specific embodiment and carry out pinpoint method to car mark from vehicle band mist image, see Fig. 1, shown in:
Step 101, collection vehicle band mist image;
The mode gathered can by existing various methods: such as: traffic department is located on highway for detecting taking pictures of the speed of a motor vehicle; Or usually take pictures with common camera.
Step 102, carries out mist elimination process to vehicle band mist image and obtains vehicle mist elimination image;
Concrete steps are:
Determine vehicle band mist iconic model: I (x)=J (x) t (x)+A (1-t (x))., wherein, x is the pixel in image, and I is automobile belt mist image; J is automobile mist elimination image, and A is atmosphere light, and t is the distribution of estimation transmissivity;
Choose brightness in the dark primary of vehicle band mist image maximum 0.1% pixel, in described pixel, the pixel that in input vehicle band mist image, intensity is maximum is defined as described A; Can be understood as: be understood that first choose brightness in dark primary (having the dark primary of mist image) maximum 0.1% pixel, these pixels are mostly opaque.In the middle of above pixel, the pixel that in input picture I, intensity is maximum is confirmed as atmosphere light A.
Dark primary priori, show that the minimum value of light intensity in vehicle mist elimination image levels off to 0; Be understood that by the outdoor dark primary priori drawn without the observation of mist image: in the regional area of the non-sky of the overwhelming majority, certain some pixel always has at least one Color Channel and has very low value.In other words, the minimum value of this area light intensity is a very little number.Describe with formula, automobile image J contained for a width, definition:
Jc represents some Color Channels of J, and Ω (x) is one piece of square region centered by x.We observe and draw, except sky orientation, the intensity of Jdark is always very low and level off to 0.If J is outdoor without mist image, we call the dark primary of J Jdark, then, dark primary priori is the experiential regulation that above observation draws.
The minimum value of light intensity in described vehicle mist elimination image is utilized to calculate described t; Be understood that and first suppose that atmosphere light A is given, supposition is invariable in the transmissivity of a regional area further, uses
represent the transmissivity of a certain regional area.Get minimum operational symbol in the middle use of equation (2) to obtain:
Notice that getting minimum computing operates separately three Color Channels, this equation is equivalent to:
Like this, in three Color Channel, use minimum operation computing, obtain:
According to the rule of dark primary priori, without the dark primary item J of mist natural image
darkshould close to 0.
A
calways positive, cause:
Equation (7) is brought into equation (4), transmissivity t can be estimated simply:
In the image of band mist, always with atmosphere light A closely, again because skylight is from infinite point, its transmissivity levels off to 0 to the color of sky, so region has on high:
Described A, t are brought into described vehicle band mist iconic model and obtain vehicle mist elimination iconic model, be appreciated that, Misty Image I(x by obtaining), the transmissivity t obtained, A sky brightness is brought vehicle band mist iconic model into and is obtained the mist elimination image that J (x) is acquisition.
Step 103, extracts the region of car plate from described vehicle mist elimination image;
Because the Technical comparing extracting car plate is ripe, therefore first by extraction car plate, according to car plate, image is processed, and then be conducive to next step car mark is accurately located.
Step 104, according to described car plate and car target position relationship determination car mark candidate region;
Described car plate and car target position relationship comprise: when car is that dolly (such as: car) described car is marked in the region of 1-3 car plate of the top of described car plate, or, when car is that cart (such as: lorry) described car is marked in the region of 1-6 car plate of the top of described car plate.
Step 105, utilizes Binarization methods, and the region binaryzation of car plate is obtained license plate binary figure;
Binaryzation is the technology that those skilled in the art can both realize to image procossing.
Step 106, license plate binary figure extracts horizontal edge information and forms horizontal edge figure;
Prepare in order to next step carries out forward to image.
Step 107, carries out angle rotation to set interval by horizontal edge figure within the scope of set angle, the horizontal projection value that after rotating, before statistics, four lines is maximum;
In angular range and interval, attempting the suitable satisfactory anglec of rotation gradually, namely will draw maximum horizontal projection value to find this anglec of rotation.
Step 108, is defined as forward RA by the anglec of rotation corresponding to described maximum horizontal projection value;
Step 109, by car mark candidate region according to described forward RA, utilizes bilinear interpolation to carry out rectification and obtains described forward car mark candidate region.
Step 110, the background image removing forward car mark candidate region obtains prospect forward car mark candidate region;
Concrete steps comprise:
Gray processing is carried out to described forward car mark candidate region;
Utilize structural element to carry out an opening operation to the described forward car mark candidate region after described gray processing process, remove background image and obtain prospect forward car mark candidate region.
Step 111, by Morphological scale-space determination car mark exact position;
The mode of morphology to image procossing has a lot, and the present invention mainly adopts in two ways, and these two kinds of modes can only select one in one embodiment:
Mode one:
Binary conversion treatment is carried out to described prospect forward car mark candidate region and obtains binary map;
Determine that white connected domain is car mark target area boundaries according to binary map; The white of this step then in disperse state has foreclosed;
By axis split plot design, described car mark target area boundaries is split, choose the described car mark target area boundaries be on axis, and be mapped to forward car mark candidate region and obtain the described accurate position of car mark.Because under normal circumstances, car mark is all positioned on the axis of car, owing to having carried out forward process to vehicle mist elimination image above, therefore, have employed axis split plot design in this step, and then improve the degree of accuracy of vehicle-logo location.
Mode two:
Morphologic edge detection is carried out to described prospect forward car mark candidate region and obtains edge image;
Described edge image is removed do not form described car target straight line obtain process image;
The region adopting mathematical morphology filter to remove dispersion obtains processing image;
Utilize watershed segmentation methods to described process Image Segmentation Using, determine the coordinate of car mark region;
From described forward car mark candidate region, the accurate position of car mark is obtained by described coordinate.
Owing to no matter processing vehicle band mist image, the size dimension of image is constant, therefore the accurate coordinate of car mark drawn in mode two, all applicable in image after any step vehicle band mist image procossing, therefore, as long as by virtual borderlines to vehicle band mist image, distincter car mark exact position namely can be found.
Top two step is obtained for process image, and therefore, this two step can adjust order, as long as go disturbing factor to reach object even if complete to the process sieve of image, just can adopt.
Next, the present invention describes the hardware unit adopting any one vehicle-logo location method above-mentioned by an embodiment: vehicle-logo location device:
First processing components, obtains vehicle mist elimination image for carrying out mist elimination process to vehicle band mist image;
First extraction assembly, for extracting forward car mark candidate region from described vehicle mist elimination image;
Second extraction assembly, the background image for removing described forward car mark candidate region obtains prospect forward car mark candidate region;
3rd extraction assembly, for by the accurate position of Morphological scale-space determination car mark.
Wherein the 3rd extraction assembly due to Morphological scale-space mode many, so can various ways be adopted:
Mode one: described 3rd extraction assembly comprises:
Binary map securing component, obtains binary map for carrying out binary conversion treatment to described prospect forward car mark candidate region;
Car mark target area boundaries securing component, for determining that according to binary map the connected domain of white is car mark target area boundaries;
Car mark accurate position securing component, for being split described car mark target area boundaries by axis split plot design, chooses the described car mark target area boundaries be on axis, and is mapped to forward car mark candidate region and obtains the described accurate position of car mark.
Mode two:
Described 3rd extraction assembly comprises:
Edge image securing component, obtains edge image for carrying out morphologic edge detection to described prospect forward car mark candidate region;
Process image first securing component, does not form described car target straight line obtain processing image for removing on described edge image;
Process image second securing component, the region for adopting mathematical morphology filter to remove dispersion obtains processing image;
Segmentation assembly, for utilizing watershed segmentation methods to described process Image Segmentation Using, determines the coordinate of car mark region;
Map component, for obtaining the accurate position of car mark by described coordinate from described forward car mark candidate region.
By the invention provides a kind of vehicle-logo location method and vehicle-logo location device, following beneficial effect can be reached:
Vehicle-logo location method of the present invention, comprising: carry out mist elimination process to vehicle band mist image and obtain vehicle mist elimination image; Forward car mark candidate region is extracted from described vehicle mist elimination image; The background image removing described forward car mark candidate region obtains prospect forward car mark candidate region; By the accurate position of Morphological scale-space determination car mark.Vehicle-logo location device is a set of hardware unit adopting above-mentioned vehicle-logo location method.Vehicle band mist image, because unintelligible, accurately located car target and is brought difficulty, first car marker tape mist image is carried out mist elimination process and obtain vehicle mist elimination image in this vehicle-logo location method; The sharpness of this vehicle mist elimination image and identification can being obtained for and significantly improving, then just slightly determines car mark candidate region and carries out forward further, to facilitate next step process and the degree of accuracy that improves when car mark is accurately located.Consider the impact of background on car mark region, additionally use in the method and remove the technology of background, then by various Morphological scale-space mode determination car target exact position by the method increasing the pinpoint accuracy and efficiency of car mark.
Various embodiment provided by the invention can combine as required in any way mutually, the technical scheme obtained by this combination, also within the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if belong within the scope of the claims in the present invention and equivalent technologies thereof to these amendments of the present invention and modification, then the present invention also comprises these change and modification.