CN110620911B - Video stream processing method and device of camera and terminal equipment - Google Patents

Video stream processing method and device of camera and terminal equipment Download PDF

Info

Publication number
CN110620911B
CN110620911B CN201910909294.2A CN201910909294A CN110620911B CN 110620911 B CN110620911 B CN 110620911B CN 201910909294 A CN201910909294 A CN 201910909294A CN 110620911 B CN110620911 B CN 110620911B
Authority
CN
China
Prior art keywords
camera
operation instruction
probability
video stream
user
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
CN201910909294.2A
Other languages
Chinese (zh)
Other versions
CN110620911A (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.)
Beijing Megvii Technology Co Ltd
Original Assignee
Beijing Megvii 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 Megvii Technology Co Ltd filed Critical Beijing Megvii Technology Co Ltd
Priority to CN201910909294.2A priority Critical patent/CN110620911B/en
Publication of CN110620911A publication Critical patent/CN110620911A/en
Application granted granted Critical
Publication of CN110620911B publication Critical patent/CN110620911B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • 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
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources

Abstract

The invention provides a video stream processing method, a video stream processing device and terminal equipment of a camera, wherein the method comprises the following steps: receiving a current operation instruction which is triggered by a user and is associated with a camera; determining a target camera to be used by a user from the plurality of cameras according to the current operation instruction; preprocessing the video stream of the target camera; and if the user triggers the target camera, displaying the video stream preprocessed by the target camera. The method can predict the camera which is probably used by the user based on the operation instruction of the user, preprocesses the predicted video stream of the camera, and selectively preprocesses the video stream of the camera based on the prediction result, compared with a method of preprocessing only the video stream of the specified camera or preprocessing the video streams of all the cameras, the method can avoid the video display fall caused by the switching of the cameras while the resource consumption is low, thereby improving the user experience.

Description

Video stream processing method and device of camera and terminal equipment
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for processing a video stream of a camera, and a terminal device.
Background
The mobile phone that shoots more becomes the main product of making a print of each cell-phone firm, when using the mobile phone that shoots more and shoot or make a video recording, the user can switch the camera according to the demand of oneself, and when switching the camera, the camera of newly-starting can fall the video stream and make an uproar, optimization such as correction, but before optimization is accomplished, new camera display effect and former camera display effect are great in the switching camera time difference, and user experience is relatively poor.
In view of the above problems, one processing method in the related art is to set a switching camera in advance and optimize a video stream of the camera in advance, but when the camera is switched, if a user does not switch to the set camera, a large display gap may also occur, which affects user experience. In another processing mode, all video streams of the cameras are usually optimized, but this mode consumes a lot of resources of the system, resulting in waste of resources.
Disclosure of Invention
The invention aims to provide a video stream processing method and device of a camera and terminal equipment, so that video display fall caused by camera switching can be avoided while resource consumption is low, and user experience is improved.
In a first aspect, an embodiment of the present invention provides a method for processing a video stream of a camera, where the method is applied to a terminal device, and the terminal device is provided with a plurality of cameras; the method comprises the following steps: receiving a current operation instruction which is triggered by a user and is associated with a camera; determining a target camera to be used by a user from the plurality of cameras according to the current operation instruction; preprocessing a video stream of a target camera; and if the user triggers the target camera, displaying the video stream preprocessed by the target camera.
In a preferred embodiment of the present invention, the step of determining a target camera to be used by a user from the plurality of cameras according to the current operation instruction includes: determining the probability that a user will use each camera in a plurality of cameras according to the current operation instruction; and determining the target camera according to the probability.
In a preferred embodiment of the present invention, the step of determining the probability that the user will use each of the plurality of cameras according to the current operation instruction includes: and obtaining the probability of each camera corresponding to the current operation instruction from the corresponding relation between the preset operation instruction and the probability of each camera.
In a preferred embodiment of the present invention, the step of obtaining the probability of each camera corresponding to the current operation instruction from the preset correspondence between the operation instruction and the probability of each camera includes: searching a first probability of each camera corresponding to the current operation instruction from a first corresponding relation of the preset operation instruction and the probability of each camera; and/or searching a second probability of each camera corresponding to the current operation instruction from a preset second corresponding relation between the operation instruction and the probability of each camera; and determining the second corresponding relation according to the historical operation instruction of the user and the historical camera actually triggered.
In a preferred embodiment of the present invention, the step of determining the target camera according to the probability includes: and determining the camera with the highest probability as the target camera in the probability of each camera.
In a preferred embodiment of the present invention, the step of preprocessing the video stream of the target camera includes: acquiring a video stream collected by a target camera; preprocessing a video stream acquired by a target camera in a preset image processing mode; the image processing mode comprises one or more of image noise reduction, image deblurring and image correction.
In a preferred embodiment of the present invention, after the step of preprocessing the video stream of the target camera, the method includes: and receiving a final camera triggered by a user, and updating the second corresponding relation according to the final camera if the corresponding relation comprises the second corresponding relation.
In a preferred embodiment of the present invention, the current operation command includes: selecting a portrait photographing mode, selecting a night photographing mode, or selecting a panorama photographing mode.
In a second aspect, an embodiment of the present invention provides a video stream processing apparatus for cameras, where the apparatus is disposed in a terminal device, and the terminal device is provided with a plurality of cameras; the device includes:
the instruction receiving module is used for receiving a current operation instruction which is triggered by a user and is associated with the camera;
the camera determining module is used for determining a target camera to be used by the user from the plurality of cameras according to the current operation instruction;
the preprocessing module is used for preprocessing the video stream of the target camera;
and the display module is used for displaying the video stream preprocessed by the target camera if the target camera is triggered by the user.
In a third aspect, an embodiment of the present invention provides a terminal device, where the terminal device includes: the device comprises an image acquisition device, a processing device and a storage device; wherein the image acquisition device comprises a plurality of cameras; the image acquisition equipment is used for acquiring a video stream; the storage means has stored thereon a computer program which, when run by a processing apparatus, executes the steps of the video stream processing method of the above-described camera.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processing device, the computer program performs the steps of the video stream processing method for a camera.
The embodiment of the invention has the following beneficial effects:
the invention provides a video stream processing method, a device and terminal equipment of a camera, which comprises the steps of firstly receiving a current operation instruction which is triggered by a user and is associated with the camera; determining a target camera to be used by a user from the plurality of cameras according to the current operation instruction; further preprocessing the video stream of the target camera; and if the user triggers the target camera, displaying the video stream preprocessed by the target camera. The method can predict the camera which is probably used by the user based on the operation instruction of the user, preprocesses the predicted video stream of the camera, and selectively preprocesses the video stream of the camera based on the prediction result, compared with a method of preprocessing only the video stream of the specified camera or preprocessing the video streams of all the cameras, the method can avoid the video display fall caused by the switching of the cameras while the resource consumption is low, thereby improving the user experience.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 2 is a flowchart of a video stream processing method for a camera according to an embodiment of the present invention;
fig. 3 is a flowchart of a video stream processing method for another camera according to an embodiment of the present invention;
fig. 4 is a flowchart of a video stream processing method for another camera according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a video stream processing apparatus of a camera according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
With the development of science and technology, the mobile phone configuration of each large mobile phone manufacturer is changed from single-shot to double-shot and multi-shot, so that the multi-shot mobile phone becomes a main printing product of each mobile phone manufacturer. When using the cell-phone that shoots more to shoot and shoot, the user can switch the camera according to the demand of oneself, and when switching the camera, the camera of newly-starting can carry out a series of processing optimization flows to the video stream, has caused new camera display effect and former camera display effect to switch the camera time difference apart from great to lead to user experience relatively poor. For the problem, an AI (Artificial Intelligence) intelligent optimization method can be configured in the mobile phone to improve the user experience, but when the camera is switched by the method, the process of processing by a new camera is long, and the user experience is also influenced.
Based on this, when switching between multiple cameras at present, a camera for switching is usually set in advance, and partial processing is performed on a video stream of the set camera in advance, when a user switches to the set camera, because the camera is subjected to partial processing, the difference between the display effect and the difference before switching is very small, and user experience is not affected, but when the camera is switched, if the user does not switch to the set camera, for example, the camera 1 for switching is set well, but the user really switches to the camera 3, the difference between the display effect and the difference before switching is large, so the method has poor self-adaptability to different users, and the user experience is also poor. The related art also provides another switching mode, wherein video streams of all cameras are preprocessed for a plurality of cameras, and when a user switches the cameras, the preprocessed video streams can be directly obtained no matter which camera is switched to, but the mode consumes a large amount of computing resources, and resources are wasted.
In view of the foregoing description, embodiments of the present invention provide a method and an apparatus for processing a video stream of a camera, and a terminal device, where the technology may be applied to image capturing, video capturing, or other video processing scenarios, and the technology may be implemented by using corresponding software and hardware, and the following detailed description is provided for embodiments of the present invention.
The first embodiment is as follows:
first, an exemplary terminal device 100 for implementing a video stream processing method of a camera according to an embodiment of the present invention is described with reference to fig. 1.
As shown in fig. 1, the terminal device 100 includes one or more processing devices 102, one or more storage devices 104, an input device 106, an output device 108, and one or more image capturing devices 110, where the image capturing devices 110 include a plurality of cameras, and these components are interconnected via a bus system 112 and/or other types of connection mechanisms (not shown). It should be noted that the components and structure of the terminal device 100 shown in fig. 1 are exemplary only, and not limiting, and the terminal device may have other components and structures as desired.
The processing device 102 may be a gateway, or may be a device including a Central Processing Unit (CPU) or other form of processing unit having data processing capability and/or instruction execution capability, and may process data of other components in the terminal device 100 and may control other components in the terminal device 100 to perform desired functions.
The storage 104 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc. On which one or more computer program instructions may be stored that may be executed by processing device 102 to implement client functionality (implemented by the processing device) and/or other desired functionality in embodiments of the present invention described below. Various applications and various data, such as various data used and/or generated by the applications, may also be stored in the computer-readable storage medium.
The input device 106 may be a device used by a user to input instructions and may include one or more of a keyboard, a mouse, a microphone, a touch screen, and the like.
The output device 108 may output various information (e.g., images or sounds) to the outside (e.g., a user), and may include one or more of a display, a speaker, and the like.
The image capture device 110 may capture preview video frames or image data and store the captured preview video frames or image data in the storage 104 for use by other components.
For example, the devices in the terminal device for implementing the video stream processing method and apparatus for a camera and the terminal device according to the embodiments of the present invention may be integrally disposed, or may be dispersedly disposed, such as integrally disposing the processing device 102, the storage device 104, the input device 106 and the output device 108, and disposing the image capturing device 110 at a specific position where a target image can be captured. When the devices in the terminal device are integrally provided, the terminal device may be implemented as a smart terminal such as a smart phone, a tablet computer, a computer, or the like.
Example two:
the embodiment provides a video stream processing method of a camera, which is executed by a processing device in the terminal device; the processing device can be any device or chip with data processing capability, and the terminal device is provided with a plurality of cameras; as shown in fig. 2, the video stream processing method of the camera includes the following steps:
step S202, receiving a current operation instruction which is triggered by a user and is associated with the camera.
The above operation instruction may be understood as an operation instruction that may use a camera, where the operation instruction may be to start a camera APP (Application), set a camera shooting mode, or start a shooting-related function in an Application, for example, a shooting function in a shopping APP, a two-dimensional code scanning function in a communication APP, or the like. In a specific implementation, the operation instruction may be a photographing mode or a video mode set or selected by a user in the terminal device, and different photographing modes or video modes may be set according to different scenes, subjects or wide angles, for example, a portrait photographing mode is set when a person is photographed. Usually, a user can click a corresponding button in the terminal device and select a corresponding mode by touching a screen according to requirements to trigger a current operation instruction.
And step S204, determining a target camera to be used by the user from the plurality of cameras according to the current operation instruction.
The plurality of cameras can include a telephoto camera, a wide-angle camera, a depth sensing camera, a zoom camera and the like according to functional division, and can include a front camera and a rear camera according to position division. Generally, different operation commands correspond to different shooting functions, and therefore, the cameras used are different. For example, if the current operation instruction is the scene shooting mode, it can be presumed that the target camera to be used by the user is a rear camera, a wide-angle camera, a depth sensing camera, or the like; if the current operation instruction is in a self-timer mode, the target camera to be used by the user can be presumed to be a front camera. Therefore, a certain corresponding relationship exists between the operation instruction and the target camera to be used by the user, and based on the corresponding relationship, the target camera corresponding to the current operation instruction can be determined.
In another implementation mode, the historical data of the user can be continuously collected in the process that the user uses the functions related to the camera, the use habit of the user is analyzed in a personalized mode, and the corresponding relation between the operation instruction and the target camera based on the user habit is obtained; since the corresponding relationship can describe the usage habits of the user more accurately, the target camera determined based on the corresponding relationship is generally more accurate.
And step S206, preprocessing the video stream of the target camera.
After the target camera is determined, the video stream collected by the target camera can be obtained, and after the video stream is collected, the video stream is subjected to noise reduction, deblurring, correction and other processing based on the parameters of the video stream, such as brightness, color and the like, so that the video stream can better accord with the visual aesthetic effect of human eyes. The above preprocessing process may also be referred to as partial processing, that is, performing optimization processing such as image noise reduction, image deblurring or image correction on a video stream captured by a target camera, and generally does not include processing of an image based on user requirements. In the preprocessing process, the video stream of the target camera is not displayed on the display screen generally, and if a user triggers or switches to the target camera subsequently, the subsequent video stream is preprocessed in real time and then displayed based on the relevant parameters of the preprocessing.
And step S208, if the user triggers the target camera, displaying the video stream preprocessed by the target camera.
After the user triggers the current command, the user usually selects a camera to be photographed. Since the target camera is determined based on the current operation instruction of the user, in most cases, the camera selected by the user is consistent with the target camera. And if the user triggers the target camera, the terminal equipment displays the video stream preprocessed by the target camera. When the user triggers the target camera, the target camera can be directly started and displayed, at the moment, the video stream is stable when being displayed, and the situations of image blurring, darkness, deformation and the like at the initial stage can not be displayed. When the user triggers the target camera, the target camera can be switched from the original camera, and the display effect of the target camera is very small in shooting difference with the original camera due to the fact that the target camera is preprocessed in advance, so that the image quality of an image cannot be influenced, and the experience of the user is enhanced.
The embodiment of the invention provides a video stream processing method of a camera, which comprises the steps of firstly receiving a current operation instruction which is triggered by a user and is associated with the camera; determining a target camera to be used by a user from the plurality of cameras according to the current operation instruction; further preprocessing the video stream of the target camera; and if the user triggers the target camera, displaying the video stream preprocessed by the target camera. The method can predict the camera which is probably used by the user based on the operation instruction of the user, preprocesses the predicted video stream of the camera, and selectively preprocesses the video stream of the camera based on the prediction result, compared with a method of preprocessing only the video stream of the specified camera or preprocessing the video streams of all the cameras, the method can avoid the video display fall caused by the switching of the cameras while the resource consumption is low, thereby improving the user experience.
Example three:
the present embodiment provides another video stream processing method for a camera, which is implemented on the basis of the embodiment shown in fig. 2; the embodiment mainly describes a specific process of determining a target camera to be used by a user from a plurality of cameras according to a current operation instruction; as shown in fig. 3, the method comprises the steps of:
step S302, receiving a current operation instruction which is triggered by a user and is associated with the camera.
Step S304, determining the probability that the user will use each camera in the plurality of cameras according to the current operation instruction;
generally, the terminal device stores the use probability of each camera corresponding to the operation instruction, so that the use probability of each camera can be predicted according to the current operation instruction, for example, the terminal device is installed with 4 cameras, which are respectively a front camera and a rear camera 1, 2 and 3, if the shooting mode set by the current operation instruction is a portrait shooting mode, then the probability of the camera which can be switched is: the probability of the front camera is 0.7, the probability of the rear camera 1 is 0.1, the probability of the rear camera 2 is 0.1, and the probability of the rear camera 3 is 0.1.
And step S306, determining the target camera according to the probability.
Based on the magnitude of the probability, a target camera may be determined. In a specific implementation, the camera with the highest probability in the probabilities of each camera may be determined as the target camera. The number of the cameras with the highest probability may be one or multiple, and when the number of the cameras with the highest probability is multiple, the multiple cameras are determined as target cameras, for example, if the probability of the front camera is 0.1, the probability of the rear camera 1 is 0.4, the probability of the rear camera 2 is 0.4, and the probability of the rear camera 3 is 0.1, the rear camera 1 and the rear camera 2 are determined as target cameras.
In another mode, the cameras may be sorted according to the probability, and one or more cameras with higher probability may be selected as the final predictive camera, for example, if the probability of the front camera is 0.1, the probability of the rear camera 1 is 0.4, the probability of the rear camera 2 is 0.2, and the probability of the rear camera 3 is 0.3, the rear camera 1 and the rear camera 3 are determined as the target cameras.
And step S308, preprocessing the video stream of the target camera.
Step S310, if the user triggers the target camera, displaying the video stream preprocessed by the target camera.
The video stream processing method of the camera comprises the steps of firstly receiving a current operation instruction which is triggered by a user and is associated with the camera; determining the probability that the user will use each camera in the plurality of cameras based on the operation instruction; then determining a target camera according to the probability; and then preprocessing the video stream of the target camera, and if the user triggers the target camera, displaying the preprocessed video stream of the target camera. According to the method, different target cameras can be predicted according to different operation instructions, and then video streams of the predicted target cameras are preprocessed, so that resource consumption can be reduced, and user experience is improved.
Example four:
the present embodiment provides another video stream processing method for a camera, which is implemented on the basis of the embodiment shown in fig. 2; the embodiment mainly describes a specific process of preprocessing a video stream of a target camera and a specific process of preprocessing the video stream of the target camera; as shown in fig. 4, the method includes the steps of:
step S402, receiving a current operation instruction which is triggered by a user and is associated with the camera; wherein the current operation instruction may include: selecting a portrait photographing mode, selecting a night photographing mode, selecting a panorama photographing mode, and the like.
The user can select different shooting modes according to requirements, and the portrait shooting mode can be selected when people or animals are shot or shot in general; the night shooting mode can be selected when shooting at night or under the condition of dark light; the panorama photographing mode may be selected when photographing natural scenery, buildings, or program shows, etc.
Step S404, obtaining the probability of each camera corresponding to the current operation instruction from the preset corresponding relationship between the operation instruction and the probability of each camera.
The correspondence may be preset, or may be determined according to a camera actually triggered by the history of the same user. The correspondence is usually stored in the terminal device in the form of a table, and the table usually stores the operation instruction of the user and the probability of each camera corresponding to the operation instruction. Table 1 shows the correspondence when the terminal device is equipped with three cameras (front camera, rear camera 1, and rear camera 2):
TABLE 1
Figure BDA0002213747310000121
In a specific implementation, the step S404 may be implemented in any one of the following manners, or may be implemented in a combination of the two manners:
the first method is as follows: and searching the first probability of each camera corresponding to the current operation instruction from the preset first corresponding relation between the operation instruction and the probability of each camera.
The first correspondence relationship is usually a correspondence relationship between an operation instruction and a predicted probability of each camera, which is preset by a developer, and the correspondence relationship is usually stored in the terminal device in a form of a table, the table usually includes keys and key values, the normal keys (which may also be referred to as keywords) represent preset operation instructions, that is, different photographing modes, and the key values represent the probability of each camera corresponding to each photographing model.
Generally, an operation instruction which is the same as or similar to the current operation instruction is searched from the first corresponding relationship, and the probability of each camera corresponding to the searched operation instruction is determined as the first probability corresponding to the current operation instruction.
The second method comprises the following steps: searching a second probability of each camera corresponding to the current operation instruction from a preset second corresponding relation between the operation instruction and the probability of each camera; and determining the second corresponding relation according to the historical operation instruction of the user and the historical camera actually triggered.
The second correspondence is generally an operation instruction set according to the habit of the user, and the probability of each corresponding camera. The habit of the user is usually the probability of switching to each camera when the user triggers the current operation instruction at historical time, and the storage form of the second corresponding relation is the same as that of the first corresponding relation. Usually, the probability of each camera corresponding to the operation instruction in the second correspondence relationship may be updated according to the operation instruction triggered by the user and the actually triggered camera, where for each operation instruction, the triggering times of the history actually triggered camera is proportional to the probability of the camera.
For example, continuously collecting operation instructions triggered by a user and historical data of a camera actually triggered; if the user triggers the one-time operation instruction A, the actually triggered camera is the camera 1; when the user triggers the operation instruction a again, the actually triggered camera is still the camera 1, so the probability of the camera 1 corresponding to the operation instruction a is 1, and the probabilities of the other cameras are 0. For another example, if the user triggers the operation instruction a once, the actually triggered camera is the camera 1; when the user triggers the operation instruction a again, the actually triggered cameras are the camera 1 and the camera 2, and then the probability of the camera 1 corresponding to the operation instruction a may be 0.8, the probability of the camera 2 is 0.2, and the probabilities of the other cameras are 0.
Therefore, according to the operation instruction continuously triggered by the user and the collected actually triggered cameras, the corresponding relation between the operation instruction in the second corresponding relation and the probability of each camera is continuously updated, the use habit of the user is more and more met, and the prediction result is more and more accurate.
When the current operation triggered by the user is received, the operation instruction which is the same as or similar to the current operation instruction is searched from the second corresponding relation, and the probability of each camera corresponding to the searched operation instruction is determined as the second probability corresponding to the current operation instruction.
When the probability of each camera is determined only by the first method, one or more cameras with the highest or larger probability in the first probabilities of each camera corresponding to the current operation instruction may be determined as the target cameras. When the probability of each camera is determined only by the second method, one or more of the cameras with the highest or larger probability in the second probabilities of each camera corresponding to the current operation instruction may be determined as the target camera.
When the probability of each camera is determined by combining the first and second modes, the final probability of each camera can be determined by combining the first and second probabilities, for example, the first and second probabilities are weighted and summed to determine the final probability of each camera, and the final probabilities of the cameras are sorted according to the order of the final probabilities, and one or more cameras with the highest or higher probability are selected as target cameras. In the following, it is assumed that the terminal device is equipped with three rear cameras and one front camera.
Under the scene that the current operation instruction selects the portrait shooting mode: firstly, a user opens a camera, switches to a portrait shooting mode (which is equivalent to the selection of the portrait shooting mode), then predicts that the user may take a portrait according to the current operation of switching the portrait shooting mode, and at this time, according to a first corresponding relationship, a first probability of each camera can be determined as follows: the probability of the front camera is 0.3, the probability of the rear camera 1 is 0.3, the probability of the rear camera 2 is 0.1, and the probability of the rear camera 3 is 0.3 (in this scenario, it is assumed that the rear camera 2 of the mobile phone is a camera for taking a long-range view, and therefore the probability of the rear camera 2 is low). And matching a second probability of each camera in a second corresponding relation according to the current operation of switching the portrait shooting mode, wherein the second probability obtained by matching is as follows: the probability of the front camera is 0.7, the probability of the rear camera 1 is 0.1, the probability of the rear camera 2 is 0.1 and the probability of the rear camera 3 is 0.1; and then, the first probability and the second probability are combined to determine that the user is most likely to use the front-facing camera, namely, the target camera is the front-facing camera.
In a scene where the night shooting mode is selected by the current operation instruction: firstly, a user switches to a night shooting mode, then, according to the operation of switching the night shooting mode at present, the possibility that the user takes a portrait is predicted, and at the moment, according to a first corresponding relation, a first probability of each camera can be determined as follows: the probability of the front camera is 0.1, the probability of the rear camera 1 is 0.4, the probability of the rear camera 2 is 0.25 and the probability of the rear camera 3 is 0.25; and matching a second probability of each camera in a second corresponding relation according to the current operation of switching the portrait shooting mode, wherein the second probability obtained by matching is as follows: the probability of the front camera is 0.1, the probability of the rear camera 1 is 0.4, the probability of the rear camera 2 is 0.1 and the probability of the rear camera 3 is 0.4. And then the target camera is determined to be the rear camera 1 by combining the first probability and the second probability.
And step S406, determining the target camera according to the probability.
And step S408, acquiring the video stream acquired by the target camera.
Step S410, preprocessing the video stream collected by the target camera through a preset image processing mode; the image processing mode comprises one or more of image noise reduction, image deblurring and image correction.
In the process of shooting a video image, the video image is usually interfered by internal or external environmental noise of terminal equipment, so that the image needs to be subjected to noise reduction processing in a filtering mode and the like; the image deblurring method comprises image enhancement, image restoration and the like; the image correction generally refers to restoration processing performed on a distorted image. Through the image processing mode, the image quality in the video stream can be clearer, so that a user has better experience. The image processing method used in the specific implementation includes, but is not limited to, image noise reduction, image deblurring, and image rectification correction, and may also include other image processing methods.
After the step of preprocessing the video stream of the target camera, a final camera triggered by a user generally needs to be received, and if the correspondence includes a second correspondence, the second correspondence is updated according to the final camera.
In a specific implementation, generally, according to a final camera triggered by a user, updating the probability of triggering each camera corresponding to a current operation instruction by the user, and in the updating process, if the current operation instruction does not exist in the second corresponding relationship, adding the current operation instruction and the final camera triggered by the user into the second corresponding relationship, and setting the probability of the camera to be 1; if the current operation instruction exists in the second corresponding relationship, but the corresponding relationship of the triggered camera does not exist in the current operation instruction, adding the corresponding relationship into the second corresponding relationship, and adjusting the probability of each camera corresponding to the current operation instruction; if the current operation instruction in the second corresponding relationship has a corresponding relationship with the final camera triggered by the user, according to the final camera triggered by the user, the probability of the triggered camera can be increased or the probability of the camera not triggered can be decreased, or the probability of the triggered camera can be increased or the probability of the camera not triggered can be decreased. Therefore, the recent habit of the user can be maintained by maintaining the second corresponding relation, the self-adaptability of camera switching is improved, so that the terminal equipment can have different prediction results for different time periods of different users, and the user experience is improved. For example, the second correspondence may be updated according to the above-described operation of switching the portrait shooting mode and the data using the front camera, or the second correspondence may be updated according to the operation of switching the night shooting mode and the data using the rear camera 1, so as to update and maintain the second correspondence in the habit of the user.
Step S412, if the user triggers the target camera, displaying the video stream preprocessed by the target camera.
The video stream processing method of the camera comprises the steps of firstly receiving a current operation instruction which is triggered by a user and is associated with the camera, and then obtaining the probability of each camera corresponding to the current operation instruction from the corresponding relation between the preset operation instruction and the probability of each camera; then determining a target camera according to the probability; and then acquiring the video stream acquired by the target camera, preprocessing the video stream acquired by the target camera through a preset image processing mode, and displaying the preprocessed video stream of the target camera if a user triggers the target camera. According to the method, the target camera which is possibly switched by the user can be predicted according to the current operation instruction and the use habit of the user, and the video stream of the target camera is preprocessed, so that the consumption of computing resources is reduced, and meanwhile, the problem of delayed display of the target camera processing can be avoided, and the user experience is improved.
Example five:
corresponding to the above method embodiment, refer to a video stream processing apparatus of cameras shown in fig. 5, where the apparatus is disposed in a terminal device, and multiple cameras are installed on the terminal device; the device includes:
and the instruction receiving module 50 is configured to receive a current operation instruction triggered by a user and associated with the camera.
And a camera determining module 51, configured to determine, according to the current operation instruction, a target camera to be used by the user from the multiple cameras.
A preprocessing module 52, configured to preprocess a video stream of the target camera;
and the display module 53 is configured to display the preprocessed video stream of the target camera if the user triggers the target camera.
Further, the camera determination module 51 is configured to: determining the probability that a user will use each camera in a plurality of cameras according to the current operation instruction; and determining the target camera according to the probability.
Further, the camera determination module 51 is further configured to: and obtaining the probability of each camera corresponding to the current operation instruction from the corresponding relation between the preset operation instruction and the probability of each camera.
Further, the camera determination module 51 is further configured to: searching a first probability of each camera corresponding to the current operation instruction from a first corresponding relation of the preset operation instruction and the probability of each camera; and/or searching a second probability of each camera corresponding to the current operation instruction from a preset second corresponding relation between the operation instruction and the probability of each camera; and determining the second corresponding relation according to the historical operation instruction of the user and the historical camera actually triggered.
Further, the camera determination module 51 is further configured to: and determining the camera with the highest probability as the target camera in the probability of each camera.
Further, the preprocessing module 52 is configured to: acquiring a video stream collected by a target camera; preprocessing a video stream acquired by a target camera in a preset image processing mode; the image processing mode comprises one or more of image noise reduction, image deblurring and image correction.
Further, the preprocessing module 52 further includes a data updating module, configured to: and receiving a final camera triggered by a user, and updating the second corresponding relation according to the final camera if the corresponding relation comprises the second corresponding relation.
The current operation instruction includes: selecting a portrait photographing mode, selecting a night photographing mode, or selecting a panorama photographing mode.
The video stream processing device of the camera firstly receives a current operation instruction which is triggered by a user and is associated with the camera; determining a target camera to be used by a user from the plurality of cameras according to the current operation instruction; further preprocessing the video stream of the target camera; and if the user triggers the target camera, displaying the video stream preprocessed by the target camera. The method can predict the camera which is probably used by the user based on the operation instruction of the user, preprocesses the predicted video stream of the camera, and selectively preprocesses the video stream of the camera based on the prediction result, compared with a method of preprocessing only the video stream of the specified camera or preprocessing the video streams of all the cameras, the method can avoid the video display fall caused by the switching of the cameras while the resource consumption is low, thereby improving the user experience.
Example six:
an embodiment of the present invention provides a terminal device, where the terminal device includes: the device comprises an image acquisition device, a processing device and a storage device; the image acquisition equipment comprises a plurality of cameras; the image acquisition equipment is used for acquiring a video stream; the storage means has stored thereon a computer program which, when executed by the processing apparatus, performs the video stream processing method of the above-described camera.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the terminal device described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
Further, the present embodiment also provides a computer-readable storage medium, in which a computer program is stored, and the computer program is executed by a processing device to perform the video stream processing method of the camera.
The method, the apparatus, and the computer program product for processing a video stream of a camera according to embodiments of the present invention include a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementation may refer to the method embodiments, and will not be described herein again.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (11)

1. The method for processing the video stream of the camera is characterized in that the method is applied to terminal equipment, and a plurality of cameras are installed on the terminal equipment; the method comprises the following steps:
receiving a current operation instruction which is triggered by a user and is associated with a camera; wherein, different operation instructions correspond to different shooting functions;
determining a target camera to be used by the user from the plurality of cameras according to the current operation instruction;
preprocessing the video stream of the target camera;
and if the user triggers the target camera, displaying the video stream of the target camera after preprocessing.
2. The method of claim 1, wherein the step of determining a target camera to be used by the user from the plurality of cameras according to the current operation instruction comprises:
determining the probability that the user will use each camera in the plurality of cameras according to the current operation instruction;
and determining the target camera according to the probability.
3. The method of claim 2, wherein determining the probability that the user will use each of the plurality of cameras based on the current operating instructions comprises:
and acquiring the probability of each camera corresponding to the current operation instruction from the corresponding relation between the preset operation instruction and the probability of each camera.
4. The method according to claim 3, wherein the step of obtaining the probability of each camera corresponding to the current operation instruction from the corresponding relationship between the preset operation instruction and the probability of each camera comprises:
searching a first probability of each camera corresponding to the current operation instruction from a first corresponding relation of the preset operation instruction and the probability of each camera;
and/or searching a second probability of each camera corresponding to the current operation instruction from a preset second corresponding relation between the operation instruction and the probability of each camera; and determining the second corresponding relation according to the historical operation instruction of the user and the historical camera actually triggered.
5. The method of claim 2, wherein determining the target camera based on the probability comprises: and determining the camera with the highest probability as the target camera in the probability of each camera.
6. The method of claim 1, wherein the step of pre-processing the video stream of the target camera comprises:
acquiring a video stream collected by the target camera;
preprocessing the video stream acquired by the target camera in a preset image processing mode; the image processing mode comprises one or more of image noise reduction, image deblurring and image correction.
7. The method of claim 4, wherein after the step of pre-processing the video stream of the target camera, the method comprises:
and receiving a final camera triggered by the user, and updating the second corresponding relation according to the final camera if the corresponding relation comprises the second corresponding relation.
8. The method of any of claims 1-7, wherein the current operation instruction comprises: selecting a portrait photographing mode, selecting a night photographing mode, or selecting a panorama photographing mode.
9. The device for processing the video stream of the camera is characterized in that the device is arranged on a terminal device, and a plurality of cameras are installed on the terminal device; the device comprises:
the instruction receiving module is used for receiving a current operation instruction which is triggered by a user and is associated with the camera; wherein, different operation instructions correspond to different shooting functions;
the camera determining module is used for determining a target camera to be used by the user from the plurality of cameras according to the current operation instruction;
the preprocessing module is used for preprocessing the video stream of the target camera;
and the display module is used for displaying the video stream preprocessed by the target camera if the target camera is triggered by the user.
10. A terminal device, characterized in that the terminal device comprises: the device comprises an image acquisition device, a processing device and a storage device; wherein the image acquisition device comprises a plurality of cameras;
the image acquisition equipment is used for acquiring a video stream;
the storage device has stored thereon a computer program that, when executed by the processing apparatus, performs the steps of the video stream processing method of the camera head of any one of 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processing device, performs the steps of the video stream processing method for a camera according to any one of claims 1 to 8.
CN201910909294.2A 2019-09-24 2019-09-24 Video stream processing method and device of camera and terminal equipment Active CN110620911B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910909294.2A CN110620911B (en) 2019-09-24 2019-09-24 Video stream processing method and device of camera and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910909294.2A CN110620911B (en) 2019-09-24 2019-09-24 Video stream processing method and device of camera and terminal equipment

Publications (2)

Publication Number Publication Date
CN110620911A CN110620911A (en) 2019-12-27
CN110620911B true CN110620911B (en) 2021-06-22

Family

ID=68924199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910909294.2A Active CN110620911B (en) 2019-09-24 2019-09-24 Video stream processing method and device of camera and terminal equipment

Country Status (1)

Country Link
CN (1) CN110620911B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647902A (en) * 2013-12-25 2014-03-19 广州中国科学院软件应用技术研究所 Video image processing method, video image processing device and video image processing system
CN105430260A (en) * 2015-11-09 2016-03-23 天脉聚源(北京)教育科技有限公司 Method and device for obtaining video image
CN106060390A (en) * 2016-06-24 2016-10-26 联想(北京)有限公司 Information processing method and electronic device
CN107333067A (en) * 2017-08-04 2017-11-07 维沃移动通信有限公司 The control method and terminal of a kind of camera
CN107580179A (en) * 2017-08-18 2018-01-12 维沃移动通信有限公司 A kind of camera starts method and mobile terminal
CN108734655A (en) * 2017-04-14 2018-11-02 中国科学院苏州纳米技术与纳米仿生研究所 The method and system that aerial multinode is investigated in real time

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6994862B2 (en) * 2017-08-01 2022-01-14 ローム株式会社 Actuator driver and image pickup device using this

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647902A (en) * 2013-12-25 2014-03-19 广州中国科学院软件应用技术研究所 Video image processing method, video image processing device and video image processing system
CN105430260A (en) * 2015-11-09 2016-03-23 天脉聚源(北京)教育科技有限公司 Method and device for obtaining video image
CN106060390A (en) * 2016-06-24 2016-10-26 联想(北京)有限公司 Information processing method and electronic device
CN108734655A (en) * 2017-04-14 2018-11-02 中国科学院苏州纳米技术与纳米仿生研究所 The method and system that aerial multinode is investigated in real time
CN107333067A (en) * 2017-08-04 2017-11-07 维沃移动通信有限公司 The control method and terminal of a kind of camera
CN107580179A (en) * 2017-08-18 2018-01-12 维沃移动通信有限公司 A kind of camera starts method and mobile terminal

Also Published As

Publication number Publication date
CN110620911A (en) 2019-12-27

Similar Documents

Publication Publication Date Title
JP6834056B2 (en) Shooting mobile terminal
CN112954196B (en) Shooting method, shooting device, electronic equipment and readable storage medium
CN103152489A (en) Showing method and device for self-shooting image
CN111601040B (en) Camera control method and device and electronic equipment
CN109040523B (en) Artifact eliminating method and device, storage medium and terminal
CN112019739A (en) Shooting control method and device, electronic equipment and storage medium
CN112866576B (en) Image preview method, storage medium and display device
CN108513069B (en) Image processing method, image processing device, storage medium and electronic equipment
CN111800569B (en) Photographing processing method and device, storage medium and electronic equipment
CN111640165A (en) Method and device for acquiring AR group photo image, computer equipment and storage medium
CN112333382B (en) Shooting method and device and electronic equipment
CN108259767B (en) Image processing method, image processing device, storage medium and electronic equipment
CN113194256B (en) Shooting method, shooting device, electronic equipment and storage medium
CN108683847B (en) Photographing method, device, terminal and storage medium
WO2019179242A1 (en) Image processing method and electronic device
CN112367465B (en) Image output method and device and electronic equipment
CN108495038B (en) Image processing method, image processing device, storage medium and electronic equipment
CN110620911B (en) Video stream processing method and device of camera and terminal equipment
WO2023001110A1 (en) Neural network training method and apparatus, and electronic device
CN115439386A (en) Image fusion method and device, electronic equipment and storage medium
CN111654623B (en) Photographing method and device and electronic equipment
CN114125226A (en) Image shooting method and device, electronic equipment and readable storage medium
CN112367464A (en) Image output method and device and electronic equipment
CN112672056A (en) Image processing method and device
CN112653841A (en) Shooting method and device and electronic equipment

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