CN114501136B - Image acquisition method, device, mobile terminal and storage medium - Google Patents

Image acquisition method, device, mobile terminal and storage medium Download PDF

Info

Publication number
CN114501136B
CN114501136B CN202210032571.8A CN202210032571A CN114501136B CN 114501136 B CN114501136 B CN 114501136B CN 202210032571 A CN202210032571 A CN 202210032571A CN 114501136 B CN114501136 B CN 114501136B
Authority
CN
China
Prior art keywords
image
real
image frame
equipment
time
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.)
Active
Application number
CN202210032571.8A
Other languages
Chinese (zh)
Other versions
CN114501136A (en
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.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication 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 Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN202210032571.8A priority Critical patent/CN114501136B/en
Publication of CN114501136A publication Critical patent/CN114501136A/en
Application granted granted Critical
Publication of CN114501136B publication Critical patent/CN114501136B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44016Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving splicing one content stream with another content stream, e.g. for substituting a video clip

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The application provides an image acquisition method, an image acquisition device, a mobile terminal and a storage medium, wherein a first real-time image frame is acquired through an external image pickup device, the first real-time image frame is stored in an image queue, the first real-time image frame is acquired from the image queue in response to device switching operation, the first real-time image frame is displayed as output data, the first real-time image frame is continuously acquired through the external image pickup device, the first real-time image frame is acquired from the image queue and displayed immediately when the device switching operation is acquired, the problem that the image pickup device is time-consuming to switch and cause a jam or a black screen is avoided, and different image pickup devices are rapidly switched.

Description

Image acquisition method, device, mobile terminal and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an image acquisition method, an image acquisition device, a mobile terminal, and a computer readable storage medium (simply referred to as a storage medium).
Background
With the continuous development of electronic technology, most of existing mobile terminals are configured with cameras, and users can perform activities such as video call, video live broadcast and the like through the mobile terminals. However, it is difficult for a single mobile terminal to meet the requirements of multi-angle photographing, for example: when live video broadcast is carried out, a main broadcasting picture is required to be shot through the mobile terminal, a product picture is required to be shot, and the two pictures are required to be continuously switched in the live video broadcast process. Therefore, the mobile terminal and other image capturing devices are required to perform collaborative image capturing in the image capturing process of multi-angle image capturing, but the situations of frame jump and unsmooth image capturing easily occur in the process of switching from the mobile terminal camera to the other image capturing device.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an image acquisition method, apparatus, mobile terminal, and storage medium for improving the smoothness of a screen during switching of an image capturing apparatus.
In a first aspect, the present application provides an image acquisition method comprising:
acquiring a first real-time image frame through external camera equipment, and storing the first real-time image frame into an image queue;
and responding to the switching operation of the equipment, acquiring a first real-time image frame from the image queue, and displaying the first real-time image frame as output data.
In some embodiments of the present application, before the first real-time image frame is acquired by the external image capturing apparatus, the method further includes:
responding to shooting triggering operation, and acquiring the equipment state of external shooting equipment;
and if the equipment state of the external image pickup equipment is a connection state, starting the external image pickup equipment.
In some embodiments of the present application, before acquiring the device state of the external image capturing device, the method further includes:
starting a local image pickup device, and acquiring a second real-time image frame through the local image pickup device;
and displaying the second real-time image frame as output data.
In some embodiments of the present application, displaying the second real-time image frame as output data includes:
displaying the second real-time image frame as output data in an image browsing interface;
after the external camera equipment is started, the method further comprises the following steps:
in the image browsing interface, an image capturing apparatus switching control is displayed.
In some embodiments of the present application, before the first real-time image frame is acquired by the external image capturing apparatus, the method further includes:
receiving access information of external camera equipment;
responding to the access information to acquire the equipment state of the local camera equipment;
and if the equipment state of the local image pickup equipment is an operation state, starting the external image pickup equipment.
In some embodiments of the present application, after saving the first real-time image frame in the image queue, the method further includes:
and displaying the first real-time image frame in an image display sub-window in the image browsing interface.
In some embodiments of the present application, displaying a first real-time image frame as output data includes:
and switching the first real-time image frame from the image display sub-window to the image browsing interface for display, and sending the first real-time image frame to the server as output data.
In a second aspect, the present application provides an image acquisition apparatus, the apparatus comprising:
the image acquisition module is used for acquiring a first real-time image frame through the external camera equipment and storing the first real-time image frame into the image queue;
and the switching operation module is used for responding to the equipment switching operation, acquiring a first real-time image frame from the image queue and displaying the first real-time image frame as output data.
In a third aspect, the present application also provides a mobile terminal, including:
one or more processors;
a memory; and
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the image acquisition method.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program to be loaded by a processor for performing the steps of the image acquisition method.
In a fifth aspect, embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the method provided in the first aspect.
According to the image acquisition method, the device, the mobile terminal and the storage medium, the first real-time image frame is acquired through the external image pickup equipment, the first real-time image frame is stored in the image queue, the first real-time image frame is acquired from the image queue in response to equipment switching operation, the first real-time image frame is displayed as output data, the first real-time image frame is continuously acquired through the external image pickup equipment, the first real-time image frame is acquired from the image queue and displayed when the equipment switching operation is acquired, and the problem of blocking or black screen caused by time consuming switching of the image pickup equipment is avoided, so that different image pickup equipment can be rapidly switched.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic view of an application scenario of an image acquisition method according to an embodiment of the present application;
FIG. 2 is a flow chart of an image acquisition method according to an embodiment of the application;
FIG. 3 is a flowchart illustrating a step of starting an external camera device according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a step of displaying a second real-time image frame according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an image browsing interface and a camera switching control in an embodiment of the present application;
FIG. 6 is a flowchart illustrating another step of activating an external camera device according to an embodiment of the present application;
FIG. 7 is a flowchart illustrating a first real-time image frame displaying step according to an embodiment of the present application;
FIG. 8 is a schematic diagram of an image display sub-window in an embodiment of the application;
fig. 9 is a schematic diagram of an application scenario of an image acquisition method according to an embodiment of the present application;
FIG. 10 is a schematic view of an application scenario of another image acquisition method according to an embodiment of the present application;
FIG. 11 is a schematic view of the structure of an image acquisition apparatus in an embodiment of the present application;
fig. 12 is a schematic diagram of a computer device in an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the description of the present application, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more features. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
In the description of the present application, the word "for example" is used to mean "serving as an example, instance, or illustration. Any embodiment described as "for example" in this disclosure is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for purposes of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known structures and processes have not been described in detail so as not to obscure the description of the application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
The image acquisition method provided by the embodiment of the application can be applied to an image acquisition system shown in fig. 1. The image acquisition system comprises a terminal 110 and an external camera device 120, wherein the terminal 110 can be one of a mobile phone, a tablet computer, a notebook computer and the like; the external image pickup apparatus 120 is an apparatus provided with an imaging apparatus. The external image pickup apparatus 120 may be connected to the terminal 110, for example, by a universal serial bus (Universal Serial Bus, USB) technology.
It will be appreciated by those skilled in the art that the application environment shown in fig. 1 is merely an application scenario of the present application, and is not limited to the application scenario of the present application, and other application environments may further include more or fewer computer devices than those shown in fig. 1, for example, only 1 external image capturing device 120 is shown in fig. 1, and it will be appreciated that the image capturing system may further include one or more other external image capturing devices 120, which is not limited herein.
It should be further noted that, the schematic view of the scenario of the image capturing system shown in fig. 1 is only an example, and the image capturing system and the scenario described in the embodiment of the present application are for more clearly describing the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided by the embodiment of the present application, and those skilled in the art can know that, with the evolution of the image capturing system and the appearance of a new service scenario, the technical solution provided by the embodiment of the present application is equally applicable to similar technical problems.
Referring to fig. 2, an embodiment of the present application provides an image acquisition method, mainly for the terminal 110 in fig. 1, which is mainly used for illustrating the method, and the method includes steps S201 to S202, specifically as follows:
s201, acquiring a first real-time image frame through an external camera device, and storing the first real-time image frame into an image queue.
The external image pickup device refers to image pickup equipment connected with the terminal, and can be a camera connected with the terminal through USB or equipment with an image pickup function. For example, the external image pickup apparatus may implement connection with a terminal and exchange data through a USB OTG (USB On-The-Go) technology.
It should be noted that the number of external image capturing apparatuses may be one or plural.
The first real-time image frame is a real-time data frame obtained by shooting by external camera equipment; specifically, the first real-time image frame may be a video data stream captured by an external image capturing apparatus.
The image queues are used for caching image frames, and the image queues are in one-to-one correspondence with the external image pickup equipment. For example, when the number of external image capturing apparatuses is plural, the data of the image queue is identical to the number of external image capturing apparatuses.
Specifically, the external camera equipment acquires an image in an image acquisition visual field range in real time as a first real-time image frame, the first real-time image frame is sent to the terminal, and after the terminal acquires the first real-time image frame, the first real-time image frame is stored in a corresponding image queue.
In one embodiment, as shown in fig. 3, steps S203 and S204 may also be performed before step 201 is performed, specifically as follows:
s203, responding to shooting trigger operation, and acquiring the equipment state of external shooting equipment;
s204, if the equipment state of the external image pickup equipment is a connection state, starting the external image pickup equipment.
The shooting triggering operation is used for triggering the terminal to start the shooting function based on the target application program. Specifically, the target application program terminal may provide a control for triggering the terminal to start the image capturing function, and the image capturing triggering operation may specifically be a touch operation, a cursor operation, a key operation, etc. which act on the control, and the image capturing triggering operation may also be a voice operation, etc., which is not limited herein.
For example, the target application program is a camera application of the application system corresponding to the terminal, the user can trigger the camera application in the target application program through the terminal, the terminal receives the shooting trigger operation, and relevant shooting equipment (such as local shooting equipment) of the terminal is started to take a picture; for another example, the target application program is a chat application, the chat application provides a video call function, the user can trigger the video call function in the target application program through the terminal, the terminal receives the shooting trigger operation, and relevant shooting equipment of the terminal is started to shoot so as to realize video call with other terminals; for another example, the target application program is a live broadcast application, a live broadcast function is provided in the live broadcast application, a user can trigger the live broadcast function in the target application program through the terminal, and related camera equipment of the terminal is started to carry out camera shooting so as to carry out live broadcast in real time.
The equipment state of the external image pickup equipment comprises a connection state and a disconnection state. It will be understood that the connection state refers to that the external image capturing device is connected with the terminal, that is, the external image capturing device is connected with the current terminal, and the disconnection state refers to that the external image capturing device is not connected with the terminal, that is, the connection between the current terminal and any external image capturing device is not established. Specifically, when an image capturing triggering operation triggered by a user is received, the terminal detects the equipment state of the external image capturing equipment to judge whether the external image capturing equipment exists, and when the equipment state of the external image capturing equipment is a connection state, namely the terminal is currently connected with the external image capturing equipment, the external image capturing equipment is started.
In this triggering mode, after receiving a triggering operation of capturing an image, a terminal starts a capturing function in response to the triggering operation of capturing an image, and detects whether an external capturing device exists at the same time, and when the external capturing device exists, the external capturing device is directly started to acquire a first real-time image frame, so that when a device switching operation is acquired subsequently, the first real-time image frame can be acquired immediately and displayed, and the problem that the capturing device is blocked or black screen due to time consumption in switching is avoided, so that different capturing devices can be switched rapidly.
Further, in one embodiment, referring to fig. 4, before executing the starting of the external image capturing apparatus, step S2031 may also be executed, specifically as follows: starting a local image pickup device, and acquiring a second real-time image frame through the local image pickup device; and displaying the second real-time image frame as output data.
The local image pickup device refers to an image pickup device preset by a terminal; the second real-time image frame is a real-time data frame captured by the local image capturing apparatus, and in particular, the second real-time image frame may be a video data stream captured by the local image capturing apparatus.
Specifically, upon receiving an image capturing trigger operation triggered by a user, the terminal starts a local image capturing device, and the local image capturing device captures an image within an image capturing field of view of the local image capturing device in real time as a second real-time image frame, and displays the second real-time image frame as output data by the terminal.
It can be understood that when receiving the shooting trigger operation triggered by the user, the terminal starts the local shooting device to collect the second real-time image frame in real time, and uses the second real-time image frame as output data to output and display, meanwhile, the terminal detects the device state of the external shooting device, and when the device state of the external shooting device is a connection state, the terminal collects the first real-time image frame through the external shooting device, and stores the first real-time image frame into the image sequence for subsequent calling.
In some embodiments, displaying the second real-time image frame as output data by the terminal may specifically include: and displaying the second real-time image frame as output data in an image browsing interface. The image browsing interface is an application interface provided by a target application program and is used for displaying image frames shot by the image shooting equipment.
For example, the target application program is a camera application of the application system corresponding to the terminal, after receiving the shooting trigger operation, the local shooting equipment is started to acquire a second real-time image frame, and the second real-time image frame is used as a preview image and is displayed in a preview frame displayed by the camera application.
Further, in some embodiments, displaying the second real-time image frame as output data by the terminal may include: and the second real-time image frame is used as output data to be displayed in the image browsing interface, the terminal sends the second real-time image frame to the server as a video data stream, and the server sends the second real-time video frame (namely the output data) to other terminals so as to realize different application functions.
For example, the target application program is a chat application, after receiving the shooting trigger operation, the video call function of the chat application is started, the local shooting equipment is started to acquire a second real-time image frame, the second real-time image frame is used as a video data stream (namely output data) of the video call, the terminal can display the second real-time image frame into a local video browsing window of the chat application on one hand, and on the other hand, the second real-time image frame is used as a video call server to send the second real-time image frame to the terminal corresponding to other video call participants as the video data stream.
For another example, the target application program is a live broadcast application, after receiving the shooting trigger operation, a live broadcast function of the live broadcast application is started, the local shooting equipment is started to acquire a second real-time image frame, the second real-time image frame is used as a live broadcast video data stream (namely output data), the terminal can display the second real-time image frame into a live broadcast window of the live broadcast application on one hand, and on the other hand, the second real-time image frame is sent to a live broadcast server, and the live broadcast server sends the second real-time image frame to a terminal corresponding to a live broadcast watching party as a live broadcast video data stream.
In one embodiment, displaying the second real-time image frame as output data includes: displaying the second real-time image frame as output data in an image browsing interface; after the external camera equipment is started, the method further comprises the following steps: in the image browsing interface, an image capturing apparatus switching control is displayed.
The image browsing interface is an application interface provided by a target application program and is used for displaying image frames shot by the image shooting equipment. The control provided by the image pickup device switching control for the target application program and used for triggering the switching of the image pickup device can be used for triggering the switching between the local image pickup device and the external image pickup device or the switching between different external image pickup devices. Taking a target application program as an example of a camera application, referring to fig. 5, fig. 5 shows a schematic diagram of an image browsing interface and a switching control of an image capturing apparatus in an embodiment of the present application.
Specifically, the terminal starts the local camera equipment to acquire a second real-time image frame in real time, takes the second real-time image frame as output data, displays the second real-time image frame on the image browsing interface, and starts the external camera equipment and displays a camera equipment switching control in the image browsing interface when detecting that the equipment state of the external camera equipment is a connection state. It will be appreciated that, after the image capturing apparatus switching control is triggered, the display of the second real-time image frame by the image browsing interface may be switched to the display of the first real-time image frame captured by the external image capturing apparatus.
In one embodiment, as shown in fig. 6, steps S203 and S204 may also be performed before step 201 is performed, specifically as follows:
s206, receiving access information of external camera equipment;
s207, responding to the access information, and acquiring the equipment state of the local camera equipment;
s208, if the device status of the local image capturing device is the running status, the external image capturing device is started.
The access information refers to information triggered when the external camera equipment is connected with the terminal.
Wherein the device state of the local image capturing device includes an operating state and a non-operating state; when the equipment state of the local camera equipment is an operation state, namely the camera function is started, the current terminal acquires images through the local camera equipment; when the device state of the local image capturing device is the non-operation state, that is, the image capturing function is turned off.
Specifically, when the external image pickup device establishes connection with the terminal, the operation of establishing connection triggers access information, the terminal responds to the trigger information to detect the device state of the local image pickup device so as to confirm whether the local image pickup device is in an operation state, and when the device state of the local image pickup device is in the operation state, the external image pickup device is directly started.
In this embodiment, the external camera device is started in another triggering mode, in which the target application program corresponding to the terminal has started the camera function, and the second real-time image frame is currently being acquired by the local camera device. At this time, the access information of the connection between the external camera device and the terminal is acquired, and the external camera device is directly started to acquire the first real-time image frame, so that when the device switching operation is acquired later, the first real-time image frame can be acquired and displayed in real time, the problem of blocking or screen blacking caused by time consumption of switching the camera device is avoided, and the quick switching of different camera devices is realized.
S202, responding to the switching operation of the equipment, acquiring a first real-time image frame from an image queue, and displaying the first real-time image frame as output data.
The device switching operation is used for switching the image pickup device, such as switching between a local image pickup device and an external image pickup device or switching between different external image pickup devices; the device switching operation may be a trigger operation (such as a click operation) based on the image capturing device switching control, or may be a voice trigger operation, which is not limited herein.
Specifically, the user can trigger the switching of the image capturing device in the target application program through the terminal, and after the terminal acquires the device switching operation, the terminal responds to the device switching operation to acquire a first real-time image frame shot by the external image capturing device from the image queue, and the first real-time image frame is used as output data to be displayed.
Further, when the number of the external image capturing apparatuses is plural, the apparatus switching operation may include identification information of the external image capturing apparatus; after acquiring the equipment switching operation, the terminal responds to the equipment switching operation to determine the identification information of the external camera equipment, further acquires a first real-time image frame shot by the target external camera equipment from an image queue corresponding to the target external camera equipment identified by the identification information, and displays the first real-time image frame as output data.
The first real-time image frame is displayed as output data, and specifically, the first real-time image frame is displayed as output data in an image browsing interface.
For example, the target application program is a camera application of the application system corresponding to the terminal, after receiving the device switching operation, the target application program acquires a first real-time image frame shot by the external image pickup device from the image queue, replaces an original preview image frame (for example, a second real-time image frame shot by the local image pickup device) with the first real-time image frame, and displays the first real-time image frame into a preview frame of the camera application.
Further, the first real-time image frame is displayed as output data, or the first real-time image frame is displayed as output data in the image browsing interface, the terminal sends the first real-time image frame to the server, and the server sends the first real-time video frame (i.e. output data) to other terminals to realize different application functions and realize the replacement of data streams.
For example, the target application program is a chat application, after receiving the device switching operation, a first real-time image frame shot by the external camera device is acquired from the image queue, the first real-time image frame is used for replacing an original video data stream (such as a second real-time image frame shot by the local camera device) as a video data stream (i.e. output data) of the video call, on one hand, the first real-time image frame can be displayed in a local video browsing window of the chat application, on the other hand, the first real-time image frame is sent to a video call server, and the video call server sends the first real-time image frame as the video data stream to terminals corresponding to other video call participants, so that the replacement of the video data stream is realized.
For example, after the target application program is a live broadcast application and the switching operation of the equipment is received, a first real-time image frame shot by the external camera equipment is obtained from an image queue, the first real-time image frame is used for replacing an original video data stream (such as a second real-time image frame shot by the local camera equipment) to be used as a live broadcast video data stream (namely output data), on one hand, the first real-time image frame can be displayed in a live broadcast window of the live broadcast application, on the other hand, the first real-time image frame is sent to a live broadcast server, and the live broadcast server sends the first real-time image frame to a terminal corresponding to a live broadcast watching party as a live broadcast video data stream, so that the replacement of the video data stream is realized.
In one embodiment, referring to fig. 7, after the saving of the first real-time image frame into the image queue is performed, step S209 may also be performed, specifically as follows: and S209, displaying the first real-time image frame in an image display sub-window in the image browsing interface.
The image display sub-window is a window additionally arranged in the image browsing interface, referring to fig. 8, and fig. 8 shows a schematic diagram of the image display sub-window in the embodiment of the application.
Specifically, after the external camera equipment collects the first real-time image frame, the terminal stores the first real-time image frame into the image queue and simultaneously displays the first real-time image frame through an image display sub-window in the image browsing interface.
It may be appreciated that the image browsing interface displays real-time image frames acquired by other image capturing devices, for example, may be a second real-time image frame of the local image capturing device; in addition, the real-time image frames displayed by the image browsing interface are used as output data, and can be sent to the server by the terminal, and the server sends the real-time image frames to other terminals to realize different application functions.
Further, the image display sub-windows are in one-to-one correspondence with the external image capturing devices, for example, when the number of the external image capturing devices is multiple, the number of the image display sub-windows is consistent with the number of the external image capturing devices.
In one embodiment, when the number of the image display sub-windows is multiple, the device switching operation may be a triggering operation acting on the image display sub-windows, and the user may trigger a certain image display sub-window in an interface corresponding to the target application program through the terminal to trigger switching of the image capturing device, after acquiring the device switching operation, the terminal determines the image display sub-window selected by the user through the position information carried by the device switching operation, and further acquires the first real-time image frame captured by the external image capturing device from an image queue corresponding to the first real-time image frame displayed by the image display sub-window, and displays the first real-time image frame as output data.
In one embodiment, step S202 displays the first real-time image frame as output data, specifically includes: and switching the first real-time image frame from the image display sub-window to the image browsing interface for display, and sending the first real-time image frame to the server as output data.
Specifically, after receiving the device switching operation, the terminal responds to the device switching operation, and displays the first real-time image frame as output data in the image browsing interface, meanwhile, the terminal also sends the first real-time image frame to the server, and the server sends the first real-time video frame (i.e. the output data) to other terminals to realize different application functions, so as to realize switching of the image browsing interface and the video stream data displayed by the image display sub-window and replacement of the output data (i.e. the video data stream).
It can be understood that the terminal can also switch the real-time image frames originally displayed in the image browsing interface to the image display sub-window for display.
In the image acquisition method, the first real-time image frame is acquired through the external image pickup device, the first real-time image frame is stored in the image queue, the first real-time image frame is acquired from the image queue in response to the switching operation of the device, the first real-time image frame is displayed as output data, the first real-time image frame is continuously acquired through the external image pickup device, the first real-time image frame is acquired from the image queue and displayed in real time when the switching operation of the device is acquired, the problem that the image pickup device is blocked or black screen due to time consumption is avoided when the switching operation of the image pickup device is performed is solved, and the different image pickup devices are rapidly switched.
The above embodiments are further described below in connection with specific application scenarios. Specifically, in some applications, it is necessary to call an image capturing apparatus to capture an image or video and provide a service to a user based on the captured image or video, for example, in a camera application, a terminal captures an image through the image capturing apparatus, and for example, in a chat application, a terminal device captures a real-time video by calling the image capturing apparatus to realize a video call function, and the like. In connection with fig. 1, a target application program is installed on the terminal 110, and the target application program includes a function that needs to call the image capturing device to capture an image or video for performing a related service, for example, the target application program may be a camera application, a chat application, a live broadcast application, etc., which is not specifically limited herein.
Referring to fig. 9, taking a target application as an example of a camera application, the terminal 110 is connected to the external image capturing apparatus 120 in advance, and a user performs an image capturing trigger operation based on the terminal 110 to trigger opening of the camera application. The terminal 110 starts the local image capturing apparatus in response to the image capturing trigger operation, and acquires a second real-time image frame through the local image capturing apparatus, and displays the second real-time image frame as output data in the image browsing interface. Meanwhile, the terminal 110 detects the device state of the external image capturing device, and since the terminal 110 is connected with the external image capturing device 120 in advance, at this time, the device state of the external image capturing device is a connection state, the terminal 110 starts the external image capturing device 120, acquires the first real-time image frame through the external image capturing device, and stores the first real-time image frame in the image queue. In addition, the terminal 110 also displays an image capturing apparatus switching control in the image browsing interface. When equipment switching operation of a user aiming at an image pickup equipment switching control is received, a first real-time image frame is obtained from an image queue, and the first real-time image frame is used for replacing a second real-time image frame and is used as output data to be displayed on an image browsing interface.
Referring to fig. 10, taking a target application as an example of a live application, the terminal 110 includes an external image capturing apparatus (a) and an external image capturing apparatus (b) in advance with two external image capturing apparatuses 120, for example. The user performs a camera triggering operation based on the terminal 110 to trigger the opening of the live broadcast function in the live broadcast application. The terminal 110 starts the local image capturing device in response to the image capturing trigger operation, acquires a second real-time image frame through the local image capturing device, displays the second real-time image frame as output data in the image browsing interface, sends the second real-time image frame to the live broadcast server, and sends the second real-time video frame to the terminal corresponding to the live broadcast viewer through the live broadcast server.
Meanwhile, the terminal 110 detects the device status of the external image capturing device, and since the terminal 110 is connected with the two external image capturing devices 120 in advance, at this time, the device statuses of the external image capturing device (a) and the external image capturing device (b) are both connected, the terminal 110 starts the connected external image capturing device (a) and external image capturing device (b), respectively acquires the first real-time image frame (a) and the first real-time image frame (b) through the external image capturing device (a) and the external image capturing device (b), saves the first real-time image frame (a) into an image queue corresponding to the external image capturing device (a), and saves the first real-time image frame (b) into an image queue corresponding to the external image capturing device (b). In addition, the terminal 110 further opens an image display sub-window (a) and an image display sub-window (b) in the image browsing interface, and displays the first real-time image frame (a) and the first real-time image frame (b) in the image display sub-window, respectively, as shown in fig. 10.
When receiving the device switching operation triggered by the user based on the image display sub-window (a), the image display sub-window (a) displays a first real-time image frame (a), the terminal acquires the first real-time image frame (a) from an image queue of the corresponding external camera device (a), takes the first real-time image frame (a) as output data, replaces a second real-time image frame to display on an image browsing interface, replaces the second real-time image frame with the first real-time image frame to be sent to a live broadcast server, and the live broadcast server sends the first real-time image frame to a terminal corresponding to a live broadcast watching party. At this time, the second real-time image frame is switched to be displayed in the image display sub-window (a).
Taking the chat application as an example, the terminal 110 is not connected to the external image capturing device 120 in advance, and the user performs an image capturing triggering operation based on the terminal 110 to trigger a video chat function of opening the chat application. The terminal 110 starts the local image capturing device in response to the image capturing trigger operation, acquires a second real-time image frame through the local image capturing device, displays the second real-time image frame as output data in the image browsing interface, and simultaneously sends the second real-time image frame to the video call server, and the video call server sends the second real-time image frame to terminals corresponding to other video call participants.
At this time, the user accesses the external device 120 to the terminal 110 through the USB, the terminal 110 detects the connection state of the external image capturing device, and the terminal 110 responds to the access information to obtain the device state of the local image capturing device; since the device state of the local image capturing device is the running state, the terminal 110 directly starts the external image capturing device 120, acquires the first real-time image frame through the external image capturing device, and stores the first real-time image frame in the image queue. When the equipment switching operation triggered by the user is received, a first real-time image frame is obtained from an image queue, the first real-time image frame is used as output data, the second real-time image frame is replaced to be displayed on an image browsing interface, meanwhile, the second real-time image frame is switched into the first real-time image frame to be sent to a video call server, and the video call server sends the first real-time image frame to terminals corresponding to other video call participants.
In order to better implement the image capturing method provided in the embodiment of the present application, on the basis of the image capturing method provided in the embodiment of the present application, an image capturing apparatus is further provided in the embodiment of the present application, as shown in fig. 11, an image capturing apparatus 1100 includes:
the image acquisition module 1101 is configured to acquire a first real-time image frame through an external image capturing device, and store the first real-time image frame in an image queue;
and the switching operation module 1102 is configured to obtain a first real-time image frame from the image queue in response to the device switching operation, and display the first real-time image frame as output data.
In some embodiments of the present application, the image obtaining apparatus further includes an equipment opening module, configured to obtain an equipment state of the external image capturing device in response to a capturing trigger operation; and if the equipment state of the external image pickup equipment is a connection state, starting the external image pickup equipment.
In some embodiments of the present application, the device opening module is further configured to start a local image capturing device, and acquire a second real-time image frame through the local image capturing device; and displaying the second real-time image frame as output data.
In some embodiments of the present application, the device opening module is further configured to display the second real-time image frame as output data in the image browsing interface; in the image browsing interface, an image capturing apparatus switching control is displayed.
In some embodiments of the present application, the device opening module is further configured to receive access information of the external image capturing device; responding to the access information to acquire the equipment state of the local camera equipment; and if the equipment state of the local image pickup equipment is an operation state, starting the external image pickup equipment.
In some embodiments of the present application, the image acquisition module is further configured to display the first real-time image frame in an image display sub-window in the image browsing interface.
In some embodiments of the present application, the switching operation module is configured to switch the first real-time image frame from the image display sub-window to the image browsing interface for display, and send the first real-time image frame as output data to the server.
In some embodiments of the present application, the image acquisition apparatus 1100 may be implemented in the form of a computer program that is executable on a computer device as shown in fig. 12. The memory of the computer device may store various program modules constituting the image acquisition apparatus 1100, such as the image acquisition module 1101 and the switching operation module 1102 shown in fig. 9. The computer program constituted by the respective program modules causes the processor to execute the steps in the image acquisition method of the respective embodiments of the present application described in the present specification.
For example, the computer apparatus shown in fig. 12 may execute step S201 by the image acquisition module 1101 in the image acquisition apparatus 1100 shown in fig. 11. The computer device may execute step S202 through the switching operation module 1102. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external computer device through a network connection. The computer program is executed by a processor to implement an image acquisition method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 12 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In some embodiments of the application, a computer device is provided that includes one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to perform the steps of the image acquisition method described above. The steps of the image acquisition method here may be the steps in the image acquisition methods of the respective embodiments described above.
In some embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, the computer program being loaded by a processor, so that the processor performs the steps of the above-described image acquisition method. The steps of the image acquisition method here may be the steps in the image acquisition methods of the respective embodiments described above.
Those of ordinary skill in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein can include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can take many forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing has described in detail the methods, apparatuses, computer devices and storage medium for image acquisition provided by the embodiments of the present application, and specific examples have been applied to illustrate the principles and embodiments of the present application, and the above description of the embodiments is only for aiding in understanding the methods and core ideas of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, the present description should not be construed as limiting the present application.

Claims (7)

1. An image acquisition method, comprising:
starting a local image pickup device, acquiring a second real-time image frame through the local image pickup device, and displaying the second real-time image frame in an image browsing interface as output data;
responding to an image capturing triggering operation, acquiring the equipment state of external image capturing equipment, starting the external image capturing equipment if the equipment state of the external image capturing equipment is a connection state, acquiring a first real-time image frame through the external image capturing equipment, and storing the first real-time image frame into an image queue;
and responding to equipment switching operation, acquiring the first real-time image frame from the image queue, and displaying the first real-time image frame in an image display sub-window in an image browsing interface, wherein the image display sub-window corresponds to the external camera equipment one by one.
2. The method according to claim 1, wherein after the external image capturing apparatus is started, further comprising:
and displaying a switching control of the image capturing device in the image browsing interface.
3. The method of claim 1, wherein prior to acquiring the first real-time image frame by the external imaging device, further comprising:
receiving access information of external camera equipment;
responding to the access information, and acquiring the equipment state of the local camera equipment;
and if the equipment state of the local camera equipment is an operation state, starting the external camera equipment.
4. The method of claim 1, wherein displaying the first real-time image frame as output data comprises:
and switching the first real-time image frame from the image display sub-window to the image browsing interface for display, and sending the first real-time image frame to a server as output data.
5. An image acquisition apparatus, the apparatus comprising:
the image acquisition module is used for starting a local image pickup device, acquiring a second real-time image frame through the local image pickup device, and displaying the second real-time image frame in an image browsing interface as output data;
responding to an image capturing triggering operation, acquiring the equipment state of external image capturing equipment, starting the external image capturing equipment if the equipment state of the external image capturing equipment is a connection state, acquiring a first real-time image frame through the external image capturing equipment, and storing the first real-time image frame into an image queue;
and the switching operation module is used for responding to equipment switching operation, acquiring the first real-time image frame from the image queue, and displaying the first real-time image frame in an image display sub-window in an image browsing interface, wherein the image display sub-window corresponds to the external camera equipment one by one.
6. A mobile terminal, the mobile terminal comprising:
one or more processors;
a memory; and
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the image acquisition method of any one of claims 1 to 4.
7. A computer-readable storage medium, having stored thereon a computer program, the computer program being loaded by a processor to perform the steps of the image acquisition method of any one of claims 1 to 4.
CN202210032571.8A 2022-01-12 2022-01-12 Image acquisition method, device, mobile terminal and storage medium Active CN114501136B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210032571.8A CN114501136B (en) 2022-01-12 2022-01-12 Image acquisition method, device, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210032571.8A CN114501136B (en) 2022-01-12 2022-01-12 Image acquisition method, device, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN114501136A CN114501136A (en) 2022-05-13
CN114501136B true CN114501136B (en) 2023-11-10

Family

ID=81511304

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210032571.8A Active CN114501136B (en) 2022-01-12 2022-01-12 Image acquisition method, device, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN114501136B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116347015B (en) * 2023-05-26 2023-10-20 深圳市拔超科技股份有限公司 System and method for smooth switching based on multiple USB cameras

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716535A (en) * 2013-12-12 2014-04-09 乐视致新电子科技(天津)有限公司 Method for switching photographing mode, and electronic device
CN106658032A (en) * 2017-01-19 2017-05-10 三峡大学 Multi-camera live method and system
CN107222677A (en) * 2017-05-27 2017-09-29 成都通甲优博科技有限责任公司 The method and device that multi-cam is opened simultaneously
CN108200341A (en) * 2018-01-15 2018-06-22 青岛海信移动通信技术股份有限公司 Seamless handover method, device and the terminal device of camera
CN110266983A (en) * 2019-06-30 2019-09-20 联想(北京)有限公司 A kind of image processing method, equipment and storage medium
CN111314646A (en) * 2020-02-27 2020-06-19 Oppo(重庆)智能科技有限公司 Image acquisition method, image acquisition device, terminal device and readable storage medium
CN112866725A (en) * 2021-01-14 2021-05-28 视联动力信息技术股份有限公司 Live broadcast control method and device
CN112911147A (en) * 2021-01-27 2021-06-04 维沃移动通信有限公司 Display control method, display control device and electronic equipment
CN113852833A (en) * 2021-08-30 2021-12-28 阿里巴巴(中国)有限公司 Multi-device collaborative live broadcast method and device and electronic device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716535A (en) * 2013-12-12 2014-04-09 乐视致新电子科技(天津)有限公司 Method for switching photographing mode, and electronic device
CN106658032A (en) * 2017-01-19 2017-05-10 三峡大学 Multi-camera live method and system
CN107222677A (en) * 2017-05-27 2017-09-29 成都通甲优博科技有限责任公司 The method and device that multi-cam is opened simultaneously
CN108200341A (en) * 2018-01-15 2018-06-22 青岛海信移动通信技术股份有限公司 Seamless handover method, device and the terminal device of camera
CN110266983A (en) * 2019-06-30 2019-09-20 联想(北京)有限公司 A kind of image processing method, equipment and storage medium
CN111314646A (en) * 2020-02-27 2020-06-19 Oppo(重庆)智能科技有限公司 Image acquisition method, image acquisition device, terminal device and readable storage medium
CN112866725A (en) * 2021-01-14 2021-05-28 视联动力信息技术股份有限公司 Live broadcast control method and device
CN112911147A (en) * 2021-01-27 2021-06-04 维沃移动通信有限公司 Display control method, display control device and electronic equipment
CN113852833A (en) * 2021-08-30 2021-12-28 阿里巴巴(中国)有限公司 Multi-device collaborative live broadcast method and device and electronic device

Also Published As

Publication number Publication date
CN114501136A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
CN111917988B (en) Remote camera application method, system and medium of cloud mobile phone
US10009543B2 (en) Method and apparatus for displaying self-taken images
CN109167931B (en) Image processing method, device, storage medium and mobile terminal
CN111586282B (en) Shooting method, shooting device, terminal and readable storage medium
CN107682714B (en) Method and device for acquiring online video screenshot
CN109089131B (en) Screen recording live broadcast method, device, equipment and storage medium based on IOS system
CN111491102A (en) Detection method and system for photographing scene, mobile terminal and storage medium
US9064349B2 (en) Computer-implemented image composition method and apparatus using the same
CN114501136B (en) Image acquisition method, device, mobile terminal and storage medium
CN112153396A (en) Page display method, device and system and storage medium
CN113014798A (en) Image display method and device and electronic equipment
CN113992883A (en) Video conference processing method, processing device, conference system, and storage medium
CN111314648A (en) Information processing method, processing device, first electronic equipment and server
CN111586280B (en) Shooting method, shooting device, terminal and readable storage medium
CN113438550A (en) Video playing method, video conference method, live broadcasting method and related devices
CN116567407A (en) Camera parameter configuration method and electronic equipment
CN112153291B (en) Photographing method and electronic equipment
CN114915851A (en) Video recording and playing method and device
CN111461950A (en) Image processing method and device
CN112653841B (en) Shooting method and device and electronic equipment
CN114157626A (en) Method, system, storage medium and computer equipment for transmitting photos by photographing
KR20230086770A (en) Shooting method, shooting device, electronic device and readable storage medium
CN111724398A (en) Image display method and device
CN112118414A (en) Video session method, electronic device, and computer storage medium
CN110673919A (en) Screen capturing method and device

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
GR01 Patent grant
GR01 Patent grant