Intelligent cutting method and device for geographic elements of image
Through intelligent cropping methods, the geographical elements in drone videos are processed, and the problems of low efficiency and large latency of geographical elements in the existing technology are solved, efficient and accurate cropping effects are achieved, and AR superposition quality and task security are improved.
Patent Information
- Application Number
- CN202510145511.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-07
- Publication Date
- 2025-06-13
AI Technical Summary
In the scenario of real-time monitoring and response of drones, it is difficult for the existing technology to effectively process and display large-scale geographical elements, resulting in limited improvement in AR effects and increased image processing delays, affecting task execution efficiency and security.
An intelligent cropping method for image geographical elements is proposed. By determining the cropping type of geographical elements of the image to be processed, the objects to be cropped that meet the preset target cropping conditions are determined, and the geographic element cropping operation is carried out to improve the cropping efficiency, reliability and accuracy.
This method not only improves the cropping efficiency and accuracy of geographical features, but also improves the processing effect of image geographical features, reduces image processing delay, meets the requirements of real-time AR superposition, and improves the efficiency and security of task execution.
Smart Images

Figure CN120147348A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular, to an intelligent clipping method and device for image geographical elements. Background Art
[0002] As a cutting-edge visual enhancement means, augmented reality (AR) technology has demonstrated its powerful application potential in numerous military and civilian fields. Its core lies in subtly superimposing additional information such as text, graphics, images, and even three-dimensional models on the basis of the original video or image through precise image processing technology, thereby enhancing the intuitiveness and richness of information.
[0003] In the field of unmanned aerial vehicles (UAVs), the application of AR technology faces more complex challenges. Especially when it is necessary to fuse large-scale geographical elements (such as buildings, rivers, roads, etc.) with the video captured by a UAV in real time, the difficulty and complexity of the technology increase significantly. In theory, through advanced coordinate transformation methods, these geographical elements can be accurately projected from the geographical coordinate system to the image plane coordinate system of the video, and then the AR effect can be superimposed. However, in actual operation, directly inverse calculating the coordinates of all geographical elements to the image plane coordinate system and displaying them often results in a large number of coordinate points falling outside the image frame area. This not only is not conducive to the improvement of the AR effect, but also significantly increases the processing time for superimposing geographical elements on each frame of the image due to a large number of invalid calculations, thereby causing a relatively large delay problem. In the scenario of real-time monitoring and response of UAVs, this delay may directly affect the execution efficiency and safety of tasks, and thus cannot meet the strict requirements of real-time AR superposition. Therefore, it is particularly important to provide a method that can improve the processing effect of image geographical elements. Summary of the Invention
[0004] The present invention provides an intelligent clipping method and device for image geographical elements, which not only improve the clipping efficiency of geographical elements, but also improve the clipping reliability and accuracy of geographical elements, thereby being conducive to enhancing the processing effect of image geographical elements.
[0005] To solve the above technical problems, in a first aspect of the present invention, an intelligent clipping method for image geographical elements is disclosed, and the method includes:
[0006] Determine the geographical element clipping type corresponding to the image to be processed; the geographical element clipping type corresponding to the image to be processed includes at least one of a point element clipping type, a line element clipping type, and a surface element clipping type;
[0007] According to the geographic feature cropping type corresponding to the image to be processed, determine, from the image to be processed, an object to be cropped that meets the preset target cropping conditions; when the geographic feature cropping type includes the point feature cropping type, the object to be cropped includes the point feature to be cropped; when the geographic feature cropping type includes the line feature cropping type, the object to be cropped includes the line feature to be cropped; when the geographic feature cropping type includes the surface feature cropping type, the object to be cropped includes the surface feature to be cropped;
[0008] Perform a geographic feature cropping operation on the image to be processed according to the object to be cropped.
[0009] As an optional implementation manner, in the first aspect of the present invention, the determining, from the image to be processed, an object to be cropped that meets the preset target cropping conditions according to the geographic feature cropping type corresponding to the image to be processed includes:
[0010] When the geographic feature cropping type corresponding to the image to be processed includes the point feature cropping type, determine the boundary parameters of the image to be processed and the position parameters of all the basic point features corresponding to the image to be processed;
[0011] According to the boundary parameters of the image to be processed and the position parameters of all the basic point features, determine, from all the basic point features, all the target point features located within the boundary range of the image to be processed as the point features to be cropped that meet the preset point cropping conditions.
[0012] As an optional implementation manner, in the first aspect of the present invention, the determining, from the image to be processed, an object to be cropped that meets the preset target cropping conditions according to the geographic feature cropping type corresponding to the image to be processed includes:
[0013] When the geographic feature cropping type corresponding to the image to be processed includes the line feature cropping type, determine, from all the basic point features corresponding to the image to be processed, all the target point features located within the boundary range of the image to be processed; each of the basic point features has a corresponding sequence identifier;
[0014] According to the sequence identifier corresponding to each of the target point features, determine a starting point feature and an ending point feature from all the target point features; the sequence identifier corresponding to the starting point feature is the earliest among the sequence identifiers corresponding to all the target point features, and the sequence identifier corresponding to the ending point feature is the latest among the sequence identifiers corresponding to all the target point features;
[0015] Determine the previous point element corresponding to the starting point element and the next point element corresponding to the ending point element from all the basic point elements according to the sequence identifier corresponding to the starting point element, the sequence identifier corresponding to the ending point element, and the fact that all the basic point elements have corresponding sequence identifiers; the sequence identifier corresponding to the previous point element is the sequence identifier adjacent and preceding the sequence identifier corresponding to the starting point element, and the sequence identifier corresponding to the next point element is the sequence identifier adjacent and following the sequence identifier corresponding to the ending point element;
[0016] Determine at least one target line element corresponding to the image to be processed according to all the target point elements, the previous point element, and the next point element, as the line element to be cropped that meets the preset line cropping condition.
[0017] As an alternative implementation manner, in the first aspect of the present invention, the determining, from the image to be processed, the object to be cropped that meets the preset target cropping condition according to the geographical element cropping type corresponding to the image to be processed includes:
[0018] When the geographical element cropping type corresponding to the image to be processed includes the surface element cropping type, determine all the target point elements located within the boundary range of the image to be processed from all the basic point elements corresponding to the image to be processed, and determine at least one target line element corresponding to the image to be processed according to all the target point elements, the previous point element corresponding to the starting point element among all the target point elements, and the next point element corresponding to the ending point element among all the target point elements; each target line element has a corresponding line element identifier, and the line element identifier corresponding to each target line element includes the line segment sequence identifier corresponding to the target line element and the sequence identifier corresponding to each point element included in the target line element;
[0019] Perform a boundary expansion operation on the image to be processed according to the offset parameter of the preset image to be processed to obtain the expanded boundary parameter of the image to be processed; the expanded boundary parameter of the image to be processed includes the expanded corner point position parameter and the expanded boundary composition parameter of the image to be processed;
[0020] Determine the surface element to be cropped that meets the preset surface cropping condition from the image to be processed according to the line element identifiers corresponding to all the target line elements and the expanded boundary parameter of the image to be processed.
[0021] As an alternative implementation manner, in the first aspect of the present invention, the determining, from the image to be processed, the surface element to be cropped that meets the preset surface cropping condition according to the line element identifiers corresponding to all the target line elements and the expanded boundary parameter of the image to be processed includes:
[0022] Perform a pre-closure operation on all the target line elements according to the line element identifiers corresponding to all the target line elements to obtain an initial pre-closed surface of the image to be processed;
[0023] Determine the cross product parameters between the initial pre-closed surface of the image to be processed and each extended boundary of the image to be processed according to the initial pre-closed surface of the image to be processed and the composition parameters of the extended boundary of the image to be processed;
[0024] Judge whether there is an intersection between the initial pre-closed surface and each extended boundary according to the cross product parameters between the initial pre-closed surface and all the extended boundaries;
[0025] When it is judged that there is no such intersection between the initial pre-closed surface and all the extended boundaries, determine the target surface element corresponding to the image to be processed according to the initial pre-closed surface as the surface element to be cropped that meets the preset surface cropping condition.
[0026] As an optional implementation manner, in the first aspect of the present invention, the method further includes:
[0027] When it is judged that there is such an intersection between the initial pre-closed surface and all the extended boundaries, determine target corner points from all the extended corner points corresponding to the image to be processed based on the extended corner point position parameters of the image to be processed;
[0028] Determine the inserted line segments corresponding to the initial pre-closed surface according to the target corner points and the initial pre-closed surface, and adjust the initial pre-closed surface according to the inserted line segments and all the target line elements to obtain an adjusted pre-closed surface;
[0029] Update the initial pre-closed surface of the image to be processed according to the adjusted pre-closed surface, and trigger the operation of determining the cross product parameters between the initial pre-closed surface of the image to be processed and each extended boundary of the image to be processed according to the initial pre-closed surface of the image to be processed and the composition parameters of the extended boundary of the image to be processed, and trigger the operation of judging whether there is an intersection between the initial pre-closed surface and each extended boundary according to the cross product parameters between the initial pre-closed surface and all the extended boundaries.
[0030] As an optional implementation manner, in the first aspect of the present invention, the determining target corner points from all the extended corner points corresponding to the image to be processed based on the extended corner point position parameters of the image to be processed includes:
[0031] Determine the distance parameters between the centroid points corresponding to all the basic point elements and each extended corner point corresponding to the image to be processed; the centroid points corresponding to all the basic point elements are determined based on the position parameters of all the basic point elements;
[0032] Determine the pre-closed surface adjustment participation situation corresponding to each extended corner point, and determine the target corner points from all the extended corner points corresponding to the image to be processed according to the distance parameters between the centroid points and all the extended corner points and the pre-closed surface adjustment participation situation corresponding to all the extended corner points.
[0033] The second aspect of the present invention discloses an intelligent cropping device for image geographic elements, and the device includes:
[0034] A first determination module, configured to determine the geographic element cropping type corresponding to the image to be processed; the geographic element cropping type corresponding to the image to be processed includes at least one of a point element cropping type, a line element cropping type, and a surface element cropping type;
[0035] A second determination module, configured to determine, according to the geographic element cropping type corresponding to the image to be processed, a to-be-cropped object that meets a preset target cropping condition from the image to be processed; when the geographic element cropping type includes the point element cropping type, the to-be-cropped object includes a to-be-cropped point element; when the geographic element cropping type includes the line element cropping type, the to-be-cropped object includes a to-be-cropped line element; when the geographic element cropping type includes the surface element cropping type, the to-be-cropped object includes a to-be-cropped surface element;
[0036] A cropping module, configured to perform a geographic element cropping operation on the image to be processed according to the to-be-cropped object.
[0037] As an optional implementation manner, in the second aspect of the present invention, the manner in which the second determination module determines the to-be-cropped object that meets the preset target cropping condition from the image to be processed according to the geographic element cropping type corresponding to the image to be processed specifically includes:
[0038] When the geographic element cropping type corresponding to the image to be processed includes the point element cropping type, determine the boundary parameters of the image to be processed and determine the position parameters of all the basic point elements corresponding to the image to be processed;
[0039] According to the boundary parameters of the image to be processed and the position parameters of all the basic point elements, determine all the target point elements located within the boundary range of the image to be processed from all the basic point elements as the to-be-cropped point elements that meet the preset point cropping condition.
[0040] As an alternative implementation manner, in the second aspect of the present invention, the manner in which the second determination module determines a to-be-clipped object that meets a preset target clipping condition from the to-be-processed image according to the geographical element clipping type corresponding to the to-be-processed image specifically includes:
[0041] When the geographical element clipping type corresponding to the to-be-processed image includes the line element clipping type, all target point elements located within the boundary range of the to-be-processed image are determined from all the basic point elements corresponding to the to-be-processed image; each of the basic point elements has a corresponding sequence identifier;
[0042] According to the sequence identifier corresponding to each target point element, a starting point element and an ending point element are determined from all the target point elements; the sequence identifier corresponding to the starting point element is the earliest among the sequence identifiers corresponding to all the target point elements, and the sequence identifier corresponding to the ending point element is the latest among the sequence identifiers corresponding to all the target point elements;
[0043] According to the sequence identifier corresponding to the starting point element, the sequence identifier corresponding to the ending point element, and the fact that all the basic point elements have corresponding sequence identifiers, a previous point element corresponding to the starting point element and a next point element corresponding to the ending point element are determined from all the basic point elements; the sequence identifier corresponding to the previous point element is the sequence identifier adjacent and before the sequence identifier corresponding to the starting point element, and the sequence identifier corresponding to the next point element is the sequence identifier adjacent and after the sequence identifier corresponding to the ending point element;
[0044] According to all the target point elements, the previous point element, and the next point element, at least one target line element corresponding to the to-be-processed image is determined as the to-be-clipped line element that meets the preset line clipping condition.
[0045] As an alternative implementation manner, in the second aspect of the present invention, the manner in which the second determination module determines a to-be-clipped object that meets a preset target clipping condition from the to-be-processed image according to the geographical element clipping type corresponding to the to-be-processed image specifically includes:
[0046] When the geographical feature clipping type corresponding to the image to be processed includes the surface feature clipping type, all target point features located within the boundary range of the image to be processed are determined from all the basic point features corresponding to the image to be processed, and at least one target line feature corresponding to the image to be processed is determined according to all the target point features, the previous point feature corresponding to the starting point feature among all the target point features, and the next point feature corresponding to the ending point feature among all the target point features; each target line feature has a corresponding line feature identifier, and the line feature identifier corresponding to each target line feature includes the line segment sequence identifier corresponding to the target line feature and the sequence identifier corresponding to each point feature included in the target line feature;
[0047] According to the offset parameter of the image to be processed preset, a boundary expansion operation is performed on the image to be processed to obtain the expanded boundary parameter of the image to be processed; the expanded boundary parameter of the image to be processed includes the expanded corner position parameter of the image to be processed and the expanded boundary composition parameter;
[0048] According to the line feature identifiers corresponding to all the target line features and the expanded boundary parameter of the image to be processed, the surface element to be clipped that meets the preset surface clipping condition is determined from the image to be processed.
[0049] As an optional implementation manner, in the second aspect of the present invention, the manner in which the second determination module determines the surface element to be clipped that meets the preset surface clipping condition from the image to be processed according to the line feature identifiers corresponding to all the target line features and the expanded boundary parameter of the image to be processed specifically includes:
[0050] According to the line feature identifiers corresponding to all the target line features, a pre-closure operation is performed on all the target line features to obtain the initial pre-closed surface of the image to be processed;
[0051] According to the initial pre-closed surface of the image to be processed and the expanded boundary composition parameter of the image to be processed, the cross product parameter between the initial pre-closed surface and each expanded boundary corresponding to the image to be processed is determined;
[0052] According to the cross product parameters between the initial pre-closed surface and all the expanded boundaries, it is judged whether there is an intersection situation between the initial pre-closed surface and each expanded boundary;
[0053] When it is judged that there is no such intersection situation between the initial pre-closed surface and all the expanded boundaries, the target surface element corresponding to the image to be processed is determined according to the initial pre-closed surface as the surface element to be clipped that meets the preset surface clipping condition.
[0054] As an alternative implementation, in the second aspect of the present invention, the specific manner in which the second determination module determines the to-be-clipped surface element that meets the preset surface clipping condition from the to-be-processed image according to the line element identifiers corresponding to all the target line elements and the extended boundary parameters of the to-be-processed image further includes:
[0055] When it is determined that there is an intersection between the initial pre-closed surface and all the extended boundaries, based on the extended corner position parameters of the to-be-processed image, a target corner is determined from all the extended corners corresponding to the to-be-processed image;
[0056] According to the target corner and the initial pre-closed surface, an insertion line segment corresponding to the initial pre-closed surface is determined, and the initial pre-closed surface is adjusted according to the insertion line segment and all the target line elements to obtain an adjusted pre-closed surface;
[0057] According to the adjusted pre-closed surface, the initial pre-closed surface of the to-be-processed image is updated, and the operation of determining the cross product parameter between the initial pre-closed surface and each extended boundary corresponding to the to-be-processed image based on the initial pre-closed surface of the to-be-processed image and the extended boundary composition parameters of the to-be-processed image is triggered, and the operation of determining whether there is an intersection between the initial pre-closed surface and each extended boundary according to the cross product parameter between the initial pre-closed surface and all the extended boundaries is triggered.
[0058] As an alternative implementation, in the second aspect of the present invention, the specific manner in which the second determination module determines a target corner from all the extended corners corresponding to the to-be-processed image based on the extended corner position parameters of the to-be-processed image specifically includes:
[0059] Determine the distance parameters between the center of gravity point corresponding to all the basic point elements and each extended corner corresponding to the to-be-processed image; the center of gravity point corresponding to all the basic point elements is determined based on the position parameters of all the basic point elements;
[0060] Determine the participation situation of each extended corner in the adjustment of the pre-closed surface, and determine the target corner from all the extended corners corresponding to the to-be-processed image according to the distance parameters between the center of gravity point and all the extended corners and the participation situation of all the extended corners in the adjustment of the pre-closed surface.
[0061] The third aspect of the present invention discloses another intelligent clipping device for image geographical elements, and the device includes:
[0062] A memory storing executable program code;
[0063] A processor coupled to the memory;
[0064] The processor calls the executable program code stored in the memory and executes the intelligent cropping method for image geographic features disclosed in the first aspect of the present invention.
[0065] The fourth aspect of the present invention discloses a computer storage medium storing computer instructions that, when called, are used to execute the intelligent cropping method for image geographic features disclosed in the first aspect of the present invention.
[0066] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0067] In the embodiments of the present invention, the geographic feature cropping type corresponding to the image to be processed is determined; the geographic feature cropping type corresponding to the image to be processed includes at least one of a point feature cropping type, a line feature cropping type, and a surface feature cropping type; according to the geographic feature cropping type, the object to be cropped that meets the preset target cropping conditions is determined from the image to be processed; and according to the object to be cropped, a geographic feature cropping operation is performed on the image to be processed. It can be seen that implementing the present invention can determine the object to be cropped corresponding to the image to be processed based on the geographic feature cropping type corresponding to the specific image to be processed, so as to perform geographic feature cropping on the image to be processed. In this way, not only the cropping efficiency of geographic features is improved, but also the cropping reliability and accuracy of geographic features are improved, which is beneficial to enhancing the processing effect of image geographic features. Description of the Drawings
[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0069] Figure 1 It is a schematic flowchart of an intelligent cropping method for image geographic features disclosed in an embodiment of the present invention;
[0070] Figure 2 It is a schematic flowchart of another intelligent cropping method for image geographic features disclosed in an embodiment of the present invention;
[0071] Figure 3 It is a schematic structural diagram of an intelligent cropping device for image geographic features disclosed in an embodiment of the present invention;
[0072] Figure 4 It is a schematic structural diagram of another intelligent cropping device for image geographic features disclosed in an embodiment of the present invention;
[0073] Figure 5 It is a schematic diagram of the cropping process of image point features disclosed in an embodiment of the present invention;
[0074] Figure 6 It is a schematic diagram of the cropping process of image line features disclosed in an embodiment of the present invention;
[0075] Figure 7 It is a schematic diagram of the cropping process of image area features disclosed in an embodiment of the present invention. Detailed implementation manners
[0076] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present invention.
[0077] The terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or terminal that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or terminals.
[0078] Referring to "embodiment" in this context means that a specific feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present invention. The phrase appears in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0079] The present invention discloses an intelligent cropping method and device for image geographic features, which not only improves the cropping efficiency of geographic features, but also improves the cropping reliability and accuracy of geographic features, thereby facilitating the improvement of the processing effect of image geographic features.
[0080] Embodiment 1
[0081] Please refer to Figure 1 , Figure 1 It is a schematic diagram of the process of an intelligent cropping method for image geographic features disclosed in an embodiment of the present invention. Among them, Figure 1The described intelligent cropping method for image geographic features can be applied to crop point features of the image to be processed, can also be applied to crop line features of the image to be processed, and can also be applied to crop surface features of the image to be processed. The embodiments of the present invention do not make limitations. Optionally, this method can be implemented by a geographic cropping device, which can be integrated in an AR video processing device (the AR video processing device can be integrated in a drone device to utilize the flight ability and perspective flexibility of the drone device for geographic feature cropping tasks), or can be a local server or a cloud server for processing the cropping process of image geographic features, etc. The embodiments of the present invention do not make limitations. As Figure 1 shown, the intelligent cropping method for image geographic features may include the following operations:
[0082] 101. Determine the geographic feature cropping type corresponding to the image to be processed.
[0083] In the embodiments of the present invention, the geographic feature cropping type corresponding to the image to be processed includes at least one of a point feature cropping type, a line feature cropping type, and a surface feature cropping type. Optionally, the image to be processed can be a quadrilateral image or an image of other polygons.
[0084] 102. According to the geographic feature cropping type corresponding to the image to be processed, determine the object to be cropped that meets the preset target cropping conditions from the image to be processed.
[0085] In the embodiments of the present invention, when the geographic feature cropping type includes the point feature cropping type, the object to be cropped includes the point feature to be cropped; when the geographic feature cropping type includes the line feature cropping type, the object to be cropped includes the line feature to be cropped; when the geographic feature cropping type includes the surface feature cropping type, the object to be cropped includes the surface feature to be cropped.
[0086] 103. According to the object to be cropped, perform a geographic feature cropping operation on the image to be processed.
[0087] In the embodiments of the present invention, that is, a point feature cropping operation can be performed on the image to be processed according to the point feature to be cropped, a line feature cropping operation can be performed on the image to be processed according to the line feature to be cropped, and a surface feature cropping operation can be performed on the image to be processed according to the surface feature to be cropped. Among them, in practical applications, the surface feature cropping type can be divided into multiple situations, namely multi-boundary visible and single-boundary visible (single-boundary visible is further divided into opposite-side penetration, adjacent-side penetration, and single-side penetration). All these situations can achieve the geographic feature cropping of the image through a unified surface feature cropping operation.
[0088] It can be seen that implementing the embodiments of the present invention can determine the object to be cropped corresponding to the image to be processed based on the geographical element cropping type corresponding to the specific image to be processed, so as to perform geographical element cropping on the image to be processed. In this way, not only the cropping efficiency of geographical elements is improved, but also the cropping reliability and accuracy of geographical elements are improved, which is conducive to enhancing the processing effect of image geographical elements.
[0089] In an alternative embodiment, the step of determining, from the image to be processed, the object to be cropped that meets the preset target cropping conditions according to the geographical element cropping type corresponding to the image to be processed in step 102 includes:
[0090] When the geographical element cropping type corresponding to the image to be processed includes a point element cropping type, determine the boundary parameters of the image to be processed and the position parameters of all basic point elements corresponding to the image to be processed;
[0091] According to the boundary parameters of the image to be processed and the position parameters of all basic point elements, determine all target point elements located within the boundary range of the image to be processed from all basic point elements as the point elements to be cropped that meet the preset point cropping conditions.
[0092] In this alternative embodiment, for example, as Figure 5 (a) shows, after determining the image width parameter width and the image height parameter height (i.e., the boundary parameters of the image to be processed) of the image to be processed, the boundary range of the image to be processed is Subsequently, according to the position parameters of each basic point element P i of the image to be processed (P x , P y )(wherein, not all basic point elements are necessarily located within the image to be processed. For example, in Figure 5 (a), from top to bottom, the basic point elements P 1 -P 4 , P 11 -P 14 are located outside the image to be processed, and the basic point elements P 5 -P 10 are located within the image to be processed), retain all target point elements located within the boundary range of the image to be processed, that is, all target point elements that meet , namely, retain all target point elements P i , that is, retain P 5 -P 10 (as shown in Figure 5 (b)), so as to obtain the point elements to be cropped that meet the preset point cropping conditions: k = 5, n = 6, where i is the corresponding target point element P iThe corresponding sequential identifier, where k is all target point elements P i The corresponding starting sequential identifier (as described above, among all target point elements within the range of the image to be processed, the starting sequential identifier is the target point element P 5 "5" in), n is all target point elements P i The corresponding number of point elements (as described above, all target point elements P 5 -P 10 , a total of 6).
[0093] It should be noted that all target point elements of the image to be processed can include point elements within the image range under one or more groups. For example Figure 5 In (b), it includes point elements P within the image range under one group 5 -P 10 , and in actual applications, all target point elements of the image to be processed can also include, for example, P 5 -P 10 , K p -K q and other point elements within the image range under multiple groups.
[0094] It can be seen that this optional embodiment can screen out all target point elements located within the boundary range of the image to be processed from all basic point elements according to the boundary parameters of the image to be processed and the position parameters of all basic point elements, and then implement the determination process of the point elements to be cropped of the image to be processed. In this way, even if the geographical elements exceed the image area range, the target point elements located within the image range can be accurately identified and retained, effectively avoiding the interference of irrelevant elements, and further improving the cropping accuracy of the geographical elements of the image to be processed, so as to maintain the relevance, accuracy and integrity of the geographical information of the image to be processed.
[0095] In another optional embodiment, the determining, from the image to be processed, the object to be cropped that meets the preset target cropping conditions according to the type of geographical element cropping corresponding to the image to be processed in step 102 includes:[[]]
[0096] When the type of geographical element cropping corresponding to the image to be processed includes the line element cropping type, determine all target point elements located within the boundary range of the image to be processed from all basic point elements corresponding to the image to be processed; each basic point element has a corresponding sequential identifier;
[0097] According to the sequential identifier corresponding to each target point element, determine the starting point element and the ending point element from all target point elements;
[0098] Determine the element before the starting point element corresponding to the starting point element and the element after the ending point element corresponding to the ending point element from all basic point elements according to the sequence identifier corresponding to the starting point element, the sequence identifier corresponding to the ending point element, and the fact that all basic point elements have corresponding sequence identifiers.
[0099] Determine at least one target line element corresponding to the image to be processed according to all target point elements, the element before the previous point, and the element after the next point, as the line element to be cropped that meets the preset line cropping condition.
[0100] In this optional embodiment, it should be noted that different from the starting point element and the ending point element determined from the target point elements within the boundary range of the image to be processed, the element before the starting point element and the element after the ending point element are both determined from all basic point elements except all target point elements, that is, determined from the basic point elements outside the boundary range of the image to be processed. Further, each basic point element has a preset corresponding sequence identifier, which does not change whether it is within or outside the boundary range of the image to be processed. Among them, the sequence identifier corresponding to the element before the previous point is the sequence identifier adjacent and preceding the sequence identifier corresponding to the starting point element, and the sequence identifier corresponding to the element after the next point is the sequence identifier adjacent and following the sequence identifier corresponding to the ending point element. In addition, both the element before the previous point and the element after the next point are outside the boundary range of the image to be processed. In this way, when performing AR overlay, the line element will not float alone in the image frame.
[0101] For example, as Figure 6 shown, first retain all target point elements P 5 -P 10 located within the boundary range of the image to be processed from all basic point elements corresponding to the image to be processed. That is k = 5, n = 6 (the determination process of the target point element here can refer to the aforementioned determination process of the point element to be cropped). Among them, the sequence identifier corresponding to the starting point element is the earliest among all the sequence identifiers corresponding to the target point elements, that is, P 5 , and the sequence identifier corresponding to the ending point element is the latest among all the sequence identifiers corresponding to the target point elements, that is, P 10 ; then, determine from all basic point elements the element before the previous point whose sequence identifier is adjacent and preceding the sequence identifier corresponding to the starting point element, that is, P 4 , and the element after the next point whose sequence identifier is adjacent and following the sequence identifier corresponding to the ending point element, that is, P 11 . Thus, according to P 4 -P 11 , determine that the target line element corresponding to the image to be processed is: k = 5, n = 6.
[0102] It should be noted that, similarly, all target point elements here may include one or more groups of point elements within the image range, and each group of point elements within the image range has corresponding starting point elements and ending point elements. Therefore, each group of point elements within the image range also has a previous point element corresponding to the corresponding starting point element, and a subsequent point element corresponding to the corresponding ending point element. Figure 6 (b) shows a set of point elements P within the image range. 5 -P 10 , there is a starting point element P within this group of image ranges 5 The corresponding previous point element P 4 , and there is a terminal point element P 10 The corresponding next point element P 11 ,therefore, Figure 6 (b) can determine a target line element L. In practical applications, all target point elements of the image to be processed can also include P 5 -P 10 , K p -K q The point elements within the image range under multiple groups, and so on, can be determined 5 -P 10 The corresponding previous point element P 4 And the last element P 11 , and determine K p -K q The corresponding previous point element K p-1 And the last element K q+1 And so on, so that multiple target line elements L can be determined.
[0103] It can be seen that this optional embodiment can determine all target point elements within the boundary range of the image to be processed from all basic point elements corresponding to the image to be processed, and determine the starting point element, the ending point element and the adjacent front and rear point elements based on the sequential identifiers corresponding to all target point elements, and then construct the target line element that meets the line element clipping conditions. In this way, the occurrence of line element clipping errors caused by inaccurate recognition is reduced, thereby improving the clipping accuracy and efficiency of the line elements; in addition, it can flexibly handle the situation of containing multiple groups of point elements within the image range, and then generate multiple target line elements, so that it can be widely used in different types of geographic element clipping needs, thereby improving its applicability and practicality.
[0104] Embodiment 2
[0105] See also Figure 2 , Figure 2It is a schematic flowchart of another intelligent cropping method for image geographical features disclosed in an embodiment of the present invention. Among them, Figure 2 The described intelligent cropping method for image geographical features can be applied to crop point features of the image to be processed, can also be applied to crop line features of the image to be processed, and can also be applied to crop surface features of the image to be processed. The embodiments of the present invention do not make limitations. Optionally, this method can be implemented by a geographical cropping device, which can be integrated in an AR video processing device (this AR video processing device can be integrated in a drone device to utilize the flight ability and perspective flexibility of the drone device for geographical feature cropping tasks), or can also be a local server or a cloud server for processing the cropping process of image geographical features, etc. The embodiments of the present invention do not make limitations. As Figure 2 shown, the intelligent cropping method for this image geographical feature may include the following operations:
[0106] 201. Determine the geographical feature cropping type corresponding to the image to be processed.
[0107] 202. When the geographical feature cropping type corresponding to the image to be processed includes a surface feature cropping type, determine all target point features located within the boundary range of the image to be processed from all the basic point features corresponding to the image to be processed, and determine at least one target line feature corresponding to the image to be processed according to all the target point features, the previous point feature corresponding to the starting point feature among all the target point features, and the subsequent point feature corresponding to the ending point feature among all the target point features.
[0108] In the embodiments of the present invention, among them, each target line feature has a corresponding line feature identifier, and the line feature identifier corresponding to each target line feature includes the line segment sequence identifier corresponding to the target line feature and the sequence identifier corresponding to each point feature included in the target line feature.
[0109] For example, if all the basic point features that meet the line feature cropping conditions are retained according to the aforementioned line feature cropping process, a two-dimensional array is obtained wherein, the first dimension is the line segment, the second dimension is each point of the corresponding line segment, n represents that there are n line segments in total, and the corresponding line segment L j starts from point k j -1 and contains a total of m j points of the line segment.
[0110] 203. Perform a boundary expansion operation on the image to be processed according to the preset offset parameter of the image to be processed to obtain the expanded boundary parameter of the image to be processed.
[0111] In an embodiment of the present invention, the extended boundary parameters of the image to be processed include the extended corner position parameters of the image to be processed and the extended boundary composition parameters.
[0112] For example, after determining the image width parameter width and the image height parameter height of the image to be processed (rectangular image), based on the preset offset parameter offset of the image to be processed, boundary extension is performed on the image to be processed, and the extended corner position parameters of the image to be processed can be obtained as: And the four line segments formed are
[0113] 204. According to the line element identifiers corresponding to all target line elements and the extended boundary parameters of the image to be processed, determine the surface element to be cropped that meets the preset surface cropping conditions from the image to be processed.
[0114] 205. Perform a geographic element cropping operation on the image to be processed according to the surface element to be cropped.
[0115] In an embodiment of the present invention, for other descriptions of steps 201 and 205, please refer to the detailed descriptions of steps 101 and 103 in Embodiment 1, and the embodiments of the present invention will not be elaborated herein.
[0116] It can be seen that implementing the embodiments of the present invention can, after determining all target line elements corresponding to the image to be processed, perform a boundary extension operation on the image to be processed based on the preset offset parameter to obtain the extended boundary parameters of the image to be processed, and then determine the surface element to be cropped that meets the preset surface cropping conditions according to the line element identifiers corresponding to all target line elements and the extended boundary parameters of the image to be processed, thereby realizing the surface element cropping process of the image to be processed. In this way, even for images with blurred edges or transition regions, the accuracy and clarity of the cropped surface elements can be ensured, thus optimizing the geographic element cropping effect of the image and facilitating the popularization and application of geographic element cropping technology in fields such as geographic information systems and remote sensing analysis.
[0117] In an alternative embodiment, according to the above-mentioned step 204 of determining the surface element to be cropped that meets the preset surface cropping conditions from the image to be processed according to the line element identifiers corresponding to all target line elements and the extended boundary parameters of the image to be processed, it includes:
[0118] Perform a pre-closure operation on all target line elements according to the line element identifiers corresponding to all target line elements to obtain the initial pre-closed surface of the image to be processed;
[0119] Determine the cross product parameters between the initial pre-closed surface and each extended boundary corresponding to the image to be processed according to the initial pre-closed surface of the image to be processed and the composition parameters of the extended boundary of the image to be processed.
[0120] Judge whether there is an intersection between the initial pre-closed surface and each extended boundary according to the cross product parameters between the initial pre-closed surface and all extended boundaries.
[0121] When it is judged that there is no intersection between the initial pre-closed surface and all extended boundaries, determine the target surface element corresponding to the image to be processed according to the initial pre-closed surface, as the surface element to be cropped that meets the preset surface cropping conditions.
[0122] In this optional embodiment, for example, if and in the image to be processed are used to form the initial pre-closed surface (if it is the last point of the last line segment, it is connected to the first point of the first line segment, as shown in the second schematic diagram in Figure 7 (b), Figure 7 the second schematic diagram in Figure 7 (d), and Figure 7 the second schematic diagram in
[0123] It can be seen that this optional embodiment can connect all target line elements into a complete initial pre-closed surface through pre-closure operation, ensuring the integrity and continuity of the cropped surface element in structure; further, using the cross product parameter to judge whether the initial pre-closed surface intersects with the extended boundary of the image to be processed can further improve the cropping accuracy of the surface element and reduce the cropping error caused by inaccurate boundary recognition; at the same time, it can also reduce the complexity of the image processing algorithm and improve the processing efficiency of geographical elements of the image.
[0124] In another optional embodiment, the method further includes:
[0125] When it is judged that there is an intersection between the initial pre-closed surface and all extended boundaries, determine the target corner points from all extended corner points corresponding to the image to be processed based on the extended corner point position parameters of the image to be processed.
[0126] Determine the inserted line segment corresponding to the initial pre-closed surface according to the target corner points and the initial pre-closed surface, and adjust the initial pre-closed surface according to the inserted line segment and all target line elements to obtain the adjusted pre-closed surface.
[0127] Update the initial pre-closed surface of the image to be processed according to the adjusted pre-closed surface, and trigger the operations of determining the cross product parameters between the initial pre-closed surface and each extended boundary corresponding to the image to be processed based on the initial pre-closed surface of the image to be processed and the composition parameters of the extended boundary of the image to be processed, and triggering the operation of determining whether there is an intersection between the initial pre-closed surface and each extended boundary based on the cross product parameters between the initial pre-closed surface and all extended boundaries.
[0128] In this optional embodiment, further, based on the extended corner point position parameters of the image to be processed, determine the target corner point from all the extended corner points corresponding to the image to be processed, including:
[0129] Determine the distance parameters between the center of gravity point corresponding to all the basic point elements and each extended corner point corresponding to the image to be processed; the center of gravity point corresponding to all the basic point elements is determined based on the position parameters of all the basic point elements;
[0130] Determine the participation of each extended corner point in the adjustment of the pre-closed surface, and determine the target corner point from all the extended corner points corresponding to the image to be processed according to the distance parameters between the center of gravity point and all the extended corner points and the participation of all the extended corner points in the adjustment of the pre-closed surface.
[0131] For example, as Figure 7 (d) shows, after determining the distance parameters between the center of gravity point corresponding to all the basic point elements and each extended corner point corresponding to the image to be processed and the participation of each extended corner point in the adjustment of the pre-closed surface, determine the extended corner point with the minimum distance parameter from all the extended corner points, and judge whether the extended corner point participated in the adjustment of the initial pre-closed surface in the previous round. If not, the extended corner point can be determined as the target corner point (i.e., Figure 7 (d) the lower right corner point shown in the third schematic diagram), and based on the target corner point and the inserted line segment corresponding to the determined initial pre-closed surface, adjust the initial pre-closed surface, and then perform a cross product operation on the obtained adjusted pre-closed surface and each extended boundary corresponding to the image to be processed again to determine whether the adjusted pre-closed surface intersects with each extended boundary corresponding to the image to be processed. If not (as Figure 7 (d) shows), the adjusted pre-closed surface can be determined as the surface element to be cropped that meets the preset surface cropping conditions;
[0132] Another example is Figure 7 (f) shows, after determining that the adjusted closed surface does not yet meet the condition of not intersecting with each extended boundary corresponding to the image to be processed, and the extended corner point with the minimum distance parameter participated in the adjustment of the initial pre-closed surface in the previous round (asFigure 7 (when it is the fourth schematic diagram of (d)), it is possible to adaptively use the extended corner points with a smaller distance parameter and that have not participated in the initial pre-closed surface adjustment (i.e., Figure 7 the upper right corner point shown in the fifth schematic diagram of (d)) as the target corner points, and then adjust the updated initial pre-closed surface again, and perform the aforementioned cross product operation and the determination operation of the intersection situation.
[0133] It can be seen that this optional embodiment can continuously adjust the initial pre-closed surface by gradually adjusting and screening the target corner points. In this way, the adjustment process of the pre-closed surface can adapt to images of different shapes and sizes, and further improve the flexibility and adaptability of the adjustment of the pre-closed surface, which is beneficial to improving the reliability and accuracy of the surface element clipping of the image; at the same time, through gradual iteration and conditional judgment, unnecessary repeated calculations are also reduced, and the processing efficiency is improved to be applicable to various image processing or GIS application scenarios.
[0134] Embodiment III
[0135] Please refer to Figure 3 , Figure 3 which is a schematic structural diagram of an intelligent clipping device for image geographic elements disclosed in an embodiment of the present invention. As Figure 3 shown, the intelligent clipping device for image geographic elements may include:
[0136] A first determination module 301, configured to determine the geographic element clipping type corresponding to the image to be processed;
[0137] A second determination module 302, configured to determine, from the image to be processed, the object to be clipped that meets the preset target clipping conditions according to the geographic element clipping type corresponding to the image to be processed;
[0138] A clipping module 303, configured to perform geographic element clipping operations on the image to be processed according to the object to be clipped.
[0139] In the embodiment of the present invention, the geographic element clipping type corresponding to the image to be processed includes at least one of a point element clipping type, a line element clipping type, and a surface element clipping type; when the geographic element clipping type includes a point element clipping type, the object to be clipped includes the point element to be clipped; when the geographic element clipping type includes a line element clipping type, the object to be clipped includes the line element to be clipped; when the geographic element clipping type includes a surface element clipping type, the object to be clipped includes the surface element to be clipped.
[0140] It can be seen that in the implementation Figure 3The described intelligent cropping device for image geographic features can determine the object to be cropped corresponding to the image to be processed based on the geographic feature cropping type corresponding to the specific image to be processed, so as to perform geographic feature cropping on the image to be processed. In this way, not only the cropping efficiency of geographic features is improved, but also the cropping reliability and accuracy of geographic features are enhanced, which is conducive to improving the processing effect of image geographic features.
[0141] In an optional embodiment, the specific manner in which the second determination module 302 determines the object to be cropped that meets the preset target cropping conditions from the image to be processed according to the geographic feature cropping type corresponding to the image to be processed includes:
[0142] When the geographic feature cropping type corresponding to the image to be processed includes the point feature cropping type, determine the boundary parameters of the image to be processed and the position parameters of all basic point features corresponding to the image to be processed;
[0143] According to the boundary parameters of the image to be processed and the position parameters of all basic point features, determine all target point features located within the boundary range of the image to be processed from all basic point features as the point features to be cropped that meet the preset point cropping conditions.
[0144] It can be seen that implementing Figure 3 The described intelligent cropping device for image geographic features can screen out all target point features located within the boundary range of the image to be processed from all basic point features according to the boundary parameters of the image to be processed and the position parameters of all basic point features, and then realize the determination process of the point features to be cropped of the image to be processed. In this way, even if the geographic features exceed the image area range, the target point features located within the image range can be accurately identified and retained, effectively avoiding the interference of irrelevant features, and further improving the cropping accuracy of the geographic features of the image to be processed, so as to maintain the relevance, accuracy and integrity of the geographic information of the image to be processed.
[0145] In another optional embodiment, the specific manner in which the second determination module 302 determines the object to be cropped that meets the preset target cropping conditions from the image to be processed according to the geographic feature cropping type corresponding to the image to be processed includes:
[0146] When the geographic feature cropping type corresponding to the image to be processed includes the line feature cropping type, determine all target point features located within the boundary range of the image to be processed from all basic point features corresponding to the image to be processed; each basic point feature has a corresponding sequence identifier;
[0147] According to the sequence identifier corresponding to each target point feature, determine the starting point feature and the ending point feature from all target point features;
[0148] Determine the previous point element corresponding to the starting point element and the next point element corresponding to the ending point element from all basic point elements according to the sequence identifier corresponding to the starting point element, the sequence identifier corresponding to the ending point element, and the existence of corresponding sequence identifiers for all basic point elements;
[0149] Determine at least one target line element corresponding to the image to be processed according to all target point elements, the previous point element, and the next point element, as the line element to be cropped that meets the preset line cropping condition.
[0150] In this alternative embodiment, the sequence identifier corresponding to the starting point element is the earliest among the sequence identifiers corresponding to all target point elements, and the sequence identifier corresponding to the ending point element is the latest among the sequence identifiers corresponding to all target point elements; the sequence identifier corresponding to the previous point element is the sequence identifier adjacent and preceding the sequence identifier corresponding to the starting point element, and the sequence identifier corresponding to the next point element is the sequence identifier adjacent and following the sequence identifier corresponding to the ending point element.
[0151] It can be seen that implementing Figure 3 The described intelligent cropping device for image geographic elements can determine all target point elements located within the boundary range of the image to be processed from all basic point elements corresponding to the image to be processed, and based on the sequence identifiers corresponding to all target point elements, determine the starting point element, the ending point element, and the adjacent previous and next point elements, and then construct target line elements that meet the line element cropping conditions. In this way, the situation of line element cropping errors caused by inaccurate recognition is reduced, thereby improving the cropping accuracy and efficiency of line elements; in addition, it can flexibly handle the situation of containing multiple sets of point elements within the image range, and then multiple target line elements can be generated, so that it can be widely applied to different types of geographic element cropping requirements, improving its applicability and practicality.
[0152] In yet another alternative embodiment, the specific manner in which the second determination module 302 determines the object to be cropped that meets the preset target cropping condition from the image to be processed according to the geographic element cropping type corresponding to the image to be processed includes:
[0153] When the geographic element cropping type corresponding to the image to be processed includes a surface element cropping type, determine all target point elements located within the boundary range of the image to be processed from all basic point elements corresponding to the image to be processed, and determine at least one target line element corresponding to the image to be processed according to all target point elements, the previous point element corresponding to the starting point element among all target point elements, and the next point element corresponding to the ending point element among all target point elements;
[0154] Perform a boundary expansion operation on the image to be processed according to the offset parameter of the preset image to be processed to obtain the expanded boundary parameter of the image to be processed;
[0155] According to the line element identifiers corresponding to all target line elements and the extended boundary parameters of the image to be processed, determine, from the image to be processed, the surface elements to be cropped that meet the preset surface cropping conditions.
[0156] In this optional embodiment, each target line element has a corresponding line element identifier. The line element identifier corresponding to each target line element includes the line segment sequence identifier corresponding to the target line element and the sequence identifier corresponding to each point element included in the target line element; the extended boundary parameters of the image to be processed include the extended corner position parameters of the image to be processed and the extended boundary composition parameters.
[0157] It can be seen that implementing Figure 3 The intelligent cropping device for image geographical elements described above can, after determining all target line elements corresponding to the image to be processed, perform a boundary extension operation on the image to be processed based on the preset offset parameters to obtain the extended boundary parameters of the image to be processed, and then determine, according to the line element identifiers corresponding to all target line elements and the extended boundary parameters of the image to be processed, the surface elements to be cropped that meet the preset surface cropping conditions, thereby realizing the surface element cropping process of the image to be processed. In this way, even for images with blurred edges or transition regions, the accuracy and clarity of the cropped surface elements can be ensured, thus optimizing the cropping effect of the image geographical elements and facilitating the popularization and application of the geographical element cropping technology in fields such as geographic information systems and remote sensing analysis.
[0158] In another optional embodiment, the specific manner in which the second determination module 302 determines, from the image to be processed, the surface elements to be cropped that meet the preset surface cropping conditions according to the line element identifiers corresponding to all target line elements and the extended boundary parameters of the image to be processed includes:
[0159] Perform a pre-closure operation on all target line elements according to the line element identifiers corresponding to all target line elements to obtain the initial pre-closed surface of the image to be processed;
[0160] Determine the cross product parameters between the initial pre-closed surface of the image to be processed and each extended boundary corresponding to the image to be processed according to the initial pre-closed surface of the image to be processed and the extended boundary composition parameters of the image to be processed;
[0161] Judge whether there is an intersection between the initial pre-closed surface and each extended boundary according to the cross product parameters between the initial pre-closed surface and all extended boundaries;
[0162] When it is judged that there is no intersection between the initial pre-closed surface and all extended boundaries, determine the target surface element corresponding to the image to be processed according to the initial pre-closed surface as the surface element to be cropped that meets the preset surface cropping conditions.
[0163] It can be seen that implementing Figure 3 the intelligent cropping device for image geographic elements described above can, through a pre-closure operation, connect all target line elements into a complete initial pre-closed surface, ensuring the integrity and continuity of the cropped surface elements in terms of structure; further, by using the cross-product parameter to determine whether the initial pre-closed surface intersects with the extended boundary of the image to be processed, the cropping accuracy of the surface elements can be further improved, reducing the cropping error caused by inaccurate boundary recognition; at the same time, the complexity of the image processing algorithm can also be reduced, improving the processing efficiency of the geographic elements of the image.
[0164] In yet another alternative embodiment, the specific manner in which the second determination module 302 determines the surface elements to be cropped that meet the preset surface cropping conditions from the image to be processed according to the line element identifiers corresponding to all target line elements and the extended boundary parameters of the image to be processed further includes:
[0165] When it is determined that there is an intersection between the initial pre-closed surface and all the extended boundaries, based on the extended corner position parameters of the image to be processed, target corner points are determined from all the extended corner points corresponding to the image to be processed;
[0166] According to the target corner points and the initial pre-closed surface, the insertion line segments corresponding to the initial pre-closed surface are determined, and the initial pre-closed surface is adjusted according to the insertion line segments and all target line elements to obtain an adjusted pre-closed surface;
[0167] According to the adjusted pre-closed surface, the initial pre-closed surface of the image to be processed is updated, and the operations of triggering and executing to determine the cross-product parameters between the initial pre-closed surface and each extended boundary corresponding to the image to be processed according to the initial pre-closed surface of the image to be processed and the composition parameters of the extended boundaries of the image to be processed, and the operations of triggering and executing to determine whether there is an intersection between the initial pre-closed surface and each extended boundary according to the cross-product parameters between the initial pre-closed surface and all extended boundaries are triggered.
[0168] In this alternative embodiment, further, the specific manner in which the second determination module 302 determines target corner points from all the extended corner points corresponding to the image to be processed based on the extended corner position parameters of the image to be processed specifically includes:
[0169] Determine the distance parameters between the center of gravity points corresponding to all basic point elements and each extended corner point corresponding to the image to be processed;
[0170] Determine the participation status of each extended corner point in the adjustment of the pre-closed surface, and determine target corner points from all the extended corner points corresponding to the image to be processed according to the distance parameters between the center of gravity points and all the extended corner points and the participation status of all the extended corner points in the adjustment of the pre-closed surface.
[0171] In this alternative embodiment, the centroid points corresponding to all the basic point elements are determined based on the position parameters of all the basic point elements.
[0172] It can be seen that implementing Figure 3 the described intelligent cropping device for image geographic elements can continuously adjust the initial pre-closed surface by gradually adjusting and screening the target corner points. In this way, the adjustment process of the pre-closed surface can adapt to images of different shapes and sizes, and thus the flexibility and adaptability of the adjustment of the pre-closed surface can be improved, which is conducive to improving the reliability and accuracy of the cropping of the surface elements of the image. At the same time, through gradual iteration and conditional judgment, unnecessary repeated calculations are also reduced, and the processing efficiency is improved to be applicable to various image processing or GIS application scenarios.
[0173] Embodiment Four
[0174] Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of another intelligent cropping device for image geographic elements disclosed in the embodiments of the present invention. As Figure 4 shown, the intelligent cropping device for image geographic elements may include:
[0175] A memory 401 storing executable program code;
[0176] A processor 402 coupled to the memory 401;
[0177] The processor 402 calls the executable program code stored in the memory 401 and executes the steps in the intelligent cropping method for image geographic elements described in Embodiment One or Embodiment Two of the present invention.
[0178] Embodiment Five
[0179] The embodiments of the present invention disclose a computer storage medium. The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the steps in the intelligent cropping method for image geographic elements described in Embodiment One or Embodiment Two of the present invention.
[0180] Embodiment Six
[0181] The embodiments of the present invention disclose a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the steps in the intelligent cropping method for image geographic elements described in Embodiment One or Embodiment Two.
[0182] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0183] Through the specific descriptions of the above embodiments, those skilled in the art can clearly understand that each implementation manner can be realized by means of software plus a necessary general hardware platform, and of course, it can also be realized by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, and the storage medium includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disk memories, tape memories, or any other computer-readable medium that can be used to carry or store data.
[0184] Finally, it should be noted that: The intelligent cropping method and device for image geographical elements disclosed in the embodiments of the present invention only disclose the preferred embodiments of the present invention, which are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments or equivalently replace some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An intelligent cropping method for image geographic elements, characterized in that: The method comprises: Determine the geographic element clipping type corresponding to the image to be processed; the geographic element clipping type corresponding to the image to be processed includes at least one of a point element clipping type, a line element clipping type and a surface element clipping type; According to the geographic element clipping type corresponding to the image to be processed, determining the object to be clipped that meets the preset target clipping condition from the image to be processed; when the geographic element clipping type includes the point element clipping type, the object to be clipped includes the point element to be clipped; when the geographic element clipping type includes the line element clipping type, the object to be clipped includes the line element to be clipped; when the geographic element clipping type includes the surface element clipping type, the object to be clipped includes the surface element to be clipped; According to the object to be cropped, a geographic element cropping operation is performed on the image to be processed.
2. The intelligent cropping method of image geographic elements according to claim 1, characterized in that: The step of determining, from the image to be processed, an object to be cropped that meets a preset target cropping condition according to the geographic element cropping type corresponding to the image to be processed, comprises: When the geographic element clipping type corresponding to the image to be processed includes the point element clipping type, determining the boundary parameters of the image to be processed, and determining the position parameters of all basic point elements corresponding to the image to be processed; According to the boundary parameters of the image to be processed and the position parameters of all the basic point elements, all target point elements located within the boundary range of the image to be processed are determined from all the basic point elements as the point elements to be cropped that meet the preset point cropping conditions.
3. The intelligent cropping method of image geographic elements according to claim 1, characterized in that: The step of determining, from the image to be processed, an object to be cropped that meets a preset target cropping condition according to the geographic element cropping type corresponding to the image to be processed, comprises: When the geographic element clipping type corresponding to the image to be processed includes the line element clipping type, all target point elements located within the boundary range of the image to be processed are determined from all basic point elements corresponding to the image to be processed; each of the basic point elements has a corresponding sequence identifier; According to the sequence identifier corresponding to each of the target point elements, a starting point element and an ending point element are determined from all the target point elements; the sequence identifier corresponding to the starting point element is the first sequence identifier corresponding to all the target point elements, and the sequence identifier corresponding to the ending point element is the last sequence identifier corresponding to all the target point elements; According to the sequence identifier corresponding to the starting point element, the sequence identifier corresponding to the ending point element, and the existence of corresponding sequence identifiers of all the basic point elements, determine the previous point element corresponding to the starting point element and the next point element corresponding to the ending point element from all the basic point elements; the sequence identifier corresponding to the previous point element is the sequence identifier that is adjacent to and precedes the sequence identifier corresponding to the starting point element, and the sequence identifier corresponding to the next point element is the sequence identifier that is adjacent to and follows the sequence identifier corresponding to the ending point element; At least one target line element corresponding to the image to be processed is determined according to all the target point elements, the previous point element and the next point element as a line element to be clipped that meets a preset line clipping condition.
4. The intelligent cropping method of image geographic elements according to claim 1, characterized in that: The step of determining, from the image to be processed, an object to be cropped that meets a preset target cropping condition according to the geographic element cropping type corresponding to the image to be processed, comprises: When the geographic element clipping type corresponding to the image to be processed includes the area element clipping type, all target point elements located within the boundary range of the image to be processed are determined from all basic point elements corresponding to the image to be processed, and at least one target line element corresponding to the image to be processed is determined based on all the target point elements, the previous point element corresponding to the starting point element among all the target point elements, and the subsequent point element corresponding to the ending point element among all the target point elements; each of the target line elements has a corresponding line element identifier, and the line element identifier corresponding to each of the target line elements includes a line segment sequence identifier corresponding to the target line element and a sequence identifier corresponding to each point element contained in the target line element; According to the preset offset parameters of the image to be processed, a boundary extension operation is performed on the image to be processed to obtain the expanded boundary parameters of the image to be processed; the expanded boundary parameters of the image to be processed include the expanded corner point position parameters and the expanded boundary composition parameters of the image to be processed; According to the line element identifiers corresponding to all the target line elements and the expanded boundary parameters of the image to be processed, the surface elements to be clipped that meet the preset surface clipping conditions are determined from the image to be processed.
5. The intelligent cropping method of image geographic elements according to claim 4, characterized in that: The step of determining, from the image to be processed, the surface elements to be clipped that meet the preset surface clipping conditions according to the line element identifiers corresponding to all the target line elements and the expanded boundary parameters of the image to be processed, comprises: According to the line element identifiers corresponding to all the target line elements, a pre-closing operation is performed on all the target line elements to obtain an initial pre-closing surface of the image to be processed; Determine, according to the initial pre-closed surface of the image to be processed and the extended boundary composition parameters of the image to be processed, a cross product parameter between the initial pre-closed surface and each extended boundary corresponding to the image to be processed; According to the cross product parameter between the initial pre-closed surface and all the extended boundaries, determining whether there is an intersection between the initial pre-closed surface and each of the extended boundaries; When it is determined that there is no intersection between the initial pre-closed surface and all the expanded boundaries, the target surface element corresponding to the image to be processed is determined based on the initial pre-closed surface as the surface element to be clipped that meets the preset surface clipping conditions.
6. The intelligent cropping method of image geographic elements according to claim 5, characterized in that: The method further comprises: When it is determined that there is the intersection between the initial pre-closed surface and all the expanded boundaries, based on the expanded corner point position parameters of the image to be processed, determining the target corner point from all the expanded corner points corresponding to the image to be processed; According to the target corner point and the initial pre-closing surface, determining the insertion line segment corresponding to the initial pre-closing surface, and adjusting the initial pre-closing surface according to the insertion line segment and all the target line elements to obtain an adjusted pre-closing surface; According to the adjusted pre-closed surface, the initial pre-closed surface of the image to be processed is updated, and the operation of determining the cross product parameters between the initial pre-closed surface and each extended boundary corresponding to the image to be processed based on the initial pre-closed surface of the image to be processed and the extended boundary composition parameters of the image to be processed is triggered, and the operation of judging whether there is an intersection between the initial pre-closed surface and each of the extended boundaries based on the cross product parameters between the initial pre-closed surface and all the extended boundaries is triggered.
7. The intelligent cropping method of image geographic elements according to claim 6, characterized in that: The step of determining the target corner point from all the extended corner points corresponding to the image to be processed based on the extended corner point position parameters of the image to be processed includes: Determine the distance parameter between the center point corresponding to all the basic point elements and each expanded corner point corresponding to the image to be processed; the center point corresponding to all the basic point elements is determined based on the position parameters of all the basic point elements; Determine the participation status of each of the extended corner points in the pre-closed surface adjustment, and determine the target corner point from all the extended corner points corresponding to the image to be processed based on the distance parameters between the center of gravity point and all the extended corner points and the participation status of all the extended corner points in the pre-closed surface adjustment.
8. An intelligent cropping device for image geographic elements, characterized in that: The device comprises: A first determination module is used to determine the geographic element clipping type corresponding to the image to be processed; the geographic element clipping type corresponding to the image to be processed includes at least one of a point element clipping type, a line element clipping type and a surface element clipping type; A second determination module is used to determine, from the image to be processed, an object to be cropped that meets a preset target cropping condition according to the geographic element cropping type corresponding to the image to be processed; when the geographic element cropping type includes the point element cropping type, the object to be cropped includes the point element to be cropped; when the geographic element cropping type includes the line element cropping type, the object to be cropped includes the line element to be cropped; when the geographic element cropping type includes the surface element cropping type, the object to be cropped includes the surface element to be cropped; The cropping module is used to perform a geographic element cropping operation on the image to be processed according to the object to be cropped.
9. An intelligent cropping device for image geographic elements, characterized in that: The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the intelligent clipping method of image geographic elements as described in any one of claims 1-7.
10. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the intelligent clipping method of image geographic elements as described in any one of claims 1-7.