Photographing method and device, electronic equipment and storage medium

By generating the captured image using the parameter information used when generating the thumbnail, the visual jump problem caused by the thumbnail not loading completely is solved, thus improving the speed of captured image generation and user experience.

CN120835218APending Publication Date: 2025-10-24BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410475742.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-19
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

When taking photos with the camera, the thumbnail may not fully load after the user clicks the shutter button, causing a jump when quickly viewing the album and affecting the user experience.

Method used

By using the parameter information used when generating the thumbnail, the captured image is generated and output, reducing the execution time of the image-taking algorithm and ensuring that the imaging effect of the thumbnail and the captured image is consistent.

Benefits of technology

It improves the speed of generating captured images, avoids visual differences between thumbnails and captured images, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120835218A_ABST
    Figure CN120835218A_ABST
Patent Text Reader

Abstract

The invention relates to a photographing method and device, electronic equipment and a storage medium. The photographing method comprises the following steps: photographing in response to a camera, and obtaining first image data used for generating a thumbnail and second image data used for generating a photographed image; generating and outputting a thumbnail based on the first image data; and generating and outputting a photographed image based on parameter information used for generating the thumbnail and the second image data. The photographing image is generated and output through the parameter information used for generating the thumbnail, the algorithm execution time of a photographing algorithm is shortened, the imaging effect of the photographing image and the imaging effect of the thumbnail can be kept approximately consistent, and the photographing experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of image processing, and in particular, to a photographing method and apparatus, an electronic device, and a storage medium. BACKGROUND

[0002] At present, photographing based on a camera has become one of the indispensable functions on an electronic device.

[0003] In the related art, when photographing based on a camera, two images are loaded in an album after a user clicks a shutter button, one is a thumbnail, and the other is an original image of a photographed image. The thumbnail is an image presented to the user in the album when the photographed image is not processed. However, when the user quickly checks the album after clicking the shutter button, the thumbnail may not be loaded, and the thumbnail and the photographed image may jump when displayed to the user, affecting the user experience. SUMMARY

[0004] To overcome the problems in the related art, the present disclosure provides a photographing method and apparatus, an electronic device, and a storage medium.

[0005] According to a first aspect of an embodiment of the present disclosure, a photographing method is provided, including: in response to a camera photographing, acquiring first image data used to generate a thumbnail and second image data used to generate a photographed image; generating and outputting a thumbnail based on the first image data; and generating and outputting a photographed image based on parameter information used to generate the thumbnail and the second image data.

[0006] In an implementation, after the generating and outputting the thumbnail based on the first image data, the method further includes: saving the parameter information used to generate the thumbnail; and the generating and outputting the photographed image based on the parameter information used to generate the thumbnail and the second image data includes: generating and outputting the photographed image based on the saved parameter information used to generate the thumbnail and the second image data.

[0007] In another implementation, the acquiring the first image data used to generate the thumbnail includes: based on request parameter information of the camera photographing, configuring two-dimensional code stream data used to generate a thumbnail image; and performing downsampling processing on the two-dimensional code stream data to obtain the first image data used to generate the thumbnail; and the generating and outputting the thumbnail based on the first image data includes: generating and outputting the thumbnail based on the first image data obtained after the downsampling processing.

[0008] In yet another implementation, the acquiring the second image data for generating the photo image includes: configuring photo stream data for generating the photo image based on the parameter information requested by the camera for taking the photo; and taking the photo stream data as the second image data for generating the photo image; and the generating and outputting the photo image based on the parameter information used for generating the thumbnail and the second image data includes: up-sampling the parameter information used for generating the thumbnail and down-sampling the second image data; and generating and outputting the photo image based on the up-sampled parameter information and the down-sampled second image data.

[0009] In yet another implementation, the generating and outputting the photo image based on the up-sampled parameter information and the down-sampled second image data includes: performing weight fusion processing on the up-sampled parameter information and the down-sampled second image data to generate and output the photo image.

[0010] According to a second aspect of the embodiments of the present disclosure, a photo taking device is provided, which includes: an acquiring module configured to acquire first image data for generating a thumbnail and second image data for generating a photo image in response to a camera taking a photo; and a generating module configured to generate and output the thumbnail based on the first image data, and generate and output the photo image based on parameter information used for generating the thumbnail and the second image data.

[0011] In an implementation, the generating module is further configured to save the parameter information used for generating the thumbnail after generating and outputting the thumbnail based on the first image data; and the generating module is configured to generate and output the photo image based on the parameter information used for generating the thumbnail and the second image data in the following manner: generating and outputting the photo image based on the saved parameter information used for generating the thumbnail and the second image data.

[0012] In another implementation, the acquiring module is configured to acquire the first image data for generating the thumbnail in the following manner: configuring two-dimensional code stream data for generating the thumbnail image based on the parameter information requested by the camera for taking the photo; and down-sampling the two-dimensional code stream data to obtain the first image data for generating the thumbnail; and the generating module is configured to generate and output the thumbnail based on the first image data in the following manner: generating and outputting the thumbnail based on the first image data obtained after the down-sampling.

[0013] In another implementation, the obtaining module obtains the second image data for generating the photographed image in the following manner: based on the request parameter information for the photographing of the camera, configuring photographing stream data for generating the photographed image; taking the photographing stream data as the second image data for generating the photographed image; and the generating module generates and outputs the photographed image based on the parameter information used for generating the thumbnail and the second image data in the following manner: performing up-sampling processing on the parameter information used for generating the thumbnail and down-sampling processing on the second image data; and generating and outputting the photographed image based on the up-sampled parameter information and the down-sampled second image data.

[0014] In another implementation, the generating module generates and outputs the photographed image based on the up-sampled parameter information and the down-sampled second image data in the following manner: performing weight fusion processing on the up-sampled parameter information and the down-sampled second image data to generate and output the photographed image.

[0015] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, including: a processor; a memory for storing processor-executable instructions; and wherein the processor is configured to execute the photographing method in the first aspect or any implementation of the first aspect.

[0016] According to a fourth aspect of the embodiments of the present disclosure, a storage medium is provided, and the storage medium stores instructions, when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the photographing method in the first aspect or any implementation of the first aspect.

[0017] The technical solutions provided by the embodiments of the present disclosure can have the following beneficial effects: the photographed image is generated and output based on the parameter information used for generating the thumbnail and the second image data, so that the parameter information required by the photographing algorithm processing does not need to be recalculated when the photographed image is generated, thereby reducing the algorithm execution time of the photographing algorithm and improving the generation speed of the photographed image. Moreover, the imaging effect of the photographed image and the thumbnail can be kept approximately consistent by performing the photographing algorithm processing on the second image data based on the parameter information used for generating the thumbnail, and the problem of picture content jumping does not occur, thereby improving the user's photographing experience.

[0018] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0019] The accompanying drawings, which are incorporated herein and constitute part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, further serve to explain the principles of the present disclosure.

[0020] Figure 1 is a flowchart of a photographing method according to an exemplary embodiment.

[0021] Figure 2 is a flowchart of generating and outputting a photographing image based on parameter information and second image data according to an exemplary embodiment.

[0022] Figure 3 is a flowchart of acquiring first image data for generating a thumbnail according to an exemplary embodiment.

[0023] Figure 4 is a flowchart of acquiring second image data for generating a photographing image according to an exemplary embodiment.

[0024] Figure 5 is a flowchart of generating and outputting a photographing image based on parameter information used for generating a thumbnail and second image data according to an exemplary embodiment.

[0025] Figure 6 is a flowchart of generating a thumbnail and a photographing image after a user clicks a photograph according to an exemplary embodiment.

[0026] Figure 7 is a flowchart of customizing a small size photographing scheme and a large size photographing scheme according to an exemplary embodiment.

[0027] Figure 8 is a photographing algorithm time consumption comparison table according to an exemplary embodiment.

[0028] Figure 9 is a block diagram of a photographing apparatus according to an exemplary embodiment.

[0029] Figure 10 is a block diagram of an apparatus 200 for photographing according to an exemplary embodiment. DETAILED DESCRIPTION

[0030] The exemplary embodiments will be described in detail hereinbelow with reference to the drawings. In the following description, the same drawings are designated by the same numbers as appropriate and the description of the same elements will not be repeated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0031] The photographing method provided by the embodiments of the present disclosure is applied to a scenario in which a user uses a camera of an electronic device to take a photograph.

[0032] In the photographing process, different photographing algorithms are used according to different scenes, such as beautification, filters, AI enhancement, HDR, night scene, and the like. According to design requirements, the algorithms can be executed in series or in parallel. Each algorithm has three basic steps of initialization, algorithm processing, and resource recycling. The algorithm processing time required after processing a set of processes according to the above process is the sum of the algorithm processing times of each algorithm. For example, when beautification, filters, AI enhancement, and HDR functions are added at the same time, the above algorithms need to be executed in series and in order. When the execution time of multiple algorithms exceeds the time for the user to open the album, the imaging effect of the photograph cannot be seen. Therefore, in the related art, after the user clicks the shutter button, a thumbnail image is quickly generated for the user to view.

[0033] In the photographing process, the thumbnail image generation scheme can be implemented in the following manner: during the photographing process of the camera, when the user presses the shutter button to take a photograph, a thumbnail image and a photograph image are generated and loaded into the album. The thumbnail image is an image displayed in the album for the user when the photograph image is not processed.

[0034] In the related art, the following two schemes (A) and (B) can be used for thumbnail image generation:

[0035] (A) The preview image before photographing is processed using Gaussian blur and filled in the album as a thumbnail image.

[0036] (B) When the user presses the shutter button to take a photograph, the camera application generates a photograph stream and a two-dimensional code stream. The two-dimensional code stream is obtained from the preview image of the reference frame of the photograph and filled in the two-dimensional code stream data, and returned to the camera application. The camera application displays the data image corresponding to the two-dimensional code stream as a thumbnail image in the album.

[0037] However, in the above scheme, for scheme (A), the resolution of the image after Gaussian blur processing is reduced, so there is a display difference relative to the photographed image, thereby causing a jump in picture content during the display process from the thumbnail to the photographed image, resulting in a more obvious visual difference. For scheme (B), the image obtained from the two-dimensional code stream is a photographed reference frame image, and has undergone single-frame or multi-frame preview algorithm processing. The processing effects of the single-frame or multi-frame preview algorithm and the photographing algorithm are inconsistent, which will cause a jump in picture content during the display process from the thumbnail to the photographed image, resulting in a more obvious visual difference.

[0038] Therefore, the present disclosure provides a photographing method, which generates and outputs a photographed image based on parameter information used for generating a thumbnail, so that the parameter information required for the photographing algorithm processing does not need to be recalculated when the photographed image is generated, thereby reducing the algorithm execution time of the photographing algorithm and improving the generation speed of the photographed image. Moreover, the parameter information used for generating the thumbnail is used when the photographed image is generated, so that the imaging effects of the photographed image and the thumbnail are consistent, thereby ensuring the user experience.

[0039] Figure 1 FIG. 1 is a flowchart of a photographing method according to an example embodiment. Figure 1 As shown in FIG. 1, the photographing method includes the following steps.

[0040] In step S11, in response to the camera photographing, first image data used for generating a thumbnail and second image data used for generating a photographed image are obtained.

[0041] In the present disclosure, when the camera photographs, a two-dimensional code stream and a photographing stream can be generated.

[0042] In an example, the first image data used for generating the thumbnail is determined based on the two-dimensional code stream. It can be understood that the acquisition of the first image data in the present disclosure is not limited to the two-dimensional code stream, but can also be obtained from the photographing stream or other image data that can be obtained from the camera.

[0043] In an example, the second image data used for generating the photographed image is determined based on the photographing stream.

[0044] In step S12, the thumbnail is generated and output based on the first image data.

[0045] In the present disclosure, the algorithm processing process used for generating the thumbnail can be used to algorithmically process the first image data to generate the thumbnail. The generated thumbnail can be output and displayed.

[0046] In step S13, the photographed image is generated and output based on the parameter information used for generating the thumbnail and the second image data.

[0047] In the embodiment of the present disclosure, the parameter information used for generating the thumbnail is parameter information used for algorithm processing of the first image data, which can be image parameters, algorithm parameters, etc. The image parameters include, but are not limited to, resolution, focal length, exposure, etc., and the algorithm parameters include, but are not limited to, algorithm parameters used for effect optimization display of the region of the image.

[0048] The photographing method provided by the embodiment of the present disclosure generates and outputs the photographed image by using the parameter information used for generating the thumbnail in the process of generating the photographed image based on the second image data, so that the parameter information required for photographing algorithm processing is not needed to be calculated again when the photographed image is generated, the algorithm execution time of the photographing algorithm is reduced, and the generation speed of the photographed image is improved. In addition, the photographed image and the thumbnail are generated based on the same parameter information, so that the imaging effects can be kept approximately consistent, thereby avoiding the phenomenon of display effect jump and improving the user experience.

[0049] The following embodiments of the present disclosure further explain and describe the photographing method in the above-mentioned embodiment of the present disclosure.

[0050] Figure 2 is a flowchart of generating and outputting a photographed image based on parameter information and second image data according to an exemplary embodiment, as shown in Figure 2 As shown, generating and outputting a photographed image based on parameter information and second image data includes the following steps.

[0051] In step S21, the parameter information used for generating the thumbnail is saved.

[0052] In the embodiment of the present disclosure, after the thumbnail is generated and output based on the first image data, the parameter information used for generating the thumbnail is saved, so that the saved parameter information can be directly used when the photographed image is generated subsequently, and the processing efficiency is improved.

[0053] In step S22, the photographed image is generated and output based on the saved parameter information used for generating the thumbnail and the second image data.

[0054] In the embodiment of the present disclosure, the photographed image is generated and output by algorithm processing the second image data based on the saved parameter information used for generating the thumbnail.

[0055] The photographing method provided by the embodiment of the present disclosure can generate and output the photographed image more quickly by saving the parameter information used for generating the thumbnail and performing photographing algorithm processing on the second image data, reduce the algorithm execution time of the photographing algorithm, improve the generation speed of the photographed image, and improve the user experience.

[0056] The following embodiments of the present disclosure further explain and illustrate the process of how to obtain the first image data.

[0057] Figure 3 A flowchart of obtaining first image data for generating a thumbnail according to an exemplary embodiment is shown in FIG. 3. Figure 3 As shown in FIG. 3, obtaining first image data for generating a thumbnail includes the following steps.

[0058] In step S31, based on the request parameter information of the camera shooting, the two-dimensional code stream data for generating a thumbnail image is configured.

[0059] In the embodiments of the present disclosure, the request parameter information of the camera shooting includes a single-frame request and a multi-frame request.

[0060] In an example, the single-frame request and the multi-frame request correspond to different shooting algorithms, respectively. For example, the single-frame request can correspond to a shooting algorithm that uses a single frame for processing when the algorithm is processed. For example, a beauty algorithm, but not limited to a beauty algorithm. Wherein the shooting algorithm corresponding to the single-frame request inputs one frame of image data and outputs one frame of image data.

[0061] The multi-frame request can correspond to a shooting algorithm that uses multiple frames for processing when the algorithm is processed. For example, an HDR algorithm, but not limited to an HDR algorithm. Wherein the shooting algorithm corresponding to the multi-frame request inputs multiple frames of image data and outputs one frame of image data.

[0062] In an example, if the request parameter information of the camera shooting is a multi-frame request, then multiple two-dimensional code stream data for generating a thumbnail image is configured.

[0063] In an example, if the request parameter information of the camera shooting is a single-frame request, then single two-dimensional code stream data for generating a thumbnail image is configured.

[0064] In step S32, the two-dimensional code stream data is down-sampled to obtain first image data for generating a thumbnail.

[0065] In the embodiments of the present disclosure, based on the first image data obtained after the down-sampling processing, a thumbnail is generated and output.

[0066] In an example, after the single two-dimensional code stream data for generating a thumbnail image is down-sampled, the first image data obtained is processed by a shooting algorithm, and a thumbnail can be generated and output.

[0067] In an example, after the multiple two-dimensional code stream data for generating a thumbnail image is down-sampled, the multiple first image data obtained is processed by a shooting algorithm, and a thumbnail can be generated and output. Wherein the multiple first image data is processed by a shooting algorithm and outputs one thumbnail.

[0068] In the embodiment of the present disclosure, after the camera generates and outputs the thumbnail, the thumbnail is transmitted to the album application, and the album application fills the thumbnail in the corresponding area in the album application through callback.

[0069] The photographing method provided in the embodiment of the present disclosure can obtain the first image data with reduced image size by performing downsampling processing on the two-dimensional code stream data. Since the image size of the first image data is smaller, the generation speed of the thumbnail can be improved by performing algorithm photographing processing on the first image data, and the user experience is improved.

[0070] The following embodiments of the present disclosure further explain and illustrate how to obtain the second image data.

[0071] Figure 4 A flowchart for obtaining the second image data for generating a photographing image is shown according to an exemplary embodiment, as shown in Figure 4 As shown in the flowchart, obtaining the second image data for generating a photographing image includes the following steps.

[0072] In step S41, photographing stream data for generating a photographing image is configured based on request parameter information of camera photographing.

[0073] In the embodiment of the present disclosure, if the request parameter information of camera photographing is a multi-frame request, multi-path photographing stream data for generating a photographing image is configured.

[0074] In an example, if the request parameter information of camera photographing is a single-frame request, single-path photographing stream data for generating a photographing image is configured.

[0075] In step S42, the photographing stream data is used as the second image data for generating a photographing image.

[0076] In the embodiment of the present disclosure, the single-path photographing stream data is one-to-one corresponding to the single-path two-dimensional code stream data, and the multi-path photographing stream data is one-to-one corresponding to the multi-path two-dimensional code stream data.

[0077] The photographing method provided in the embodiment of the present disclosure determines the first image data and the second image data through one-to-one corresponding two-dimensional code stream data and photographing stream data, and obtains a thumbnail and a photographing image based on the first image data and the second image data. Since the first image data and the second image data are one-to-one corresponding, the thumbnail and the photographing image are consistent in imaging content, the visual difference between the thumbnail and the photographing image is reduced, and the visual experience of the user is ensured.

[0078] The following embodiments of the present disclosure further explain and illustrate how to generate a photographing image based on the second image data in the above-mentioned embodiments of the present disclosure.

[0079] Figure 5is a flowchart of generating and outputting a photographed image based on parameter information used for generating a thumbnail and second image data according to an exemplary embodiment, as shown in Figure 5 As shown, generating and outputting a photographed image based on parameter information used for generating a thumbnail and second image data includes the following steps.

[0080] In step S51, the parameter information used for generating a thumbnail is up-sampled, and the second image data is down-sampled.

[0081] In the embodiments of the present disclosure, in order to meet the photographed algorithm processing effect of the second image data with a larger image size, the parameter information used for generating a thumbnail is up-sampled. However, when the up-sampled parameter information is directly applied to the second image data with a larger size for photographed algorithm processing, there will be a lack in the detail processing of the second image data. In order to ensure the consistency of the photographed image and the thumbnail, the second image data is also down-sampled.

[0082] In step S52, a photographed image is generated and outputted based on the up-sampled parameter information and the down-sampled second image data.

[0083] In the embodiments of the present disclosure, after the camera generates and outputs a photographed image, the photographed image is transmitted to a photo album application, and the photo album application fills the photographed image in the corresponding area in the photo album application through callback.

[0084] The photographed method provided by the embodiments of the present disclosure can make the parameter information used for generating a thumbnail more matched with the second image data by up-sampling the parameter information used for generating a thumbnail and down-sampling the second image data, ensure that the thumbnail and the photographed image are approximately consistent in algorithm processing effect, further reduce the visual difference between the thumbnail and the second image, and improve the user experience.

[0085] The following embodiments of the present disclosure further explain and describe how to generate a photographed image based on the up-sampled parameter information and the down-sampled second image data.

[0086] In the embodiments of the present disclosure, the up-sampled parameter information and the down-sampled second image data are subjected to weight fusion processing to generate and output a photographed image.

[0087] In an example, the first weight coefficient and the second weight coefficient can be set according to the algorithm processing effect of generating a photographed image.

[0088] In an example, the first weight coefficient can be set as x, and the second weight coefficient can be set as y.

[0089] In an example, the first weight coefficient is set as x, and the second weight coefficient is set as y. x is greater than or equal to y. By setting the first weight coefficient greater than the second weight coefficient, the granularity of the photograph algorithm processing can be refined, and the consistency of the thumbnail and the photograph image in the imaging effect is further ensured.

[0090] It can be understood that the size relationship between the first weight coefficient and the second weight coefficient can be determined based on the consistency of the thumbnail and the photograph image in the imaging effect and the generation speed of the photograph image.

[0091] The photograph method provided by the embodiments of the present disclosure can adjust the algorithm processing effect of the photograph image by setting the first weight coefficient and the second weight coefficient, so that the photograph image processed by different photograph algorithms can maintain approximate consistency with the thumbnail, and the user experience is improved.

[0092] The embodiments of the present disclosure will be described below in combination with examples to explain the process of generating the thumbnail and the photograph image.

[0093] Figure 6 is a flowchart of generating a thumbnail and a photograph image after a user clicks a photograph according to an example embodiment. As shown in Figure 6 When the user clicks a photograph, the selection of the photograph request is performed according to the scene information reported by the hardware abstraction layer (HAL). The photograph request includes a single-frame request and a multi-frame request. The upper layer configures a two-dimensional code stream and a photograph stream according to the photograph request. If the photograph request is a single-frame request, a single two-dimensional code stream and a single photograph stream are configured. If the photograph request is a multi-frame request, a multi two-dimensional code stream and a multi photograph stream are configured. The upper layer can be an album application. The HAL layer transmits parameter information to a sensor (Sensor) according to the configured stream information and the photograph request information. The Sensor sets raw image file (RAW) data according to the parameter information. The RAW data is output by the front-end image module (Image FrontEnd, IFE) to output one or more down-sampled two-dimensional code stream data and one or more photograph image data. The two-dimensional code stream data and the photograph image data are returned to the upper layer. The upper layer splits the two-dimensional code stream data and the photograph image data, and inputs the two-dimensional code stream data and the photograph image data into a customized small-size photograph scheme and a customized large-size photograph scheme, respectively. After being processed by the customized small-size photograph scheme and the customized large-size photograph scheme, small-size two-dimensional code stream data and large-size photograph stream data are obtained, respectively. The small-size two-dimensional code stream data is filled into a thumbnail area as a thumbnail, and the large-size photograph stream data is filled into a photograph image area as a photograph image. Finally, the thumbnail and the photograph image are returned to the album by callback and displayed.

[0094] Customization includes the ability to customize the image size of large and small input data, the resolution of downsampled QR code stream data, and the capture algorithm and its processing effects. Customization also includes, but is not limited to, image size, resolution, capture algorithm, and its processing effects based on the consistency between thumbnails and captured images and the speed of captured image generation.

[0095] In one example, in the embodiments of the present disclosure, a lightweight algorithm can be used to implement a customized small-size photo-taking solution, and a customized large-size photo-taking solution can be implemented based on a fine-grained algorithm.

[0096] Among them, the lightweight algorithm represents the algorithm processing for small-size image data, and the fine-grained algorithm represents the algorithm processing for large-size image data, and the parameter information and processing effects required for the lightweight algorithm and the fine-grained algorithm for algorithm processing can be consistent.

[0097] Figure 7 FIG is a flow chart showing a customized small-size photo solution and a customized large-size photo solution according to an exemplary embodiment. Figure 7 As shown, the small-size image data input corresponds to a customized small-size photography solution, while the large-size image data input corresponds to a customized large-size photography solution. The input small-size image data is processed using a lightweight algorithm to output a small-size image, and the lightweight algorithm processing parameters are saved. Based on the saved lightweight algorithm processing parameters, the input large-size image data is processed using a fine-grained algorithm to output a large-size image. The small-size image corresponds to the small-size QR code stream data, while the large-size image corresponds to the large-size photography stream data.

[0098] The photography method provided by the disclosed embodiments generates and outputs a large-scale image by generating parameter information used for a small-scale image and large-scale image data. This eliminates the need to recalculate the parameter information required for algorithm processing when generating the large-scale image, thereby reducing algorithm execution time and increasing the speed of generating the large-scale image. Furthermore, because the photography algorithm is applied to the large-scale image based on the parameter information used to generate the small-scale image, the imaging effects of the small-scale and large-scale images can be maintained approximately consistent, eliminating the problem of image content jumps and improving the user's photography experience.

[0099] According to the photographing method in the embodiment of the present disclosure, the following can be obtained: Figure 8 The time-consuming comparison table of the photo-taking algorithms shown in the figure is as follows: Figure 8As shown, the photographing method used before improvement is not the photographing method protected by the present disclosure, and the photographing method used after improvement is the photographing method protected by the present disclosure. For the processing of a single-frame algorithm, for example, a beauty algorithm, the photographing method before improvement takes 2 ms to generate a thumbnail and 50 ms to generate a photograph image, while the photographing method after improvement takes 10 ms to generate a thumbnail and 30 ms to generate a photograph image. For the processing of a multi-frame algorithm, for example, an HDR algorithm, the photographing method before improvement takes 0 ms to generate a thumbnail and 500 ms to generate a photograph image, while the photographing method after improvement takes 30 ms to generate a thumbnail and 300 ms to generate a photograph image. It can be understood that the photographing method in the embodiments of the present disclosure can reduce the time consumption of a photograph image, whether applied to a single-frame algorithm or a multi-frame algorithm, on the premise that the visual difference between a thumbnail and a photograph image is relatively small. Even if the time consumption of a thumbnail increases, it can meet the demand of a user to open an album to see a thumbnail.

[0100] Based on the same concept, the present disclosure also provides a photographing device.

[0101] It can be understood that the photographing device provided by the embodiments of the present disclosure includes the hardware structure and / or software module corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiments of the present disclosure, the embodiments of the present disclosure can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different devices to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solutions of the embodiments of the present disclosure.

[0102] Figure 9 is a photographing device block diagram according to an exemplary embodiment. Referring to Figure 9 The device 100 includes an acquisition module 101 and a generation module 102.

[0103] The acquisition module 101 is configured to acquire first image data for generating a thumbnail and second image data for generating a photograph image in response to a camera taking a photograph;

[0104] The generation module 102 is configured to generate and output a thumbnail based on the first image data, generate and output a photograph image based on the second image data and parameter information used for generating the thumbnail.

[0105] In an embodiment, the generating module 102 is further configured to save the parameter information used for generating the thumbnail after generating and outputting the thumbnail based on the first image data; and generate and output the shot image based on the parameter information used for generating the thumbnail and the second image data by: generating and outputting the shot image based on the saved parameter information used for generating the thumbnail and the second image data.

[0106] In an embodiment, the acquiring module 101 is configured to acquire the first image data used for generating the thumbnail by: configuring the two-dimensional code stream data used for generating the thumbnail image based on the request parameter information of the camera shot; and downsampling the two-dimensional code stream data to obtain the first image data used for generating the thumbnail; and the generating module 102 is configured to generate and output the thumbnail based on the first image data by: generating and outputting the thumbnail based on the first image data obtained after the downsampling.

[0107] In an embodiment, the acquiring module 101 is configured to acquire the second image data used for generating the shot image by: configuring the shot stream data used for generating the shot image based on the request parameter information of the camera shot; and taking the shot stream data as the second image data used for generating the shot image; and the generating module 102 is configured to generate and output the shot image based on the parameter information used for generating the thumbnail and the second image data by: upsampling the parameter information used for generating the thumbnail and downsampling the second image data; and generating and outputting the shot image based on the upsampling parameter information and the down-sampled second image data.

[0108] In an embodiment, the generating module 102 is configured to generate and output the shot image based on the upsampling parameter information and the down-sampled second image data by: performing weight fusion processing on the upsampling parameter information and the down-sampled second image data to generate and output the shot image.

[0109] As to the apparatus in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments of the apparatus, and thus will not be described in detail here.

[0110] Figure 10 is a block diagram of an apparatus 200 for shooting according to an exemplary embodiment. The apparatus 200 can be, for example, a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0111] Reference is made to Figure 10The device 200 can include one or more of the following components: a processing component 202, a memory 204, a power supply component 206, a multimedia component 208, an audio component 210, an input / output (I / O) interface 212, a sensor component 214, and a communication component 216.

[0112] The processing component 202 typically controls overall operations of the device 200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 202 can include one or more processors 220 to execute instructions stored in the memory 204 to complete all or part of steps of the methods described above. In addition, the processing component 202 can include one or more modules to facilitate interaction between the processing component 202 and other components. For example, the processing component 202 can include a multimedia module to facilitate the interaction between the multimedia component 208 and the processing component 202.

[0113] The memory 204 is configured to store various types of data to support operations of the device 200. Examples of these data include instructions for any applications or methods operating on the device 200, contact data, phonebook data, messages, pictures, videos, and so on. The memory 204 can be implemented by any type of volatile or non-volatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0114] The power supply component 206 supplies power for various components of the device 200. The power supply component 206 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 200.

[0115] The multimedia component 208 includes a screen providing an output interface between the device 200 and a user. In some embodiments, the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes the touch panel, the screen can be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense a touch, a slide, and a gesture on the touch panel. The touch sensor can not only sense a boundary of a touching or a sliding action, but also detect duration and pressure related to the touching or sliding action. In some embodiments, the multimedia component 208 includes a front camera and / or a back camera. The front camera and / or the back camera can receive external multimedia data when the device 200 is in an operation mode, such as a photographing mode or a video mode. Each of the front camera and the back camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0116] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC) that is configured to receive an external audio signal when the device 200 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 204 or transmitted via the communication component 216. In some embodiments, the audio component 210 also includes a speaker for outputting audio signals.

[0117] The I / O interface 212 provides an interface between the processing component 202 and peripheral interface modules, which can be a keypad, a click wheel, buttons, and the like. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.

[0118] The sensor component 214 includes one or more sensors for providing status assessments of various aspects of the device 200. For example, the sensor component 214 can detect an open / closed position of the device 200, relative positioning of components, such as a display and a keypad of the device 200, a change of position of the device 200 or a component of the device 200, presence or absence of user contact with the device 200, orientation or acceleration / deceleration / g-force and temperature of the device 200. The sensor component 214 can include an orientation sensor, an altimeter, a proximity sensor, a

[0119] The communication component 216 is configured to facilitate wired or wireless communication between the device 200 and another device. The device 200 can access a wireless network based on a corresponding communication standard, such as WiFi, 2G, or 3G, or a combination thereof. In an example embodiment, the communication component 216 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In an example embodiment, the communication component 216 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) techniques, infrared data association (IrDA) techniques, ultra-wideband (UWB) techniques, Bluetooth (BT) techniques, and other techniques.

[0120] In exemplary embodiments, the apparatus 200 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components, for executing the above-described methods.

[0121] In exemplary embodiments, a non-transitory computer-readable storage medium including instructions, such as the memory 204 including instructions, is also provided, which can be executed by the processor 220 of the apparatus 200 to complete the above-described methods. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0122] It can be understood that, in the present disclosure, “multiple” refers to two or more, and other quantifiers are similar thereto. “And / or” describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character “ / ” generally represents that the associated objects before and after it are in an “or” relationship. The singular form “a”, “an” and “the” are also intended to include the plural form, unless the context clearly indicates otherwise.

[0123] It can be further understood that the terms “first”, “second”, and the like are used to describe various information, but the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a particular order or importance. In fact, the expressions “first”, “second”, and the like can be used interchangeably. For example, the first target indicator threshold can also be referred to as the second target indicator threshold without departing from the scope of the present disclosure, and similarly, the second target indicator threshold can also be referred to as the first target indicator threshold.

[0124] It can be further understood that, unless otherwise specified, “connection” includes direct connection between the two without other components, and also includes indirect connection between the two with other elements.

[0125] It can be further understood that, although the operations are described in a specific order in the drawings of the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring all of the operations to be performed to obtain the desired results. In a specific environment, multi-tasking and parallel processing can be advantageous.

[0126] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the specification and examples be considered as exemplary only, with a true scope of the disclosure being indicated by the following claims.

[0127] It should be understood that the present disclosure is not limited to the precise structures herein described and illustrated in the drawings, and that various modifications and changes can be made without departing from its scope. The scope of the present disclosure is limited only by the claims that follow.

Claims

1. A photographing method, characterized by, The method comprises: in response to the camera taking a photo, acquiring first image data for generating a thumbnail and second image data for generating a photo image; generating and outputting a thumbnail based on the first image data; generating and outputting a photo image based on parameter information used for generating the thumbnail and the second image data.

2. The photographing method of claim 1, wherein, After the thumbnail is generated and outputted based on the first image data, the method further comprises: saving the parameter information used for generating the thumbnail; the generating and outputting a photo image based on the parameter information used for generating the thumbnail and the second image data comprises: generating and outputting a photo image based on the saved parameter information used for generating the thumbnail and the second image data.

3. The photographing method of claim 1 or claim 2, wherein, The acquiring first image data for generating a thumbnail comprises: configuring two-dimensional code stream data for generating a thumbnail image based on request parameter information of the camera taking a photo; down-sampling the two-dimensional code stream data to obtain first image data for generating a thumbnail; the generating and outputting a thumbnail based on the first image data comprises: generating and outputting a thumbnail based on the first image data obtained after down-sampling.

4. The photographing method of claim 3, wherein, The acquiring second image data for generating a photo image comprises: configuring photo stream data for generating a photo image based on request parameter information of the camera taking a photo; taking the photo stream data as second image data for generating a photo image; the generating and outputting a photo image based on the parameter information used for generating the thumbnail and the second image data comprises: up-sampling the parameter information used for generating the thumbnail and down-sampling the second image data; generating and outputting a photo image based on the up-sampled parameter information and the down-sampled second image data.

5. The photographing method of claim 4, wherein, The generating and outputting a photo image based on the up-sampled parameter information and the down-sampled second image data comprises: performing weight fusion processing on the up-sampled parameter information and the down-sampled second image data to generate and output a photo image.

6. A photographing apparatus characterized by comprising: The device comprises: an acquiring module, configured to acquire first image data for generating a thumbnail and second image data for generating a photo image in response to the camera taking a photo; a generating module, configured to generate and output a thumbnail based on the first image data, and generate and output a photo image based on parameter information used for generating the thumbnail and the second image data.

7. The photographing apparatus according to claim 6, wherein The generating module is further configured to: save the parameter information used for generating the thumbnail after the thumbnail is generated and outputted based on the first image data; the generating module generates and outputs a photo image based on the parameter information used for generating the thumbnail and the second image data in the following manner: generate and output a photo image based on the saved parameter information used for generating the thumbnail and the second image data.

8. The photographing apparatus according to claim 6 or claim 7, characterized by, The acquiring module acquires first image data for generating a thumbnail in the following manner: Based on the request parameter information of the camera shooting, configure the two-dimensional code stream data for generating the thumbnail image; Down-sample the two-dimensional code stream data to obtain the first image data for generating the thumbnail image; The generation module generates and outputs the thumbnail image based on the first image data in the following way: Based on the first image data obtained after down-sampling, generate and output the thumbnail image.

9. The photographing apparatus according to claim 8, wherein The acquisition module acquires the second image data for generating the shooting image in the following way: Based on the request parameter information of the camera shooting, configure the shooting stream data for generating the shooting image; The shooting stream data is used as the second image data for generating the shooting image; The generation module generates and outputs the shooting image based on the parameter information used for generating the thumbnail image and the second image data in the following way: Up-sample the parameter information used for generating the thumbnail image and down-sample the second image data; Based on the up-sampled parameter information and the down-sampled second image data, generate and output the shooting image.

10. The photographing apparatus according to claim 9, wherein The generation module generates and outputs the shooting image based on the up-sampled parameter information and the down-sampled second image data in the following way: Weight fusion process is performed on the up-sampled parameter information and the down-sampled second image data to generate and output the shooting image.

11. An electronic device, comprising: Comprise: A processor; A memory for storing processor-executable instructions; The processor is configured to execute the photographing method of any one of claims 1-5.

12. A storage medium, characterized by The storage medium stores instructions, and when the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute the photographing method of any one of claims 1-5.