Photographing method, photographing device, and electronic device

By processing and fusing the photo data stream with an algorithm, it is converted into a preview data stream, solving the preview lag problem caused by traditional photo taking methods, while maintaining the photo effect and improving the user experience.

CN115842955BActive Publication Date: 2025-10-17GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211145660.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-20
Publication Date
2025-10-17
Estimated Expiration
2042-09-20

AI Technical Summary

Technical Problem

During the photo-taking process, the traditional photo-taking method causes the preview window to freeze, affecting the user experience. Although the ZSL photo-taking method avoids the preview freeze, the photo-taking effect is poor.

Method used

By processing the photographing data stream, a second preview data stream is generated, and the data stream is displayed in the preview window during the photographing process. Combined with a fusion or reprocessing algorithm, the photographing data stream is converted into a data stream close to the preview data stream to ensure the smoothness of the preview.

Benefits of technology

While ensuring the photo-taking effect, it reduces the lag of the preview window, improves the user experience, and realizes the continuous output of the preview data stream.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115842955B_ABST
    Figure CN115842955B_ABST
Patent Text Reader

Abstract

Provided are a photographing method, a photographing device, and an electronic device. The photographing method includes: displaying a first preview data stream in a preview window; in response to receiving a photographing instruction, generating a photographing data stream; generating a second preview data stream according to the photographing data stream; and displaying the second preview data stream in the preview window during photographing. The embodiment of the present application converts the photographing data stream into the preview data stream, which is displayed during photographing, and helps to improve the lag of the preview window during photographing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of photographing, and more particularly, to a photographing method, a photographing device and an electronic device. BACKGROUND

[0002] When a user triggers a photographing instruction, a related photographing method configures parameters of a photographing device, so that the photographing device generates a photographing data stream, and outputs a photo through post-processing of the photographing data stream. In this photographing process, the preview window of the camera has no data stream output. Therefore, the preview window is obviously stuck, which affects the fluency of user preview. SUMMARY

[0003] Embodiments of the present application provide a photographing method, a photographing device and an electronic device. Each aspect related to the embodiments of the present application is introduced below.

[0004] In a first aspect, a photographing method is provided, and the photographing method comprises: displaying a first preview data stream in a preview window; in response to receiving a photographing instruction, generating a photographing data stream; generating a second preview data stream according to the photographing data stream; and during a photographing process, displaying the second preview data stream in the preview window.

[0005] In a second aspect, a photographing device is provided, and the photographing device comprises: a memory configured to store data; and a processor configured to perform the following operations: display a first preview data stream in a preview window; in response to receiving a photographing instruction, generate a photographing data stream; generate a second preview data stream according to the photographing data stream; and during a photographing process, display the second preview data stream in the preview window.

[0006] In a third aspect, an electronic device is provided, and the electronic device comprises: a memory configured to store a computer program; and a processor connected to the memory, configured to execute the computer program to implement the method of the first aspect.

[0007] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. When the computer program code is executed, the method of the first aspect is implemented.

[0008] In a fifth aspect, a computer program product is provided, and the computer program product comprises: computer program code, when the computer program code is executed on a computer, the computer program code causes the computer to execute the method of the first aspect.

[0009] The embodiment of the present application processes the photographing data stream generated according to the photographing instruction to generate a second preview data stream. The second preview data stream can be displayed in a preview window. Therefore, in the photographing process, the preview data stream converted from the photographing data stream can be used as the output data stream of the preview window, which helps to improve the lag phenomenon of the preview window and improve the user experience. BRIEF DESCRIPTION OF DRAWINGS

[0010] Figure 1 The figure shows a schematic diagram of the composition of a photo.

[0011] Figure 2 The figure shows a schematic diagram of the flow of the photographing method provided by an embodiment of the present application.

[0012] Figure 3 The figure shows a schematic diagram of the flow of the photographing method provided by another embodiment of the present application.

[0013] Figure 4 The figure shows Figure 2 The figure shows a schematic diagram of the flow of one possible implementation of the photographing method.

[0014] Figure 5 The figure shows a schematic diagram of the structure of a photographing device provided by an embodiment of the present application.

[0015] Figure 6 The figure shows Figure 5 The figure shows a schematic diagram of the structure of one possible implementation of the photographing device.

[0016] Figure 7 The figure shows a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0017] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments.

[0018] In the current photographing method, there are mainly two categories of traditional photographing scheme and zero shutter lag (ZSL) photographing scheme. The traditional photographing is also called ordinary photographing or non-ZSL photographing. Taking the camera function of a smart phone as an example, the camera application program (app) can generally support the photographing schemes in the non-ZSL and ZSL modes.

[0019] In actual photographing process, a user (e.g. a user of a camera app) generally issues a photographing request according to a preview image of a preview window. The preview image is an image generated by a sensor of a camera lens according to a set preview parameter. When the user triggers a photographing instruction, a conventional photographing manner reconfigures the sensor and a photographing pipeline (i.e. a process) according to the photographing request to generate image data for photographing. However, no data is output during the reconfiguration of the sensor and the process, resulting in preview lag and photographing delay.

[0020] To improve the related problems of the conventional photographing manner, ZSL photographing buffers image data output in a preview process. The image data is buffered in multiple frames of whole frame data when stored. When there is a photographing request, ZSL photographing can transmit the buffered data frames to a back end for frame picking. The back end selects a suitable image frame as photographing data. Specifically, when the camera starts previewing, the camera sensor starts outputting data frames. Generally, the latest several frames are taken as snapshot frame data and stored in a buffer. The latest several frames can be set to 5 frames or 8 frames. The buffer is, for example, a double data rate (DDR) synchronous dynamic random access memory.

[0021] When the user photographs in the ZSL mode, once the photographing instruction is triggered, the system calculates the actual photographing time and issues related photographing parameters to a lower processing module. The processing module finds the corresponding buffered image data frames in the buffer and then transmits the selected frame data to a post-processing module as photographing data. Therefore, ZSL photographing does not need to be reconfigured, so that the user can obtain the image at the photographing moment as photographing data. However, ZSL photographing directly uses the preview frame for photographing processing, and the image effect is a little poor.

[0022] As known from the above, the two photographing schemes obtain photographing data based on different processes under a photographing request. Through subsequent image processing of the photographing data, the final photographing image (photo) can be obtained. In the post-processing module, the processing of the photographing data is, for example, JPEG format encoding and insertion of related tag information. The tag information is, for example, width and height information of the image and exposure parameters.

[0023] To facilitate understanding of the post-processing process of the photographing image, the photographing image is described in combination with a photo structure generated by an Android camera, as shown in FIG. 1. Figure 1 Figure 1 ​As shown, a photo is mainly composed of tags 110, a thumbnail 120 and a picture 130. Among the three parts of information, the thumbnail 120 and the picture 130 as the main body are both data in JPEG format, mainly different in image size. Therefore, the data of the thumbnail 120 and the picture 130 both need to undergo JPEG encoding processing, which is also the main content of post-processing of the photo data.

[0024] For the traditional photo shooting method, the photo data for post-processing is generated based on reconfiguration of photo shooting parameters. The photo shooting parameters are issued by an upper application according to a photo shooting request. Since the photo shooting parameters are quite different from the preview parameters, the image data generated by the sensor for photo shooting cannot be directly previewed, and generally, frame dropping processing is performed. Therefore, during the photo shooting period mainly based on encoding (for example, JPEG format encoding), the preview is also not updated. That is, during the period of photo shooting parameter reconfiguration and photo data post-processing after the photo shooting request occurs, the preview window for displaying the preview image has no data stream output, and the phenomenon of flow interruption occurs. For the user, what is seen is a long time of preview lag, and therefore, the user experience is greatly affected.

[0025] For ZSL photo shooting, the photo data is generated based on image data of the preview frame, and no parameter configuration is needed. Therefore, ZSL photo shooting does not affect the preview, but the photo shooting effect is poor.

[0026] In order to ensure the photo shooting effect while improving the fluency of user preview, the embodiment of the present application proposes a photo shooting method. The method processes the photo data so that it can be previewed as a preview frame, thereby ensuring the continuous output of the preview data stream. The photo shooting method proposed by the embodiment of the present application is described in detail below. Figure 2 The photo shooting method proposed by the embodiment of the present application is described in detail below.

[0027] Referring to Figure 2 In step S210, the first preview data stream is displayed in the preview window.

[0028] The preview window can be a preview interface of various photo shooting devices. The user can preview the preview data stream generated by the photo shooting device through the preview window. In some embodiments, the preview window can also be an operation interface for the user to preview the image and / or shoot the photo. For example, the preview window can have the function of triggering the photo shooting instruction.

[0029] The photo shooting device can be various digital cameras, video cameras, shooting devices of smart phones, etc. The photo shooting device can include a lens and a body. The lens includes a sensor outputting image data stream. The body includes a preview window displaying the image.

[0030] The first preview data stream displayed by the preview window can be an image data stream output by the sensor based on preview parameters. In some embodiments, after the camera is opened, the sensor starts to output image data after the scene parameters and related control parameters are configured according to the settings of the app. These scene parameters and control parameters can be set by the user or set by the app based on the shooting or preview requirements of the user. In other embodiments, after the user opens the camera app, the sensor can directly output image data for preview.

[0031] The preview parameters can be parameter information related to output of the preview image. The preview parameters are, for example, the format, size, or exposure parameters of the preview image. The preview parameters can also be image indicators of the preview image. The image indicators are, for example, the brightness, contrast, or viewing angle of the image.

[0032] In some embodiments, the first preview data stream can also be image data output by the sensor after image pre-processing. For example, the image data can be pre-processed by an image front-end (IFE) or an image processing engine (IPE).

[0033] The first preview data stream can be a preview data stream before a shooting instruction is triggered. After the shooting request is generated, the sensor no longer outputs the first preview data stream based on the preview parameters, and thus the preview process for displaying the first preview data stream is cut off. In some embodiments, some of the preview frames in the first preview data stream can be cached in the hardware abstraction layer (hal) of the camera or stored in a buffer.

[0034] In step S220, a shooting data stream is generated in response to receiving the shooting instruction.

[0035] The shooting instruction can be a shooting request directly issued by the user of the shooting device or a shooting request issued according to a preset shooting task.

[0036] After the shooting device receives the shooting instruction, the related parameters need to be reconfigured according to the shooting request. In some embodiments, the hardware layer of the device bottom layer can configure the parameters of the sensor and / or the shooting process according to the issued instruction. For example, the camera hal can be used to configure the corresponding parameters of the camera. That is, the parameters of the camera are configured in response to the shooting instruction.

[0037] The parameter configuration can be a reconfiguration of a photographing effect parameter or a photographing process parameter. In some embodiments, the photographing parameter configured according to the photographing request is higher than the preview parameter to meet the effect requirement of the photo. For example, by adjusting the exposure parameter for photographing, the data frame for photographing can be brighter than the preview frame. For example, the image size of the photographing configuration is higher than that of the preview configuration.

[0038] In some embodiments, the photographing process parameter is a setting of an image data processing flow in the photographing process. Different photographing requests correspond to different processing modules, and therefore the photographing process needs to be configured according to the photographing request. For example, when taking a portrait, a regular portrait and a beautified portrait need to be processed by different processing modules, and therefore the corresponding process configuration is needed.

[0039] According to the above parameter configuration, a photographing data stream can be generated. In some embodiments, the sensor and the image signal processor (ISP) can output the photographing corresponding data stream according to the newly configured parameter. For example, the sensor can output 1-3 image data as a photographing frame for corresponding photographing processing. For another example, the multiple image data generated by the sensor can be fused to form a photographing frame.

[0040] In some embodiments, the photographing data stream will be processed according to the photographing process, so as to obtain the final photo. For example, the photographing image output by the sensor will be processed by image pre-processing, Bayer processing segments (BPS), JPEG format encoding, and other photographing processes.

[0041] In step S230, a second preview data stream is generated according to the photographing data stream.

[0042] The second preview data stream can be a data stream for preview generated by processing the photographing data stream. That is, the image data corresponding to the photographing data stream is converted into preview data, so as to generate the second preview data stream.

[0043] In some embodiments, the second preview data stream can be obtained by fusing the first preview data stream and the photographing data stream. As described above, the first preview data stream is generated based on the preview parameter, and the photographing data stream is generated based on the photographing parameter. After fusing the data frame in the first preview data stream and the photographing frame in the photographing data stream, the second preview data stream close to the first preview data stream can be obtained. Therefore, when switching from the first preview data stream to the second preview data stream, the effect can be smoothly and gradually changed, so as to ensure the preview effect of the user.

[0044] As a possible implementation, the first preview data stream fused with the photograph data stream can be a preview frame adjacent to the photograph frame. For example, the photograph frame can be fused with a history preview frame adjacent to the photograph frame in the hal buffer, i.e., a preview frame in the first preview data stream.

[0045] As a possible implementation, the fusion processing can be processing based on a fusion algorithm. The fusion processing can be fusion processing of image indexes. The image indexes are, for example, brightness, contrast, and angle of view, etc.

[0046] In some embodiments, the photograph data stream can be processed according to the preview parameters to obtain a second preview data stream. Generally, the processing of the photograph data stream refers to the processing of generating a photo as described above, and thus the processing of generating the second preview data stream from the photograph data stream according to the preview parameters can be referred to as reprocessing. As known from the foregoing, the difference between the preview parameters and the photograph parameters results in a large difference between the image of the photograph data stream and the image of the preview data stream. Therefore, the photograph data stream can be processed based on the difference between the preview setting and the photograph to make the effect of the second preview data stream close to that of a normal preview frame. For example, in a conventional photographing method, the photograph image has a higher size, and thus the size of the photograph data frame can be adjusted according to the preview parameters. For example, the difference in brightness between the photograph image and the preview image caused by the difference in exposure parameters can be reduced by adjusting the brightness. For example, the photograph image can be processed by considering different algorithm processing differences.

[0047] As a possible implementation, a single algorithm processing can be used to reprocess the photograph data stream to make it close to a preview frame. Outputting the reprocessed image frame as a preview frame can avoid the interruption of photographing.

[0048] In some embodiments, the photograph data stream can be first processed according to the preview parameters, and then fused to obtain a second preview data stream. For example, the effect of the photograph image can be first adjusted to be close to that of the original preview image, and then further fused with the original preview frame.

[0049] In some embodiments, the photograph data stream can also be directly used as a second preview data stream. That is, the preview data stream can accept the data frame of the photograph. It should be noted that due to the difference between the photograph data stream and the preview data stream parameters, the preview image may have a sudden change, affecting the preview effect.

[0050] The processing of converting the photograph image into a preview image can be implemented by a corresponding processing module. In some embodiments, an image processing module can be used to reprocess the photograph data stream based on the preview parameters. In some embodiments, an image fusion module can be used to fuse the photograph data stream with the first preview data stream.

[0051] In some embodiments, the reprocessing of the photographing data stream is different from the existing processing flow of the photographing device. As a possible implementation, the processing flow and architecture of the photographing device can be adjusted. For example, a pipeline flow is created separately in the photographing flow as a passageway for converting the photographing data stream into the preview data stream. That is, a pipeline flow is created separately for the previewing processing and transmission of the photographing data stream. In the following, the photographing data stream is taken as an example to illustrate the implementation of the photographing device. Figure 6

[0052] In step S240, during the photographing process, the second preview data stream is displayed in the preview window, so as to ensure the photographing effect and not affect the preview effect of the user.

[0053] In some embodiments, when the sensor and the flow are configured, the module for reprocessing or fusion processing of the photographing data stream can be started at the same time. When the sensor outputs the photographing data stream, the photographing data stream can be sent to the corresponding module and the photographing processing module at the same time. When the photographing processing module performs the image post-processing, the second preview data stream generated by the reprocessing or fusion processing module can be uploaded to the display module and displayed in the preview window.

[0054] During the photographing process, the photographing data stream generated in step S220 also needs to be processed subsequently, such as Bayer processing and JPEG format coding. During this period, the preview window can display the second preview data stream generated in step S230 to reduce the duration of the lag.

[0055] As described above, the traditional photographing method does not output the preview data stream during the photographing process, which causes the preview window to appear obvious lag due to the flow interruption. The ZSL photographing method can ensure the preview effect, but the photographing effect is poor. In the embodiment of the present application, the photographing data stream can be processed by fusion processing or reprocessing to generate the preview data stream during the photographing process, so as to realize a continuous flow photographing scheme based on image fusion correction.

[0056] Figure 2 The embodiment shown processes the generated photographing data stream into the preview data stream for previewing, which can avoid the flow interruption during the photographing data post-processing. As known from the foregoing, after the photographing request occurs, there is no data flow output during the reconfiguration stage. That is, during the period from the reconfiguration of the photographing parameters to the photographing data stream being used for previewing, the preview data stream still has the problem of flow interruption, and the preview frame cannot be obtained by the fusion reprocessing. Figure 2

[0057] ​​In order to solve the problem of interruption in the configuration phase, the embodiment of the present application also proposes a photographing method. The photographing method processes the preview data stream before the photographing instruction is triggered, and generates image data that can be used for preview in the configuration phase to ensure that the preview data stream is continuous. Figure 3 The photographing method is described in detail. It should be understood that Figure 3 The process shown is similar to Figure 2 Some of the processes shown are similar, so for simplicity, Figure 3 No longer Figure 2 The terms that have appeared are explained in detail.

[0058] Figure 3 The photographing method shown is mainly used to generate a preview before generating a photographing data stream after receiving a photographing instruction.

[0059] See also Figure 3 In step S310, in response to receiving a photographing instruction, the camera is configured with parameters so that the camera outputs a photographing data stream.

[0060] In step S320, during parameter configuration, a third preview data stream is generated according to the first preview data stream.

[0061] In some embodiments, generating a third preview data stream based on the first preview data stream can be achieved by performing frame interpolation on the first preview data stream. That is, performing frame interpolation on the first preview data stream can generate a third preview data stream for previewing during parameter configuration. As a possible implementation, subsequent preview frames can be predicted based on one or more data frames in the first preview data stream that are adjacent to the capture instruction. The predicted one or more subsequent preview frames can form the third preview data stream. For example, prediction can be performed based on the image content or motion trends of multiple data frames.

[0062] In step S320, the third preview data stream is displayed in the preview window.

[0063] Figure 3 The third preview data stream can be used for previewing before the photo data stream is generated. Once the sensor starts generating images based on the photo parameters, the preview process can use reprocessing or fusion to process the photo data stream into a preview data stream for previewing.

[0064] The following is a specific example Figure 4 , more completely describes the embodiments of the present application. It should be noted that Figure 2 to 3 The examples are only for helping those skilled in the art to understand the embodiments of the present application, and are not intended to limit the embodiments of the present application to the specific numerical values ​​or specific scenarios illustrated. Figure 2 to 3Examples of the above-described embodiments can be modified or changed in various equivalent ways, and such modifications or changes also fall within the scope of the embodiments of the present application.

[0065] Figure 4 Fig. 2 shows a flowchart of a possible implementation of the method shown in Fig. 1. Figure 4 The method shown includes steps S402 to S420, which are described in detail below.

[0066] In step S402, the camera is opened according to the use requirement.

[0067] In step S404, the working mode and parameters of the camera are configured, for example, the preview scene related parameters.

[0068] In step S406, the preview is started. The sensor starts to output image data according to the configured scene information and parameters.

[0069] In step S408, it is determined whether the photographing is triggered. If it is detected that there is a photographing request issued, step S410 is executed. If the photographing is not triggered, step S406 is continuously executed.

[0070] In step S410, the pipeline flow is reconfigured, and the preview is discontinued. That is, after the photographing request occurs, the preview flow based on the preview parameters is discontinued.

[0071] In step S412, the pipeline flow is reconfigured based on the photographing parameters, and the new preview pipeline flow is configured. The pipeline flow and the sensor are reconfigured according to the new photographing request. After the preview flow based on the preview parameters is discontinued in step S410, the preview flow based on the photographing data flow is switched. At the same time, the photographing processing of the photographing image, and the reprocessing and fusion algorithm required for converting the photographing image into the preview image are initialized.

[0072] In step S414, the sensor outputs the image based on the new configuration. The sensor and the ISP output the photographing data flow according to the photographing configuration. The photographing data flow will perform steps S416 and S418 respectively. The photographing data flow performs step S418 through the photographing pipeline flow (that is, the photographing processing flow).

[0073] In step S416, the image fusion processing is performed. The photographing data flow generated in step S414 is subjected to image reprocessing and / or fusion processing to generate preview data, which is sent to the preview module for preview.

[0074] In step S418, the photographing post-processing is performed. The photographing data flow is subjected to photographing post-processing such as JPEG encoding processing and label information insertion to generate the photographing image.

[0075] In step S420, the image preview / photographing is continued. After the photo is taken, the preview mode before the photo is taken is restored, and the preview is continued or the next photo operation is prepared. For example, the photo data stream is closed and the preview stream is reconfigured.

[0076] As can be seen from the above, when taking traditional photos, the data stream and the output of the sensor will be reconfigured to ensure that the image data required for taking photos (such as a specific format or size) can be output. However, this will cause the user's preview to not be refreshed with new data, and it will be stuck. Although the photo data is significantly different from the preview data in terms of size, effect, etc., it can be processed and fused by the algorithm to produce an effect close to the original preview image. The embodiment of the present application displays the processed image data as a preview data stream, which can effectively reduce the time of jamming, thereby ensuring the photo effect while reducing the impact of the traditional photo method on the preview.

[0077] Combined with the above Figure 1 to 4 , describes the method embodiment of the present application in detail, and the following is combined with Figure 5 to 7 , the device embodiment of the present application is described in detail. It should be understood that the description of the method embodiment corresponds to the description of the device embodiment, so for parts not described in detail, reference can be made to the previous method embodiment.

[0078] Figure 5 It is a structural diagram of a photographing device provided in an embodiment of the present application. Figure 5 The photographing device in can be any of the photographing devices described above. Figure 5 The illustrated photographing device 500 includes a memory 510 and a processor 520 .

[0079] The memory 510 may be used to store data.

[0080] The processor 520 may be configured to: display a first preview data stream in a preview window; generate a photographing data stream in response to receiving a photographing instruction; generate a second preview data stream based on the photographing data stream; and display the second preview data stream in the preview window during photographing.

[0081] Optionally, the processor 520 is further configured to perform the following operations: merge the first preview data stream and the photo data stream to obtain a second preview data stream.

[0082] Optionally, the processor 520 is further configured to perform the following operations: processing the photographing data stream according to the preview parameter to obtain a second preview data stream.

[0083] Optionally, the processor 520 is further configured to perform the following operation: in response to receiving the photographing instruction, configuring parameters of the camera so that the camera outputs a photographing data stream; during the parameter configuring, generating a third preview data stream according to the first preview data stream; and displaying the third preview data stream on the preview window.

[0084] Figure 6 is Figure 5 is a structural schematic diagram of a possible implementation of the photographing device. Referring to Figure 6 The photographing device includes a sensor 610, an image pre-processing module 620, a display module (surface) 630, a preview window (dispaly) 640, an image processing / fusion module 650, a photographing processing module 660, a JPEG encoding module 670, and a JPEG output 680.

[0085] Referring to Figure 6 , Figure 6 The pipeline flow formed by the modules in the photographing device mainly includes an original preview stream S602, a photographing stream S604, and a photographing preview stream S606. The data streams in the three streams are generated by the sensor 610 and pre-processed by the image pre-processing module 620.

[0086] The data stream in the original preview stream S602 can be a first preview data stream based on a preview parameter. As Figure 6 indicated, the first preview data stream is displayed on the preview window 640 by the display module 630.

[0087] The data in the photographing stream S604 and the photographing preview stream S606 are photographing data streams. The photographing data stream in the photographing stream S604 is processed by the photographing processing module S660 and the JPEG encoding module S670, and the final photograph is generated on the JPEG output 680.

[0088] The photographing data stream in the photographing preview stream S606 is processed by the image processing / fusion module 650 to generate a second preview data stream. The second preview data stream is transmitted to the preview window 640 by the display module 630 for display.

[0089] As mentioned above, in order to process the photographing data stream into a preview data stream that can be used for preview, a separate pipeline flow can be created. As Figure 6 indicated, the photographing preview stream S606 in the middle is the additional processing flow required by the embodiment of the application. Through this flow, the image data output by the sensor during photographing can be processed to obtain an effect close to the original preview image, and the processed data stream is displayed by the display module.

[0090] As Figure 6It can be known that, by reprocessing the photographing data, the photographing data can be output to the display module of the upper layer as preview data at the same time of the photographing processing. By converting the photographing data into preview data, the problem of no data stream output in the JPEG encoding stage is avoided, so that the user can obtain the use effect close to ZSL photographing. When photographing, the user can even perform continuous non-ZSL snapshot, thereby improving the use experience of the user.

[0091] The embodiment of the present application obtains the data stream that can be used as preview by reprocessing the photographing data stream, and reduces the influence of the preview data stream interruption in the JPEG encoding stage on the user preview effect. Because of the uninterrupted preview in the encoding stage, the user can continue to see the scene change in this period of time through the preview. If there is a new photographing requirement in this period of time, the user can continue to click the photographing to perform snapshot. Compared with the traditional photographing method, the photographing method of the embodiment of the present application does not need to wait for the completion of the previous photographing, and can perform further photographing operation according to the new preview image.

[0092] Further, for the stage of starting to reconfigure the data stream to the re-outflow, the frame insertion processing of the data frame can be selected to be performed, so that the preview can be ensured to have data refresh in the reconfiguration stage, thereby obtaining better preview effect.

[0093] Figure 7 FIG. 1 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. As shown in FIG. 1, the electronic device 700 can include a memory 710 and a processor 720. Figure 7

[0094] The memory 710 is used to store a computer program.

[0095] The processor 720 is connected with the memory 710, and is used to execute the computer program stored in the memory 710 to realize the method as described in any of the foregoing.

[0096] ​It should be noted that the electronic device mentioned in the embodiments of the present application is an electrical device with a shooting function composed of microelectronic devices, which refers to a device that can be composed of electronic components such as integrated circuits, transistors, and electron tubes, and plays a role by applying electronic technology (including software). The electronic device can be a random device, and the electronic device can be referred to as a terminal, a portable terminal, a mobile terminal, a communication terminal, a portable communication terminal, a portable mobile terminal, a touch screen, etc. For example, the electronic device can be, but is not limited to, various smart phones, digital cameras, camcorders, notebook computers, tablet computers, smart phones, portable phones, game consoles, televisions, display units, personal media players (PMPs), personal digital assistants (PDAs), robots controlled by electronic computers, etc. The electronic device can also be a portable communication terminal with a wireless communication function and a pocket size.

[0097] It should be understood that in the embodiments of the present application, the processor can be a central processing unit (CPU), and the processor can 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 gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0098] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program. When the computer program code is executed, the steps of the foregoing method are implemented.

[0099] It should be understood that the computer readable storage medium mentioned in the embodiments of the present application can be any available medium readable by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media sets. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)), etc.

[0100] The embodiments of the present application also provide a computer program product, which includes computer program code. When the computer program code is run on a computer, the computer is caused to execute the steps of the foregoing method.

[0101] In the embodiments described above, all or some of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or some of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded into and executed by a computer, all or some of the processes or functions according to the embodiments described in the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode.

[0102] It should be understood that in various embodiments of the present application, "first", "second", and the like are used to distinguish different objects, rather than to describe a specific order, and the size of the serial number of the above processes does not mean the order of execution. The execution order of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0103] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiment described above is only schematic. For example, the division of the units is only a logical function division, and actual implementation can have another division manner. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0104] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can 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 embodiments.

[0105] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit.

[0106] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A photographing method, characterized in that: include: Displaying a first preview data stream in a preview window; In response to receiving a photographing instruction, generating a photographing data stream; Processing the photographing data stream according to a photographing process to generate a photograph; generating a second preview data stream according to the photographing data stream; During the process of processing the photographing data stream according to the photographing process, displaying the second preview data stream in the preview window; The first preview data stream is generated based on preview parameters, and the photographing data stream is generated based on photographing parameters.

2. The photographing method according to claim 1, wherein: Generating a second preview data stream according to the photographing data stream includes: The first preview data stream and the photo data stream are merged to obtain the second preview data stream.

3. The photographing method according to claim 1, wherein: Generating a second preview data stream according to the photographing data stream includes: The photographing data stream is processed according to the preview parameters to obtain the second preview data stream.

4. The photographing method according to claim 1, wherein: Before generating the photographing data stream in response to receiving the photographing instruction, the method further includes: In response to receiving a photographing instruction, configuring parameters of a camera so that the camera outputs the photographing data stream; During the parameter configuration process, generating a third preview data stream according to the first preview data stream; The third preview data stream is displayed in the preview window.

5. A photographing device, characterized in that: include: Memory for storing data; A processor that performs the following operations: Displaying a first preview data stream in a preview window; In response to receiving a photographing instruction, generating a photographing data stream; Processing the photographing data stream according to a photographing process to generate a photograph; generating a second preview data stream according to the photographing data stream; During the process of processing the photographing data stream according to the photographing process, displaying the second preview data stream in the preview window; The first preview data stream is generated based on preview parameters, and the photographing data stream is generated based on photographing parameters.

6. The photographing device according to claim 5, characterized in that: The processor is further configured to perform the following operations: The first preview data stream and the photo data stream are merged to obtain the second preview data stream.

7. The photographing device according to claim 5, characterized in that: The processor is further configured to perform the following operations: The photographing data stream is processed according to the preview parameters to obtain the second preview data stream.

8. The photographing device according to claim 5, characterized in that: The processor is further configured to perform the following operations: In response to receiving a photographing instruction, configuring parameters of a camera so that the camera outputs the photographing data stream; During the parameter configuration process, generating a third preview data stream according to the first preview data stream; The third preview data stream is displayed in the preview window.

9. An electronic device, characterized in that: include: memory for storing computer programs; A processor, connected to the memory, configured to implement the method according to any one of claims 1 to 4 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Photographing preview method and device

    CN108810277A

  • Photographing method and electronic equipment

    CN113382169A