CN112492203A - Virtual photographing method, device, equipment and storage medium - Google Patents

Virtual photographing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112492203A
CN112492203A CN202011355188.3A CN202011355188A CN112492203A CN 112492203 A CN112492203 A CN 112492203A CN 202011355188 A CN202011355188 A CN 202011355188A CN 112492203 A CN112492203 A CN 112492203A
Authority
CN
China
Prior art keywords
camera
hal
sending
app
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011355188.3A
Other languages
Chinese (zh)
Inventor
于林
王伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zhizhangyi Technology Co ltd
Original Assignee
Beijing Zhizhangyi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zhizhangyi Technology Co ltd filed Critical Beijing Zhizhangyi Technology Co ltd
Priority to CN202011355188.3A priority Critical patent/CN112492203A/en
Publication of CN112492203A publication Critical patent/CN112492203A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/66Remote control of cameras or camera parts, e.g. by remote control devices
    • H04N23/661Transmitting camera control signals through networks, e.g. control via the Internet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Studio Devices (AREA)

Abstract

The embodiment of the invention discloses a virtual photographing method, a virtual photographing device, virtual photographing equipment and a storage medium. The method is applied to a cloud mobile phone end and comprises the following steps: when a virtual camera of a local target APP is triggered to be started, sending a first camera opening instruction corresponding to a target user to a hardware abstraction layer HAL through the target APP; sending a second camera opening instruction to a mobile terminal corresponding to the target user through the HAL so as to acquire a video stream of the target user through a camera of a target APP in the mobile terminal; and sending the video stream of the target user to a local target APP through the HAL so as to display the video stream through the target APP. According to the technical scheme of the embodiment of the invention, the virtual photographing function of the cloud mobile phone APP is realized from the bottom layer of the system, so that the APP can perform operations such as virtual photographing and virtual video recording.

Description

Virtual photographing method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a virtual photographing method, a virtual photographing device, virtual photographing equipment and a storage medium.
Background
At present, a system default camera is generally arranged on a cloud mobile phone, and for some Application programs (APPs) installed on the cloud mobile phone, when the functions of photographing or video recording and the like need to be used, a traditional virtual photographing scheme can call the system default camera, acquire data from a camera of a client through the system default camera, and return the data to the cloud mobile phone APP for display.
However, for some cloud mobile phones APP which can only use a custom camera to take a picture, since data cannot be acquired from a camera of a default camera of a system when the APP uses a picture taking function, a virtual picture taking function of the APP cannot be realized on the cloud mobile phone by a conventional scheme.
Disclosure of Invention
The invention provides a virtual photographing method, a virtual photographing device, virtual photographing equipment and a storage medium, which can realize a virtual photographing function of a cloud mobile phone APP from a system bottom layer, so that the APP can perform operations such as virtual photographing and virtual video recording.
In a first aspect, an embodiment of the present invention provides a virtual photography method, applied to a cloud mobile phone, including:
when a virtual camera of a local target APP is triggered to be started, a first camera opening instruction corresponding to a target user is sent to a hardware abstraction layer HAL through the target APP;
sending a second camera opening instruction to a mobile terminal corresponding to the target user through the HAL so as to acquire a video stream of the target user through a camera of a target APP in the mobile terminal;
and sending the video stream of the target user to a local target APP through the HAL so as to display the video stream through the target APP.
Optionally, sending, by the HAL, a second camera opening instruction to a mobile terminal corresponding to the target user, where the second camera opening instruction includes:
and sending a second camera opening instruction to a target APP in the mobile terminal corresponding to the target user by using the network socket through the camera service of the HAL.
Optionally, sending the video stream of the target user to the local target APP by the HAL includes:
if the virtual camera of the target APP is triggered and started by the photographing request corresponding to the target user, taking out a specified frame matched with the photographing request from the video stream through the HAL as a photo, and sending the photo to the local target APP;
and if the virtual camera of the target APP is triggered and started by the video request corresponding to the target user, sending the video stream of the target user to the local target APP through the HAL.
Optionally, the method further includes:
when a virtual camera of a local target APP is triggered to be closed, a first camera closing instruction corresponding to a target user is sent to a HAL through the target APP;
and sending a second camera closing instruction to the mobile terminal corresponding to the target user through the HAL so as to close the camera of the target APP in the mobile terminal.
In a second aspect, an embodiment of the present invention further provides a virtual camera method, applied to a mobile terminal, including:
receiving a second camera opening instruction sent by the cloud mobile phone end through the HAL;
according to the instruction parameters in the second camera opening instruction, opening a camera of the target APP, and capturing an image through a camera of the camera;
and compressing the image into a video stream, and sending the video stream to the HAL of the cloud mobile phone terminal.
Optionally, the method further includes:
receiving a second camera closing instruction sent by the cloud mobile phone end through the HAL;
and stopping transmitting the video stream according to the instruction parameter in the second camera closing instruction, and closing the camera of the target APP.
In a third aspect, an embodiment of the present invention further provides a virtual camera apparatus, which is applied to a cloud mobile phone terminal, and includes:
the instruction sending module is used for sending a first camera opening instruction to the hardware abstraction layer HAL through the target APP when the virtual camera of the local target APP is triggered to be opened;
the data acquisition module is used for sending a second camera opening instruction to the mobile terminal corresponding to the target user identification through the HAL so as to acquire the video stream of the target user through the camera of the target APP in the mobile terminal;
and the data sending module is used for sending the video stream of the target user to the local target APP through the HAL so as to display the video stream through the target APP.
In a fourth aspect, an embodiment of the present invention further provides a virtual camera apparatus, applied to a mobile terminal, including:
the receiving module is used for receiving a second camera opening instruction sent by the cloud mobile phone end through the HAL;
the grabbing module is used for opening a camera of the target APP according to the instruction parameters in the second camera opening instruction and grabbing images through a camera of the camera;
and the sending module is used for compressing the image into a video stream and sending the video stream to the HAL of the cloud mobile phone terminal.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the virtual photographing method applied to the cloud mobile phone terminal or the virtual photographing method applied to the mobile terminal provided by any embodiment of the present invention.
In a sixth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the virtual photography method applied to the cloud mobile phone end or the virtual photography method applied to the mobile terminal provided in any embodiment of the present invention.
According to the technical scheme of the embodiment of the invention, when a virtual camera of a local target APP is triggered to be started, a cloud mobile phone end sends a first camera starting instruction corresponding to a target user to a hardware abstraction layer HAL through the target APP; (ii) a Sending a second camera opening instruction to a mobile terminal corresponding to the target user through the HAL so as to acquire a video stream of the target user through a camera of a target APP in the mobile terminal; send target user's video stream to local target APP through HAL to show the video stream through target APP, solved among the prior art problem that the cloud cell-phone can't use the self-defined camera of APP to shoot, realize the virtual function of taking a picture of cloud cell-phone APP from the system bottom, make the APP can carry out operations such as virtual shoot, virtual video recording.
Drawings
FIG. 1a is a flowchart of a virtual photography method according to a first embodiment of the present invention;
FIG. 1b is a flowchart of an implementation of a virtual photography method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a virtual photography method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a virtual camera according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a virtual camera according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device in a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1a is a flowchart of a virtual camera method in an embodiment of the present invention, where this embodiment is applicable to a case where a camera of an APP is used to implement a virtual camera function of an APP on a cloud mobile phone side, and the method may be executed by a virtual camera device, where the device may be implemented by hardware and/or software, and may be generally integrated in an electronic device providing a virtual camera service, for example, in the cloud mobile phone side, and used in cooperation with a mobile terminal. As shown in fig. 1a, the method comprises:
and step 110, when the virtual camera of the local target APP is triggered to be started, sending a first camera opening instruction corresponding to the target user to the HAL through the target APP.
In this embodiment, the cloud mobile phone end is a hardware device for providing cloud computing services, and may provide various mobile phone function services to a user, where the local target APP is a target APP installed at the cloud mobile phone end, for example, a WeChat installed at the cloud mobile phone end. Because the cloud mobile phone end is not provided with a camera capable of directly capturing images, the cloud mobile phone end realizes a virtual camera through the virtual bottom layer HAL and responds to a photographing request of the mobile terminal.
In this embodiment, when the mobile terminal sends a photographing request to a target APP installed on the cloud mobile phone terminal, the virtual camera of the cloud mobile phone terminal is turned on. For example, suppose that a user a installs a WeChat at a cloud mobile phone end, after the user a logs in the cloud mobile phone, if the cloud mobile phone WeChat receives a video request of a user B to the user a, a virtual camera of the WeChat at the cloud mobile phone end is triggered to be started, and the cloud mobile phone end sends a first camera opening instruction corresponding to the user a to a HAL at a system bottom layer through the WeChat. Wherein the first open camera instruction includes an instruction parameter for causing the HAL to determine which application's camera needs to be opened.
In this embodiment, as shown in fig. 1b, in each module in the interaction process between the APP and the hardware device, the HAL layer is an application layer code closest to the Linux kernel, and compared to the Linux kernel, the HAL layer has higher stability, and relatively complex scenes such as concurrency, mutual exclusion, and interruption that need to be considered by the Linux kernel do not occur, and meanwhile, the HAL layer has rich API interfaces, and can use encapsulated Socket programming, so as to facilitate data interaction between the cloud mobile phone terminal and the mobile terminal through a Transmission Control Protocol (TCP) or a User Datagram Protocol (UDP). Compared with other application layers, the operations related to hardware can finally go to the HAL layer, so that the device virtualization in the HAL layer can avoid processing different calling scenes of the upper layer, and the situation that a camera cannot be processed is avoided. Therefore, in the embodiment, the virtual camera is realized at the cloud mobile phone end by simulating various interfaces of the bottom layer hardware equipment on the HAL layer.
And step 120, sending a second camera opening instruction to the mobile terminal corresponding to the target user through the HAL so as to acquire the video stream of the target user through the camera of the target APP in the mobile terminal.
In this embodiment, because the interfaces of the HAL layer of the cloud mobile phone end and other application layers are fixed and unchangeable, the implementation codes for opening the camera interface, reading the data interface, and closing the camera interface are updated, so that the HAL layer of the cloud mobile phone end can control the mobile terminal to open the camera of the target APP, read the image data acquired by the camera of the camera, and close the camera of the camera, as shown in fig. 1 b. The camera of the target APP is the camera of the target APP, and the target APP can only acquire image information by using the camera of the target APP.
Optionally, sending, by the HAL, a second camera opening instruction to the mobile terminal corresponding to the target user may include: and sending a second camera opening instruction to a target APP in the mobile terminal corresponding to the target user by using the network socket through the camera service of the HAL.
In this embodiment, when the target APP notifies the HAL to open the camera of the camera, the camera service located in the HAL layer sends a second camera opening instruction to the target APP in the mobile terminal corresponding to the target user through a TCP socket or a UDP socket, so that the mobile terminal opens the camera of the target APP according to the second camera opening instruction, captures image information of the target user, and generates a video stream corresponding to the target user. The second camera opening instruction may include a target APP identification parameter, which is used for the mobile terminal to determine which application camera needs to be opened.
The TCP is a connection-oriented, reliable and byte stream-based transport layer communication protocol, and the target APP in the mobile terminal can be ensured to successfully receive the instruction sent by the HAL by using the TCP socket to send the instruction.
And step 130, sending the video stream of the target user to a local target APP through the HAL so as to display the video stream through the target APP.
Optionally, sending the video stream of the target user to the local target APP by the HAL may include: if the virtual camera of the target APP is triggered and started by the photographing request corresponding to the target user, taking out a specified frame matched with the photographing request from the video stream through the HAL as a photo, and sending the photo to the local target APP; and if the virtual camera of the target APP is triggered and started by the video request corresponding to the target user, sending the video stream of the target user to the local target APP through the HAL.
In this embodiment, after the cloud mobile phone obtains the video stream of the target user through the HAL, the cloud mobile phone may decompress the video stream into an original image stream, process the original image stream into data matched with the photographing request, and send the data to the target APP for display. Illustratively, if the cloud mobile phone WeChat receives a WeChat photographing request of a user B to the user A, after a video stream of the user A is decompressed into an original image stream through the HAL, a frame is extracted from the original image stream to be used as a photo and sent to the cloud mobile phone WeChat, and the photo is displayed to the user B through the cloud mobile phone WeChat. If the cloud mobile phone WeChat receives a WeChat video request or a video recording request and the like of a user B to a user A, the HAL decompresses a video stream of the user A into an original image stream, and then directly uses the original image stream as a data source of a WeChat video function or a data source of a WeChat video recording function and returns the data source to the cloud mobile phone WeChat.
Optionally, the method may further include: when a virtual camera of a local target APP is triggered to be closed, a first camera closing instruction corresponding to a target user is sent to a HAL through the target APP; and sending a second camera closing instruction to the mobile terminal corresponding to the target user through the HAL so as to close the camera of the target APP in the mobile terminal.
Illustratively, if the cloud mobile phone WeChat receives a request that the user B finishes the WeChat photographing, the WeChat video or the WeChat video recording with the user A, the virtual camera of the cloud mobile phone WeChat is closed, and a first camera closing instruction corresponding to the user A is sent to the HAL through the cloud mobile phone WeChat. Wherein the instruction parameters included in the first close camera instruction may cause the HAL to determine which application's camera needs to be closed. And then the camera service located in the HAL layer sends a second camera closing instruction to the WeChat in the mobile terminal corresponding to the user a through a TCP socket or a UDP socket, so that the mobile terminal closes the camera of the camera carried by the WeChat according to the second camera closing instruction.
According to the technical scheme of the embodiment of the invention, when a virtual camera of a local target APP is triggered to be started, a cloud mobile phone end sends a first camera starting instruction corresponding to a target user to a hardware abstraction layer HAL through the target APP; sending a second camera opening instruction to a mobile terminal corresponding to the target user through the HAL so as to acquire a video stream of the target user through a camera of a target APP in the mobile terminal; send target user's video stream to local target APP through HAL to show the video stream through target APP, solved among the prior art problem that the camera that the cloud cell-phone can't use APP shoot, realize the virtual function of taking a picture of cloud cell-phone APP from the system bottom, make APP can carry out operations such as virtual shoot, virtual video recording.
Example two
Fig. 2 is a flowchart of a virtual camera method in the second embodiment of the present invention, where this embodiment is applicable to a case where a virtual camera function of a cloud mobile phone APP is implemented by a camera of the APP, and the method may be implemented by a virtual camera device, where the device may be implemented by hardware and/or software, and may be generally integrated in an electronic device providing a virtual camera service, for example, in a mobile terminal, and used in cooperation with the cloud mobile phone. As shown in fig. 2, the method is applied to a mobile terminal, and includes:
and step 210, receiving a second camera opening instruction sent by the cloud mobile phone end through the HAL.
In this embodiment, a target APP is installed in the mobile terminal, and the user can access the cloud mobile phone through the target APP in the mobile terminal. When the mobile terminal receives a second camera opening instruction sent by the cloud mobile phone end through the HAL through a TCP socket or a UDP socket, the camera of the target application program in the mobile terminal can be opened according to the second camera opening instruction.
And step 220, opening the camera of the target APP according to the instruction parameters in the second camera opening instruction, and capturing an image through a camera of the camera.
In this embodiment, according to the instruction parameter in the second camera opening instruction, the camera of the target APP in the mobile terminal may be opened to capture an image, so as to obtain image information corresponding to the target user. The camera of the target APP is the camera of the target APP, and the target APP can only acquire image information by using the camera of the target APP.
And step 230, compressing the image into a video stream, and sending the video stream to a HAL (HAL) of the cloud mobile phone terminal.
In this embodiment, in order to save bandwidth resources and data transmission time and reduce the data transmission error rate, after compressing the image into a video stream, send the video stream to the HAL of the cloud mobile phone end, so as to send the video stream to the cloud mobile phone end target APP through the HAL for display.
Optionally, the method may further include: and receiving a second camera closing instruction sent by the cloud mobile phone end through the HAL, stopping transmitting the video stream according to an instruction parameter in the second camera closing instruction, and closing the camera of the target APP.
For example, assuming that the mobile terminal receives a second camera closing instruction sent by the cloud mobile phone end through the HAL when continuously transmitting the video stream of the user a to the HAL of the cloud mobile phone end, the mobile terminal stops transmitting the video stream of the user a to the HAL according to an instruction parameter in the second camera closing instruction, closes a camera of a WeChat in the mobile terminal, and stops acquiring the image information of the user a.
According to the technical scheme of the embodiment of the invention, the mobile terminal receives a second camera opening instruction sent by the cloud mobile phone end through the HAL; according to the instruction parameters in the second camera opening instruction, opening the camera of the target APP, and capturing an image through a camera of the camera; compress into the video stream with the image to send to the HAL of cloud cell-phone end, solved among the prior art the problem that the camera that the cloud cell-phone can't use APP shoots, realize the virtual function of taking a picture of cloud cell-phone APP from the system bottom, make the APP can carry out operations such as virtual shoot, virtual video recording.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a virtual camera apparatus in a third embodiment of the present invention, which is applicable to a case where a camera of an APP is used to implement a virtual camera function of an APP on a cloud mobile phone side, where the apparatus may be implemented by hardware and/or software, and may be generally integrated in an electronic device providing a virtual camera service, for example, a cloud mobile phone, and used in cooperation with a mobile terminal. As shown in fig. 3, the apparatus is applied to a cloud mobile phone terminal, and includes:
the instruction sending module 310 is configured to send a first camera opening instruction to the hardware abstraction layer HAL through the target APP when the virtual camera of the local target APP is triggered to be opened;
the data acquisition module 320 is configured to send a second camera opening instruction to the mobile terminal corresponding to the target user identifier through the HAL, so as to acquire a video stream of the target user through a camera of the target APP in the mobile terminal;
and the data sending module 330 is configured to send the video stream of the target user to the local target APP through the HAL, so as to display the video stream through the target APP.
According to the technical scheme of the embodiment of the invention, when a virtual camera of a local target APP is triggered to be started, a cloud mobile phone end sends a first camera starting instruction corresponding to a target user to a hardware abstraction layer HAL through the target APP; sending a second camera opening instruction to a mobile terminal corresponding to the target user through the HAL so as to acquire a video stream of the target user through a camera of a target APP in the mobile terminal; send target user's video stream to local target APP through HAL to show the video stream through target APP, solved among the prior art problem that the camera that the cloud cell-phone can't use APP shoot, realize the virtual function of taking a picture of cloud cell-phone APP from the system bottom, make APP can carry out operations such as virtual shoot, virtual video recording.
Optionally, the data obtaining module 320 is configured to:
and sending a second camera opening instruction to a target APP in the mobile terminal corresponding to the target user by using the network socket through the camera service of the HAL.
Optionally, the data sending module 330 is configured to:
if the virtual camera of the target APP is triggered and started by the photographing request corresponding to the target user, taking out a specified frame matched with the photographing request from the video stream through the HAL as a photo, and sending the photo to the local target APP;
and if the virtual camera of the target APP is triggered and started by the video request corresponding to the target user, sending the video stream of the target user to the local target APP through the HAL.
Optionally, the method further includes: the camera closing module is used for sending a first camera closing instruction corresponding to a target user to the HAL through the target APP when the virtual camera of the local target APP is triggered to be closed;
and sending a second camera closing instruction to the mobile terminal corresponding to the target user through the HAL so as to close the camera of the target APP in the mobile terminal.
The virtual photographing device provided by the embodiment of the invention can execute the virtual photographing method applied to the cloud mobile phone terminal provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 4 is a schematic structural diagram of a virtual camera device in the fourth embodiment of the present invention, which is applicable to a case where a virtual camera function of a cloud mobile phone APP is implemented by a camera of the APP, where the method may be executed by the virtual camera device, and the device may be implemented by hardware and/or software, and may be generally integrated in an electronic device providing a virtual camera service, for example, in a mobile terminal, and used in cooperation with the cloud mobile phone. As shown in fig. 4, the apparatus is applied to a mobile terminal, and includes:
the receiving module 410 is configured to receive a second camera opening instruction sent by the cloud mobile phone end through the HAL;
the grabbing module 420 is used for opening the camera of the target APP according to the instruction parameters in the second camera opening instruction, and grabbing the image through the camera of the camera;
and a sending module 430, configured to compress the image into a video stream, and send the video stream to the HAL at the cloud mobile phone end.
According to the technical scheme of the embodiment of the invention, the mobile terminal receives a second camera opening instruction sent by the cloud mobile phone end through the HAL; according to the instruction parameters in the second camera opening instruction, opening the camera of the target APP, and capturing an image through a camera of the camera; compress into the video stream with the image to send to the HAL of cloud cell-phone end, solved among the prior art the problem that the camera that the cloud cell-phone can't use APP shoots, realize the virtual function of taking a picture of cloud cell-phone APP from the system bottom, make the APP can carry out operations such as virtual shoot, virtual video recording.
Optionally, the method further includes: the closing module is used for receiving a second camera closing instruction sent by the cloud mobile phone end through the HAL;
and stopping transmitting the video stream according to the instruction parameter in the second camera closing instruction, and closing the camera of the target APP.
The virtual camera device provided by the embodiment of the invention can execute the virtual camera method applied to the mobile terminal provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an electronic device in a fifth embodiment of the present invention. Fig. 5 illustrates a block diagram of an exemplary device 12 suitable for use in implementing embodiments of the present invention. The device 12 shown in fig. 5 is only an example and should not bring any limitations to the functionality and scope of use of the embodiments of the present invention.
As shown in FIG. 5, device 12 is in the form of a general purpose computing device. The components of device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with device 12, and/or with any devices (e.g., network card, modem, etc.) that enable device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with the other modules of the device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing, such as implementing a virtual photography method provided by an embodiment of the present invention, by running a program stored in the system memory 28.
Namely: the virtual photographing method is applied to a cloud mobile phone end and comprises the following steps: when a virtual camera of a local target APP is triggered to be started, a first camera opening instruction corresponding to a target user is sent to a hardware abstraction layer HAL through the target APP; (ii) a Sending a second camera opening instruction to a mobile terminal corresponding to the target user through the HAL so as to acquire a video stream of the target user through a camera of a target APP in the mobile terminal; and sending the video stream of the target user to a local target APP through the HAL so as to display the video stream through the target APP.
Or, the virtual photographing method is implemented and applied to the mobile terminal, and comprises the following steps: receiving a second camera opening instruction sent by the cloud mobile phone end through the HAL; according to the instruction parameters in the second camera opening instruction, opening the camera of the target APP, and capturing an image through a camera of the camera; and compressing the image into a video stream, and sending the video stream to the HAL of the cloud mobile phone terminal.
EXAMPLE six
An embodiment of the present invention also provides a computer-readable storage medium having stored thereon a computer program for executing a virtual photography method when the program is executed by a computer processor.
Namely: the virtual photographing method is applied to a cloud mobile phone end and comprises the following steps: when a virtual camera of a local target APP is triggered to be started, a first camera opening instruction corresponding to a target user is sent to a hardware abstraction layer HAL through the target APP; sending a second camera opening instruction to a mobile terminal corresponding to the target user through the HAL so as to acquire a video stream of the target user through a camera of a target APP in the mobile terminal; and sending the video stream of the target user to a local target APP through the HAL so as to display the video stream through the target APP.
Or, the virtual photographing method is implemented and applied to the mobile terminal, and comprises the following steps: receiving a second camera opening instruction sent by the cloud mobile phone end through the HAL; according to the instruction parameters in the second camera opening instruction, opening the camera of the target APP, and capturing an image through a camera of the camera; and compressing the image into a video stream, and sending the video stream to the HAL of the cloud mobile phone terminal.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer-readable storage medium may be, for example, but is not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A virtual photographing method is applied to a cloud mobile phone terminal and comprises the following steps:
when a virtual camera of a local target APP is triggered to be started, sending a first camera opening instruction corresponding to a target user to a hardware abstraction layer HAL through the target APP;
sending a second camera opening instruction to a mobile terminal corresponding to the target user through the HAL so as to acquire a video stream of the target user through a camera of a target APP in the mobile terminal;
and sending the video stream of the target user to a local target APP through the HAL so as to display the video stream through the target APP.
2. The method as claimed in claim 1, wherein sending a second camera opening instruction to the mobile terminal corresponding to the target user via the HAL comprises:
and sending a second camera opening instruction to a target APP in the mobile terminal corresponding to the target user by using the network socket through the camera service of the HAL.
3. Method according to claim 1, wherein sending the video stream of the target user to a local target APP by the HAL comprises:
if the virtual camera of the target APP is triggered and started by a photographing request corresponding to a target user, taking out a specified frame matched with the photographing request from the video stream through the HAL as a photo, and sending the photo to a local target APP;
and if the virtual camera of the target APP is triggered and started by the video request corresponding to the target user, sending the video stream of the target user to a local target APP through the HAL.
4. The method of claim 1, further comprising:
when a virtual camera of a local target APP is triggered to be closed, sending a first camera closing instruction corresponding to a target user to a HAL through the target APP;
and sending a second camera closing instruction to a mobile terminal corresponding to the target user through the HAL so as to close the camera of the target APP in the mobile terminal.
5. A virtual camera method is applied to a mobile terminal and comprises the following steps:
receiving a second camera opening instruction sent by the cloud mobile phone end through the HAL;
according to the instruction parameters in the second camera opening instruction, opening a camera of the target APP, and capturing an image through a camera of the camera;
and compressing the image into a video stream, and sending the video stream to a HAL (HAL) at the cloud mobile phone end.
6. The method of claim 5, further comprising:
receiving a second camera closing instruction sent by the cloud mobile phone end through the HAL;
and stopping transmitting the video stream according to the instruction parameter in the second camera closing instruction, and closing the camera of the target APP.
7. The utility model provides a virtual camera device which characterized in that is applied to cloud cell-phone end, includes:
the system comprises an instruction sending module, a hardware abstraction layer HAL and a hardware module, wherein the instruction sending module is used for sending a first camera opening instruction to the hardware abstraction layer HAL through a local target APP when a virtual camera of the local target APP is triggered to be opened;
a data acquisition module, configured to send a second camera opening instruction to a mobile terminal corresponding to the target user identifier through the HAL, so as to acquire a video stream of the target user through a camera of a target APP in the mobile terminal;
and the data sending module is used for sending the video stream of the target user to a local target APP through the HAL so as to display the video stream through the target APP.
8. A virtual camera device, applied to a mobile terminal, comprises:
the receiving module is used for receiving a second camera opening instruction sent by the cloud mobile phone end through the HAL;
the grabbing module is used for opening a camera of the target APP according to the instruction parameters in the second camera opening instruction and grabbing images through a camera of the camera;
and the sending module is used for compressing the image into a video stream and sending the video stream to the HAL of the cloud mobile phone terminal.
9. An electronic device, characterized in that the device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the virtual photography method of any of claims 1-4, or the virtual photography method of any of claims 5-6.
10. A computer-readable storage medium on which a computer program is stored, which program, when executed by a processor, implements the virtual photography method according to any one of claims 1 to 4, or implements the virtual photography method according to any one of claims 5 to 6.
CN202011355188.3A 2020-11-26 2020-11-26 Virtual photographing method, device, equipment and storage medium Pending CN112492203A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011355188.3A CN112492203A (en) 2020-11-26 2020-11-26 Virtual photographing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011355188.3A CN112492203A (en) 2020-11-26 2020-11-26 Virtual photographing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112492203A true CN112492203A (en) 2021-03-12

Family

ID=74935753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011355188.3A Pending CN112492203A (en) 2020-11-26 2020-11-26 Virtual photographing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112492203A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113411503A (en) * 2021-07-01 2021-09-17 上海卓易科技股份有限公司 Cloud mobile phone camera preview method and device, computer equipment and storage medium
CN113766061A (en) * 2021-08-31 2021-12-07 北京百度网讯科技有限公司 Image acquisition method, device, equipment and storage medium
CN113938457A (en) * 2021-09-30 2022-01-14 北京润信恒达科技有限公司 Method, system and equipment for applying remote camera to cloud mobile phone
CN114051067A (en) * 2021-11-03 2022-02-15 北京百度网讯科技有限公司 Image acquisition method, apparatus, device, storage medium, and program product
CN114173158A (en) * 2021-11-29 2022-03-11 北京百度网讯科技有限公司 Face recognition method, cloud device, client device, electronic device and medium
CN115022570A (en) * 2021-12-24 2022-09-06 荣耀终端有限公司 Method for acquiring video frame, electronic device and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140149492A1 (en) * 2012-11-29 2014-05-29 International Business Machines Corporation Adjustment to managed-infrastructure-as-a-service cloud standard
CN110430441A (en) * 2019-07-31 2019-11-08 湖南微算互联信息技术有限公司 A kind of cloud mobile video acquisition method, system, device and storage medium
CN111917988A (en) * 2020-08-28 2020-11-10 长沙摩智云计算机科技有限公司 Remote camera application method, system and medium of cloud mobile phone

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140149492A1 (en) * 2012-11-29 2014-05-29 International Business Machines Corporation Adjustment to managed-infrastructure-as-a-service cloud standard
CN110430441A (en) * 2019-07-31 2019-11-08 湖南微算互联信息技术有限公司 A kind of cloud mobile video acquisition method, system, device and storage medium
CN111917988A (en) * 2020-08-28 2020-11-10 长沙摩智云计算机科技有限公司 Remote camera application method, system and medium of cloud mobile phone

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113411503A (en) * 2021-07-01 2021-09-17 上海卓易科技股份有限公司 Cloud mobile phone camera preview method and device, computer equipment and storage medium
CN113766061A (en) * 2021-08-31 2021-12-07 北京百度网讯科技有限公司 Image acquisition method, device, equipment and storage medium
CN113766061B (en) * 2021-08-31 2023-05-09 北京百度网讯科技有限公司 Image acquisition method, device, equipment and storage medium
CN113938457A (en) * 2021-09-30 2022-01-14 北京润信恒达科技有限公司 Method, system and equipment for applying remote camera to cloud mobile phone
CN113938457B (en) * 2021-09-30 2023-11-10 北京润信恒达科技有限公司 Method, system and equipment for cloud mobile phone to apply remote camera
CN114051067A (en) * 2021-11-03 2022-02-15 北京百度网讯科技有限公司 Image acquisition method, apparatus, device, storage medium, and program product
CN114051067B (en) * 2021-11-03 2023-11-03 北京百度网讯科技有限公司 Image acquisition method, device, equipment and storage medium
CN114173158A (en) * 2021-11-29 2022-03-11 北京百度网讯科技有限公司 Face recognition method, cloud device, client device, electronic device and medium
CN114173158B (en) * 2021-11-29 2024-06-11 北京百度网讯科技有限公司 Face recognition method, cloud device, client device, electronic device and medium
CN115022570A (en) * 2021-12-24 2022-09-06 荣耀终端有限公司 Method for acquiring video frame, electronic device and readable storage medium

Similar Documents

Publication Publication Date Title
CN112492203A (en) Virtual photographing method, device, equipment and storage medium
CN107786794B (en) Electronic device and method for providing an image acquired by an image sensor to an application
CN109933442B (en) Method, apparatus and computer storage medium for communication between small program platforms
KR20070086492A (en) A method for capturing video data by utilizing a camera cell phone as a camera of a computer
KR20170097414A (en) Electronic device and operating method thereof
US10990461B2 (en) Application interaction method, interaction method and apparatus
KR102327779B1 (en) Method for processing image data and apparatus for the same
US10165058B2 (en) Dynamic local function binding apparatus and method
WO2020224109A1 (en) Real-time object recognition method and apparatus, and computer device
WO2019103929A1 (en) Analysis of video content
US11343545B2 (en) Computer-implemented event detection using sonification
CN109976922B (en) Discovery method, device and computer storage medium between small program platforms
CN110225048B (en) Data transmission method and device, first terminal and storage medium
KR20160087324A (en) Camera activation and illuminance
KR20170062038A (en) Electronic apparatus and operating method thereof
US10318612B2 (en) System and method for implementing screen capture
CN112420217A (en) Message pushing method, device, equipment and storage medium
WO2022062634A1 (en) Method, apparatus, device, and storage medium for integrating map service in service
CN112416455B (en) Data processing method, device, terminal and storage medium
TW200847732A (en) System and method for bridging file system between two different processor in mobile phone
CN112004147A (en) Video rendering method and device, electronic equipment and storage medium
CN115237481A (en) Method, device and equipment for driving external equipment and storage medium
CN116414490A (en) Window management method, device, electronic equipment and storage medium
CN114666622A (en) Special effect video determination method and device, electronic equipment and storage medium
WO2020211371A1 (en) Image restoration method and apparatus, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210312

RJ01 Rejection of invention patent application after publication