Camera adaptive focusing method for mining intelligent video analysis

By using the camera adaptive focus method in the underground environment of coal mines, combined with the object detection model and PID control, the problem of detection target blur is solved, and the detection accuracy and clarity are improved.

CN119767138APending Publication Date: 2025-04-04TIANDI CHANGZHOU AUTOMATION +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411778737.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In underground coal mine environments, due to low light, limited camera viewing angle or low resolution, the detection targets blur or lack details in the camera screen, affecting the analysis effect and may cause misidentification and false alarms.

Method used

The camera adaptive focus method using the mining intelligent video analysis is adopted to analyze the video stream image through the object detection model, calculate the deviation feedback value, and adjust the camera focal length using PID control to improve the clarity and confidence of the detection target.

Benefits of technology

Dynamically adjust the camera focal length to improve the clarity and detection accuracy of the detection target, and ensure the camera's detection effect on the target object in a complex underground environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119767138A_ABST
    Figure CN119767138A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image shooting, in particular to a camera self-adaptive focusing method, system and equipment for mining intelligent video analysis and a medium of the camera self-adaptive focusing method and system. The method comprises the following steps: acquiring video streams of various underground scenes in real time through at least one mining intrinsic safety camera, and performing frame extraction processing on the video streams to obtain a plurality of frames of images; inputting the image into a target detection model to obtain a target detection result; calculating a deviation feedback value based on the target detection result, and comparing the deviation feedback value with a threshold value; if the deviation feedback value is equal to the threshold value, judging that the current focal length of the mining intrinsic safety camera meets the requirement; otherwise, entering the next step; calculating the adjustment amount of the camera focal length according to a focusing control formula based on the deviation feedback value; and outputting the adjustment amount of the camera focal length to the camera to realize adaptive adjustment of the camera focal length. According to the invention, the focal length of the camera can be dynamically adjusted, the detection target definition and detection precision are improved, and the detection effect of the camera on a target object in an underground complex environment is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image shooting technology, and in particular to a camera adaptive focusing method, system, equipment and medium for intelligent video analysis for mining. Background Art

[0002] The core goal of coal mine intelligence is to use artificial intelligence technology to accumulate and apply expert experience, gradually replace manual work to complete dangerous, complex and repetitive operations, and thus improve the safety, intelligence and efficiency of coal mine production. Among them, video big data analysis technology based on computer vision plays a key role in coal mine intelligence.

[0003] The computer vision-based video big data analysis technology uses AI to intelligently identify and analyze video data, realizing automatic monitoring of scenarios such as belt deviation detection, helmet wearing detection, personnel intrusion into dangerous areas detection, personnel leaving their posts and sleeping on the job detection, and flame and smoke detection. It automatically identifies violations by underground personnel and pushes early warning information to the management center in a timely manner, providing on-site managers with effective supervision tools, thereby significantly enhancing the mine's production safety capabilities.

[0004] However, due to factors such as low lighting in the underground environment, limited camera viewing angle or low resolution, the detection target is easily blurred or missing details in the camera image, affecting the analysis effect, and even causing misidentification and false alarm. Usually, in order to improve the recognition and analysis effect, it can be optimized by collecting more underground data, manually annotating the data set, and retraining the algorithm model. This method consumes a lot of manpower, has a long deployment cycle, and the underground environment changes frequently, and the update frequency is difficult to meet the real-time requirements. On the other hand, the camera's viewing angle or resolution can be manually adjusted to obtain a clearer target image. However, this method is complex to operate and difficult to respond to environmental changes in real time. It cannot achieve large-scale and rapid deployment and is difficult to meet the actual needs in the coal mine environment. Summary of the invention

[0005] The present invention aims to solve at least one of the technical problems existing in the prior art.

[0006] To this end, the present invention provides a camera adaptive focusing method for intelligent video analysis for mining, which can dynamically adjust the focal length of the camera, improve the clarity and detection accuracy of the detection target, and ensure the camera's detection effect on the target object in a complex underground environment.

[0007] According to the camera adaptive focusing method of intelligent video analysis for mining according to an embodiment of the present invention, the method comprises the following steps:

[0008] S1, using at least one intrinsically safe camera for mining to collect video streams of various scenes underground in real time, extracting frames from the video streams, and obtaining a number of frames of images;

[0009] S2, inputting the image into a target detection model to obtain a target detection result;

[0010] S3, calculating a deviation feedback value based on the target detection result, and comparing the deviation feedback value with a threshold;

[0011] If the deviation feedback value is equal to the threshold, it is determined that the current focal length of the mining intrinsically safe camera meets the requirement;

[0012] Otherwise, proceed to the next step;

[0013] S4, calculating the adjustment amount of the camera focal length according to a focus control formula based on the deviation feedback value;

[0014] S5, outputting the adjustment amount of the camera focal length to the camera to achieve adaptive adjustment of the camera focal length.

[0015] The beneficial effect of the present invention is that the camera adaptive focusing method of the mining intelligent video analysis of the present invention adopts the target detection model to analyze the video stream image, obtains the target detection result, and calculates the detection target deviation feedback value according to the target detection result. Finally, PID control is introduced to optimize the focal length through deviation feedback adjustment to improve the clarity and confidence of the detection target. The camera focal length can be dynamically adjusted to improve the clarity and detection accuracy of the detection target, and ensure the detection effect of the camera on the target object in the complex environment underground.

[0016] According to one embodiment of the present invention, the calculation formula of the deviation feedback value is:

[0017] feedback=α·|pp target |+β·|ss target |

[0018] Among them, α is the target proportion weight, β is the target confidence weight, p is the current target proportion, and p target is the ideal ratio, s is the current target confidence, s target is the ideal confidence level.

[0019] According to one embodiment of the present invention, the calculation formula of the focus control formula is:

[0020]

[0021] Where error = setpoint-feedback, setpoint is the threshold, K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient.

[0022] According to an embodiment of the present invention, the target detection result includes the target object, the category of the target object, the confidence of the target object, and the position coordinates of the target object.

[0023] According to an embodiment of the present invention, in step S3, the picture size is also calculated based on the position coordinates of the target object, and the proportion of the target object in the image is obtained, and the proportion of the target object in the image is the current target proportion.

[0024] According to an embodiment of the present invention, a camera adaptive focusing system for intelligent video analysis for mining includes:

[0025] The acquisition module 200 collects video streams of various scenes underground in real time through at least one mining intrinsically safe camera, extracts frames from the video streams, and obtains several frames of images.

[0026] The target detection module 201 inputs the image into a target detection model to obtain a target detection result;

[0027] A first calculation module 202 calculates a deviation feedback value based on the target detection result, and compares the deviation feedback value with a threshold;

[0028] If the deviation feedback value is equal to the threshold, it is determined that the current focal length of the mining intrinsically safe camera meets the requirement;

[0029] Otherwise, proceed to the next step;

[0030] The second calculation module 203 calculates the adjustment amount of the camera focal length based on the deviation feedback value and according to the focus control formula.

[0031] The control module 204 outputs the adjustment amount of the camera focus to the camera to achieve adaptive adjustment of the camera focus.

[0032] According to one embodiment of the present invention, the calculation formula of the deviation feedback value is:

[0033] feedback=α·|pp target |+β·|ss target |

[0034] Among them, α is the target proportion weight, β is the target confidence weight, p is the current target proportion, and p target is the ideal ratio, s is the current target confidence, s target is the ideal confidence level.

[0035] According to one embodiment of the present invention, the calculation formula of the focus control formula is:

[0036]

[0037] Where error = setpoint-feedback, setpoint is the threshold, K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient.

[0038] A computer device according to an embodiment of the present invention includes:

[0039] processor;

[0040] A memory for storing executable instructions;

[0041] Wherein, the processor is used to read the executable instructions from the memory and execute the executable instructions to implement the camera adaptive focusing method for intelligent video analysis for mining as described above.

[0042] According to a computer-readable storage medium of an embodiment of the present invention, the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor implements the camera adaptive focusing method for intelligent video analysis for mining as described above.

[0043] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0044] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0046] Figure 1 It is a schematic diagram of the method flow of embodiment 1 of the present invention.

[0047] Figure 2 It is a schematic diagram of the system structure of the second embodiment of the present invention.

[0048] Figure 3 It is a schematic diagram of the computer device structure of the third embodiment of the present invention.

[0049] In the figure, 200 is an acquisition module; 201 is a target detection module; 202 is a first calculation module; 203 is a second calculation module; 204 is a control module 10, a computer device; 1002 is a processor; 1004 is a memory; 1006 is a transmission device. DETAILED DESCRIPTION

[0050] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.

[0051] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying 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 a limitation on the present invention. In addition, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0052] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed 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 it can be indirectly connected 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 above terms in the present invention can be understood according to specific circumstances.

[0053] Example 1

[0054] The present application embodiment provides a camera adaptive focusing method for intelligent video analysis for mining, such as Figure 1 As shown, the method comprises the following steps:

[0055] S1, collects video streams of various scenes underground in real time through at least one intrinsically safe camera for mining, extracts frames of the video stream, and obtains several frames of images; the frame extraction process extracts several frames of images at a certain interval, such as: if the frame rate of the video stream is 25fps, that is, the video is composed of 25 frame images per second, generally, the two adjacent pictures do not change much, and the frame extraction method of taking frames at a single interval is adopted to reduce the original 25 frame images to 13 frame images. By extracting frames, the calculation amount of the target detection model is reduced, and the efficiency of focusing is improved.

[0056] S2, input the image into the target detection model to obtain the target detection result; wherein the target detection result includes the target object, the category of the target object, the confidence of the target object and the position coordinates of the target object.

[0057] It should be noted that the target object, the category of the target object and the location coordinates of the target object are the input information required for the training of the target detection model. The target detection model training process is: data collection-labeling data-input model training. Among them, the collected data is generally a picture containing the target object. The general process of labeling data is to manually circle the range of the target object on the picture with the help of labeling tools such as labelimg, and customize the category of the target object, and finally output a label file in the form of txt corresponding to the picture. The label file contains information such as the target object, the category of the target object and the location coordinates of the target object. The image and the corresponding label file will be input into the target detection model for training. The role of the category of the target object and the location coordinates of the target object is to help the target detection model learn how to find a specific target object on the image and identify the category of the target object. In coal mines, common target detection scenarios include human body detection, helmet detection and license plate detection, etc., and the corresponding target categories are human body, helmet and license plate, etc., but not limited to this.

[0058] S3, calculate the deviation feedback value based on the target detection result, and compare the deviation feedback value with the threshold; if the deviation feedback value is equal to the threshold, it is determined that the current focal length of the mining intrinsically safe camera meets the requirements; otherwise, it proceeds to the next step; the threshold is set in advance, and the threshold is 0 in the ideal state. The closer the feedback value is to 0, the closer the focal length of the camera is to the ideal state. In actual practice, the threshold interval range is set to 0 to 0.5.

[0059] Furthermore, the calculation formula of the deviation feedback value is:

[0060] feedback=α·|pp target |+β·|ss target |

[0061] Among them, α is the target proportion weight, β is the target confidence weight, p is the current target proportion, and p target is the ideal ratio, s is the current target confidence, s target is the ideal confidence level.

[0062] It should be noted that the target ratio and target confidence calculated based on the target detection result are combined into a feedback value to guide the focusing process so as to achieve the expected detection effect in various scenarios. Further, the acquisition of the target ratio includes:

[0063] The screen size is calculated based on the position coordinates of the target object, and the proportion of the target object in the image is obtained. The proportion of the target object in the image is the current target proportion.

[0064] Target confidence refers to the target confidence output by the target detection model. Set the ideal ratio range to 10%-30%, set the ideal confidence range to 0.5-0.9, and set the weights by setting the ideal ratio and ideal confidence. α is the target ratio weight, β is the target confidence weight, α+β=1, and the larger α is, the smaller β is. By setting the weights to comprehensively consider the effects of both, for example, for situations that require high detection accuracy (such as small objects, easily confused objects), the weight of target confidence can be increased; for situations with strict ratio requirements (such as human body detection), the weight of target ratio can be increased.

[0065] Using a weighted formula, the deviation between the target ratio and the target confidence is combined into a feedback value. When the feedback value is closer to 0, it means that the focal length of the camera is closer to the ideal state. Based on the weighted mechanism, the present invention comprehensively considers the influence of the detection target ratio and confidence, prevents the occurrence of false detection and false alarm caused by high confidence of the detection target but unreasonable ratio, and improves the reliability of the intelligent video analysis system.

[0066] S4, based on the deviation feedback value, the adjustment amount of the camera focal length is calculated according to the focus control formula; further, the calculation formula of the focus control formula is:

[0067]

[0068] Where error = setpoint-feedback, setpoint is the threshold, K p is the proportionality coefficient, which directly affects the current error, K i is the integration coefficient, which is used to accumulate errors to eliminate long-term deviations, K d is the differential coefficient used to suppress rapid fluctuations in the error rate of change.

[0069] S5 outputs the camera focal length adjustment value to the camera to achieve adaptive camera focal length adjustment. This simplifies on-site operation and maintenance and improves the generalization capability of intelligent video analysis.

[0070] The camera adaptive focusing method of the mining intelligent video analysis of the present invention adopts the target detection model to analyze the video stream image, obtains the target detection result, and calculates the detection target deviation feedback value according to the target detection result. Finally, PID control is introduced to optimize the focal length through deviation feedback adjustment to improve the clarity and confidence of the detection target. The camera focal length can be dynamically adjusted to improve the clarity and detection accuracy of the detection target, and ensure the detection effect of the camera on the target object in the complex environment underground.

[0071] Example 2

[0072] Based on the same inventive concept as the camera adaptive focusing method for intelligent video analysis for mining in the aforementioned embodiment, the embodiment of the present application provides a camera adaptive focusing system for intelligent video analysis for mining, the system comprising:

[0073] The acquisition module collects the video stream of each scene in the mine in real time through at least one mining intrinsically safe camera, extracts frames from the video stream, and obtains several frames of images

[0074] The target detection module inputs all images into the target detection model to obtain the target detection results;

[0075] A first calculation module calculates a deviation feedback value based on the target detection result, and compares the deviation feedback value with a threshold;

[0076] If the deviation feedback value is equal to the threshold, it is determined that the current focal length of the mining intrinsically safe camera meets the requirement;

[0077] Otherwise, proceed to the next step;

[0078] The second calculation module calculates the adjustment amount of the camera focal length based on the deviation feedback value and the focus control formula.

[0079] The control module outputs the adjustment amount of the camera focal length to the camera to achieve adaptive adjustment of the camera focal length.

[0080] In the embodiment, the calculation formula of the deviation feedback value is:

[0081] feedback=α·|pp target |+β|ss target |

[0082] Among them, α is the target proportion weight, β is the target confidence weight, p is the current target proportion, and p target is the ideal ratio, s is the current target confidence, s target is the ideal confidence level.

[0083] In an embodiment, the calculation formula of the focus control formula is:

[0084]

[0085] Where error = setpoint-feedback, setpoint is the threshold, K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient.

[0086] The foregoing Figure 1The various variations and specific examples of the camera adaptive focusing method for intelligent video analysis for mining in Example 1 are also applicable to the camera adaptive focusing system for intelligent video analysis for mining in this embodiment. Through the above detailed description of the camera adaptive focusing method for intelligent video analysis for mining, those skilled in the art can clearly know the implementation method of the camera adaptive focusing system for intelligent video analysis for mining in this embodiment. Therefore, for the sake of brevity of the specification, it will not be described in detail here.

[0087] Example 3

[0088] An embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement a camera adaptive focusing method for intelligent video analysis for mining as provided in the above method embodiment.

[0089] Figure 3 The hardware structure diagram of a device for implementing a method for adaptive focusing of a camera for intelligent video analysis for mining provided in an embodiment of the present application is shown. The device may participate in or include the apparatus or system provided in an embodiment of the present application. Figure 3 As shown, the computer device 10 may include one or more processors 1002 (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1004 for storing data, and a transmission device 1006 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 3 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown.

[0090] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer device 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0091] The memory 1004 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the camera adaptive focusing method of a mining intelligent video analysis in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 1004, that is, implementing the above-mentioned method. The memory 1004 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1004 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0092] The transmission device 1006 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer device 10. In one example, the transmission device 1006 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 1006 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0093] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer device 10 (or mobile device).

[0094] Example 4

[0095] An embodiment of the present application also provides a computer-readable storage medium, which can be set in a server to store at least one instruction or at least one program related to a camera adaptive focusing method for intelligent video analysis for mining in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement a camera adaptive focusing method for intelligent video analysis for mining provided in the above method embodiment.

[0096] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0097] Example 5

[0098] The embodiment of the present invention further provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes a camera adaptive focusing method for intelligent video analysis for mining provided in the above various optional embodiments.

[0099] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of the present application are described. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0100] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0101] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0102] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.

Claims

1. A camera adaptive focusing method for intelligent video analysis for mining, characterized in that: The method comprises the following steps: S1, using at least one intrinsically safe camera for mining to collect video streams of various scenes underground in real time, extracting frames from the video streams, and obtaining a number of frames of images; S2, inputting the image into a target detection model to obtain a target detection result; S3, calculating a deviation feedback value based on the target detection result, and comparing the deviation feedback value with a threshold; If the deviation feedback value is equal to the threshold, it is determined that the current focal length of the mining intrinsically safe camera meets the requirement; Otherwise, proceed to the next step; S4, calculating the adjustment amount of the camera focal length according to a focus control formula based on the deviation feedback value; S5, outputting the adjustment amount of the camera focal length to the camera to achieve adaptive adjustment of the camera focal length.

2. The camera adaptive focusing method for mining intelligent video analysis according to claim 1, characterized in that: The calculation formula of the deviation feedback value is: feedback=a·|pp target |+β·|ss target | Among them, α is the target proportion weight, β is the target confidence weight, p is the current target proportion, and p target is the ideal ratio, s is the current target confidence, s target is the ideal confidence level.

3. The camera adaptive focusing method for mining intelligent video analysis according to claim 2, characterized in that: The calculation formula of the focus control formula is: Where error = setpoint-feedback, setpoint is the threshold, K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient.

4. The camera adaptive focusing method for mining intelligent video analysis according to claim 1, characterized in that: The target detection result includes the target object, the type of the target object, the confidence level of the target object, and the position coordinates of the target object.

5. The camera adaptive focusing method for mining intelligent video analysis according to claim 1, characterized in that: In step S3, the screen size is calculated based on the position coordinates of the target object, and the proportion of the target object in the image is obtained. The proportion of the target object in the image is the current target proportion.

6. A camera adaptive focusing system for intelligent video analysis for mining, characterized in that: The system comprises: An acquisition module (200) collects video streams of various scenes underground in real time through at least one intrinsically safe camera for mining, extracts frames from the video streams, and acquires a plurality of frames of images; A target detection module (201) inputs the image into a target detection model to obtain a target detection result; A first calculation module (202) calculates a deviation feedback value based on the target detection result, and compares the deviation feedback value with a threshold; If the deviation feedback value is equal to the threshold, it is determined that the current focal length of the mining intrinsically safe camera meets the requirement; Otherwise, proceed to the next step; A second calculation module (203) calculates the adjustment amount of the camera focal length based on the deviation feedback value and according to a focus control formula; The control module (204) outputs the adjustment amount of the camera focus to the camera to achieve adaptive adjustment of the camera focus.

7. The camera adaptive focusing system for intelligent video analysis for mining as claimed in claim 6, characterized in that: The calculation formula of the deviation feedback value is: feedback=a·|pp target |+β·|ss target | Among them, α is the target proportion weight, β is the target confidence weight, p is the current target proportion, and p target is the ideal ratio, s is the current target confidence, s target is the ideal confidence level.

8. The camera adaptive focusing system for intelligent video analysis for mining as claimed in claim 7, characterized in that: The calculation formula of the focus control formula is: Where error = setpoint-feedback, setpoint is the threshold, K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient.

9. A computer device, characterized in that: include: processor; A memory for storing executable instructions; Wherein, the processor is used to read the executable instructions from the memory and execute the executable instructions to implement the camera adaptive focusing method for intelligent video analysis for mining as described in any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the camera adaptive focusing method for intelligent video analysis for mining as described in any one of claims 1 to 5.