Photographing method and apparatus, and electronic device

By coordinating the sending of notification messages between the camera application and the camera system and determining the photo interval, the problem of the rapid photo interval cannot be uniform and uniform is solved, and the consistency of photo intervals and user experience is improved.

WO2025119132A1PCT designated stage expired Publication Date: 2025-06-12VIVO MOBILE COMM CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/136086
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-05
Filing Date
2024-12-02
Publication Date
2025-06-12

AI Technical Summary

Technical Problem

In the prior art, the interval between fast photographing cannot be uniform and uniform, resulting in a decrease in user photography experience.

Method used

By coordinating between the camera application and the camera system, a notification message is sent to allow continued sending of photo requests and to determine the photo interval within the preset time range to ensure consistency of photo intervals.

Benefits of technology

The relative uniformity of the photo interval is achieved and the user's photo experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024136086_12062025_PF_FP_ABST
    Figure CN2024136086_12062025_PF_FP_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of communications. Disclosed are a photographing method and apparatus, and an electronic device. The method comprises: acquiring a first raw image on the basis of an ith photographing request sent by a camera application at a first moment, and then sending a first notification message to the camera application, wherein the first notification message is configured to notify that the camera application is allowed to continue to send a photographing request, and i is a positive integer greater than or equal to 1; and when an (i+1)th photographing request sent by the camera application at a second moment has been received, acquiring a second raw image with a preset number of frames on the basis of the (i+1)th photographing request, wherein an interval between the first moment and the second moment is greater than or equal to a first preset duration and less than a second preset duration, and the second preset duration is twice the first preset duration.
Need to check novelty before this filing date? Find Prior Art

Description

Photographing method, device and electronic equipment

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application No. 202311654584.X filed in China on December 5, 2023, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present application belongs to the field of communication technology, and specifically relates to a photographing method, device and electronic equipment. Background Art

[0004] With the development of imaging technology and the increasing demand for photography in daily life, shooting relatively static scenes such as landscapes and people can no longer meet user needs. Instead, there is an increasing demand for shooting sports and recording wonderful moments in daily life. Therefore, the requirements for the experience and effect of fast photography are getting higher and higher.

[0005] Rapid capture refers to the user tapping the capture button twice or more in rapid succession, with a short interval between each capture. Currently, when users tap the capture button rapidly, the system's response can be inconsistent, sometimes slow, or even unresponsive. This results in inconsistent intervals between captures, reducing the user's photography experience. Summary of the Invention

[0006] The purpose of the embodiments of the present application is to provide a photographing method, device and electronic device, which can solve the problem that the existing rapid photographing intervals cannot be consistent and uniform, thereby reducing the user's photographing experience.

[0007] In a first aspect, an embodiment of the present application provides a photographing method, the method comprising:

[0008] After acquiring a first original RAW image based on an i-th photo request sent by the camera application at the first moment, sending a first notification message to the camera application, where the first notification message is used to notify the camera application that it is allowed to continue sending photo requests, where i is a positive integer greater than or equal to 1;

[0009] Upon receiving the (i+1)th photo request sent by the camera application at a second moment, obtaining a second original RAW image based on the (i+1)th photo request, wherein the interval between the first moment and the second moment is greater than or equal to a first preset time length and less than a second preset time length, and the second preset time length is twice the first preset time length.

[0010] In a second aspect, an embodiment of the present application provides a photographing method, the method comprising:

[0011] Sending an i-th photo request to the camera system at a first moment, where i is a positive integer greater than or equal to 1;

[0012] Upon receiving the first notification message sent by the camera system and when there is an (i+1)th photographing request, determining a second time according to a time when the (i)th photographing request is generated and a time when the (i+1)th photographing request is generated;

[0013] Sending the (i+1)th photo taking request to the camera system at the second moment;

[0014] Among them, the first notification message is used to notify that the camera application is allowed to continue sending photo requests; the interval between the first moment and the second moment is greater than or equal to the first preset time length and less than the second preset time length, and the second preset time length is twice the first preset time length.

[0015] In a third aspect, an embodiment of the present application provides a photographing device, comprising:

[0016] A first acquisition module is configured to acquire a first original RAW image based on an i-th photo taking request sent by the camera application at a first moment;

[0017] a first sending module, configured to, after acquiring a first original RAW image based on an i-th photo request sent by the camera application at a first moment, send a first notification message to the camera application, wherein the first notification message is used to notify the camera application that it is allowed to continue sending photo requests, where i is a positive integer greater than or equal to 1;

[0018] a photographing module, configured to, upon receiving an (i+1)th photographing request sent by the camera application at a second moment, obtain a second original RAW image based on the (i+1)th photographing request, wherein the interval between the first moment and the second moment is greater than or equal to a first preset time length and less than a second preset time length, and the second preset time length is twice the first preset time length.

[0019] In a fourth aspect, an embodiment of the present application provides a camera system, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the photographing method described in the first aspect are implemented.

[0020] In a fifth aspect, an embodiment of the present application provides a photographing device, comprising:

[0021] a third sending module, configured to send an i-th photo taking request to the camera system at a first moment, where i is a positive integer greater than or equal to 1;

[0022] a first processing module, configured to, upon receiving a first notification message sent by the camera system and in the case that there is an (i+1)th photographing request, determine a second time according to a time when the (i)th photographing request is generated and a time when the (i+1)th photographing request is generated;

[0023] a fourth sending module, configured to send the (i+1)th photo-taking request to the camera system at the second moment;

[0024] Among them, the first notification message is used to notify that the camera application is allowed to continue sending photo requests; the interval between the first moment and the second moment is greater than or equal to the first preset time length and less than the second preset time length, and the second preset time length is twice the first preset time length.

[0025] In a sixth aspect, an embodiment of the present application provides a camera application, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the photographing method described in the second aspect are implemented.

[0026] In the seventh aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the photographing method described in the first aspect are implemented, or the steps of the photographing method described in the second aspect are implemented.

[0027] In an eighth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the photographing method as described in the first aspect, or to implement the photographing method as described in the second aspect.

[0028] In a ninth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the photographing method as described in the first aspect, or to implement the photographing method as described in the second aspect.

[0029] In an embodiment of the present application, after obtaining a first original RAW image based on the i-th photo request sent by the camera application at the first moment, a first notification message is sent to the camera application, where the first notification message is used to notify the camera application that it is allowed to continue sending photo requests, where i is a positive integer greater than or equal to 1; in this way, the camera application is informed that the image acquisition corresponding to this photo request is completed and that the next photo request issuance phase can be entered; upon receiving the i+1-th photo request sent by the camera application at the second moment, a second original RAW image is obtained based on the i+1-th photo request, where the interval between the first moment and the second moment is greater than or equal to a first preset time length and less than a second preset time length, and the second preset time length is twice the first preset time length. In this way, through the cooperation between the camera system and the camera application, the photo interval is made relatively uniform, thereby improving the user's photo-taking experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] FIG1 is a schematic diagram of a process flow of a photographing method according to an embodiment of the present application;

[0031] FIG2 is a schematic diagram of a scenario 1 in which the serial number of an original RAW image is added to a first queue according to an embodiment of the present application;

[0032] FIG3 is a schematic diagram of a second scenario in which the serial number of an original RAW image is added to the first queue according to an embodiment of the present application;

[0033] FIG4 is a schematic diagram of a third scenario of adding the serial number of the original RAW image to the first queue according to an embodiment of the present application;

[0034] FIG5 is a schematic diagram of a scene in which a single frame and multiple frames appear alternately;

[0035] FIG6 is a schematic diagram showing that the image numbers corresponding to a single frame interval follow a “real-time reverse order” in the first queue according to an embodiment of the present application;

[0036] FIG7 is a schematic diagram of image buffering in a queue module of a camera system according to an embodiment of the present application;

[0037] FIG8 is a second flow chart of the photographing method according to an embodiment of the present application;

[0038] FIG9 is a third flow chart of the photographing method according to an embodiment of the present application;

[0039] FIG10 is a fourth flow chart of the photographing method according to an embodiment of the present application;

[0040] FIG11 is a schematic diagram of a module of a photographing device according to an embodiment of the present application;

[0041] FIG12 is a schematic structural diagram of a camera system according to an embodiment of the present application;

[0042] FIG13 is a second schematic diagram of a module of a photographing device according to an embodiment of the present application;

[0043] FIG14 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0044] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.

[0045] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "first," "second," and the like generally distinguish objects of a class and do not limit the number of objects. For example, the first object may be one or more.

[0046] Although quick photo shooting can easily record wonderful moments in daily life, in order to ensure that this function provides a good shooting experience, three requirements must be met: first, it must be able to support rapid multiple photo shooting while ensuring image quality; second, the consistency of the photo shooting interval must be guaranteed; third, after taking a quick photo, the user can immediately enter the album through user operation to display the most recently taken photos.

[0047] However, current mobile devices have defects in these aspects. Some quick photos are very slow and sometimes even unresponsive for a long time; some cannot support multiple photos, and no longer support quick photos after six or seven times; some quick photos are displayed immediately after user operation in the album, but are very slow and require waiting for all photos to be processed before displaying them, or directly display photos taken before the quick photo is taken; some can support quick photos but the generated pictures are of poor quality; these have greatly affected the user's photography experience and fail to meet user satisfaction requirements.

[0048] In order to solve the above technical problems, the embodiments of the present application provide a photographing method, device and electronic device. The photographing method provided by the embodiments of the present application is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.

[0049] As shown in FIG1 , an embodiment of the present application provides a method for taking a photo, which is performed by a camera system in an electronic device. Specifically, the method may include:

[0050] Step 101: After acquiring a first original RAW image based on an i-th photo request sent by a camera application at a first moment, sending a first notification message to the camera application, wherein the first notification message is used to notify the camera application that further photo requests are allowed, where i is a positive integer greater than or equal to 1.

[0051] Here, i=1, 2, 3, ... It should be noted that the camera application records the number of photo-taking requests sent to the camera system.

[0052] It should be understood that if the photo request to be sent by the camera application is the first photo request, it does not need to wait for receiving the notification message sent by the camera system (used to notify the camera application to continue sending photo requests) before sending it. It can be sent after generating the photo request.

[0053] Here, the first notification message is used to inform the camera application that the image acquisition corresponding to the current photo request is completed and the next photo request can be sent.

[0054] Step 102: Upon receiving the (i+1)th photo request sent by the camera application at the second moment, obtaining a second original RAW image based on the (i+1)th photo request, wherein the interval between the first moment and the second moment is greater than or equal to a first preset time length and less than a second preset time length, and the second preset time length is twice the first preset time length.

[0055] It should be understood that the first preset duration is the preset photo interval T, which can be dynamically adjusted according to the user's hand speed. After data analysis, optionally, the first preset duration is 200ms, which is closest to the normal hand speed of the user when taking photos quickly.

[0056] Furthermore, after obtaining the second original RAW image, the method of the present application further includes:

[0057] A second notification message is sent to the camera application, where the second notification message is used to notify the camera application that it is allowed to continue sending the photo request. Afterwards, i is assigned a value of i+1 and the above steps 101 to 102 are returned to be executed.

[0058] That is, the camera system will repeat the above steps as long as it receives a photo request from the camera application. Then, the interval between the first moment (i.e., the moment the i-th photo request is sent) and the second moment (i+1-th photo request is sent) is greater than or equal to the first preset duration, and less than the second preset duration. For example, the interval between the first photo request and the second photo request sent by the camera application is within a set duration range, and the interval between the second photo request and the third photo request sent is within a set duration range, where the set duration ranges are the same. This can be understood as the interval between consecutive photos taken over multiple times is relatively uniform, thereby achieving consistency in the photo intervals and improving the user's photo-taking experience.

[0059] In an optional embodiment, in step 101, obtaining the first original RAW image includes:

[0060] When i is less than or equal to a preset number of times, acquiring n frames of first original RAW images, where n is a positive integer greater than or equal to 2;

[0061] Here, let the preset number be M. Then, in the first M photo requests sent by the camera application, the camera system obtains multiple frames of the first original RAW images for each photo request (that is, the camera system captures multiple frames of the first original RAW images, such as 2 frames, 4 frames, etc.), and then performs multi-frame image processing on the captured multiple frames of the first original RAW images, and finally outputs one frame of image, thereby improving the image quality of the captured picture.

[0062] Alternatively, when i is greater than a preset number of times, a frame of the first original RAW image is acquired.

[0063] Here, if i is greater than a preset number of times, meaning that the camera application has issued more than M photo requests, then for each subsequent photo request, the camera system acquires a first frame of the original RAW image (i.e., the camera system captures a first frame of the original RAW image), then performs single-frame image processing on this captured first frame of the original RAW image, and ultimately outputs a single frame of image. Obviously, the image quality of a single-frame image is inferior to the image quality of the processed output image of multiple frames of RAW images, but its advantage is the fast processing speed, which enables multiple rapid photo captures, and the image quality of the images processed by the first M photo requests has already been guaranteed. Therefore, this embodiment can both support rapid and multiple photo captures while ensuring image quality.

[0064] It should be understood that this embodiment corresponds to the M+N photo-taking strategy. The specific explanation is as follows:

[0065] M: For a normal photo (a user clicks on the photo button, which sends a photo request), the camera system needs to capture multiple frames of RAW data (for example, 2 or 4 frames), feed these captured frames into the algorithm for multi-frame processing, and finally output a single frame of data, which will improve the quality of the photo. Therefore, M means M multi-frame photos.

[0066] N: For a normal photo (the user clicks to take a photo, which sends a photo request), the camera system needs to capture one frame of RAW data and then feed this frame of RAW data into the algorithm for single-frame processing. Obviously, the effect of a single-frame image is inferior to that of multiple frames, but the advantage is fast processing speed. Therefore, N is N single-frame photos. The design of the single-frame interval (N) also provides support for the implementation of unlimited photo taking.

[0067] Since capturing multiple frames takes longer than capturing a single frame, and the algorithm generally takes longer to process multiple frames than a single frame, and the memory occupied by multiple frames is much higher than that of single frames, to ensure a fast photo-taking experience and image quality, an M+N photo-taking strategy is adopted, first capturing multiple frames and then capturing a single frame. For example, it is explicitly specified to capture 20 multiple frames and 30 single frames, that is, M=20 and N=30. Of course, M and N will be dynamically adjusted according to the scene.

[0068] For example, in normal photo mode and sports mode, where the effect is prioritized and the algorithm processing time is fast, and speed is the main focus, then M=20 and N=30.

[0069] Portrait mode: The portrait algorithm takes a long time to process. To ensure the shooting speed, it is necessary to reduce the multi-frame interval and increase the single-frame interval, so M = 10, N = 40;

[0070] In addition, if the random access memory (RAM) of some devices is relatively small, such as an 8G device, in order to reduce the memory peak, the multi-frame interval can be reduced to M=7 and N=10.

[0071] As an optional embodiment, the method of the present application may further include:

[0072] In the process of acquiring the first original RAW image, after each frame of the first original RAW image is acquired, the serial number of the acquired first original RAW image is added to the first queue, where the serial number of the first original RAW image includes the shooting sequence number corresponding to the first original RAW image, or the serial number of the first original RAW image includes the shooting sequence number corresponding to the first original RAW image and the frame number of the first original RAW image in the shooting sequence number.

[0073] It should be noted that if the first original RAW image contains multiple frames, the first original RAW image is numbered by the corresponding shot sequence number and the frame number of the first original RAW image within the shot sequence number. For example, the first original RAW image is numbered Mi_1, indicating the first frame of the i-th shot.

[0074] If the number of frames of the first original RAW image is one, the number of the first original RAW image includes the shooting sequence number corresponding to the first original RAW image. For example, the number of the first original RAW image is Mi, which represents the i-th shooting.

[0075] Among them, the first queue is a numbered queue of original RAW images to be processed; except for the shooting sequence number of the target number, the shooting sequence numbers of the remaining numbers in the first queue are sorted in reverse order, the shooting sequence number of the target number is the same as the first shooting sequence number, and the first shooting sequence number is the shooting sequence number corresponding to the original RAW image currently undergoing image processing; if the shooting sequence number corresponds to at least two frames of original RAW images, the frame numbers corresponding to the at least two frames of original RAW images are arranged sequentially in the shooting sequence number.

[0076] It should be noted that after the camera system acquires (captures) the original RAW images based on the photo request sent by the camera application, it processes the captured original RAW images based on the order in the first queue. Specifically, when the camera system begins taking photos, it processes the original RAW image corresponding to the image number that is ranked first in the first queue each time.

[0077] Here, except for the target numbered photo sequence, the remaining photo sequences in the first queue are sorted in reverse order (this sorting can be called "real-time reverse order"). The purpose of this design is to give priority to image processing of the latest captured RAW image. In this way, after taking a quick photo, if the user immediately enters the album through operation, the latest photo taken by this quick photo will be displayed, that is, the user can see the latest photo taken by the quick photo, thereby improving the user's photo-taking experience.

[0078] In this embodiment, the serial number of the acquired first original RAW image is added to the first queue, which is divided into the following three scenarios, which may specifically include:

[0079] 1) When the first photographing sequence is the i-th time and the frame number in the number of the acquired first original RAW image represents the j-th first original RAW image among all the first original RAW images, adding the number of the acquired first original RAW image to the first position of the first queue; wherein the first position is the position where the number of the j-1-th first original RAW image among all the first original RAW images is located;

[0080] This scenario corresponds to processing the first original RAW image obtained for the i-th photo request, but the capture of the first original RAW image corresponding to this photo request has not yet been completed (it should be noted that capturing the original RAW image and image processing in response to the photo request are performed simultaneously). The following example illustrates the processing logic corresponding to this scenario.

[0081] Scenario 1), see Figure 2, when M1 is currently being processed, M1_5 is the image number waiting for sorting, that is, the original RAW image number to be inserted into the first queue ReqExeQueue, and M1_5 represents the 5th original RAW image captured in the first photo.

[0082] The processing logic is as follows: If the inserted frame M1-5 has the same capture sequence number (CaptureID) as M1 (taking picture in progress), it is necessary to find the position (lastSameRequestPos) of the last frame number (expressed by Capture_Sub_ID) with the same CaptureID as M1 (taking picture in progress) in the current ReqExeQueue sequence, and then insert M1_5 after that position. For example, M1_5 is inserted after M1_4 in Figure 2.

[0083] 2) If the first shooting sequence number is different from the i-th shooting sequence number, and the frame number in the number of the first original RAW image obtained represents the first frame of all first original RAW images, add the number of the first original RAW image obtained to the end of the second position of the first queue; wherein the second position is the position of the frame number that ranks last in the first shooting sequence number in the first queue;

[0084] This scenario corresponds to the case where the original RAW image being processed has a different sequence number than the i-th capture request, and the image to be inserted into the first queue is the first original RAW image obtained in the i-th capture request. The following example illustrates the processing logic for this scenario.

[0085] Scenario 2), see Figure 3, when M1 is currently being processed, M4_1 is the image number waiting for sorting, that is, the original RAW image number to be inserted into the first queue ReqExeQueue, and M4_1 represents the first frame of the original RAW image captured by the fourth photo.

[0086] The processing logic is: if the inserted frame M4_1 has a different capture sequence number (CaptureID) from M1 (taking picture processing), it is necessary to find the last Capture_Sub_ID position of M1 (taking picture processing) in the current ReqExeQueue sequence, and then insert M4_1 after that position, as shown in Figure 3, where M4_1 is inserted after M1_5.

[0087] 3) When the first shooting sequence number is different from the i-th shooting sequence number, the number of the obtained first original RAW image represents the k-th first original RAW image among all the first original RAW images, and k≠1, the number of the obtained first original RAW image is added after the third position of the first queue; wherein the third position is the position where the frame number of the k-1-th first original RAW image among all the first original RAW images is located, and the position where the frame number of the first frame of all the first original RAW images is located is arranged after the fourth position of the first queue, and the fourth position is the position where the frame number ranked last in the first shooting sequence number is located.

[0088] This scenario corresponds to the case where the original RAW image being processed has a different sequence number than the i-th capture request, and the image to be inserted into the first queue is the first original RAW image obtained in the i-th capture request, excluding the first frame. The following example illustrates the processing logic for this scenario.

[0089] Scenario 3), see Figure 4, when M1 is currently being processed, M4_2 is the image number waiting for sorting, that is, the original RAW image number to be inserted into the first queue ReqExeQueue, and M4_2 represents the second frame of the original RAW image captured in the fourth photo.

[0090] The processing logic is: if the inserted frame M4_2 has a different capture sequence number (CaptureID) from M1 (taking a picture), two subscripts need to be found. Specifically, the first subscript needs to find the last Capture_Sub_ID position of M1 (taking a picture) in the current ReqExeQueue sequence; the second subscript needs to find the last Capture_Sub_ID position (m_isSecondFrmPos) of the second picture M4 to be processed, and then insert M4_2 after that position, as shown in Figure 4, where M4_2 is inserted after M4_1.

[0091] The processing logic of the above scenarios will all achieve that when the camera system starts to process the photo, the original RAW image corresponding to the image number in the first position in the first queue will be processed each time, thereby achieving the purpose of prioritizing image processing on the most recently captured RAW image.

[0092] The above scenarios all involve the processing of obtaining multiple frames of original RAW images for a single photo request. It should be noted that the logic for obtaining one frame of original RAW image for a single photo request is similar, and its image number in the first queue also follows the "real-time reverse order". If the single-frame interval (N) mentioned above does not have a real-time reverse order function, on the one hand, all photos are executed in the order in which the user clicks to take pictures. Since single-frame or multi-frame is determined according to the changes in the scene, see Figure 5, the scene corresponding to the first M clicks to take pictures requires taking multiple frames; afterwards, due to the change of the scene, a single frame needs to be taken, see single frame 1 and single frame 2 in Figure 5. If at this time (that is, when single frame 2 is being processed), there are multiple frames of photos in front that have been processed, and a multi-frame photo will be inserted. In this way, some scenes will have multiple frames, and some scenes will have single frames, resulting in single frames and multiple frames appearing alternately. This This will cause the shutter interval to be unstable. Secondly, because the algorithm takes significantly longer to process multiple frames than a single frame, single-frame photography is executed quickly while multi-frame photography is executed slowly. The end result is that the user's photography interval is unstable, sometimes fast and sometimes slow. Thirdly, because there is no real-time reverse order, all photos are executed sequentially. After M multi-frame and N single-frame photos are completed, it is necessary to wait for the first multi-frame to complete before continuing to the next photo. A multi-frame photo can take up to 1.2 seconds, so it is still possible to wait for about 1.2 seconds before taking a photo. Therefore, to avoid the above problems, a similar logic is used for obtaining a frame of original RAW image for each photo request, and its image numbering in the first queue also follows the "real-time reverse order". See Figure 6 for details as follows:

[0093] After adding the single-frame interval and real-time reverse order functions, once entering the single-frame interval (that is, taking photos after i is greater than the preset number of times), the single frame will always be queued up and processed first. Since the single-frame processing time is generally less than 200ms, the number of single-frame photos being processed is difficult to pile up.

[0094] In order to achieve unlimited shooting, we set the system to take photos M times (one photo request to capture multiple frames of original RAW images) first, and then take photos N times (one photo request to capture one frame of original RAW image). We no longer judge single-frame and multi-frame scenes based on scene changes, sacrificing image quality in exchange for user experience; because the initial M times of shooting are multi-frame, these M times of shooting can guarantee the image effect and meet user needs; after entering the single-frame interval, almost all the subsequent shots are single-frame. Since the single-frame processing time is fast, there is no accumulation problem, and "unlimited shooting" can be achieved at this time.

[0095] In an optional embodiment, the method of the present application may further include:

[0096] After the first original RAW image is acquired, the first original RAW image is stored in the flash memory frame by frame according to the order in which the images are acquired.

[0097] In this embodiment, the first original RAW image is stored in the UFS flash memory because the flash memory space is much larger than the RAM. Caching the first original RAW image in the flash memory can greatly reduce the pressure on the RAM. At the same time, the first original RAW image is cached in the flash memory. Using the above-mentioned shooting method, the function of continuous multiple rapid shooting can be realized, which greatly improves the speed and number of rapid shooting.

[0098] Based on this embodiment, the method of the present application may further include:

[0099] (1) when image processing is started for the i-th photograph according to the numbering sequence in the first queue, a first original RAW image corresponding to the i-th photograph that is cached in the flash memory is read;

[0100] It should be noted that when previewing, the camera application caches each original RAW image frame in the camera system's queue module (called the RDI Queue module). This module has a cache queue of length 16, which is used to dynamically cache original RAW images for easy photo taking. This cache queue, as shown in Figure 7, is a first-in, first-out queue. The queue length can be adjusted dynamically. Here, each original RAW image frame in the queue is associated with a preview identifier (preview ID) according to the preview time. The photo request issued by the camera application has a corresponding preview ID and photo ID (Capture ID), also known as the photo sequence number.

[0101] The step of reading the first original RAW image corresponding to the i-th photograph stored in the cache from the flash memory specifically includes:

[0102] Based on the preview ID and photo ID corresponding to the i-th photo request, the first original RAW image corresponding to the i-th photo is matched from the flash memory and read into the camera system's buffer frame by frame, and then waits for the next algorithm processing.

[0103] (2) performing image processing on the first original RAW image corresponding to the i-th photograph to obtain a frame of processed image.

[0104] Here, if the first original RAW image corresponding to the i-th photo is multiple frames, the multiple frames of the first original RAW image are processed by the RAW domain algorithm to obtain a frame of image in RAW format or YUV format; then, the single frame of RAW format or YUV format image is processed to generate the final JPEG format image.

[0105] If the first original RAW image corresponding to the i-th photo is a frame, the RAW domain algorithm is performed on the frame of the original RAW image to obtain a frame of RAW format or YUV format image; then, the RAW format or YUV format image is processed to generate a final JPEG format image.

[0106] In another optional embodiment, the method of the present application may further include:

[0107] After acquiring the first original RAW image, and when i is less than or equal to a preset value, storing the first original RAW image frame by frame in a random access memory (RAM) in the order in which the images are acquired; or

[0108] After the first original RAW image is acquired and i is greater than a preset value, the first original RAW image is stored in the flash memory frame by frame in the order in which the images are acquired.

[0109] In this embodiment, taking into account the actual situation, RAM can support the first few times (set as a preset value here) and the problem of flash memory service life, it is set to i reaches a preset value, such as 3 times, and then start using flash memory for data caching to improve efficiency.

[0110] Based on this embodiment, the method of the present application may further include:

[0111] When image processing is started for the i-th photograph according to the order of numbers in the first queue, if i is less than or equal to the preset value, reading the first original RAW image corresponding to the i-th photograph from the RAM;

[0112] If i is greater than the preset value, reading the first original RAW image corresponding to the i-th photo taken in the cache from the flash memory;

[0113] It should be noted that the specific process of reading the first original RAW image corresponding to the i-th photograph from the RAM or the flash memory can be referred to the description of the previous embodiment and will not be repeated here.

[0114] Perform image processing on the first original RAW image corresponding to the i-th photograph to obtain a frame of processed image.

[0115] Here, the specific process of image processing can also be found in the description of the previous embodiment, which will not be repeated here.

[0116] The following example 3, referring to FIG8 , specifically illustrates the implementation process of the photographing method of the present application.

[0117] When previewing, the camera application caches each frame of the original RAW image in the queue module of the camera system (called the RDIQueue module). This module has a cache queue of length 16, which is used to dynamically cache the original RAW image for easy use in taking pictures.

[0118] Step 1: The camera application sends a photo request to the camera system. After receiving the photo request, the camera system first performs the following operations in the Query module:

[0119] 1) Determine whether the current shot is a multi-frame or single-frame shot based on the multi-frame shot count MCount and single-frame shot count NCount. For example, when MCount ≤ 20, it indicates that the current shot is a multi-frame shot. When MCount > 20, it means that the multi-frame shot is full and the current shot is a single-frame shot. In addition, the RequestID and CaptureID corresponding to the current shot request are recorded. The RequestID includes the preview ID and CaptureID, while the CaptureID refers to the photo ID.

[0120] 2) After determining whether the current shot is a multi-frame or single-frame shot, the corresponding counting parameters MCount and NCount will be counted up by 1; for example, if it is a multi-frame shot, the count will be MCount+1, and if it is a single-frame shot, the count will be NCount+1;

[0121] It should be noted that after the camera system receives a photo request, it starts using UFS flash memory to cache the original RAW image. In principle, the original RAW image can be cached in UFS from the first photo. However, in reality, considering that the RAM itself can support the first few photos and the service life of UFS, it can be set to start using UFS for data caching when Mcount reaches 3 times to improve efficiency.

[0122] It should be noted that step 1 can send a photo request every T=200ms. For the camera system HAL, step 1 will be repeated to record each photo. When the multi-frame MCount is full, single-frame NCount photos will continue to be taken.

[0123] Step 2: The camera system determines the number of real-time RAW image frames FCount that needs to be captured based on the current scene and the capture strategy. If it is a multi-frame capture scene, that is, the number of real-time RAW image frames FCount corresponding to the CaptureID, such as 4 frames, 6 frames, or 8 frames. If it is a single-frame capture scene, FCount = 1, indicating that only one RAW image frame is required.

[0124] Then enter the reverse order module (Reverse Order module) ReqExeQueue sequence for real-time reverse order processing. After each photo is taken and the corresponding frame is captured, it is allowed to enter the real-time reverse order sorting process. The specific sorting process is detailed in the corresponding part above and will not be repeated here.

[0125] After sorting, the first CaptureID is taken from ReqExeQueue; the camera system starts taking pictures.

[0126] Step 3: While executing step 2 above, frame capture processing will also be performed in parallel. The UFS writer module will take the latest FCount RAW images from the RDIQueue module's cache queue and write each RAW image frame by frame to the UFS flash memory for caching in the format of CaptureID_RequestID_X.raw file, where X represents 1-FCount;

[0127] Step 4: When the camera system actually starts processing this photo, the UFS reader module matches the cached FCount RAW images from the UFS based on the RequestID and CaptureID of this photo, and reads them frame by frame into the camera system buffer, waiting to be sent to the next step for algorithm processing;

[0128] Step 5: After reading the FCount RAW images required for this shoot from the UFS, they can be directly sent to the algorithm module (Algo) for algorithm processing. Generally, algorithm processing takes a long time, and to prevent the CPU from being overly occupied by the algorithm, the algorithm recommends serial processing.

[0129] Here, RAW images can be sent to the algorithm for processing in two ways: one is frame-by-frame processing, where the UFS reader module reads a frame from the UFS and sends it directly to the algorithm for processing; the other is that the UFS reader module reads all FCount RAW images from the UFS and sends them to the algorithm for processing at once. The method can be dynamically selected based on the algorithm's requirements.

[0130] At the same time, during the algorithm processing process, the image effect after processing multiple frames of RAW images will be significantly better than the processing effect of a single frame of RAW images.

[0131] Step 6: The algorithm module (Algo) performs Raw domain algorithm processing on the FCount RAW images sent in, and synthesizes a frame of Raw format or YUV format data after processing. The following two steps are then performed:

[0132] 1) Notify the UFS reader module in the form of a callback interface that FCount RAW images have been processed; after receiving the callback notification, the UFS reader module will delete the corresponding RAW file in the UFS based on the RequestID and CaptureID of this photo: CaptureID_RequestID_X.raw file;

[0133] 2) The processed and synthesized frame of Raw or YUV format data is sent to the R2J module for further processing to generate the final JPEG format file. Here, the R2J module is an image format conversion module used to convert the Raw or YUV format image into a JPEG format image.

[0134] Step 7: The R2J module continues processing and finally generates a JPEG format file (i.e., the final generated image);

[0135] Step 8: The R2J module processes the generated JPEG format image and calls back to the APP through the interface to save it to the album.

[0136] As shown in FIG9 , an embodiment of the present application provides a method for taking a photo, which is executed by a camera application in an electronic device. The method specifically includes:

[0137] Step 901: Sending an i-th photo-taking request to the camera system at a first moment, where i is a positive integer greater than or equal to 1;

[0138] Here, i=1, 2, 3, ... It should be noted that the camera application records the number of photo-taking requests sent to the camera system.

[0139] Step 902: Upon receiving a first notification message sent by the camera system and when there is an (i+1)th photo request, determining a second time based on the time when the (i)th photo request was generated and the time when the (i+1)th photo request was generated; wherein the first notification message is used to notify the camera application that further photo requests are allowed;

[0140] In some embodiments, step 902 specifically includes:

[0141] If the interval between the moment when the (i+1)th photographing request is generated and the moment when the i-th photographing request is generated is less than the first preset time length, determining the second moment to be a moment separated from the first moment by the first preset time length;

[0142] Here, the interval between the moment of generating the (i+1)th photo request and the moment of generating the (i)th photo request is less than the first preset time length, indicating that the user has made two or more photo inputs within the first preset time length (more than two times is almost unlikely to occur, but even if it does, the camera application will only record one photo request). For the sake of photo consistency, the (i+1)th photo request will not be sent immediately, but will be delayed, that is, the second moment is determined to be the moment separated from the first moment by the first preset time length, that is, subsequently, the (i+1)th photo request is sent to the camera system at the moment separated from the first moment by the first preset time length.

[0143] It should be understood that the first preset duration is the preset photo interval T, which can be dynamically adjusted according to the user's hand speed. After data analysis, optionally, the first preset duration is 200ms, which is closest to the normal hand speed of the user when taking photos quickly.

[0144] It should be noted that, when the first photo request is sent, the camera application starts timing, and the i-th photo request corresponds to the first first preset time length.

[0145] Alternatively, when the interval between the moment of generating the (i+1)th photo request and the moment of generating the i-th photo request is greater than or equal to the first preset time length and less than the second preset time length, the second moment is determined to be the moment of generating the (i+1)th photo request.

[0146] Here, the interval between the moment of generating the (i+1)th photo request and the moment of generating the (i)th photo request is greater than or equal to the first preset time length and less than the second preset time length, indicating that the user's two adjacent photo inputs are performed according to the normal hand speed and are relatively uniform. Therefore, the second moment is determined to be the moment of generating the (i+1)th photo request, that is, the (i+1)th photo request is subsequently sent to the camera system at the moment of generating the (i+1)th photo request.

[0147] Step 903: Send the (i+1)th photo request to the camera system at the second moment; the interval between the first moment and the second moment is greater than or equal to a first preset time length and less than a second preset time length, and the second preset time length is twice the first preset time length.

[0148] It should be noted that if the photo request to be sent by the camera application is the first photo request, there is no need to wait for receiving the notification message sent by the camera system. Except for the first photo request, other photo requests need to wait for receiving the notification message sent by the camera system before they are allowed to be sent.

[0149] It should be noted that the photo-taking scenario targeted by this application is rapid photo-taking. The camera application will send multiple photo-taking requests based on the user's photo-taking input; that is, the camera application will repeat the above steps until no user photo-taking input is received within the mth first preset time period. Then, the interval between the sending time of the i-th photo-taking request (the first time) and the sending time of the i+1-th photo-taking request (the second time) is greater than or equal to the first preset time period, and less than the second preset time period. For example, the interval between the sending time of the first photo-taking request and the sending time of the second photo-taking request is within a set time period range, and the interval between the sending time of the second photo-taking request and the sending time of the third photo-taking request is within a set time period range, where the set time period ranges are the same. This can be understood as multiple photos, with the photo-taking intervals between adjacent photos being relatively uniform, thereby achieving consistency in the photo-taking intervals and improving the user's photo-taking experience.

[0150] In an optional embodiment, the method of the present application further includes:

[0151] If the interval between the moment when the (i+1)th photograph request is generated and the moment when the (i)th photograph request is generated is less than the first preset time length, recording the (i+1)th photograph request after the moment when the (i+1)th photograph request is generated;

[0152] Accordingly, sending the (i+1)th photo-taking request to the camera system at the second moment includes:

[0153] When it is determined at the second moment that the (i+1)th photographing request is recorded, the (i+1)th photographing request is sent to the camera system.

[0154] It should be noted that the purpose of recording the (i+1)th photo request is to enable the camera application to send the (i+1)th photo request to the camera system based on the record, thereby ensuring photo consistency.

[0155] In an optional embodiment, the method of the present application further includes:

[0156] If the first notification message sent by the camera system is not received at the third moment and there is an (i+1)th photo request, sending the (i+1)th photo request is prohibited; wherein the interval between the third moment and the first moment is the first preset duration.

[0157] That is to say, if the first notification message sent by the camera system is not received within the first preset time after the i-th photo request is sent, that is, the notification allows the camera application to continue to send photo requests, the (i+1)-th photo request will be ignored.

[0158] In an optional embodiment, the method of the present application further includes:

[0159] In the case that no user's photo input is received within the mth first preset time period, if a photo request is recorded before the mth first preset time period, the recorded photo request is cleared, where m is a positive integer greater than 1.

[0160] It should be noted that, when the first photo request is sent, the camera application starts timing, and the i-th photo request corresponds to the first first preset time length.

[0161] Here, if no user photo input is received within the mth first preset time period, the quick photo shooting is terminated. Here, if a photo request is recorded before the mth first preset time period, the recorded photo request is cleared, i.e., reset to zero, so as to wait for the next quick photo shooting.

[0162] The following example 4, referring to FIG10 , specifically illustrates the implementation process of the photographing method of the present application.

[0163] Step 1: The user clicks the photo button in the camera application to start sending a photo request to the camera system;

[0164] Step 2: After receiving the photo request, the camera system starts to capture frames. After the frames are captured, the camera system calls the callback interface to notify the camera application that it can take the next photo. Otherwise, the camera application is not allowed to send further photo requests before the frames are captured.

[0165] Step 3: If the user continues to click to take a photo within T = 200ms:

[0166] a) If the camera application does not receive a notification from the camera system that it is allowed to continue taking photos, the photo request is ignored.

[0167] b) If the camera application receives a notification from the camera system that the camera system allows further photo taking, the camera application will not issue a photo request for the time being, but will instead record the photo request. If multiple photo requests are received within 200ms, only one will be recorded.

[0168] Step 4: When the condition in step 3 b) is met, after T = 200ms, the camera application determines whether there is a recorded photo request. If there is a record, the camera application directly sends the recorded photo request to the camera system. Similarly, after the camera system completes frame capture, it sends a notification to the camera application that it can continue taking photos. Then, the process of steps 1, 2, and 3 is repeated.

[0169] Step 5: Same as step 3. This time, determine whether there is a photo request within T = 200ms. If there is a photo request, choose to ignore or record the photo request based on the notification returned by the camera system.

[0170] Step 6: If no user clicks to take a photo within T=200ms, the previously recorded photo request is reset to zero in order to wait for the next quick photo.

[0171] The photographing method provided in the embodiment of the present application can be executed by a photographing device. In the embodiment of the present application, the photographing device provided in the embodiment of the present application is described by taking the photographing method executed by the photographing device as an example.

[0172] As shown in FIG11 , an embodiment of the present application further provides a photographing device, which may include:

[0173] A first acquisition module 1101 is configured to acquire a first preset number of original RAW images based on an i-th photo request sent by a camera application;

[0174] A first sending module 1102 is configured to, after acquiring a first original RAW image based on an i-th photo request sent by the camera application at the first moment, send a first notification message to the camera application, wherein the first notification message is used to notify the camera application that it is allowed to continue sending photo requests, where i is a positive integer greater than or equal to 1;

[0175] The photo-taking module 1103 is configured to, upon receiving an (i+1)th photo-taking request sent by the camera application at a second moment, obtain a second original RAW image based on the (i+1)th photo-taking request, wherein the interval between the first moment and the second moment is greater than or equal to a first preset time length and less than a second preset time length, and the second preset time length is twice the first preset time length.

[0176] Optionally, the first obtaining module 1101 includes:

[0177] The first acquisition unit is configured to acquire n frames of first original RAW images when i is less than or equal to a preset number of times, where n is a positive integer greater than or equal to 2; or

[0178] The second acquiring unit is configured to acquire a frame of the first original RAW image when i is greater than a preset number of times.

[0179] Optionally, the device further comprises:

[0180] a second processing module configured to, in a process of acquiring a first original RAW image, add a serial number of each first original RAW image to a first queue after acquiring each frame of the first original RAW image, where the serial number of the first original RAW image includes a photographing sequence number corresponding to the first original RAW image, or the serial number of the first original RAW image includes a photographing sequence number corresponding to the first original RAW image and a frame number of the first original RAW image within the photographing sequence number;

[0181] Among them, the first queue is a numbered queue of original RAW images to be processed; except for the shooting sequence number of the target number, the shooting sequence numbers of the remaining numbers in the first queue are sorted in reverse order, the shooting sequence number of the target number is the same as the first shooting sequence number, and the first shooting sequence number is the shooting sequence number corresponding to the original RAW image currently undergoing image processing; if the shooting sequence number corresponds to at least two frames of original RAW images, the frame numbers corresponding to the at least two frames of original RAW images are arranged sequentially in the shooting sequence number.

[0182] Optionally, the second processing module includes:

[0183] a third processing unit configured to, when the first photographing sequence number is the i-th time and the frame number in the number of the acquired first original RAW image represents the j-th first original RAW image among all the first original RAW images, add the number of the acquired first original RAW image to after the first position of the first queue; wherein the first position is the position where the number of the j-1-th first original RAW image among all the first original RAW images is located; or

[0184] a fourth processing unit configured to, if the first photographing sequence number is different from the i-th time and the frame number in the sequence number of the acquired first original RAW image represents the first frame of all first original RAW images, add the sequence number of the acquired first original RAW image to the end of the second position of the first queue; wherein the second position is the position of the frame number that ranks last in the first photographing sequence number in the first queue; or

[0185] a fifth processing unit configured to, when the first photographing sequence number is different from the i-th time, and the number of the acquired first original RAW image represents the k-th first original RAW image among all the first original RAW images, and k≠1, add the number of the acquired first original RAW image to after the third position of the first queue; wherein the third position is the position where the frame number of the k-1-th first original RAW image among all the first original RAW images is located, and the position where the frame number of the first frame among all the first original RAW images is located is arranged after the fourth position of the first queue, and the fourth position is the position where the frame number ranked last in the first photographing sequence number is located.

[0186] Optionally, the device further comprises:

[0187] The third processing module is configured to, after acquiring the first original RAW image, store the first original RAW image frame by frame in the flash memory according to the order in which the images are acquired.

[0188] Optionally, the device further comprises:

[0189] a fourth processing module, configured to, after acquiring the first original RAW image and when i is less than or equal to a preset value, store the first original RAW image frame by frame in a random access memory (RAM) in the order in which the images were acquired; or

[0190] The fifth processing module is configured to, after acquiring the first original RAW image and when i is greater than a preset value, store the first original RAW image frame by frame in the flash memory in the order in which the images are acquired.

[0191] Optionally, the device further comprises:

[0192] a sixth processing module, configured to read a first original RAW image corresponding to the i-th photograph from the cached flash memory when image processing is started for the i-th photograph according to the sequence of numbers in the first queue;

[0193] The seventh processing module is used to perform image processing on the first original RAW image corresponding to the i-th photo shooting to obtain a frame of processed image.

[0194] Optionally, the device further comprises:

[0195] an eighth processing module, configured to, starting image processing for the i-th photograph according to the sequence of numbers in the first queue, and when i is less than or equal to the preset value, read the first original RAW image corresponding to the i-th photograph from the cached RAM; or

[0196] a ninth processing module, configured to start image processing for the i-th photograph according to the sequence of numbers in the first queue, and, if i is greater than the preset value, read a first original RAW image corresponding to the i-th photograph from the cached flash memory;

[0197] The tenth processing module is configured to perform image processing on the first original RAW image corresponding to the i-th photograph to obtain a frame of processed image.

[0198] Optionally, the device further comprises:

[0199] The second sending module is used to send a second notification message to the camera application after acquiring the second original RAW image, where the second notification message is used to notify the camera application to allow it to continue sending photo-taking requests.

[0200] The photographing device of an embodiment of the present application, after obtaining a first original RAW image based on the i-th photographing request sent by the camera application at a first moment, sends a first notification message to the camera application, where the first notification message is used to notify the camera application that it is allowed to continue sending photographing requests, and i is a positive integer greater than or equal to 1; in this way, the camera application is informed that the image acquisition corresponding to this photographing request is completed and can enter the stage of sending the next photographing request; when receiving the i+1-th photographing request sent by the camera application at a second moment, the second original RAW image is obtained based on the i+1-th photographing request, wherein the interval between the first moment and the second moment is greater than or equal to a first preset time length and less than a second preset time length, and the second preset time length is twice the first preset time length. In this way, through the cooperation between the camera system and the camera application, the photographing interval is made relatively uniform, thereby improving the user's photographing experience.

[0201] The photographing device provided in the embodiment of the present application can implement each process implemented in the method embodiment of Figure 1. To avoid repetition, they will not be described here.

[0202] As shown in Figure 12, an embodiment of the present application also provides a camera system 1200, including a processor 1201 and a memory 1202. The memory 1202 stores programs or instructions that can be run on the processor 1201. When the program or instruction is executed by the processor 1201, the various steps of the above-mentioned photographing method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, they will not be repeated here.

[0203] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0204] As shown in FIG13 , an embodiment of the present application further provides a photographing device, which may include:

[0205] The third sending module 1301 is configured to send an i-th photo taking request to the camera system at a first moment, where i is a positive integer greater than or equal to 1;

[0206] A first processing module 1302 is configured to, upon receiving a first notification message sent by the camera system and in the case that there is an (i+1)th photographing request, determine a second time according to a time when the (i)th photographing request is generated and a time when the (i+1)th photographing request is generated;

[0207] A fourth sending module 1303 is configured to send the (i+1)th photo taking request to the camera system at the second moment;

[0208] Among them, the first notification message is used to notify that the camera application is allowed to continue sending photo requests; the interval between the first moment and the second moment is greater than or equal to the first preset time length and less than the second preset time length, and the second preset time length is twice the first preset time length.

[0209] Optionally, the first processing module 1302 includes:

[0210] a first processing unit configured to, when the interval between the moment of generating the (i+1)th photographing request and the moment of generating the i-th photographing request is less than the first preset time length, determine that the second moment is a moment separated from the first moment by the first preset time length; or

[0211] The second processing unit is used to determine that the second moment is the moment of generating the (i+1)th photo request when the interval between the moment of generating the (i+1)th photo request and the moment of generating the i-th photo request is greater than or equal to the first preset time length and less than the second preset time length.

[0212] Optionally, the device further comprises:

[0213] a recording module configured to record the (i+1)th photograph request after the moment when the (i+1)th photograph request is generated, if the interval between the moment when the (i+1)th photograph request is generated and the moment when the (i)th photograph request is generated is less than the first preset time length;

[0214] The fourth sending module 1303 includes:

[0215] The first sending unit is configured to send the (i+1)th photographing request to the camera system when it is determined at the second moment that the (i+1)th photographing request is recorded.

[0216] Optionally, the device further comprises:

[0217] a tenth processing module, configured to prohibit sending the (i+1)th photo request when the first notification message sent by the camera system is not received at a third moment and there is an (i+1)th photo request; wherein the interval between the third moment and the first moment is the first preset duration.

[0218] Optionally, the device further comprises:

[0219] The eleventh processing module is used to clear the recorded photo request if no photo input is received from the user within the mth first preset time period and a photo request is recorded before the mth first preset time period, where m is a positive integer greater than 1.

[0220] The photographing device of the embodiment of the present application sends the i-th photographing request to the camera system at a first moment, where i is a positive integer greater than or equal to 1; upon receiving the first notification message sent by the camera system and there is an i+1-th photographing request, determines a second moment according to the moment when the i-th photographing request is generated and the moment when the i+1-th photographing request is generated; sends the i+1-th photographing request to the camera system at the second moment; wherein the first notification message is used to notify that the camera application is allowed to continue sending photographing requests; the interval between the first moment and the second moment is greater than or equal to a first preset time length and less than a second preset time length, and the second preset time length is twice the first preset time length. In this way, through the cooperation between the camera system and the camera application, the photographing interval is made relatively uniform, thereby improving the user's photographing experience.

[0221] The photographing device in the embodiments of the present application can be an electronic device or a component of an electronic device, such as an integrated circuit or chip. The electronic device can be a terminal or other device other than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA). It can also be a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine (ATM), or a self-service machine, etc., and the embodiments of the present application do not specifically limit this.

[0222] The photographing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0223] The photographing device provided in the embodiment of the present application can implement each process implemented in the method embodiment of Figure 9. To avoid repetition, they will not be described here.

[0224] The embodiment of the present application also provides a camera application, which, when executed, implements the various steps of the photographing method embodiment described in Figure 9 above and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0225] FIG14 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.

[0226] The electronic device 1400 includes but is not limited to: a radio frequency unit 1401, a network module 1402, an audio output unit 1403, an input unit 1404, a sensor 1405, a display unit 1406, a user input unit 1407, an interface unit 1408, a memory 1409, a processor 1410, a camera system and a camera application, and the memory 1409 includes RAM and flash memory.

[0227] Those skilled in the art will appreciate that the electronic device 1400 may further include a power source (e.g., a battery) to power various components. The power source may be logically connected to the processor 1410 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The electronic device structure shown in FIG14 does not limit the electronic device. The electronic device may include more or fewer components than shown, or may combine certain components, or have different component arrangements, which will not be described in detail here.

[0228] The camera system may perform the following steps via a processor:

[0229] After acquiring a first original RAW image based on an i-th photo request sent by the camera application at the first moment, sending a first notification message to the camera application, where the first notification message is used to notify the camera application that it is allowed to continue sending photo requests, where i is a positive integer greater than or equal to 1;

[0230] Upon receiving the (i+1)th photo request sent by the camera application at a second moment, obtaining a second original RAW image based on the (i+1)th photo request, wherein the interval between the first moment and the second moment is greater than or equal to a first preset time length and less than a second preset time length, and the second preset time length is twice the first preset time length.

[0231] Optionally, the processor is further configured to:

[0232] When i is less than or equal to a preset number of times, acquiring n frames of first original RAW images, where n is a positive integer greater than or equal to 2; or

[0233] When i is greater than a preset number of times, a first original RAW image is acquired.

[0234] Optionally, the processor is further configured to:

[0235] In a process of acquiring a first original RAW image, after each frame of the first original RAW image is acquired, a serial number of the acquired first original RAW image is added to a first queue, where the serial number of the first original RAW image includes a photographing sequence number corresponding to the first original RAW image, or the serial number of the first original RAW image includes a photographing sequence number corresponding to the first original RAW image and a frame number of the first original RAW image within the photographing sequence number;

[0236] Among them, the first queue is a numbered queue of original RAW images to be processed; except for the shooting sequence number of the target number, the shooting sequence numbers of the remaining numbers in the first queue are sorted in reverse order, the shooting sequence number of the target number is the same as the first shooting sequence number, and the first shooting sequence number is the shooting sequence number corresponding to the original RAW image currently undergoing image processing; if the shooting sequence number corresponds to at least two frames of original RAW images, the frame numbers corresponding to the at least two frames of original RAW images are arranged sequentially in the shooting sequence number.

[0237] Optionally, the processor is further configured to:

[0238] When the first photographing sequence is the i-th time and the frame number in the number of the acquired first original RAW image represents the j-th first original RAW image among all the first original RAW images, the number of the acquired first original RAW image is added after the first position of the first queue; wherein the first position is the position where the number of the j-1-th first original RAW image among all the first original RAW images is located; or

[0239] If the first photographing sequence number is different from the i-th time, and the frame number in the serial number of the obtained first original RAW image represents the first frame of all first original RAW images, the serial number of the obtained first original RAW image is added after the second position of the first queue; wherein the second position is the position of the frame number that ranks last in the first photographing sequence number in the first queue; or

[0240] When the first shooting sequence number is different from the i-th time, the number of the obtained first original RAW image represents the k-th first original RAW image among all the first original RAW images, and k≠1, the number of the obtained first original RAW image is added after the third position of the first queue; wherein the third position is the position where the frame number of the k-1-th first original RAW image among all the first original RAW images is located, and the position where the frame number of the first frame of all the first original RAW images is located is arranged after the fourth position of the first queue, and the fourth position is the position where the frame number ranked last in the first shooting sequence number is located.

[0241] Optionally, the processor is further configured to:

[0242] After the first original RAW image is acquired, the first original RAW image is stored in the flash memory frame by frame according to the order in which the images are acquired.

[0243] Optionally, the processor is further configured to:

[0244] After acquiring the first original RAW image, and when i is less than or equal to a preset value, storing the first original RAW image frame by frame in a random access memory (RAM) in the order in which the images are acquired; or

[0245] After the first original RAW image is acquired and i is greater than a preset value, the first original RAW image is stored in the flash memory frame by frame in the order in which the images are acquired.

[0246] Optionally, the processor is further configured to:

[0247] When image processing is started for the i-th photograph according to the numbering sequence in the first queue, a first original RAW image corresponding to the i-th photograph that is cached in the flash memory is read;

[0248] Perform image processing on the first original RAW image corresponding to the i-th photograph to obtain a frame of processed image.

[0249] Optionally, the processor is further configured to:

[0250] When image processing is started for the i-th photograph according to the order of numbers in the first queue, if i is less than or equal to the preset value, reading the first original RAW image corresponding to the i-th photograph from the RAM;

[0251] If i is greater than the preset value, reading the first original RAW image corresponding to the i-th photo taken in the cache from the flash memory;

[0252] Perform image processing on the first original RAW image corresponding to the i-th photograph to obtain a frame of processed image.

[0253] Optionally, the processor is further configured to:

[0254] A second notification message is sent to the camera application, where the second notification message is used to notify the camera application that it is allowed to continue sending photo-taking requests.

[0255] The camera application executes the steps of the photographing method as described in FIG. 9 .

[0256] In the embodiment of the present application, the camera system and the camera application cooperate to make the photo intervals relatively uniform, thereby improving the user's photo-taking experience; through the "real-time reverse order" photo-taking processing, the photo-taking order is reasonably re-sorted in real time while taking photos, and the last photo request is given priority, so that the user can see the most recently taken photos, thereby improving the user's photo-taking experience; through the extremely fast reading and writing speed of flash memory, the RAW image captured after the photo is taken is cached in the flash memory during the quick shooting process, and when the photo is actually processed, the RAW image is read out from the flash memory for processing, which can greatly improve the photo-taking performance and increase the number of quick shots and experience.

[0257] It should be understood that in an embodiment of the present application, the input unit 1404 may include a graphics processing unit (GPU) 14041 and a microphone 14042, and the graphics processor 14041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 1406 may include a display panel 14061, and the display panel 14061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1407 includes a touch panel 14071 and at least one of other input devices 14072. The touch panel 14071 is also called a touch screen. The touch panel 14071 may include two parts: a touch detection device and a touch controller. Other input devices 14072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and an operating stick, which will not be repeated here.

[0258] The memory 1409 can be used to store software programs and various data. The memory 1409 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 1409 may include a volatile memory or a non-volatile memory, or the memory 1409 may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 1409 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0259] Processor 1410 may include one or more processing units. Optionally, processor 1410 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 1410.

[0260] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned photographing method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0261] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0262] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above photographing method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0263] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0264] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned photographing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0265] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0266] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0267] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

Claims

1. A photographing method, comprising: After acquiring a first original RAW image based on the i-th photo request sent by the camera application at the first moment, sending a first notification message to the camera application, where the first notification message is used to notify that the camera application is allowed to continue sending photo requests, and i is a positive integer greater than or equal to 1; Upon receiving the (i+1)th photo request sent by the camera application at a second moment, a second original RAW image is acquired based on the (i+1)th photo request, wherein the interval between the first moment and the second moment is greater than or equal to a first preset time length and less than a second preset time length, and the second preset time length is twice the first preset time length.

2. The method according to claim 1, wherein: Get the first original RAW image, including: When i is less than or equal to a preset number of times, acquiring n frames of first original RAW images, where n is a positive integer greater than or equal to 2; or, When i is greater than a preset number of times, a frame of the first original RAW image is acquired.

3. The method according to claim 1, wherein: The method further comprises: In the process of acquiring the first original RAW image, after each frame of the first original RAW image is acquired, the number of the acquired first original RAW image is added to the first queue, where the number of the first original RAW image includes the shooting sequence number corresponding to the first original RAW image, or the number of the first original RAW image includes the shooting sequence number corresponding to the first original RAW image and the frame number of the first original RAW image in the shooting sequence number; Among them, the first queue is a numbered queue of original RAW images to be processed; except for the shooting sequence number of the target number, the shooting sequence numbers of the other numbers in the first queue are sorted in reverse order, the shooting sequence number of the target number is the same as the first shooting sequence number, and the first shooting sequence number is the shooting sequence number corresponding to the original RAW image currently undergoing image processing; if the shooting sequence number corresponds to at least two frames of original RAW images, the frame numbers corresponding to the at least two frames of original RAW images are arranged sequentially in the shooting sequence number.

4. The method according to claim 3, wherein: The step of adding the serial number of the first original RAW image obtained to the first queue includes: When the first photographing sequence is the i-th time and the frame number in the number of the first original RAW image obtained represents the j-th first original RAW image among all the first original RAW images, the number of the first original RAW image obtained is added after the first position of the first queue; wherein the first position is the position where the number of the j-1-th first original RAW image among all the first original RAW images is located; or, When the first photographing sequence number is different from the i-th time and the frame number in the serial number of the first original RAW image obtained represents the first frame of the first original RAW image in all the first original RAW images, the serial number of the first original RAW image obtained is added after the second position of the first queue; wherein the second position is the position of the frame number ranked last in the first photographing sequence number in the first queue; or, When the first photographing sequence number is different from the i-th time, the number of the acquired first original RAW image represents the k-th first original RAW image among all the first original RAW images, and k≠1, the number of the acquired first original RAW image is added after the third position of the first queue; wherein the third position is the position where the frame number of the k-1-th first original RAW image among all the first original RAW images is located, and the position where the frame number of the first frame of the first original RAW image among all the first original RAW images is located is arranged after the fourth position of the first queue, and the fourth position is the position where the frame number ranked last in the first photographing sequence number is located.

5. The method according to claim 3, wherein: The method further comprises: After the first original RAW image is acquired, the first original RAW image is stored frame by frame in the flash memory according to the order in which the images are acquired.

6. The method according to claim 3, wherein: The method further comprises: After acquiring the first original RAW image, and when i is less than or equal to a preset value, storing the first original RAW image frame by frame in a random access memory RAM according to the order in which the images are acquired; or, After the first original RAW image is acquired, and when i is greater than a preset value, the first original RAW image is stored in the flash memory frame by frame in the order in which the images are acquired.

7. The method according to claim 5, wherein: The method further comprises: When image processing is started for the i-th photograph according to the sequence of numbers in the first queue, a first original RAW image corresponding to the i-th photograph in the cache is read from the flash memory; Perform image processing on the first original RAW image corresponding to the i-th photograph to obtain a frame of processed image.

8. The method according to claim 6, wherein: The method further comprises: When image processing is started for the i-th photograph according to the sequence of numbers in the first queue, if i is less than or equal to the preset value, a first original RAW image corresponding to the i-th photograph in the cache is read from the RAM; If i is greater than the preset value, reading the first original RAW image corresponding to the i-th photo taken in the cache from the flash memory; Perform image processing on the first original RAW image corresponding to the i-th photograph to obtain a frame of processed image.

9. The method according to claim 1, wherein: After acquiring the second original RAW image, the method further includes: A second notification message is sent to the camera application, where the second notification message is used to notify that the camera application is allowed to continue sending photo-taking requests.

10. A method for photographing, wherein: include: Sending an i-th photo-taking request to the camera system at a first moment, where i is a positive integer greater than or equal to 1; When a first notification message sent by the camera system is received and there is an (i+1)th photographing request, determining a second time according to a time when the (i)th photographing request is generated and a time when the (i+1)th photographing request is generated; Sending the (i+1)th photo-taking request to the camera system at the second moment; The first notification message is used to notify the camera application to continue sending a photo request; The interval between the first moment and the second moment is greater than or equal to a first preset time length and less than a second preset time length, and the second preset time length is twice the first preset time length.

11. The method according to claim 10, wherein: The determining the second time according to the time when the i-th photographing request is generated, the time when the i+1-th photographing request is generated, and the time when the i+1-th photographing request is generated, comprises: In a case where the interval between the moment when the (i+1)th photographing request is generated and the moment when the i-th photographing request is generated is less than the first preset time length, determining the second moment to be a moment that is separated from the first moment by the first preset time length; or When the interval between the moment of generating the (i+1)th photo request and the moment of generating the i-th photo request is greater than or equal to the first preset time length and less than the second preset time length, the second moment is determined as the moment of generating the (i+1)th photo request.

12. The method according to claim 10, wherein: The method further comprises: When the interval between the moment when the (i+1)th photographing request is generated and the moment when the (i)th photographing request is generated is less than the first preset time length, recording the (i+1)th photographing request after the moment when the (i+1)th photographing request is generated; The sending the (i+1)th photo taking request to the camera system at the second moment includes: When it is determined at the second moment that the (i+1)th photographing request is recorded, the (i+1)th photographing request is sent to the camera system.

13. The method according to claim 10, wherein: The method further comprises: If the first notification message sent by the camera system is not received at the third moment and there is an i+1th photo request, sending the i+1th photo request is prohibited; wherein the interval between the third moment and the first moment is the first preset time length.

14. The method according to claim 10, wherein: The method further comprises: When no user's photo input is received within the mth first preset time period, if a photo request is recorded before the mth first preset time period, the recorded photo request is cleared, where m is a positive integer greater than 1.

15. A photographing device, wherein: include: A first acquisition module, configured to acquire a first original RAW image based on an i-th photo taking request sent by the camera application at a first moment; A first sending module, configured to send a first notification message to the camera application after acquiring a first original RAW image based on an i-th photo request sent by the camera application at a first moment, wherein the first notification message is used to notify that the camera application is allowed to continue to send photo requests, and i is a positive integer greater than or equal to 1; A photographing module, configured to, upon receiving an i+1th photographing request sent by the camera application at a second moment, obtain a second original RAW image based on the i+1th photographing request, wherein the interval between the first moment and the second moment is greater than or equal to a first preset time length and less than a second preset time length, and the second preset time length is twice the first preset time length.

16. A camera system, comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the photographing method according to any one of claims 1 to 9 are implemented.

17. A photographing device, comprising: A third sending module, configured to send an i-th photo taking request to the camera system at a first moment, where i is a positive integer greater than or equal to 1; A first processing module, configured to, upon receiving a first notification message sent by the camera system and in the case that there is an (i+1)th photographing request, determine a second time according to a time when the (i)th photographing request is generated and a time when the (i+1)th photographing request is generated; a fourth sending module, configured to send the (i+1)th photo taking request to the camera system at the second moment; The first notification message is used to notify the camera application to continue sending a photo request; The interval between the first moment and the second moment is greater than or equal to a first preset time length and less than a second preset time length, and the second preset time length is twice the first preset time length.

18. The device according to claim 17, wherein: The first processing module comprises: a first processing unit, configured to determine, when the interval between the moment when the (i+1)th photographing request is generated and the moment when the i-th photographing request is generated is less than the first preset time length, that the second moment is a moment that is separated from the first moment by the first preset time length; or The second processing unit is used to determine that the second moment is the moment of generating the (i+1)th photo request when the interval between the moment of generating the (i+1)th photo request and the moment of generating the i-th photo request is greater than or equal to the first preset time length and less than the second preset time length.

19. A camera application, wherein the camera application executes the steps of the photographing method according to any one of claims 10 to 14.

20. A readable storage medium storing a program or instruction, wherein the program or instruction, when executed by a processor, implements the steps of the photographing method according to any one of claims 1 to 9, or implements the steps of the photographing method according to any one of claims 10 to 14.

21. An electronic device, comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the photographing method as described in any one of claims 1 to 9 are implemented, or the steps of the photographing method as described in any one of claims 10 to 14 are implemented.

22. An electronic device, comprising: the electronic device being configured to execute the steps of the photographing method according to any one of claims 1 to 9, or to implement the steps of the photographing method according to any one of claims 10 to 14.

23. A chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the photographing method as described in any one of claims 1 to 9, or to implement the steps of the photographing method as described in any one of claims 10 to 14.

24. A computer program product, wherein the computer program product is stored in a non-volatile storage medium, and wherein the computer program product is executed by at least one processor to implement the steps of the photographing method according to any one of claims 1 to 9, or to implement the steps of the photographing method according to any one of claims 10 to 14.

Citation Information

Patent Citations

  • Mobile terminal and camera shooting method

    CN106453834A

  • Continuous shooting method and electronic equipment

    CN110719409A

  • Image processing method and device and storage medium

    CN111526288A

  • Photographing method and device and electronic equipment

    CN112770059A

  • Photographing method and device and electronic equipment

    CN117596478A