CN118781133A - Target area acquisition method and device and computer equipment - Google Patents
Target area acquisition method and device and computer equipment Download PDFInfo
- Publication number
- CN118781133A CN118781133A CN202410698739.8A CN202410698739A CN118781133A CN 118781133 A CN118781133 A CN 118781133A CN 202410698739 A CN202410698739 A CN 202410698739A CN 118781133 A CN118781133 A CN 118781133A
- Authority
- CN
- China
- Prior art keywords
- target area
- target
- feature
- dimensional image
- image information
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 238000012216 screening Methods 0.000 claims abstract description 23
- 238000004590 computer program Methods 0.000 claims abstract description 21
- 238000003709 image segmentation Methods 0.000 claims abstract description 17
- 238000012545 processing Methods 0.000 claims description 14
- 230000009467 reduction Effects 0.000 claims description 10
- 230000011218 segmentation Effects 0.000 claims description 10
- 238000013527 convolutional neural network Methods 0.000 claims description 8
- 238000001914 filtration Methods 0.000 claims description 7
- 238000012549 training Methods 0.000 claims description 6
- 239000011159 matrix material Substances 0.000 description 11
- 241000234295 Musa Species 0.000 description 9
- 235000018290 Musa x paradisiaca Nutrition 0.000 description 9
- 238000010586 diagram Methods 0.000 description 9
- 238000013507 mapping Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 238000004458 analytical method Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000000513 principal component analysis Methods 0.000 description 3
- 239000013598 vector Substances 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 239000003086 colorant Substances 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 208000004350 Strabismus Diseases 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012847 principal component analysis method Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Image Analysis (AREA)
Abstract
The present application relates to a method, an apparatus, a computer device, a storage medium and a computer program product for acquiring a target area. The method comprises the following steps: acquiring two-dimensional image information; wherein the two-dimensional image information includes a target area; inputting the two-dimensional image information into a preset image segmentation model, and outputting a plane structure for obtaining the two-dimensional image information; wherein the feature points in the planar structure correspond to feature regions predicted by the model; selecting characteristic points of a target area in the plane structure, wherein the characteristic areas are selected as target characteristic points of the target area; and screening the two-dimensional image information according to the target feature points to obtain the target region. The method can improve the acquisition efficiency of the target area.
Description
Technical Field
The present application relates to the field of artificial intelligence, and in particular, to a method, an apparatus, a computer device, a storage medium, and a computer program product for acquiring a target area.
Background
With the development of computer vision technology, three-dimensional point cloud data has emerged. The three-dimensional point cloud data is space data composed of a large number of discrete points, and can accurately reflect the shape and structure of an object. However, in the process of actual usage analysis, the entire point cloud data is difficult to analyze or process due to the large volume of the point cloud data, so that the point cloud data needs to be subjected to a singulation process.
In the traditional technology, the point cloud segmentation technology based on deep learning is used for carrying out the monomization treatment, and the segmentation and the identification of the point cloud data can be effectively realized by adopting the method. However, the point cloud segmentation technology based on deep learning requires a large amount of marked data for training, has higher algorithm complexity, requires a large amount of time for operation, and causes lower efficiency of point cloud data singulation processing.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a target area acquisition method, apparatus, computer device, computer-readable storage medium, and computer program product.
In a first aspect, the present application provides a method for acquiring a target area. The method comprises the following steps:
acquiring two-dimensional image information; wherein the two-dimensional image information includes a target area;
inputting the two-dimensional image information into a preset image segmentation model, and outputting a plane structure for obtaining the two-dimensional image information; wherein the feature points in the planar structure correspond to feature regions predicted by the model;
Selecting characteristic points of a target area in the plane structure, wherein the characteristic areas are selected as target characteristic points of the target area;
And screening the two-dimensional image information according to the target feature points to obtain the target region.
In one embodiment, the selecting the feature point of the target area in the planar structure, where the feature area is selected as the target feature point of the target area includes:
selecting candidate feature points of a target area in the plane structure to obtain a feature area corresponding to the candidate feature points;
and determining the candidate feature points as target feature points under the condition that the feature areas corresponding to the candidate feature points are target areas.
In one embodiment, the condition that the feature area corresponding to the candidate feature point is the target area includes:
the feature area corresponding to the single candidate feature point in the target area is the target area; or (b)
Combining feature areas corresponding to the candidate feature points in the target area to obtain a feature area; the feature region is a target region.
In one embodiment, the acquiring two-dimensional image information includes:
acquiring original three-dimensional point cloud data containing a target area;
Processing the original three-dimensional point cloud data by using a preset data dimension reduction algorithm to obtain a two-dimensional projection plane of the original three-dimensional point cloud data;
And projecting the original three-dimensional point cloud data into the two-dimensional projection plane according to a preset projection angle to obtain two-dimensional image information.
In one embodiment, after the information filtering is performed on the two-dimensional image information according to the target feature point to obtain the target area, the method further includes:
according to the two-dimensional image information of the target area, matching the original three-dimensional point cloud data to obtain three-dimensional point cloud data of the target area;
And establishing a model for the three-dimensional point cloud data of the target area to obtain a three-dimensional model of the target area.
In one embodiment, the information filtering the two-dimensional image information according to the target feature point to obtain the target area includes:
inputting the target feature points and the two-dimensional image information into a segmentation model which is built in advance in a training way to obtain boundary information of a target area in the two-dimensional image;
and dividing the two-dimensional image information by utilizing a preset convolutional neural network and boundary information of a target area in the two-dimensional image to obtain the target area.
In a second aspect, the application further provides a device for acquiring the target area. The device comprises:
The image acquisition module is used for acquiring two-dimensional image information; wherein the two-dimensional image information includes a target area;
The model prediction module is used for inputting the two-dimensional image information into a preset image segmentation model and outputting a plane structure for obtaining the two-dimensional image information; wherein the feature points in the planar structure correspond to feature regions predicted by the model;
the characteristic selection module is used for selecting characteristic points of a target area in the plane structure, and selecting the characteristic area as a target characteristic point of the target area;
and the target screening module is used for carrying out information screening on the two-dimensional image information according to the target characteristic points to obtain the target region.
In one embodiment, the feature selection module includes:
The feature selection submodule is used for selecting candidate feature points of a target region in the plane structure to obtain a feature region corresponding to the candidate feature points;
the feature selection sub-module is further configured to determine, when a feature region corresponding to the candidate feature point is a target region, that the candidate feature point is a target feature point.
In one embodiment, the condition that the feature area corresponding to the candidate feature point is the target area includes:
the feature area corresponding to the single candidate feature point in the target area is the target area; or (b)
Combining feature areas corresponding to the candidate feature points in the target area to obtain a feature area; the feature region is a target region.
In one embodiment, the image acquisition module includes:
the data acquisition sub-module is used for acquiring original three-dimensional point cloud data containing a target area;
the data dimension reduction sub-module is used for processing the original three-dimensional point cloud data by utilizing a preset data dimension reduction algorithm to obtain a two-dimensional projection plane of the original three-dimensional point cloud data;
And the data projection sub-module is used for projecting the original three-dimensional point cloud data into the two-dimensional projection plane according to a preset projection angle to obtain two-dimensional image information.
In one embodiment, the feature selection module includes:
The data matching sub-module is used for matching the original three-dimensional point cloud data according to the two-dimensional image information of the target area to obtain the three-dimensional point cloud data of the target area;
and the data modeling module is used for modeling the three-dimensional point cloud data of the target area to obtain a three-dimensional model of the target area.
In one embodiment, the method includes:
The model prediction sub-module is used for inputting the target feature points and the two-dimensional image information into a segmentation model which is built in advance in a training mode to obtain boundary information of a target area in the two-dimensional image;
The image segmentation sub-module is used for segmenting the two-dimensional image information by utilizing a preset convolutional neural network and boundary information of a target area in the two-dimensional image to obtain the target area.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the method for acquiring a target area according to any one of the embodiments of the present disclosure when the processor executes the computer program.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements a method for acquiring a target area according to any of the embodiments of the present disclosure.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements a method for acquiring a target area according to any one of the embodiments of the disclosure.
The method, the device, the computer equipment, the storage medium and the computer program product for acquiring the target area acquire a planar structure of two-dimensional image information by utilizing a preset image segmentation model, collect model predicted characteristic areas corresponding to different characteristic points by utilizing the planar structure, select target characteristic points corresponding to the target area, and acquire the target area in the two-dimensional image information by utilizing the target characteristic points. The image segmentation model is utilized, a planar structure is established, the target area is confirmed through the feature points, the accuracy of the target area is guaranteed, and meanwhile, the efficiency of screening the target area information is improved. Through the mode, the data marking is greatly reduced, the efficiency of screening the target area information is greatly improved, meanwhile, the manual operation is reduced, and the cost of screening the target area information is reduced.
Drawings
FIG. 1 is a flow chart of a method for acquiring a target area in one embodiment;
FIG. 2 is a flow chart of selecting target feature points in one embodiment;
FIG. 3 is a flow diagram of a three-dimensional point cloud generating a two-dimensional image in one embodiment;
FIG. 4 is a flow chart of mapping two-dimensional images to obtain a three-dimensional model in one embodiment;
FIG. 5 is a flow chart of obtaining a two-dimensional image of a target using feature points in one embodiment;
FIG. 6 is a schematic flow diagram of implementing a singulated building using a target area acquisition method in one embodiment;
fig. 7 is a schematic diagram of three-dimensional point cloud data captured by an unmanned aerial vehicle in one embodiment;
FIG. 8 is a schematic diagram of a two-dimensional image projected from three-dimensional point cloud data in one embodiment;
FIG. 9 is a first schematic diagram of selecting two-dimensional image feature points in one embodiment;
FIG. 10 is a second schematic diagram of selecting two-dimensional image feature points in one embodiment;
FIG. 11 is a schematic illustration of a two-dimensional mask image of a target area in one embodiment;
FIG. 12 is a schematic illustration of a three-dimensional model of a target building in one embodiment;
FIG. 13 is a block diagram of an acquisition device of a target area in one embodiment;
fig. 14 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In one embodiment, as shown in fig. 1, a method for acquiring a target area is provided, where the method is applied to a terminal to illustrate the target area, it is understood that the method may also be applied to a server, and may also be applied to a system including the terminal and the server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the steps of:
Step S100, acquiring two-dimensional image information; wherein the two-dimensional image information includes a target area.
In an exemplary embodiment, the two-dimensional image information may include a photograph of the object through a depression or a squint angle, for example, a depression of a building using a drone. In another exemplary embodiment, the two-dimensional image information may include a dimension reduction of a three-dimensional image. In another exemplary embodiment, the two-dimensional image information may include converting a three-dimensional coordinate image into a two-dimensional coordinate image, resulting in two-dimensional image information.
In an exemplary embodiment, the target area may include a building area in a two-dimensional image, including an entire area of the target building in the two-dimensional image; for example, a building seen in a plan view is only a top surface of the building, and the like.
In an exemplary embodiment, the target area may include a covered area, or an uncovered area; for example, one building in the two-dimensional image obscures a portion of the information of the target building, at which time the obscuration portion may be selected as the target building or the obscuration portion may not be the target building.
Step S200, inputting the two-dimensional image information into a preset image segmentation model, and outputting a plane structure for obtaining the two-dimensional image information; wherein the feature points in the planar structure correspond to feature regions predicted by the model.
In an exemplary embodiment, the image segmentation model is used to convert two-dimensional image information into a planar structure, wherein each point in the planar structure may correspond to a surrounding partial region of the point; specifically, the planar structure may include a planar model, and a point is selected from the planar model, so as to obtain an area corresponding to the point; for example, in a planar model of a piece of fruit, one of the points of the banana is selected in the planar model, and the area corresponding to this point is the banana, and similarly, the banana may be included as well as other parts, or part of the banana and other parts, and part of the banana.
In an exemplary embodiment, the feature points correspond to feature areas predicted by a model. Specifically, upon selection of the target point, the feature region is displayed on the planar structure.
In an exemplary embodiment, the feature points in the planar structure may include points carried by the two-dimensional image itself or feature points generated after prediction of the image segmentation model, and the like. For example, the two-dimensional image is an XOY plane, and all coordinate points can be a feature point; or a certain pixel in the image may be a feature point, etc.
In an exemplary embodiment, the image segmentation model may include FastSAM (used as a segmentation all model) or the like; specifically, labeling the two-dimensional image information by using the point template in FastSAM to obtain feature points, feature areas corresponding to the feature points, and the like.
And step S300, selecting characteristic points of the target area in the plane structure, wherein the characteristic areas are selected as target characteristic points of the target area.
In an exemplary embodiment, in the process of selecting the feature points, selecting a plurality of feature points, and merging feature areas corresponding to the plurality of feature points to obtain a feature area, where the obtained feature area is a target area, the set of the plurality of feature points is the target feature point.
In an exemplary embodiment, the two-dimensional image information may include a plurality of independent target areas, and different areas may be selected using different feature points; to obtain target feature points of each opposite target region. For example, using different colors for different target feature points to indicate the region it represents, etc.
And step S400, carrying out information screening on the two-dimensional image information according to the target feature points to obtain the target region.
In an exemplary embodiment, the filtering the two-dimensional image information may include dividing the two-dimensional image by using the feature region corresponding to the feature point to obtain the divided target region. For example, the two-dimensional image is segmented to obtain a mask image of the target region.
In an exemplary embodiment, the two-dimensional image information includes information of the occluded portion; the target area is the target information corresponding to the two-dimensional image information. For example, the two-dimensional image is a plurality of buildings, the target area is one of the buildings, and the target building is blocked by the other buildings, but the two-dimensional image includes information of the blocked portion, and at this time, the target information corresponding to the two-dimensional image information can be obtained. In another exemplary embodiment, the two-dimensional image information does not include information of the blocked portion, and the blocked portion of the target area may be predicted. For example, the two-dimensional image is a plurality of buildings, the target area is one of the buildings, however, the building is blocked by other buildings, the blocked part is predicted, the image information of the blocked part of the target area is obtained, and the complete image information of the target area is obtained.
In the method for acquiring the target region, the planar structure of the two-dimensional image information is obtained by using the preset image segmentation model, the model predicted characteristic regions corresponding to different characteristic points are summarized by using the planar structure, the target characteristic points corresponding to the target region are selected, and the target region in the two-dimensional image information is obtained by using the target characteristic points. The image segmentation model is utilized, a planar structure is established, the target area is confirmed through the feature points, the accuracy of the target area is guaranteed, and meanwhile, the efficiency of screening the target area information is improved. Through the mode, the data marking is greatly reduced, the efficiency of screening the target area information is greatly improved, meanwhile, the manual operation is reduced, and the cost of screening the target area information is reduced.
In one embodiment, as shown in fig. 2, the selecting the feature point of the target area in the planar structure, where the feature area is selected as the target feature point of the target area includes:
Step S201, selecting a candidate feature point of the target area in the planar structure, to obtain a feature area corresponding to the candidate feature point.
In an exemplary embodiment, the selecting the candidate feature points may obtain feature areas corresponding to the candidate feature points. Specifically, the selection of the characteristic points comprises the preselection of the characteristic points, and the characteristic areas corresponding to the characteristic points are checked through the preselection.
In an exemplary embodiment, the feature region may include an occluded region, wherein the source of the occluded portion may include a prediction of the occluded portion using target region information, or the like, contained in the two-dimensional image information.
Step S202, when the feature region corresponding to the candidate feature point is a target region, determining the candidate feature point as a target feature point.
In an exemplary embodiment, the case that the feature area corresponding to the candidate feature point is the target area includes that the feature area corresponding to the feature point coincides with the target area, or has a certain deviation from the target area, for example, the feature area may include feature information of all target areas, and then the feature area is considered to be the target area.
In this embodiment, a feature region corresponding to a candidate feature point is checked through the candidate feature point, and the feature region is selected as a feature point of a target region. By checking the feature areas corresponding to the candidate feature points, the whole feature areas are prevented from being marked, and the screening efficiency of the target areas is improved; meanwhile, the characteristic points with the characteristic areas as the target areas can be accurately obtained, the accuracy of selecting the target characteristic points is improved, and meanwhile, the accuracy of screening the information of the target areas is improved.
In one embodiment, the condition that the feature area corresponding to the candidate feature point is the target area includes:
the feature area corresponding to the single candidate feature point in the target area is the target area; or (b)
Combining feature areas corresponding to the candidate feature points in the target area to obtain a feature area; the feature region is a target region.
In an exemplary embodiment, the feature region corresponding to the merging plurality of candidate feature points may include a total region of the feature regions corresponding to the plurality of feature points in the two-dimensional image, for example, a region { a, B } corresponding to the feature point a, a region { a, c } corresponding to the feature point B, and then the feature region merging the feature point a and the feature point B should be { a, B, c }.
In an exemplary embodiment, after a feature point is selected, the region of the feature point is continuously marked in the two-dimensional image, and when a second feature point is selected, the combined region of the feature region of the first feature point and the feature region of the second feature point is correspondingly marked. For example, the target area is a banana, the characteristic area corresponding to the first characteristic point is a partial area of the banana, at this time, under the condition that the characteristic point is selected, the partial area is continuously marked, when the second characteristic point is other areas of the banana or the partial area of other areas, the second characteristic point is selected, at this time, the areas corresponding to the first characteristic point and the second characteristic point are marked, and the characteristic point is continuously selected until the whole banana is marked, and the like.
In this embodiment, the target feature point of the feature region is determined to be a single feature point or a plurality of feature points. And a plurality of characteristic points are used for the target area, and the plurality of characteristic points are used for screening different subareas of the target area, so that the target area is more accurate, meanwhile, the condition that the characteristic area corresponding to the single candidate characteristic point does not exist as the target area is avoided, and the screening accuracy and the integrity of the target area are improved.
In one embodiment, as shown in fig. 3, the acquiring two-dimensional image information includes:
step S101, acquiring original three-dimensional point cloud data including a target area.
In an exemplary embodiment, the three-dimensional point cloud data may include a photograph of the item or area. For example, when three-dimensional point cloud data of a building is acquired, three-dimensional point cloud data of the building may be photographed obliquely using an unmanned aerial vehicle.
Step S102, processing the original three-dimensional point cloud data by using a preset data dimension reduction algorithm to obtain a two-dimensional projection plane of the original three-dimensional point cloud data.
In an exemplary embodiment, the acquiring the two-dimensional projection plane of the three-dimensional point cloud data may include performing XOY plane registration or the like on the three-dimensional point cloud data; XOY planar registration of three-dimensional point cloud data may be performed, for example, using Principal Component Analysis (PCA); specifically, the three-dimensional point cloud data using the principal component analysis method may include the operations of: performing standardization processing on the three-dimensional point cloud data, calculating a covariance matrix after the standardization processing, obtaining a characteristic value and a characteristic matrix of the original data by using the covariance matrix, selecting a characteristic vector corresponding to the characteristic value with the largest preset number as a main component according to the magnitude of the characteristic value, and projecting the original data onto the selected main component to obtain an XOY plane; wherein, the three-dimensional point cloud data can be normalized by the following formula (1):
(1)
Wherein X represents original three-dimensional point cloud data; μ represents the mean value of the original three-dimensional point cloud data; sigma represents standard deviation of original three-dimensional point cloud data; x standardized represents the standardized processing result of the original three-dimensional point cloud data;
Calculating a covariance matrix after normalization by using the following formula (2):
(2)
Wherein X represents the standardized processing result of the original three-dimensional point cloud data; XT represents the transpose of matrix X; n represents the number of three-dimensional point cloud data; cov (X) represents the covariance matrix of matrix X;
Obtaining the characteristic value and characteristic matrix of the original data by using the following formula (3):
Cov(X)v = λv(3)
wherein λ represents a characteristic value; v represents a feature vector;
projecting the raw data onto the selected principal component using the following formula (4) to obtain an XOY plane:
Y = XW(4)
Wherein Y represents the data after dimension reduction; w represents a projection matrix composed of the selected feature vectors; x represents the original three-dimensional point cloud data.
Step S103, according to a preset projection angle, the original three-dimensional point cloud data are projected into the two-dimensional projection plane, and two-dimensional image information is obtained.
In an exemplary embodiment, the shooting angle may be a top view, and it may be understood that when the building in the image is screened, if the projection has a certain inclination angle, a part of the building may be blocked, which may further result in the target data being missing. In another exemplary embodiment, the photographing angle may be a tilting angle, with which a target effect is achieved.
In an exemplary embodiment, the projecting the original three-dimensional point cloud data into the two-dimensional projection plane may specifically include mapping the point cloud data onto the two-dimensional projection plane using a coordinate transformation algorithm.
In this embodiment, dimension reduction is performed on the three-dimensional point cloud data to obtain a corresponding two-dimensional projection plane, and then the three-dimensional point cloud data is mapped to the two-dimensional projection plane to obtain two-dimensional image information. The dimension and complexity of the three-dimensional data can be remarkably reduced, the screening efficiency of the three-dimensional point cloud data is faster, and meanwhile, the three-dimensional point cloud data is screened more accurately.
In one embodiment, as shown in fig. 4, after performing information filtering on the two-dimensional image information according to the target feature points to obtain the target area, the method further includes:
Step S104, according to the two-dimensional image information of the target area, matching the original three-dimensional point cloud data to obtain three-dimensional point cloud data of the target area.
In an exemplary embodiment, after the two-dimensional image is acquired, mapping the coordinate point set of the two-dimensional image information to the original point cloud data by using a mapping relation to obtain three-dimensional point cloud data of a target area in the original point cloud data; specifically, the original point cloud data of the target area is obtained by using the following formula (5):
L’=RL(5)
Wherein L' represents three-dimensional point cloud data of the target area; r represents a mapping relation; l represents a two-dimensional set of coordinate points of the target region.
Step S105, a model is built for the three-dimensional point cloud data of the target area, and a three-dimensional model of the target area is obtained.
In an exemplary embodiment, after the three-dimensional model of the target area is obtained, the model of the target area may be stored in a brand new point cloud file, so as to facilitate subsequent analysis.
In an exemplary embodiment, when the original three-dimensional point cloud data includes a plurality of independent target areas, different target areas may be marked with different feature points, so as to obtain a three-dimensional model of the plurality of independent areas. For example, when a plurality of buildings are extracted, different buildings need to be extracted and stored, different buildings can be marked by characteristic points with different colors, three-dimensional point cloud data of the different buildings can be obtained, and the three-dimensional point cloud data can be stored in different point cloud files. It will be appreciated that extraction of multiple target regions may also be achieved by multiple single target region extractions.
In this embodiment, three-dimensional point cloud data of the target area is obtained by using the two-dimensional image information, and a three-dimensional model is further obtained. By means of the method, conversion from two-dimensional graphic information to three-dimensional point cloud data can be completed, the integrity of three-dimensional point cloud data structure information is guaranteed, and the accuracy and reliability of three-dimensional point cloud data screening are greatly improved.
In one embodiment, as shown in fig. 5, the information filtering the two-dimensional image information according to the target feature point to obtain the target area includes:
And S401, inputting the target feature points and the two-dimensional image information into a boundary acquisition model which is built in advance in a training way, and obtaining the boundary information of a target area in the two-dimensional image.
In an exemplary embodiment, the boundary acquisition model may be used to optimize the target region predicted by the image segmentation model using the target feature points and the two-dimensional image information, for example, deleting the portion of the feature region corresponding to the feature points that is not the target region.
In an exemplary embodiment, the feature points input to the boundary acquisition model may include a matrix of feature points, and boundary information of the target region is obtained using the matrix of feature points and the two-dimensional image.
Step S402, dividing the two-dimensional image information by utilizing a preset convolutional neural network and boundary information of a target area in the two-dimensional image to obtain the target area.
In an exemplary embodiment, the resulting two-dimensional image information may include a mask image of the target area.
In an exemplary embodiment, the convolutional neural network is used to segment image information within boundary information according to boundary information of a two-dimensional image.
In this embodiment, the boundary of the target area is obtained by using a pre-trained segmentation acquisition model, and two-dimensional image information of the target area is obtained by using a convolutional neural network. The boundary information is used for guiding the convolutional neural network to divide the two-dimensional image, so that the accuracy of the two-dimensional image of the target area is ensured.
In an exemplary embodiment, as shown in fig. 6, the method for obtaining a target area may be used for point cloud building singulation, including:
Step S501, based on three-dimensional point cloud data shot by unmanned aerial vehicle oblique photography, performing XOY plane registration on the point cloud file by using a PCA method.
Specifically, the three-dimensional point cloud data shot by the unmanned aerial vehicle may be as shown in fig. 7, wherein a cuboid is used for describing a target building, and a cylinder is used for describing a non-target building; in this embodiment, the registered XOY plane is assumed to be the ground.
Step S502, performing overlooking projection on the registered point cloud file to obtain a two-dimensional plane projection of the point cloud file.
Specifically, the three-dimensional point cloud data shown in fig. 7 is subjected to top projection, and a two-dimensional plane projection as shown in fig. 8 can be obtained, where a square is a target area and a circle is a non-target area.
In step S503, a point prompt (point prompt) method in FastSAM is used to perform segmentation determination on the target region on the two-dimensional image.
Specifically, when the two-dimensional plane projection of fig. 8 is selected as the feature point, as shown in fig. 9, the white, gray and black dots are respectively utilized to represent the feature point selected by the single target area, and the corresponding two-dimensional plane projection correspondingly displays the feature area corresponding to the feature point; it will be appreciated that at this time, the black feature points do not fully cover the target area, and the same feature points may be used to continue to cover the target area as shown in fig. 10, where each building is covered by a feature area corresponding to a different feature point.
Step S504, recording the position information of the target building area in the two-dimensional image, and mapping the position information to the registered point cloud file.
Specifically, recording the position information of the target building in the two-dimensional image may obtain a mask image of the target area as shown in fig. 11. Mapping the two-dimensional image to the point cloud file may be as shown in fig. 12, where three individualized cuboids, i.e., target buildings, are obtained respectively.
And step S505, rewriting the mapped point cloud to obtain a result of building point cloud monomerization.
In particular, to facilitate analysis and processing of point cloud files, the singulated buildings may be stored in different point cloud files, respectively.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a target area acquisition device for realizing the target area acquisition method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the device for acquiring one or more target areas provided below may refer to the limitation of the method for acquiring a target area hereinabove, and will not be described herein.
In one embodiment, as shown in fig. 13, there is provided an acquisition apparatus 100 of a target area, including: an image acquisition module 101, a model prediction module 102, a feature selection module 103, and a target screening module 104, wherein:
The image acquisition module is used for acquiring two-dimensional image information; wherein the two-dimensional image information includes a target area;
The model prediction module is used for inputting the two-dimensional image information into a preset image segmentation model and outputting a plane structure for obtaining the two-dimensional image information; wherein the feature points in the planar structure correspond to feature regions predicted by the model;
the characteristic selection module is used for selecting characteristic points of a target area in the plane structure, and selecting the characteristic area as a target characteristic point of the target area;
and the target screening module is used for carrying out information screening on the two-dimensional image information according to the target characteristic points to obtain the target region.
In one embodiment, the feature selection module includes:
The feature selection submodule is used for selecting candidate feature points of a target region in the plane structure to obtain a feature region corresponding to the candidate feature points;
the feature selection sub-module is further configured to determine, when a feature region corresponding to the candidate feature point is a target region, that the candidate feature point is a target feature point.
In one embodiment, the condition that the feature area corresponding to the candidate feature point is the target area includes:
the feature area corresponding to the single candidate feature point in the target area is the target area; or (b)
Combining feature areas corresponding to the candidate feature points in the target area to obtain a feature area; the feature region is a target region.
In one embodiment, the image acquisition module includes:
the data acquisition sub-module is used for acquiring original three-dimensional point cloud data containing a target area;
the data dimension reduction sub-module is used for processing the original three-dimensional point cloud data by utilizing a preset data dimension reduction algorithm to obtain a two-dimensional projection plane of the original three-dimensional point cloud data;
And the data projection sub-module is used for projecting the original three-dimensional point cloud data into the two-dimensional projection plane according to a preset projection angle to obtain two-dimensional image information.
In one embodiment, the feature selection module includes:
The data matching sub-module is used for matching the original three-dimensional point cloud data according to the two-dimensional image information of the target area to obtain the three-dimensional point cloud data of the target area;
and the data modeling module is used for modeling the three-dimensional point cloud data of the target area to obtain a three-dimensional model of the target area.
In one embodiment, the method comprises:
The model prediction sub-module is used for inputting the target feature points and the two-dimensional image information into a segmentation model which is built in advance in a training mode to obtain boundary information of a target area in the two-dimensional image;
The image segmentation sub-module is used for segmenting the two-dimensional image information by utilizing a preset convolutional neural network and boundary information of a target area in the two-dimensional image to obtain the target area.
The respective modules in the above-described target area acquisition apparatus may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure thereof may be as shown in fig. 14. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of acquiring a target area. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 14 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements are applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.
Claims (10)
1. A method for acquiring a target area, the method comprising:
acquiring two-dimensional image information; wherein the two-dimensional image information includes a target area;
inputting the two-dimensional image information into a preset image segmentation model, and outputting a plane structure for obtaining the two-dimensional image information; wherein the feature points in the planar structure correspond to feature regions predicted by the model;
Selecting characteristic points of a target area in the plane structure, wherein the characteristic areas are selected as target characteristic points of the target area;
And screening the two-dimensional image information according to the target feature points to obtain the target region.
2. The method according to claim 1, wherein the selecting the feature point of the target area in the planar structure, and selecting the feature area as the target feature point of the target area, includes:
selecting candidate feature points of a target area in the plane structure to obtain a feature area corresponding to the candidate feature points;
and determining the candidate feature points as target feature points under the condition that the feature areas corresponding to the candidate feature points are target areas.
3. The method according to claim 2, wherein the condition that the feature region corresponding to the candidate feature point is a target region includes:
the feature area corresponding to the single candidate feature point in the target area is the target area; or (b)
Combining feature areas corresponding to the candidate feature points in the target area to obtain a feature area; the feature region is a target region.
4. The method of claim 1, wherein the acquiring two-dimensional image information comprises:
acquiring original three-dimensional point cloud data containing a target area;
Processing the original three-dimensional point cloud data by using a preset data dimension reduction algorithm to obtain a two-dimensional projection plane of the original three-dimensional point cloud data;
And projecting the original three-dimensional point cloud data into the two-dimensional projection plane according to a preset projection angle to obtain two-dimensional image information.
5. The method according to claim 4, wherein after the information filtering is performed on the two-dimensional image information according to the target feature points to obtain the target area, the method further comprises:
according to the two-dimensional image information of the target area, matching the original three-dimensional point cloud data to obtain three-dimensional point cloud data of the target area;
And establishing a model for the three-dimensional point cloud data of the target area to obtain a three-dimensional model of the target area.
6. The method according to claim 1, wherein the information filtering the two-dimensional image information according to the target feature point to obtain the target area includes:
inputting the target feature points and the two-dimensional image information into a segmentation model which is built in advance in a training way to obtain boundary information of a target area in the two-dimensional image;
and dividing the two-dimensional image information by utilizing a preset convolutional neural network and boundary information of a target area in the two-dimensional image to obtain the target area.
7. An acquisition apparatus for a target area, the apparatus comprising:
The image acquisition module is used for acquiring two-dimensional image information; wherein the two-dimensional image information includes a target area;
The model prediction module is used for inputting the two-dimensional image information into a preset image segmentation model and outputting a plane structure for obtaining the two-dimensional image information; wherein the feature points in the planar structure correspond to feature regions predicted by the model;
the characteristic selection module is used for selecting characteristic points of a target area in the plane structure, and selecting the characteristic area as a target characteristic point of the target area;
and the target screening module is used for carrying out information screening on the two-dimensional image information according to the target characteristic points to obtain the target region.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410698739.8A CN118781133A (en) | 2024-05-31 | 2024-05-31 | Target area acquisition method and device and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410698739.8A CN118781133A (en) | 2024-05-31 | 2024-05-31 | Target area acquisition method and device and computer equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118781133A true CN118781133A (en) | 2024-10-15 |
Family
ID=92990878
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410698739.8A Pending CN118781133A (en) | 2024-05-31 | 2024-05-31 | Target area acquisition method and device and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118781133A (en) |
-
2024
- 2024-05-31 CN CN202410698739.8A patent/CN118781133A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110674804A (en) | Text image detection method and device, computer equipment and storage medium | |
CN111626295B (en) | Training method and device for license plate detection model | |
US10740901B2 (en) | Encoder regularization of a segmentation model | |
CN113436338A (en) | Three-dimensional reconstruction method and device for fire scene, server and readable storage medium | |
CN111104813A (en) | Two-dimensional code image key point detection method and device, electronic equipment and storage medium | |
CN110163095B (en) | Loop detection method, loop detection device and terminal equipment | |
CN111507288A (en) | Image detection method, image detection device, computer equipment and storage medium | |
CN115082322B (en) | Image processing method and device, and training method and device of image reconstruction model | |
CN112991429B (en) | Box volume measuring method, device, computer equipment and storage medium | |
CN114387289B (en) | Semantic segmentation method and device for three-dimensional point cloud of power transmission and distribution overhead line | |
CN115063473A (en) | Object height detection method and device, computer equipment and storage medium | |
CN114758145A (en) | Image desensitization method and device, electronic equipment and storage medium | |
CN114238541A (en) | Sensitive target information acquisition method and device and computer equipment | |
CN113012302B (en) | Three-dimensional panorama generation method, device, computer equipment and storage medium | |
CN118781133A (en) | Target area acquisition method and device and computer equipment | |
CN116958718A (en) | Vector determination method, vector determination device, computer device and storage medium | |
CN116311425A (en) | Face recognition model training method, device, computer equipment and storage medium | |
CN115965799A (en) | Image recognition method and device, computer equipment and storage medium | |
CN116229130A (en) | Type identification method and device for blurred image, computer equipment and storage medium | |
CN116310308A (en) | Image segmentation method, device, computer equipment and storage medium | |
CN111325194B (en) | Character recognition method, device and equipment and storage medium | |
CN113592876A (en) | Training method and device for split network, computer equipment and storage medium | |
CN114399676B (en) | Wheat stripe rust identification method, system, equipment and medium | |
CN116452702B (en) | Information chart rapid design method, device, computer equipment and storage medium | |
CN116612474B (en) | Object detection method, device, computer equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination |