CN111741222B - Image generation method, image generation device and terminal equipment - Google Patents

Image generation method, image generation device and terminal equipment Download PDF

Info

Publication number
CN111741222B
CN111741222B CN202010657270.5A CN202010657270A CN111741222B CN 111741222 B CN111741222 B CN 111741222B CN 202010657270 A CN202010657270 A CN 202010657270A CN 111741222 B CN111741222 B CN 111741222B
Authority
CN
China
Prior art keywords
lens
image data
image
acquiring
configuring
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
CN202010657270.5A
Other languages
Chinese (zh)
Other versions
CN111741222A (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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent 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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN202010657270.5A priority Critical patent/CN111741222B/en
Publication of CN111741222A publication Critical patent/CN111741222A/en
Application granted granted Critical
Publication of CN111741222B publication Critical patent/CN111741222B/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/67Focus control based on electronic image sensor signals
    • 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/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters

Landscapes

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

Abstract

The application provides an image generation method, which comprises the following steps: if the current zoom multiple is detected to accord with a preset condition, acquiring first image data corresponding to a first lens according to the current zoom multiple, and starting and configuring a second lens, wherein the first lens is in a started state; generating a first preview image according to the first image data in the process of starting and configuring the second lens; and after the second lens configuration is completed, generating a second preview image according to second image data of the second lens and the first image data, wherein the second lens configuration completion means that the second lens can output second image data. By the method, the problem that the preview image displayed in the terminal equipment is jammed during lens switching can be solved.

Description

Image generation method, image generation device and terminal equipment
Technical Field
The present application belongs to the field of image generation technologies, and in particular, to an image generation method, an image generation apparatus, a terminal device, and a computer-readable storage medium.
Background
In order to improve the shooting effect, a plurality of lenses are often disposed in a terminal device such as a mobile phone or a camera, and in some cases, image data of the plurality of lenses may be acquired at the same time for generating a final display image. In practical applications, the lens to be used may be determined according to parameters such as a zoom multiple selected by a user, and therefore, switching between lenses is often required. However, when a shot is switched, a certain time is required for a process of starting a new shot, so that in the process, a preview image displayed in the terminal device is jammed, and the use experience of a user is affected.
Disclosure of Invention
The embodiment of the application provides an image generation method, an image generation device, a terminal device and a computer readable storage medium, which can solve the problem that a preview image displayed in the terminal device is jammed when a lens is switched.
In a first aspect, an embodiment of the present application provides an image generation method, including:
if the current zoom multiple is detected to accord with a preset condition, acquiring first image data corresponding to a first lens according to the current zoom multiple, and starting and configuring a second lens, wherein the first lens is in a started state;
generating a first preview image according to the first image data in the process of starting and configuring the second lens;
and after the second lens configuration is completed, generating a second preview image according to second image data of the second lens and the first image data, wherein the second lens configuration completion means that the second lens can output second image data.
In a second aspect, an embodiment of the present application provides an image generating apparatus, including:
the processing module is used for acquiring first image data corresponding to a first lens according to a current zooming multiple if the current zooming multiple is detected to accord with a preset condition, and starting and configuring a second lens, wherein the first lens is in a started state;
the first image generation module is used for generating a first preview image according to the first image data in the process of starting and configuring the second lens;
and the second image generation module is used for generating a second preview image according to second image data of the second lens and the first image data after the second lens is configured, wherein the second lens configuration is completed, and the second lens can output the second image data.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, a display, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the image generation method according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the image generation method according to the first aspect.
In a fifth aspect, the present application provides a computer program product, which when run on a terminal device, causes the terminal device to execute the image generation method described in the first aspect.
Compared with the prior art, the embodiment of the application has the advantages that: in the embodiment of the application, if the current zoom multiple is detected to meet the preset condition, first image data of a first lens is acquired according to the current zoom multiple, and meanwhile, a second lens is started and configured, so that a first preview image is generated according to the first image data in the process of starting and configuring the second lens; at this time, because the first lens is in the started state, the acquired first image data can be continuously and stably output, so that in the process of starting and configuring the second lens, generating the first preview image according to the first image data can avoid the situation that the image data cannot be acquired because a certain time is required for starting and configuring the second lens, and the preview image cannot be output in a certain time to cause blocking; after the second lens configuration is completed, a second preview image is generated according to second image data of the second lens and the first image data, wherein the second lens configuration completion means that the second lens can output the second image data, so that after the second lens can output the second image data, a second preview image can be generated according to the second image data and the first image data which are stably output.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of an image generation method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of step S103 according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an image generating apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The image generation method provided by the embodiment of the application can be applied to a server, a desktop computer, a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, a super-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA) and other terminal devices, and the embodiment of the application does not limit the specific types of the terminal devices.
Specifically, fig. 1 shows a flowchart of an image generation method provided in an embodiment of the present application, which may be applied to a terminal device.
The image generation method may include:
step S101, if it is detected that the current zoom multiple meets a preset condition, acquiring first image data corresponding to a first lens according to the current zoom multiple, and starting and configuring a second lens, wherein the first lens is in a started state.
In the embodiment of the present application, the current zoom magnification may be determined based on a digital zoom magnification and/or an optical zoom magnification. In some cases, the user may adjust the current zoom magnification by adjusting the zoom ratio of the current preview image through a specific gesture, a button in a display interface of the terminal device, or the like. The preset condition can be determined according to the actual scene requirement. For example, in some application scenarios, the preset condition may be that the current zoom multiple is in a preset value interval; alternatively, the preset condition may be that the current zoom multiple has a changing trend to a preset trend, for example, the current zoom multiple is continuously increased with respect to the zoom multiple of the previous X frame preview image until being greater than a specified value, and the like.
The types of the first lens and the second lens may be different or the same. Specifically, the determination may be made according to a type of a lens and a control manner on the terminal device. The number of the first shots and the number of the second shots may also be determined according to an actual application scenario. For example, at present, a wide-angle lens, a telephoto lens, an ultra-wide-angle lens, an infrared lens, and/or the like may be included in the terminal device. In different application scenes, the terminal device can acquire image data of one or more than two lenses according to the need and preset information to be used for generating images. For example, in the embodiment of the present application, the type of the first lens may include a wide-angle lens, and the type of the second lens may include a telephoto lens.
When the current zoom multiple meets a preset condition, in order to obtain a better preview image effect, the terminal device needs to acquire first image data of the first lens and second image data of the second lens to generate a preview image. In the embodiment of the present application, before the current zoom factor is changed to meet the preset condition, the first lens may be already in use, so that the first lens is already in an operating state, but the second lens is not started. Therefore, in the embodiment of the present application, after it is detected that the current zoom multiple meets the preset condition, the second lens may be started and configured, and meanwhile, the first image data may be acquired according to the previous configuration of the first lens. The first lens is a lens that has been activated, so that the first image data output by the first lens can be continuous and stable image data.
In some embodiments, the obtaining first image data corresponding to the first lens according to the current zoom multiple and starting and configuring the second lens if the current zoom multiple is detected to meet the preset condition includes:
and if the current zooming multiple is detected to be changed from being not more than the first numerical value to being more than the first numerical value and being less than the second numerical value, acquiring first image data corresponding to the first lens according to the current zooming multiple, and starting and configuring the second lens.
Wherein the first and second values may be preset. For example, the first value may be 1 times, and the second value may be 5 times.
Step S102, in the process of starting and configuring the second lens, generating a first preview image according to the first image data.
In the embodiment of the application, because the first lens is in the started state, the acquired first image data can be continuously and stably output, and therefore, the situation that the image data cannot be acquired because a certain time length is required for starting and configuring the second lens, and the preview image cannot be output in a certain time length to cause blocking is avoided. For example, the first preview image may be generated and displayed in real time according to the first image data.
In some embodiments, the second shot may be started and configured in a background of the terminal device to avoid interfering with the generated and displayed first preview image.
In some embodiments, a pipeline (pipeline) for acquiring image data may be controlled by a Multi Camera Controller (MCC) in the terminal device, so as to generate the first preview image according to the first image data during the process of starting and configuring the second lens. For example, in the process of starting and configuring the second lens, the number of pipelines for acquiring image data may be made to be consistent with the number of first lenses, and each pipeline may acquire first image data of one first lens respectively and generate a first preview image according to each first image data. At this time, the MCC may control the source of the image data by controlling the number of the pipes and the lenses associated with the pipes, so as to ensure that the operation of starting and configuring the second lens does not interfere with the operation of generating and displaying the first preview image in the process of starting and configuring the second lens.
Step S103, after the second lens configuration is completed, generating a second preview image according to second image data of the second lens and the first image data, where the second lens configuration completion indicates that the second lens can output second image data.
In this embodiment, the second preview image and the first preview image may be preview images generated according to different image data. In some examples, the second preview image may be generated and displayed in real-time from the second image data and the first image data. For example, after the second lens configuration is completed, corresponding notification information may be sent to a control module such as an MCC to notify the MCC to acquire second image data output by the second lens; or, after the second lens configuration is completed, the preset status bit may also be adjusted to a designated status, and at this time, the MCC may determine that the second lens configuration is completed after monitoring that the preset status bit is in the designated status, so as to acquire the second image data output by the second lens.
In this embodiment of the application, after the second lens is configured, generating a second preview image according to the second image data of the second lens and the first image data includes:
step S201, after the second lens configuration is completed, detecting the current zoom multiple again;
step S202, if the redetected current zoom multiple accords with the preset condition, a second preview image is generated according to the second image data of the second lens and the first image data based on the redetected current zoom multiple.
In the embodiment of the application, in order to improve the effect of the preview image, the current zoom multiple may be detected again after the second lens configuration is completed, so as to select image data acquired by a proper lens to generate the preview image, thereby avoiding a judgment deviation caused by a quick operation of a user.
In some embodiments, if the redetected current zoom multiple does not meet the preset condition, the generation manner of the preview image may be determined according to the redetected current zoom multiple.
In the embodiment of the present application, there may be a plurality of specific ways of generating the second preview image according to the second image data of the second lens and the first image data. For example, Spatial Alignment Transform (SAT), enhancement, denoising, sharpening, and other image processing may be performed on the second image data and the first image data to obtain the second preview image.
In the embodiment of the application, after the second lens can output the second image data, the second preview image can be generated according to the stably output second image data and the first image data, so that the preview image can still be smoothly output under the condition of lens switching, and the situation of blocking cannot occur.
Optionally, in some embodiments, if it is detected that the current zoom multiple meets a preset condition, acquiring first image data corresponding to the first lens according to the current zoom multiple, and starting and configuring the second lens includes:
if the current zoom multiple is detected to accord with the preset condition, starting and configuring the second lens, and setting the number of channels for acquiring image data as N, wherein N is the number of the first lenses;
respectively acquiring first image data corresponding to the N first lenses through the N channels;
after the second lens configuration is completed, generating a second preview image according to second image data of the second lens and the first image data, including:
after the second lens is configured, setting the number of channels for acquiring image data to be N + M, wherein M is the number of the second lenses;
respectively acquiring first image data of N first lenses and second image data of M second lenses through the N + M channels;
and generating a second preview image according to the first image data and the second image data.
In this embodiment of the present application, the pipeline (pipeline) may be used to implement a certain group of lens functions, for example, to implement a process of acquiring image data to generate a preview image, where the process may include a hardware information stream, and the like. In some embodiments, it may be that the Generate readimerequest service sends, to the MCC, indication information indicating that the current zoom multiple meets the preset condition, and after the MCC acquires the indication information indicating that the current zoom multiple meets the preset condition, the MCC controls the number of the pipes and the shots associated with the pipes, so as to control a source of image data for generating the preview image.
In the embodiment of the application, in the process of starting and configuring the second lens, the number of pipelines for acquiring image data can be consistent with the number of the first lenses, each pipeline can acquire first image data of one first lens respectively, and then a first preview image is generated according to each first image data, so that it can be ensured that in the process of starting and configuring the second lens, the operation of starting and configuring the second lens does not interfere with the operation of generating and displaying the first preview image.
Optionally, in some embodiments, the image generating method further includes:
setting a preset state bit as a first state bit in the process of starting and configuring the second lens;
the setting the number of channels for acquiring image data to be N + M after the second lens configuration is completed includes:
after the second lens configuration is completed, setting the preset state bit as a second state bit;
and after the preset state bit is detected to be changed from the first state bit to the second state bit, setting the number of channels for acquiring the image data to be N + M.
In this embodiment of the application, the starting and configuration conditions of the second lens can be marked by the preset status bit, so that modules such as an MCC can determine whether the configuration of the second lens is completed by monitoring the preset status bit.
Optionally, in some embodiments, the first lens comprises a wide-angle lens, and the second lens comprises a telephoto lens;
if the current zoom multiple is detected to meet the preset condition, starting and configuring the second lens, and setting the number of channels for acquiring the image data to be N, wherein the method comprises the following steps:
and if the current zoom multiple is detected to meet the preset condition, starting and configuring the telephoto lens, closing a channel for acquiring third image data of the third lens, and enabling N channels to be in an open state, wherein the N channels are used for respectively acquiring N first image data of the wide-angle lens.
In the embodiment of the present application, before the current zoom multiple meets the preset condition, the lens that the terminal device enables may include a wide-angle lens and an ultra-wide-angle lens, and therefore, after detecting that the current zoom multiple meets the preset condition, the lens needs to be switched. Specifically, a channel for acquiring third image data of the ultra-wide-angle lens may be closed, and N channels may be in an open state, where the N channels are used to acquire N first image data of the wide-angle lens, respectively, so that the first preview image may be generated only according to the first image data acquired by the wide-angle lens.
In the embodiment of the application, the switching of the lens can be realized in a software mode by controlling the opening and closing of the channel for acquiring the image data, so that the operation control on hardware is reduced, the service life of the hardware is prolonged, and the processing speed can be increased.
A specific application of the present application is described below as a specific example.
In some examples, when a user sets a zoom multiple of the terminal device to be not less than 0.6 and less than 1, the terminal device may acquire image data of an ultra-wide-angle lens and image data of a wide-angle lens to generate a preview image, where the ultra-wide-angle lens may be a main lens. When the zoom multiple of the terminal equipment is equal to 1, the terminal equipment can acquire the image data of the ultra-wide-angle lens and the image data of the wide-angle lens to generate a preview image, wherein the wide-angle lens can be a main lens. Therefore, when the zoom factor of the terminal device is not less than 1, the terminal device may simultaneously acquire the image data of the ultra-wide-angle lens and the image data of the wide-angle lens. And when the zoom multiple of the terminal device is greater than 1 and less than 5, in order to obtain a better preview image effect, the terminal device may acquire image data of the wide-angle lens and image data of the telephoto lens to generate a preview image.
Therefore, if it is detected that the current zoom multiple is changed from not greater than 1 to greater than 1 and less than 5, the lens of the terminal device needs to be switched. Accordingly, the preset condition may be set to change the current zoom multiple from not more than 1 to more than 1 and less than 5.
At the moment, the source of the image data acquired by the terminal equipment is switched to the wide-angle lens and the telephoto lens from the wide-angle lens and the ultra-wide-angle lens. Wherein the wide-angle lens is already actuated, and therefore the first image data of the wide-angle lens can be continuously acquired, while the telephoto lens needs to be actuated and configured. If the terminal device simultaneously acquires the image data of the wide-angle lens and the telephoto lens to generate a preview image, the terminal device needs to wait for the telephoto lens to finish starting and configuration, so that the preview image of the terminal device is jammed. In the embodiment of the present application, in the process of starting and configuring the telephoto lens, a channel for acquiring the third image data of the ultra-wide-angle lens may be closed, and N channels are in an open state, where N channels are used to acquire N first image data of the wide-angle lens, respectively, so that the first preview image may be generated only according to the first image data acquired by the wide-angle lens. After the telephoto lens configuration is completed, the number of channels for acquiring image data may be set to N + M, and the first image data of the first lens and the second image data of the M second lenses are acquired through the N + M channels, respectively, and then a second preview image is generated according to the first image data and the second image data. Therefore, the preview image can still be generated in real time in the process of lens switching, and the phenomenon of jamming caused by the starting and the configuration of the telephoto lens is avoided.
It should be noted that the above-mentioned examples are only illustrative of the embodiments of the present application, and are not limiting.
In the embodiment of the application, if the current zoom multiple is detected to meet the preset condition, first image data of a first lens is acquired according to the current zoom multiple, and meanwhile, a second lens is started and configured, so that a first preview image is generated according to the first image data in the process of starting and configuring the second lens; at this time, because the first lens is in the started state, the acquired first image data can be continuously and stably output, so that in the process of starting and configuring the second lens, generating the first preview image according to the first image data can avoid the situation that the image data cannot be acquired because a certain time is required for starting and configuring the second lens, and the preview image cannot be output in a certain time to cause blocking; after the second lens configuration is completed, a second preview image is generated according to second image data of the second lens and the first image data, wherein the second lens configuration completion means that the second lens can output the second image data, so that after the second lens can output the second image data, a second preview image can be generated according to the second image data and the first image data which are stably output.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 3 shows a block diagram of an image generating apparatus according to an embodiment of the present application, which corresponds to the image generating method described in the foregoing embodiment, and only shows portions related to the embodiment of the present application for convenience of description.
Referring to fig. 3, the image generating apparatus 3 includes:
the processing module 301 is configured to, if it is detected that a current zoom multiple meets a preset condition, obtain first image data corresponding to a first lens according to the current zoom multiple, and start and configure a second lens, where the first lens is in a started state;
a first image generation module 302, configured to generate a first preview image according to the first image data in a process of starting and configuring the second lens;
a second image generating module 303, configured to generate a second preview image according to second image data of the second lens and the first image data after the second lens is configured, where the second lens configuration is completed and the second lens is capable of outputting the second image data.
Optionally, the processing module 301 specifically includes:
the first setting unit is used for starting and configuring the second lens if the current zooming multiple is detected to accord with the preset condition, and setting the number of channels for acquiring image data as N, wherein the N is the number of the first lenses;
the first acquisition unit is used for respectively acquiring first image data corresponding to the N first lenses through the N channels;
the second image generation module 303 specifically includes:
the second setting unit is used for setting the number of channels for acquiring image data to be N + M after the second lens configuration is completed, wherein M is the number of the second lenses;
a second obtaining unit, configured to obtain, through N + M channels, first image data of N first lenses and second image data of M second lenses, respectively;
a first generating unit configured to generate a second preview image from the first image data and the second image data.
Optionally, the image generating apparatus 3 further includes:
the setting module is used for setting a preset state bit as a first state bit in the process of starting and configuring the second lens;
the second setting unit includes:
the first setting subunit is configured to set the preset state bit to a second state bit after the second lens configuration is completed;
and the second setting subunit is used for setting the number of channels for acquiring the image data to be N + M after detecting that the preset state bit is changed from the first state bit to the second state bit.
Optionally, the first lens includes a wide-angle lens, and the second lens includes a telephoto lens;
the first setting unit is specifically configured to:
and if the current zoom multiple is detected to accord with the preset condition, starting and configuring the telephoto lens, closing a channel for acquiring third image data of the ultra-wide-angle lens, and enabling N channels to be in an open state, wherein the N channels are used for respectively acquiring N first image data of the wide-angle lens.
Optionally, the second image generating module 303 specifically includes:
the detection unit is used for detecting the current zoom multiple again after the second lens configuration is completed;
and the second generating unit is used for generating a second preview image according to the second image data of the second lens and the first image data based on the redetected current zoom multiple if the redetected current zoom multiple meets the preset condition.
Optionally, the second image generation module is specifically configured to:
and if the current zooming multiple is detected to be changed from being not more than the first numerical value to being more than the first numerical value and being less than the second numerical value, acquiring first image data corresponding to the first lens according to the current zooming multiple, and starting and configuring the second lens.
In the embodiment of the application, if the current zoom multiple is detected to meet the preset condition, first image data of a first lens is acquired according to the current zoom multiple, and meanwhile, a second lens is started and configured, so that a first preview image is generated according to the first image data in the process of starting and configuring the second lens; at this time, because the first lens is in the started state, the acquired first image data can be continuously and stably output, so that in the process of starting and configuring the second lens, generating the first preview image according to the first image data can avoid the situation that the image data cannot be acquired because a certain time is required for starting and configuring the second lens, and the preview image cannot be output in a certain time to cause blocking; after the second lens configuration is completed, a second preview image is generated according to second image data of the second lens and the first image data, wherein the second lens configuration completion means that the second lens can output the second image data, so that after the second lens can output the second image data, a second preview image can be generated according to the second image data and the first image data which are stably output.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 4, the terminal device 4 of this embodiment includes: at least one processor 40 (only one is shown in fig. 4), a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40, wherein the steps in any of the above-described image generation method embodiments are implemented when the processor 40 executes the computer program 42.
The terminal device 4 may be a server, a mobile phone, a wearable device, an Augmented Reality (AR)/Virtual Reality (VR) device, a desktop computer, a notebook, a desktop computer, a palmtop computer, or other computing devices. The terminal device may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is merely an example of the terminal device 4, and does not constitute a limitation of the terminal device 4, and may include more or less components than those shown, or combine some of the components, or different components, such as may also include input devices, output devices, network access devices, etc. The input device may include a keyboard, a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of a fingerprint), a microphone, a camera, and the like, and the output device may include a display, a speaker, and the like.
The Processor 40 may be a Central Processing Unit (CPU), and the Processor 40 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 41 may be an internal storage unit of the terminal device 4, such as a hard disk or a memory of the terminal device 4. In other embodiments, the memory 41 may also be an external storage device of the terminal device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like provided on the terminal device 4. Further, the memory 41 may include both an internal storage unit and an external storage device of the terminal device 4. The memory 41 is used for storing an operating system, an application program, a Boot Loader (Boot Loader), data, and other programs, such as program codes of the computer programs. The above-mentioned memory 41 may also be used to temporarily store data that has been output or is to be output.
In addition, although not shown, the terminal device 4 may further include a network connection module, such as a bluetooth module Wi-Fi module, a cellular network module, and the like, which is not described herein again.
In this embodiment, when the processor 40 executes the computer program 42 to implement the steps in any of the image generation method embodiments, if it is detected that the current zoom multiple meets a preset condition, first image data of a first lens is obtained according to the current zoom multiple, and at the same time, the second lens is started and configured to generate a first preview image according to the first image data in a process of starting and configuring the second lens; at this time, because the first lens is in the started state, the acquired first image data can be continuously and stably output, so that in the process of starting and configuring the second lens, generating the first preview image according to the first image data can avoid the situation that the image data cannot be acquired because a certain time is required for starting and configuring the second lens, and the preview image cannot be output in a certain time to cause blocking; after the second lens configuration is completed, a second preview image is generated according to second image data of the second lens and the first image data, wherein the second lens configuration completion means that the second lens can output the second image data, so that after the second lens can output the second image data, a second preview image can be generated according to the second image data and the first image data which are stably output.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above method embodiments.
The embodiments of the present application provide a computer program product, which when running on a terminal device, enables the terminal device to implement the steps in the above method embodiments when executed.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer-readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/device and method may be implemented in other ways. For example, the above-described apparatus/device embodiments are merely illustrative, and for example, the division of the above modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (9)

1. An image generation method, comprising:
if the current zoom multiple is detected to accord with a preset condition, acquiring first image data corresponding to a first lens according to the current zoom multiple, and starting and configuring a second lens, wherein the first lens is in a started state;
generating a first preview image according to the first image data in the process of starting and configuring the second lens;
after the second lens configuration is completed, generating a second preview image according to second image data of the second lens and the first image data, wherein the second lens configuration completion means that the second lens can output second image data;
if the current zoom multiple is detected to accord with the preset condition, acquiring first image data corresponding to the first lens according to the current zoom multiple, and starting and configuring the second lens, wherein the method comprises the following steps:
if the current zoom multiple is detected to accord with the preset condition, starting and configuring the second lens, and setting the number of channels for acquiring image data as N, wherein N is the number of the first lenses;
respectively acquiring first image data corresponding to the N first lenses through the N channels;
after the second lens configuration is completed, generating a second preview image according to second image data of the second lens and the first image data, including:
after the second lens is configured, setting the number of channels for acquiring image data to be N + M, wherein M is the number of the second lenses;
respectively acquiring first image data of N first lenses and second image data of M second lenses through the N + M channels;
and generating a second preview image according to the first image data and the second image data.
2. The image generation method of claim 1, further comprising:
setting a preset state bit as a first state bit in the process of starting and configuring the second lens;
the setting the number of channels for acquiring image data to be N + M after the second lens configuration is completed includes:
after the second lens configuration is completed, setting the preset state bit as a second state bit;
and after the preset state bit is detected to be changed from the first state bit to the second state bit, setting the number of channels for acquiring the image data to be N + M.
3. The image generation method of claim 1, wherein the first lens comprises a wide-angle lens, the second lens comprises a telephoto lens;
if the current zoom multiple is detected to meet the preset condition, starting and configuring the second lens, and setting the number of channels for acquiring the image data to be N, wherein the method comprises the following steps:
and if the current zoom multiple is detected to accord with the preset condition, starting and configuring the telephoto lens, closing a channel for acquiring third image data of the ultra-wide-angle lens, and enabling N channels to be in an open state, wherein the N channels are used for respectively acquiring N first image data of the wide-angle lens.
4. The image generation method according to claim 1, wherein the generating a second preview image from the second image data of the second lens and the first image data after the second lens configuration is completed, includes:
re-detecting a current zoom factor after the second lens configuration is completed;
and if the redetected current zoom multiple accords with the preset condition, generating a second preview image according to second image data of the second lens and the first image data based on the redetected current zoom multiple.
5. The image generation method according to any one of claims 1 to 4, wherein the acquiring first image data corresponding to the first lens according to the current zoom factor if it is detected that the current zoom factor meets a preset condition, and starting and configuring the second lens includes:
and if the current zooming multiple is detected to be changed from being not more than the first numerical value to being more than the first numerical value and being less than the second numerical value, acquiring first image data corresponding to the first lens according to the current zooming multiple, and starting and configuring the second lens.
6. An image generation apparatus, comprising:
the processing module is used for acquiring first image data corresponding to a first lens according to a current zooming multiple if the current zooming multiple is detected to accord with a preset condition, and starting and configuring a second lens, wherein the first lens is in a started state;
the first image generation module is used for generating a first preview image according to the first image data in the process of starting and configuring the second lens;
a second image generating module, configured to generate a second preview image according to second image data of the second lens and the first image data after the second lens is configured, where the second lens configuration is completed and indicates that the second lens can output second image data;
the processing module 301 specifically includes:
the first setting unit is used for starting and configuring the second lens if the current zooming multiple is detected to accord with the preset condition, and setting the number of channels for acquiring image data as N, wherein the N is the number of the first lenses;
the first acquisition unit is used for respectively acquiring first image data corresponding to the N first lenses through the N channels;
the second image generation module 303 specifically includes:
the second setting unit is used for setting the number of channels for acquiring image data to be N + M after the second lens configuration is completed, wherein M is the number of the second lenses;
a second obtaining unit, configured to obtain, through N + M channels, first image data of N first lenses and second image data of M second lenses, respectively;
a first generating unit configured to generate a second preview image from the first image data and the second image data.
7. The image generation apparatus of claim 6, wherein the second image generation module is specifically configured to:
and if the current zooming multiple is detected to be changed from being not more than the first numerical value to being more than the first numerical value and being less than the second numerical value, acquiring first image data corresponding to the first lens according to the current zooming multiple, and starting and configuring the second lens.
8. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the image generation method according to any one of claims 1 to 5 when executing the computer program.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out an image generation method according to any one of claims 1 to 5.
CN202010657270.5A 2020-07-09 2020-07-09 Image generation method, image generation device and terminal equipment Active CN111741222B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010657270.5A CN111741222B (en) 2020-07-09 2020-07-09 Image generation method, image generation device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010657270.5A CN111741222B (en) 2020-07-09 2020-07-09 Image generation method, image generation device and terminal equipment

Publications (2)

Publication Number Publication Date
CN111741222A CN111741222A (en) 2020-10-02
CN111741222B true CN111741222B (en) 2021-08-24

Family

ID=72655778

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010657270.5A Active CN111741222B (en) 2020-07-09 2020-07-09 Image generation method, image generation device and terminal equipment

Country Status (1)

Country Link
CN (1) CN111741222B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112866576B (en) * 2021-01-18 2022-05-17 Oppo广东移动通信有限公司 Image preview method, storage medium and display device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107071291A (en) * 2016-12-28 2017-08-18 深圳众思科技有限公司 Image processing method, device and electronic equipment
CN107222677A (en) * 2017-05-27 2017-09-29 成都通甲优博科技有限责任公司 The method and device that multi-cam is opened simultaneously
CN107483808A (en) * 2017-07-10 2017-12-15 广东欧珀移动通信有限公司 Suppress method and device, the terminal device of AEC saltus steps
CN110072070A (en) * 2019-03-18 2019-07-30 华为技术有限公司 A kind of multichannel kinescope method and equipment
CN110351487A (en) * 2019-08-26 2019-10-18 Oppo广东移动通信有限公司 Control method, control device, electronic equipment and storage medium
CN111064886A (en) * 2019-12-19 2020-04-24 惠州Tcl移动通信有限公司 Shooting method of terminal equipment, terminal equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106990646A (en) * 2016-01-20 2017-07-28 深圳富泰宏精密工业有限公司 Many lens systems, its method of work and portable electron device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107071291A (en) * 2016-12-28 2017-08-18 深圳众思科技有限公司 Image processing method, device and electronic equipment
CN107222677A (en) * 2017-05-27 2017-09-29 成都通甲优博科技有限责任公司 The method and device that multi-cam is opened simultaneously
CN107483808A (en) * 2017-07-10 2017-12-15 广东欧珀移动通信有限公司 Suppress method and device, the terminal device of AEC saltus steps
CN110072070A (en) * 2019-03-18 2019-07-30 华为技术有限公司 A kind of multichannel kinescope method and equipment
CN110351487A (en) * 2019-08-26 2019-10-18 Oppo广东移动通信有限公司 Control method, control device, electronic equipment and storage medium
CN111064886A (en) * 2019-12-19 2020-04-24 惠州Tcl移动通信有限公司 Shooting method of terminal equipment, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN111741222A (en) 2020-10-02

Similar Documents

Publication Publication Date Title
US11490016B2 (en) Zooming method and electronic device using the same
CN108737739B (en) Preview picture acquisition method, preview picture acquisition device and electronic equipment
CN112714255B (en) Shooting method and device, electronic equipment and readable storage medium
KR20210042952A (en) Image processing method and device, electronic device and storage medium
CN111367407B (en) Intelligent glasses interaction method, intelligent glasses interaction device and intelligent glasses
CN111698553A (en) Video processing method and device, electronic equipment and readable storage medium
CN111447239B (en) Video stream playing control method, device and storage medium
CN116709021B (en) Zoom response method, electronic device and storage medium
CN111818385B (en) Video processing method, video processing device and terminal equipment
CN112887602A (en) Camera switching method and device, storage medium and electronic equipment
CN111190677A (en) Information display method, information display device and terminal equipment
CN111741222B (en) Image generation method, image generation device and terminal equipment
CN112188097A (en) Photographing method, photographing apparatus, terminal device, and computer-readable storage medium
CN111654637A (en) Focusing method, focusing device and terminal equipment
CN112308864A (en) Image processing method and device, electronic equipment and storage medium
CN109358927B (en) Application program display method and device and terminal equipment
CN107730443B (en) Image processing method and device and user equipment
CN112215751A (en) Image scaling method, image scaling device and terminal equipment
WO2023125669A1 (en) Image processing circuit, image processing method, electronic device, and readable storage medium
CN107977147B (en) Sliding track display method and device
CN115016944A (en) Process access method and device and electronic equipment
CN114666490B (en) Focusing method, focusing device, electronic equipment and storage medium
EP3809336A1 (en) Method, device and storage medium for processing overhead of memory access
CN111984423A (en) Method, device and medium for operating deep learning model
CN112328351A (en) Animation display method, animation display device and terminal 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