A method, system, equipment and medium for measuring the area of ​​arable land construction groundbreaking area

By using image recognition technology to confirm the correlation between illegal construction targets and the newly turned earth areas around them, the area of ​​arable land construction digging areas can be quickly and accurately calculated, solving the time-consuming and labor-intensive problems and misjudgment issues in existing technologies, and providing law enforcement agencies with a reliable quantitative basis.

CN120259884BActive Publication Date: 2025-09-19GUANGZHOU FUAN DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510410920.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-09-19
Estimated Expiration
2045-04-02

AI Technical Summary

Technical Problem

Existing methods for calculating the area of ​​illegal construction targets are time-consuming and labor-intensive, prone to misjudgment and inaccurate measurements. Especially in natural resource monitoring, it is difficult to quickly and accurately assess the extent of arable land occupation or destruction.

Method used

Image recognition technology is used to confirm illegal construction targets and identify whether there are newly turned over areas around them. The correlation between the two is calculated, and the camera's coordinate conversion mapping relationship is used to obtain the pixel coordinates of the turned over area and convert them into longitude and latitude coordinates to achieve automatic calculation of the area of ​​the turned over area.

Benefits of technology

It provides a fast and accurate method for calculating the area of ​​the groundbreaking area, reduces the investment of manpower and material resources, avoids the waiting time of field surveys, provides a reliable quantitative basis, and solves the problems of misjudgment and inaccurate measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259884B_ABST
    Figure CN120259884B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and system, equipment, and medium for measuring the area of ​​a construction site on cultivated land. The method uses image recognition to confirm the presence of an illegal construction target, identify whether there is new soil around the illegal construction target, and calculate the correlation between the illegal construction target and the new soil, thereby obtaining the contour of the construction site. The method then converts the longitude and latitude coordinates of the pixel coordinates of the construction site contour to obtain the area of ​​the construction site. This method does not require additional manpower and material resources, and does not require waiting for field survey time. When an illegal construction target is identified in a surveillance video, it can automatically determine whether there is new soil, whether there is a correlation between the two, and simultaneously calculate the area of ​​the construction site. This method solves the problems of misjudgment and inaccurate measurement, providing a reliable quantitative basis for law enforcement agencies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cultivated land area calculation based on visual detection, and in particular to a method and system, equipment and medium for measuring the area of ​​a cultivated land construction area. Background Art

[0002] During the dynamic monitoring of natural resources, especially in the protection of arable land, when video detection identifies illegal construction targets, it is also necessary to determine the corresponding ground-breaking area. Because the size of the ground-breaking area directly reflects the extent of damage to arable land caused by illegal construction, calculating the area can more accurately assess the scope of arable land occupation or damage, enabling dynamic monitoring and early warning of illegal construction activities, and providing quantitative evidence for law enforcement.

[0003] Existing methods for calculating the area of ​​groundbreaking sites corresponding to illegal construction targets primarily include: on-site inspections by law enforcement personnel, or calculations based on selections on the latest satellite maps. On-site inspections are time-consuming and laborious, while selections based on satellite maps are prone to misjudgment and inaccurate measurements. Summary of the Invention

[0004] Based on this, the purpose of the present invention is to provide a method for measuring the area of ​​the earth-moving area of ​​cultivated land construction.

[0005] A method for measuring the area of ​​a construction site of cultivated land comprises the following steps:

[0006] S10: Acquire a picture of the target monitoring area taken by the calibrated camera;

[0007] S20: Use the illegal construction target detection model to detect illegal construction targets in the image and determine whether there are illegal construction targets in the image:

[0008] If yes, generate a warning image and several warning target bounding boxes, and execute S30;

[0009] If not, return to S10;

[0010] S30: Use the earth-moving area recognition model to identify newly turned soil in the warning image and determine whether there is a newly turned bare soil area in the image:

[0011] If yes, a binary image is generated and the maximum circumscribed rectangle of each newly turned bare soil area is calculated based on the binary image, and S40 is executed;

[0012] If not, return to S10;

[0013] S40: Determine whether the maximum circumscribed rectangle of each newly turned bare soil area in the warning image intersects with each warning target bounding box:

[0014] If yes, retain the maximum circumscribed rectangle of the newly turned bare soil area and the warning target bounding box, draw a contour map of the earth-moving area including the newly turned bare soil area and the illegal construction target object, and execute S50;

[0015] If not, the newly tilled bare soil area is removed and the process returns to S10;

[0016] S50: using the coordinate conversion mapping relationship of the camera, converting the pixel coordinates of the groundbreaking area outline map into world coordinates, and then converting the world coordinates into longitude and latitude coordinates; calculating the area of ​​the groundbreaking area according to the longitude and latitude coordinates of the groundbreaking area outline points.

[0017] Compared to existing technologies, the present invention uses image recognition to confirm the presence of illegal construction targets, identify whether there is new soil around the illegal construction targets, and calculate the correlation between the illegal construction targets and the new soil, thereby obtaining the contour of the ground-breaking area. The longitude and latitude coordinates are converted from the pixel coordinates of the ground-breaking area contour to obtain the area of ​​the ground-breaking area. This method does not require additional manpower and material resources, and does not require waiting for field surveys. When an illegal construction target is identified in the surveillance video, it can automatically determine whether there is new soil, whether there is a correlation between the two, and simultaneously calculate the area of ​​the ground-breaking area. This method solves the problems of misjudgment and inaccurate measurement, providing law enforcement agencies with a reliable quantitative basis.

[0018] Furthermore, when determining whether illegal construction objects exist in the image and generating a warning image and a plurality of warning target boundary boxes, step S20 further includes:

[0019] Generate warning information, which includes: the type of illegal construction target, warning image address, warning time, and warning location.

[0020] Furthermore, the maximum circumscribed rectangle of the newly turned bare soil area in step S30 is obtained by the following method:

[0021] SC1 uses the cv2.findContours function to find the contour of the newly turned bare soil area in the binary image and extract the contour points of the newly turned bare soil area;

[0022] SC2 uses the cv2.boundingRect function to calculate the maximum bounding rectangle of each newly turned bare soil area contour point, and obtains the pixel coordinates of the upper left corner, width and height [x xt ,y xt ,w xt ,h xt ];

[0023] SC3 takes the pixel coordinates of the upper left corner, width and height [xxt ,y xt ,w xt ,h xt ] to pixel coordinates [x xt-min ,y xt-min ,x xt-max ,y xt-max ]form.

[0024] Furthermore, when the warning image in step S40 contains several newly-turned bare soil areas and several illegal construction targets, the following steps are also included:

[0025] Generate a list of maximum bounding rectangles of newly turned bare soil areas and a list of warning target bounding boxes;

[0026] The maximum circumscribed rectangle list of the newly turned bare soil area and the warning target bounding box list are traversed separately to perform intersection judgment.

[0027] Furthermore, the method for determining whether the maximum circumscribed rectangle of the newly turned bare soil area and the warning target bounding box intersect in step S40 is as follows:

[0028] SD1 obtains the pixel coordinates of the largest circumscribed rectangle of the i-th bare soil area [x i-min ,y i-min ,x i-max ,y i-max ], i∈(1,n), pixel coordinates of the j-th warning target bounding box [x j-min ,y j-min ,x j-max ,y j-max ],j∈(1,m);

[0029] SD2 determines the pixel coordinates [x j-min ,y j-min ,x j-max ,y j-max ]Whether any of the following conditions are met:

[0030] x j-min >x i-max ,or;

[0031] x j-max <x i-min ,or;

[0032] y j-min >y i-max ,or;

[0033] y j-max <y i-min ;

[0034] If yes, it is determined that the maximum circumscribed rectangle of the i-th bare soil area and the j-th warning target boundary box do not intersect;

[0035] If not, it is determined that the maximum circumscribed rectangle of the i-th bare soil area and the j-th warning target bounding box intersect.

[0036] Furthermore, the step S40 further includes calculating the ratio of the intersection area of ​​the warning target boundary box and the maximum circumscribed rectangle of the newly turned bare soil area to the area of ​​the warning target boundary box, and the step S40 is S40':

[0037] S40`: Determine whether the maximum circumscribed rectangle of each newly turned bare soil area in the warning image intersects with each warning target bounding box:

[0038] If yes, calculate the ratio r of the intersection area of ​​the warning target bounding box and the largest circumscribed rectangle of the newly turned bare soil area to the area of ​​the warning target bounding box:

[0039] If the ratio r is greater than or equal to the ratio threshold r target , then retain the maximum circumscribed rectangle of the newly turned bare soil area and the warning target boundary box, draw a contour map of the earth-moving area including the newly turned bare soil area and the illegal construction target object, and execute S50;

[0040] If the ratio r is less than the ratio threshold r target , then the newly turned bare soil area is removed and the process returns to S10.

[0041] Furthermore, the ratio threshold r target The value range is 0.2~0.4.

[0042] At the same time, the present invention also provides a system for measuring the area of ​​a cultivated land construction area, comprising a camera and a measuring device, wherein the camera is communicatively connected to the measuring device;

[0043] The camera is used to shoot the target monitoring area and transmit the shot video and / or picture to the measuring device;

[0044] The measuring device is used to receive videos and / or pictures taken by a camera and execute the method for measuring the area of ​​the cultivated land construction area, which includes an image acquisition module, an illegal construction target detection and judgment module, a newly turned soil identification and judgment module, an intersection judgment module, and an area measurement module;

[0045] The image acquisition module is used to acquire images of the target monitoring area taken by the calibrated camera;

[0046] The illegal construction target detection and judgment module is used to detect illegal construction targets in images using the illegal construction target detection model on cultivated land, and to determine whether there are illegal construction targets in the images:

[0047] If yes, a warning image and several warning target bounding boxes are generated, and the new soil identification and judgment module is entered;

[0048] If not, return to the image acquisition module;

[0049] The newly turned soil identification and judgment module is used to use the earth-moving area identification model to identify newly turned soil in the warning image and determine whether there is a newly turned bare soil area in the image:

[0050] If yes, a binary image is generated and the maximum circumscribed rectangle of each newly turned bare soil area is calculated based on the binary image, and the intersection judgment module is entered;

[0051] If not, return to the image acquisition module;

[0052] The intersection determination module is used to determine whether the maximum circumscribed rectangle of each newly turned bare soil area in the warning image intersects with each warning target bounding box:

[0053] If yes, the maximum circumscribed rectangle of the newly turned bare soil area and the warning target boundary box are retained, and an outline map of the newly turned bare soil area and the illegal construction target area is drawn, and the area measurement module is entered;

[0054] If not, the newly turned bare soil area is removed and the process returns to the image acquisition module;

[0055] The area measurement module is used to convert the pixel coordinates of the groundbreaking area contour map into world coordinates using the coordinate conversion mapping relationship of the camera, and then convert the world coordinates into longitude and latitude coordinates; and calculate the area of ​​the groundbreaking area based on the longitude and latitude coordinates of the groundbreaking area contour points.

[0056] Compared with the prior art, the beneficial effects of the system for measuring the area of ​​a cultivated land construction area and the above-mentioned method for measuring the area of ​​a cultivated land construction area are not described in detail here.

[0057] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 This is a schematic structural diagram of a system for measuring the area of ​​a cultivated land construction area according to the present invention;

[0059] Figure 2 Schematic diagram of the flow of the method for measuring the area of ​​the ground-moving area of ​​cultivated land construction according to the present invention;

[0060] Figure 3 for Figure 2 Schematic diagram of another implementation of step S40. DETAILED DESCRIPTION

[0061] The technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiments of the present invention.

[0062] In order to solve the problems of misjudgment and inaccurate measurement in the existing calculation of the area of ​​the groundbreaking area by selecting the latest satellite map, the present invention proposes a method for measuring the area of ​​the groundbreaking area for cultivated land construction. The method for measuring the area of ​​the groundbreaking area for cultivated land construction confirms the presence of illegal construction targets through image recognition, and identifies whether there is new soil around the illegal construction targets, and calculates the correlation between the illegal construction targets and the new soil, thereby obtaining the outline of the groundbreaking area, and converting the longitude and latitude coordinates according to the pixel coordinates of the groundbreaking area outline to obtain the area of ​​the groundbreaking area. This method does not require more manpower and material resources, and does not require waiting for field survey time. When the presence of illegal construction targets is identified in the surveillance video, it can automatically determine whether there is new soil, whether there is a correlation between the two, and simultaneously calculate the area of ​​the groundbreaking area, and solve the problems of misjudgment and inaccurate measurement, providing a reliable quantitative basis for law enforcement agencies.

[0063] Based on the method for measuring the area of ​​the area where the earth is broken during the construction of cultivated land, the present invention also proposes a system for measuring the area of ​​the area where the earth is broken during the construction of cultivated land.

[0064] Specifically, see Figure 1 The system for measuring the area of ​​a cultivated land construction zone of the present invention includes a camera 100 and a measuring device 200, and the camera 100 is communicatively connected to the measuring device 200.

[0065] The camera 100 is used to capture a target monitoring area and transmit the captured video and / or picture to the measurement device 200 .

[0066] Specifically, the camera is a calibrated camera, which has a coordinate conversion mapping relationship from pixel coordinates to world coordinates. The present application provides a camera calibration method, but does not limit the camera calibration method.

[0067] The mapping relationship between the camera's pixel coordinates and the world coordinates is obtained by the following method.

[0068] SA1 finds a reference point P with obvious features in a certain video image of the camera j , get the reference point P j The pixel coordinate P j (u Pj ,v Pj );

[0069] SA2 finds the reference point P in the map tool j Corresponding actual position, get the reference point P j The longitude and latitude coordinates Pj (lat Pj ,lon Pj ), and the reference point P j The longitude and latitude coordinates P j (lat Pj ,lon Pj ) is converted to world coordinates P j (X W-Pj ,Y W-Pj ,Z W-Pj );

[0070] SA3 repeats steps SA1 and SA2 to obtain multiple sets of reference point pairs of pixel coordinates and world coordinates;

[0071] SA4 uses stochastic gradient descent to calculate the camera's intrinsic and extrinsic parameters based on multiple sets of pixel coordinates and world coordinate reference points:

[0072]

[0073] Where: M is the internal parameter matrix, [R, T] is the external parameter matrix, R is the 3×3 rotation matrix, T is the 3×1 translation matrix; j∈(1, N) and j≥5;

[0074] SA5 establishes the mapping relationship between pixel coordinates and world coordinates based on the camera's intrinsic and extrinsic parameters:

[0075]

[0076] A camera calibration method combined with a depth camera can also be used.

[0077] See also Figure 1 and Figure 2 The measuring device 200 is used to receive the video and / or pictures taken by the camera 100 and execute the method for measuring the area of ​​the cultivated land construction area, which includes an image acquisition module 210, an illegal construction target detection and judgment module 220, a new soil identification and judgment module 230, an intersection judgment module 240, and an area measurement module 250.

[0078] The image acquisition module 210 is configured to execute step S10: acquiring an image of the target monitoring area captured by a calibrated camera.

[0079] The illegal construction target detection and judgment module 220 is used to execute step S20: using the illegal construction target detection model on cultivated land to detect illegal construction targets in the image, and determine whether there are illegal construction targets in the image:

[0080] If yes, generate a warning image and several warning target bounding boxes, and execute S30;

[0081] If not, return to S10.

[0082] Specifically, the illegal construction on cultivated land target detection model is a pre-trained Yolo model. In this embodiment, the Yolo9 model is used, and is pre-trained using a dataset containing illegal construction targets. These targets include, but are not limited to, construction equipment, buildings, and building materials. These include construction equipment such as excavators, bulldozers, and drills; buildings such as houses under construction and fences; and building materials such as gravel piles.

[0083] The warning picture is a picture with clear imaging among the many analyzed pictures, with illegal construction targets, the area of ​​the illegal construction targets is larger than 64*64 pixels, and the location of the illegal construction targets is not at the edge of the picture.

[0084] The warning target bounding box (Bbox) records the position of the illegal construction target in the warning image, with the pixel coordinates of the upper left corner and the lower right corner of the rectangular box [x min ,y min ,x max ,y max ]; or in terms of center pixel coordinates, width and height [x c ,y c ,w,h] represents. If there are several illegal construction targets in the same warning image, several corresponding warning target bounding boxes are generated.

[0085] Furthermore, in order to provide law enforcement agencies with more detailed information about illegal construction targets, step S20 generates warning information when determining that there are illegal construction targets in the image and generating a warning image and several warning target boundary boxes. The warning information includes: the type of illegal construction target, the address of the warning image, the warning time, the warning location and other information.

[0086] The newly turned soil identification and judgment module 230 is used to execute step S30: using the earth-moving area identification model to perform newly turned soil identification on the warning image, and determine whether there is a newly turned soil bare area in the image:

[0087] If yes, a binary image is generated and the maximum circumscribed rectangle of each newly turned bare soil area is calculated based on the binary image, and S40 is executed;

[0088] If not, return to S10.

[0089] Specifically, the groundbreaking area recognition model is a pre-trained semantic segmentation model. In this embodiment, the deeplabV3 model is used, and the deeplabV3 model is pre-trained using a dataset with newly turned soil. The deeplabV3 model is not a limitation on the semantic segmentation model. As long as the semantic segmentation model can identify the types of warning image content as only newly turned soil areas and other two categories, and the recognition result is a binary image, this application does not impose any restrictions.

[0090] The maximum circumscribed rectangle of the newly turned bare soil area is obtained by the following method.

[0091] SC1 uses the cv2.findContours function to find the contour of the newly turned bare soil area in the binary image and extract the contour points of the newly turned bare soil area;

[0092] SC2 uses the cv2.boundingRect function to calculate the maximum bounding rectangle of each newly turned bare soil area contour point, and obtains the pixel coordinates of the upper left corner, width and height [x xt ,y xt ,w xt ,h xt ];

[0093] SC3 takes the pixel coordinates of the upper left corner, width and height [x xt ,y xt ,w xt ,h xt ] to pixel coordinates [x xt-min ,y xt-min ,x xt-max ,y xt-max ]form.

[0094] One warning image may identify multiple newly turned bare soil areas; the maximum enclosing rectangle of each newly turned bare soil area is calculated and pixel coordinates are converted.

[0095] Using the earth-moving area recognition model to identify newly turned soil in early warning images can effectively save computing power.

[0096] The intersection determination module 240 is used to execute step S40: determining whether the maximum circumscribed rectangle of each newly turned bare soil area in the warning image intersects with each warning target boundary box:

[0097] If yes, retain the maximum circumscribed rectangle of the newly turned bare soil area and the warning target bounding box, draw a contour map of the earth-moving area including the newly turned bare soil area and the illegal construction target object, and execute S50;

[0098] If not, the newly turned bare soil area is removed and the process returns to S10.

[0099] A warning image may contain multiple newly turned bare soil areas and multiple illegal construction targets. At this time, step S40 can generate a list of maximum circumscribed rectangles of the newly turned bare soil areas and a list of warning target bounding boxes; and traverse the list of maximum circumscribed rectangles of the newly turned bare soil areas and the list of warning target bounding boxes respectively; finally, the newly turned bare soil areas corresponding to the maximum circumscribed rectangles of the newly turned bare soil areas with intersections and the illegal construction targets corresponding to the warning target bounding boxes are retained, and the outline of the excavation area formed by the combination of the newly turned bare soil areas corresponding to the maximum circumscribed rectangles of the newly turned bare soil areas with intersections and the illegal construction targets corresponding to the warning target bounding boxes are drawn on the warning image.

[0100] Specifically, the method for determining whether the maximum circumscribed rectangle of the newly tilled bare soil area intersects with the warning target bounding box is as follows:

[0101] SD1 obtains the pixel coordinates of the largest circumscribed rectangle of the i-th bare soil area [x i-min ,y i-min ,x i-max ,y i-max ], i∈(1,n), pixel coordinates of the j-th warning target bounding box [x j-min ,y j-min ,x j-max ,y j-max ],j∈(1,m);

[0102] SD2 determines the pixel coordinates [x j-min ,y j-min ,x j-max ,y j-max ]Whether any of the following conditions are met:

[0103] x j-min >x i-max ,or;

[0104] x j-max <x i-min ,or;

[0105] y j-min >y i-max ,or;

[0106] y j-max <y i-min ;

[0107] If yes, it is determined that the maximum circumscribed rectangle of the i-th bare soil area and the j-th warning target boundary box do not intersect;

[0108] If not, it is determined that the maximum circumscribed rectangle of the i-th bare soil area and the j-th warning target bounding box intersect.

[0109] Furthermore, in order to improve the accuracy of determining whether there is a high correlation between the newly turned bare soil area and the illegal construction target object, step S40 also includes calculating the ratio of the intersection area of ​​the warning target bounding box and the maximum circumscribed rectangle of the bare soil area to the warning target bounding box.

[0110] The intersection determination module 240 can also be used to execute step S40': determining whether the maximum circumscribed rectangle of each newly turned bare soil area intersects with each warning target boundary box:

[0111] If yes, calculate the ratio r of the intersection area of ​​the warning target bounding box and the largest circumscribed rectangle of the newly turned bare soil area to the warning target bounding box:

[0112] If the ratio r is greater than or equal to the ratio threshold r target , then retain the maximum circumscribed rectangle of the newly turned bare soil area and the warning target boundary box, draw a contour map of the earth-moving area including the newly turned bare soil area and the illegal construction target object, and execute S50;

[0113] If the ratio r is less than the ratio threshold r target , then the newly turned bare soil area is removed and the process returns to S10.

[0114] The ratio threshold r target The value range of is 0.2 to 0.4, preferably 0.3.

[0115] The above step S40' can avoid mistakenly associating the newly turned bare soil area with a too low intersection ratio with the intersecting illegal construction target object, and then assuming that the newly turned bare soil area is caused by this illegal construction target object.

[0116] Specifically, the ratio r satisfies:

[0117] r=A 交集 / A 预警目标边界框

[0118] Where A 交集 A represents the intersection area of ​​the warning target boundary box and the maximum circumscribed rectangle of the newly turned bare soil area, 预警目标边界框 Indicates the area of ​​the warning target bounding box.

[0119] The area measurement module 250 is used to execute step S50: using the coordinate conversion mapping relationship of the camera, the pixel coordinates of the groundbreaking area contour map are converted into world coordinates, and then the world coordinates are converted into longitude and latitude coordinates; and the area of ​​the groundbreaking area is calculated based on the longitude and latitude coordinates of the groundbreaking area contour points.

[0120] In this embodiment, the world coordinates are converted into longitude and latitude coordinates by using a projected coordinate system (PCS) to convert into a geographic coordinate system (GCS), but this is not a limitation on the conversion of world coordinates into longitude and latitude coordinates.

[0121] The above-mentioned measuring device is stored in an electronic device and is executed by the electronic device to realize the measurement of the area of ​​the cultivated land construction area. The electronic device includes but is not limited to a memory, a processor, and a network interface that can be interconnected through a system bus.

[0122] The electronic device may be a computing device such as a rack server, a blade server, a tower server, or a cabinet server, etc. The electronic device may be an independent server or a server cluster composed of multiple servers.

[0123] The memory includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. The memory can be an internal storage unit of the electronic device, such as a hard disk or memory of the electronic device. The memory can also be an external storage device of the electronic device, such as a plug-in hard disk equipped on the electronic device, a smart memory card (SMC), a secure digital (SD) card, a flash card, etc. The memory can also include both the internal storage unit of the electronic device and its external storage device.

[0124] The processor can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor is generally used to control the overall operation of the electronic device, such as performing control and processing related to data interaction or communication with the electronic device. The processor is used to execute program code stored in the memory or process data, such as executing the method for measuring the area of ​​the cultivated land construction area.

[0125] The network interface may include a wireless network interface or a wired network interface, which is generally used to establish a communication connection between the electronic device and other electronic devices. For example, the network interface is used to connect the electronic device to an external data platform via a network, and to establish a data transmission channel and a communication connection between the electronic device and the external data platform. The network may be a wireless or wired network such as an intranet, the Internet, a global system of mobile communications (GSM), wideband code division multiple access (WCDMA), a 4G network, a 5G network, Bluetooth, or Wi-Fi.

[0126] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the embodiments of the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that, unless otherwise specified, "multiple" and "several" refer to two or more; "and / or" refers to and includes any or all possible combinations of one or more associated listed items; "first", "second", "third" and the like are only used to distinguish, and are not used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. When the above description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. In the description of the present application, for those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.

[0127] The above-described embodiments merely represent several implementations of the present invention. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous modifications and improvements without departing from the spirit of the present invention, and the present invention is intended to encompass such modifications and variations.

Claims

1. A method for measuring the area of ​​a construction site on cultivated land, characterized in that: The following steps are involved: S10: Acquire a picture of the target monitoring area taken by the calibrated camera; S20: Use the illegal construction target detection model to detect illegal construction targets in the image and determine whether there are illegal construction targets in the image: If yes, generate a warning image and several warning target bounding boxes, and execute S30; If not, return to S10; S30: Use the earth-moving area recognition model to identify newly turned soil in the warning image and determine whether there is a newly turned bare soil area in the image: If yes, a binary image is generated and the maximum circumscribed rectangle of each newly turned bare soil area is calculated based on the binary image, and S40 is executed; If not, return to S10; S40: Determine whether the maximum circumscribed rectangle of each newly turned bare soil area in the warning image intersects with each warning target bounding box: If yes, retain the maximum circumscribed rectangle of the newly turned bare soil area and the warning target bounding box, draw a contour map of the earth-moving area including the newly turned bare soil area and the illegal construction target object, and execute S50; If not, the newly tilled bare soil area is removed and the process returns to S10; S50: using the coordinate conversion mapping relationship of the camera, converting the pixel coordinates of the groundbreaking area outline map into world coordinates, and then converting the world coordinates into longitude and latitude coordinates; calculating the area of ​​the groundbreaking area according to the longitude and latitude coordinates of the groundbreaking area outline points.

2. The method for measuring the area of ​​the ground-moving area of ​​cultivated land construction according to claim 1, characterized in that: When determining whether there is an illegal construction target in the image and generating a warning image and a plurality of warning target boundary boxes, step S20 further includes: Generate warning information, which includes: the type of illegal construction target, warning image address, warning time, and warning location.

3. The method for measuring the area of ​​the ground-moving area of ​​cultivated land construction according to claim 1, characterized in that: The maximum circumscribed rectangle of the newly turned bare soil area in step S30 is obtained by the following method: SC1 uses the cv2.findContours function to find the contour of the newly turned bare soil area in the binary image and extract the contour points of the newly turned bare soil area; SC2 uses the cv2.boundingRect function to calculate the maximum bounding rectangle of each newly turned bare soil area contour point, and obtains the pixel coordinates of the upper left corner, width and height [x xt ,y xt ,w xt ,h xt ]; SC3 takes the pixel coordinates of the upper left corner, width and height [x xt ,y xt ,w xt ,h xt ] to pixel coordinates [x xt-min ,y xt-min ,x xt-max ,y xt-max ]form.

4. The method for measuring the area of ​​the cultivated land construction area according to claim 1, characterized in that: When the warning image in step S40 contains several newly-turned bare soil areas and several illegal construction targets, the following steps are also included: Generate a list of maximum bounding rectangles of newly turned bare soil areas and a list of warning target bounding boxes; The maximum circumscribed rectangle list of the newly turned bare soil area and the warning target bounding box list are traversed separately to perform intersection judgment.

5. The method for measuring the area of ​​the ground-moving area of ​​cultivated land construction according to claim 4, characterized in that: The method for determining whether the maximum circumscribed rectangle of the newly turned bare soil area and the warning target boundary box intersect in step S40 is as follows: SD1 obtains the pixel coordinates of the largest circumscribed rectangle of the i-th bare soil area [x i-min ,y i-min ,x i-max ,y i-max ], i∈(1,n), pixel coordinates of the j-th warning target bounding box [x j-min ,y j-min ,x j-max ,y j-max ],j∈(1,m); SD2 determines the pixel coordinates [x j-min ,y j-min ,x j-max ,y j-max ]Whether any of the following conditions are met: x j-min >x i-max ,or; x j-max <x i-min ,or; y j-min >y i-max , or; and j-max <y i-min ; If yes, it is determined that the maximum circumscribed rectangle of the i-th bare soil area and the j-th warning target boundary box do not intersect; If not, it is determined that the maximum circumscribed rectangle of the i-th bare soil area and the j-th warning target bounding box intersect.

6. The method for measuring the area of ​​the cultivated land construction area according to any one of claims 1 to 5, characterized in that: The step S40 further includes calculating the ratio of the intersection area of ​​the warning target boundary box and the maximum circumscribed rectangle of the newly turned bare soil area to the area of ​​the warning target boundary box. Then, the step S40 is S40': S40`: Determine whether the maximum circumscribed rectangle of each newly turned bare soil area in the warning image intersects with each warning target bounding box: If yes, calculate the ratio r of the intersection area of ​​the warning target bounding box and the largest circumscribed rectangle of the newly turned bare soil area to the area of ​​the warning target bounding box: If the ratio r is greater than or equal to the ratio threshold r target , then retain the maximum circumscribed rectangle of the newly turned bare soil area and the warning target boundary box, draw a contour map of the earth-moving area including the newly turned bare soil area and the illegal construction target object, and execute S50; If the ratio r is less than the ratio threshold r target , then the newly turned bare soil area is removed and the process returns to S10.

7. The method for measuring the area of ​​the ground-moving area of ​​cultivated land construction according to claim 6, characterized in that: The ratio threshold r target The value range is 0.2~0.

4.

8. A system for measuring the area of ​​a cultivated land construction site, characterized in that: It includes a camera and a measuring device, wherein the camera is communicatively connected with the measuring device; The camera is used to shoot the target monitoring area and transmit the shot video and / or picture to the measuring device; The measuring device is used to receive videos and / or pictures taken by a camera and execute the method for measuring the area of ​​the cultivated land construction area, which includes an image acquisition module, an illegal construction target detection and judgment module, a newly turned soil identification and judgment module, an intersection judgment module, and an area measurement module; The image acquisition module is used to acquire images of the target monitoring area taken by the calibrated camera; The illegal construction target detection and judgment module is used to detect illegal construction targets in images using the illegal construction target detection model on cultivated land, and to determine whether there are illegal construction targets in the images: If yes, a warning image and several warning target bounding boxes are generated, and the new soil identification and judgment module is entered; If not, return to the image acquisition module; The newly turned soil identification and judgment module is used to use the earth-moving area identification model to identify newly turned soil in the warning image and determine whether there is a newly turned bare soil area in the image: If yes, a binary image is generated and the maximum circumscribed rectangle of each newly turned bare soil area is calculated based on the binary image, and the intersection judgment module is entered; If not, return to the image acquisition module; The intersection determination module is used to determine whether the maximum circumscribed rectangle of each newly turned bare soil area in the warning image intersects with each warning target bounding box: If yes, the maximum circumscribed rectangle of the newly turned bare soil area and the warning target boundary box are retained, and an outline map of the newly turned bare soil area and the illegal construction target area is drawn, and the area measurement module is entered; If not, the newly turned bare soil area is removed and the process returns to the image acquisition module; The area measurement module is used to convert the pixel coordinates of the groundbreaking area contour map into world coordinates using the coordinate conversion mapping relationship of the camera, and then convert the world coordinates into longitude and latitude coordinates; and calculate the area of ​​the groundbreaking area based on the longitude and latitude coordinates of the groundbreaking area contour points.

9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Graph overlay analysis method for farmland occupation compliance of construction land

    CN117152130A

  • Method and system for monitoring cultivated land damage in real time through communication iron tower video

    CN117953430A