Summary of the invention
The invention provides a kind of car and demarcate method for position and a car demarcation device, can extract accurate of car mark in vehicle band mist image.
The invention provides a kind of car and demarcate method for position, comprising:
Vehicle band mist image is carried out the mist elimination processing obtain vehicle mist elimination image;
Extraction forward car mark candidate region from described vehicle mist elimination image;
The background image of removing described forward car mark candidate region obtains prospect forward car mark candidate region;
Process by morphology and determine accurate of car mark.
Describedly vehicle band mist image is carried out mist elimination process and to 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, I is automobile belt mist image; J is automobile mist elimination image, and A is atmosphere light, and t distributes for the estimation transmissivity;
Choose 0.1% pixel of brightness maximum in the dark primary of vehicle band mist image, in described pixel, in input vehicle band mist image, the pixel of intensity maximum is defined as described A;
Carry out dark primary priori, the minimum value that draws light intensity in vehicle mist elimination image levels off to 0;
Utilize the minimum value of light intensity in described vehicle mist elimination image to calculate described t;
Bring described A, t into described vehicle band mist iconic model and obtain vehicle mist elimination iconic model.
The described forward car mark candidate region of extracting from described vehicle mist elimination image preferably includes:
Extract car plate from described vehicle mist elimination image;
Determine car mark candidate region according to described car plate and car target position relationship;
Utilizing bilinear interpolation to carry out forward to described car mark candidate region corrects and obtains forward car mark candidate region;
Described car plate and car target position relationship comprise: described car is marked in the zone of 1-3 car plate of top of described car plate, and perhaps, described car is marked in the zone of 1-6 car plate of 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 regional binaryzation of car plate is obtained license plate binary figure;
Extract horizontal edge information and form horizontal edge figure on license plate binary figure;
Horizontal edge figure is carried out the angle rotation to set the interval in the set angle scope, the horizontal projection value of four lines maximum before statistics after rotation;
The corresponding anglec of rotation of horizontal projection value of described maximum is defined as the forward RA;
Car mark candidate region according to described forward RA, is utilized bilinear interpolation to correct to obtain described forward car mark candidate region.
The background image of the described forward car mark of described removal candidate region obtains prospect forward car mark candidate region and preferably includes:
To described forward car mark candidate region carrying out gray processing;
Described forward car mark candidate region after utilizing structural element that described gray processing is processed is carried out opening operation one time, removes background image and obtains prospect forward car mark candidate region.
The described processing by morphology determines that the car mark accurately preferably includes the position:
Binary conversion treatment is carried out in described prospect forward car mark candidate region obtain binary map;
The connected domain of determining white according to binary map is car heading mark zone boundary;
By the axis split plot design, described car heading mark zone boundary is cut apart, chosen the described car heading mark zone boundary that is on the axis, and it is mapped to forward car mark candidate region obtains described car mark accurate position.
The described processing by morphology determines that the car mark accurately preferably includes the position:
Morphologic edge detection is carried out in described prospect forward car mark candidate region obtain edge image;
Remove on described edge image and do not consist of described car target straight line and obtain processing image;
Adopt mathematical morphology filter to remove the zone that disperses and obtain processing image;
Utilize the watershed segmentation method to described processing Image Segmentation Using, determine the coordinate of car mark region;
Obtain car mark accurate position from described forward car mark candidate region by described coordinate.
The present invention also provides a kind of car that uses the described car of above-mentioned any one to demarcate method for position to demarcate the position device, comprising:
The first processing components is used for that vehicle band mist image is carried out the mist elimination processing and obtains vehicle mist elimination image;
The first extraction assembly is used for from described vehicle mist elimination image extraction forward car mark candidate region;
The second extraction assembly, the background image that is used for removing described forward car mark candidate region obtain prospect forward car mark candidate region;
The 3rd extraction assembly is used for processing by morphology and determines accurate of car mark.
Described the 3rd extraction assembly preferably includes:
The binary map securing component is used for that binary conversion treatment is carried out in described prospect forward car mark candidate region and obtains binary map;
Car heading mark zone boundary securing component is used for determining that according to binary map the connected domain of white is car heading mark zone boundary;
The car mark is the position securing component accurately, is used for by the axis split plot design, described car heading mark zone boundary being cut apart, and chooses the described car heading mark zone boundary that is on the axis, and it is mapped to forward car mark candidate region obtains described car mark accurate position.
Described the 3rd extraction assembly preferably includes:
The edge image securing component is used for that morphologic edge detection is carried out in described prospect forward car mark candidate region and obtains edge image;
Process image the first securing component, do not consist of described car target straight line for removal on described edge image and obtain processing image;
Process image the second securing component, the prospect forward car mark candidate region that is used for adopting mathematical morphology filter to remove and disperses obtains processing image;
Cut apart assembly, be used for utilizing the watershed segmentation method to described processing Image Segmentation Using, determine the coordinate of car mark region;
Map component is used for by described coordinate from the accurate position of described forward car mark candidate region acquisition car mark.
A kind of car is demarcated method for position and car is demarcated the position device by the invention provides, and can reach following beneficial effect:
Car of the present invention is demarcated method for position, comprising: vehicle band mist image is carried out the mist elimination processing obtain vehicle mist elimination image; Extraction forward car mark candidate region from described vehicle mist elimination image; The background image of removing described forward car mark candidate region obtains prospect forward car mark candidate region; Process by morphology and determine accurate of car mark.It is to adopt above-mentioned car to demarcate a cover hardware unit of method for position that car is demarcated the position device.At first vehicle band mist image carries out car marker tape mist image the mist elimination processing and obtains vehicle mist elimination image because the unintelligible car target is accurately located brought difficulty in this car demarcation method for position; But the sharpness of this vehicle mist elimination image and identification have all obtained significantly improving, and then further just slightly determine car mark candidate region and carry out forward, with the processing that facilitates next step and the degree of accuracy when improving the car mark and accurately locating.Consider background to the impact in car mark zone, also adopted in the method the technology of removing background, then determine that by various morphology processing modes car target exact position improved the pinpoint accuracy and efficiency of car mark by the method.
Embodiment
Below with reference to accompanying drawing, the technical scheme of various embodiments of the present invention is carried out clear, complete description, obviously, described embodiment is only a part of embodiment of the present invention, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills are resulting all other embodiment under the prerequisite of not making creative work, all belong to the scope that the present invention protects.
The invention provides a kind of car and demarcate method for position, comprising:
Vehicle band mist image is carried out the mist elimination processing obtain vehicle mist elimination image;
Extraction forward car mark candidate region from described vehicle mist elimination image;
The background image of removing described forward car mark candidate region obtains prospect forward car mark candidate region;
Process by morphology and determine accurate of car mark.
The present invention also provides a kind of and has used the car that described car is demarcated method for position to demarcate the position device, comprising:
The first processing components is used for that vehicle band mist image is carried out the mist elimination processing and obtains vehicle mist elimination image;
The first extraction assembly is used for from described vehicle mist elimination image extraction forward car mark candidate region;
The second extraction assembly, the background image that is used for removing described forward car mark candidate region obtain prospect forward car mark candidate region;
The 3rd extraction assembly is used for processing by morphology and determines accurate of car mark.
It is to adopt above-mentioned car to demarcate a cover hardware unit of method for position that car is demarcated the position device.
Vehicle band mist image accurately brings difficulty in the location because unintelligible to the car target, at first car marker tape mist image is carried out the mist elimination processing and obtain vehicle mist elimination image in this car demarcation method for position; But the sharpness of this vehicle mist elimination image and identification have all obtained significantly improving, and then further just slightly determine car mark candidate region and carry out forward, with the processing that facilitates next step and the degree of accuracy when improving the car mark and accurately locating.Consider background to the impact in car mark zone, also adopted in the method the technology of removing background, then determine that by various morphology processing modes car target exact position improved the pinpoint accuracy and efficiency of car mark by the method.
Next, the present invention will describe in detail from vehicle band mist image by a specific embodiment car mark will be carried out pinpoint method, see Fig. 1, shown in:
Step 101, collection vehicle band mist image;
The mode that gathers can be by having the variety of way method now: such as: traffic department is located at taking pictures for detection of the speed of a motor vehicle on highway; Perhaps usually take pictures with common camera etc.
Step 102 is carried out the mist elimination processing to vehicle band mist image and is obtained 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, I is automobile belt mist image; J is automobile mist elimination image, and A is atmosphere light, and t distributes for the estimation transmissivity;
Choose 0.1% pixel of brightness maximum in the dark primary of vehicle band mist image, in described pixel, in input vehicle band mist image, the pixel of intensity maximum is defined as described A; Can be understood as: be understood that 0.1% the pixel of at first choosing brightness maximum in dark primary (dark primary that the mist image is arranged), these pixels are mostly opaque.In the middle of above pixel, in input picture I, the pixel of intensity maximum is confirmed as atmosphere light A.
Dark primary priori,, the minimum value that draws light intensity in vehicle mist elimination image levels off to 0; Be understood that the dark primary priori that draws without the observation of mist image by to the open air: 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, contain automobile image J for a width, definition:
Jc represents some Color Channels of J, and Ω (x) is a square region centered by x.We observe and to draw, and except the sky orientation, the intensity of Jdark is always very low and level off to 0.If J is outdoor without the mist image, we call Jdark the dark primary of J, and, dark primary priori is the empirical rule that above observation draws.
Utilize the minimum value of light intensity in described vehicle mist elimination image to calculate described t; Be understood that and suppose that at first atmosphere light A is given, further supposition is invariable in the transmissivity of a regional area, uses
The transmissivity that represents a certain regional area.Use in equation (2) and get minimum operational symbol and obtain:
Notice that getting minimum computing operates separately three Color Channels, this equation is equivalent to:
Like this, use the minimum operation computing in three Color Channels, obtain:
According to the rule of dark primary priori, without the dark primary item J of mist natural image
DarkShould be close to 0.
A
cAlways positive, cause:
Equation (7) is brought into equation (4), can estimate simply transmissivity t:
The color of sky is always very approaching with atmosphere light A in the image of mist, again because skylight from infinite point, its transmissivity levels off to 0, so the zone has on high:
Bring described A, t into described vehicle band mist iconic model and obtain vehicle mist elimination iconic model, be appreciated that, with the Misty Image I(x that obtains), the transmissivity t that obtains, the 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, the zone of extracting car plate from described vehicle mist elimination image;
Due to the technology comparative maturity that extracts car plate, therefore first by extracting car plate, according to car plate, image is processed, and then be conducive to next step car mark is accurately located.
Step 104 is determined car mark candidate region according to described car plate and car target position relationship;
Described car plate and car target position relationship comprise: when car be dolly (such as: car) described car is marked in the zone of 1-3 car plate of top of described car plate, perhaps, when car be cart (such as: lorry) described car is marked in the zone of 1-6 car plate of top of described car plate.
Step 105 is utilized Binarization methods, and the regional binaryzation of car plate is obtained license plate binary figure;
It is the technology that those skilled in the art can both realize that binaryzation is processed image.
Step 106 is extracted horizontal edge information and is formed horizontal edge figure on license plate binary figure;
To prepare for next step carries out forward to image.
Step 107 is carried out angle rotation to set the interval with horizontal edge figure, the horizontal projection value of four lines maximum before statistics after rotation in the set angle scope;
Attempt gradually the suitable satisfactory anglec of rotation in angular range and interval, namely will draw maximum horizontal projection value in order to find this anglec of rotation.
Step 108 is defined as the forward RA with the corresponding anglec of rotation of horizontal projection value of described maximum;
Step 109 according to described forward RA, utilizes bilinear interpolation to correct to obtain described forward car mark candidate region with car mark candidate region.
Step 110, the background image of removing forward car mark candidate region obtain prospect forward car mark candidate region;
Concrete steps comprise:
To described forward car mark candidate region carrying out gray processing;
Described forward car mark candidate region after utilizing structural element that described gray processing is processed is carried out opening operation one time, removes background image and obtains prospect forward car mark candidate region.
Step 111 is processed by morphology and is determined car mark exact position;
The mode that morphology is processed image has a lot, and the present invention mainly adopts dual mode, and this dual mode can only be selected a kind of in one embodiment:
Mode one:
Binary conversion treatment is carried out in described prospect forward car mark candidate region obtain binary map;
The connected domain of determining white according to binary map is car heading mark zone boundary; The white that this step is disperse state has foreclosed;
By the axis split plot design, described car heading mark zone boundary is cut apart, chosen the described car heading mark zone boundary that is on the axis, and it is mapped to forward car mark candidate region obtains described car mark accurate position.Because generally, the car mark all is positioned on the axis of car, owing to above vehicle mist elimination image having been carried out the forward processing, therefore, has adopted in this step the axis split plot design, and then improved the degree of accuracy that car is demarcated the position.
Mode two:
Morphologic edge detection is carried out in described prospect forward car mark candidate region obtain edge image;
Remove on described edge image and do not consist of described car target straight line and obtain processing image;
Adopt mathematical morphology filter to remove the zone that disperses and obtain processing image;
Utilize the watershed segmentation method to described processing Image Segmentation Using, determine the coordinate of car mark region;
Obtain car mark accurate position from described forward car mark candidate region by described coordinate.
Owing to no matter vehicle band mist image being processed, the size dimension of image is constant, therefore the accurate coordinate of car mark that draws in mode two, all be suitable in image after any step vehicle band mist image processing, therefore, as long as coordinate is mapped to vehicle band mist image, namely can find distincter car mark exact position.
Top two step has all obtained the processing image, and therefore, this two step can the adjustment order, as long as even if the processing sieve of completing image goes disturbing factor to reach purpose, just can adopt.
Next, the present invention describes by an embodiment and adopts above-mentioned any car to demarcate the hardware unit of method for position: car is demarcated the position device:
The first processing components is used for that vehicle band mist image is carried out the mist elimination processing and obtains vehicle mist elimination image;
The first extraction assembly is used for from described vehicle mist elimination image extraction forward car mark candidate region;
The second extraction assembly, the background image that is used for removing described forward car mark candidate region obtain prospect forward car mark candidate region;
The 3rd extraction assembly is used for processing by morphology and determines accurate of car mark.
Wherein the 3rd extraction assembly is because the morphology processing mode is many, so can adopt various ways:
Mode one: described the 3rd extraction assembly comprises:
The binary map securing component is used for that binary conversion treatment is carried out in described prospect forward car mark candidate region and obtains binary map;
Car heading mark zone boundary securing component is used for determining that according to binary map the connected domain of white is car heading mark zone boundary;
The car mark is the position securing component accurately, is used for by the axis split plot design, described car heading mark zone boundary being cut apart, and chooses the described car heading mark zone boundary that is on the axis, and it is mapped to forward car mark candidate region obtains described car mark accurate position.
Mode two:
Described the 3rd extraction assembly comprises:
The edge image securing component is used for that morphologic edge detection is carried out in described prospect forward car mark candidate region and obtains edge image;
Process image the first securing component, do not consist of described car target straight line for removal on described edge image and obtain processing image;
Process image the second securing component, be used for adopting mathematical morphology filter to remove the zone that disperses and obtain processing image;
Cut apart assembly, be used for utilizing the watershed segmentation method to described processing Image Segmentation Using, determine the coordinate of car mark region;
Map component is used for by described coordinate from the accurate position of described forward car mark candidate region acquisition car mark.
A kind of car is demarcated method for position and car is demarcated the position device by the invention provides, and can reach following beneficial effect:
Car of the present invention is demarcated method for position, comprising: vehicle band mist image is carried out the mist elimination processing obtain vehicle mist elimination image; Extraction forward car mark candidate region from described vehicle mist elimination image; The background image of removing described forward car mark candidate region obtains prospect forward car mark candidate region; Process by morphology and determine accurate of car mark.It is to adopt above-mentioned car to demarcate a cover hardware unit of method for position that car is demarcated the position device.Vehicle band mist image accurately brings difficulty in the location because unintelligible to the car target, at first car marker tape mist image is carried out the mist elimination processing and obtain vehicle mist elimination image in this car demarcation method for position; But the sharpness of this vehicle mist elimination image and identification have all obtained significantly improving, and then further just slightly determine car mark candidate region and carry out forward, with the processing that facilitates next step and the degree of accuracy when improving the car mark and accurately locating.Consider background to the impact in car mark zone, also adopted in the method the technology of removing background, then determine that by various morphology processing modes car target exact position improved the pinpoint accuracy and efficiency of car mark by the method.
Various embodiment provided by the invention can be as required combination mutually in any way, the technical scheme that obtains by this combination, also within the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification and not break away from the spirit and scope of the present invention the present invention.Like this, if of the present invention these are revised and within modification belongs to the scope of claim of the present invention and equivalent technologies thereof, the present invention also comprises these changes and modification interior.