Architecture against regulations recognition methods and device, storage medium, computer equipment

文档序号:1742582 发布日期:2019-11-26 浏览:18次 中文

阅读说明:本技术 违章建筑识别方法及装置、存储介质、计算机设备 (Architecture against regulations recognition methods and device, storage medium, computer equipment ) 是由 雷晨雨 于 2019-07-11 设计创作,主要内容包括:本申请公开了一种违章建筑识别方法及装置、存储介质、计算机设备,该方法包括:获取待识别建筑对应的待识别建筑物图片;对待识别建筑物图片进行灰度化处理,得到待识别建筑物图片对应的灰度图;对灰度图进行边缘检测,得到待识别建筑物图片对应的边缘图片;从边缘图片中提取待识别建筑物轮廓图;根据待识别建筑物轮廓图与标准建筑物轮廓图的匹配情况,判断待识别建筑是否为违章建筑。本申请根据待识别建筑物的轮廓图和标准建筑物的轮廓图的匹配情况分析待识别建筑物是否违章,相比于现有技术中的人工识别方式,提升了违章建筑识别的准确性和效率。(This application discloses a kind of architecture against regulations recognition methods and device, storage medium, computer equipments, this method comprises: obtaining the corresponding building picture to be identified of building to be identified;Gray processing processing is carried out to building picture to be identified, obtains the corresponding grayscale image of building picture to be identified;Edge detection is carried out to grayscale image, obtains the corresponding edge picture of building picture to be identified;Contour of building figure to be identified is extracted from edge picture;According to the match condition of contour of building figure to be identified and Modular building object profile diagram, judge whether building to be identified is the architecture against regulations.The application analyzes whether building to be identified breaks rules and regulations according to the match condition of the profile diagram of building to be identified and the profile diagram of Modular building object, compared with the prior art in manual identified mode, improve the accuracy and efficiency of architecture against regulations identification.)

1. a kind of architecture against regulations recognition methods characterized by comprising

Obtain the corresponding building picture to be identified of building to be identified;

Gray processing processing is carried out to the building picture to be identified, obtains the corresponding gray scale of the building picture to be identified Figure;

Edge detection is carried out to the grayscale image, obtains the corresponding edge picture of the building picture to be identified;

The contour of building figure to be identified is extracted from the edge picture;

According to the match condition of the contour of building figure to be identified and Modular building object profile diagram, the building to be identified is judged It whether is the architecture against regulations.

2. obtaining institute the method according to claim 1, wherein described carry out edge detection to the grayscale image The corresponding edge picture of building picture to be identified is stated, is specifically included:

Gaussian filtering process is carried out to the grayscale image, obtains the filtered grayscale image;

Calculate separately the gradient intensity and gradient direction of each pixel in the grayscale image;

According to the gradient direction and the gradient direction, edge pixel point is determined;

According to the edge pixel point, the corresponding edge picture of the building picture to be identified is determined.

3. according to the method described in claim 2, it is characterized in that, described calculate separately in the filtered grayscale image each The gradient intensity and gradient direction of pixel, specifically include:

According to predetermined gradient strength calculation formula and predetermined gradient direction calculating formula, the gradient intensity and the ladder are calculated Spend direction, wherein the predetermined gradient strength calculation formula is

The predetermined gradient direction calculating formula is

θ=arctan (Gy/Gx),

Gx、GyThe gray value first derivative values in the horizontal direction for respectively indicating any pixel point G and the single order in vertical direction Derivative value.

4. according to the method described in claim 3, it is characterized in that, described according to the gradient direction and the gradient direction, It determines edge pixel point, specifically includes:

Obtain the Direction interval where the gradient direction of any pixel point;

It is described any on the Direction interval to judge whether the gradient intensity of any pixel point is greater than or equal to The gradient intensity of the neighborhood territory pixel point of pixel;

If more than or be equal to, then any pixel point is determined as edge pixel point.

5. according to the method described in claim 4, determination is described wait know it is characterized in that, described according to the edge pixel point The corresponding edge picture of other building picture, specifically includes:

If the corresponding gradient intensity of any edge pixel point is greater than default strong edge point threshold value, by any edge picture Vegetarian refreshments is labeled as strong edge pixel;

If the corresponding gradient intensity of any edge pixel point, which is greater than or equal to, presets weak marginal point threshold value, will it is any described in Edge pixel point is labeled as weak edge pixel point;

If including the strong edge pixel in the weak edge pixel neighborhood of a point pixel, by any edge pixel The label of point is changed to the strong edge pixel from the weak edge pixel point;

According to the strong edge pixel, the edge picture is determined.

6. the method according to claim 1, wherein the contour of building figure to be identified includes multiple to be identified Contour of building, the Modular building object profile diagram include multiple Modular building object profiles;

The match condition according to the contour of building figure to be identified and Modular building object profile diagram, judges described to be identified Whether building is the architecture against regulations, is specifically included:

Multiple contour of building to be identified are matched with multiple Modular building object profiles;

If any one of contour of building to be identified is unsatisfactory for preset matching condition, the building to be identified is described The architecture against regulations, wherein the preset matching condition is

|xi-xj| < F1, | yi-yj| < F2, | si-sj| < F3,

xiAnd xjAny standard contour of building i and any contour of building j to be identified are respectively indicated in the center point coordinate of x-axis, yiAnd yjAny Modular building object profile i and any contour of building j to be identified are respectively indicated in the central point of y-axis Coordinate, siAnd sjRespectively indicate the picture that any Modular building object profile i and any contour of building j to be identified include The quantity of vegetarian refreshments, F1, F2, F3Respectively default first threshold value, default second threshold value violating the regulations and default third threshold value violating the regulations violating the regulations.

7. method according to any one of claim 1 to 6, which is characterized in that the acquisition building to be identified is corresponding Before building picture to be identified, the method also includes:

The building to be identified is obtained in the Modular building object picture of default first time, wherein the Modular building object figure Piece is identical as the camera site of the building picture to be identified;

Extract the corresponding Modular building object profile diagram of the Modular building object picture;

It is described to obtain the corresponding building picture to be identified of building to be identified, it specifically includes:

The building to be identified is obtained in the building picture to be identified of default second time.

8. a kind of architecture against regulations identification device characterized by comprising

Picture to be identified obtains module, for obtaining the corresponding building picture to be identified of building to be identified;

Gray processing module obtains the building to be identified for carrying out gray processing processing to the building picture to be identified The corresponding grayscale image of picture;

It is corresponding to obtain the building picture to be identified for carrying out edge detection to the grayscale image for edge detection module Edge picture;

Profile extraction module, for extracting the contour of building figure to be identified from the edge picture;

Judgment module violating the regulations, for the match condition according to the contour of building figure to be identified and Modular building object profile diagram, Judge whether the building to be identified is the architecture against regulations.

9. a kind of storage medium, is stored thereon with computer program, which is characterized in that realization when described program is executed by processor Architecture against regulations recognition methods described in any one of claims 1 to 7.

10. a kind of computer equipment, including storage medium, processor and storage can be run on a storage medium and on a processor Computer program, which is characterized in that the processor is realized described in any one of claims 1 to 7 when executing described program Architecture against regulations recognition methods.

Technical field

This application involves technical field of image processing, particularly with regard to a kind of architecture against regulations recognition methods and device, deposit Storage media, computer equipment.

Background technique

City is the politics, economy and cultural center of each department, plays and focuses in national economy and social development process It acts on.With the development of social economy and the driving of various interests, miscellaneous Illegal Construction behavior emerges one after another, seriously Ground restricts the development of urbanization.The architecture against regulations has very big harmfulness to City's Construction And Development, is always puzzlement city Develop the thorny problem advanced.Therefore, the architecture against regulations is identified, finds that the architecture against regulations is of great significance as early as possible.

Summary of the invention

In view of this, this application provides a kind of architecture against regulations recognition methods and device, storage medium, computer equipment, Help to improve the accuracy of identification of the architecture against regulations.

According to the one aspect of the application, provides and a kind of obtain the corresponding building picture to be identified of building to be identified;

Gray processing processing is carried out to the building picture to be identified, obtains the corresponding ash of the building picture to be identified Degree figure;

Edge detection is carried out to the grayscale image, obtains the corresponding edge picture of the building picture to be identified;

The contour of building figure to be identified is extracted from the edge picture;

According to the match condition of the contour of building figure to be identified and Modular building object profile diagram, judge described to be identified Whether building is the architecture against regulations.

In the embodiment of the present application, specifically, described that edge detection is carried out to the grayscale image, obtain described to be identified build The corresponding edge picture of object picture is built, is specifically included:

Gaussian filtering process is carried out to the grayscale image, obtains the filtered grayscale image;

Calculate separately the gradient intensity and gradient direction of each pixel in the grayscale image;

According to the gradient direction and the gradient direction, edge pixel point is determined;

According to the edge pixel point, the corresponding edge picture of the building picture to be identified is determined.

In the embodiment of the present application, specifically, described to calculate separately each pixel in the filtered grayscale image Gradient intensity and gradient direction, specifically include:

According to predetermined gradient strength calculation formula and predetermined gradient direction calculating formula, the gradient intensity and institute are calculated State gradient direction, wherein the predetermined gradient strength calculation formula is

The predetermined gradient direction calculating formula is

θ=arctan (Gy/Gx),

Gx、GyRespectively indicate the gray value first derivative values in the horizontal direction of any pixel point G and in vertical direction First derivative values.

In the embodiment of the present application, specifically, described according to the gradient direction and the gradient direction, determine edge picture Vegetarian refreshments specifically includes:

Obtain the Direction interval where the gradient direction of any pixel point;

Described in judging whether the gradient intensity of any pixel point be greater than or equal on the Direction interval The gradient intensity of any pixel neighborhood of a point pixel;

If more than or be equal to, then any pixel point is determined as edge pixel point.

In the embodiment of the present application, specifically, described according to the edge pixel point, determine the building figure to be identified The corresponding edge picture of piece, specifically includes:

If the corresponding gradient intensity of any edge pixel point is greater than default strong edge point threshold value, by any side Edge pixel is labeled as strong edge pixel;

If the corresponding gradient intensity of any edge pixel point, which is greater than or equal to, presets weak marginal point threshold value, will be any The edge pixel point is labeled as weak edge pixel point;

If including the strong edge pixel in the weak edge pixel neighborhood of a point pixel, by any edge The label of pixel is changed to the strong edge pixel from the weak edge pixel point;

According to the strong edge pixel, the edge picture is determined.

In the embodiment of the present application, specifically, the contour of building figure to be identified includes multiple building wheels to be identified Exterior feature, the Modular building object profile diagram include multiple Modular building object profiles;

The match condition according to the contour of building figure to be identified and Modular building object profile diagram, judgement it is described to Whether identification building is the architecture against regulations, is specifically included:

Multiple contour of building to be identified are matched with multiple Modular building object profiles;

If any one of contour of building to be identified is unsatisfactory for preset matching condition, the building to be identified is The architecture against regulations, wherein the preset matching condition is

|xi-xj| < F1, | yi-yj| < F2, | si-sj| < F3

xiAnd xjAny standard contour of building i and any contour of building j to be identified are respectively indicated in the central point of x-axis Coordinate, yiAnd yjAny Modular building object profile i and any contour of building j to be identified are respectively indicated in y-axis Heart point coordinate, siAnd sjRespectively indicating any Modular building object profile i and any contour of building j to be identified includes Pixel quantity, F1, F2, F3Respectively default first threshold value, default second threshold value violating the regulations and default third threshold violating the regulations violating the regulations Value.

In the embodiment of the present application, specifically, before the corresponding building picture to be identified of acquisition building to be identified, The method also includes:

The building to be identified is obtained in the Modular building object picture of default first time, wherein the Modular building Object picture is identical as the camera site of the building picture to be identified;

Extract the corresponding Modular building object profile diagram of the Modular building object picture;

It is described to obtain the corresponding building picture to be identified of building to be identified, it specifically includes:

The building to be identified is obtained in the building picture to be identified of default second time.

According to the another aspect of the application, a kind of architecture against regulations identification device is provided, comprising:

Picture to be identified obtains module, for obtaining the corresponding building picture to be identified of building to be identified;

Gray processing module obtains described to be identified build for carrying out gray processing processing to the building picture to be identified Build the corresponding grayscale image of object picture;

Edge detection module obtains the building picture pair to be identified for carrying out edge detection to the grayscale image The edge picture answered;

Profile extraction module, for extracting the contour of building figure to be identified from the edge picture;

Judgment module violating the regulations, for the matching feelings according to the contour of building figure to be identified and Modular building object profile diagram Condition judges whether the building to be identified is the architecture against regulations.

In the embodiment of the present application, specifically, the edge detection module, specifically includes:

Filter unit obtains the filtered grayscale image for carrying out gaussian filtering process to the grayscale image;

Computing unit, for calculating separately the gradient intensity and gradient direction of each pixel in the grayscale image;

Marginal point determination unit, for determining edge pixel point according to the gradient direction and the gradient direction;

Edge picture determine unit, for determining that the building picture to be identified is corresponding according to the edge pixel point Edge picture.

In the embodiment of the present application, specifically, the computing unit, is specifically used for:

According to predetermined gradient strength calculation formula and predetermined gradient direction calculating formula, the gradient intensity and institute are calculated State gradient direction, wherein the predetermined gradient strength calculation formula is

The predetermined gradient direction calculating formula is

θ=arctan (Gy/Gx),

Gx、GyRespectively indicate the gray value first derivative values in the horizontal direction of any pixel point G and in vertical direction First derivative values.

In the embodiment of the present application, specifically, the marginal point determination unit, specifically includes:

Direction interval obtains subelement, the Direction interval where the gradient direction for obtaining any pixel point;

Judgment sub-unit, for judging whether the gradient intensity of any pixel point is greater than or equal in the side The gradient intensity of any pixel neighborhood of a point pixel on section;

Marginal point determines subelement, for if more than or be equal to, then any pixel point is determined as edge pixel point.

In the embodiment of the present application, specifically, the edge picture determine unit, specifically includes:

Strong edge point marks subelement, presets strong side if being greater than for the corresponding gradient intensity of any edge pixel point Any edge pixel point is then labeled as strong edge pixel by edge point threshold value;

Weak marginal point marks subelement, is greater than or equal in advance if being used for the corresponding gradient intensity of any edge pixel point If weak marginal point threshold value, then any edge pixel point is labeled as weak edge pixel point;

Flag update subelement, if for including the strong edge pixel in the weak edge pixel neighborhood of a point pixel The label of any edge pixel point is then changed to the strong edge pixel from the weak edge pixel point by point;

Edge picture determines subelement, for determining the edge picture according to the strong edge pixel.

In the embodiment of the present application, specifically, the contour of building figure to be identified includes multiple building wheels to be identified Exterior feature, the Modular building object profile diagram include multiple Modular building object profiles;

The judgment module violating the regulations, specifically includes:

Outline unit, for will multiple contour of building to be identified and multiple Modular building object profiles into Row matching;

Judging unit violating the regulations, if being unsatisfactory for preset matching condition for any one of contour of building to be identified, The building to be identified is the architecture against regulations, wherein the preset matching condition is

|xi-xj| < F1, | yi-yj| < F2, | si-sj| < F3

xiAnd xjAny standard contour of building i and any contour of building j to be identified are respectively indicated in the central point of x-axis Coordinate, yiAnd yjAny Modular building object profile i and any contour of building j to be identified are respectively indicated in y-axis Heart point coordinate, siAnd sjRespectively indicating any Modular building object profile i and any contour of building j to be identified includes Pixel quantity, F1, F2, F3Respectively default first threshold value, default second threshold value violating the regulations and default third threshold violating the regulations violating the regulations Value.

In the embodiment of the present application, specifically, described device further include:

Normal pictures obtain module, are used for before the corresponding building picture to be identified of acquisition building to be identified, The building to be identified is obtained in the Modular building object picture of default first time, wherein the Modular building object picture with The camera site of the building picture to be identified is identical;

Nominal contour extraction module, for extracting the corresponding Modular building object profile of the Modular building object picture Figure;

The picture to be identified obtains module, specifically for obtaining the building to be identified in the institute of default second time State building picture to be identified.

According to the application another aspect, a kind of storage medium is provided, computer program, described program are stored thereon with Above-mentioned architecture against regulations recognition methods is realized when being executed by processor.

According to the application another aspect, a kind of computer equipment is provided, including storage medium, processor and be stored in On storage medium and the computer program that can run on a processor, the processor are realized above-mentioned violating the regulations when executing described program Building recognition method.

By above-mentioned technical proposal, a kind of architecture against regulations recognition methods and device, storage medium, calculating provided by the present application Machine equipment carries out gray processing processing to building picture to be identified, using treated grayscale image carry out edge detection obtain to Identify the corresponding edge picture of building, and extract the profile diagram of building to be identified from edge picture, thus using to Identification contour of building figure is compared with Modular building object profile diagram, analyzes whether building to be identified is the architecture against regulations.This Application analyzes building to be identified according to the match condition of the profile diagram of the profile diagram and Modular building object of building to be identified It is no violating the regulations, compared with the prior art in manual identified mode, improve the accuracy and efficiency of architecture against regulations identification.

Above description is only the general introduction of technical scheme, in order to better understand the technological means of the application, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects, features and advantages of the application can It is clearer and more comprehensible, below the special specific embodiment for lifting the application.

Detailed description of the invention

The drawings described herein are used to provide a further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please are not constituted an undue limitation on the present application for explaining the application.In the accompanying drawings:

Fig. 1 shows a kind of flow diagram of architecture against regulations recognition methods provided by the embodiments of the present application;

Fig. 2 shows the flow diagrams of another architecture against regulations recognition methods provided by the embodiments of the present application;

Fig. 3 shows a kind of structural schematic diagram of architecture against regulations identification device provided by the embodiments of the present application;

Fig. 4 shows the structural schematic diagram of another architecture against regulations identification device provided by the embodiments of the present application.

Specific embodiment

The application is described in detail below with reference to attached drawing and in conjunction with the embodiments.It should be noted that not conflicting In the case of, the features in the embodiments and the embodiments of the present application can be combined with each other.

A kind of architecture against regulations recognition methods is provided in the present embodiment, as shown in Figure 1, this method comprises:

Step 101, the corresponding building picture to be identified of building to be identified is obtained.

Architecture against regulations recognition methods provided by the embodiments of the present application carries out the picture of same building object in different time points Therefore comparison identification, is carrying out identifying it to judge whether building to be identified generates violation phenomenon within a certain period of time Before, need to obtain the corresponding building picture to be identified of building to be identified, and scale it to pre-set dimension subsequent to carry out Video procession.Since most depth of building is higher, the embodiment of the present application is carried out by the way of unmanned plane Building picture collection.

Step 102, gray processing processing is carried out to building picture to be identified, obtains the corresponding ash of building picture to be identified Degree figure.

After getting building picture to be identified, gray processing processing is carried out, colored picture is made to become grayscale image, side Just the video procession of next step is carried out.The embodiment of the present application provides two kinds of gray processing processing methods.First, maximum value Method: using the maximum value in the RGB three-component brightness of each pixel in building picture to be identified as the ash of corresponding pixel points Angle value obtains the corresponding grayscale image of building picture to be identified;Second, mean value method: will be each in building picture to be identified It is corresponding to obtain building picture to be identified for gray value of the average value of the RGB three-component brightness of pixel as corresponding pixel points Grayscale image.The embodiment of the present application can also be using other gray scale processing methods, it is not limited here.

Step 103, edge detection is carried out to grayscale image, obtains the corresponding edge picture of building picture to be identified.

By edge detection method, the marginal point in building grayscale image to be identified is found out, to obtain building to be identified The corresponding edge picture of object picture, such as edge picture can reflect out the marginal informations such as the wall of building to be identified, forms.

Step 104, contour of building figure to be identified is extracted from edge picture.

The profile diagram of building to be identified is extracted from edge picture, the profile that profile diagram can reflect out building is special Property, such as the forms profile of building, the top profile of building etc..

Step 105, according to the match condition of contour of building figure to be identified and Modular building object profile diagram, judge to be identified Whether building is the architecture against regulations.

It is matched, is sentenced with contour of building figure to be identified using the Modular building object profile diagram of same building to be identified Whether the profile of building to be identified of breaking changes, if profile changes, illustrates that building to be identified is changed, There may be the architectures against regulations, if profile does not change, i.e., the profile and Modular building object wheel of contour of building figure to be identified The profile of wide figure matches, then illustrates that building to be identified does not change, do not generate the architecture against regulations.

Technical solution by applying this embodiment carries out gray processing processing to building picture to be identified, utilizes processing Grayscale image afterwards carries out edge detection and obtains the corresponding edge picture of building to be identified, and extracts from edge picture wait know The profile diagram of other building, to be compared using contour of building figure to be identified with Modular building object profile diagram, analysis to Identify whether building is the architecture against regulations.The application is according to the profile diagram of building to be identified and the profile diagram of Modular building object Match condition analyzes whether building to be identified breaks rules and regulations, compared with the prior art in manual identified mode, improve violating the regulations build Build the accuracy and efficiency of identification.

Further, as the refinement and extension of above-described embodiment specific embodiment, in order to completely illustrate the present embodiment Specific implementation process, provide another architecture against regulations recognition methods, as shown in Fig. 2, this method comprises:

Step 201, the corresponding building picture to be identified of building to be identified is obtained.

Step 202, gray processing processing is carried out to building picture to be identified, obtains the corresponding ash of building picture to be identified Degree figure.

In the embodiment of the present application, gray processing is carried out to the building picture to be identified got, obtains building to be identified The corresponding grayscale image of object picture.

Step 203, gaussian filtering process is carried out to grayscale image, obtains filtered grayscale image.

In the embodiment of the present application step 203, specifically, according to default Gauss weighted value, to picture each in grayscale image The corresponding gray value of the neighborhood territory pixel of the gray value of vegetarian refreshments and each pixel point is weighted summation, obtains each pixel Gaussian Blur value, Gaussian Blur value is determined as to the new gray value of each pixel in grayscale image.According to each pixel New gray value, that is, can determine filtered grayscale image.Wherein, the neighbour of the gray value to a certain pixel and the pixel Pixel corresponding gray value in domain is weighted summation and refers to and add to the Q × Q pixel constituted centered on a certain pixel Power summation, i.e., the neighborhood territory pixel point of a certain pixel refer in the Q × Q pixel constituted centered on a certain pixel except certain Whole pixels outside one pixel.

Gauss weighted value is preset according to formulaIt calculates, wherein indicated with coordinate points (x, y) Any pixel point, is constituted one 3 × 3 neighborhood centered on the pixel, and the coordinate of central point is (0,0), consecutive points coordinate For

(- 1, -1) (0, -1) (1, -1)
(- 1,0) (0,0) (1,0)
(- 1,1) (0,1) (1,1)

,

Variances sigma is set in the embodiment of the present application2For 0.64 (value without limitation, is only for example herein), then according to above-mentioned The Gauss weighted value that formula is calculated is

0.052 0.114 0.052
0.114 0.249 0.114
0.052 0.114 0.052

,

Above-mentioned Gauss weighted value is normalized, obtaining standard gaussian weighted value is

0.057 0.125 0.057
0.125 0.272 0.125
0.057 0.125 0.057

Using above-mentioned standard gaussian weighted value as the default Gauss weighted value of the embodiment of the present application, for each pixel For, 9 pixels of 3 × 3 neighborhoods centered on the pixel are taken, respectively according to default Gauss weighted value to this 9 pictures The gray value of vegetarian refreshments is weighted summation, by the Gaussian Blur value of pixel centered on weighted sum result, by each pixel The Gaussian Blur value of point obtains filtered grayscale image as the gray value of this pixel.

Such as the gray value of 9 pixels of 3 × 3 neighborhoods is

82 100 89
86 98 92
87 97 89

,

After being weighted respectively to the gray value of each pixel, the gray value of each pixel is

82×0.057 100×0.125 89×0.057
86×0.125 98×0.272 92×0.125
87×0.057 97×0.125 89×0.057

,

Above-mentioned each weighted grey-value is carried out summation the Gaussian Blur value of central point can be obtained being 93.31.

Step 204, the gradient intensity and gradient direction of each pixel in grayscale image are calculated separately.

In the embodiment of the present application, specifically, according to predetermined gradient strength calculation formula and predetermined gradient telegoniometer Formula is calculated, gradient intensity and gradient direction are calculated, wherein predetermined gradient strength calculation formula is

Predetermined gradient direction calculating formula is

θ=arctan (Gy/Gx),

Gx, Gy respectively indicate the gray value first derivative values in the horizontal direction of any pixel point G and in vertical direction First derivative values.

Step 205, the Direction interval where the gradient direction of any pixel point is obtained.

Step 206, judge whether the gradient intensity of any pixel point is greater than or equal to any pixel on Direction interval The gradient intensity of neighborhood of a point pixel.

Step 207, if more than or be equal to, then any pixel point is determined as edge pixel point.

The Architectural fringes in grayscale image in order to find building to be identified pass through above-mentioned gradient direction calculation formula meter After the gradient direction for calculating each pixel, according to preset Direction interval, the corresponding direction area of each pixel is determined respectively Between, and then for any one pixel, centered on gradient intensity and the pixel for obtaining the pixel respectively The corresponding gradient intensity of identical with the Direction interval of central pixel point pixel, judges the center pixel in 3 × 3 neighborhood Whether the gradient intensity of point is greatest gradient intensity in neighborhood territory pixel point on corresponding Direction interval, if so, illustrating this Point may be the marginal position of building, then the central pixel point is determined as edge pixel point, is brought with eliminating edge detection Spurious response.

Such as dividing 0 °~45 °, 45 °~90 °, 0 °~-45 °, -45 °~-90 ° is 4 Direction intervals, it respectively will be each The gradient direction of pixel corresponds in one of Direction interval, it is assumed that the gradient direction of a certain pixel is at 0 °~45 ° In Direction interval, then obtaining the ladder of each pixel of 3 × 3 neighborhood of central pixel point using the pixel as center pixel Direction is spent, and obtains corresponding gradient intensity when the gradient direction of each pixel of neighborhood is in 0 °~45 ° Direction intervals, Whether the gradient intensity of analysis center's pixel is greater than or equal to each pixel of the neighborhood in 0 °~45 ° Direction intervals Gradient intensity, if more than or be equal to, then the central pixel point is denoted as edge pixel point.

Step 208, if the corresponding gradient intensity of any edge pixel is greater than default strong edge point threshold value, by any side Edge pixel is labeled as strong edge pixel.

After determining edge pixel point by step 205 to step 207, in order to further enhance the accurate of edge pixel point Property, need the gradient intensity to edge pixel to be compared with default strong edge point threshold value, if the gradient of edge pixel point is strong Degree is greater than default strong edge point threshold value, illustrates that the pixel is more apparent building edge contour point, then the pixel is low Labeled as strong edge pixel.

It step 209, will if the corresponding gradient intensity of any edge pixel, which is greater than or equal to, presets weak marginal point threshold value Any edge pixel is labeled as weak edge pixel point.

Step 210, if including strong edge pixel in weak edge pixel neighborhood of a point pixel, by any edge pixel The label of point is changed to strong edge pixel from weak edge pixel point.

And if the gradient intensity of any edge pixel is less than default strong edge point threshold value and is greater than or equal to and presets weak edge Point threshold value, illustrates that the pixel may be the edge contour point of building, it is also possible to be mistaken for edge contour point, then should Pixel is labeled as weak edge pixel point, and is further judged weak edge pixel point, if specific weak edge pixel point Include strong edge pixel in neighborhood territory pixel point, illustrates then should in the pixel neighborhood of a point there are building edge contour point The label of pixel is changed to strong edge pixel, so that it is determined that true and potential marginal point.

It should be noted that if the gradient intensity of any edge pixel, which is less than, presets weak marginal point threshold value, illustrate the point It may be mistaken for edge pixel point, then directly abandoned, in addition, if not including in weak edge pixel neighborhood of a point pixel Strong edge pixel also directly abandons the weak edge pixel point.

Step 211, according to strong edge pixel, edge picture is determined.

Using whole strong edge pixels, the corresponding edge picture of building to be identified is determined, which can Reflect the edge contour situation of building to be identified.

Step 212, contour of building figure to be identified is extracted from edge picture.

In the embodiment of the present application, edge picture is input in find Contours kit, find is utilized Contours kit extracts the profile diagram of building to be identified from edge picture.Wherein, contour of building figure to be identified Comprising multiple contour of building to be identified, Modular building object profile diagram includes multiple Modular building object profiles.

In addition, in the embodiment of the present application, using unmanned plane technology, respectively at specific two time points, in phase The picture that building to be identified is shot at same position obtains the corresponding building figure to be identified of building to be identified in step 201 Before piece, further includes: obtain building to be identified in the Modular building object picture of default first time, wherein Modular building object Picture is identical as the camera site of building picture to be identified;The corresponding Modular building object profile of extraction standard building picture Figure.Wherein, the method for the corresponding Modular building object profile diagram of extraction standard building picture and said extracted building to be identified The method of profile diagram is consistent, and details are not described herein.The embodiment of the present application can also directly using FCN semantic segmentation network model or Example divides the model realizations contours extracts such as network MaskR-CNN, and building picture to be identified or Modular building object picture is straight It connects and is input in model, you can get it corresponding profile diagram.

In addition, based on above-mentioned explanation, step 201 is answered are as follows: obtain building to be identified in default second time wait know Other building picture.

Step 213, multiple contour of building to be identified are matched with multiple Modular building object profiles;If any one Contour of building to be identified is unsatisfactory for preset matching condition, then building to be identified is the architecture against regulations, wherein preset matching condition For

|xi-xj| < F1, | yi-yj| < F2, | si-sj| < F3

Xi and xj respectively indicates any standard contour of building i and any contour of building j to be identified in the central point of x-axis Coordinate, yi and yj respectively indicate any standard contour of building i and any contour of building j to be identified and sit in the central point of y-axis Mark, si and sj respectively indicate the number for the pixel that any standard contour of building i and any contour of building j to be identified include Amount, F1, F2, F3 are respectively the default first threshold value, default second threshold value violating the regulations and default third threshold value violating the regulations violating the regulations.

In the embodiment of the present application, Modular building object profile diagram and contour of building figure to be identified have separately included multiple wheels Exterior feature, the identification process to the architecture against regulations is substantially each profile based on criterion of identification building, judges building to be identified Profile whether have occurred more apparent variation, if significant change has occurred, illustrating building to be identified, there may be disobey Chapter is built, if significant change does not occur, illustrates that building to be identified does not generate violating the regulations build.Specifically judge building to be identified The whether changed judgment criteria of profile be above-mentioned preset matching condition.

Specific judgment step can be with are as follows: S1, respectively by each of contour of building figure to be identified profile information Mi with Each of Modular building object profile diagram profile information Nj compares;S2, for any one in contour of building figure to be identified For a profile Mi, if there is any one Nj, the absolute value for meeting xi-xj is less than F1, and the absolute value of yi-yj is less than F2, The absolute value of si-sj is less than F3, then building to be identified does not have architecture against regulations generation in this period;S3, otherwise, i.e., if deposited In any one Nj, the absolute value for meeting xi-xj is greater than or equal to F1, and the absolute value of yi-yj is greater than or equal to F2, si-sj's Absolute value is greater than or equal to F3, any one or more in this 3 conditions, then building to be identified has generated in this period The architecture against regulations.

Technical solution by applying this embodiment carries out gray processing processing to building picture to be identified, utilizes processing Rear grayscale image carries out gaussian filtering process, with smoothed image, filters out noise, so according to the gradient intensity of each pixel and Gradient direction determines edge pixel point, and eliminates edge detection bring by the way of non-maxima suppression and dual threshold detection Spurious response isolates weak edge and determines really and potential edge, to obtain the profile diagram of building to be identified, using to Identification contour of building figure carries out multidimensional with Modular building object profile diagram and compares, and analyzes whether building to be identified is violating the regulations build It builds, finally improves the accuracy of identification of the architecture against regulations.

Further, the specific implementation as Fig. 1 method, the embodiment of the present application provide a kind of architecture against regulations identification dress It sets, as shown in figure 3, the device includes: that picture to be identified obtains module 31, gray processing module 32, edge detection module 33, profile Extraction module 34, judgment module 35 violating the regulations.

Picture to be identified obtains module 31, for obtaining the corresponding building picture to be identified of building to be identified;

Gray processing module 32 obtains building figure to be identified for carrying out gray processing processing to building picture to be identified The corresponding grayscale image of piece;

Edge detection module 33 obtains the corresponding side of building picture to be identified for carrying out edge detection to grayscale image Edge picture;

Profile extraction module 34, for extracting contour of building figure to be identified from edge picture;

Judgment module 35 violating the regulations, for the matching feelings according to contour of building figure to be identified and Modular building object profile diagram Condition judges whether building to be identified is the architecture against regulations.

In the embodiment of the present application, specifically, as shown in figure 4, edge detection module 33, specifically includes: filter unit 331, computing unit 332, marginal point determination unit 333, edge picture determine unit 334.

Filter unit 331 obtains filtered grayscale image for carrying out gaussian filtering process to grayscale image;

Computing unit 332, for calculating separately the gradient intensity and gradient direction of each pixel in grayscale image;

Marginal point determination unit 333, for determining edge pixel point according to gradient direction and gradient direction;

Edge picture determine unit 334, for determining the corresponding edge of building picture to be identified according to edge pixel point Picture.

In the embodiment of the present application, specifically, computing unit 332 are specifically used for according to predetermined gradient strength calculation formula And predetermined gradient direction calculating formula, calculate gradient intensity and gradient direction, wherein predetermined gradient strength calculation formula is

Predetermined gradient direction calculating formula is

θ=arctan (Gy/Gx),

Gx, Gy respectively indicate the gray value first derivative values in the horizontal direction of any pixel point G and in vertical direction First derivative values.

In the embodiment of the present application, specifically, marginal point determination unit 333, specifically includes: Direction interval obtains subelement 3331, judgment sub-unit 3332, marginal point determine subelement 3333.

Direction interval obtains subelement 3331, the Direction interval where gradient direction for obtaining any pixel point;

Judgment sub-unit 3332, for judging whether the gradient intensity of any pixel point is greater than or equal in Direction interval Any pixel neighborhood of a point pixel gradient intensity;

Marginal point determines subelement 3333, for if more than or be equal to, then any pixel point is determined as edge pixel point.

In the embodiment of the present application, specifically, edge picture determine unit 334, specifically includes: strong edge point label is single Member 3341, weak marginal point label subelement 3342, flag update subelement 3343, edge picture determine subelement 3344.In figure It is not shown.

Strong edge point marks subelement 3341, presets strong side if being greater than for the corresponding gradient intensity of any edge pixel Any edge pixel is then labeled as strong edge pixel by edge point threshold value;

Weak marginal point marks subelement 3342, if being greater than or equal to for the corresponding gradient intensity of any edge pixel pre- If weak marginal point threshold value, then any edge pixel is labeled as weak edge pixel point;

Flag update subelement 3343, if for including strong edge pixel in weak edge pixel neighborhood of a point pixel, The label of any edge pixel is then changed to strong edge pixel from weak edge pixel point;

Edge picture determines subelement 3344, for determining edge picture according to strong edge pixel.

In the embodiment of the present application, specifically, contour of building figure to be identified includes multiple contour of building to be identified, mark Quasi- contour of building figure includes multiple Modular building object profiles;

Judgment module 35 violating the regulations, specifically includes: outline unit 351, judging unit 352 violating the regulations.

Outline unit 351 is used for multiple contour of building to be identified and the progress of multiple Modular building object profiles Match;

Judging unit 352 violating the regulations, if being unsatisfactory for preset matching condition for any one contour of building to be identified, to Identification building is the architecture against regulations, wherein preset matching condition is

|xi-xj| < F1, | yi-yj| < F2, | si-sj| < F3,

Xi and xj respectively indicates any standard contour of building i and any contour of building j to be identified in the central point of x-axis Coordinate, yi and yj respectively indicate any standard contour of building i and any contour of building j to be identified and sit in the central point of y-axis Mark, si and sj respectively indicate the number for the pixel that any standard contour of building i and any contour of building j to be identified include Amount, F1, F2, F3 are respectively the default first threshold value, default second threshold value violating the regulations and default third threshold value violating the regulations violating the regulations.

In the embodiment of the present application, specifically, device further include: normal pictures obtain module 36, nominal contour extracts mould Block 37.

Normal pictures obtain module 36, for obtaining before obtaining the corresponding building picture to be identified of building to be identified Take building to be identified in the Modular building object picture of default first time, wherein Modular building object picture and building to be identified The camera site of object picture is identical;

Nominal contour extraction module 37 is used for the corresponding Modular building object profile diagram of extraction standard building picture;

Picture to be identified obtains module 31, builds specifically for obtaining building to be identified in default the to be identified of second time Build object picture.

It should be noted that each functional unit involved by a kind of architecture against regulations identification device provided by the embodiments of the present application Other are accordingly described, can be with reference to the corresponding description in Fig. 1 and Fig. 2, and details are not described herein.

Based on above-mentioned method as depicted in figs. 1 and 2, correspondingly, the embodiment of the present application also provides a kind of storage medium, On be stored with computer program, which realizes above-mentioned architecture against regulations identification side as depicted in figs. 1 and 2 when being executed by processor Method.

Based on this understanding, the technical solution of the application can be embodied in the form of software products, which produces Product can store in a non-volatile memory medium (can be CD-ROM, USB flash disk, mobile hard disk etc.), including some instructions With so that computer equipment (can be personal computer, server or the network equipment an etc.) execution the application is each Method described in implement scene.

Based on above-mentioned method as shown in Figure 1 and Figure 2 and Fig. 3, virtual bench embodiment shown in Fig. 4, in order to realize Above-mentioned purpose, the embodiment of the present application also provides a kind of computer equipments, are specifically as follows personal computer, server, network Equipment etc., the computer equipment include storage medium and processor;Storage medium, for storing computer program;Processor is used In execution computer program to realize above-mentioned architecture against regulations recognition methods as depicted in figs. 1 and 2.

Optionally, which can also include user interface, network interface, camera, radio frequency (Radio Frequency, RF) circuit, sensor, voicefrequency circuit, WI-FI module etc..User interface may include display screen (Display), input unit such as keyboard (Keyboard) etc., optional user interface can also connect including USB interface, card reader Mouthful etc..Network interface optionally may include standard wireline interface and wireless interface (such as blue tooth interface, WI-FI interface).

It will be understood by those skilled in the art that a kind of computer equipment structure provided in this embodiment is not constituted to the meter The restriction for calculating machine equipment, may include more or fewer components, perhaps combine certain components or different component layouts.

It can also include operating system, network communication module in storage medium.Operating system is management and preservation computer The program of device hardware and software resource supports the operation of message handling program and other softwares and/or program.Network communication Module is for realizing the communication between each component in storage medium inside, and between other hardware and softwares in the entity device Communication.

Through the above description of the embodiments, those skilled in the art can be understood that the application can borrow Help software that the mode of necessary general hardware platform is added to realize, can also by hardware realization to building picture to be identified into The processing of row gray processing, using treated, grayscale image progress edge detection obtains the corresponding edge picture of building to be identified, and The profile diagram of building to be identified is extracted from edge picture, to utilize contour of building figure to be identified and Modular building object Profile diagram is compared, and analyzes whether building to be identified is the architecture against regulations.The application is according to the profile diagram of building to be identified Analyze whether building to be identified breaks rules and regulations with the match condition of the profile diagram of Modular building object, compared with the prior art in it is artificial Identification method improves the accuracy and efficiency of architecture against regulations identification.

It will be appreciated by those skilled in the art that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, module in attached drawing or Process is not necessarily implemented necessary to the application.It will be appreciated by those skilled in the art that the mould in device in implement scene Block can according to implement scene describe be distributed in the device of implement scene, can also carry out corresponding change be located at be different from In one or more devices of this implement scene.The module of above-mentioned implement scene can be merged into a module, can also be into one Step splits into multiple submodule.

Above-mentioned the application serial number is for illustration only, does not represent the superiority and inferiority of implement scene.Disclosed above is only the application Several specific implementation scenes, still, the application is not limited to this, and the changes that any person skilled in the art can think of is all The protection scope of the application should be fallen into.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:图像特征提取方法和装置、图像处理方法和装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!