A large scene image group target region automatic clipping method and system
By clustering and merging large-scene images based on the preset importance of target types, the problem of slow information transmission under limited hardware resources is solved, and the transmission of target areas is fast and accurate, meeting real-time requirements.
Patent Information
- Application Number
- CN202310642642.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2043-05-31
AI Technical Summary
In existing technologies, information from target detection in large-scene images is difficult to transmit quickly and effectively with limited hardware resources, which affects the improvement of combat capabilities.
By pre-setting the importance of target types, the target types with the highest importance are obtained, and clustering and merging are performed. Large scene images are cropped to convey important target areas. Clustering is performed using the coordinates of the four corner points and the center point of the target, and overlapping areas are removed by merging intersections.
It enables rapid and accurate communication to important target areas under limited hardware resources, improving the information transmission rate and accuracy, and meeting real-time requirements.
Smart Images

Figure CN116704186B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method and system for automatic cropping of target regions in large scene image groups. Background Technology
[0002] The automatic cropping technology for group targets in large scene images aims to quickly and effectively convey the order of group targets in large scene images to users according to their importance.
[0003] After loading large-scene images onto hardware resources for target detection, the detected target information is not directly transmitted to the user as needed. Given the limited hardware resources required for target detection in large-scene images, the rapid and effective transmission of information is increasingly important, as it enhances combat capabilities. Therefore, further breakthroughs are needed to improve the transmission rate and accuracy of target information from large-scene images. Summary of the Invention
[0004] To address the technical problems existing in the background art, this invention proposes an automatic cropping method and system for target regions in large scene image groups.
[0005] This invention proposes an automatic cropping method for target regions in large-scene image groups, comprising the following steps:
[0006] S1: Input a large scene image and a list of targets for the large scene image;
[0007] S2: Preset the importance of the target type;
[0008] S3: Obtain the target type with the highest importance;
[0009] S4: Retrieve targets that match the target type from the target list to form a target sublist;
[0010] S5: Cluster all targets in the target sublist and obtain the first group of target regions for this target type;
[0011] S6: Merge the target regions that have intersection in the first group target region list, and obtain the second group target region list of this target type;
[0012] S7: Crop the large scene image based on the second group target region list to obtain the group target region map of this target type;
[0013] S8: Obtain the target type with the next highest importance, and repeat steps S4 to S7 until all target types are traversed, thereby achieving automatic cropping of target regions in large scene image groups.
[0014] Preferably, in step S1, the large scene image includes latitude and longitude coordinates and resolution information; the target includes the pixel coordinates of the four corner points of the target, the coordinates of the center point, and the target type information.
[0015] Preferably, in step S4, the targets in the target sublist are marked with a first mark value.
[0016] Preferably, in step S5, the specific steps for clustering all targets in the target sublist and obtaining the first group of target regions for that target type are as follows:
[0017] S51: The resolution of the large scene image is P, the target search distance is set to D, the search window is set to W, and the formula for calculating the search window is:
[0018] W = 2*(D / P) + 1
[0019] S52: The first target in the target sublist with the first marker value is the starting target;
[0020] S53: Modify the first marker value of the initial target to the second marker value, and place the initial target in a new group target list;
[0021] S54: Using the center point coordinates of the starting target as the center of the search window, the pixels in the search window are judged in turn. If the pixel is in the search window and is marked with the first mark value, the first mark value of the pixel is changed to the second mark value, and the pixel is placed as a target in the same group of targets of the starting target. After all pixels in the search window have been traversed, the clustering of targets of the same group is achieved.
[0022] S55: Take the next target in the target sublist with the first label value as the starting target; repeat steps S53 to S54 until all targets in the target sublist are labeled with the second label value, and the loop ends. This achieves the clustering of all targets in the target sublist into various groups, and the resulting list of all group targets constitutes the group target list.
[0023] S56: Retrieve the list of group targets that is ranked first in the group target list;
[0024] S57: Construct a set of coordinate points for the target group by using the pixel coordinates of the four corner points of all targets in the target group list;
[0025] S58: Calculate the minimum bounding rectangle of the coordinate point set of the target list of this class, obtain the target region of this class, and obtain the pixel coordinates of the four corner points of the target region of this class;
[0026] S59: Obtain the next-ranked group target list from the group target list. Repeat steps S57 to S58 until all group target lists in the group target list are traversed. The pixel coordinates of the four corner points of each group target region constitute the first group target region list for that target type.
[0027] Preferably, in step S6, the specific steps for merging the overlapping target regions in the first group target region list are as follows:
[0028] S61: Calculate whether there is any intersection between the target regions in the first group target region list. If there is no intersection, go to step S62; if there is an intersection, go to step S63.
[0029] S62: Directly output the list of target regions in the first group and mark it as the list of target regions in the second group;
[0030] S63: Merge the intersecting target regions, update the pixel coordinates of the four corner points of the merged target region, and mark the merged target region list as the second target region list.
[0031] Preferably, in step S61, the specific steps for calculating whether there is an intersection between the target regions of each group are as follows:
[0032] Calculate the intersection of group target region A and group target region B. If the intersection is 0, then group target region A and group target region B have no intersection; if the intersection is greater than 0, then group target region A and group target region B have an intersection.
[0033] I(A,B)=A∩B
[0034] Wherein: the overlapping area of group target region A and group target region B is denoted as A∩B.
[0035] Preferably, in step S7, the specific steps for cropping the large scene image based on the second group of target regions list are as follows:
[0036] Based on the pixel coordinates of the four corner points of each type of target region in the second target region list, crop the target region map on the large scene image.
[0037] A system for automatically cropping target regions in a large scene image group, comprising:
[0038] The input module is used to input a large-scene image and a list of targets for the large-scene image;
[0039] The preset module is used to preset the importance of target types;
[0040] The processing module is used to divide the targets according to their types based on the input target list and the preset target type importance, and then perform clustering and merging processing on the targets to obtain the final second group of target regions list;
[0041] The output module crops the large scene image based on the second group target region list to obtain the group target region map of this target type.
[0042] In this embodiment, the proposed automatic cropping method for large scene image group target regions outputs group target regions according to the order of importance of target types from high to low, enabling rapid communication of group target regions with high importance; furthermore, by clustering targets to achieve large scene image group target region cropping, all group target regions can be quickly located and displayed on the large scene image; and, by using the intersection merging method to remove the intersection between group target regions, the speed and accuracy of target region communication are further improved.
[0043] Furthermore, in this invention, clustering is performed using the pixel coordinates of the four corner points and the center point coordinates of the target, which further ensures the accuracy of the acquired target area and the rapid positioning and display of the target area; moreover, using point sets instead of images consumes less hardware resources and can meet the requirements of real-time performance. Attached Figure Description
[0044] Figure 1 This is a flowchart illustrating an automatic cropping method for target regions in large scene image groups proposed in this invention.
[0045] Figure 2 This is a flowchart illustrating the method for target clustering and obtaining the list of target regions in the first group in the method described in this invention.
[0046] Figure 3 This is a flowchart illustrating the method for merging intersecting target regions in the method described in this invention. Detailed Implementation
[0047] Reference Figure 1-3 The present invention proposes an automatic cropping method for target regions in large scene image groups, comprising the following steps:
[0048] S1: Input a large scene image and a list of targets for the large scene image.
[0049] Specifically, in step S1, the large scene image includes latitude and longitude coordinates and resolution information.
[0050] The target includes the pixel coordinates of the four corner points, the coordinates of the center point, and information about the target type.
[0051] S2: Preset the importance of the target type.
[0052] S3: Obtain the target type with the highest importance.
[0053] S4: Retrieve a sublist of targets that match the target type from the target list.
[0054] In this embodiment, in step S4, the targets in the target sublist are marked with the first mark value.
[0055] S5: Cluster all targets in the target sublist and obtain the first group of target regions for that target type.
[0056] In this embodiment, step S5, which involves clustering all targets in the target sublist and obtaining the first group of target regions for that target type, comprises the following steps:
[0057] S51: The resolution of the large scene image is P, the target search distance is set to D, the search window is set to W, and the formula for calculating the search window is:
[0058] W = 2*(D / P) + 1
[0059] S52: The first target in the target sublist with the first marker value is the starting target;
[0060] S53: Modify the first marker value of the initial target to the second marker value, and place the initial target in a new group target list;
[0061] S54: Using the center point coordinates of the starting target as the center of the search window, the pixels in the search window are judged in turn. If the pixel is in the search window and is marked with the first mark value, the first mark value of the pixel is changed to the second mark value, and the pixel is placed as a target in the same group of targets of the starting target. After all pixels in the search window have been traversed, the clustering of targets of the same group is achieved.
[0062] S55: Take the next target in the target sublist with the first label value as the starting target; repeat steps S53 to S54 until all targets in the target sublist are labeled with the second label value, and the loop ends. This achieves the clustering of all targets in the target sublist into various groups, and the resulting list of all group targets constitutes the group target list.
[0063] S56: Retrieve the list of group targets that is ranked first in the group target list;
[0064] S57: Construct a set of coordinate points for the target group by using the pixel coordinates of the four corner points of all targets in the target group list;
[0065] S58: Calculate the minimum bounding rectangle of the coordinate point set of the target list of this class, obtain the target region of this class, and obtain the pixel coordinates of the four corner points of the target region of this class;
[0066] S59: Obtain the next-ranked group target list from the group target list. Repeat steps S57 to S58 until all group target lists in the group target list are traversed. The pixel coordinates of the four corner points of each group target region constitute the first group target region list for that target type.
[0067] S6: Merge the overlapping target regions in the first group target region list and obtain the second group target region list for this target type.
[0068] In this embodiment, the specific steps for merging the overlapping target regions in the first group target region list in step S6 are as follows:
[0069] S61: Calculate whether there is any intersection between the target regions in the first group target region list. If there is no intersection, go to step S62; if there is an intersection, go to step S63.
[0070] S62: Directly output the list of target regions in the first group and mark it as the list of target regions in the second group;
[0071] S63: Merge the intersecting target regions, update the pixel coordinates of the four corner points of the merged target region, and mark the merged target region list as the second target region list.
[0072] In this embodiment, the specific steps for calculating whether there is an intersection between the target regions of each group in step S61 are as follows:
[0073] Calculate the intersection of group target region A and group target region B. If the intersection is 0, then group target region A and group target region B have no intersection; if the intersection is greater than 0, then group target region A and group target region B have an intersection.
[0074] I(A,B)=A∩B
[0075] Wherein: the overlapping area of group target region A and group target region B is denoted as A∩B.
[0076] S7: Crop the large scene image based on the second group target region list to obtain the group target region map of this target type;
[0077] In this embodiment, the specific steps for cropping the large scene image based on the second group of target regions list in step S7 are as follows:
[0078] Based on the pixel coordinates of the four corner points of each type of target region in the second target region list, crop the target region map on the large scene image.
[0079] S8: Obtain the target type with the next highest importance, and repeat steps S4 to S7 until all target types are traversed, thereby achieving automatic cropping of target regions in large scene image groups.
[0080] A system for automatically cropping target regions in a large scene image group, comprising:
[0081] The input module is used to input a large-scene image and a list of targets for the large-scene image;
[0082] The preset module is used to preset the importance of target types;
[0083] The processing module is used to divide the targets according to their types based on the input target list and the preset target type importance, and then perform clustering and merging processing on the targets to obtain the final second group of target regions list;
[0084] The output module crops the large scene image based on the second group target region list to obtain the group target region map of this target type.
[0085] In this embodiment, the proposed automatic cropping method for large-scene image group target regions outputs cropped target regions according to the order of importance of target types from high to low, enabling rapid communication of highly important target regions. Furthermore, by clustering targets to achieve large-scene image group target region cropping, all target regions in the large-scene image can be quickly located and displayed. Moreover, the method of merging intersections removes overlaps between target regions, further improving the speed and accuracy of target region communication. Additionally, clustering using the pixel coordinates of the four corner points and the center point coordinates of the target further ensures the accuracy of the acquired target regions and their rapid location and display. Moreover, using point sets instead of images reduces hardware resource consumption while meeting real-time requirements.
[0086] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for automatically cropping target regions in a large scene image group, characterized in that, Includes the following steps: S1: Input a large scene image and a list of targets for the large scene image; S2: Preset the importance of the target type; S3: Obtain the target type with the highest importance; S4: Retrieve targets that match the target type from the target list to form a target sublist; S5: Cluster all targets in the target sublist and obtain the first group of target regions for this target type; S6: Merge the target regions that have intersection in the first group target region list, and obtain the second group target region list of this target type; S7: Crop the large scene image based on the second group target region list to obtain the group target region map of this target type; S8: Obtain the target type with the next highest importance, and repeat steps S4 to S7 until all target types are traversed to achieve automatic cropping of target regions in large scene image groups. In step S4, the targets in the target sublist are marked with the first mark value; In step S5, the specific steps for clustering all targets in the target sublist and obtaining the first group of target regions for that target type are as follows: S51: The resolution of the large scene image is P, the target search distance is set to D, the search window is set to W, and the formula for calculating the search window is: W = 2*(D / P) + 1 S52: The first target in the target sublist with the first marker value is the starting target; S53: Modify the first marker value of the initial target to the second marker value, and place the initial target in a new group target list; S54: Using the center point coordinates of the starting target as the center of the search window, the pixels in the search window are judged in turn. If the pixel is in the search window and is marked with the first mark value, the first mark value of the pixel is changed to the second mark value, and the pixel is placed as a target in the same group of targets of the starting target. After all pixels in the search window have been traversed, the clustering of targets of the same group is achieved. S55: Take the next target in the target sublist with the first label value as the starting target; repeat steps S53 to S54 until all targets in the target sublist are labeled with the second label value, and the loop ends. This achieves the clustering of all targets in the target sublist into various groups, and the resulting list of all group targets constitutes the group target list. S56: Retrieve the list of group targets that is ranked first in the group target list; S57: Construct a set of coordinate points for the target group by using the pixel coordinates of the four corner points of all targets in the target group list; S58: Calculate the minimum bounding rectangle of the coordinate point set of the target list of this class, obtain the target region of this class, and obtain the pixel coordinates of the four corner points of the target region of this class; S59: Obtain the next-ranked group target list from the group target list. Repeat steps S57 to S58 until all group target lists in the group target list are traversed. The pixel coordinates of the four corner points of each group target region constitute the first group target region list for that target type.
2. The method for automatic cropping of target regions in large scene image groups according to claim 1, characterized in that, In step S1, the large scene image includes latitude and longitude coordinates and resolution information; the target includes the pixel coordinates of the four corner points of the target, the coordinates of the center point, and the target type information.
3. The method for automatic cropping of target regions in large scene image groups according to claim 1, characterized in that, In step S6, the specific steps for merging the overlapping target regions in the first group target region list are as follows: S61: Calculate whether there is any intersection between the target regions in the first group target region list. If there is no intersection, go to step S62; if there is an intersection, go to step S63. S62: Directly output the list of target regions in the first group and mark it as the list of target regions in the second group; S63: Merge the intersecting target regions, update the pixel coordinates of the four corner points of the merged target region, and mark the merged target region list as the second target region list.
4. The method for automatic cropping of target regions in large scene image groups according to claim 3, characterized in that, In step S61, the specific steps for calculating whether there is an intersection between the target regions of each group are as follows: Calculate the intersection of group target region A and group target region B. If the intersection is 0, then group target region A and group target region B have no intersection; if the intersection is greater than 0, then group target region A and group target region B have an intersection. I(A,B)=A∩B Wherein: the overlapping area of group target region A and group target region B is denoted as A∩B.
5. The method for automatic cropping of target regions in large scene image groups according to claim 3, characterized in that, In step S7, the specific steps for cropping the large scene image based on the second group of target regions list are as follows: Based on the pixel coordinates of the four corner points of each type of target region in the second target region list, crop the target region map on the large scene image.
6. A system applied to the automatic cropping method for target regions in large scene image groups as described in any one of claims 1-5, characterized in that, include: The input module is used to input a large-scene image and a list of targets for the large-scene image; The preset module is used to preset the importance of target types; The processing module is used to divide the targets according to their types based on the input target list and the preset target type importance, and then perform clustering and merging processing on the targets to obtain the final second group of target regions list; The output module crops the large scene image based on the second group target region list to obtain the group target region map of this target type.
Citation Information
Patent Citations
Method for quickly extracting ship target slice in large-scene SAR image
CN108596151A
Image processing method and device and electronic equipment
CN114461837A