CN114943770B - Visual positioning method and system based on artificial intelligence and building information - Google Patents

Visual positioning method and system based on artificial intelligence and building information Download PDF

Info

Publication number
CN114943770B
CN114943770B CN202210881111.2A CN202210881111A CN114943770B CN 114943770 B CN114943770 B CN 114943770B CN 202210881111 A CN202210881111 A CN 202210881111A CN 114943770 B CN114943770 B CN 114943770B
Authority
CN
China
Prior art keywords
window
image
obtaining
straight line
inclination angle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210881111.2A
Other languages
Chinese (zh)
Other versions
CN114943770A (en
Inventor
黄静
程荷娟
薛强
李金伟
何鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Philpo Internet Of Things Co ltd
Original Assignee
Jiangsu Philpo Internet Of Things Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Philpo Internet Of Things Co ltd filed Critical Jiangsu Philpo Internet Of Things Co ltd
Priority to CN202210881111.2A priority Critical patent/CN114943770B/en
Publication of CN114943770A publication Critical patent/CN114943770A/en
Application granted granted Critical
Publication of CN114943770B publication Critical patent/CN114943770B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • G06V10/763Non-hierarchical techniques, e.g. based on statistics of modelling distributions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Abstract

The invention relates to the technical field of artificial intelligence, in particular to a visual positioning method and a visual positioning system based on artificial intelligence and building information. The method comprises the steps of segmenting an elevation building image in an environment image through a plurality of global thresholds to obtain a plurality of first threshold segmentation images. Obtaining a window connected domain according to the first threshold segmentation image, constructing an inclination angle matrix according to the window connected domain, readjusting the distribution of the window connected domain according to the transverse inclination angle and the longitudinal inclination angle between central points of the window connected domain in the inclination angle matrix to obtain an array form, and screening out an optimal threshold segmentation image according to the array degree of the array form. And obtaining the distribution characteristics of the window through the array form in the optimal threshold segmentation image and the size of the window connected domain, and obtaining the current environment position according to the distribution characteristics. The invention can accurately obtain the distribution characteristics by segmenting the information in the image through the optimal threshold value with rich information, and can quickly and simply obtain the current environment position according to the distribution characteristics.

Description

Visual positioning method and system based on artificial intelligence and building information
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a visual positioning method and a visual positioning system based on artificial intelligence and building information.
Background
The outdoor positioning is widely applied, and common outdoor positioning multidimensional GPS positioning, wireless network positioning, visual positioning and the like are adopted. The position of the target can be accurately obtained through visual positioning, and a fine position can be obtained through the characteristics in the visual image.
Common visual positioning methods often identify buildings in an image or look for landmark buildings in an image as specific image features. The method has more processing targets and higher difficulty, and is difficult to identify the whole building by images with different visual angles and brightness, so that accurate image characteristics cannot be obtained for position acquisition.
Disclosure of Invention
In order to solve the above technical problems, an object of the present invention is to provide a visual positioning method and system based on artificial intelligence and building information, wherein the adopted technical scheme is as follows:
the invention provides a visual positioning method based on artificial intelligence and building information, which comprises the following steps:
obtaining an environment image; extracting a front-view building image with the maximum front-view degree in the environment image; segmenting the front view building image through a plurality of global thresholds to obtain a plurality of first threshold segmentation images;
segmenting the image according to the first threshold value to obtain a window connected domain; constructing an inclination angle matrix according to the central point of the window connected domain; each element in the tilt angle matrix is an angle of a connecting line between central points of a window communicating domain; obtaining a transverse inclination angle and a longitudinal inclination angle between central points of the window communication domain according to the inclination angle matrix; readjusting the distribution of the center points of the window connected domain according to the transverse inclination angle and the longitudinal inclination angle to obtain an array form of the window connected domain; obtaining an array degree of the array format; taking the first threshold segmentation image corresponding to the array form with the maximum array degree as an optimal threshold segmentation image;
obtaining the distribution characteristics of the window through the array form in the optimal threshold segmentation image and the size of the window connected domain; and obtaining the current environment position according to the distribution characteristics.
Further, the extracting of the most front-view building image of the environment images includes:
inputting the environment image into a pre-trained example segmentation network, and outputting a plurality of building images;
and sending the building image into a pre-trained front-view degree judging network, outputting the front-view degree of each building image, and obtaining the building image with the maximum front-view degree as the front-view building image.
Further, the obtaining the window connected component according to the first threshold segmentation image comprises:
obtaining the sum of pixel values of each column in the first threshold segmentation image, and setting the sum of the pixel values smaller than a preset pixel value threshold to be zero; constructing column pixels and a curve according to the sum of the pixel values; the horizontal coordinates of the row pixels and the curve are rows, and the vertical coordinates of the row pixels and the curve are the sum of the pixel values corresponding to each row; obtaining a window area containing a row of windows according to the row of pixels and the extreme position of the curve; obtaining the window connected domain in each window area.
Further, the obtaining the window connected component in each window area further includes:
constructing a sliding window by taking the window communicating region size of each column of the closest rectangle as the sliding window size corresponding to the window communicating region; setting position weight according to the distance between each position in the sliding window and the central point of the sliding window, wherein the position weight is larger when the distance is larger;
processing the window connected domain according to the sliding window; when the mean value of the position weights in the sliding window is larger than a preset weight threshold value, setting the pixel value of a pixel point in the sliding window to be 1; otherwise it is set to 0.
Further, the obtaining the transverse inclination angle and the longitudinal inclination angle between the central points of the window communication domain according to the inclination angle matrix comprises:
counting element values in the inclination angle matrix to obtain a horizontal straight line and a vertical straight line; clustering the angles of the horizontal straight lines and the vertical straight lines;
obtaining the transverse inclination angle according to the clustering center of the horizontal straight line; and obtaining the longitudinal inclination angle according to the clustering center of the vertical straight line.
Further, the readjusting the distribution of the center points of the window connected components according to the lateral inclination angle and the longitudinal inclination angle to obtain the array form of the window connected components includes:
fitting each row of the center points of the window communication areas by using the longitudinal straight line where the longitudinal inclination angle is located; taking the longitudinal straight line with the minimum centrifugal distance between the window communication center point and the longitudinal straight line as the column straight line in the array form; transversely moving the window communication center point, the distance between which is less than a distance threshold value, and the column straight line to the column straight line;
fitting each row of the center points of the window communication domain by using a transverse straight line where the transverse inclination angle is located; taking the transverse straight line with the minimum centrifugal distance between the central point of the window communication domain and the transverse straight line as the row straight line of the array form; and on the basis of the column straight line, longitudinally moving the window communication center point, the distance between which and the row straight line is less than a distance threshold value, to the row straight line to obtain the array form.
Further, the obtaining the array degree of the window connected domain according to the array form comprises:
multiplying the number of the column straight lines and the number of the row straight lines to obtain the number of the intersection points in the array form;
and taking the ratio of the number of the center points of the window communication domain on the array form to the number of the intersection points as the array degree.
Further, after the first threshold segmentation image corresponding to the array form with the largest array degree is taken as an optimal threshold segmentation image, the method further includes:
taking the central point of the window communication domain which is not on the array form as an additional point; fitting the additional points based on the longitudinal inclination angle to obtain additional columns; adding the additional columns to the array format to obtain a complete array format.
Further, the obtaining the distribution characteristics of the windows in the form of the array in the optimal threshold segmentation image comprises:
taking the row containing the most central points of the window communicating areas in the complete array form as a reference row; obtaining a transverse interval and a longitudinal interval between each window communication domain center point in the reference row; obtaining the aspect ratio of the corresponding window connected domain in the reference row; obtaining the distribution characteristic from the lateral spacing, the longitudinal spacing, and the aspect ratio.
The invention also provides a visual positioning system based on artificial intelligence and building information, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, and is characterized in that the processor implements any one of the steps of the visual positioning method based on artificial intelligence and building information when executing the computer program.
The invention has the following beneficial effects:
1. the embodiment of the invention obtains the distribution characteristics of the building windows in an array form by segmenting the images through the optimal threshold value. The window characteristic content in the optimal threshold segmentation image is rich, and the visual angle error and the segmentation error of the window connected domain can be eliminated by adjusting the distribution of the central points of the window connected domain in an array form. Finally, the distribution characteristics of the windows are obtained through the array form and the sizes of the window communication domains, and the current environment position is obtained through the accurate window distribution characteristics.
2. According to the embodiment of the invention, the first threshold segmentation image is screened according to the array degree of the array form, so that the optimal threshold segmentation image is obtained. The optimal threshold segmentation image contains window features with rich contents, and better window features can be obtained under the influence of image brightness for position analysis.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flowchart of a visual positioning method based on artificial intelligence and building information according to an embodiment of the present invention;
FIG. 2 is an environmental image of a daytime environment provided by an embodiment of the present invention;
FIG. 3 is an environmental image of a night environment provided by an embodiment of the present invention;
FIG. 4 is a diagram illustrating a first threshold segmentation image according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a column of pixels and curves provided by an embodiment of the present invention;
FIG. 6 is a schematic diagram of an array format according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a complete array format according to an embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description, structures, features and effects of a visual positioning method and system based on artificial intelligence and building information according to the present invention will be provided with reference to the accompanying drawings and preferred embodiments. In the following description, the different references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following describes a specific scheme of a visual positioning method and system based on artificial intelligence and building information in detail with reference to the accompanying drawings.
The application scenarios of the embodiment of the invention are as follows: a clear image of the environment including the building is taken outdoors. And analyzing and positioning through the environment image to obtain the position of the shooting point.
Referring to fig. 1, a flowchart of a visual positioning method based on artificial intelligence and building information according to an embodiment of the present invention is shown, where the method includes:
step S1: obtaining an environment image; extracting a front-view building image with the maximum front-view degree in the environment image; and obtaining a plurality of first threshold segmentation images by segmenting the front-view building image through a plurality of global thresholds.
In an embodiment of the present invention, to ensure the integrity of the building and surrounding environment, a wide-angle camera is used to obtain an environmental image. The environment image contains complete or information-rich building information.
In order to avoid the error of the image analysis by the view angle, the front-view building image with the maximum front-view degree in the environment image needs to be obtained for analysis, and the positioning accuracy is improved. The method for acquiring the front view building image comprises the following steps:
and inputting the environment image into a pre-trained example segmentation network, and outputting a plurality of building images. And sending the building images into a pre-trained front-view degree judging network, outputting the front-view degree of each building image, and obtaining the building image with the maximum front-view degree as the front-view building image.
In the embodiment of the invention, the specific training method of the example segmentation network comprises the following steps:
1) A plurality of images including building information are used as training data. And (5) marking the pixel points of different buildings in an increasing way from 1, and marking the other building pixel points as 0 to obtain marked data.
2) The example segmentation network adopts a deep neural network, and the structure is an encoding-decoding structure. And inputting the training data and the labeling data after normalization into an instance segmentation encoder for feature extraction to obtain a feature vector. The example segmentation decoder performs a decoding operation on the feature vectors to obtain an example segmentation map. The example segmentation map is a mask image for each building. And multiplying the example segmentation image and the environment image to obtain a plurality of building images. Each building image contains only one piece of building information.
3) The example segmentation network is trained using a cross entropy loss function.
In the embodiment of the invention, the specific training method of the front sight degree discrimination network comprises the following steps:
1) Building images containing a single building are used as training data, and the corresponding normal vision degree of each training data is used as corresponding label data.
2) The emmetropia degree judging network adopts a deep neural network and is in a coding-full connection structure. And sending the training data and the label data into an emmetropia degree judging encoder to extract features, and obtaining a feature map. And (4) regressing the corresponding orthographic degree of the characteristic diagram through a single neuron of the full connection layer.
3) And the emmetropia degree judging network adopts a mean square error loss function for training.
It should be noted that in some images, the building with the largest degree of front view cannot be visually positioned due to the viewing angle error. Therefore, the front view degree threshold value is set, the buildings larger than the front view degree threshold value can be analyzed and positioned, and otherwise, the images need to be collected again.
In the real world, the grey values of the walls of buildings and glass are greatly different. Referring to fig. 2, which shows an environmental image in a daytime environment provided by an embodiment of the present invention, most of the window pixels are biased to black and have a large difference from the wall. Referring to fig. 3, an environment image in a night environment is shown according to an embodiment of the present invention. For night environments, most window pixels tend to be white due to the presence of illumination in the room, which is a large difference from the dark walls of buildings at night.
Therefore, a first threshold segmentation image can be obtained by using the global threshold segmentation operation, and the vivid window information in the first threshold segmentation image is further analyzed. Specifically, obtaining the first threshold segmentation image includes:
and converting the front-view building image into a gray-scale image. And performing threshold segmentation on the gray level image sequentially serving as a global threshold from 0 to 255 to obtain a first threshold segmentation image. Because of the influence of brightness factors, window information in effect graphs divided by different global thresholds is different, so that a plurality of first threshold divided images divided by global thresholds are obtained, and a threshold divided image corresponding to an optimal global threshold is obtained in the subsequent steps. Referring to fig. 4, a diagram of a first threshold segmentation image according to an embodiment of the invention is shown.
In the embodiment of the present invention, after the first threshold value divided image is obtained, noise in the image is eliminated by the closed arithmetic processing.
Step S2: segmenting the image according to a first threshold value to obtain a window connected domain; constructing an inclination angle matrix according to the central point of the window communication domain; each element in the inclination angle matrix is the angle of a connecting line between central points of the window communicating domain; obtaining a transverse inclination angle and a longitudinal inclination angle between central points of a window communication domain according to the inclination angle matrix; readjusting the distribution of the center points of the window connected domain according to the transverse inclination angle and the longitudinal inclination angle to obtain an array form of the window connected domain; obtaining the array degree of the array form; and taking the first threshold segmentation image corresponding to the array form with the maximum array degree as an optimal threshold segmentation image.
In the first threshold-divided image, the pixel values are only two kinds of 0 and 1. The pixel value of the window information is 1, the window connected domain can be obtained through obvious window information, but a completely standard window shape cannot be obtained in the actual threshold segmentation process, the window information has defects, and the window information only comprises a window frame or has incomplete shapes. Further optimization of the first thresholded segmented image is therefore required. The specific method comprises the following steps:
it is known a priori that the longitudinal windows are mostly of the same type, and the transverse windows in the same layer may be a combination of different sized windows. Therefore, analysis is carried out column by column, the sum of the pixel values of each column in the first threshold segmentation image is obtained, and the sum of the pixel values smaller than the preset pixel value threshold is set to be zero. The column pixel sum curve is constructed from the sum of pixel values. Referring to fig. 5, a schematic diagram of column pixels and curves provided by an embodiment of the present invention is shown, where the abscissa of the column pixels and the curve is the column and the ordinate is the sum of the corresponding pixel values of each column. And obtaining a window area containing a column of windows according to the column pixels and the extreme position of the curve. Obtaining a window connectivity domain within each window area.
In the embodiment of the invention, the minimum value between every two adjacent maximum values is taken as a dividing point to carry out curve division, and 8 window areas are divided. Consider that there are 8 columns of windows in the image.
Obtaining the window communication area of each window area further comprises:
and constructing the sliding window by taking the window communication domain size of each column of the closest rectangle as the sliding window size of the corresponding window communication domain. And setting position weight according to the distance between each position in the sliding window and the central point of the sliding window, wherein the position weight is larger when the distance is larger. And processing the window communication areas of each row of window communication areas according to the sliding window. When the window connected domain is processed by the sliding window, when the mean value of the position weight in the sliding window is larger than a preset weight threshold value, setting the pixel values of the pixel points in the sliding window area to be 1, and completing filling of the incomplete window; otherwise, setting the value to be 0, and finishing the elimination of the noise point. The window connected domain information is more complete through sliding window processing, and the interference of noise on subsequent analysis is eliminated.
In the embodiment of the invention, whether the window connected domain is the closest rectangle or not is judged according to the rectangle degree of the window connected domain. The rectangle degree is the ratio of the area of the window communicating region to the area of the minimum external rectangle with the largest area in the window region where the window communicating region is located. The position weight of the sliding window is the ratio of the distance from the sliding window pixel to the central point to the width of the sliding window. The weight threshold is set to 0.8.
And constructing an inclination angle matrix according to the central point of the window connected domain. Each element in the tilt angle matrix is the angle of a line connecting central points of the window. The number of rows and columns of the tilt angle matrix is the number of the window connected domains. The connecting lines between the central points of the window communicating domains in the tilt angle matrix can be divided into three main types, namely horizontal type straight lines, vertical type straight lines and other types of straight lines. The horizontal line and the vertical line can reflect the distribution of the window connected domain, so that further analysis on the horizontal line and the vertical line is needed. The method specifically comprises the following steps:
and (4) counting element values in the inclination angle matrix to obtain a horizontal straight line and a vertical straight line. And clustering the angles of the horizontal straight lines and the vertical straight lines. In thatIn the embodiment of the invention, the angle threshold value is set
Figure 382229DEST_PATH_IMAGE001
When the elements in the tilt angle matrix are in the interval, the corresponding straight line is considered as a vertical straight line; when the elements in the tilt matrix
Figure 440315DEST_PATH_IMAGE002
In the section (2), the corresponding straight line is considered as a horizontal straight line.
And after one-dimensional clustering operation, obtaining a transverse inclination angle according to the clustering center of the horizontal straight line. And obtaining the longitudinal inclination angle according to the clustering center of the vertical straight-like line.
The distribution of the center points of the window connected domains can be readjusted according to the transverse inclination angle and the longitudinal inclination angle, so that the window connected domains are in the same ideal row or column in the image, and the influence of center point deviation caused by different sizes of the window connected domain areas and the influence of center point deviation caused by the visual angle are eliminated. The specific method comprises the following steps:
1) Fitting a longitudinal straight line where the longitudinal inclination angle is located with the central point of the communicated domain of each row of windows; taking a longitudinal straight line with the minimum centrifugal distance between a central point of the window communication domain and the longitudinal straight line as a column straight line in an array form; and transversely moving the window communication domain central point with the distance between the window communication domain central point and the column straight line less than the distance threshold value to the column straight line.
2) Fitting the center point of the communication domain of each row of windows according to a transverse straight line where the transverse inclination angle is located; taking a transverse straight line with the minimum centrifugal distance between the central point of the window communication domain and the transverse straight line as a row straight line in an array form; and on the basis of the column straight line, longitudinally moving the window communication domain central point, the distance between which and the row straight line is less than the distance threshold value, to the row straight line to obtain an array form. Referring to fig. 6, a schematic diagram of an array format according to an embodiment of the invention is shown.
The array form embodies the distribution information between windows. Because in reality, the intervals between adjacent windows in the same column are the same, the intervals between adjacent window connected domains are all the same or in integer multiple relationship in the same column in the array form. In reality, the window distribution of the same row may be irregular, and thus the interval between adjacent windows is different, and thus the interval between adjacent window connected domains is different in the same row in the form of an array.
The array form not only reflects the distribution information among the windows, but also reflects the window information contained in the current first threshold segmentation image through the number of the window connected domains in the array form. Therefore, the array degree of the array form is obtained, the number of window information included in the current first threshold segmentation image is represented in the array degree, and the first threshold segmentation image corresponding to the array form with the maximum array degree is screened out to be used as the optimal threshold segmentation image. The specific acquisition method of the array degree comprises the following steps:
the number of column lines is multiplied by the number of row lines to obtain the number of intersections in the form of an array. And taking the ratio of the number of the central points of the window connected domain in the array form to the number of the intersection points as the array degree.
Since the window communication center points in the array form are screened by the distance threshold, there may be window communication center points greater than or equal to the distance threshold that are not in the array form, and all the window communication center points need to be added in the array form in order to obtain the distribution characteristics of the complete window later. The central point of the window communication domain which is not on the array form is taken as an additional point. Additional columns are obtained based on fitting additional points to the longitudinal dip. Additional columns are added to the array format to obtain a complete array format. In the full array format, if additional points exist on both sides of a line straight line, the additional points are considered to be in the same line as the center point of the window communication center on the line straight line. Referring to fig. 7, which shows a schematic diagram of a complete array format according to an embodiment of the present invention, a straight line L is an additional column, and a point set U is an additional point.
And step S3: obtaining the distribution characteristics of the window through the array form in the optimal threshold segmentation image and the size of the window connected domain; and obtaining the current environment position according to the distribution characteristics.
The array form corresponding to the optimal threshold segmentation image comprises more accurate window information, so that abundant and accurate distribution characteristics can be obtained, and the method specifically comprises the following steps:
and dividing the row containing the most window connected center points in the complete array form corresponding to the image by using the optimal threshold value as a reference row. The lateral spacing and the longitudinal spacing between the center points of the communication domains of each window in the reference row are obtained. The aspect ratio of the corresponding window communication field in the reference row is obtained. The aspect ratio represents the type of window, and the lateral spacing and the longitudinal spacing represent the distribution of the window, and thus the distribution characteristics are obtained according to the lateral spacing, the longitudinal spacing, and the aspect ratio. For example, the distribution feature may be represented as (0, m 1) (K1, 0, m 2) (K2, 0, m 3) (K3, 0, m 4) (K4, h1, m 5) (K5, 0, m 6), wherein the first term represents a start term, m1-m6 represent aspect ratios of 6 windows, K1-K5 represent a lateral spacing of a current term window from a previous term window, and h1 represents a longitudinal spacing of a current term window.
In the present embodiment, the lateral interval and the longitudinal interval need to be normalized. And taking the ratio of the distance between the transverse interval and the longitudinal interval and the distance between the center points of the window communication domains at the two ends of the reference row as a normalization result.
And describing the current front-view building through the distribution characteristics, obtaining relative height descriptions of other buildings in combination with the environment image, and comparing the relative height descriptions with a CIM map to obtain the current geographic position.
In summary, in the embodiments of the present invention, the front view building image in the environment image is segmented by the global thresholds to obtain the first threshold segmented images. And segmenting the image according to the first threshold to obtain a window connected domain, constructing an inclination angle matrix according to the window connected domain, readjusting the distribution of the window connected domain according to the transverse inclination angle and the longitudinal inclination angle between central points of the window connected domain in the inclination angle matrix to obtain an array form, and screening out the optimal threshold segmentation image according to the array degree of the array form. And obtaining the distribution characteristics of the window through the array form in the optimal threshold segmentation image and the size of the window connected domain, and obtaining the current environment position according to the distribution characteristics. The invention can accurately obtain the distribution characteristics by segmenting the information in the image through the optimal threshold value with rich information, and can quickly and simply obtain the current environment position according to the distribution characteristics.
The invention also provides a visual positioning system based on artificial intelligence and building information, which comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, and is characterized in that the processor realizes any step of the visual positioning method based on artificial intelligence and building information when executing the computer program.
It should be noted that: the sequence of the above embodiments of the present invention is only for description, and does not represent the advantages or disadvantages of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A visual positioning method based on artificial intelligence and building information is characterized by comprising the following steps:
obtaining an environment image; extracting an orthographic building image with the maximum orthographic degree in the environment image; segmenting the front-view building image through a plurality of global thresholds to obtain a plurality of first threshold segmentation images;
segmenting the image according to the first threshold value to obtain a window connected domain; constructing an inclination angle matrix according to the central point of the window connected domain; each element in the tilt angle matrix is an angle of a connecting line between central points of a window communicating domain; obtaining a transverse inclination angle and a longitudinal inclination angle between central points of the window communication domain according to the inclination angle matrix; readjusting the distribution of the center points of the window connected domain according to the transverse inclination angle and the longitudinal inclination angle to obtain an array form of the window connected domain; obtaining an array degree of the array format; taking the first threshold segmentation image corresponding to the array form with the maximum array degree as an optimal threshold segmentation image;
obtaining the distribution characteristics of the window according to the array form in the optimal threshold segmentation image and the size of the window connected domain; and obtaining the current environment position according to the distribution characteristics.
2. The visual positioning method based on artificial intelligence and building information as claimed in claim 1, wherein said extracting the most highly orthographic building image of said environment images comprises:
inputting the environment image into a pre-trained example segmentation network, and outputting a plurality of building images;
and sending the building image into a pre-trained front-view degree judging network, outputting the front-view degree of each building image, and obtaining the building image with the maximum front-view degree as the front-view building image.
3. The visual positioning method based on artificial intelligence and building information as claimed in claim 1, wherein said segmenting the image according to the first threshold value to obtain the window connected domain comprises:
obtaining the sum of pixel values of each row in the first threshold segmentation image, and setting the sum of the pixel values smaller than a preset pixel value threshold to be zero; constructing column pixels and a curve according to the sum of the pixel values; the horizontal coordinates of the row pixels and the curve are rows, and the vertical coordinates of the row pixels and the curve are the sum of the pixel values corresponding to each row; obtaining a window area containing a row of windows according to the row of pixels and the extreme position of the curve; obtaining the window connected domain in each window area.
4. The visual positioning method based on artificial intelligence and building information as claimed in claim 3, wherein said obtaining said window connected domain in each of said window regions further comprises:
constructing a sliding window by taking the window communicating region size of each column of the closest rectangle as the sliding window size corresponding to the window communicating region; setting position weight according to the distance between each position in the sliding window and the central point of the sliding window, wherein the position weight is larger when the distance is larger;
processing the window connected domain according to the sliding window; when the average value of the position weights in the sliding window is larger than a preset weight threshold value, setting the pixel value of a pixel point in the sliding window to be 1; otherwise it is set to 0.
5. The visual positioning method based on artificial intelligence and building information as claimed in claim 1, wherein said obtaining the lateral tilt angle and the longitudinal tilt angle between the center points of the window connected domain according to the tilt angle matrix comprises:
counting element values in the inclination angle matrix to obtain a horizontal straight line and a vertical straight line; clustering the angles of the horizontal straight lines and the vertical straight lines;
obtaining the transverse inclination angle according to the clustering center of the horizontal straight line; and obtaining the longitudinal inclination angle according to the clustering center of the vertical straight line.
6. The visual positioning method based on artificial intelligence and building information as claimed in claim 1, wherein said readjusting the distribution of the center points of the window connected components according to the lateral tilt angle and the longitudinal tilt angle to obtain the array form of the window connected components includes:
fitting each row of the center points of the window communication areas by using the longitudinal straight line where the longitudinal inclination angle is located; taking the longitudinal straight line with the minimum centrifugal distance between the window communication center point and the longitudinal straight line as the column straight line in the array form; transversely moving the window communication center point, the distance between which and the column straight line is less than a distance threshold value, to the column straight line;
fitting each row of the center points of the window communication domain by using a transverse straight line where the transverse inclination angle is located; taking the transverse straight line with the minimum centrifugal distance between the central point of the window communication domain and the transverse straight line as the row straight line of the array form; and on the basis of the column straight line, longitudinally moving the window communication center point, the distance between which and the row straight line is less than a distance threshold value, to the row straight line to obtain the array form.
7. The visual positioning method based on artificial intelligence and building information as claimed in claim 6, wherein said obtaining the array degree of the window connected domain according to the array form comprises:
multiplying the number of the column straight lines and the number of the row straight lines to obtain the number of the intersection points in the array form;
and taking the ratio of the number of the center points of the window communication domain on the array form to the number of the intersection points as the array degree.
8. The visual positioning method based on artificial intelligence and building information as claimed in claim 6, wherein said first thresholded segmented image corresponding to said array form with the largest array degree as an optimal thresholded segmented image further comprises:
taking the central point of the window communication domain which is not on the array form as an additional point; fitting the additional points based on the longitudinal inclination angle to obtain additional columns; adding the additional columns to the array format to obtain a complete array format.
9. The visual positioning method based on artificial intelligence and building information as claimed in claim 8, wherein said obtaining the distribution characteristics of the windows in the form of the array in the optimal threshold segmentation image comprises:
taking the row containing the most central points of the window communicating areas in the complete array form as a reference row; obtaining a transverse interval and a longitudinal interval between each window connected center point in the reference row; obtaining the aspect ratio of the corresponding window connected domain in the reference row; obtaining the distribution characteristic from the lateral spacing, the longitudinal spacing, and the aspect ratio.
10. A visual positioning system based on artificial intelligence and building information, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 9 when executing the computer program.
CN202210881111.2A 2022-07-26 2022-07-26 Visual positioning method and system based on artificial intelligence and building information Active CN114943770B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210881111.2A CN114943770B (en) 2022-07-26 2022-07-26 Visual positioning method and system based on artificial intelligence and building information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210881111.2A CN114943770B (en) 2022-07-26 2022-07-26 Visual positioning method and system based on artificial intelligence and building information

Publications (2)

Publication Number Publication Date
CN114943770A CN114943770A (en) 2022-08-26
CN114943770B true CN114943770B (en) 2022-10-04

Family

ID=82910562

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210881111.2A Active CN114943770B (en) 2022-07-26 2022-07-26 Visual positioning method and system based on artificial intelligence and building information

Country Status (1)

Country Link
CN (1) CN114943770B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117252893B (en) * 2023-11-17 2024-02-23 科普云医疗软件(深圳)有限公司 Segmentation processing method for breast cancer pathological image

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110276240A (en) * 2019-03-28 2019-09-24 北京市遥感信息研究所 A kind of SAR image building wall window information extracting method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2712173B1 (en) * 2012-09-19 2017-04-05 LG Innotek Co., Ltd. Camera module
CN112183301B (en) * 2020-09-23 2023-06-16 武汉大势智慧科技有限公司 Intelligent building floor identification method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110276240A (en) * 2019-03-28 2019-09-24 北京市遥感信息研究所 A kind of SAR image building wall window information extracting method

Also Published As

Publication number Publication date
CN114943770A (en) 2022-08-26

Similar Documents

Publication Publication Date Title
CN112348815B (en) Image processing method, image processing apparatus, and non-transitory storage medium
US11403839B2 (en) Commodity detection terminal, commodity detection method, system, computer device, and computer readable medium
US10049492B2 (en) Method and apparatus for rendering facades of objects of interest from three-dimensional point clouds
AU2016315938B2 (en) Systems and methods for analyzing remote sensing imagery
US9846946B2 (en) Objection recognition in a 3D scene
CN109785298B (en) Multi-angle object detection method and system
CN107103320B (en) Embedded medical data image identification and integration method
CN103093198B (en) A kind of crowd density monitoring method and device
CN111611643A (en) Family type vectorization data obtaining method and device, electronic equipment and storage medium
CN114943770B (en) Visual positioning method and system based on artificial intelligence and building information
CN111242026A (en) Remote sensing image target detection method based on spatial hierarchy perception module and metric learning
CN111444778A (en) Lane line detection method
Babahajiani et al. Automated super-voxel based features classification of urban environments by integrating 3D point cloud and image content
CN112946679A (en) Unmanned aerial vehicle surveying and mapping jelly effect detection method and system based on artificial intelligence
Mayer et al. Building facade interpretation from uncalibrated wide-baseline image sequences
CN111695373A (en) Zebra crossing positioning method, system, medium and device
CN113486894A (en) Semantic segmentation method for satellite image feature component
CN110660095B (en) Visual SLAM (simultaneous localization and mapping) initialization method, system and device in dynamic environment
CN111241916A (en) Method for establishing traffic sign recognition model
CN116740758A (en) Bird image recognition method and system for preventing misjudgment
CN104616302A (en) Real-time object identification method
CN113052110A (en) Three-dimensional interest point extraction method based on multi-view projection and deep learning
CN113095214A (en) Unmanned aerial vehicle surveying and mapping optical anti-shake method and system based on artificial intelligence
Wenzel et al. Finding poly-curves of straight line and ellipse segments in images
CN104794469A (en) Real-time video streaming character positioning method based on heterogeneous image computing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant