Video intelligent monitoring and early warning method for cultivated land protection and related equipment
Through the coordinate mutual mapping model and the improved Yolov8 model, dynamic electronic fences are constructed in combination with vector metadata, which solves the problems of insufficient fusion of video data and geospatial data and low warning accuracy in arable land protection monitoring, and achieves more efficient monitoring and early warning of arable land protection.
Patent Information
- Application Number
- CN202510422337.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-05-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the monitoring process of farmland protection, the existing technology has insufficient integration and linkage between video data and geospatial data, low accuracy of monitoring and early warning, and insufficient accuracy and dynamicity of video electronic fences.
The dynamic monitoring video data and geospatial data are mapped through the coordinate mutual mapping model, and the monitoring integrated data is generated, and the improved Yolov8 model is used for object detection. Set vector metadata in dynamic monitoring video data to build an electronic fence, and perform spatial conversion of videos in real time based on geospatial data.
It improves the accuracy of farmland protection monitoring and early warning, enhances the dynamicity and monitoring range of electronic fences, and solves the real-time integration and linkage between video data and geospatial data.
Smart Images

Figure CN119942351A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of natural resources and agricultural monitoring and early warning technology, and in particular to a video intelligent monitoring and early warning method and related equipment for farmland protection. Background Art
[0002] Cultivated land refers to land for growing crops, and cultivated land protection refers to the protection of the quantity and quality of cultivated land through legal, administrative, economic, and technical means and measures. To maintain sustainable agricultural development, we must first ensure the quantity and quality of cultivated land, and the first measure to protect cultivated land is to monitor the status of cultivated land resources.
[0003] At present, the supervision of cultivated land protection is still more focused on procedures and policies, with less attention paid to the technical and operational aspects. The supervision means are relatively simple and the supervision and inspection efforts are insufficient. In order to actively adapt to the requirements of cultivated land protection under the new situation, a dynamic monitoring and supervision system for cultivated land protection of "policy + technology" is established, a cultivated land protection monitoring and supervision system is built, the construction of cultivated land protection informatization is strengthened, and the full-process monitoring and supervision of cultivated land protection during the implementation of projects such as land development and remediation, cultivated land occupation and compensation balance, etc., is of great significance to promoting the continuous improvement of the cultivated land protection system, accelerating the construction of cultivated land quantity, quality and ecological protection, and promoting the formation of a new pattern of cultivated land protection with more powerful protection, smoother implementation and more efficient management.
[0004] The existing technology still has certain defects in the monitoring process of farmland protection, as follows: There are deficiencies in the fusion and linkage of video data and geospatial data: first, the real-time and dynamic overlay of geospatial data in the posture-variable camera surveillance video and the query and retrieval of geospatial data are not achieved; second, the two-way linkage between video surveillance and maps is not achieved; There are deficiencies in the accuracy of monitoring and early warning: First, the existing monitoring and early warning for video target detection has a high false alarm rate and repeated warning rate; second, due to the influence of the number of samples, the generalization and accuracy of traditional video deep learning algorithms are not high, and a large amount of sample collection is required; The accuracy and dynamism of video electronic fences are insufficient. Existing video electronic fences are mostly electronic fence areas drawn based on image pixel space. This type of electronic fence is an image electronic fence and does not have the characteristics of geographic space constraints. There are two problems with this type of electronic fence: first, this type of electronic fence can only be applied to fixed cameras, but not to pan-tilt controlled cameras. When the video camera posture is adjusted, the electronic fence will lose its function. The fence is not dynamic enough and its applicable scenarios are limited. Second, this type of electronic fence cannot achieve precise geographic space location constraints. Summary of the invention
[0005] The invention provides a video intelligent monitoring and early warning method and related equipment for farmland protection, the purpose of which is to improve the accuracy of farmland protection monitoring and early warning.
[0006] In order to achieve the purpose, the present invention provides a video intelligent monitoring and early warning method for farmland protection, comprising: Step 1, obtaining dynamic monitoring video data and geographic spatial data of the target cultivated land area; Step 2: Mapping the dynamic monitoring video data and the geographic space data to each other based on the coordinate mutual mapping model to obtain the monitoring integrated data of the target cultivated land area; Step 3, processing the monitoring integrated data to obtain training data, and using the training data to train the improved Yolov8 model to obtain a target detection model; Step 4: Input the monitoring integrated data into the target detection model for target detection to obtain the detection result of the target cultivated land area; Step 5, setting vector metadata in the dynamic monitoring video data to construct an electronic fence, and performing video spatial conversion of the electronic fence in real time according to the geospatial data to obtain the converted electronic fence; Step 6: Remove the detection results that are not within the converted electronic fence, and determine whether an early warning is needed based on the monitoring results within the converted electronic fence.
[0007] More specifically, step 2 includes: The dynamic monitoring video data and the geographic space data are mutually mapped using the homography matrix mutual mapping model to obtain the first monitoring integrated data of the target cultivated land area; The dynamic monitoring video data and the geographic space data are mutually mapped using the geometric transformation matrix mutual mapping model to obtain the second monitoring integrated data of the target cultivated land area; The first monitoring integrated data and the second monitoring integrated data are combined to obtain monitoring integrated data.
[0008] Furthermore, the dynamic monitoring video data and the geographic space data are mutually mapped using the homography matrix mutual mapping model to obtain the first monitoring integrated data of the target cultivated land area, including: Use the same-name point marking tool to mark the same-name points in dynamic monitoring video data and geographic space data, and establish multiple groups of same-name point pairs; Calculate the homography matrix for each preset direction of the monitoring camera through all the same-name point pairs to build a coordinate transformation model between the dynamic monitoring video data and the geographic space data in each preset direction; When the posture of the monitoring camera changes, the acquired dynamic monitoring video data is feature matched with the preset direction of the monitoring camera to find the preset direction with the most feature points, and the homography matrix corresponding to the preset direction is used as the coordinate transformation model; The coordinate conversion of the geographic space data to the dynamic monitoring video data is calculated according to the coordinate conversion model to obtain the coordinate converted geographic space data; The coordinate-converted geospatial data is rendered, the visual expression of the coordinate-converted geospatial data in the dynamic monitoring video data is determined, and the element attributes of the geospatial data are integrated into the dynamic monitoring video data to obtain the first monitoring integrated data of the target cultivated land area.
[0009] Furthermore, the dynamic monitoring video data and the geographic space data are mutually mapped using the geometric transformation matrix mutual mapping model to obtain the second monitoring integrated data of the target cultivated land area, including: Obtain the real-time posture information of the monitoring camera, which includes: the center coordinates of the monitoring camera and the posture angle element information of the monitoring camera; According to the principle of photogrammetry, a homogeneous matrix equation for coordinate conversion between three-dimensional space coordinates and dynamic monitoring video data is established based on the parameters of the monitoring camera; Parsing the geospatial data to obtain the coordinates of the geospatial data, and converting the coordinates of the geospatial data to the coordinates of the dynamic monitoring video data according to the homogeneous matrix equation to obtain the geospatial data after the coordinate conversion; The coordinate-converted geospatial data is rendered, the visual expression of the coordinate-converted geospatial data in the dynamic monitoring video data is determined, and the element attributes of the geospatial data are integrated into the dynamic monitoring video data to obtain the second monitoring integrated data of the target cultivated land area.
[0010] Furthermore, the monitoring integrated data is processed to obtain training data, including: The monitoring integrated data is processed by geometric transformation to generate images of different viewing angles and scales; Perform cropping and padding operations on images of different perspectives and scales to generate blurred images and occluded images; The colors of blurred and occluded images are adjusted and noise is added to generate training data.
[0011] Specifically, the improved Yolov8 model includes: RepNCSPELAN4 module, SPPELAN module, adaptive convolution module; The RepNCSPELAN4 module replaces the C2F feature extraction module in the original Yolov8 model and consists of the CSPNet and ELAN architectures for feature extraction and fusion; The SPPELAN module replaces the feature pyramid module in the original Yolov8 model and is used to perform multi-scale detection on the input data through a layer aggregation strategy; The adaptive convolution module replaces the convolution module in the head of the original Yolov8 model to capture key information in the data.
[0012] Furthermore, the detection results that are not within the converted electronic fence are eliminated, including: Perform intersection calculation on the electronic fence and the detection result based on the pixel space to obtain the calculation result; According to the calculation results, the detection results that are not within the converted electronic fence are eliminated.
[0013] The present invention also provides a video intelligent monitoring and early warning device for farmland protection, comprising: An acquisition module, used to acquire dynamic monitoring video data and geographic spatial data of a target cultivated land area; A mapping module is used to map the dynamic monitoring video data with the geographic space data based on a coordinate mutual mapping model to obtain the monitoring integrated data of the target cultivated land area; The training module is used to process the monitoring integrated data to obtain training data, and use the training data to train the improved Yolov8 model to obtain the target detection model; A detection module is used to input the monitoring integrated data into the target detection model for target detection, and obtain the detection result of the target cultivated land area; A construction module is used to set vector metadata in dynamic monitoring video data to construct an electronic fence, and perform video spatial conversion of the electronic fence in real time according to the geospatial data to obtain the converted electronic fence; The early warning module is used to eliminate the detection results that are not within the converted electronic fence, and determine whether an early warning is needed based on the monitoring results within the converted electronic fence.
[0014] The present invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a video intelligent monitoring and early warning method for farmland protection is implemented.
[0015] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, a video intelligent monitoring and early warning method for farmland protection is implemented.
[0016] The solution of the present invention has the following beneficial effects: The present invention obtains dynamic monitoring video data and geographic space data of a target cultivated land area; maps the dynamic monitoring video data and the geographic space data to each other based on a coordinate mutual mapping model to obtain monitoring integrated data of the target cultivated land area; processes the monitoring integrated data to obtain training data, and uses the training data to train an improved Yolov8 model to obtain a target detection model; inputs the monitoring integrated data into the target detection model to perform target detection to obtain a detection result of the target cultivated land area; sets vector metadata in the dynamic monitoring video data to construct an electronic fence, and performs video spatialization conversion on the electronic fence in real time according to the geographic space data to obtain a converted electronic fence; and detects objects that are not within the converted electronic fence. The results are eliminated, and whether an early warning is needed is determined according to the monitoring results within the converted electronic fence; compared with the prior art, the present invention maps dynamic monitoring video data and geographic space data to each other through a coordinate mutual mapping model to solve the real-time fusion and linkage of dynamic video data and geographic space data collected by monitoring cameras; the Yolov8 model is improved from multiple angles to improve the accuracy of target detection for monitoring integrated data; vector metadata is set in the dynamic monitoring video data to construct an electronic fence, and the electronic fence is converted into video space in real time according to the geographic space data to obtain the converted electronic fence, so as to improve the dynamics and monitoring range of the electronic fence, thereby improving the accuracy of farmland protection monitoring and early warning.
[0017] Other beneficial effects of the present invention will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram of a flow chart of an embodiment of the present invention; Figure 2 Schematic diagram of the structure of a video intelligent monitoring and early warning device for farmland protection in an embodiment of the present invention; Figure 3 Schematic diagram of the structure of a terminal device in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0021] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a locking connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the terms in the present invention can be understood according to specific circumstances.
[0022] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0023] In view of the existing problems, the present invention provides a video intelligent monitoring and early warning method and related equipment for farmland protection.
[0024] like Figure 1 As shown, an embodiment of the present invention provides a video intelligent monitoring and early warning method for farmland protection, comprising: Step 1, obtaining dynamic monitoring video data and geographic spatial data of the target cultivated land area; Step 2: Mapping the dynamic monitoring video data and the geographic space data to each other based on the coordinate mutual mapping model to obtain the monitoring integrated data of the target cultivated land area; Step 3, processing the monitoring integrated data to obtain training data, and using the training data to train the improved Yolov8 model to obtain a target detection model; Step 4: Input the monitoring integrated data into the target detection model for target detection to obtain the detection result of the target cultivated land area; Step 5, setting vector metadata in the dynamic monitoring video data to construct an electronic fence, and performing video spatial conversion on the electronic fence in real time according to the geospatial data to obtain the converted electronic fence; Step 6: Remove the detection results that are not within the converted electronic fence, and determine whether an early warning is needed based on the monitoring results within the converted electronic fence.
[0025] In an embodiment of the present invention, the dynamic monitoring video data may be video data collected in real time in a target farmland area using one or more monitoring cameras, the video data content includes farmland, buildings, and water areas, and the geographic spatial data may be an orthophoto with coordinate information.
[0026] The embodiment of the present invention comprehensively considers the influence of conditions such as the parameter availability of the built video surveillance camera and the external environment of video surveillance. In step 2, the dynamic monitoring video data and the geographic space data are mapped to each other using the homography matrix mutual mapping model to obtain the first monitoring integrated data of the target cultivated land area; the dynamic monitoring video data and the geographic space data are mapped to each other using the geometric transformation matrix mutual mapping model to obtain the second monitoring integrated data of the target cultivated land area; the first monitoring integrated data and the second monitoring integrated data are merged to obtain the monitoring integrated data.
[0027] In the embodiment of the present invention, the homography matrix mutual mapping model is not a structural model, but an algorithmic model. It is necessary to pre-select a preset direction in the dynamic monitoring video data to establish a spatial mapping relationship. Points with obvious features and corresponding position coordinates that can be found in the actual geographic space are selected in the preset direction. The homography matrix of each preset direction can be solved through point pairs to establish a mapping relationship between world coordinates and video coordinates. When the posture of the monitoring camera is adjusted, the video data under the current viewing angle is feature matched with the preset direction through a matching algorithm, and the preset direction containing the most feature points is inferred. Based on the homography matrix of the preset direction, the coordinate mutual mapping of the geographic space data and the dynamic monitoring video data is completed, supporting the dynamic matching, superposition and attribute viewing of the position of the geographic space data in the dynamic monitoring video data. The specific process is as follows: Use the same-name point marking tool to mark the same-name points in dynamic monitoring video data and geographic space data, and establish multiple groups of same-name point pairs; Calculate the homography matrix for each preset direction of the monitoring camera through all the same-name point pairs to build a coordinate transformation model between the dynamic monitoring video data and the geographic space data in each preset direction; When the posture of the monitoring camera (such as camera orientation and focal length) changes, feature matching is performed between the acquired dynamic monitoring video data and the preset direction of the monitoring camera to find the preset direction with the most feature points, and the homography matrix corresponding to the preset direction is used as the coordinate transformation model; The coordinate conversion of the geographic space data to the dynamic monitoring video data is calculated according to the coordinate conversion model to obtain the coordinate converted geographic space data; The coordinate-converted geospatial data is rendered, the visual expression of the coordinate-converted geospatial data in the dynamic monitoring video data is determined, and the element attributes of the geospatial data are integrated into the dynamic monitoring video data to obtain the first monitoring integrated data of the target cultivated land area.
[0028] It should be noted that the embodiment of the present invention defines that the monitoring camera includes multiple preset directions, the preset directions are pre-selected frames of the picture, and more than 8 pairs of points with the same name need to be constructed in each direction; the rendering of the geographic spatial data after coordinate conversion includes drawing of specific colors and line types and symbolic rendering.
[0029] In an embodiment of the present invention, at least 4 groups of points are marked, each group of points consists of video screen coordinate points and real geographic coordinate points, and each group of points is input into the find Homography function in the OpenCV library for calculation to obtain a homography matrix. The input parameters of the findHomography function are the corresponding points in the two images, and the output parameters are the homography matrix. The homography matrix is often used in applications such as image registration and image stitching to map points in one image to corresponding points in another image.
[0030] Most preferably, the dynamic monitoring video data and the geographic space data are mutually mapped using a geometric transformation matrix mutual mapping model to obtain the second monitoring integrated data of the target cultivated land area, including: Obtain the real-time posture information of the monitoring camera, which includes: the center coordinates of the monitoring camera and the posture angle element information of the monitoring camera; According to the principle of photogrammetry, a homogeneous matrix equation for coordinate conversion between three-dimensional space coordinates and dynamic monitoring video data is established based on the parameters of the monitoring camera; Parsing the geospatial data to obtain the coordinates of the geospatial data, and converting the coordinates of the geospatial data to the coordinates of the dynamic monitoring video data according to the homogeneous matrix equation to obtain the geospatial data after the coordinate conversion; The coordinate-converted geospatial data is rendered, the visual expression of the coordinate-converted geospatial data in the dynamic monitoring video data is determined, and the element attributes of the geospatial data are integrated into the dynamic monitoring video data to obtain the second monitoring integrated data of the target cultivated land area.
[0031] In an embodiment of the present invention, the expression of the homogeneous matrix equation is:
[0032] in, represents a non-zero scale factor, represents the world coordinates, Represents the coordinates of the camera center in the world coordinate system, represents the image plane coordinates, Indicates focal length in pixels, Represents screen pixels, represents the non-orthogonality that affects the coordinate axes, Represents the rotation transformation matrix.
[0033] It should be noted that rendering the coordinate-converted geographic spatial data includes drawing specific colors and line types and symbolic rendering.
[0034] In an embodiment of the present invention, when the coordinates of geographic spatial data are converted to the coordinates of dynamic monitoring video data according to the homogeneous matrix equation, GIS feature objects in multiple geographic spatial data can be batch calculated at one time and the topological relationship of GIS vector data can be retained.
[0035] Specifically, the monitoring integrated data is processed to obtain training data, including: The monitoring integrated data is processed by geometric transformation to generate images of different viewing angles and scales; Perform cropping and padding operations on images of different perspectives and scales to generate blurred images and occluded images to simulate different shooting environments and target occlusion situations; The colors of blurred and occluded images are adjusted and noise is added to generate training data.
[0036] In the embodiment of the present invention, the geometric transformation includes rotation, scaling, translation, mirroring, etc.; the color adjustment of the blurred image and the occluded image includes brightness adjustment, contrast adjustment and saturation adjustment. The noise can be Gaussian noise, which is used to simulate different lighting and weather conditions. Through these processes, the monitoring integrated data can be enhanced, and the improved Yolov8 model is trained with training data, which can significantly improve the adaptability of the model in different scenarios and achieve higher detection accuracy.
[0037] Specifically, the improved Yolov8 model includes: RepNCSPELAN4 module, SPPELAN module, adaptive convolution module; The RepNCSPELAN4 module replaces the C2F feature extraction module in the original Yolov8 model. It consists of the CSPNet and ELAN architectures and is used for feature extraction and fusion, which can effectively improve the model's feature extraction and fusion capabilities. The SPPELAN module replaces the feature pyramid module in the original Yolov8 model and is used to perform multi-scale detection on the input data through a layer aggregation strategy, which can improve the multi-scale detection capability of the model; The adaptive convolution module replaces the convolution module in the head of the original Yolov8 model to capture key information in the data. It dynamically adjusts the weights of the convolution kernels in the adaptive convolution module to adapt to different input features, better capture key information in the image, and improve target detection accuracy.
[0038] In an embodiment of the present invention, the monitoring integrated data is input into a target detection model for target detection to obtain detection results of the target cultivated land area, which include targets such as houses, fruit trees and seedlings, pond water surfaces, greenhouses, vehicles, and construction machinery in the target cultivated land area.
[0039] Specifically, vector metadata is set in the dynamic monitoring video data, and an electronic fence is constructed according to the vector metadata, including: First, the geographical boundaries of the electronic fence need to be defined; the electronic fence is usually represented by polygons, and the boundaries of the electronic fence are described by multiple vector metadata set in the dynamic monitoring video data (vector metadata refers to data that describes and provides additional information about vector data, mainly used to describe the attributes, location, shape, etc. of these images), and these vector metadata are connected to form a fence; By establishing a coordinate mapping relationship, the geographic coordinate system is converted into the pixel coordinates of the dynamic monitoring video data; Calibrate the surveillance camera to determine the field of view, focal length, and relative position between the camera and the ground. Based on the camera calibration parameters, a transformation matrix can be calculated to convert geographic coordinates into pixel coordinates in dynamic surveillance video data. Perspective Transformation is used to map the geographic coordinates of the electronic fence to the two-dimensional plane of the dynamic monitoring video data, so that the electronic fence in the video screen matches the actual geographic area.
[0040] It should be noted that, in order to ensure that the electronic fence is consistent with the real-time video surveillance, the embodiment of the present invention needs to update the electronic fence according to the real-time geographic space data.
[0041] Specifically, the detection results that are not within the converted electronic fence are eliminated, including: Perform intersection calculation on the electronic fence and the detection result based on the pixel space to obtain the calculation result; According to the calculation results, the detection results that are not within the converted electronic fence are eliminated.
[0042] Specifically, whether an early warning is needed is determined based on the monitoring results within the converted electronic fence, including: When the detection results within the converted electronic fence indicate that the cultivated land has been converted to non-agricultural or non-grain land, an early warning is required. Non-agricultural and non-grain land refers to non-agricultural activities on cultivated land, such as occupying basic farmland for house construction, digging ponds, planting fruit trees and seedlings, greenhouse planting, and other illegal occupation of cultivated land; When the detection results within the converted electronic fence indicate that the cultivated land is being used for agricultural activities or growing food crops, no warning is required. Agricultural activities include tilling the land, planting, irrigation, fertilizing, harvesting, etc. Food crops include rice, wheat, soybeans, etc.
[0043] The embodiment of the present invention obtains dynamic monitoring video data and geographic space data of a target cultivated land area; maps the dynamic monitoring video data and the geographic space data to each other based on a coordinate mutual mapping model to obtain monitoring integrated data of the target cultivated land area; processes the monitoring integrated data to obtain training data, and uses the training data to train an improved Yolov8 model to obtain a target detection model; inputs the monitoring integrated data into the target detection model to perform target detection to obtain a detection result of the target cultivated land area; sets vector metadata in the dynamic monitoring video data to construct an electronic fence, and performs video spatialization conversion on the electronic fence in real time according to the geographic space data to obtain a converted electronic fence; and detects the electronic fence that is not within the converted electronic fence. The results are eliminated, and whether an early warning is needed is determined according to the monitoring results within the converted electronic fence; compared with the prior art, the embodiment of the present invention maps dynamic monitoring video data and geographic space data to each other through a coordinate mutual mapping model to solve the real-time fusion and linkage of dynamic video data and geographic space data collected by monitoring cameras; the Yolov8 model is improved from multiple angles to improve the accuracy of target detection for monitoring integrated data; vector metadata is set in the dynamic monitoring video data to construct an electronic fence, and the electronic fence is converted into video space in real time according to the geographic space data to obtain the converted electronic fence, so as to improve the dynamics and monitoring range of the electronic fence, thereby improving the accuracy of farmland protection monitoring and early warning.
[0044] Corresponding to the video intelligent monitoring and early warning method for farmland protection described in the above embodiment, Figure 2 As shown, the present invention also provides a video intelligent monitoring and early warning device 100 for farmland protection, the video intelligent monitoring and early warning device 100 comprises: An acquisition module 101 is used to acquire dynamic monitoring video data and geographic space data of a target cultivated land area; A mapping module 102 is used to map the dynamic monitoring video data with the geographic space data based on a coordinate mutual mapping model to obtain monitoring integrated data of the target cultivated land area; The training module 103 is used to process the monitoring integrated data to obtain training data, and use the training data to train the improved Yolov8 model to obtain a target detection model; The detection module 104 is used to input the monitoring integrated data into the target detection model to perform target detection and obtain the detection result of the target cultivated land area; A construction module 105 is used to set vector metadata in the dynamic monitoring video data to construct an electronic fence, and perform video spatial conversion on the electronic fence in real time according to the geographic space data to obtain a converted electronic fence; The warning module 106 is used to remove the detection results that are not within the converted electronic fence, and determine whether a warning is needed according to the monitoring results within the converted electronic fence.
[0045] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0046] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0047] The embodiment of the present invention also provides a terminal device, such as Figure 3 As shown, the terminal device D10 of this embodiment includes: at least one processor D100 ( Figure 3 Only one processor is shown), a memory D101, and a computer program D102 stored in the memory D101 and executable on at least one processor D100. When the processor D100 executes the computer program D102, the video intelligent monitoring and early warning method for farmland protection is implemented.
[0048] The terminal device D10 may be a computing device such as a desktop computer, a notebook, a PDA, a server, a server cluster, a cloud server, etc. The terminal device may include, but is not limited to, a processor D100 and a memory D101. Those skilled in the art will appreciate that Figure 3 This is only an example of the terminal device D10 and does not constitute a limitation on the terminal device D10. The terminal device D10 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0049] The processor D100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0050] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may also be an external storage device of the terminal device D10, such as a plug-in hard disk, a smart memory card (SMC, SmartMedia Card), a secure digital (SD, Secure Digital) card, a flash card (Flash Card), etc. equipped on the terminal device D10. Further, the memory D101 may also include both an internal storage unit of the terminal device D10 and an external storage device. The memory D101 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory D101 may also be used to temporarily store data that has been output or is to be output.
[0051] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0052] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0053] An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, a video intelligent monitoring and early warning method for farmland protection is implemented.
[0054] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form. The above-mentioned computer-readable medium may at least include: any entity or device that can carry the computer program code to the construction device / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.
[0055] The above are preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the above principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A video intelligent monitoring and early warning method for farmland protection, characterized in that: include: Step 1, obtaining dynamic monitoring video data and geographic spatial data of the target cultivated land area; Step 2, mapping the dynamic monitoring video data and the geographic space data to each other based on a coordinate mutual mapping model to obtain monitoring integrated data of the target cultivated land area; Step 3, processing the monitoring integrated data to obtain training data, and using the training data to train the improved Yolov8 model to obtain a target detection model; Step 4, inputting the monitoring integrated data into the target detection model to perform target detection, and obtaining the detection result of the target cultivated land area; Step 5, setting vector metadata in the dynamic monitoring video data to construct an electronic fence, and performing video spatialization conversion on the electronic fence in real time according to the geospatial data to obtain a converted electronic fence; Step 6: Remove the detection results that are not within the converted electronic fence, and determine whether an early warning is needed based on the monitoring results within the converted electronic fence.
2. The video intelligent monitoring and early warning method for farmland protection according to claim 1 is characterized in that: The step 2 comprises: The dynamic monitoring video data and the geographic space data are mutually mapped using a homography matrix mutual mapping model to obtain first monitoring integrated data of the target cultivated land area; The dynamic monitoring video data and the geographic space data are mutually mapped using a geometric transformation matrix mutual mapping model to obtain second monitoring integrated data of the target cultivated land area; The first monitoring integrated data and the second monitoring integrated data are merged to obtain monitoring integrated data.
3. The video intelligent monitoring and early warning method for farmland protection according to claim 2 is characterized in that: The dynamic monitoring video data and the geographic space data are mutually mapped using a homography matrix mutual mapping model to obtain first monitoring integrated data of the target cultivated land area, including: Marking the same-name points in the dynamic monitoring video data and the geographic space data by using a same-name point marking tool to establish multiple groups of same-name point pairs; Calculating a homography matrix for each preset direction of the monitoring camera through all pairs of points with the same name, so as to construct a coordinate transformation model between the dynamic monitoring video data of each preset direction and the geographic space data; When the posture of the monitoring camera changes, the acquired dynamic monitoring video data is feature matched with the preset direction of the monitoring camera to find the preset direction with the most feature points, and the homography matrix corresponding to the preset direction is used as the coordinate transformation model; Calculate the coordinate conversion of the geographic space data to the dynamic monitoring video data according to the coordinate conversion model to obtain the coordinate converted geographic space data; The coordinate-converted geospatial data is rendered, the visual expression of the coordinate-converted geospatial data in the dynamic monitoring video data is determined, and the element attributes of the geospatial data are integrated into the dynamic monitoring video data to obtain the first monitoring integrated data of the target cultivated land area.
4. The video intelligent monitoring and early warning method for farmland protection according to claim 3 is characterized in that: The dynamic monitoring video data and the geographic space data are mutually mapped using a geometric transformation matrix mutual mapping model to obtain second monitoring integrated data of the target cultivated land area, including: Acquire real-time posture information of the monitoring camera, wherein the real-time posture information includes: the center coordinates of the monitoring camera and the posture angle element information of the monitoring camera; According to the principle of photogrammetry, a homogeneous matrix equation for coordinate conversion between three-dimensional space coordinates and the dynamic monitoring video data is established based on the parameters of the monitoring camera; Parsing the geospatial data to obtain the coordinates of the geospatial data, and converting the coordinates of the geospatial data to the coordinates of the dynamic monitoring video data according to the homogeneous matrix equation to obtain the geospatial data after the coordinate conversion; The coordinate-converted geospatial data is rendered, the visual expression of the coordinate-converted geospatial data in the dynamic monitoring video data is determined, and the element attributes of the geospatial data are integrated into the dynamic monitoring video data to obtain the second monitoring integrated data of the target cultivated land area.
5. The video intelligent monitoring and early warning method for farmland protection according to claim 4 is characterized in that: The monitoring integrated data is processed to obtain training data, including: The monitoring integrated data is processed by using geometric transformation to generate images of different viewing angles and scales; Perform cropping and padding operations on images of different perspectives and scales to generate blurred images and occluded images; The colors of the blurred image and the blocked image are adjusted and noise is added to generate training data.
6. The video intelligent monitoring and early warning method for farmland protection according to claim 3 is characterized in that: The improved Yolov8 model includes: RepNCSPELAN4 module, SPPELAN module, adaptive convolution module; The RepNCSPELAN4 module replaces the C2F feature extraction module in the original Yolov8 model and consists of CSPNet and ELAN architectures for feature extraction and fusion; The SPPELAN module replaces the feature pyramid module in the original Yolov8 model and is used to perform multi-scale detection on the input data through a layer aggregation strategy; The adaptive convolution module replaces the convolution module at the head of the original Yolov8 model to capture key information in the data.
7. The video intelligent monitoring and early warning method for farmland protection according to claim 6 is characterized in that: Eliminate the detection results that are not within the converted electronic fence, including: Performing intersection calculation on the electronic fence and the detection result based on the pixel space to obtain a calculation result; According to the calculation results, the detection results that are not within the converted electronic fence are eliminated.
8. A video intelligent monitoring and early warning device for farmland protection, characterized in that: include: An acquisition module, used to acquire dynamic monitoring video data and geographic spatial data of a target cultivated land area; A mapping module, used to map the dynamic monitoring video data and the geographic space data to each other based on a coordinate mutual mapping model to obtain monitoring integrated data of the target cultivated land area; A training module, used to process the monitoring integrated data to obtain training data, and use the training data to train the improved Yolov8 model to obtain a target detection model; A detection module, used for inputting the monitoring integrated data into the target detection model to perform target detection and obtain a detection result of the target cultivated land area; A construction module, used for setting vector metadata in the dynamic monitoring video data to construct an electronic fence, and performing video spatialization conversion on the electronic fence in real time according to the geographic space data to obtain a converted electronic fence; The early warning module is used to eliminate the detection results that are not within the converted electronic fence, and determine whether an early warning is needed based on the monitoring results within the converted electronic fence.
9. A terminal 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 computer program, the video intelligent monitoring and early warning method for farmland protection as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the video intelligent monitoring and early warning method for farmland protection as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Multiple-mode alert analysis method
CN103414870A
Violation display monitoring method based on video geofence
CN110166744A
Monitoring video image event detection method and system combined with heterogeneous electronic fence
CN117612108A
Monitoring video dynamic target tracking method and system coupled with geographic space information
CN119379739A
Cited By
Supplementary cultivated land recovery evaluation method and system and medium
CN120339286A
A method, system, and medium for supplemental cropland restoration assessment
CN120339286B