Disclosure of Invention
To solve the above technical problem, a first aspect of the present invention provides a video acquisition method, including:
s10, reading parameters of interactive elements operable in different demonstration modes of at least one first video window;
S20, generating a transparent operation window capable of simulating interactive operation according to parameters of the interactive operation elements in different demonstration modes of at least one first video window;
and S30, attaching the transparent operation window to the second video window.
Preferably, in step S20, the method for generating the transparent operation window capable of simulating the interactive operation according to the parameters of the interactive operation elements in the different demonstration modes of the at least one first video window comprises the following steps:
s201, simulating and generating transparent element blocks of interoperable elements;
s202, overlapping the transparent element image blocks with transparent image canvas to generate a transparent operation window capable of simulating interactive operation.
Preferably, the parameters of the interoperable element include region coordinates of the interoperable element with respect to the first video window, an element size.
Preferably, the region coordinates and the element sizes of the transparent element block and the transparent image canvas are the same as the region coordinates and the element sizes of the interoperable elements and the first video window.
Preferably, step S10 is preceded by the step S00 of reading a first size scale and a first coordinate parameter of the at least one first video window and a second size scale and a second coordinate parameter of the at least one second video window.
Preferably, in step S30, the transparent operation window is scaled to be equal to the second video window in height, and aligned centrally, so as to implement positioning fit between the transparent operation window and the second video window.
A second aspect of the present invention provides a video acquisition apparatus, the apparatus comprising:
the reading module is used for reading parameters of the interoperable elements in different demonstration modes of at least one first video window;
the generating module is used for generating a transparent operation window capable of simulating interactive operation according to parameters of the interactive operation elements in different demonstration modes of at least one read first video window;
And the attaching module attaches the transparent operation window to the second video window.
Preferably, the generating module includes:
A simulation unit for simulating and generating transparent element blocks of interoperable elements;
and the superposition unit is used for superposing the transparent element image blocks on the transparent image canvas to generate a transparent operation window capable of simulating interactive operation.
A third aspect of the invention provides an electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that the computer program is executed in the processor to implement any of the methods described above.
A fourth aspect of the present invention is a storage medium storing a computer program that, when executed in a processor, performs any of the methods described above.
The method and the device have the advantages that the transparent operation window capable of simulating the interactive operation is generated according to the simulation of the interactive parameters by reading the parameters of the interactive operation elements of the first video window, meanwhile, the coordinate size of the second video window is read, the transparent operation window and the second video window are matched and attached, and the interactive operation of the second video window for receiving video data can be realized.
Meanwhile, the embodiment of the invention transparencies the virtual video stream image layer, tiles the interoperable elements, reads the coordinate size of the video conference software image window, and performs matching lamination on the transparent image layer and the conference image layer, so as to laminate the interoperable elements to the video conference window. The video in the video conference can be controlled without frequent switching operation of the software end, and other capabilities of the conference software end can be controlled.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that in the description of the present invention, the term "storage medium" may be a variety of media that can store computer programs, such as ROM, RAM, magnetic or optical disks, unless explicitly stated and limited otherwise. The term "processor" may be a chip or circuit with data processing functions, such as a CPLD (Complex Programmable Logic Device: complex Programmable logic device), an FPGA (Field-Programmable gate array) GATE ARRAY, an MCU (Microcontroller Unit: micro control unit), a PLC (Programmable Logic Controller: programmable logic controller), and a CPU (Central Processing Unit: central processing unit). The term "electronic device" may be any device having data processing and storage functions, and may generally include both fixed terminals and mobile terminals. Fixed terminals such as desktops and the like. Mobile terminals such as cell phones, PADs, mobile robots, and the like. In addition, the technical features of the different embodiments of the invention described later can be combined with each other as long as they do not collide with each other.
For a better understanding of the present invention, the present invention is further described below with reference to specific examples and drawings.
The video acquisition method provided by the embodiment is suitable for the situation of video conference between at least one first video device, such as a local video device, and at least one second video device, such as a remote video device. The first video device is provided with at least one actual camera, and the second video device can be the same video device as the first video device or can be a different video device. The first video device and the second video device are, for example, a mobile phone, a tablet, a desktop computer with a camera connected thereto, or the like.
Video conference software is installed in the first video equipment and the second video equipment, the video conference software in the first video equipment and the second video equipment interact through the Internet and are connected in a video mode, and after the video connection is established, the first video equipment can transmit video data with the second video equipment.
Further, a virtual camera is installed in the first video device in advance, format conversion is performed on window (screen) data of the first video device by using the virtual camera, so that video output data are obtained, and the video output data are displayed on a window of the second video device. The virtual camera is application software which can simulate a real camera.
The first video device is provided with a first video window, the second video device is provided with a second video window, and video data transmitted between the first video device and the second video device comprises video data acquired by a camera of the first video device and/or window data of the first video window acquired by a virtual camera.
Fig. 1 shows a flowchart of a video acquisition method according to an embodiment of the present invention, as shown in fig. 1, where the method includes:
S00, reading a first size proportion and a first coordinate parameter of at least one first video window, and a second size proportion and a second coordinate parameter of at least one second video window.
In the step, connection between the virtual camera and at least one first video device and at least one second video device is established, and specifically, video conference software in the first video device and the second video device interact and perform video connection through the internet.
The method comprises the steps of reading a first size proportion and a first coordinate parameter of a first video window through a communication interface between a virtual camera and the first video window, and reading a second size proportion and a second coordinate parameter of a second video window through a communication interface between the virtual camera and the second video window.
And S10, reading parameters of the interoperable elements of at least one first video window in different demonstration modes.
Different interactive operations can be realized for the first video window in different demonstration modes. The parameters of the interoperable elements comprise region coordinates of the interoperable elements relative to the first video window, element sizes and the like.
In the step, parameters of the interoperable elements in different presentation modes of the first video window are read via a communication interface between the virtual camera and the first video window.
And S20, generating a transparent operation window capable of simulating interactive operation according to the parameters of the interactive operation elements in different demonstration modes of the at least one first video window.
The method comprises the following steps:
s201, simulating and generating transparent element blocks of interoperable elements;
s202, overlapping the transparent element image blocks with transparent image canvas to generate a transparent operation window capable of simulating interactive operation.
The region coordinates and the element sizes of the transparent element block relative to the transparent image canvas are the same as the region coordinates and the element sizes of the interoperable elements relative to the first video window.
And S30, attaching the transparent operation window to the second video window.
In the step, the transparent operation window is scaled to be equal to the second video window in height and aligned in the middle, so that positioning and bonding between the transparent operation window and the second video window are realized.
In the embodiment of the invention, the parameters of the interactive operation elements of the first video window are read, the transparent operation window capable of simulating the interactive operation is generated according to the simulation of the interactive parameters, the coordinate size of the second video window is read, and the transparent operation window is matched and attached with the second video window, so that the interactive operation of the second video window for receiving the video data can be realized.
Meanwhile, the embodiment of the invention transparencies the virtual video stream image layer, tiles the interoperable elements, reads the coordinate size of the video conference software image window, and performs matching lamination on the transparent image layer and the conference image layer, so as to laminate the interoperable elements to the video conference window. The video in the video conference can be controlled without frequent switching operation of the software end, and other capabilities of the conference software end can be controlled.
Fig. 2 shows a schematic structural diagram of a video acquisition device according to the present invention, as shown in fig. 2, the device includes:
the reading module is used for reading parameters of the interoperable elements in different demonstration modes of at least one first video window;
the generating module is used for generating a transparent operation window capable of simulating interactive operation according to parameters of the interactive operation elements in different demonstration modes of at least one read first video window;
And the attaching module attaches the transparent operation window to the second video window.
Further, the reading module is further configured to read a first size ratio and a first coordinate parameter of at least one first video window, and a second size ratio and a second coordinate parameter of at least one second video window.
Further, the generating module includes:
A simulation unit for simulating and generating transparent element blocks of interoperable elements;
and the superposition unit is used for superposing the transparent element image blocks on the transparent image canvas to generate a transparent operation window capable of simulating interactive operation.
The embodiment of the invention also provides electronic equipment, which comprises a memory and a processor, wherein the memory stores a computer program, and the computer program executes in the processor to realize any method.
The embodiment of the invention also provides a storage medium which stores a computer program, and the computer program executes in a processor to realize any one of the methods.
It should be noted that any of the methods provided in the above embodiments are not permitted to use or store any of the methods without permission, and are within the scope of the present invention.
The foregoing describes the embodiments of the present invention in detail, but the description is only a preferred embodiment of the present invention and should not be construed as limiting the scope of the invention. All equivalent changes and modifications within the scope of the present invention are intended to be covered by this patent.