Methods, apparatus, equipment, and media for target size extraction based on remote sensing images.

By calculating the contour convex hull of remote sensing images using Graham scanning and rotating caliper algorithms, the problem of inaccurate target size extraction in traditional methods is solved, achieving efficient and accurate target size extraction in complex environments.

CN118196174BActive Publication Date: 2025-10-31北京观微科技有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410287336.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-13
Publication Date
2025-10-31
Estimated Expiration
2044-03-13

AI Technical Summary

Technical Problem

Traditional methods for extracting target size based on visual images are not accurate enough in complex backgrounds, and deep learning algorithms have high data requirements, high training costs, high computational complexity, and limited applicability, resulting in inaccurate target size extraction.

Method used

The Graham scanning algorithm is used to determine the convex hull of the remote sensing image. Combined with the rotating caliper algorithm, the target size is extracted by calculating the geometric features of the convex hull.

Benefits of technology

It improves the efficiency and accuracy of target size extraction, is suitable for target monitoring under various environmental conditions, and has higher stability and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118196174B_ABST
    Figure CN118196174B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, device, and medium for target size extraction based on remote sensing imagery, relating to the field of image data processing technology. The method includes: using the Graham scanning algorithm to determine the convex hull of the target profile in the vector data corresponding to the remote sensing image; using a rotating caliper algorithm to determine the longest line segment corresponding to the convex hull, where the first and second endpoints of the longest line segment are points on the convex hull; correcting the longest line segment based on the center point of the convex hull to obtain the target's longest line segment, where the third and fourth endpoints of the target's longest line segment are points on the convex hull; and extracting the target size based on the target's longest line segment. This method is applicable to target monitoring under various environmental conditions. By employing the Graham scanning algorithm, the extraction efficiency of the convex hull from the vector data corresponding to the remote sensing image can be improved. Combined with the rotating caliper algorithm, the geometric features of the convex hull are calculated, improving both the extraction efficiency and the accuracy of the target size.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data processing technology, and in particular to a method, apparatus, device, and medium for extracting target size based on remote sensing images. Background Technology

[0002] With the rapid development of technology, image data processing technology has been widely applied. For example, digital image processing technology can help people better process, analyze, and understand image information, thereby improving image quality and clarity, and providing more accurate basic data for subsequent image analysis and recognition. Currently, extracting the size of targets in images has become a hot topic, and is of great significance for subsequent target monitoring.

[0003] Traditional methods for extracting target size from visual images often employ edge detection algorithms or deep learning algorithms. However, the former has drawbacks such as sensitivity to complex backgrounds, inability to accurately handle irregular shapes, and limited applicability, while the latter has drawbacks such as high data requirements, high training costs, high computational complexity, and limited applicability. Both of these factors can lead to inaccurate target size extraction. Summary of the Invention

[0004] This invention provides a method, apparatus, device, and medium for target size extraction based on remote sensing images. Compared with traditional target size extraction methods based on visual images, this method is more stable and reliable because remote sensing images are not affected by external factors. Therefore, this method is suitable for target monitoring under various environmental conditions. By employing the Graham scanning algorithm, the extraction efficiency of the convex hull of the contour in the vector data corresponding to the remote sensing image can be improved. Furthermore, by combining the rotating caliper algorithm, the geometric features of the convex hull are calculated, which not only improves the extraction efficiency of the target size but also effectively improves the accuracy of the target size.

[0005] This invention provides a target size extraction method based on remote sensing imagery, comprising:

[0006] The Graham scanning algorithm is used to determine the convex hull of the target in the vector data corresponding to the remote sensing image.

[0007] The longest line segment corresponding to the convex hull of the contour is determined by using a rotating caliper algorithm, wherein the first endpoint and the second endpoint of the longest line segment are both points on the convex hull of the contour.

[0008] Based on the center point of the convex hull of the contour, the longest line segment is corrected to obtain the target longest line segment, where the third endpoint and the fourth endpoint of the target longest line segment are both points on the convex hull of the contour.

[0009] The dimensions of the target to be measured are extracted based on the longest line segment of the target.

[0010] According to a target size extraction method based on remote sensing imagery provided by the present invention, the step of determining the convex hull of the target profile in the vector data corresponding to the remote sensing imagery using the Graham scanning algorithm includes: selecting a reference point from the set of points corresponding to the target profile in the vector data corresponding to the remote sensing imagery; using the reference point as a basis, scanning other points in the set of points in a counterclockwise order to determine the order of all points in the set of points; scanning all points in the order to determine a target point from all points; and determining the convex hull of the target profile based on the target point.

[0011] According to the present invention, a target size extraction method based on remote sensing imagery is provided. The method employs a rotating caliper algorithm to determine the longest line segment corresponding to the convex hull of the contour, comprising: S1, obtaining an initial caliper corresponding to the convex hull of the contour and a first vector edge in the initial caliper; S2, determining a second vector edge adjacent to the first vector edge; S3, determining a target vector edge of the initial caliper based on the cross product of the first vector edge and the second vector edge, and determining the target vector edge as the new first vector edge; S4, repeating the above steps S2-S3 until the initial caliper returns to its initial position, and determining the finally determined target vector edge as the longest line segment corresponding to the convex hull of the contour.

[0012] According to a target size extraction method based on remote sensing imagery provided by the present invention, the step of correcting the longest line segment based on the center point of the convex hull of the contour to obtain the target longest line segment includes: extending the line segment between the center point of the convex hull and the first endpoint to intersect the convex hull, thereby obtaining a first line segment between the first endpoint and a first intersection point; extending the line segment between the center point of the convex hull and the second endpoint to intersect the convex hull, thereby obtaining a second line segment between the second endpoint and a second intersection point; and determining the longer line segment between the first line segment and the second line segment as the target longest line segment.

[0013] According to a target size extraction method based on remote sensing imagery provided by the present invention, the step of extracting the size of the target to be measured based on the longest line segment of the target includes: calculating the azimuth angle of the longest line segment of the target; rotating the convex hull of the contour clockwise around the center point by the azimuth angle to obtain the target contour convex hull; rotating the circumscribed rectangle corresponding to the target contour convex hull counterclockwise around the center point by the azimuth angle to obtain the target circumscribed rectangle; and determining the length and width of the target circumscribed rectangle as the size of the target to be measured.

[0014] According to a target size extraction method based on remote sensing imagery provided by the present invention, the step of scanning all points in the order and determining the target point from all points includes: S1, determining a first point adjacent to the reference point and a second point adjacent to the first point in the order; S2, determining the orientation of the first point based on the vector between the reference point and the first point, and the vector between the first point and the second point.

[0015] S3. If the turn is left, retain the first point and determine the first point as the new reference point; if the turn is right, discard the first point and determine the second point as the new reference point; S4. Repeat the above steps S1-S3 until all points are traversed, and determine the reference point and all retained first points as the target point.

[0016] According to a target size extraction method based on remote sensing imagery provided by the present invention, the endpoints of the first vector edge include a first vertex and a second vertex, and the endpoints of the second vector edge include a second vertex and a third vertex; determining the target vector edge of the initial trap based on the cross product result of the first vector edge and the second vector edge includes: determining the cross product result of the first vector edge and the second vector edge; if the cross product result is greater than or equal to 0, determining the vector line segment between the first vertex and the third vertex as the target vector edge of the initial trap; if the cross product result is less than 0, determining the second vector edge as the target vector edge.

[0017] The present invention also provides a target size extraction device based on remote sensing imagery, comprising:

[0018] The convex hull determination module is used to determine the contour convex hull of the target in the vector data corresponding to the remote sensing image using the Graham scanning algorithm.

[0019] The line segment determination module is used to determine the longest line segment corresponding to the contour convex hull using a rotating caliper algorithm, wherein the first endpoint and the second endpoint of the longest line segment are both points on the contour convex hull; and the longest line segment is corrected according to the center point of the contour convex hull to obtain the target longest line segment, wherein the third endpoint and the fourth endpoint of the target longest line segment are both points on the contour convex hull.

[0020] The size determination module is used to extract the size of the target to be measured based on the longest line segment of the target.

[0021] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the target size extraction method based on remote sensing images as described above.

[0022] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the target size extraction method based on remote sensing images as described above.

[0023] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the target size extraction method based on remote sensing images as described above.

[0024] This invention provides a method, apparatus, device, and medium for extracting target dimensions based on remote sensing images. It employs the Graham scanning algorithm to determine the convex hull of the target in the vector data corresponding to the remote sensing image; uses a rotating caliper algorithm to determine the longest line segment corresponding to the convex hull, where the first and second endpoints of the longest line segment are points on the convex hull; corrects the longest line segment based on the center point of the convex hull to obtain the target's longest line segment, where the third and fourth endpoints are points on the convex hull; and extracts the size of the target based on the target's longest line segment. This method is more stable and reliable than traditional visual image-based target dimension extraction methods because remote sensing images are unaffected by external factors. Therefore, this method is suitable for target monitoring under various environmental conditions. By employing the Graham scanning algorithm, the extraction efficiency of the convex hull in the vector data corresponding to the remote sensing image can be improved. Furthermore, by combining the rotating caliper algorithm to calculate the geometric features of the convex hull, the extraction efficiency and accuracy of the target size can be effectively improved simultaneously. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0026] Figure 1 This is a flowchart illustrating the target size extraction method based on remote sensing images provided by the present invention;

[0027] Figure 2a This is a schematic diagram of the initial remote sensing image provided by the present invention;

[0028] Figure 2b This is a schematic diagram of the first remote sensing image provided by the present invention;

[0029] Figure 2c This is a schematic diagram of the second remote sensing image provided by the present invention;

[0030] Figure 2d This is a schematic diagram of the vector data corresponding to the remote sensing image provided by the present invention;

[0031] Figure 2e This is a schematic diagram of the polygon set and contour convex hull of the target to be measured provided by the present invention;

[0032] Figure 2f This is a schematic diagram of the longest line segment corresponding to the contour convex hull provided by the present invention;

[0033] Figure 2g This is a schematic diagram of the target longest line segment corresponding to the contour convex hull provided by the present invention;

[0034] Figure 2h This is a schematic diagram of the target bounding rectangle corresponding to the target contour convex hull provided by the present invention;

[0035] Figure 3 This is a schematic diagram of the target size extraction device based on remote sensing images provided by the present invention;

[0036] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0038] To better understand the embodiments of the present invention, the background art will first be described in detail:

[0039] Traditional methods for extracting target size from visual images often employ edge detection algorithms or deep learning algorithms to extract the target size from the visual image.

[0040] In the process of extracting the target size from a visual image using an edge detection algorithm, preprocessing, edge detection, contour detection, and size calculation can be performed on the visual image. Specifically, S1, the visual image is converted to grayscale to simplify processing, and filters or other filtering techniques are applied to remove noise from the grayscale image to improve the effect of subsequent edge detection; S2, the Canny edge detection algorithm is used to find the edges of the target (such as an airplane) in the denoised grayscale image, which will generate a binary image displaying the edges around the airplane boundary; S3, a preset contour detection function is used to find the contour of the airplane in the binary image. Optionally, depending on the actual needs, all contours can be detected or only the outer contour can be detected; S4, the airplane contour is processed. Based on the airplane contour information, the target contour is filtered out, and then the size is calculated. By measuring specific parts of the airplane contour (such as the longest width or height), combined with the resolution of the binary image and the known scaling factor, the actual physical size of the airplane can be estimated.

[0041] However, the entire process has drawbacks such as sensitivity to complex backgrounds, inability to accurately handle irregular shapes, and limited applicability.

[0042] Among the challenges are: sensitivity to complex backgrounds: noisy backgrounds can lead to false detections, and edges may be affected by the texture of the tarmac concrete pavement, buildings, lighting, etc., resulting in inaccurate aircraft edge extraction; inability to accurately handle irregular shapes: for irregularly shaped aircraft, edge detection algorithms may not be able to accurately capture all details, resulting in incomplete extraction of length and width information; and limited applicability: edge detection algorithms are sensitive to parameters and need to be frequently adjusted to adapt to different scenes and lighting conditions. Furthermore, for aircraft parked at arbitrary angles, the influence of angle on physical dimensions cannot be considered.

[0043] In the process of extracting target sizes from visual images using deep learning algorithms, object detection models can be applied to the visual images to perform scale estimation. Specifically, S1, object detection models (such as YOLO (You Only LookOnce), Faster Region-Convolutional Neural Networks (Faster R-CNN), Single Shot MultiBox Detector (SSD), etc.) are used to identify aircraft in visual images. These object detection models can mark the position and bounding box of the aircraft in the image; S2, by combining the resolution of the visual image, the known scale factor, and the pixel size of the bounding box, the actual physical size of the aircraft in the visual image can be estimated.

[0044] However, the entire process has drawbacks such as high data requirements, high training costs, high computational complexity, and limited applicability.

[0045] Among the challenges are: high data requirements and high training costs: deep learning object detection models typically require a large amount of labeled training data, and the training cost is high, especially for datasets for aircraft recognition and size extraction; high computational complexity: complex object detection models may require a large amount of computing resources and time, which may limit real-time performance in practical applications. For one-stage models such as YOLO, the inference speed is fast, but the accuracy is poor. For two-stage models such as Faster R-CNN, although the accuracy is greatly improved compared to the one-stage model, the inference time is too long, and the requirements for graphics processing units (GPUs) are high; and limited applicability: when faced with scenes, scales, or perspectives different from those used in training data, the generalization ability of object detection models may decrease, leading to inaccurate recognition and extraction. For example, a model trained using labeled visual images with a resolution of 1 meter is difficult to adapt to high-resolution images with a resolution of 1 meter.

[0046] In summary, both edge detection algorithms and deep learning algorithms have their limitations, which can lead to inaccurate target size extraction.

[0047] To address the aforementioned technical problems, this invention provides a target size extraction method based on remote sensing imagery. Compared to traditional target size extraction methods based on visual images, this method is more stable and reliable because remote sensing images are not affected by external factors. Therefore, this method is suitable for target monitoring under various environmental conditions. By employing the Graham scanning algorithm, the extraction efficiency of the convex hull contour in the vector data corresponding to the remote sensing imagery can be improved. Furthermore, by combining the rotating caliper algorithm, the geometric features of the convex hull contour are calculated, thereby improving both the extraction efficiency and the accuracy of the target size.

[0048] It should be noted that the execution subject involved in the embodiments of the present invention can be a target size extraction device based on remote sensing images, or an electronic device. Optionally, the electronic device may include a computer, a mobile terminal, etc.

[0049] The embodiments of the present invention will be further described below using an electronic device as an example.

[0050] like Figure 1 The diagram shown is a flowchart illustrating the target size extraction method based on remote sensing images provided by the present invention, which may include:

[0051] 101. Using the Graham scanning algorithm, determine the convex hull of the target contour in the vector data corresponding to the remote sensing image.

[0052] The Graham scan algorithm is a classic algorithm for calculating the convex hull of a point set on a two-dimensional plane (such as vector data corresponding to remote sensing images). The basic idea of ​​the Graham scan algorithm is as follows: select a reference point from the point set and sort the other points in the point set according to their polar angles; then scan the sorted point set and determine the vertices of the convex hull through stack operations to determine the contour convex hull of the target in the two-dimensional plane.

[0053] Remote sensing imagery, specifically Synthetic Aperture Radar (SAR) imagery, is image data acquired from the Earth's surface using remote sensing technologies such as satellites. This type of imagery offers advantages such as weather independence and all-weather capability, allowing the target to be imaged regardless of whether the environment is cloudy, rainy, foggy, or dark.

[0054] The target to be measured typically refers to a specific object that needs to be identified or extracted from remote sensing imagery, such as an airplane or a ship. The target to be measured can be at any angle.

[0055] The convex hull is a geometric concept used to describe the smallest convex polygon of a set of points. In the vector data corresponding to remote sensing images, the convex hull can be used to approximate the external contour of the target object.

[0056] Weather independence refers to the fact that synthetic aperture radar (SAR) can penetrate clouds, fog, rain, snow, and other weather conditions, thus enabling it to acquire relevant information about the target even in adverse weather conditions—something optical imagery cannot do. All-weather capability means that SAR is not limited by night or day-night cycles, allowing it to provide imagery in all weather conditions. This is extremely useful in certain missions and applications, such as military reconnaissance.

[0057] 102. Use the rotating caliper algorithm to determine the longest line segment corresponding to the convex hull of the contour.

[0058] The Rotating Calipers Algorithm is a method for calculating the farthest distance of a convex polygon and can also be used to solve some problems related to the convex hull. The basic idea of ​​this algorithm is to find the two farthest point pairs by rotating a pair of vector edges (tangents), thus determining the longest line segment corresponding to the convex hull of the contour.

[0059] The first and second endpoints of the longest line segment are both points on the convex hull of the contour.

[0060] The electronic device uses a rotating caliper algorithm to calculate the adjacent vector edges of the convex hull and rotate the initial caliper of the convex hull until the longest line segment corresponding to the convex hull is determined.

[0061] 103. Based on the center point of the convex hull of the contour, correct the longest line segment to obtain the target longest line segment.

[0062] The center point, also known as the centroid or centroid, is the geometric center of all points inside the convex hull of the contour.

[0063] The third and fourth endpoints of the longest line segment of the target are both points on the convex hull of the contour.

[0064] After determining the longest line segment, the electronic device also needs to determine the aircraft's length direction when the target is an aircraft. Since it is uncertain whether the longest line segment is the aircraft's length direction, the electronic device can correct the longest line segment based on the center point of the contour convex hull to obtain the target's longest line segment, thus representing the correct aircraft length direction.

[0065] 104. Extract the dimensions of the target based on the longest line segment.

[0066] The dimensions of the target to be measured are its length and width.

[0067] After acquiring the longest line segment of the target, the electronic device can process the bounding rectangle corresponding to the convex hull of the contour to extract the size of the target to be measured.

[0068] In this embodiment of the invention, the Graham scanning algorithm is used to determine the convex hull of the target in the vector data corresponding to the remote sensing image; the rotating caliper algorithm is used to determine the longest line segment corresponding to the convex hull; the longest line segment is corrected based on the center point of the convex hull to obtain the longest line segment of the target; and the size of the target is extracted based on the longest line segment of the target. This method is more stable and reliable than traditional target size extraction methods based on visual images because remote sensing images are not affected by external factors. Therefore, this method is suitable for target monitoring under various environmental conditions. By using the Graham scanning algorithm, the extraction efficiency of the convex hull in the vector data corresponding to the remote sensing image can be improved. Furthermore, by combining the rotating caliper algorithm, the geometric features of the convex hull are calculated, which not only improves the extraction efficiency of the target size but also effectively improves the accuracy of the target size.

[0069] To better understand the embodiments of the present invention, the target size extraction method based on remote sensing images is described in detail below:

[0070] Optionally, before step 101, the method may further include: the electronic device denoising the initial remote sensing image to obtain a first remote sensing image; the electronic device performing binary segmentation on the first remote sensing image to obtain a second remote sensing image; and the electronic device performing raster vectorization on the second remote sensing image to obtain vector data corresponding to the remote sensing image.

[0071] After acquiring initial remote sensing imagery, the electronic device often encounters various types of noise interference, such as system noise, atmospheric noise, and surface scattering noise, which reduces the quality and usability of the initial remote sensing imagery. Therefore, to mitigate the impact of noise, the electronic device can denoise the initial remote sensing imagery to obtain a first remote sensing image with higher quality and usability. Optionally, the electronic device employs a wavelet denoising algorithm to denoise the initial remote sensing imagery to obtain the first remote sensing image. This wavelet denoising algorithm is particularly suitable for removing noise from remote sensing images, possessing the advantages of preserving detailed information of the remote sensing imagery while removing noise, and being applicable to noise removal of remote sensing images at different scales.

[0072] Furthermore, since the foreground region (such as the area where the target is located) and the background region may not be clearly distinguishable in the first remote sensing image, the electronic device can perform binary segmentation on the first remote sensing image to obtain a second remote sensing image in order to facilitate accurate identification of the target. In the second remote sensing image, the pixel values ​​of the pixels corresponding to the foreground region are all greater than a preset threshold, and the pixel values ​​of the pixels corresponding to the background region are all less than or equal to the preset threshold.

[0073] It should be noted that when the target is an aircraft, its metallic surface typically appears as a high-pixel area in the second remote sensing image. This is due to the reflective properties of metal surfaces to radar waves. Specifically, metallic surfaces generally have high electrical conductivity and smoothness, allowing them to reflect most radar waves. When a radar wave strikes a metallic surface, most of the energy is reflected back to the radar receiver, causing the metallic surface to appear as a bright area—a high-pixel area—in the second remote sensing image. In summary, compared to other ground features, the metallic surface of an aircraft typically appears as a high-reflectivity area in the second remote sensing image, exhibiting a higher pixel value. This provides a theoretical basis for binary segmentation to extract the aircraft's outline, indicating that the aircraft's outline in the second remote sensing image is already very clear.

[0074] Furthermore, to improve the computational efficiency of the second remote sensing image in subsequent calculations, the electronic device can perform rasterization vector processing on the second remote sensing image, converting the data in the second remote sensing image into vector data to obtain vector data corresponding to a higher quality remote sensing image. Specifically, the electronic device can convert the foreground area in the second remote sensing image into first vector data and the background area into second vector data. Since the target size needs to be determined later, the first vector data can be retained and the second vector data can be discarded. At this time, the retained first vector data is the vector data corresponding to the remote sensing image, which facilitates the subsequent calculation of geometric features to obtain a more accurate target size.

[0075] The preset thresholds involved in the binary segmentation process can be set before the electronic device leaves the factory, or they can be determined according to the needs of specific applications (such as histogram distribution characteristics or empirical values ​​based on the first remote sensing image). No specific limitations are made here.

[0076] For example, when the preset threshold is determined based on the histogram distribution characteristics of the first remote sensing image, the preset threshold is typically twice the average pixel value, which enables the electronic equipment to adaptively segment the aircraft completely.

[0077] Optionally, the specific implementation process of using wavelet denoising algorithm to denoise the initial remote sensing image by electronic equipment is as follows:

[0078] S1. Using time-frequency analysis, multi-scale analysis is performed on the initial remote sensing image, decomposing it into frequency bands of different scales to obtain wavelet coefficients, such as approximation coefficients and detail coefficients, to achieve wavelet transformation of the initial remote sensing image. The approximation coefficients characterize the low-frequency or smooth portions of the initial remote sensing image; the detail coefficients characterize the high-frequency, edge, or texture portions of the initial remote sensing image.

[0079] S2. Thresholding of detail coefficients. Since noise is typically concentrated in the high-frequency range, and important features of the initial remote sensing image often reside in these high-frequency components, thresholding is necessary to distinguish noise from signal. Specifically, based on a preset coefficient threshold (such as a soft threshold or a hard threshold), detail coefficients smaller than the preset threshold are set to zero or scaled. This effectively removes or reduces the impact of noise while fully preserving the important features of the initial remote sensing image.

[0080] S3. Perform an inverse wavelet transform on the approximation coefficients and the detail coefficients after thresholding to reconstruct the denoised remote sensing image, i.e., the first remote sensing image.

[0081] Optionally, the specific implementation process of raster vectorization of the second remote sensing image by the electronic device is as follows:

[0082] S1. Identify the raster image corresponding to the second remote sensing image to determine which points represent the edge of the target to be measured, so as to obtain the feature boundary of the target to be measured and realize the boundary detection of the raster image; S2. Convert these feature boundaries into vector line segments to realize the segmentation of feature boundaries; S3. In the process of establishing the topological relationship corresponding to all vector line segments, it is necessary to ensure that the elements in all vector line segments have the correct topological relationship, such as no overlap or gap between adjacent elements; S4. According to the topological relationship, combine the vector line segments into p polygons, p≥1; S5. Associate the attribute information (such as pixel values) in the above raster image with all the generated polygons to obtain vector data; S6. According to actual needs, convert the vector data to the required georeferenced system to obtain the vector data corresponding to the remote sensing image.

[0083] It should be noted that the Geospatial Data Abstraction Library (GDAL) is an open-source library and toolset for reading, writing, and processing geospatial data. GDAL provides a set of functions and tools for processing various raster image and vector geospatial data formats. Specifically, GDAL supports many common geospatial data formats, such as Geographic Tagged Image File Format (GeoTIFF), ESRI Shapefile, GeoJSON, and Network Common Data Form (NetCDF).

[0084] For example, such as Figure 2a The image shown is a schematic diagram of the initial remote sensing image provided by the present invention; as shown Figure 2b The image shown is a schematic diagram of the first remote sensing image provided by the present invention; as shown... Figure 2c The image shown is a schematic diagram of the second remote sensing image provided by the present invention; as shown Figure 2d The diagram shown is a schematic diagram of the vector data corresponding to the remote sensing image provided by the present invention, wherein the geospatial data format of the vector data is ESRI Shapefile.

[0085] In some embodiments, the electronic device employs the Graham scanning algorithm to determine the convex hull of the target in the vector data corresponding to the remote sensing image. This may include: the electronic device selecting a reference point from the set of points corresponding to the target in the vector data corresponding to the remote sensing image; the electronic device scanning other points in the set in a counterclockwise order based on the reference point to determine the order of all points in the set; the electronic device scanning all points in sequence to determine the target point; and the electronic device determining the convex hull of the target based on the target point.

[0086] The point set can be represented by Q, which consists of q vertices of p polygons, where q ≥ 3.

[0087] In determining the convex hull of a target using the Graham scanning algorithm, the electronic device first identifies the set of points corresponding to the target in the vector data of the remote sensing image. Any point in this set is then designated as a reference point. Typically, the bottom left / top left / bottom right / top right corner of the remote sensing image is chosen as the reference point, and this reference point will always lie on the subsequently determined convex hull. Next, the electronic device determines all other points in the set except the reference point, as well as the polar angles between the reference point and each of these other points (i.e., the angles of the lines connecting the reference point and the other points). All polar angles are then sorted. This allows the electronic device to scan other points counter-clockwise based on the reference point, determining the order of all points in the set. Since some points belong to the target and others do not, the electronic device can use a stack to scan and filter all points in the above order, obtaining the target points in the stack. This allows the determination of the convex hull of the target, with all target points being the vertices on the convex hull.

[0088] Optionally, assuming the bottom left corner of the remote sensing image is used as the reference point, the calculation process for this reference point is as follows:

[0089] When the coordinates of all points in the vector data corresponding to the remote sensing image are latitude and longitude coordinates, the reference point can be Min(x) n ,y n ) indicates that x n This represents the latitude coordinates of the reference point, y n This represents the longitude coordinates of the reference point;

[0090] When the coordinates of all points in the vector data corresponding to the remote sensing image are projected coordinates, the reference point can be Min(x) n4i ,y n4i ) indicates that x n4i The x-coordinate of the reference point is represented by y. n4i This represents the ordinate of the reference point. Where x... n4iTo extract the last four digits of the integer part of the x-coordinate, y n4i This is to extract the last four digits of the integer part of the ordinate.

[0091] Optionally, the order of all points is determined using bubble sort.

[0092] Bubble sort is a simple sorting algorithm that repeatedly traverses all the points to be sorted, comparing two points at a time. If the two points are in the wrong order, they are swapped. This process is repeated until no more swaps are needed, meaning all points are sorted.

[0093] Optionally, each polar angle can be calculated and determined using polar coordinates or vector methods.

[0094] In some embodiments, the electronic device scans all points sequentially to determine the target point from all points, which may include: S1, the electronic device sequentially determines a first point adjacent to a reference point and a second point adjacent to the first point; S2, the electronic device determines the direction of the first point based on the vector between the reference point and the first point, and the vector between the first point and the second point; S3, if the direction is left turn, the electronic device retains the first point and determines the first point as the new reference point; if the direction is right turn, the electronic device discards the first point and determines the second point as the new reference point; S4, the electronic device repeats the above steps S1-S3 until all points are traversed, and determines the reference point and all retained first points as the target point.

[0095] In the process of filtering all points sequentially through stack operations, the electronic device first determines the first point adjacent to the reference point and the second point adjacent to the first point, assuming that both the first and second points lie on the subsequently determined convex hull of the contour. Then, the electronic device determines the vector between the reference point and the first point, and the vector between the first and second points, and determines the polar angle between these two vectors to determine the direction of the first point, and further determines whether the direction is left or right. Finally, the electronic device further determines whether the first point is turning left or right. If the polar angle is greater than 0, it indicates that the turn is left. In this case, the first point can be kept in the stack and determined as the new reference point. If the polar angle is less than 0, it indicates that the turn is right. In this case, the first point can be removed from the stack and the second point can be determined as the new reference point. If the polar angle is equal to 0, it indicates that the three points are collinear. Step S4: Repeat the above steps S1-S3 until all points in the point set are traversed to achieve the filtering of all points, and then determine the reference point and all the first points kept in the stack as the target point.

[0096] For example, suppose there are three vertices: a reference point p1(x1,y1), a first point p2(x2,y2), and a second point p3(x3,y3). The vector between the reference point p1(x1,y1) and the first point p2(x2,y2) is V(p1,p2) = (x2-x1,y2-y1); the vector between the first point p2(x2,y2) and the second point p3(x3,y3) is V(p2,p3) = (x3-x2,y3-y2). In this case, the electronic device can determine the cross product result between vectors V(p1,p2) and V(p2,p3) through cross product calculation. This cross product result can determine the relative direction between these two vectors, i.e., the direction of rotation between them. The cross product result is... Then, the electronic device determines the relationship between the cross product result and 0: if it is greater than 0, it means the direction is counterclockwise, that is, a left turn; if it is less than 0, it means the direction is clockwise, that is, a right turn; if it is equal to 0, it means that V(p1,p2), V(p2,p3) and V(p3,p1) are collinear.

[0097] For example, such as Figure 2e The diagram shown is a schematic diagram of the polygon set and contour convex hull of the target to be measured provided by the present invention, wherein the polygon set includes p polygons.

[0098] In some embodiments, the electronic device employs a rotating caliper algorithm to determine the longest line segment corresponding to the convex hull of the contour, which may include: S1, the electronic device obtains the initial caliper corresponding to the convex hull of the contour and the first vector edge in the initial caliper; S2, the electronic device determines the second vector edge adjacent to the first vector edge; S3, the electronic device determines the target vector edge of the initial caliper based on the cross product of the first vector edge and the second vector edge, and determines the target vector edge as the new first vector edge; S4, the electronic device repeats the above steps S2-S3 until the initial caliper returns to the initial position, and determines the finally determined target vector edge as the longest line segment corresponding to the convex hull of the contour.

[0099] In the process of determining the longest line segment corresponding to the convex hull of a contour using the rotating caliper algorithm, the electronic device performs the following steps: Step S1: Initialize an initial caliper containing all edges of the convex hull and randomly determine the first vector edge in the initial caliper; Step S2: Determine the second vector edge adjacent to the first vector edge in the initial caliper; Then, rotate the initial caliper counterclockwise while maintaining the farthest point pair. During each rotation, calculate the angle between two adjacent vector edges and vertices on the convex hull, and then select the vector edge with the smallest angle to rotate the initial caliper. At the same time, update the information of the farthest point pair. Specifically, Step S3: Perform a cross product calculation on the first and second vector edges to obtain the cross product result of these two vector edges, thereby determining the target vector edge of the initial caliper and setting the target vector edge as the new first vector edge; Step S4: Repeat steps S2-S3 until the initial caliper is rotated to its initial position, and the finally determined target vector edge is set as the longest line segment corresponding to the convex hull.

[0100] In some embodiments, the endpoints of the first vector edge include a first vertex and a second vertex, and the endpoints of the second vector edge include a second vertex and a third vertex. The electronic device determines the target vector edge of the initial slug based on the cross product of the first vector edge and the second vector edge, which may include: the electronic device determining the cross product of the first vector edge and the second vector edge; if the cross product result is greater than or equal to 0, the electronic device determines the vector segment between the first vertex and the third vertex as the target vector edge of the initial slug; if the cross product result is less than 0, the electronic device determines the second vector edge as the target vector edge.

[0101] For example, during the rotation of the convex hull of the electronic device, assume that the first vector edge is Vi[i,nexti] and the second vector edge is Vj[j,nextj], where nexti = i+1 = j and nextj = j+1. The electronic device calculates the cross product between the first vector edge Vi[i,nexti] and the second vector edge Vj[j,nextj]. This cross product can be expressed as Vi×Vj=Vi[0]*Vj[1]-Vi[1]*Vj[0]. Then, the electronic device determines the relationship between the cross product and 0: if it is greater than or equal to 0, it means that the angle between the two vector edges is less than or equal to 180°, that is, the direction of the first vector edge is clockwise of the second vector edge. At this time, since the vertex order on the boundary of the convex hull is counterclockwise, the vector line segment between the first vertex i and the third vertex nextj can be determined as the target vector edge of the initial chuck. If it is less than 0, it means that the angle between the two vector edges is greater than 180°, that is, the direction of the first vector edge is counterclockwise of the second vector edge. At this time, the vector edge formed by vertex j and nextj, that is, the second vector edge, can be determined as the target vector edge.

[0102] For example, such as Figure 2f The diagram shown is a schematic diagram of the longest line segment corresponding to the contour convex hull provided by the present invention.

[0103] In some embodiments, the electronic device corrects the longest line segment based on the center point of the contour convex hull to obtain a target longest line segment. This may include: the electronic device extending the line segment between the center point of the contour convex hull and the first endpoint to intersect the contour convex hull, thereby obtaining a first line segment between the first endpoint and the first intersection point; the electronic device extending the line segment between the center point of the contour convex hull and the second endpoint to intersect the contour convex hull, thereby obtaining a second line segment between the second endpoint and the second intersection point; and the electronic device determining the longer line segment between the first line segment and the second line segment as the target longest line segment.

[0104] In determining the correct length direction, the electronic device first determines the center point of the convex hull of the profile. Then, it determines the line segment between the center point and the first endpoint of the longest line segment, extends this line segment to intersect the convex hull, and obtains the first line segment between the first endpoint and the first intersection point. Similarly, the electronic device determines the line segment between the center point and the second endpoint of the longest line segment, extends this line segment to intersect the convex hull, and obtains the second line segment between the second endpoint and the second intersection point. Next, the electronic device compares the first length of the first line segment with the second length of the second line segment: if the first length is greater than the second length, the first line segment is determined as the target longest line segment; if the first length is less than the second length, the second line segment is determined as the target longest line segment; if the first length is equal to the second length, either the first line segment or the second line segment is determined as the target longest line segment.

[0105] Optionally, the center point can be determined by calculating the arithmetic mean of the coordinates of all points within the convex hull of the contour. Specifically, assume that the q vertices on the convex hull are: A1(x1,y1),…,A… k (x k ,y k ),…,A q (x q ,y q At this time, the center point C(x) c ,y c Formulas can be used. and formula Calculations show that k belongs to 1,…,q.

[0106] Optionally, if the coordinates of all points within the convex hull of the contour are projected coordinates, the first length can be determined using the formula... Calculations show that (x) α y α (x) represents the coordinates of the first endpoint. βy β Let α and β be the coordinates of the first intersection point, where α and β both belong to 1, ..., q.

[0107] When the coordinates of all points within the convex hull are latitude and longitude coordinates, the first length can be expressed by the formula d = r × arccos(sin(y)). λ )×sin(y μ )+cos(y λ )×cos(y μ )×cos(x λ -x μ )) Calculated, r represents the average radius of the Earth's ellipsoid, usually 6,371,004 meters, (x λ y λ (x) represents the coordinates of the first endpoint. μ y μ Let λ be the coordinates of the first intersection point, where λ and μ both belong to 1,…,q.

[0108] For example, such as Figure 2g The figure shown is a schematic diagram of the target longest line segment corresponding to the contour convex hull provided by the present invention.

[0109] In some embodiments, the electronic device extracts the size of the target to be measured based on the longest line segment of the target, which may include: the electronic device calculating the azimuth of the longest line segment of the target; the electronic device rotating the convex hull of the contour clockwise around the center point to obtain the convex hull of the target contour; the electronic device rotating the circumscribed rectangle corresponding to the convex hull of the target contour counterclockwise around the center point to obtain the circumscribed rectangle of the target; and the electronic device determining the length and width of the circumscribed rectangle of the target as the size of the target to be measured.

[0110] In the process of extracting the size of the target, the electronic device first calculates the azimuth angle between the two vertices on the longest line segment of the target, denoted as Azimuth. Then, the electronic device rotates the convex hull of the contour clockwise by the Azimuth angle around the center point to obtain a new convex polygon, i.e., the target contour convex hull. Next, the electronic device calculates the circumscribed rectangle of the target contour convex hull and rotates the circumscribed rectangle counterclockwise by the Azimuth angle around the center point to obtain a circumscribed oblique rectangle, i.e., the target circumscribed rectangle. The length and width of the target circumscribed rectangle are then used to determine the size of the target.

[0111] It should be noted that when extracting the dimensions of the aircraft along its length, the length of the target's bounding rectangle is the length of the aircraft, and the width of the target's bounding rectangle is the wingspan of the aircraft.

[0112] Optionally, for vertices A(x) on the convex hull of the contour... a ,y a ), and vertex A(x)a ,y a ) around the center point C(x) c ,y c Rotate the azimuth angle θ° to obtain the vertex B(x) on the convex hull of the target contour. b ,y b At this time, x b =(x a -x c )*cosθ-(y a -y c )*sinθ+x c y b =(x a -x c )*sinθ-(y a -y c )*cosθ+y c .

[0113] Optionally, assume that the q vertices on the convex hull of the target contour are: B1(x1,y1),…,B k (x k ,y k ),…,B q (x q ,y q At this point, the four vertices of the outer rectangle of the target contour's convex hull are M1, M2, M3, and M4, respectively.

[0114] M1 is (Min(x1,…,x) k ,…,x q ), Min(y1,…,y k ,…,y q ));

[0115] M2 is (Max(x1,…,x) k ,…,x q ), Min(y1,…,y k ,…,y q ));

[0116] M3 is (Max(x1,…,x) k ,…,x q Max(y1,…,y) k ,…,y q ));

[0117] M4 is (Min(x1,…,x) k ,…,x q Max(y1,…,y) k ,…,y q )).

[0118] For example, such as Figure 2h The figure shown is a schematic diagram of the target bounding rectangle corresponding to the target contour convex hull provided by the present invention.

[0119] Optionally, when the target to be tested is an aircraft, the method may further include: electronic equipment determining the type and model of the aircraft based on its size.

[0120] The entire process is of great significance for the monitoring, identification, and tracking of aircraft.

[0121] The target size extraction device based on remote sensing images provided by the present invention is described below. The target size extraction device based on remote sensing images described below can be referred to in correspondence with the target size extraction method based on remote sensing images described above.

[0122] like Figure 3 The diagram shown is a schematic representation of the target size extraction device based on remote sensing images provided by the present invention, which may include:

[0123] The convex hull determination module 301 is used to determine the contour convex hull of the target in the vector data corresponding to the remote sensing image using the Graham scanning algorithm;

[0124] The line segment determination module 302 is used to determine the longest line segment corresponding to the contour convex hull using a rotating caliper algorithm. The first and second endpoints of the longest line segment are both points on the contour convex hull. Based on the center point of the contour convex hull, the longest line segment is corrected to obtain the target longest line segment. The third and fourth endpoints of the target longest line segment are both points on the contour convex hull.

[0125] The size determination module 303 is used to extract the size of the target to be measured based on the longest line segment of the target.

[0126] Optionally, the convex hull determination module 301 is specifically used to select a reference point from the set of points corresponding to the target in the vector data corresponding to the remote sensing image; based on the reference point, scan other points in the set of points in a counterclockwise order to determine the order of all points in the set of points; scan all points in the order to determine the target point from all points; and determine the convex hull of the target based on the target point.

[0127] Optionally, the line segment determination module 302 is specifically used for: S1, obtaining the initial clasp corresponding to the convex hull of the contour and the first vector edge in the initial clasp; S2, determining the second vector edge adjacent to the first vector edge; S3, determining the target vector edge of the initial clasp based on the cross product result of the first vector edge and the second vector edge, and determining the target vector edge as the new first vector edge; S4, repeating the above steps S2-S3 until the initial clasp returns to the initial position, and determining the finally determined target vector edge as the longest line segment corresponding to the convex hull of the contour.

[0128] Optionally, the line segment determination module 302 is specifically used to extend the line segment between the center point of the contour convex hull and the first endpoint, intersecting with the contour convex hull to obtain a first line segment between the first endpoint and the first intersection point; extend the line segment between the center point of the contour convex hull and the second endpoint, intersecting with the contour convex hull to obtain a second line segment between the second endpoint and the second intersection point; and determine the longer line segment between the first line segment and the second line segment as the target longest line segment.

[0129] Optionally, the size determination module 303 is specifically used to calculate the azimuth angle of the longest line segment of the target; rotate the convex hull of the profile clockwise around the center point by the azimuth angle to obtain the target profile convex hull; rotate the circumscribed rectangle corresponding to the target profile convex hull counterclockwise around the center point by the azimuth angle to obtain the target circumscribed rectangle; and determine the length and width of the target circumscribed rectangle as the size of the target to be measured.

[0130] Optionally, the convex hull determination module 301 is specifically used for: S1, determining the first point adjacent to the reference point and the second point adjacent to the first point according to the order; S2, determining the direction of the first point based on the vector between the reference point and the first point, and the vector between the first point and the second point; S3, if the direction is left turn, retaining the first point and determining the first point as the new reference point; if the direction is right turn, discarding the first point and determining the second point as the new reference point; S4, repeating the above steps S1-S3 until all points are traversed, and determining the reference point and all retained first points as the target point.

[0131] Optionally, the endpoints of the first vector edge include a first vertex and a second vertex, and the endpoints of the second vector edge include the second vertex and a third vertex; the line segment determination module 302 is specifically used to determine the cross product result of the first vector edge and the second vector edge; if the cross product result is greater than or equal to 0, the vector line segment between the first vertex and the third vertex is determined as the target vector edge of the initial slack; if the cross product result is less than 0, the second vector edge is determined as the target vector edge.

[0132] like Figure 4 The diagram shows the structure of an electronic device provided by this invention. This electronic device may include a processor 410, a communication interface 420, a memory 430, and a communication bus 440. The processor 410, communication interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a target size extraction method based on remote sensing images. This method includes: using the Graham scanning algorithm to determine the contour convex hull of the target in the vector data corresponding to the remote sensing image; using a rotating caliper algorithm to determine the longest line segment corresponding to the contour convex hull, where the first and second endpoints of the longest line segment are both points on the contour convex hull; correcting the longest line segment based on the center point of the contour convex hull to obtain the target's longest line segment, where the third and fourth endpoints of the target's longest line segment are both points on the contour convex hull; and extracting the size of the target based on the target's longest line segment.

[0133] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0134] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the target size extraction method based on remote sensing image provided by the above methods. The method includes: using the Graham scan algorithm to determine the contour convex hull of the target to be measured in the vector data corresponding to the remote sensing image; using the rotating caliper algorithm to determine the longest line segment corresponding to the contour convex hull, wherein the first endpoint and the second endpoint of the longest line segment are both points on the contour convex hull; correcting the longest line segment according to the center point of the contour convex hull to obtain the target longest line segment, wherein the third endpoint and the fourth endpoint of the target longest line segment are both points on the contour convex hull; and extracting the size of the target to be measured according to the target longest line segment.

[0135] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the target size extraction method based on remote sensing imagery provided by the above methods. This method includes: using the Graham scan algorithm to determine the contour convex hull of the target to be measured in the vector data corresponding to the remote sensing image; using a rotating caliper algorithm to determine the longest line segment corresponding to the contour convex hull, wherein the first endpoint and the second endpoint of the longest line segment are both points on the contour convex hull; correcting the longest line segment based on the center point of the contour convex hull to obtain the target's longest line segment, wherein the third endpoint and the fourth endpoint of the target's longest line segment are both points on the contour convex hull; and extracting the size of the target to be measured based on the target's longest line segment.

[0136] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0137] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence 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, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for extracting target size based on remote sensing imagery, characterized in that, include: The Graham scanning algorithm is used to determine the convex hull of the target in the vector data corresponding to the remote sensing image. The longest line segment corresponding to the convex hull of the contour is determined by using a rotating caliper algorithm, wherein the first endpoint and the second endpoint of the longest line segment are both points on the convex hull of the contour. Extend the line segment between the center point of the contour convex hull and the first endpoint to intersect the contour convex hull, thus obtaining the first line segment between the first endpoint and the first intersection point; Extend the line segment between the center point of the convex hull and the second endpoint to intersect the convex hull, thus obtaining the second line segment between the second endpoint and the second intersection point; The longer of the first line segment and the second line segment is determined as the target longest line segment, and the third and fourth endpoints of the target longest line segment are both points on the convex hull of the contour. The dimensions of the target to be measured are extracted based on the longest line segment of the target.

2. The method according to claim 1, characterized in that, The step of using the Graham scanning algorithm to determine the convex hull of the target profile in the vector data corresponding to the remote sensing image includes: A reference point is selected from the set of points corresponding to the target in the vector data corresponding to the remote sensing image; Based on the reference point, scan other points in the point set in a counterclockwise order to determine the order of all points in the point set; Scan all the points in the order described above, and determine the target point from all the points. Based on the target point, determine the convex hull of the target to be measured.

3. The method according to claim 1, characterized in that, The step of using a rotating caliper algorithm to determine the longest line segment corresponding to the convex hull of the contour includes: S1. Obtain the initial clasp corresponding to the contour convex hull and the first vector edge in the initial clasp; S2. Determine the second vector edge adjacent to the first vector edge; S3. Based on the cross product of the first vector edge and the second vector edge, determine the target vector edge of the initial slug, and set the target vector edge as the new first vector edge; S4. Repeat steps S2-S3 until the initial chuck returns to its initial position, and determine the final target vector edge as the longest line segment corresponding to the contour convex hull.

4. The method according to any one of claims 1-3, characterized in that, The step of extracting the size of the target to be measured based on the longest line segment of the target includes: Calculate the azimuth angle of the longest line segment of the target; The target contour convex hull is obtained by rotating the azimuth angle clockwise around the center point of the contour convex hull. The outer rectangle corresponding to the convex hull of the target contour is rotated counterclockwise around the center point by the azimuth angle to obtain the target outer rectangle. The length and width of the bounding rectangle of the target are determined as the size of the target to be measured.

5. The method according to claim 2, characterized in that, The step of scanning all points in the stated order to determine the target point from all points includes: S1. Determine the first point adjacent to the reference point and the second point adjacent to the first point in the order described above; S2. Determine the direction of the first point based on the vector between the reference point and the first point, and the vector between the first point and the second point; S3. If the turn is left, retain the first point and determine the first point as the new reference point; if the turn is right, discard the first point and determine the second point as the new reference point. S4. Repeat steps S1-S3 above until all points have been traversed, and determine the reference point and all retained first points as the target point.

6. The method according to claim 3, characterized in that, The endpoints of the first vector edge include a first vertex and a second vertex, and the endpoints of the second vector edge include a second vertex and a third vertex; determining the target vector edge of the initial slug based on the cross product of the first vector edge and the second vector edge includes: Determine the cross product of the first vector edge and the second vector edge; If the cross product result is greater than or equal to 0, the vector line segment between the first vertex and the third vertex is determined as the target vector edge of the initial squeegee; If the cross product result is less than 0, the second vector edge is determined as the target vector edge.

7. A target size extraction device based on remote sensing imagery, characterized in that, include: The convex hull determination module is used to determine the contour convex hull of the target in the vector data corresponding to the remote sensing image using the Graham scanning algorithm. The line segment determination module is used to determine the longest line segment corresponding to the contour convex hull using a rotating caliper algorithm. The first endpoint and the second endpoint of the longest line segment are both points on the contour convex hull. The line segment between the center point of the contour convex hull and the first endpoint is extended to intersect the contour convex hull to obtain the first line segment between the first endpoint and the first intersection point. Extend the line segment between the center point of the convex hull and the second endpoint to intersect the convex hull, thus obtaining a second line segment between the second endpoint and the second intersection point; determine the longer line segment between the first line segment and the second line segment as the target longest line segment, wherein the third endpoint and the fourth endpoint of the target longest line segment are both points on the convex hull. The size determination module is used to extract the size of the target to be measured based on the longest line segment of the target.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the target size extraction method based on remote sensing images as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the target size extraction method based on remote sensing images as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Medicine box segmentation method

    CN114092499A