Car logo positioning method based on background cooling fin ablation

文档序号:950253 发布日期:2020-10-30 浏览:5次 中文

阅读说明:本技术 一种基于背景散热片消融的车标定位方法 (Car logo positioning method based on background cooling fin ablation ) 是由 卿粼波 李映东 吴晓红 何小海 滕奇志 吴小强 于 2019-04-18 设计创作,主要内容包括:本发明提供了一种基于背景散热片消融的车标定位方法。首先根据车标与车牌的空间位置关系确定车标的粗定位区域。依据粗定位区域在水平投影和垂直投影上的差异性将车标背景分为三大类:无散热片、类水平纹理散热片和垂直纹理散热片。然后采用与车标背景相对应的算法对车标背景散热片进行消融、去噪和形态学处理,并根据车标的物理特性约束,实现车标的精确定位。本发明的车标定位方法具有适应性广、定位精确性高等优点。(The invention provides a car logo positioning method based on background cooling fin ablation. Firstly, determining a coarse positioning area of the car logo according to the spatial position relation between the car logo and the license plate. The car logo backgrounds are classified into three categories according to the difference of the rough positioning area in horizontal projection and vertical projection: no fins, quasi-horizontal texture fins, and vertical texture fins. And then, carrying out ablation, denoising and morphological processing on the car logo background radiating fins by adopting an algorithm corresponding to the car logo background, and realizing accurate positioning of the car logo according to the physical characteristic constraint of the car logo. The car logo positioning method has the advantages of wide adaptability, high positioning accuracy and the like.)

1. A car logo positioning method based on background cooling fin ablation is characterized by mainly comprising the following steps:

(1) Carrying out coarse positioning on a car logo on an original image of a car;

(2) judging whether the car logo background of the coarse positioning area has a radiating fin or not; when the background of the vehicle logo coarse positioning area has a radiating fin, executing the step (3); when the background of the vehicle logo coarse positioning area has no radiating fins, executing the step (6);

(3) classifying the textures of the cooling fins of the car logo background in the coarse positioning area;

(4) respectively adopting different methods to melt different car logo background radiating fins;

(5) eliminating the residual noise around the car logo;

(6) and performing morphological processing to obtain a result of accurate positioning of the car logo.

2. The method for positioning the emblem based on background heat sink ablation according to claim 1, wherein in the step (2), the horizontal projection of the rough positioning area of the emblem is used to determine whether the heat sink exists on the emblem background; firstly, expanding the binary image of the coarse positioning area, taking an area with a horizontal projection of which the continuous length of the first section from top to bottom is not zero, and when the width of the area and the maximum projection length of the area are in a certain range, namely the background of the car logo has no radiating fins, otherwise, the background of the car logo has radiating fins.

3. The method according to claim 1, wherein in the step (3), for the background with fins, the vertical projection variance of the coarse positioning area is used to determine whether the background is similar to horizontal texture or vertical texture; and calculating the variance of the vertical projection of the 1/4 area from the left of the coarse positioning area, wherein the vertical texture is determined if the variance is greater than a given threshold value, and the horizontal texture is determined if the variance is less than the given threshold value.

4. The method for locating the car logo based on background heat sink ablation as claimed in claim 1, wherein the step (4): for the car logo background which is similar to horizontal texture, after background ablation is carried out on the car logo background by using a Soble vertical operator, an interproximal binarization method is adopted for highlighting the car logo part, namely points on an image are added with gray values of upper and lower points of the points, and when the added value is smaller than a given threshold value, the added value is regarded as a noise point; for the car logo background, the car logo background is vertically textured, background ablation is carried out on the car logo background by adopting a Soble horizontal operator, interproximal binarization is adopted, the difference of the similar horizontal texture is that the binarization of the vertical texture is to add gray values of points on an image and left and right points of the image, and when the added value is smaller than a given threshold value, the added value is regarded as a noise point; in the background of the vertical texture, there is a horizontal stripe above or below the emblem, and when the sum of the projected values of two consecutive rows of the rough positioning area is greater than 1/5 of the width of the rough positioning area, it is regarded as a long stripe portion and eliminated.

5. The method for locating the car logo based on background heat sink ablation as claimed in claim 1, wherein the step (5): for car logo backgrounds with horizontal texture, a projection-based denoising method is adopted; taking the continuous non-zero maximum region in the horizontal projection of the adjacent binary image, and taking other regions as noise points and removing; carrying out vertical projection on the image subjected to denoising in the horizontal direction, taking a continuous non-zero maximum region in the vertical projection, then comparing the continuous non-zero maximum region with each continuous region, and taking 1/5 smaller than the length of the maximum region as a noise point; for the car logo background with vertical texture, taking the continuous non-zero maximum region in the vertical projection of the inter-adjacent binary image, and taking other regions as noise points and removing; and horizontally projecting the image subjected to denoising in the vertical direction, taking the continuous non-zero maximum region in the horizontal projection, comparing with each continuous region, and taking 1/5 smaller than the length of the maximum region as noise and eliminating the noise.

6. The method for locating the car logo based on background heat sink ablation as claimed in claim 1, wherein the step (6): for the car logo background without radiating fins, firstly expanding the binary image of the coarse positioning area, then taking out the continuous non-zero area of the first section from top to bottom on the horizontal projection of the area, then carrying out vertical projection on the area, and taking out the left and right boundaries of the vertical projection to obtain the accurate positioning result of the car logo; for the car logo with the radiating fins on the background, after the radiating fins on the background of the car logo are ablated and residual noise points around the car logo are removed, the obtained image is expanded, the maximum external rectangle is taken, and the positioning result is restrained according to the outline symmetry of the car logo (the distance from the left boundary of the car logo to the central axis of the coarse positioning area is equal to the distance from the right boundary of the car logo to the central axis of the coarse positioning area), so that the accurate positioning result of the car logo is obtained.

Technical Field

The invention relates to the technical field of car logo positioning technology and image processing technology, in particular to a car logo positioning method based on background cooling fin ablation.

Background

The collection and identification of vehicle information plays a critical role in intelligent transportation systems. However, the existing license plate recognition system is influenced by the fake-licensed vehicle, and cannot accurately acquire vehicle information, and in the face of the situation, the vehicle logo recognition based on the vehicle image is more and more emphasized. Vehicle logo identification technology has become an important component of vehicle identification systems. The vehicle logo positioning is the basis and the premise of vehicle logo identification, and the vehicle logo can be further identified only by accurately positioning the vehicle logo.

However, the car logo has various types, different sizes and shapes and indefinite textures, and particularly, the car logo is interfered by the radiating fins on the background of the car logo, so that the accurate positioning of the car logo is influenced. Many car logo positioning research methods have been proposed, such as: a car logo positioning method based on edge detection and projection; a car logo positioning method based on car logo background texture analysis; a vehicle logo positioning method based on DCT domain; a car logo positioning method based on energy characteristics; a vehicle logo positioning method based on PCA and invariant moment; and a car logo positioning method based on template matching and the like. However, the existing car logo positioning method is only suitable for single car logo background textures under many conditions, complex and variable car logos and background textures are difficult to consider, the limitation is large, and the positioning rate is difficult to guarantee.

Disclosure of Invention

Aiming at the technical problem of the existing car logo positioning method, the invention provides the car logo positioning method based on background cooling fin ablation, and compared with the traditional car logo positioning method, the method provided by the invention has the advantages of high accuracy and wider applicability.

The basic idea of the invention is to perform coarse positioning on the position of the car logo through the prior knowledge of the spatial position relationship between the car logo and the license plate. And classifying the car logo backgrounds in the coarse positioning area, and respectively carrying out ablation, denoising and morphological processing on different types of car logo backgrounds, so as to realize accurate positioning of the car logos.

And roughly positioning the position of the car logo according to the priori knowledge of the spatial position relationship between the car logo and the license plate. Namely, the vehicle logo coarse positioning area is positioned right above the license plate, the height of the vehicle logo coarse positioning area is within the height range of 0.5-3.0 license plates, and the width of the vehicle logo coarse positioning area is consistent with the width of the license plate. And then horizontally projecting the roughly positioned image, and judging whether the radiating fins exist on the background of the car logo according to the difference of the horizontal projection. For the car logo with the radiating fins on the background, the radiating fins are divided into two categories: like horizontal texture fins and vertical texture fins. Quasi-horizontal texture fins refer to various complex horizontal direction textures (fin grid angles between 0 and 45 degrees) and complex web texture fins. Vertical textured fins mean that the primary fin grid is between 45 degrees and 90 degrees.

The car logo background has no radiating fins, the noise is low, and the accurate position of the car logo can be determined according to horizontal projection and vertical projection. Because the projection of the car logo is incomplete due to the influence of uneven illumination in practice, the binary image of the coarse positioning area is expanded, then the area which is continuous and not zero in the first section from top to bottom is taken out on the horizontal projection of the area, then the area is vertically projected, the left and right boundaries of the vertical projection are taken out, and the result of accurately positioning the background car logo without the cooling fins is obtained.

And (4) carrying out background ablation on the car logo background which is similar to horizontal texture by adopting a Soble vertical operator. Generally, the result of ablation is relatively noisy, and in order to eliminate the influence of background noise on the positioning of the car logo to the maximum extent and ensure the integrity of the car logo region, an inter-neighbor binarization method suitable for the positioning of the car logo is adopted: and adding the gray values of the point on the image after the ablation of the Soble vertical operator and the upper and lower points of the point, and when the added value is smaller than a given threshold value, determining the point as a noise point and removing the noise point. After the inter-neighbor binarization, the noise remaining around the car logo needs to be removed. For car logos with complex background textures, the morphological denoising effect is not good when the car logos are used singly. The invention adopts a projection-based denoising method. The car logo part after the inter-adjacent binarization of the similar horizontal texture has continuity and the maximum length on the horizontal projection, and is divided into a plurality of continuous areas on the vertical projection. Based on the characteristic, the maximum continuous non-zero region in the horizontal projection can be taken, and other regions can be regarded as noise and removed. And vertically projecting the image subjected to denoising in the horizontal direction. The continuous non-zero maximum region in the vertical projection is taken, then each continuous region is compared with the maximum region, and 1/5 smaller than the length of the maximum region is regarded as noise and removed.

And (3) for the car logo background which is vertical texture, background ablation is carried out on the car logo background by adopting a Soble horizontal operator, and an inter-neighbor binarization method is adopted. Different from the similar horizontal texture, the binarization of the vertical texture is to take the gray value of a point on the image and the gray value of two points at the left and right of the point, and the added value is considered as noise when the added value is less than a given threshold value. In most vertical textured backgrounds, there is a horizontal stripe above or below the emblem, which has an effect on the precise positioning of the emblem. Therefore, after the inter-neighbor binarization, the horizontal stripes are eliminated. In practice, the horizontal stripe is mostly not completely horizontal, but has a certain amplitude, and its value in horizontal projection is much larger than the car logo portion, and based on this characteristic, when the sum of the projected values of two consecutive rows is larger than 1/5 of the width of the coarse positioning area, it is regarded as a long stripe portion. The car logo part after the vertical texture preprocessing has continuity and the largest length in the vertical projection, and is divided into a plurality of continuous areas in the horizontal projection. Based on the characteristic, the continuous non-zero maximum region in the vertical projection can be taken, and other regions can be regarded as noise and removed. And horizontally projecting the image subjected to denoising in the vertical direction, taking the continuous non-zero maximum region in the horizontal projection, comparing each continuous region with the maximum region, and taking 1/5 smaller than the length of the maximum region as noise and removing the noise.

For the car logo with the radiating fins on the background, after the radiating fins on the car logo background are ablated and residual noise points around the car logo are removed, the obtained image is expanded, the maximum external rectangle is taken, and the positioning result is restrained according to the outline symmetry of the car logo (the distance from the left boundary of the car logo to the central axis of the coarse positioning area is equal to the distance from the right boundary of the car logo to the central axis of the coarse positioning area), so that the accurate positioning result of the car logo with the radiating fins on the background is obtained.

Drawings

FIG. 1 is a flow chart of a method for locating a emblem based on background heat sink ablation according to the present invention;

fig. 2 is a result of accurate positioning of the emblem without a heat sink background, fig. 2(a) is a rough positioning area of the emblem, fig. 2(b) is an image of the rough positioning area of the emblem after binarization expansion, fig. 2(c) is a horizontal projection of the expanded image, fig. 2(d) is an image of the upper and lower boundaries of the emblem, fig. 2(e) is a vertical projection of the image 2(d), and fig. 2(f) is a result of accurate positioning of the emblem;

fig. 3 is a car logo accurate positioning result of a horizontal texture-like heat sink background, fig. 3(a) is a car logo coarse positioning region, fig. 3(b) is an image processed by a Soble vertical operator, fig. 3(c) is an image after interproximal binarization, fig. 3(d) is a horizontal projection of a binarized image, fig. 3(e) is a horizontal projection after denoising, fig. 3(f) is an image after denoising in a horizontal direction, fig. 3(g) is a vertical projection of the image 3(f), fig. 3(h) is a vertical projection after denoising, fig. 3(i) is an image after denoising in a vertical direction, fig. 3(j) is an expanded image, and fig. 3(k) is a car logo accurate positioning result;

Fig. 4 is the car logo accurate positioning result of the vertical texture heat sink background, fig. 4(a) is the car logo coarse positioning area, fig. 4(b) is the image after the processing of the Soble horizontal operator, fig. 4(c) is the image after the interproximal binarization, fig. 4(d) is the horizontal projection of the binarized image, fig. 4(e) is the image after the elimination of the horizontal long strip, fig. 4(f) is the vertical projection of the image 4(e), fig. 4(g) is the vertical projection after the denoising, fig. 4(h) is the image after the vertical direction denoising, fig. 4(i) is the horizontal projection of the image 4(h), fig. 4(j) is the horizontal projection after the denoising, fig. 4(k) is the image after the horizontal direction denoising, and fig. 4(m) is the car logo accurate positioning result;

Detailed Description

The present invention is further described in detail with reference to the drawings and examples, it should be noted that the following examples are only for illustrating the present invention and should not be construed as limiting the scope of the present invention, and those skilled in the art should be able to make certain insubstantial modifications and adaptations to the present invention based on the above disclosure and should still fall within the scope of the present invention.

In fig. 1, a car logo positioning method based on background heat sink ablation includes the following steps:

(1) Carrying out coarse positioning on a car logo on an original image of a car;

(2) judging whether the car logo background of the coarse positioning area has a radiating fin or not; when the background of the vehicle logo coarse positioning area has the radiating fins, executing the step (3); when the background of the vehicle logo coarse positioning area has no radiating fins, executing the step (6);

(3) classifying the textures of the cooling fins of the car logo background in the coarse positioning area;

(4) respectively adopting different algorithms to melt different car logo background cooling fins;

(5) eliminating the residual noise around the car logo;

(6) and performing morphological processing to obtain a result of accurate positioning of the car logo.

Further, the step (1) includes:

and acquiring the position of the license plate from the original vehicle image, and roughly positioning the position of the vehicle logo by using the prior knowledge of the spatial position relationship between the vehicle logo and the license plate. The coarse positioning area is located right above the license plate, the height of the coarse positioning area is within the height range of 0.5-3.0 license plates, and the width of the coarse positioning area is consistent with the width of the license plates.

Further, the step (2) includes:

and judging whether the radiating fins exist on the car logo background by utilizing the horizontal projection of the coarse positioning area according to the characteristics of the background without the radiating fins. Since the projection of the car logo is incomplete due to the influence of uneven illumination in practice, the binarized image of the coarse positioning area is expanded first and then horizontally projected. The discrimination conditions are as follows:

Wherein T is to carry out horizontal projection to the coarse positioning area, and an area with a first continuous length which is not zero is obtained from top to bottom, S is the maximum projection length of the area, H is the height of the coarse positioning picture, and W is the width of the coarse positioning picture.

When the background of the vehicle logo coarse positioning area has a radiating fin, executing the step (3); and (6) when the background of the vehicle logo coarse positioning area has no radiating fins, executing the step.

Further, the step (3) includes:

the invention divides the texture of the radiating fin of the car logo background into two categories: like horizontal texture fins and vertical texture fins. Quasi-horizontal texture fins refer to various complex horizontal direction textures (fin grid angles between 0 and 45 degrees) and complex web texture fins. Vertical textured fins mean that the primary fin grid is between 45 degrees and 90 degrees.

Because the difference of the vertical projection variances of the two types of radiating fins is large, whether the car logo background is similar to a horizontal texture or a vertical texture is judged by using the vertical projection variance of the coarse positioning area. The discrimination conditions are as follows:

where V is the variance of the vertical projection of the 1/4 area left from the rough location of the emblem, and M is the vertical projection threshold.

Further, the step (4) includes:

for car logo background which is quasi-horizontal texture, background ablation is performed on the car logo background by using Soble vertical operator, and the result is shown in FIG. 3 (b). Generally, the result of ablation is relatively noisy, and in order to eliminate the influence of background noise on the positioning of the car logo to the maximum extent and ensure the integrity of the car logo region, an inter-neighbor binarization method suitable for the positioning of the car logo is adopted:

Figure BDA0002032473230000043

Where f (i, j) is the gray value of point (i, j) and k is the gray value threshold. Because the image after the ablation by the Soble vertical operator keeps the edge characteristics in the vertical direction, based on the characteristic, the gray values of the point (i, j) and the upper and lower points of the point can be added, and when the added value is less than k, the noise point is regarded as the noise point. The results are shown in FIG. 3 (c).

The car logo background is vertically textured, and background ablation is carried out on the car logo background by adopting a Soble horizontal operator. And adopting the inter-neighbor binarization, wherein the binarization of the vertical texture is different from the similar horizontal texture in that (i, j) is added with the gray values of the left point and the right point of the point, and when the added value is less than k, the noise point is regarded as the noise point. In most vertical textured backgrounds, there is a horizontal stripe above or below the emblem, which has an effect on the precise positioning of the emblem. Therefore, after the inter-neighbor binarization, the horizontal stripes are eliminated. In practice, most of the horizontal stripes are not completely horizontal, but have a certain amplitude, and the value of the horizontal projection is much larger than that of the car logo part, and based on this characteristic, when the sum of the projection values of two consecutive rows is larger than 1/5 of the width of the coarse positioning area, the stripe part is considered:

Figure BDA0002032473230000051

where f (i, j) is the gray value of point (i, j), h (i) is the horizontal projection of the coarse localization area, and W is the width of the coarse localization area. The results are shown in FIGS. 4(c) - (e).

Further, the step (5) includes:

for the fact that the car logo background is similar to horizontal texture, it can be found that the car logo part after inter-neighbor binarization has continuity in horizontal projection and the maximum length, and is divided into a plurality of continuous areas in vertical projection. Based on the characteristic, the maximum continuous non-zero region in the horizontal projection can be taken, and other regions can be regarded as noise and removed:

where f (i, j) is the gray value of point (i, j), TmThe image is a maximum area which is continuous and not zero on the horizontal projection after the inter-neighbor binarization. The results are shown in FIGS. 3(d) - (f).

And vertically projecting the image subjected to denoising in the horizontal direction. Taking the continuous non-zero maximum region in the vertical projection, then comparing each continuous region with the maximum region, and taking 1/5 smaller than the length of the maximum region as noise:

where f (i, j) is the gray value of point (i, j), W(i,j)Is the area where point (i, j) is located, WmIs a continuous non-zero maximum area on the vertical projection. The results are shown in FIGS. 3(g) - (i).

And for the car logo background which is vertical texture, taking the continuous non-zero maximum region in the vertical projection of the inter-adjacent binary image, and regarding other regions as noise and removing the noise. And horizontally projecting the image subjected to denoising in the vertical direction, taking the continuous non-zero maximum region in the horizontal projection, comparing each continuous region with the maximum region, and taking 1/5 smaller than the length of the maximum region as noise and eliminating the noise. The results are shown in FIGS. 4(f) - (k).

Further, the step (6) includes:

for background finless, the exact location of the emblem can be determined from the horizontal and vertical projections. Because the projection of the car logo is incomplete due to the influence of uneven illumination in practice, the binary image of the coarse positioning area is expanded, then the area which is continuous and not zero in the first section from top to bottom is taken out on the horizontal projection of the area, then the area is vertically projected, the left boundary and the right boundary of the vertical projection are taken out, and the result of accurate positioning of the car logo is obtained. The results are shown in FIG. 2.

For the car logo with the radiating fins on the background, after the radiating fins on the car logo background are ablated and residual noise points around the car logo are removed, the obtained image is expanded, the maximum external rectangle is taken, and the positioning result is restrained according to the outline symmetry of the car logo (the distance from the left boundary of the car logo to the central axis of the coarse positioning area is equal to the distance from the right boundary of the car logo to the central axis of the coarse positioning area), so that the accurate positioning result of the car logo is obtained. As shown in fig. 3(k) and 4 (m).

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:图像处理方法和装置、电子设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!