CN-117152186-B - Data processing method, device, electronic equipment and computer readable medium
Abstract
The application discloses a data processing method, a device, electronic equipment and a computer readable medium, wherein the method comprises the steps of firstly determining an edge point set corresponding to each building from image data after the image data for describing at least one building is acquired, so that the edge point set is used for recording pixel points which are positioned at edge positions of all pixel points occupied by the corresponding building on the image data, the edge point set can describe the position of the corresponding building in the image data by using fewer pixel point coordinates, and then analyzing the position information of the building by using the edge point set corresponding to any building, so that the position information can represent the position of the building, and the purpose of automatically analyzing the position of the building from the image data can be realized.
Inventors
- Zhang Suoyong
Assignees
- 北京有竹居网络技术有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20230822
Claims (14)
- 1. A method of data processing, the method comprising: acquiring image data, wherein the image data carries at least one pixel point corresponding to a building; determining a set of edge points corresponding to each building from the image data; And for any building, deleting the fourth class of points from the edge point set corresponding to the building in response to the existence of the fourth class of points meeting the preset four-point angle simplification condition in the edge point set corresponding to the building, analyzing the position information of the building by utilizing the edge point set corresponding to the building, wherein the preset four-point angle simplification condition indicates that the edge point set corresponding to the building comprises a fifth adjacent point corresponding to the fourth class of points, a sixth adjacent point corresponding to the fourth class of points and a seventh adjacent point corresponding to the sixth adjacent point, the distance between the fifth adjacent point and the fourth class of points is larger than a second threshold value, the distance between the fourth class of points and the sixth adjacent point is not larger than the second threshold value, the distance between the sixth adjacent point and the seventh adjacent point is not larger than the second threshold value, the distance between the fourth class of points and a straight line formed by the fifth adjacent point and the seventh adjacent point is not larger than the third threshold value, and the distance between the fourth class of points and the seventh adjacent point is not larger than the third threshold value.
- 2. The method of claim 1, wherein analyzing the location information of the building using the corresponding set of edge points of the building comprises: simplifying the corresponding edge point set of the building; And determining the position information of the building according to the simplified edge point set.
- 3. The method of claim 2, wherein the simplifying process comprises: if a first type point exists in the edge point set corresponding to the building, deleting the first type point from the edge point set corresponding to the building, wherein the edge point set corresponding to the building comprises a first adjacent point corresponding to the first type point and a second adjacent point corresponding to the first type point, the first adjacent point and the second adjacent point are located on the same straight line, and the first type point is not located on the straight line.
- 4. A method according to claim 3, wherein the first type of points are located at the positions of tines in a saw tooth shape formed by the first type of points, the first adjacent points and the second adjacent points.
- 5. The method of claim 2, wherein the simplifying process comprises: And deleting the second class points from the edge point set corresponding to the building if the second class points exist in the edge point set corresponding to the building, wherein the edge point set corresponding to the building comprises a plurality of candidate points which are adjacent in sequence, the plurality of candidate points are positioned on the same straight line, and the second class points comprise other points except for two end points on the straight line.
- 6. The method of claim 2, wherein the simplifying process comprises: And deleting the third class of points from the edge point set corresponding to the building if the third class of points exist in the edge point set corresponding to the building, wherein the edge point set corresponding to the building comprises a third adjacent point corresponding to the third class of points and a fourth adjacent point corresponding to the third class of points, and the distance from the third class of points to a straight line formed by the third adjacent point and the fourth adjacent point is smaller than a first threshold value.
- 7. The method of claim 2, wherein the simplifying process comprises: And deleting a fifth type of point from the edge point set corresponding to the building if the fifth type of point exists in the edge point set corresponding to the building, wherein the edge point set corresponding to the building comprises an eighth adjacent point corresponding to the fifth type of point, a ninth adjacent point corresponding to the fifth type of point and a tenth adjacent point corresponding to the eighth adjacent point, the distance between the tenth adjacent point and the eighth adjacent point is larger than a second threshold value, the distance between the eighth adjacent point and the fifth type of point is not larger than the second threshold value, the distance between the fifth type of point and the ninth adjacent point is larger than the second threshold value, the distance between the eighth adjacent point and a straight line formed by the tenth adjacent point and the ninth adjacent point is not larger than a third threshold value, and the distance between the fifth type of point and a straight line formed by the tenth adjacent point and the ninth adjacent point is not larger than a third threshold value.
- 8. The method of claim 2, wherein the simplifying the process of determining the set of processed edge points comprises: If a first type of points meeting a preset saw tooth simplifying condition exists in the edge point set corresponding to the building, deleting the first type of points from the edge point set corresponding to the building to obtain a saw tooth simplified set; If the second class points meeting the preset intermediate point simplification conditions exist in the saw-tooth simplified set, deleting the second class points from the saw-tooth simplified set to obtain an intermediate point simplified set; if a third class of points meeting a preset three-point distance simplification condition exists in the intermediate point simplified set, deleting the third class of points from the intermediate point simplified set to obtain a three-point distance simplified set; if a fourth class of points meeting the preset four-point angle simplification condition exists in the three-point distance simplified set, deleting the fourth class of points from the three-point distance simplified set to obtain a four-point angle simplified set; And if a fifth type of points meeting the preset intermediate point simplification condition exists in the four-point angle simplified set, deleting the fifth type of points from the four-point angle simplified set to obtain a simplified edge point set.
- 9. The method according to claim 1, wherein the method further comprises: for any building, constructing a three-dimensional model of the building by using the position information of the building; A three-dimensional model of the at least one building is displayed.
- 10. The method of claim 1, wherein the image data acquisition process comprises: When a map is in a display state, the display state of the map is adjusted according to a map display configuration parameter corresponding to a target building group, so that the adjusted map is used for displaying the target building group, the map display configuration parameter comprises a center point parameter and a scaling parameter, the center point parameter is determined according to the center position information of the target building group, and the scaling parameter is determined according to the occupied area of the target building group on the map; and performing screenshot processing on the adjusted map to obtain the image data.
- 11. The method of claim 1, wherein said determining a corresponding set of edge points for each of said buildings from said image data comprises: hollowing out other pixel points except for the pixel point corresponding to at least one building in the image data to obtain a building description image, wherein the building description image comprises the pixel point corresponding to the at least one building; If a sixth type of points and adjacent points corresponding to the sixth type of points exist in the building description image, and the number of the adjacent points corresponding to the sixth type of points reaches a fourth threshold, hollowing out the sixth type of points in the building description image to obtain an edge point description image, wherein the edge point description image comprises the edge points corresponding to the at least one building; and carrying out grouping processing on the pixel points in the edge point description image to obtain an edge point set corresponding to each building.
- 12. A data processing apparatus, comprising: the system comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring image data, and the image data carries at least one pixel point corresponding to a building; a determining unit, configured to determine, from the image data, a set of edge points corresponding to each building; The analyzing unit is used for responding to the existence of a fourth class of points meeting a preset four-point angle simplification condition in an edge point set corresponding to any building, deleting the fourth class of points from the edge point set corresponding to the building, analyzing the position information of the building by utilizing the edge point set corresponding to the building, wherein the preset four-point angle simplification condition indicates that the edge point set corresponding to the building comprises a fifth adjacent point corresponding to the fourth class of points, a sixth adjacent point corresponding to the fourth class of points and a seventh adjacent point corresponding to the sixth adjacent point, the distance between the fifth adjacent point and the fourth class of points is larger than a second threshold value, the distance between the fourth class of points and the sixth adjacent point is not larger than the second threshold value, the distance between the sixth adjacent point and the seventh adjacent point is larger than the second threshold value, the distance between the fourth class of points and a straight line formed by the fifth adjacent point and the seventh adjacent point is not larger than the third threshold value, and the distance between the fourth class of points and the seventh adjacent point is not larger than the third threshold value.
- 13. An electronic device, comprising a processor and a memory; the memory is used for storing instructions or computer programs; the processor for executing the instructions or computer program in the memory to cause the electronic device to perform the method of any of claims 1-11.
- 14. A computer readable medium, characterized in that it has stored therein instructions or a computer program which, when run on a device, causes the device to perform the method of any of claims 1-11.
Description
Data processing method, device, electronic equipment and computer readable medium Technical Field The present application relates to the field of data processing technologies, and in particular, to a data processing method, a data processing device, an electronic device, and a computer readable medium. Background In some application scenarios (for example, building three-dimensional model reconstruction scenarios, building lighting analysis scenarios, etc.), some processing tasks (for example, building three-dimensional model reconstruction processing, etc.) may need to be completed by means of some building position information. However, in some cases, the location information of these buildings may not be directly obtained, resulting in failure to complete the above-described processing task. Disclosure of Invention In order to solve the technical problems, the application provides a data processing method, a data processing device, electronic equipment and a computer readable medium. In order to achieve the above purpose, the technical scheme provided by the application is as follows: the application provides a data processing method, which comprises the following steps: acquiring image data, wherein the image data carries at least one pixel point corresponding to a building; determining a set of edge points corresponding to each building from the image data; And for any building, analyzing the position information of the building by utilizing the corresponding edge point set of the building. In one possible implementation manner, the analyzing the location information of the building by using the corresponding edge point set of the building includes: simplifying the corresponding edge point set of the building; And determining the position information of the building according to the simplified edge point set. In one possible implementation, the simplifying process includes: if a first type point exists in the edge point set corresponding to the building, deleting the first type point from the edge point set corresponding to the building, wherein the edge point set corresponding to the building comprises a first adjacent point corresponding to the first type point and a second adjacent point corresponding to the first type point, the first adjacent point and the second adjacent point are located on the same straight line, and the first type point is not located on the straight line. In one possible embodiment, the first type of points are located at the positions of tines in a saw tooth shape made up of the first type of points, the first adjacent points, and the second adjacent points. In one possible implementation, the simplifying process includes: And deleting the second class points from the edge point set corresponding to the building if the second class points exist in the edge point set corresponding to the building, wherein the edge point set corresponding to the building comprises a plurality of candidate points which are adjacent in sequence, the plurality of candidate points are positioned on the same straight line, and the second class points comprise other points except for two end points on the straight line. In one possible implementation, the simplifying process includes: And deleting the third class of points from the edge point set corresponding to the building if the third class of points exist in the edge point set corresponding to the building, wherein the edge point set corresponding to the building comprises a third adjacent point corresponding to the third class of points and a fourth adjacent point corresponding to the third class of points, and the distance from the third class of points to a straight line formed by the third adjacent point and the fourth adjacent point is smaller than a first threshold value. In one possible implementation, the simplifying process includes: And deleting the fourth type of points from the edge point set corresponding to the building if the fourth type of points exist in the edge point set corresponding to the building, wherein the edge point set corresponding to the building comprises a fifth adjacent point corresponding to the fourth type of points, a sixth adjacent point corresponding to the fourth type of points and a seventh adjacent point corresponding to the sixth adjacent point, the distance between the fifth adjacent point and the fourth type of points is larger than a second threshold value, the distance between the fourth type of points and the sixth adjacent point is not larger than the second threshold value, the distance between the sixth adjacent point and the seventh adjacent point is larger than the second threshold value, the distance between the fourth type of points and a straight line formed by the fifth adjacent point and the seventh adjacent point is not larger than a third threshold value, and the distance between the sixth adjacent point and a straight line formed by the fifth adjacent point and the seventh adjacent poi