Image shooting method and device, storage medium and chip
By acquiring the shooting mode in the terminal and using cached image data to generate the target image, avoiding preview request processing, solving the camera experience problem caused by preview stream delay, and significantly improving the speed of image acquisition and user experience.
Patent Information
- Application Number
- CN202310533365.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2024-11-12
AI Technical Summary
During the image acquisition process, the delay in the preview stream processing causes the processing time of multi-frame photography requests to become longer, affecting the user's snap shooting experience.
In the terminal, the shooting mode is obtained when responding to the shooting request message, and the cached image data, including rendering data and image parameters, is obtained in the preview shooting mode, to generate target images, avoid participating in the processing process of the preview request, thereby improving the return of the preview request. speed.
It reduces the time required for image generation, improves the user's photo experience, and improves the processing speed of preview requests.
Smart Images

Figure CN118945462A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image acquisition, and in particular to an image capturing method, device, storage medium and chip. Background Art
[0002] In the related art, when a camera application processes a photo request with a preview stream during shooting, the terminal usually first obtains the original image data according to the request sent by the camera application, and the original image data is the image data of the original image that has not been processed. Then the original image is processed according to the preview request, and the preview image is obtained and returned to the camera application. Then the terminal processes the photo request again, and finally obtains the image data and saves and updates it. However, due to the delay in the preview stream processing, the request for multi-frame photos is sent very slowly, and the processing time of the photo request becomes longer, which greatly affects the quick shooting experience. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides an image capturing method, an apparatus, a storage medium and a chip.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided a method for image capture, which is applied to a terminal, and includes: in response to receiving a capture request message, obtaining a capture mode of the terminal; when the capture mode is a preview capture mode, obtaining cached image data; the image data includes rendering data for rendering a first original image and image parameters of the first original image; the first original image is an original image obtained by the last image capture in the preview capture mode; and generating a target image based on the image data.
[0005] Optionally, the method further includes: generating a second original image according to the shooting request message; generating a target image according to the image data includes: rendering the second original image according to the rendering data and the image parameters to obtain a preview image; and generating the target image according to the preview image.
[0006] Optionally, generating the target image according to the preview image includes: receiving an image adjustment request message; and performing an image adjustment operation corresponding to the image adjustment request message on the preview image to obtain the target image.
[0007] Optionally, rendering the second original image according to the rendering data and the image parameters to obtain a preview image includes: adjusting the second original image according to the image parameters to generate a candidate image; rendering the candidate image according to the rendering data to generate the preview image.
[0008] Optionally, generating a candidate image based on the second original image and the image parameters includes: adjusting the image parameters through image parameter adjustment information; the image parameter adjustment information includes parameter adjustment information generated based on the second original image; and generating the candidate image based on the second original image and the adjusted image parameters.
[0009] Optionally, the method further includes: acquiring the call count of the cached image data; and releasing the image data when the call count of the image data is greater than or equal to a preset call count.
[0010] Optionally, the method further includes: acquiring a cache time of the cached image data; and releasing the image data when the cache time of the image data is greater than or equal to a preset cache time.
[0011] According to a second aspect of an embodiment of the present disclosure, there is provided an image capturing device, which is applied to a terminal and includes: a mode acquisition module, for acquiring a capturing mode of the terminal in response to receiving a capturing request message; a data acquisition module, for acquiring cached image data when the capturing mode is a preview capturing mode; the image data includes rendering data for rendering a first original image and image parameters of the first original image; the first original image is an original image obtained by capturing an image in the preview capturing mode last time; and an image processing module, for generating a target image based on the image data.
[0012] Optionally, the device also includes: an image generation module, used to generate a second original image according to the shooting request message; the image processing module is also used to render the second original image according to the rendering data and the image parameters to obtain a preview image; and generate the target image according to the preview image.
[0013] Optionally, the image processing module is further used to receive an image adjustment request message; and perform an image adjustment operation corresponding to the image adjustment request message on the preview image to obtain the target image.
[0014] Optionally, the image processing module is used to adjust the second original image according to the image parameters to generate a candidate image; and render the candidate image according to the rendering data to generate the preview image.
[0015] Optionally, the image processing module is used to adjust the image parameters through image parameter adjustment information; the image parameter adjustment information includes parameter adjustment information generated according to the second original image; and the candidate image is generated according to the second original image and the adjusted image parameters.
[0016] Optionally, the data acquisition module is further used to acquire the call count of the cached image data; and release the image data when the call count of the image data is greater than or equal to a preset call count.
[0017] Optionally, the data acquisition module is further used to acquire a cache time of the cached image data; and release the image data when the cache time of the image data is greater than or equal to a preset cache time.
[0018] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method for capturing images provided in the first aspect of the present disclosure are implemented.
[0019] According to a fourth aspect of an embodiment of the present disclosure, a chip is provided, including a processor and an interface; the processor is used to read instructions to execute the steps of the method for capturing an image provided in the first aspect of the present disclosure.
[0020] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: in response to receiving a shooting request message, obtaining the shooting mode of the terminal; when the shooting mode is a preview shooting mode, obtaining cached rendering data; the rendering data includes rendering data for rendering a first original image; the first original image is the original image obtained by the last image preview in the preview shooting mode; and generating a target image according to the rendering data. In this way, during the shooting process of the terminal, picture generation does not need to participate in the processing process of the preview request, which greatly improves the return speed of the preview request, reduces the time required to generate the picture, and improves the user's photo-taking experience.
[0021] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0023] Figure 1 The figure is a flow chart of a method for photographing an image according to an exemplary embodiment.
[0024] Figure 2 The invention is a block diagram of a device for photographing an image according to an exemplary embodiment.
[0025] Figure 3 It is a block diagram of a device according to an exemplary embodiment. DETAILED DESCRIPTION
[0026] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0027] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.
[0028] The present disclosure is mainly applied to the scenario of using an image acquisition application on a mobile terminal to preview images and take photos. At present, in the photo-taking process based on the mobile terminal, when the image acquisition application on the terminal of the photographer is taking multi-frame photos, the APK (Android application package) sends a preview request and a photo-taking request. The terminal first processes the preview request, generates a preview result, and returns the processing result to the image acquisition application, and then processes the photo-taking request, resulting in a delay in the processing of the photo-taking request in the multi-frame photo-taking.
[0029] Usually, after clicking the photo button to take a photo, the photographer hopes to quickly preview the photo, or store the preview image in the gallery and show it to the photographer. In the existing photo process, the preview processing in some shooting scenes requires complex image processing operations, but a large number of algorithm post-processing processes lead to increased image processing time and delays, which increases the time from the photographer clicking the photo button to the display of a clear image, thus seriously affecting the user experience of the photographer.
[0030] In order to reduce the waiting time from shooting to previewing, in the related technology, when the photographer clicks the shutter, a screenshot of the current preview screen is stored. If the album application has not received the original image at this time, the stored screenshot will be displayed, which is inconsistent with the shooting screen actually required by the photographer. In another related technology, when displaying the screenshot, a blurred transition screen is added to the current screenshot screen. When the album receives the generated post-processed image, the post-processed original image is displayed to the photographer. However, there is still a time delay from the photographer clicking the photo button to the underlying control collecting the image. Since the photographed object may move during the shooting process, there may be inconsistency between the screenshot image when the photographer clicks the shutter and the image screen actually collected at the bottom layer, resulting in a jump problem between the preview screen and the actual collected image screen, which is not conducive to user experience.
[0031] In order to solve the above-mentioned problems, the present disclosure provides an image shooting method, device, storage medium and chip, which can obtain the shooting mode of the terminal in response to receiving a shooting request message; when the shooting mode is a preview shooting mode, obtain cached image data; the image data includes rendering data for rendering a first original image and image parameters of the first original image; the first original image is the original image obtained by the last image preview in the preview shooting mode; and generate a target image based on the rendering data. In this way, during the shooting process of the terminal, the image generation does not need to participate in the processing process of the preview request, which greatly improves the return speed of the preview request, reduces the time required to generate the image, and improves the user's photo-taking experience.
[0032] The specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0033] Figure 1 is a flow chart of a method for capturing an image according to an exemplary embodiment. Figure 1 As shown, the method is used in a terminal and comprises the following steps:
[0034] S101. In response to receiving a shooting request message, obtaining a shooting mode of a terminal.
[0035] In actual application scenarios, a shooting request message can be obtained through the image acquisition application on the terminal. The shooting request message may include a preview data request and a photo data request. For example, after the user opens the image acquisition application, the image acquisition application can obtain the preview data request. When it senses that the user has triggered a preset photo control, the image acquisition application can obtain the photo data request.
[0036] In one implementation, the image acquisition application may have different shooting modes, and different shooting modes may result in different image processing processes. Therefore, after opening the image acquisition application, the user can first obtain the shooting mode selected by the user, such as HDR (High Dynamic Range Imaging), continuous shooting or normal shooting.
[0037] S102: When the shooting mode is a preview shooting mode, obtain cached image data.
[0038] The image data includes rendering data for rendering a first original image and image parameters of the first original image; the first original image is an original image obtained by the last image capture in the preview capture mode.
[0039] In one implementation, the shooting request message is generated in response to a user operation; the shooting request message may be a photo data request with a preview data request; and the rendering data is acquired according to the preview data request.
[0040] For example, in response to a first operation of the user, the terminal generates a preview data request and displays a shooting interface; in the case of displaying the shooting interface, in response to a second operation of taking a photo, a shooting data request is generated, wherein the first operation may be an operation for obtaining a preview image, such as an operation of triggering an image acquisition application to call a camera, or a voice operation of starting an image acquisition application, and the image acquisition application may be an application capable of calling a camera, or an instant messaging application capable of audio and video communication, or a content recording application with integrated image acquisition function (such as a memo application or a note application), etc. The second operation may be an operation for obtaining a target image, and the image acquisition application generates a shooting request message according to the second operation, and the terminal generates a second original image according to the shooting request message, and processes the second original image to obtain the target image, such as a click confirmation operation on a preset control on the image acquisition application, or an operation of calling a shooting function through the image acquisition application.
[0041] In another implementation, the terminal includes an image processing layer, a preset cache space is set in the image processing layer, and the preset cache space is used to store the image parameters and the rendering data; when the shooting mode is the preview shooting mode, the preset cache space is called.
[0042] For example, a cache space may be allocated first, and the cache space includes two cache spaces, one is a first cache space for storing the second original image data, and the other is a second cache space for storing the image parameters of the first original image and the rendering data for rendering the first original image, and the second cache space is the preset cache space. When the user acquires the target image through the image acquisition application, the second original image data acquired by the terminal may be stored in the first cache space, and then the rendering data in the second cache space may be called to render the second original image data to obtain a preview image, and the preview image data may be stored in the first cache space.
[0043] When the second cache space does not contain the image data, the original image data is processed by the bottom layer preview pipeline, and the processed image data is stored in the first cache space.
[0044] In another implementation, when the shooting mode is the preview shooting mode, the terminal sends a preview request message to the image processing layer; when the image processing layer receives the preview request message, the preset calling module is triggered, and the preset calling module is used to call the preset cache space.
[0045] For example, during the processing of the preview request, a copy class can be added to generate a second cache space, and the image data generated when processing the preview request can be stored in the second cache space. The trigger condition of the copy class can be set to receive a preview request message. In this way, when the preview request message is subsequently processed, the copy class will be triggered to directly call the image data in the second cache space, avoiding the need to perform underlying preview pipeline processing on the original image data again.
[0046] In this way, by reducing the underlying processing of the preview request, the algorithm running time is reduced, which is conducive to speeding up the processing time of the preview request.
[0047] S103: Generate a target image based on the image data.
[0048] In one implementation, the second original image may be rendered according to the rendering data and the image parameters to obtain a preview image, and the target image may be generated according to the preview image.
[0049] In some embodiments, the second original image can be adjusted according to the image parameters to generate a candidate image; and the candidate image can be rendered according to the rendering data to generate the target image.
[0050] Among them, the image parameters include parameters such as image size, resolution and exposure. Different images have different image parameters, so it is necessary to adjust the image parameters through image parameter adjustment information. The image parameter adjustment information includes parameter adjustment information generated according to the second original image. The candidate image is generated according to the second original image and the adjusted image parameters.
[0051] For example, the terminal determines the image parameter adjustment information by acquiring image information of the second original image. For example, the second original image information may include the position and color of each pixel in the second original image. The terminal generates the size and resolution of the target image according to the position and color of each pixel.
[0052] In another implementation manner, an image adjustment request message may be received; and an image adjustment operation corresponding to the image adjustment request message is performed on the preview image to obtain the target image.
[0053] For example, when the generated second original image is rendered to obtain the preview image, the terminal returns the preview image to the image acquisition application, and the image acquisition application displays the preview image to the user through the UI interface of the terminal. The user can adjust the preview image through the function controls preset by the image acquisition application. The image acquisition application generates adjustment request information based on the adjustment operation, and when the user indicates confirmation, the image acquisition application issues the adjustment request information, and the terminal generates a target image based on the preview image and the adjustment request information.
[0054] In actual application scenarios, the adjustment operation may be adding special effects, cropping, blur adjustment, etc. The adjustment operation can be implemented according to the preset function controls on the image acquisition application, and this application is not limited to this. After the user enters a certain instruction on the UI interface of the terminal, the image acquisition application generates an adjustment request message based on the adjustment operation and sends it to the image processing layer of the terminal. The image processing layer can call the preview image data in the first cache space, generate a target image based on the adjustment request message, and return it to the image acquisition application, which is displayed on the UI interface of the terminal through the image acquisition application.
[0055] By adopting the above method, in response to receiving a shooting request message, the shooting mode of the terminal can be obtained; when the shooting mode is a preview shooting mode, the cached image data can be obtained; the image data includes rendering data for rendering a first original image and image parameters of the first original image; the first original image is the original image obtained by the last image preview in the preview shooting mode; and the target image is generated according to the rendering data. In this way, during the shooting process of the terminal, the image generation does not need to participate in the processing process of the preview request, which greatly improves the return speed of the preview request, reduces the time required to generate the image, and improves the user's photography experience.
[0056] In addition, since the user's shooting requirements may be different at different times or in different scenes, the second cache space needs to be updated.
[0057] In one implementation, the cache time of the cached image data may be acquired; and when the cache time of the image data is greater than or equal to a preset cache time, the image data is released.
[0058] For example, since the user's demand for the rendering effect of the target image obtained by shooting may be the same in a short period of time, the cache time can be set to ten minutes. The second cache space can be retained for ten minutes for rendering the original image obtained by the terminal. The second cache space will be released if it exceeds ten minutes, and a new second cache space will be generated when the user takes a photo again.
[0059] In another implementation, the number of times the cached image data is called is obtained; when the number of times the image data is called is greater than or equal to a preset number of times, the image data is released.
[0060] For example, when the user chooses to shoot multiple frames continuously, it can be considered that the user's requirements for the rendering effect of the target image obtained by the multiple frames may be the same. When the user chooses to shoot eight consecutive shots, the number of calls to the second cache space can be set to 8 times. When the eight consecutive shots are completed, the number of calls to the second cache space reaches the preset number, and the second cache space is released.
[0061] In yet another implementation, the light intensity received by the terminal photosensitive element is acquired; and when the degree of change in the light intensity is greater than or equal to a preset light intensity change threshold, the image data is released.
[0062] In this way, while saving the target image generation, it is avoided that the same rendering data is used multiple times, resulting in the generated target image not meeting the user's needs, and the user experience is effectively improved.
[0063] Figure 22 is a block diagram of a device 200 for photographing an image according to an exemplary embodiment. Figure 2 The device 200 includes a mode acquisition module 201, a data acquisition module 202 and an image processing module 203.
[0064] The mode acquisition module 201 is used to obtain the shooting mode of the terminal in response to receiving a shooting request message; the data acquisition module 202 is used to obtain cached image data when the shooting mode is a preview shooting mode; the image data includes rendering data for rendering a first original image and image parameters of the first original image; the first original image is the original image obtained by the last image capture in the preview shooting mode; the image processing module 203 is used to generate a target image based on the image data.
[0065] Optionally, the device also includes: an image generation module 204, used to generate a second original image according to the shooting request message; the image processing module 203 is also used to render the second original image according to the rendering data and the image parameters to obtain a preview image; and generate the target image according to the preview image.
[0066] Optionally, the image processing module 203 is further configured to receive an image adjustment request message; and perform an image adjustment operation corresponding to the image adjustment request message on the preview image to obtain the target image.
[0067] Optionally, the image processing module 203 is configured to adjust the second original image according to the image parameters to generate a candidate image; and render the candidate image according to the rendering data to generate the preview image.
[0068] Optionally, the image processing module 203 is used to adjust the image parameters through image parameter adjustment information; the image parameter adjustment information includes parameter adjustment information generated according to the second original image; and generate the candidate image according to the second original image and the adjusted image parameters.
[0069] Optionally, the data acquisition module 202 is further used to acquire the call count of the cached image data; and release the image data when the call count of the image data is greater than or equal to a preset call count.
[0070] Optionally, the data acquisition module 202 is further used to acquire the cache time of the cached image data; if the cache time of the image data is greater than or equal to the preset cache time, the image data is released. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.
[0071] By adopting the above device, the shooting mode of the terminal can be obtained in response to receiving a shooting request message; when the shooting mode is a preview shooting mode, the cached image data can be obtained; the image data includes rendering data for rendering a first original image and image parameters of the first original image; the first original image is the original image obtained by the last image preview in the preview shooting mode; and the target image is generated according to the rendering data. In this way, during the shooting process of the terminal, the image generation does not need to participate in the processing process of the preview request, which greatly improves the return speed of the preview request, reduces the time required to generate the image, and improves the user's photography experience.
[0072] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, which implement the steps of the image capturing method provided by the present disclosure when the program instructions are executed by a processor.
[0073] Figure 3 1 is a block diagram of a terminal 300 for image capture according to an exemplary embodiment. For example, the terminal 300 may be 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.
[0074] Reference Figure 3 The terminal 300 may include one or more of the following components: a processing component 302 , a memory 304 , a power component 306 , a multimedia component 308 , an audio component 310 , an input / output interface 312 , a sensor component 314 , and a communication component 316 .
[0075] The processing component 302 generally controls the overall operation of the terminal 300, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 302 may include one or more processors 320 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 302 may include one or more modules to facilitate the interaction between the processing component 302 and other components. For example, the processing component 302 may include a multimedia module to facilitate the interaction between the multimedia component 308 and the processing component 302.
[0076] The memory 304 is configured to store various types of data to support operations at the terminal 300. Examples of such data include instructions for any application or method operating on the terminal 300, contact data, phone book data, messages, pictures, videos, etc. The memory 304 may be implemented by any type of volatile or non-volatile storage device 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.
[0077] Power component 306 provides power to various components of terminal 300. Power component 306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to terminal 300.
[0078] The multimedia component 308 includes a screen that provides an output interface between the terminal 300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 308 includes a front camera and / or a rear camera. When the terminal 300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0079] The audio component 310 is configured to output and / or input audio signals. For example, the audio component 310 includes a microphone (MIC), and when the terminal 300 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 304 or sent via the communication component 316. In some embodiments, the audio component 310 also includes a speaker for outputting audio signals.
[0080] The input / output interface 312 provides an interface between the processing component 302 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0081] The sensor assembly 314 includes one or more sensors for providing various aspects of status assessment for the terminal 300. For example, the sensor assembly 314 can detect the open / closed state of the terminal 300, the relative positioning of the components, such as the display and keypad of the terminal 300, and the sensor assembly 314 can also detect the position change of the terminal 300 or a component of the terminal 300, the presence or absence of contact between the user and the terminal 300, the orientation or acceleration / deceleration of the terminal 300, and the temperature change of the terminal 300. The sensor assembly 314 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 314 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 314 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0082] The communication component 316 is configured to facilitate wired or wireless communication between the terminal 300 and other devices. The terminal 300 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 316 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) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0083] In an exemplary embodiment, the terminal 300 may 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, microcontrollers, microprocessors or other electronic components to perform the above method.
[0084] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 304 including instructions, and the instructions can be executed by the processor 320 of the terminal 300 to complete the above method. 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, an optical data storage device, etc.
[0085] In addition to being an independent electronic device, the above-mentioned device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned method of capturing images. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment, such as the integrated circuit or chip including a processor, a memory, and an interface for communicating with other devices. The executable instruction can be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned method of capturing images can be implemented; alternatively, the integrated circuit or chip can receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned method of capturing images.
[0086] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above-mentioned method of capturing an image when executed by the programmable device.
[0087] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0088] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for capturing an image, characterized in that: Applied to terminals, including: In response to receiving the shooting request message, acquiring a shooting mode of the terminal; When the shooting mode is a preview shooting mode, cached image data is acquired; the image data includes rendering data for rendering a first original image and image parameters of the first original image; the first original image is an original image obtained by performing an image preview in the preview shooting mode last time; A target image is generated according to the image data.
2. The method according to claim 1, characterized in that The method further comprises: generating a second original image according to the shooting request message; Generating a target image according to the image data comprises: Rendering the second original image according to the rendering data and the image parameters to obtain a preview image; The target image is generated according to the preview image.
3. The method according to claim 2, characterized in that Generating the target image according to the preview image comprises: Receiving an image adjustment request message; An image adjustment operation corresponding to the image adjustment request message is performed on the preview image to obtain the target image.
4. The method according to claim 2, characterized in that: The rendering of the second original image according to the rendering data and the image parameters to obtain a preview image comprises: adjusting the second original image according to the image parameters to generate a candidate image; The candidate image is rendered according to the rendering data to generate the preview image.
5. The method according to claim 4, characterized in that The step of adjusting the second original image according to the image parameters to generate a candidate image comprises: adjusting the image parameters through image parameter adjustment information; the image parameter adjustment information includes parameter adjustment information generated according to the second original image; The candidate image is generated according to the second original image and the adjusted image parameters.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Obtain the number of calls to cache the image data; When the calling number of the image data is greater than or equal to the preset calling number, the image data is released.
7. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Obtaining a cache time of the cached image data; When the cache time of the image data is greater than or equal to the preset cache time, the image data is released.
8. A device for photographing an image, characterized in that: Applied to terminals, including: A mode acquisition module, configured to acquire a shooting mode of the terminal in response to receiving a shooting request message; a data acquisition module, configured to acquire cached image data when the shooting mode is a preview shooting mode; the image data includes rendering data for rendering a first original image and image parameters of the first original image; the first original image is an original image obtained by performing an image preview in the preview shooting mode last time; The image processing module is used to generate a target image according to the image data.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
10. A chip, characterized in that: The method comprises a processor and an interface; the processor is used to read instructions to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method for processing image shot by camera and camera
CN102104709A
Photographing method, mobile terminal and computer readable storage medium
CN108769521A
Shooting method, shooting parameter determining method, electronic equipment and server
CN110868535A
Image processing method and device, shooting device, electronic equipment and storage medium
CN112399087A
Image processing method and device and electronic equipment
CN113794834A
