A method and device for superimposing text and pictures based on target recognition

By using the target detection model and position information verification method in the live broadcast task of the TV station, the problem of low image target recognition accuracy is solved, the reliability of subtitle overlay is improved, and higher timeliness and accuracy are achieved.

CN118138699BActive Publication Date: 2024-10-01CHINESE PEOPLES LIBERATION ARMY UNIT 92941
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410125878.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2023-12-04
Filing Date
2024-01-30
Publication Date
2024-10-01
Estimated Expiration
2044-01-30

AI Technical Summary

Technical Problem

The existing technology has low image target recognition accuracy in live broadcast tasks of TV stations, especially when the targets are blocked by obstacles, there are many targets with the same appearance, and new targets without recognition training appear, resulting in the timeliness and accuracy of subtitle overlay. Insufficient, affecting the reliability of live broadcast tasks.

Method used

The target detection model is used to identify the target in the video images captured in real time by each recording device, obtain location information and time information, determine whether the target is located within the image frame, and improve the recognition accuracy through location information verification, and load or delete the corresponding Picture and text subtitles.

Benefits of technology

It improves the accuracy of image target recognition, reduces the probability of subtitle loading errors caused by recognition errors, and enhances the reliability of overlaying image and text subtitles in live broadcast tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118138699B_ABST
    Figure CN118138699B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for overlaying text and subtitles based on target recognition. The method comprises: using a target detection model to perform target recognition on each channel of video images captured in real time by each camera device, and obtaining the target category and the position coordinates of the target in the image; obtaining the position information and time information of each camera device when capturing each frame of the image, wherein the position information comprises the position coordinates of the camera device, the azimuth and pitch angle of the optical axis, and the position coordinates of the target; judging whether the target is located within the image frame according to the position information, and if so, loading the corresponding text and subtitles; if not, deleting the corresponding text and subtitles. The present invention improves the accuracy of image target recognition and reduces the probability of text and subtitle loading errors caused by target recognition errors by adding a position information verification processing step.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of video playback, and in particular relates to a method and device for superimposing text and image subtitles based on target recognition. Background Art

[0002] Subtitles refer to non-visual content such as dialogues in television, film, and stage works displayed in text form. They also refer to text processed in the post-production of film and television works. In addition to subtitles, video signals can also be superimposed with graphics, videos, clocks, CG animations, and other information.

[0003] At present, there are mainly two working modes for subtitle overlay: one is the mainstream manual editing working mode, and the other is the subtitle overlay working mode based on image recognition technology. The manual editing working mode means that in the live broadcast task of the TV station, the operator makes one or more subtitle engineering files according to the pre-deduced plan and plan, loads each subtitle according to the activity sequence, event or planned task, and modifies the subtitle engineering file on the spot when necessary to complete the subtitle overlay on the multi-channel video signal. In the live broadcast task where the TV station has no plan, no deduction, and the content is uncontrollable, the timeliness and accuracy of subtitle insertion are not high. The subtitle overlay working mode based on image recognition technology uses computer vision technology to establish a training set of target images in advance, and generates a trained classifier model by selecting a suitable machine learning training algorithm to identify the target in the video image, and completes the subtitle overlay on the multi-channel video signal based on the recognition result. The real-time modification and tracking of the content and position of the subtitles can be realized in the live broadcast. This mode is limited by factors such as the versatility, timeliness, accuracy and hardware computing power requirements of current image recognition technology. It is still unable to accurately identify targets in images captured by multiple cameras in TV live broadcast tasks. For example, when the target in the image is partially blocked by obstacles, there are many targets to be identified and the appearance of multiple targets is consistent, or new targets that have not been trained for identification appear in the image, the target recognition accuracy is not high, which affects the reliability of superimposed text and subtitles in live broadcast tasks. Summary of the invention

[0004] In order to solve the above problems existing in the prior art, the present invention provides a method and device for overlaying text and image subtitles based on target recognition.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions.

[0006] In a first aspect, the present invention provides a method for superimposing text and image subtitles based on target recognition, comprising the following steps:

[0007] Use the target detection model to identify the target of each video image captured by each camera in real time, and obtain the target category and the position coordinates of the target in the image;

[0008] Acquire the position information and time information of each camera device when shooting each frame of image, wherein the position information includes the position coordinates of the camera device, the azimuth angle and pitch angle of the optical axis, and the position coordinates of the target;

[0009] It is determined whether the target is located within the image frame according to the position information, and if so, the corresponding graphic subtitle is loaded; if not, the corresponding graphic subtitle is deleted.

[0010] Furthermore, the method further includes a time information correction step, which is as follows:

[0011] The difference between the time information and Beijing time is calculated, and if the difference exceeds a set threshold, the time information is corrected to Beijing time.

[0012] Furthermore, the method further comprises a data alignment step, wherein the data comprises video image data and position information data, and the method is as follows:

[0013] Get the time information of the first frame of data of each channel within the set time;

[0014] Calculate the difference between any two time information;

[0015] Calculate the maximum time interval Δt that can divide all the differences;

[0016] The frame rate of each data channel is increased to 1 / Δt through linear interpolation.

[0017] Furthermore, the method further comprises a step of clearing invalid data, wherein the data comprises video image data and location information data, and the method is as follows:

[0018] The time interval between two adjacent frames of data in each data channel is calculated. If the time interval exceeds a set threshold, the stored data in this channel is cleared.

[0019] Further, judging whether the target is located within the image frame according to the position information includes:

[0020] Calculate the coordinates (E, N, U) of the target in the measurement coordinate system with the recording device as the origin;

[0021] Based on (E, N, U), calculate the azimuth angle α and the pitch angle β of the line connecting the target and the video recording device;

[0022] Calculate the differences between the azimuth angle α, the pitch angle β and the azimuth angle α0, the pitch angle β0 of the optical axis of the recording device: Δα=α-α0, Δβ=β-β0, and the absolute values ​​of Δα and Δβ are both less than 180 0 ;

[0023] If Δα≤L1 and Δβ≤L2, the target is located within the image frame, wherein L1 is half of the azimuth viewing angle of the recording device, and L2 is half of the elevation viewing angle of the recording device.

[0024] Furthermore, the formula for calculating the coordinates (E, N, U) of the target in the measurement coordinate system with the camera as the origin is as follows:

[0025] E=-(X-X0)×sinL+(Y-Y0)×cosL

[0026] N=-(X-X0)×sinB×cosL-(Y-Y0)×sinB×sinL+(Z-Z0)×cosB

[0027] U=(X-X0)×cosB×cosL+(Y-Y0)×cosB×sinL+(Z-Z0)×sinB

[0028] Wherein, (X, Y, Z) and (X0, Y0, Z0) are the coordinates of the geocentric space rectangular coordinate system of the target and the recording device, respectively, and L and B are the longitude and latitude coordinates of the geodetic rectangular coordinate system of the recording device, respectively.

[0029] Furthermore, the formula for calculating the azimuth angle α and the pitch angle β of the line connecting the target and the recording device is as follows:

[0030]

[0031]

[0032] In a second aspect, the present invention provides a device for superimposing text and image subtitles based on target recognition, comprising:

[0033] The target recognition module is used to use the target detection model to perform target recognition on each video image captured by each camera in real time, and obtain the target category and the position coordinates of the target in the image;

[0034] A position acquisition module, used to acquire the position information and time information of each camera device when shooting each frame of image, wherein the position information includes the position coordinates of the camera device, the azimuth angle and pitch angle of the optical axis, and the position coordinates of the target;

[0035] The subtitle loading module is used to determine whether the target is located within the image frame according to the position information, and if so, load the corresponding subtitle; if not, delete the corresponding subtitle.

[0036] Further, judging whether the target is located within the image frame according to the position information includes:

[0037] Calculate the coordinates (E, N, U) of the target in the measurement coordinate system with the recording device as the origin;

[0038] Based on (E, N, U), calculate the azimuth angle α and the pitch angle β of the line connecting the target and the video recording device;

[0039] Calculate the differences between the azimuth angle α, the pitch angle β and the azimuth angle α0, the pitch angle β0 of the optical axis of the recording device: Δα=α-α0, Δβ=β-β0, and the absolute values ​​of Δα and Δβ are both less than 180 0 ;

[0040] If Δα≤L1 and Δβ≤L2, the target is located within the image frame, wherein L1 is half of the azimuth viewing angle of the recording device, and L2 is half of the elevation viewing angle of the recording device.

[0041] Furthermore, the formula for calculating the coordinates (E, N, U) of the target in the measurement coordinate system with the camera as the origin is as follows:

[0042] E=-(X-X0)×sinL+(Y-Y0)×cosL

[0043] N=-(X-X0)×sinB×cosL-(Y-Y0)×sinB×sinL+(Z-Z0)×cosB

[0044] U=(X-X0)×cosB×cosL+(Y-Y0)×cosB×sinL+(Z-Z0)×sinB

[0045] Wherein, (X, Y, Z) and (X0, Y0, Z0) are the coordinates of the geocentric space rectangular coordinate system of the target and the recording device, respectively, and L and B are the longitude and latitude coordinates of the geodetic rectangular coordinate system of the recording device, respectively.

[0046] Compared with the prior art, the present invention has the following beneficial effects.

[0047] The present invention uses a target detection model to perform target recognition on each video image captured in real time by each camera device, obtains the target category and the position coordinates of the target in the image, obtains the position information and time information of each camera device when capturing each frame of the image, the position information includes the position coordinates of the camera device, the azimuth and pitch angle of the optical axis, and the position coordinates of the target, and determines whether the target is located within the image frame according to the position information. If so, load the corresponding graphic subtitles; otherwise, delete the corresponding graphic subtitles, thereby realizing the superposition of graphic subtitles based on target recognition. The present invention improves the accuracy of image target recognition by adding a position information verification processing step, and reduces the probability of graphic subtitle loading errors caused by target recognition errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 The present invention is a flowchart of a method for superimposing text and image subtitles based on target recognition according to an embodiment of the present invention.

[0049] Figure 2 It is a schematic diagram of the hardware architecture involved in the embodiment of the present invention.

[0050] Figure 3 The present invention is a block diagram of a device for superimposing text and graphic subtitles based on target recognition according to an embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present invention clearer and more understandable, the present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0052] Figure 1 The present invention is a flowchart of a method for superimposing text and image subtitles based on target recognition, which includes the following steps:

[0053] Step 101, using a target detection model to perform target recognition on each video image captured in real time by each video recording device, to obtain the target category and the position coordinates of the target in the image;

[0054] Step 102, obtaining the position information and time information of each camera device when shooting each frame of image, wherein the position information includes the position coordinates of the camera device, the azimuth angle and pitch angle of the optical axis, and the position coordinates of the target;

[0055] Step 103, judging whether the target is located in the image frame according to the position information, if so, loading the corresponding graphic subtitles; if not, deleting the corresponding graphic subtitles.

[0056] This embodiment provides a method for overlaying text and image subtitles based on target recognition. The hardware architecture diagram involved in the method is as follows: Figure 2As shown. The hardware architecture is mainly composed of a video recording device, an image recognition server, a subtitle information verification server and a multi-channel subtitle inserter. Among them, the video recording device has the function of real-time reading of state values ​​such as azimuth, pitch angle, focal length, etc., and provides indicator information such as equipment height, horizontal viewing angle, and vertical viewing angle. The base of the equipment is surveyed and mapped to provide geocentric coordinate information. The target has a real-time feedback function for positioning coordinates, and provides information such as the type, characteristics, and physical size of the target. The image recognition server has a target recognition processing function for the recorded image, and outputs information such as the category, coordinates within the frame, and confidence of the recognized target. The subtitle information verification server has the function of verifying the image recognition processing result in combination with the position information, determines the text and graphic subtitle content that should be superimposed on the video image at the current moment, and sends the information to the multi-channel subtitle inserter for subtitle superposition. The multi-channel subtitle inserter has the function of superimposing text and graphic subtitles on a single or multiple different channels at the same time. The method described in this embodiment includes steps 101 to 103.

[0057] In this embodiment, step 101 is mainly used to obtain target recognition results. In this embodiment, each video image captured by each video recording device in real time is input into a trained target detection model, and the model outputs a target recognition result. The target recognition result includes the target category and the position coordinates of the target in the image frame. The position coordinates of the target are generally represented by the center coordinates of the target detection frame. The target detection model can select an image target recognition open source model with good real-time performance (such as the YOLO series model). The target categories of this embodiment include aircraft, rotorcraft, automobile, ship, flame, tail smoke, light group, spot, parachute, person, etc.

[0058] In this embodiment, step 102 is mainly used to obtain position information. The position information includes the position coordinates of each camera device when shooting each frame of image, the azimuth and pitch angle of the optical axis, and the position coordinates of the target. The position coordinates of the camera device can adopt the coordinates of the geocentric space rectangular coordinate system (X, Y, Z) or the earth rectangular coordinate system (L, B, H), etc. The position coordinates of the target are obtained by the GPS or Beidou receiver set on the target, using the earth rectangular coordinate system coordinates (L, B, H). In order to align the data in time, it is also necessary to obtain the time information when the camera device shoots each frame of image, as well as the time information corresponding to the target position coordinate data.

[0059] In this embodiment, step 103 is mainly used for loading subtitles. In the prior art of subtitle loading, subtitles are automatically superimposed as long as the target appears in the image frame. In the live broadcast mission of a TV station, multiple video recording devices are often required to identify and track multiple targets at the same time. Because the distance between targets is sometimes close (such as a fleet of aircraft), the wrong target is often followed, that is, the target that appears in the image frame is not the target to be tracked. If the subtitles are directly superimposed without checking at this time, errors will definitely occur. For this reason, this embodiment is based on the position information of the video recording device and the target, and determines whether the target is within the image frame according to whether the target is within the viewing angle of the video recording device. If the result of the determination is that the target is within the image frame, the corresponding subtitles are loaded; otherwise, the corresponding subtitles are deleted.

[0060] As an optional embodiment, the method further includes a time information correction step, the method is as follows:

[0061] The difference between the time information and Beijing time is calculated, and if the difference exceeds a set threshold, the time information is corrected to Beijing time.

[0062] This embodiment provides a technical solution for correcting time information. This embodiment, including the following two embodiments, belongs to the data preprocessing step. This embodiment sets a threshold range of the error between the time information and Beijing time, calculates the difference between the time information in the newly received target and recording device data and Beijing time, and corrects the time information whose difference exceeds the threshold range to Beijing time. Correcting the time information can reduce the calculation error caused by the inconsistency of the clocks of various devices.

[0063] As an optional embodiment, the method further includes a data alignment step, the data includes video image data and position information data, and the method is as follows:

[0064] Get the time information of the first frame of data of each channel within the set time;

[0065] Calculate the difference between any two time information;

[0066] Calculate the maximum time interval Δt that can divide all the differences;

[0067] The frame rate of each data channel is increased to 1 / Δt through linear interpolation.

[0068] This embodiment provides a technical solution for aligning the time and frame rate of data. First, the time information of the first frame of each data channel within the set time (for example, 1 second) is obtained; then the difference between any two time information is calculated; next, the maximum time interval Δt that can divide all the differences is calculated, that is, the greatest common divisor of all the differences; finally, the frame rate of each data channel is increased to 1 / Δt through linear interpolation. After the above alignment operation, the interval between two adjacent frames of data in each data channel is reduced to Δt. Therefore, the synchronization error between any two data channels is less than Δt, thereby eliminating the impact caused by the misalignment of the time and frame rate of the data.

[0069] As an optional embodiment, the method further includes a step of clearing invalid data, wherein the data includes video image data and location information data, and the method is as follows:

[0070] The time interval between two adjacent frames of data in each data channel is calculated. If the time interval exceeds a set threshold, the stored data in this channel is cleared.

[0071] This embodiment provides a technical solution for clearing invalid data. This embodiment determines whether data interruption occurs by setting a maximum interval threshold between two adjacent frames of data. If the data interval of a certain data path exceeds the set threshold, it is considered that a communication failure has occurred, and the stored data is cleared to avoid calculation errors caused by poor communication links.

[0072] In addition to the data preprocessing methods given in the above three embodiments, the data cache capacity can also be set: according to the delay time of receiving the data and the time consumed by the program calculation, the maximum number of data storage frames is set. If exceeded, the first n frames of data of this data path are cleared (n is the number of frames of the excess data) to reduce unnecessary performance consumption of the program.

[0073] As an optional embodiment, judging whether the target is located within the image frame according to the position information includes:

[0074] Calculate the coordinates (E, N, U) of the target in the measurement coordinate system with the recording device as the origin;

[0075] Based on (E, N, U), calculate the azimuth angle α and the pitch angle β of the line connecting the target and the video recording device;

[0076] Calculate the differences between the azimuth angle α, the pitch angle β and the azimuth angle α0, the pitch angle β0 of the optical axis of the recording device: Δα=α-α0, Δβ=β-β0, and the absolute values ​​of Δα and Δβ are both less than 180 0 ;

[0077] If Δα≤L1 and Δβ≤L2, the target is located within the image frame, wherein L1 is half of the azimuth viewing angle of the recording device, and L2 is half of the elevation viewing angle of the recording device.

[0078] This embodiment provides a technical solution for determining whether a target is located within an image frame. The technical principle of this embodiment is: according to whether the angle between the line connecting the target and the recording device and the optical axis of the recording device in the azimuth and pitch directions exceeds half of the azimuth viewing angle and pitch viewing angle of the recording device, determine whether the target is located within the image frame; if neither exceeds, the target is located within the image frame; as long as one exceeds, the target is located outside the image frame. Therefore, the key to this embodiment is to calculate the difference Δα and Δβ between the azimuth angle α and pitch angle β of the line connecting the target and the recording device and the azimuth angle α0 and pitch angle β0 of the optical axis of the recording device. This embodiment first calculates the coordinates (E, N, U) of the target in the measurement coordinate system with the recording device as the origin, and then calculates the azimuth angle α and pitch angle β of the line connecting the target and the recording device based on (E, N, U), and finally obtains Δα and Δβ, and determines whether the target is located within the image frame based on whether Δα≤L1 and Δβ≤L2 are satisfied.

[0079] As an optional embodiment, the formula for calculating the coordinates (E, N, U) of the target in the measurement coordinate system with the video recording device as the origin is as follows:

[0080] E=-(X-X0)×sinL+(Y-Y0)×cosL

[0081] N=-(X-X0)×sinB×cosL-(Y-Y0)×sinB×sinL+(Z-Z0)×cosB

[0082] U=(X-X0)×cosB×cosL+(Y-Y0)×cosB×sinL+(Z-Z0)×sinB

[0083] Wherein, (X, Y, Z) and (X0, Y0, Z0) are the coordinates of the geocentric space rectangular coordinate system of the target and the recording device, respectively, and L and B are the longitude and latitude coordinates of the geodetic rectangular coordinate system of the recording device, respectively.

[0084] The present embodiment provides a technical solution for calculating the coordinates (E, N, U) of the target in the measurement coordinate system with the video recording device as the origin. The measurement coordinate system is a station-centered coordinate system, which is a coordinate system with the center of the measuring device as the coordinate origin, and is mainly used to describe the movement of the target relative to the measuring device. The measurement coordinate system is generally divided into two types: a vertical measurement coordinate system and a normal measurement coordinate system. The vertical measurement coordinate system is generally applicable to angle measuring equipment based on the plumb line and the earth's level surface, while the normal measurement coordinate system is a coordinate system based on the normal line and the level surface of the earth's ellipsoid, and is generally applicable to non-angle measuring measuring equipment. In the present embodiment, the measuring device is a video recording device, and it is easy to obtain the calculation formula for the coordinates (E, N, U) of the target in the measurement coordinate system with the video recording device as the origin based on geometric knowledge, as shown in the three formulas above.

[0085] As an optional embodiment, the formula for calculating the azimuth angle α and the pitch angle β of the line connecting the target and the video recording device is as follows:

[0086]

[0087]

[0088] This embodiment provides a technical solution for calculating the azimuth angle α and the pitch angle β of the line connecting the target and the recording device. This embodiment calculates α and β based on the geometric relationship between the coordinates (E, N, U) of the target in the measurement coordinate system with the recording device as the origin and the horizontal plane and the north direction. The specific calculation formulas are shown in the above two formulas.

[0089] Figure 3 The present invention is a schematic diagram of a device for superimposing text and image subtitles based on target recognition according to an embodiment of the present invention, wherein the device comprises:

[0090] The target recognition module 11 is used to use the target detection model to perform target recognition on each video image captured by each video recording device in real time, and obtain the target category and the position coordinates of the target in the image;

[0091] A position acquisition module 12 is used to acquire the position information and time information of each camera device when shooting each frame of image, wherein the position information includes the position coordinates of the camera device, the azimuth angle and pitch angle of the optical axis, and the position coordinates of the target;

[0092] The subtitle loading module 13 is used to determine whether the target is located within the image frame according to the position information, and if so, load the corresponding subtitle; if not, delete the corresponding subtitle.

[0093] The device of this embodiment can be used to perform Figure 1 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be described in detail here. The same is true for the following embodiments, which will not be described in detail.

[0094] As an optional embodiment, judging whether the target is located within the image frame according to the position information includes:

[0095] Calculate the coordinates (E, N, U) of the target in the measurement coordinate system with the recording device as the origin;

[0096] Based on (E, N, U), calculate the azimuth angle α and the pitch angle β of the line connecting the target and the video recording device;

[0097] Calculate the differences between the azimuth angle α, the pitch angle β and the azimuth angle α0, the pitch angle β0 of the optical axis of the recording device: Δα=α-α0, Δβ=β-β0, and the absolute values ​​of Δα and Δβ are both less than 180 0 ;

[0098] If Δα≤L1 and Δβ≤L2, the target is located within the image frame, wherein L1 is half of the azimuth viewing angle of the recording device, and L2 is half of the elevation viewing angle of the recording device.

[0099] As an optional embodiment, the formula for calculating the coordinates (E, N, U) of the target in the measurement coordinate system with the video recording device as the origin is as follows:

[0100] E=-(X-X0)×sinL+(Y-Y0)×cosL

[0101] N=-(X-X0)×sinB×cosL-(Y-Y0)×sinB×sinL+(Z-Z0)×cosB

[0102] U=(X-X0)×cosB×cosL+(Y-Y0)×cosB×sinL+(Z-Z0)×sinB

[0103] Wherein, (X, Y, Z) and (X0, Y0, Z0) are the coordinates of the geocentric space rectangular coordinate system of the target and the recording device, respectively, and L and B are the longitude and latitude coordinates of the geodetic rectangular coordinate system of the recording device, respectively.

[0104] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for superimposing text and image subtitles based on target recognition, characterized in that: The following steps are involved: Use the target detection model to identify the target of each video image captured by each camera in real time, and obtain the target category and the position coordinates of the target in the image; Acquire the position information and time information of each camera device when shooting each frame of image, wherein the position information includes the position coordinates of the camera device, the azimuth angle and pitch angle of the optical axis, and the position coordinates of the target; Determine whether the target is located within the image frame according to the position information, and if so, load the corresponding graphic subtitles; If not, delete the corresponding subtitles; The determining whether the target is located within the image frame according to the position information includes: Calculate the coordinates (E, N, U) of the target in the measurement coordinate system with the recording device as the origin; Based on (E, N, U), calculate the azimuth angle α and the pitch angle β of the line connecting the target and the video recording device; Calculate the differences between the azimuth angle α, the pitch angle β and the azimuth angle α0, the pitch angle β0 of the optical axis of the recording device: Δα=α-α0, Δβ=β-β0, and the absolute values ​​of Δα and Δβ are both less than 180 0 ; If Δα≤L1 and Δβ≤L2, the target is located within the image frame, wherein L1 is half of the azimuth viewing angle of the recording device, and L2 is half of the elevation viewing angle of the recording device.

2. The method for superimposing text and image subtitles based on target recognition according to claim 1, characterized in that: The method further comprises a time information correction step, which is as follows: The difference between the time information and Beijing time is calculated, and if the difference exceeds a set threshold, the time information is corrected to Beijing time.

3. The method for superimposing text and image subtitles based on target recognition according to claim 1, characterized in that: The method further comprises a data alignment step, wherein the data comprises video image data and position information data, and the method is as follows: Get the time information of the first frame of data of each channel within the set time; Calculate the difference between any two time information; Calculate the maximum time interval Δt that can divide all the differences; The frame rate of each data channel is increased to 1 / Δt through linear interpolation.

4. The method for superimposing text and image subtitles based on target recognition according to claim 1, characterized in that: The method further comprises a step of clearing invalid data, wherein the data comprises video image data and location information data, and the method is as follows: The time interval between two adjacent frames of data in each data channel is calculated. If the time interval exceeds a set threshold, the stored data in this channel is cleared.

5. The method for superimposing text and image subtitles based on target recognition according to claim 1, characterized in that: The formula for calculating the coordinates (E, N, U) of the target in the measurement coordinate system with the recording device as the origin is as follows: E=-(X-X0)×sinL+(Y-Y0)×cosL N=-(X-X0)×sinB×cosL-(Y-Y0)×sinB×sinL+(Z-Z0)×cosB U=(X-X0)×cosB×cosL+(Y-Y0)×cosB×sinL+(Z-Z0)×sinB Wherein, (X, Y, Z) and (X0, Y0, Z0) are the coordinates of the geocentric space rectangular coordinate system of the target and the recording device, respectively, and L and B are the longitude and latitude coordinates of the geodetic rectangular coordinate system of the recording device, respectively.

6. The method for superimposing text and image subtitles based on target recognition according to claim 5, characterized in that: The formula for calculating the azimuth angle α and the pitch angle β of the line connecting the target and the recording device is as follows:

7. A device for superimposing text and pictures based on target recognition, characterized in that: include: The target recognition module is used to use the target detection model to perform target recognition on each video image captured by each camera in real time, and obtain the target category and the position coordinates of the target in the image; A position acquisition module, used to acquire the position information and time information of each camera device when shooting each frame of image, wherein the position information includes the position coordinates of the camera device, the azimuth angle and pitch angle of the optical axis, and the position coordinates of the target; A subtitle loading module, used for judging whether the target is located within the image frame according to the position information, and if so, loading the corresponding subtitle; If not, delete the corresponding subtitles; The determining whether the target is located within the image frame according to the position information includes: Calculate the coordinates (E, N, U) of the target in the measurement coordinate system with the recording device as the origin; Based on (E, N, U), calculate the azimuth angle α and the pitch angle β of the line connecting the target and the video recording device; Calculate the differences between the azimuth angle α, the pitch angle β and the azimuth angle α0, the pitch angle β0 of the optical axis of the recording device: Δα=α-α0, Δβ=β-β0, and the absolute values ​​of Δα and Δβ are both less than 180 0 ; If Δα≤L1 and Δβ≤L2, the target is located within the image frame, wherein L1 is half of the azimuth viewing angle of the recording device, and L2 is half of the elevation viewing angle of the recording device.

8. The device for superimposing text and image subtitles based on target recognition according to claim 7, characterized in that: The formula for calculating the coordinates (E, N, U) of the target in the measurement coordinate system with the recording device as the origin is as follows: E=-(X-X0)×sinL+(Y-Y0)×cosL N=-(X-X0)×sinB×cosL-(Y-Y0)×sinB×sinL+(Z-Z0)×cosB U=(X-X0)×cosB×cosL+(Y-Y0)×cosB×sinL+(Z-Z0)×sinB Wherein, (X, Y, Z) and (X0, Y0, Z0) are the coordinates of the geocentric space rectangular coordinate system of the target and the recording device, respectively, and L and B are the longitude and latitude coordinates of the geodetic rectangular coordinate system of the recording device, respectively.