Image data recording method, image data recording device, interrogation host and storage medium

文档序号:1601605 发布日期:2020-01-07 浏览:19次 中文

阅读说明:本技术 图像数据录制方法、装置、审讯主机及存储介质 (Image data recording method, image data recording device, interrogation host and storage medium ) 是由 邵占 马强 王军 于 2018-06-28 设计创作,主要内容包括:本发明实施例提供了图像数据录制方法、装置、审讯主机及存储介质,应用于视频数据采集技术领域,该图像数据录制方法包括:获取录制现场中指定目标主体的生命体征数据,获取录制现场的视频数据;在预先生成的透明画布中选取目标区域;在目标区域中,按照生命体征数据绘制生命体征波形图;将包含生命体征波形图的透明画布叠加到视频数据的当前待处理视频帧中,得到叠加生命体征波形的视频帧。本发明实施例的图像数据录制方法,录制的视频数据中包含指定目标主体的生命体征波形图,可以丰富审讯主机录制图像数据的形式,满足用户的多种录制需求。(The embodiment of the invention provides an image data recording method, an image data recording device, an interrogation host and a storage medium, which are applied to the technical field of video data acquisition, wherein the image data recording method comprises the following steps: acquiring vital sign data of a specified target main body in a recording site, and acquiring video data of the recording site; selecting a target area from a pre-generated transparent canvas; in the target area, drawing a vital sign oscillogram according to the vital sign data; and overlapping the transparent canvas containing the vital sign oscillogram to the current video frame to be processed of the video data to obtain the video frame overlapped with the vital sign waveform. According to the image data recording method provided by the embodiment of the invention, the recorded video data comprises the vital sign oscillogram of the specified target main body, so that the form of recording the image data by the interrogation host can be enriched, and various recording requirements of users are met.)

1. A method for recording video data, the method comprising:

acquiring vital sign data of a specified target main body in a recording site, and acquiring video data of the recording site;

selecting a target area from a pre-generated transparent canvas, wherein each position in the transparent canvas and each position in a video frame of the video data are mapped with each other;

drawing a vital sign oscillogram in the target area according to the vital sign data;

and overlapping the transparent canvas containing the vital sign oscillogram onto the current video frame to be processed of the video data to obtain the video frame overlapped with the vital sign waveform.

2. The method of claim 1, wherein the step of pre-generating a transparent canvas comprises:

acquiring the resolution of a video frame in the video data;

and generating the transparent canvas with the same resolution according to the resolution of the video frame in the video data.

3. The method of claim 1, wherein said obtaining video data of said recorded scene comprises:

periodically acquiring the latest received video frame in the video data of the recording site;

the method further comprises the following steps:

judging whether the latest received video frame acquired in the period is the same as the video frame acquired in the previous period;

if the latest received video frame acquired in the period is the same as the video frame acquired in the previous period, waiting for the video frame to be acquired again in the next period;

the selecting a target area from the pre-generated transparent canvas comprises:

if the latest received video frame acquired in the period is not the same as the video frame acquired in the previous period, taking the latest received video frame acquired in the period as the current video frame to be processed, and selecting a target area from a pre-generated transparent canvas.

4. The method according to claim 1, wherein overlaying a transparent canvas containing the vital sign waveform map onto a current to-be-processed video frame of the video data to obtain a video frame with a vital sign waveform overlaid thereon comprises:

and superposing a target area in the transparent canvas to a corresponding position of a current video frame to be processed of the video data to obtain a video frame superposed with a vital sign waveform, wherein the target area comprises the vital sign waveform diagram, and the corresponding position of the current video frame to be processed is a position in the current video frame to be processed, which is mutually mapped with the target area.

5. The method according to claim 4, wherein said mapping vital sign waveforms according to said vital sign data in said target region comprises:

judging whether the target area contains a oscillogram or not;

if the target area contains the oscillogram, clearing the oscillogram in the target area, and drawing a vital sign oscillogram in the target area according to the vital sign data;

and if the target region does not contain the oscillogram, drawing the vital sign oscillogram in the target region according to the vital sign data.

6. An apparatus for recording video data, the apparatus comprising:

the data acquisition module is used for acquiring vital sign data of a specified target main body in a recording site and acquiring video data of the recording site;

the region selection module is used for selecting a target region from a pre-generated transparent canvas, wherein each position in the transparent canvas is mapped with each position in a video frame of the video data;

the oscillogram drawing module is used for drawing a vital sign oscillogram in the target area according to the vital sign data;

and the video frame recording module is used for overlaying the transparent canvas containing the vital sign oscillogram onto the current video frame to be processed of the video data to obtain the video frame overlaid with the vital sign waveform.

7. The apparatus of claim 6, further comprising:

the resolution determining module is used for acquiring the resolution of a video frame in the video data;

and the transparent canvas generation module is used for generating transparent canvas with the same resolution according to the resolution of the video frame in the video data.

8. The apparatus of claim 6, wherein the data acquisition module comprises:

the physical sign data acquisition submodule is used for acquiring the physical sign data of a specified target main body in a recording site;

the video data acquisition submodule is used for periodically acquiring the latest received video frame in the video data of the recording site;

the device further comprises:

the video frame judging module is used for judging whether the latest received video frame acquired in the period is the same as the video frame acquired in the previous period or not;

the sleep waiting module is used for waiting for the next period to acquire the video frame again if the latest received video frame acquired in the period is the same as the video frame acquired in the previous period;

the region selection module is specifically configured to:

if the latest received video frame acquired in the period is not the same as the video frame acquired in the previous period, taking the latest received video frame acquired in the period as the current video frame to be processed, and selecting a target area from a pre-generated transparent canvas.

9. The apparatus of claim 6, wherein the video frame recording module is specifically configured to:

and superposing a target area in the transparent canvas to a corresponding position of a current video frame to be processed of the video data to obtain a video frame superposed with a vital sign waveform, wherein the target area comprises the vital sign waveform diagram, and the corresponding position of the current video frame to be processed is a position in the current video frame to be processed, which is mutually mapped with the target area.

10. The apparatus of claim 9, wherein the waveform drawing module comprises:

the figure judges the submodule, is used for judging whether to include the oscillogram in the said target area;

the first drawing submodule is used for clearing the oscillogram in the target area if the target area contains the oscillogram, and drawing a vital sign oscillogram in the target area according to the vital sign data;

and the second drawing submodule is used for drawing a vital sign waveform diagram according to the vital sign data in the target area if the target area does not contain the waveform diagram.

11. The interrogation host is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;

the memory is used for storing a computer program;

the processor, when executing the program stored in the memory, implementing the method steps of any of claims 1-5.

12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-5.

Technical Field

The invention relates to the technical field of video data acquisition, in particular to an image data recording method, an image data recording device, an interrogation host and a storage medium.

Background

The interrogation host is a special high-definition digital hard disk video recorder for interrogation, and can record video data of an interrogation field. The interrogation host can access VGA (Video Graphics Array)/HDMI (high definition Multimedia Interface) signals, SDI (serial digital Interface) or standard definition monitoring Camera, remote audit IPC (Internet Protocol Camera), and can access a microphone, Line _ in (Line input) and analog audio input. The trial host can simultaneously realize the picture-in-picture function and the sound mixing function, and can provide VGA/HDMI and LCD screen output.

Disclosure of Invention

The embodiment of the invention aims to provide an image data recording method, an image data recording device, an interrogation host and a storage medium, so as to enrich the form of recording image data by the interrogation host. The specific technical scheme is as follows:

in a first aspect, an embodiment of the present invention provides a method for recording video data, where the method includes:

acquiring vital sign data of a specified target main body in a recording site, and acquiring video data of the recording site;

selecting a target area from a pre-generated transparent canvas, wherein each position in the transparent canvas and each position in a video frame of the video data are mapped with each other;

drawing a vital sign oscillogram in the target area according to the vital sign data;

and overlapping the transparent canvas containing the vital sign oscillogram onto the current video frame to be processed of the video data to obtain the video frame overlapped with the vital sign waveform.

Optionally, in the video data recording method according to the embodiment of the present invention, the step of generating the transparent canvas in advance includes:

acquiring the resolution of a video frame in the video data;

and generating the transparent canvas with the same resolution according to the resolution of the video frame in the video data.

Optionally, the acquiring the video data of the recording site includes:

periodically acquiring the latest received video frame in the video data of the recording site;

the video data recording method further comprises:

judging whether the latest received video frame acquired in the period is the same as the video frame acquired in the previous period;

if the latest received video frame acquired in the period is the same as the video frame acquired in the previous period, waiting for the video frame to be acquired again in the next period;

the selecting a target area from the pre-generated transparent canvas comprises:

if the latest received video frame acquired in the period is not the same as the video frame acquired in the previous period, taking the latest received video frame acquired in the period as the current video frame to be processed, and selecting a target area from a pre-generated transparent canvas.

Optionally, the overlaying the transparent canvas containing the vital sign oscillogram onto the current to-be-processed video frame of the video data to obtain the video frame overlaid with the vital sign waveform includes:

and superposing a target area in the transparent canvas to a corresponding position of a current video frame to be processed of the video data to obtain a video frame superposed with a vital sign waveform, wherein the target area comprises the vital sign waveform diagram, and the corresponding position of the current video frame to be processed is a position in the current video frame to be processed, which is mutually mapped with the target area.

Optionally, the drawing, in the target region, a vital sign oscillogram according to the vital sign data includes:

judging whether the target area contains a oscillogram or not;

if the target area contains the oscillogram, clearing the oscillogram in the target area, and drawing a vital sign oscillogram in the target area according to the vital sign data;

and if the target region does not contain the oscillogram, drawing the vital sign oscillogram in the target region according to the vital sign data.

In a second aspect, an embodiment of the present invention provides a video data recording apparatus, where the apparatus includes:

the data acquisition module is used for acquiring vital sign data of a specified target main body in a recording site and acquiring video data of the recording site;

the region selection module is used for selecting a target region from a pre-generated transparent canvas, wherein each position in the transparent canvas is mapped with each position in a video frame of the video data;

the oscillogram drawing module is used for drawing a vital sign oscillogram in the target area according to the vital sign data;

and the video frame recording module is used for overlaying the transparent canvas containing the vital sign oscillogram onto the current video frame to be processed of the video data to obtain the video frame overlaid with the vital sign waveform.

Optionally, the video data recording apparatus according to the embodiment of the present invention further includes:

the resolution determining module is used for acquiring the resolution of a video frame in the video data;

and the transparent canvas generation module is used for generating transparent canvas with the same resolution according to the resolution of the video frame in the video data.

Optionally, the data obtaining module includes:

the physical sign data acquisition submodule is used for acquiring the physical sign data of a specified target main body in a recording site;

the video data acquisition submodule is used for periodically acquiring the latest received video frame in the video data of the recording site;

the video data recording apparatus of the embodiment of the present invention further includes:

the video frame judging module is used for judging whether the latest received video frame acquired in the period is the same as the video frame acquired in the previous period or not;

the sleep waiting module is used for waiting for the next period to acquire the video frame again if the latest received video frame acquired in the period is the same as the video frame acquired in the previous period;

the region selection module is specifically configured to:

if the latest received video frame acquired in the period is not the same as the video frame acquired in the previous period, taking the latest received video frame acquired in the period as the current video frame to be processed, and selecting a target area from a pre-generated transparent canvas.

Optionally, the video frame recording module is specifically configured to:

and superposing a target area in the transparent canvas to a corresponding position of a current video frame to be processed of the video data to obtain a video frame superposed with a vital sign waveform, wherein the target area comprises the vital sign waveform diagram, and the corresponding position of the current video frame to be processed is a position in the current video frame to be processed, which is mutually mapped with the target area.

Optionally, the waveform drawing module includes:

the figure judges the submodule, is used for judging whether to include the oscillogram in the said target area;

the first drawing submodule is used for clearing the oscillogram in the target area if the target area contains the oscillogram, and drawing a vital sign oscillogram in the target area according to the vital sign data;

and the second drawing submodule is used for drawing a vital sign waveform diagram according to the vital sign data in the target area if the target area does not contain the waveform diagram.

In a third aspect, an embodiment of the present invention provides an interrogation host, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;

the memory is used for storing a computer program;

the processor is configured to implement the video data recording method according to any one of the first aspect described above when executing the program stored in the memory.

In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method for recording video data according to any one of the first aspect is implemented.

According to the image data recording method and device, the interrogation host and the storage medium, vital sign data of a specified target main body in a recording site are obtained, and video data of the recording site are obtained; selecting a target area from a pre-generated transparent canvas; in the target area, drawing a vital sign oscillogram according to the vital sign data; and overlapping the transparent canvas containing the vital sign oscillogram to the current video frame to be processed of the video data to obtain the video frame overlapped with the vital sign waveform. The recorded video data comprises a vital sign oscillogram of a specified target main body, so that the form of recording image data by the interrogation host can be enriched, and various recording requirements of users are met. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.

Fig. 1 is a first flowchart of a video data recording method according to an embodiment of the present invention;

fig. 2a is a first schematic diagram of selecting a target area in a video data recording method according to an embodiment of the present invention;

fig. 2b is a second schematic diagram of selecting a target area in the video data recording method according to the embodiment of the present invention;

fig. 2c is a schematic diagram of a video data recording method according to an embodiment of the present invention, in which a transparent canvas and a video frame are superimposed;

fig. 3 is a schematic flowchart of a video data recording method according to an embodiment of the invention;

fig. 4 is a third flowchart illustrating a video data recording method according to an embodiment of the invention;

FIG. 5 is a schematic diagram of a video data recording apparatus according to an embodiment of the present invention;

fig. 6 is a schematic diagram of an interrogation host according to an embodiment of the invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

The interrogation host is used for recording video data of an interrogation field, and the inventor finds that the recorded video data is added with the vital sign data of an inquired person, so that the change of factors such as emotion and the like of the inquired person in the interrogation process can be helped to be known, for example, heartbeat acceleration and the like can occur when the inquired person lies, and the analysis is facilitated.

Accordingly, an embodiment of the present invention provides a video data recording method, and referring to fig. 1, the method includes:

s101, obtaining vital sign data of a specified target subject in a recording site, and obtaining video data of the recording site.

The video data recording method in the embodiment of the invention can be realized by a recording system, and the recording system is any system capable of realizing the video data recording method in the embodiment of the invention. For example:

the recording system may be an apparatus comprising: a processor, a memory, a communication interface, and a bus; the processor, the memory and the communication interface are connected through a bus and complete mutual communication; the memory stores executable program code; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, for executing the video data recording method of the embodiment of the present invention.

Optionally, the video data recording method provided by the embodiment of the invention is applied to an interrogation host. Therefore, the recording system may be an interrogation host.

The recording system may also be an application program for executing the video data recording method according to the embodiment of the present invention when running.

The recording system may also be a storage medium for storing executable code for performing the video data recording method of the embodiments of the present invention.

The recording system acquires vital sign data of a specified target subject in a recording site, and acquires video data of the recording site. For example, the recording system obtains vital sign data of a specified target subject by recording a live vital sign meter. And acquiring vital sign data of the specified target subject by using the vital sign instrument in a direct wearing mode or an infrared remote sensing mode and the like. The vital sign data is data representing the vital signs of a specified target subject, and may include data of body temperature, respiration, blood pressure, heart rate, blood oxygen, pupil size, and the like. The recording system obtains video data of a recording site through the image acquisition equipment.

S102, selecting a target area from a pre-generated transparent canvas, wherein each position in the transparent canvas is mapped with each position in a video frame of the video data.

The recording system may select a target area in a pre-generated transparent canvas according to the area setting. For example, setting an area with the size of one sixth of the whole size of the transparent canvas at the upper right corner of the transparent canvas as a target area; or setting the central resolution of the transparent canvas to be 320 multiplied by 240 as the target area.

The recording system can also select a target area from a pre-generated transparent canvas according to a current video frame to be processed of the video data. For example, the area in the current video frame to be processed for displaying the oscillogram is determined and mapped into the transparent canvas as the target area in the transparent canvas.

Optionally, the selecting a target area from the pre-generated transparent canvas includes:

determining an area for displaying a oscillogram in a video frame of video data to obtain a oscillogram display area;

the waveform image display area may be a preset area, for example, the waveform image display area is an area with a resolution of 160 × 120 in the upper left corner of the video frame, or the waveform image display area is an area with a size of one ninth of the entire size of the video frame in the upper right corner of the video frame. The waveform diagram display area may also be determined according to an instruction input by a user, for example, a window for displaying the waveform diagram is displayed on the screen, and the user selects a position of the window for displaying the waveform diagram and adjusts the size of the window by using a mouse, a keyboard, or a touch screen.

Determining an area for displaying the oscillogram in a current video frame to be processed of the video data in the oscillogram display area as an area to be mapped;

the oscillogram display area is the whole area for displaying the oscillogram in the video data, for example, the area a in fig. 2 a; the mapping area is a specific position in the current video frame to be processed for displaying the waveform map, for example, area B in fig. 2 a.

Determining an area for displaying a waveform image in a current video frame to be processed of video data, after the recording of the current video frame to be processed is finished, advancing a horizontal coordinate in the display area of the waveform image, determining an area for displaying the waveform image in a next video frame of the current video frame to be processed, bearing the picture of the current video frame to be processed, and utilizing the continuous characteristic of the video frames, the actual looking effect is like that of an actual electrocardiogram, and a cursor is continuously advanced forward.

As shown in fig. 2b, the oscillogram display area may be divided into a designated number of partitions, and the partitions are sequentially selected according to a preset sequence as the areas to be mapped of the corresponding video frames. For example, a partition corresponding to an nth frame of video frame in the video data is partition 2, a partition corresponding to an N +1 th frame of video frame is partition 3, a partition corresponding to an N +2 th frame of video frame is partition 4, and the like, where M and N are positive integers. When the video frames are continuously played, the effect of the real appearance is like that of the real electrocardiogram, which is repeatedly jumped.

And step three, selecting an area mapped with the area to be mapped in the transparent canvas as a target area according to the position mapping relation between the transparent canvas and the video frame in the video data.

Optionally, the selecting a target area from the pre-generated transparent canvas includes:

step one, identifying an area where the specified target main body is located in a current video frame to be processed of the video data;

mapping the area where the specified target main body is located to a pre-generated transparent canvas to obtain a mapping area;

and thirdly, selecting a target area from the areas except the mapping area in the transparent canvas.

The target area is selected in the area outside the mapping area, so that the condition that the vital sign oscillogram shields the designated target main body due to the fact that the transparent canvas is overlapped in the current video frame to be processed can be reduced.

The locations in the transparent canvas are mapped to locations in the video frames of the video data. For example, the resolution of the transparent canvas is 800 × 600, the resolution of the video frame in the video data is 1600 × 1200, the position (Wide ═ 400, High ═ 300) in the transparent canvas and the position (Wide ═ 800, High ═ 600) of the video frame in the video data are mapped to each other, the position (Wide ═ 120, High ═ 160) in the transparent canvas and the position (Wide ═ 240, High ═ 320) of the video frame in the video data are mapped to each other, and the position (Wide ═ 300, High ═ 300) in the transparent canvas and the position (Wide ═ 600, High ═ 600) of the video frame in the video data are mapped to each other. Of course, in the embodiment of the present invention, the resolution of the transparent picture and the resolution of the video frame in the video data may be set to be the same, and the positions of the same pixels of the transparent picture and the video frame are mapped to each other.

And S103, drawing a vital sign oscillogram in the target area according to the vital sign data.

And the recording system draws a vital sign oscillogram in the target area according to the vital sign data. For example, a coordinate system is established in the target area, the recording system converts the vital sign data into coordinate points in the coordinate system of the target area, and the coordinate points are sequentially connected to complete the drawing of the vital sign oscillogram.

And S104, overlaying the transparent canvas containing the vital sign oscillogram onto the current video frame to be processed of the video data to obtain the video frame overlaid with the vital sign waveform.

The recording system superimposes the transparent canvas on which the vital sign oscillogram is drawn onto the current video frame to be processed of the video data, for example, the recording system superimposes all the transparent canvas onto the current video frame to be processed, or the recording system superimposes a partial region in the transparent canvas containing the vital sign oscillogram onto the current video frame to be processed, so as to obtain the video frame on which the vital sign waveform is superimposed, so as to complete recording of the current video frame to be processed of the video data, for example, as shown in fig. 2 c. The recording method is adopted for each frame of video in the video data, so that the recording of the video data is completed. The video frame with the superposed vital sign waveform can be sent to be encoded, local preview or remote preview is carried out, and the storage and preview of the video data are finished.

Optionally, if the resolution of the transparent canvas is different from the resolution of the current video frame to be processed, the recording system adjusts the resolution of the transparent canvas to the resolution of the current video frame to be processed, and then superimposes the transparent canvas containing the vital sign oscillogram on the current video frame to be processed of the video data, so as to obtain the video frame on which the vital sign waveform is superimposed.

In the embodiment of the invention, the vital sign oscillogram of the specified target main body is drawn in the target area of the transparent canvas, the transparent canvas is superposed on the video frame of the video data, and the recorded video data comprises the vital sign oscillogram of the specified target main body, so that the form of recording image data by the interrogation host can be enriched, and various recording requirements of users can be met.

Optionally, the step of pre-generating the transparent canvas includes:

step one, acquiring the resolution of a video frame in the video data;

and step two, generating transparent canvas with the same resolution according to the resolution of the video frame in the video data.

For example, the resolution of the video frame in the acquired video data is 1920 × 1080, and the resolution of the transparent canvas is 1920 × 1080 as well.

In the embodiment of the invention, the resolution ratio of the transparent canvas is the same as the resolution ratio of the video frame in the video data, so that the transparent canvas is convenient to be superposed on the video frame in the following process.

Optionally, the acquiring the video data of the recording site includes:

and periodically acquiring the latest received video frame in the video data of the recorded scene.

Video data is based on video frames, and generally, when the frame rate of video data is lower than 15 frames/second, continuous motion video has a pause feeling, and common video frame rates include 25 frames/second, 30 frames/second, 50 frames/second, 60 frames/second, and the like.

The interrogation host keeps receiving the video frames in the video data, and the recording system periodically acquires the latest received video frames in the video data. The period can be set according to the frame rate of the video data, and it is required to ensure that each frame of video frame can be overlaid with the transparent canvas containing the vital sign oscillogram. For example, the period is set to 5 milliseconds.

Correspondingly, the video data recording method of the embodiment of the invention further comprises the following steps:

step one, judging whether the latest received video frame acquired in the period is the same as the video frame acquired in the previous period.

The recording system judges whether the latest received video frame acquired in the period is the same as the video frame acquired in the previous period of the recording system.

And step two, if the latest received video frame acquired in the period is the same as the video frame acquired in the previous period, waiting for the video frame to be acquired again in the next period.

If the latest received video frame acquired by the recording system in the current period is the same video frame as the video frame acquired by the recording system in the previous period, it is described that the video frame is recorded and the image of the transparent canvas containing the vital sign oscillogram is superimposed on the video frame, so that the video frame is not superimposed in the current period, but waits for the next period.

Correspondingly, the selecting the target area from the pre-generated transparent canvas includes:

if the latest received video frame acquired in the period is not the same as the video frame acquired in the previous period, taking the latest received video frame acquired in the period as the current video frame to be processed, and selecting a target area from a pre-generated transparent canvas.

If the latest received video frame acquired in the period is not the same as the video frame acquired in the previous period, the transparent canvas is not overlapped with the latest received video frame acquired in the period, the recording system takes the latest received video frame acquired in the period as the current video frame to be processed, and a target area is selected from the transparent canvas.

Optionally, the drawing a vital sign waveform diagram according to the vital sign data in the target region includes:

step one, judging whether the transparent canvas contains a oscillogram.

If the oscillogram is already drawn in the transparent canvas in the period before the period, the previously drawn oscillogram related to the vital sign data needs to be cleared first to facilitate drawing of a new oscillogram. When the overlapping mode that the whole transparent canvas is completely overlapped on the video frame is adopted, the recording system judges whether the transparent canvas contains the oscillogram or not.

And step two, if the transparent canvas comprises the oscillogram, clearing the oscillogram in the transparent canvas, and drawing the vital sign oscillogram in the target area according to the vital sign data.

And step three, if the transparent canvas does not contain the oscillogram, drawing a vital sign oscillogram in the target area according to the vital sign data.

In the embodiment of the invention, if the transparent canvas already contains the oscillogram, the oscillogram is cleared and then the vital sign oscillogram is drawn, so that the situation that the oscillogram is unclear or even can not be identified due to the superposition of the oscillograms can be prevented.

Optionally, the overlaying the transparent canvas containing the vital sign oscillogram onto the current to-be-processed video frame of the video data to obtain the video frame overlaid with the vital sign waveform includes:

and superposing a target area in the transparent canvas to a corresponding position of a current video frame to be processed of the video data to obtain a video frame superposed with a vital sign waveform, wherein the target area comprises the vital sign waveform diagram, and the corresponding position of the current video frame to be processed is a position in the current video frame to be processed, which is mutually mapped with the target area.

Optionally, the drawing a vital sign waveform diagram according to the vital sign data in the target region includes:

step one, judging whether the target area contains a oscillogram or not;

when a superposition mode of superposing the target area on the corresponding mapping position of the video frame is adopted, the recording system judges whether the target area contains the oscillogram or not.

Step two, if the target area contains the oscillogram, clearing the oscillogram in the target area, and drawing a vital sign oscillogram in the target area according to the vital sign data;

and step three, if the target area does not contain the oscillogram, drawing a vital sign oscillogram in the target area according to the vital sign data.

In the embodiment of the invention, only the oscillogram in the target area is cleared, so that the processing resource can be saved.

According to the video data recording method, the vital sign oscillogram is added to the video frame of the appointed channel of the interrogation host, so that the data are recorded. The REGION module is utilized, the REGION module comprises a transparent canvas, a vital sign oscillogram is firstly drawn on the transparent canvas, then the REGION module is bound to a VPSS (Video Process Sub-System) corresponding to a specified channel of the interrogation host to complete the fusion of the vital sign oscillogram and a Video frame, the fused Video frame can be sent to be encoded, locally previewed, remotely previewed and the like, the vital sign oscillogram can be seen in the fused Video frame, and the Process is shown in figure 3.

Another schematic flow chart of the video data recording method according to the embodiment of the present invention, as shown in fig. 4, includes:

s401, obtaining the vital sign data of a specified target subject in a recording site.

And keeping acquiring the vital sign data of the specified target subject in the recording site.

S402, acquiring a newly received video frame, judging whether the newly received video frame is a new video frame, and executing S403 if the newly received video frame is not the new video frame; if the newly received video frame is a new video frame, S404 is executed.

Acquiring a video frame of video data newly received by an interrogation host, judging whether the newly received video frame and a video frame acquired in the previous period are the same video frame, and if the newly received video frame and the video frame acquired in the previous period are not the same video frame, judging that the newly received video frame is a new video frame; and if the latest received video frame is the same as the video frame acquired in the previous period, judging that the latest received video frame is not a new video frame.

And S403, waiting for the next period.

The newly received video frame is not a new video frame, which indicates that the newly received video frame is already overlapped by the transparent canvas containing the oscillogram, so that the overlapping of the transparent canvas is not performed any more, and the next period is waited.

S404, determining the area of the newly received video frame needing to be added with the oscillogram.

The newly received video frame is a new video frame, which indicates that the transparent canvas is not superimposed on the newly received video frame, and therefore the transparent canvas needs to be superimposed. Determining an area in which a waveform diagram needs to be added in a newly received video frame, for example, acquiring an area specified by a user as the area in which the waveform diagram needs to be added in the newly received video frame; or determining the area where the specified target main body is located in the newly received video frame through a preset identification algorithm, and selecting the area for adding the oscillogram in other areas outside the area where the specified target main body is located.

S405, clearing the residual waveform image in the target area.

S406, selecting a corresponding target area from the transparent canvas, and drawing a vital sign oscillogram.

The resolution of the transparent canvas may be the same as the resolution of the video frames in the video data, with each position in the transparent canvas and each position in the video frames being mapped to each other. And mapping the area which needs to be added with the oscillogram in the newly received video frame into the transparent canvas to obtain the target area of the transparent canvas. For example, the area of the newly received video frame to which the oscillogram needs to be added is (A: B, C: D), and the target area in the transparent canvas is also (A: B, C: D). Wherein, A: b refers to the area of the horizontal pixels from a to B, C: d refers to the area of vertical pixels from C to D.

And S407, overlaying the target area containing the vital sign oscillogram on the newly received video frame.

After the superposition is completed, the steps S401-S407 are repeatedly executed until the recording of the video data is completed. For example, the interrogation host stops receiving video data of a recorded scene, or receives an instruction for stopping adding the vital sign waveform diagram.

In the embodiment of the invention, the vital sign oscillogram of the specified target main body is drawn in the target area of the transparent canvas, the transparent canvas is superposed on the video frame of the video data, and the recorded video data comprises the vital sign oscillogram of the specified target main body, so that the form of recording image data by the interrogation host can be enriched, and various recording requirements of users can be met.

An embodiment of the present invention further provides a video data recording apparatus, and referring to fig. 5, the apparatus includes:

a data obtaining module 501, configured to obtain vital sign data of a specified target subject in a recording site, and obtain video data of the recording site;

a region selection module 502, configured to select a target region from a pre-generated transparent canvas;

a waveform drawing module 503, configured to draw a vital sign waveform according to the vital sign data in the target region;

the video frame recording module 504 is configured to superimpose the transparent canvas containing the vital sign oscillogram onto the current to-be-processed video frame of the video data, so as to obtain a video frame on which the vital sign waveform is superimposed.

In the embodiment of the invention, the vital sign oscillogram of the specified target main body is drawn in the target area of the transparent canvas, the transparent canvas is superposed on the video frame of the video data, and the recorded video data comprises the vital sign oscillogram of the specified target main body, so that the form of recording image data by the interrogation host can be enriched, and various recording requirements of users can be met.

Optionally, the video data recording apparatus according to the embodiment of the present invention further includes:

a resolution determining module, configured to obtain a resolution of a video frame in the video data;

and the transparent canvas generation module is used for generating transparent canvas with the same resolution according to the resolution of the video frame in the video data.

In the embodiment of the invention, the resolution ratio of the transparent canvas is the same as the resolution ratio of the video frame in the video data, so that the transparent canvas is convenient to be superposed on the video frame in the following process.

Optionally, the data obtaining module 501 includes:

the physical sign data acquisition submodule is used for acquiring the physical sign data of a specified target main body in a recording site;

the video data acquisition submodule is used for periodically acquiring the latest received video frame in the video data of the recording site;

the video data recording apparatus of the embodiment of the present invention further includes:

the video frame judging module is used for judging whether the latest received video frame acquired in the period is the same as the video frame acquired in the previous period or not;

the sleep waiting module is used for waiting for the next period to acquire the video frame again if the latest received video frame acquired in the period is the same as the video frame acquired in the previous period;

the region selection module 502 is specifically configured to:

if the latest received video frame acquired in the period is not the same as the video frame acquired in the previous period, taking the latest received video frame acquired in the period as the current video frame to be processed, and selecting a target area from a pre-generated transparent canvas.

Optionally, the waveform drawing module 503 includes:

the canvas judging submodule is used for judging whether the transparent canvas contains the oscillogram or not;

a third drawing sub-module, configured to, if the transparent canvas includes a oscillogram, clear the oscillogram from the transparent canvas, and draw a vital sign oscillogram in the target area according to the vital sign data;

and the fourth drawing submodule is used for drawing the vital sign oscillogram according to the vital sign data in the target area if the transparent canvas does not contain the oscillogram.

In the embodiment of the invention, if the transparent canvas already contains the oscillogram, the oscillogram is cleared and then the vital sign oscillogram is drawn, so that the situation that the oscillogram is unclear or even can not be identified due to the superposition of the oscillograms can be prevented.

Optionally, the video frame recording module 504 is specifically configured to:

and superposing a target area in the transparent canvas to a corresponding position of a current video frame to be processed of the video data to obtain a video frame superposed with a vital sign waveform, wherein the target area comprises the vital sign waveform diagram, and the corresponding position of the current video frame to be processed is a position in the current video frame to be processed, which is mutually mapped with the target area.

Optionally, the waveform drawing module 503 includes:

the figure judges the submodule, is used for judging whether to include the oscillogram in the above-mentioned target area;

the first drawing submodule is used for clearing the oscillogram in the target area if the target area contains the oscillogram, and drawing a vital sign oscillogram in the target area according to the vital sign data;

and the second drawing submodule is used for drawing the vital sign waveform diagram according to the vital sign data in the target area if the target area does not contain the waveform diagram.

An embodiment of the present invention further provides an electronic device, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,

a memory 603 for storing a computer program;

the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:

acquiring vital sign data of a specified target main body in a recording site, and acquiring video data of the recording site;

selecting a target area from a pre-generated transparent canvas, wherein each position in the transparent canvas and each position in a video frame of the video data are mapped with each other;

in the target area, drawing a vital sign oscillogram according to the vital sign data;

and overlapping the transparent canvas containing the vital sign oscillogram on the current video frame to be processed of the video data to obtain the video frame with the vital sign waveform.

In the embodiment of the invention, the vital sign oscillogram of the specified target main body is drawn in the target area of the transparent canvas, the transparent canvas is superposed on the video frame of the video data, and the recorded video data comprises the vital sign oscillogram of the specified target main body, so that the form of recording image data by the interrogation host can be enriched, and various recording requirements of users can be met.

Optionally, the processor 601 is configured to implement any of the video data recording methods described above when executing the program stored in the memory 603.

The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.

The communication interface is used for communication between the electronic equipment and other equipment.

The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.

The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.

An embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps:

acquiring vital sign data of a specified target main body in a recording site, and acquiring video data of the recording site;

selecting a target area from a pre-generated transparent canvas, wherein each position in the transparent canvas and each position in a video frame of the video data are mapped with each other;

in the target area, drawing a vital sign oscillogram according to the vital sign data;

and overlapping the transparent canvas containing the vital sign oscillogram on the current video frame to be processed of the video data to obtain the video frame with the vital sign waveform.

In the embodiment of the invention, the vital sign oscillogram of the specified target main body is drawn in the target area of the transparent canvas, the transparent canvas is superposed on the video frame of the video data, and the recorded video data comprises the vital sign oscillogram of the specified target main body, so that the form of recording image data by the interrogation host can be enriched, and various recording requirements of users can be met.

Optionally, the computer program, when executed by a processor, is further capable of implementing any of the video data recording methods described above.

It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, embodiments of the apparatus, interrogation host and storage medium are substantially similar to the method embodiments, so that the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.

The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:多屏联动演示控制系统及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类