Picture sharing method, terminal and storage medium

By introducing a lightweight image processing path into the camera app, incomplete image frames can be processed quickly and displayed in third-party applications, solving the display problem when users share photos immediately after shooting and improving the user experience.

CN119271322BActive Publication Date: 2025-12-19HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410318430.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-19
Publication Date
2025-12-19
Estimated Expiration
2044-03-19

AI Technical Summary

Technical Problem

When a user takes a photo using the camera app and immediately accesses the sharing function of a third-party app, the third-party app cannot display the newly taken photo because the photo has not yet been generated and stored, thus affecting the user experience.

Method used

By introducing a lightweight image processing path into the camera application, incomplete image frames can be processed quickly and displayed in the sharing interface of third-party applications. The appropriate image processing path can be selected based on the status information to ensure processing speed and effect.

Benefits of technology

It enables the quick display of photos taken by the camera app within third-party applications, improving the user experience of sharing photos while balancing processing speed and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271322B_ABST
    Figure CN119271322B_ABST
Patent Text Reader

Abstract

The application provides a picture sharing method, a terminal and a storage medium. In the method, after an image frame is captured by pressing a shooting shutter, a sharing scene of a third-party application is entered, and an image frame that has not started to be processed is processed by using a second image processing path with high processing speed, so that after a sharing interface of the third-party application is loaded, pictures and / or videos captured by a camera application in a system gallery can be displayed quickly and as many as possible, and thus the use experience of a user using a sharing function of the third-party application is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a picture sharing method, a terminal and a storage medium. BACKGROUND

[0002] With the development of terminal device technology, the application programs supported by terminal devices are also increasing. These application programs include application programs provided by terminal manufacturers (hereinafter referred to as system applications) and application programs provided by third-party platforms (hereinafter referred to as third-party applications).

[0003] At present, a user can take a photo by using a camera application, which is a system application, and then share the photo taken by the camera application with others by using a third-party application with a sharing function. However, because image processing takes a certain amount of time, if the user presses a shutter button immediately after taking a photo by using the camera application, the third-party application cannot display the photo taken by the camera application in a sharing interface of the third-party application because the photo has not been generated and stored in a storage medium of the mobile device. SUMMARY

[0004] Embodiments of the present application provide a picture sharing method, a terminal and a storage medium, which are aimed at enabling a third-party application to quickly identify a photo taken by a system camera application, so as to facilitate a user to share the photo taken by the camera application by using the third-party application.

[0005] In a first aspect, embodiments of the present application provide a picture sharing method applied to a mobile terminal. The mobile terminal includes a camera and is installed with a system camera application and a third-party application with a sharing function. The picture sharing method includes: at a first time, in response to an operation of a shutter button of the system camera application, obtaining an image frame by taking a photo by using the camera; at a second time, in a case where it is perceived that a sharing scenario is entered by using the third-party application, loading a sharing interface of the third-party application and performing image processing on the image frame that has not been processed by a first image processing path by using a second image processing path, the processing speed of the second image processing path being faster than that of the first image processing path, but the effect of a picture obtained by using the second image processing path being worse than that of a picture obtained by using the first image processing path; wherein, before the loading of the sharing interface is completed, the second image processing completes the image processing on the image frame that has not been processed by the first image processing path and stores the obtained picture in a preset storage area; displaying the loaded sharing interface; wherein, the loaded sharing interface includes the picture currently stored in the preset storage area; and wherein, the second time is later than the first time.

[0006] The system camera application can also be referred to as a system application or directly described as a camera application.

[0007] The third-party application can be referred to as a third-party application for short, and is specifically an application program provided for a third-party platform.

[0008] The first time point is, for example Figure 5 The T0 time point is shown.

[0009] The second time point is, for example Figure 5 The T1 time point is shown.

[0010] The image frame obtained by shooting is, for example, the image frame 1, the image frame 2, the image frame 3, and the like in the following embodiments.

[0011] The preset storage area is a storage area corresponding to a system gallery in a user data partition.

[0012] The sharing interface is, for example, an interface displayed after clicking the album 20b-2, such as the interface 30a or the interface 40a. In this aspect, the sharing interface loaded is an interface including a picture corresponding to the image frame shot, such as the interface 40a.

[0013] Therefore, after the image frame is shot by pressing the shooting shutter, the sharing scenario of the third-party application is entered immediately, the image frame that has not started to be processed is processed by using the second image processing path with high processing speed, so that after the sharing interface of the third-party application is loaded, the pictures and / or videos shot by the camera application in the system gallery can be displayed quickly and as many as possible, and the use experience of the user using the sharing function of the third-party application is ensured.

[0014] According to the first aspect, at the second time point, in the case of perceiving that the third-party application is used to enter the sharing scenario, the sharing interface of the third-party application is loaded, and the image frame that has not started to be processed by the first image processing path is processed by using the second image processing path, including: at the second time point, in the case of perceiving that the third-party application is used to enter the sharing scenario, obtaining current state information; in the case of the state information indicating that the second image processing path is currently used, the sharing interface of the third-party application is loaded, and the image frame that has not started to be processed by the first image processing path is processed by using the second image processing path.

[0015] The state information can be any one or more of temperature information, memory information, and user behavior.

[0016] Specifically, in the case of perceiving that the third-party application is used to enter the sharing scenario, that is, in the case of known user behavior, the state information is, for example, temperature information for describing the heating condition of the device and memory information for reflecting the currently available running memory of the device.

[0017] In the case that the state information includes temperature information and memory information, it can be determined whether the current temperature is not greater than (less than or equal to) a preset temperature threshold value and whether the available running memory is not less than (greater than or equal to) a preset memory threshold value.

[0018] Correspondingly, in the case that it is determined that the temperature is not greater than (less than or equal to) the preset temperature threshold value and the running memory is not less than (greater than or equal to) the preset memory threshold value, it is determined that the current situation satisfies the condition of using the second image processing path. On the contrary, in the case that the temperature is greater than the preset temperature threshold value and / or the available running memory is less than the preset memory threshold value, it is determined that the current situation does not satisfy the condition of using the second image processing path.

[0019] Therefore, in the case that the condition of using the second image processing path is satisfied, the second image processing path is used to perform image processing on the image frame that has not been processed by the first image processing path, so that the processing speed of the image frame can be ensured, the picture effect obtained by processing can be taken into account, and the user experience can be ensured.

[0020] According to the first aspect or any one of the implementation forms of the first aspect, the method further includes: loading a sharing interface of the third-party application and using a third image processing path to perform image processing on the image frame that has not been processed by the first image processing path, in the case that the state information indicates that the current situation does not satisfy the condition of using the second image processing path; wherein the processing speed of the third image processing path is faster than the processing speed of the second image processing path, but the picture effect obtained by using the third image processing path is worse than the picture effect obtained by using the second image processing path.

[0021] Therefore, in the case that the condition of using the second image processing path is not satisfied, the third image processing path is used to perform image processing on the image frame that has not been processed by the first image processing path, the picture effect is abandoned, and the processing speed is prioritized, so that the sharing interface can display as many pictures as possible for the user to share.

[0022] According to the first aspect or any one of the implementation forms of the first aspect, before it is perceived that the sharing scenario is entered using the third-party application, the method further includes: using the first image processing path to process the image frame and storing the obtained picture in a preset storage area.

[0023] In this way, in the case that the user does not enter the sharing scenario of the third-party application after the image frame is obtained by using the system camera application, the first image processing path with good processing effect but relatively time-consuming is used by default to perform image processing on the image frame, so that the picture stored in the preset storage area has good clarity and effect, and the user can share the picture with better effect subsequently.

[0024] According to the first aspect, or any one of the implementations of the first aspect, after the image frame is processed using the first image processing path and the obtained picture is stored in the preset storage area, the method further includes: at a third time, loading a sharing interface of the third-party application in a case that it is sensed that the third-party application is entered into the sharing scenario and the obtained image frame is completely processed; displaying the loaded sharing interface; wherein the loaded sharing interface includes the picture currently stored in the preset storage area; and the third time is later than the second time.

[0025] The third time is, for example, Figure 5 The T2 time is.

[0026] In this way, after the image frame is obtained by using the system camera application, the user does not enter the sharing scenario of the third-party application at the second time, but enters the sharing scenario of the third-party application at the third time, and the picture processed by using the first image processing path and having better effect is already stored in the preset storage area. The picture currently stored in the preset storage area is directly read, so that the picture having better effect can be displayed on the sharing interface for the user to select.

[0027] According to the first aspect, or any one of the implementations of the first aspect, after the loaded sharing interface is displayed, the method further includes: in response to an operation of closing the sharing interface or sending the picture selected in the sharing interface, exiting the sharing interface; and in a case that the current state information indicates that the first image processing path is used, processing the image frame processed by using the second image processing path or the third image processing path using the first image processing path, and replacing the picture of the corresponding image frame stored in the preset storage area with the picture obtained by processing the image frame using the first image processing path.

[0028] In this way, in a case that the sharing scenario of the third-party application is exited and the current state information of the device (such as temperature information, memory information and user behavior) indicates that the first image processing path is currently used, the image frame processed by using the second image processing path or the third image processing path is processed using the first image processing path to obtain a picture having better effect, and the obtained picture is used to replace the picture of the corresponding image frame in the preset storage area, so that the picture stored in the preset storage area finally has better effect and better definition, and the user can select the picture having better effect for sharing in the future.

[0029] According to the first aspect, or any one of the implementations of the first aspect, after the image frame is obtained, the method further includes: caching the image frame to a preset cache area; and reading the image frame from the preset cache area for image processing when the image frame is processed.

[0030] Thus, by buffering the image frames obtained by shooting, when the user clicks the shutter and immediately presses the power button, the user does not need to wait for all the unprocessed image frames to be processed before powering off and shutting down, or discard the unprocessed image frames (which will result in the loss of the pictures corresponding to the unprocessed image frames after rebooting), and after rebooting, the unprocessed image frames can be continuously read from the buffer area for processing.

[0031] According to the first aspect, or any one of the implementations of the first aspect, after the image frames are buffered to the preset buffer area, the method further includes: powering off in response to a first operation on the power button; powering on in response to a second operation on the power button; after powering on, detecting whether there are unprocessed image frames in the preset buffer area; in the case where there are unprocessed image frames in the preset buffer area, determining an image processing path according to the current state information, the image processing path being a first image processing path, a second image processing path, or a third image processing path; wherein the processing speed of the third image processing path is faster than the processing speed of the second image processing path, but the effect of the pictures obtained by using the third image processing path is poorer than the effect of the pictures obtained by using the second image processing path; reading the unprocessed image frames from the preset buffer area, processing the unprocessed image frames using the determined image processing path, and storing the obtained pictures to the preset storage area.

[0032] In the case where there are unprocessed image frames in the preset buffer area, the operation of detecting whether there are unprocessed image frames in the preset buffer area after powering on can be implemented by a scheduling module that is initialized and started when powering on.

[0033] For specific implementation details of this aspect, please refer to the description of the following embodiments, which will not be described here.

[0034] Thus, it can be ensured that the image frames obtained by shooting can be processed, and the pictures are not lost.

[0035] According to the first aspect, or any one of the implementations of the first aspect, the state information includes any one or more of temperature information, memory information, and user behavior.

[0036] According to the first aspect, or any one of the implementations of the first aspect, the sensing that the third-party application enters the sharing scenario includes: sensing that the third-party application initiates an access request to the preset storage area.

[0037] In a case where the preset storage area is a storage area corresponding to the system gallery, the access request to the preset storage area initiated by the third-party application is perceived, for example, an interface of the system gallery is called by the third-party application, and the content resolver is used to request the permission of accessing the preset storage area (the storage area corresponding to the system gallery) from the multimedia database, so as to realize the access to the preset storage area, and then the request of reading the picture available for sharing by the user from the preset storage area.

[0038] In a second aspect, an embodiment of the present application provides a mobile terminal. The mobile terminal comprises a memory and a processor, the memory and the processor are coupled; the memory stores program instructions, and the program instructions are executed by the processor to enable the mobile terminal to execute the instructions of the method in the first aspect or any possible implementation manner of the first aspect.

[0039] In a third aspect, an embodiment of the present application provides a computer readable medium for storing a computer program, the computer program comprising instructions for executing the method in the first aspect or any possible implementation manner of the first aspect.

[0040] In a fourth aspect, an embodiment of the present application provides a computer program, the computer program comprising instructions for executing the method in the first aspect or any possible implementation manner of the first aspect.

[0041] In a fifth aspect, an embodiment of the present application provides a chip, the chip comprising a processing circuit and a transceiver pin. The transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the first aspect or any possible implementation manner of the first aspect to control the receiving pin to receive a signal and control the sending pin to send a signal. BRIEF DESCRIPTION OF DRAWINGS

[0042] Figure 1 A user interface schematic diagram involved in a photographing process using a camera application is exemplarily shown;

[0043] Figure 2 A user interface schematic diagram involved in a process of entering a third-party application is exemplarily shown;

[0044] Figure 3 A user interface schematic diagram involved in a process of using a sharing function provided by a third-party application is exemplarily shown;

[0045] Figure 4 A user interface schematic diagram involved in a process of using a sharing function provided by a third-party application is exemplarily shown based on the picture sharing method provided by an embodiment of the present application;

[0046] Figure 5A corresponding schematic diagram of each link and time node in a process of taking a photo by using a camera application to sharing the photo by using a third-party application is shown as an example;

[0047] Figure 6 An effect schematic diagram of a picture sharing method provided by an embodiment of the present application is shown as an example, and the picture shared out by using a third-party application at T1 and T2 is shown as an example;

[0048] Figure 7 A hardware structure schematic diagram of a mobile terminal is shown as an example;

[0049] Figure 8 A software structure schematic diagram of a mobile terminal is shown as an example;

[0050] Figure 9 An interaction schematic diagram of functional modules involved in a picture sharing method provided by an embodiment of the present application is shown as an example;

[0051] Figure 10 A flow schematic diagram of a picture sharing method provided by an embodiment of the present application is shown as an example. DETAILED DESCRIPTION

[0052] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0053] The term "and / or" in the present document is only used to describe the association relationship of the associated objects, and means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone.

[0054] The terms "first" and "second" and the like in the specification and claims of the embodiments of the present application are used to distinguish different objects, and are not used to describe the specific order of the objects. For example, the first target object and the second target object are used to distinguish different target objects, and are not used to describe the specific order of the target objects.

[0055] In the embodiments of the present application, the words "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or having more advantages than other embodiments or design solutions. Rather, the words "exemplary" or "for example" are used in the specific manner to present the relevant concept.

[0056] In the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified. For example, a plurality of processing units refers to two or more processing units; a plurality of systems refers to two or more systems.

[0057] Picture sharing is one of the scenarios frequently used by end users (hereinafter referred to as users). For example, a user can use a camera application provided by a mobile terminal system to take a photo or a video, and then share the photo or the video taken by the camera application with others through a third-party application with sharing function, such as an instant messaging application.

[0058] In order to facilitate the description of the process of sharing the content taken by the camera application using the third-party application, the following will be described by taking the sharing of the photo taken by the camera application as an example in combination with the accompanying drawings.

[0059] Referring to Figure 1 (1), a mobile phone interface 10a is exemplarily shown. Exemplarily, the interface 10a displays icons of a plurality of applications, such as an icon 10a-1 of a camera application, an icon 10a-2 of a third-party application with sharing function, such as APP1, and icons of applications such as address book, phone, message, clock, calendar, gallery, memo, file management, email, music, calculator, video, voice recorder, weather, browser, and settings.

[0060] It should be noted that in some possible implementations, Figure 1 The interface 10a shown in (1) can be referred to as a main interface. When the user clicks the icon 10a-1 in the interface 10a, the camera application can be used to implement the shooting function, such as taking a photo, taking a video, and the like.

[0061] Continuing to refer to Figure 1 (1), exemplarily, when the user clicks the icon 10a-1 of the camera application, the mobile phone responds to the user operation, identifies that the icon corresponding to the user click operation is the icon of the camera application, and then calls the corresponding interface in the application framework layer to start the camera application, and starts the camera driver through the kernel layer, and collects the image stream (at this time, the preview stream) through the camera. At this time, the mobile phone displays the interface of the camera application, such as the interface 10b shown in (2), and the interface 10b displays the screen corresponding to the preview stream, such as the screen of the user playing basketball shown in (2). Figure 1 Figure 1

[0062] With the improvement of the shooting function of the mobile phone, the camera application supports more and more shooting modes. Exemplarily, the shooting modes can include aperture mode, night scene mode, portrait mode, shooting mode, video mode, smiley mode, professional mode, and the like, which can be seen in​​Figure 1 The mode options are shown in the shooting mode list 10b-2 in (2).

[0063] For example, when a user taps the icon option corresponding to a certain shooting mode, the phone displays the camera application interface for that shooting mode. For instance, if the user taps the photo mode icon option, the phone displays the camera application interface when using photo mode, which can be referenced... Figure 1 Interface 10b is shown in (2).

[0064] It should be noted that in some possible implementations, after the phone launches the camera application, the camera application defaults to the shooting mode, which is the default shooting mode of the camera application. In shooting mode, the shutter control 10b-1 will also be displayed on interface 10b. For example, when the user taps the shutter control 10b-1, such as tapping it three times consecutively, the phone will detect the user action on the shutter control 10b-1 and respond to the action by taking a picture (taking three pictures, resulting in images P1, P2, and P3 respectively). At this time, the thumbnail corresponding to the control 10b-3 displayed on interface 10b for opening the system's built-in gallery will be updated to the thumbnail of the user playing basketball (the thumbnail of the image captured by the last tap of the shutter control 10b-1), such as... Figure 1 Control 10b-3' in interface 10b' shown in (3).

[0065] It should be noted that 10b-3' at this point corresponds to the unprocessed thumbnail. The gallery may not yet have generated an image processed according to the image processing algorithm corresponding to the current shooting mode, such as a JPEG image. Therefore, if the gallery has not yet generated an image processed according to the image processing algorithm corresponding to the current shooting mode, the user should immediately exit the camera application, such as returning to the previous screen. Figure 2 The interface 10a shown in (1) is accessed. When the user clicks the icon 10a-2, the phone responds to the user's operation and launches APP1, which then displays the following: Figure 2 Interface 20a is shown in (2).

[0066] See Figure 2 In section (2), for example, interface 20a can display the user's message box 20a-1, such as Zhang San's message box 20a-1. For example, when the user clicks message box 201-1, the phone responds to the user's operation and jumps to the chat interface with Zhang San, such as... Figure 3 Interface 20b is shown in (1).

[0067] See Figure 3In the interface 20b of the embodiment (1), the chat record bar can display historical and / or current chat records, and the chat information input bar can include various information input controls, such as a voice input control, a text input box, an expression input control, and a control 20b-1 for viewing other functions. The control 20b-1 can be used to trigger a more function display interface after being clicked by the user.

[0068] In a possible application scenario, the user clicks the control 20b-1 of the interface 20b of the embodiment (1), and the mobile phone displays the interface 20b' of the embodiment (2) in response to the user operation. Figure 3 Figure 3 In the interface 20b' of the embodiment (2), the more function display interface includes a photo album 20b-2, a photo shooting function, a video call function, a location function, a red envelope function, a transfer function, a voice input function, and a my favorite function.

[0069] In the interface 20b' of the embodiment (2), the more function display interface includes a photo album 20b-2, a photo shooting function, a video call function, a location function, a red envelope function, a transfer function, a voice input function, and a my favorite function. Figure 3 In the interface 20b' of the embodiment (2), the more function display interface includes a photo album 20b-2, a photo shooting function, a video call function, a location function, a red envelope function, a transfer function, a voice input function, and a my favorite function. Figure 3 In the interface 20b' of the embodiment (2), the more function display interface includes a photo album 20b-2, a photo shooting function, a video call function, a location function, a red envelope function, a transfer function, a voice input function, and a my favorite function.

[0070] In the interface 20b' of the embodiment (2), the more function display interface includes a photo album 20b-2, a photo shooting function, a video call function, a location function, a red envelope function, a transfer function, a voice input function, and a my favorite function. Figure 3 In the interface 20b' of the embodiment (2), the more function display interface includes a photo album 20b-2, a photo shooting function, a video call function, a location function, a red envelope function, a transfer function, a voice input function, and a my favorite function.

[0071] In the interface 20b' of the embodiment (2), the more function display interface includes a photo album 20b-2, a photo shooting function, a video call function, a location function, a red envelope function, a transfer function, a voice input function, and a my favorite function. Figure 3 In the interface 20b' of the embodiment (2), the more function display interface includes a photo album 20b-2, a photo shooting function, a video call function, a location function, a red envelope function, a transfer function, a voice input function, and a my favorite function.

[0072] However, because image processing takes a certain amount of time, in some possible implementation manners, if the user presses the shutter button immediately after using the camera application to shoot a photo, the photo is not yet generated and stored in the storage medium of the mobile device, and thus the photo just shot by the camera application cannot be displayed in the sharing interface of the third-party application, and cannot be shared. For example, in the embodiment (2), the three photos of the user playing basketball are not yet processed by the image processing algorithm of the corresponding shooting mode (for example, in the portrait shooting mode, the photos need to be processed by the image processing algorithm such as noise reduction processing, dual-camera blur processing, skin beautification processing, and face sharpness processing, to obtain the corresponding JPEG format photos), and thus the photos cannot be displayed in the interface 20b' of the embodiment (2) before the corresponding JPEG format photos are obtained. Figure 1 Figure 3 ​​In the album 20b-2 shown in the middle (2), when entering the interface corresponding to the sharing function, the sharing interface may not display the pictures P1, P2 and P3 of the user playing basketball, i.e., the sharing interface is as shown in the middle (3). Figure 3 The interface 30a shown in the middle (3).

[0073] From the above introduction of the scenario of sharing the pictures taken by the camera application using the sharing function of the third-party application, it can be known that if the sharing function of the third-party application is used immediately after pressing the shooting shutter of the camera application, the pictures taken by the camera application may not be displayed in the sharing interface corresponding to the third-party application in this scenario, or only a small amount (only one completed image can be displayed) of the pictures are displayed, which causes the user to be unable to select the desired pictures for sharing, and affects the user experience.

[0074] Therefore, in another possible implementation, the embodiment of the present application provides a picture sharing method for solving the problem in the above scenario, so that the third-party application can quickly and as much as possible identify the pictures taken by the system self-provided camera application, thereby facilitating the user to use the third-party application to share the pictures taken by the camera application.

[0075] Still taking the pictures taken by the camera application as an example, Figure 1 Taking the pictures P1, P2 and P3 of the user playing basketball shown in the middle (2) as an example, based on the picture sharing method provided by the embodiment of the present application, after the user presses the shooting shutter control 10b-1 shown in the middle (2) for three times in succession, the camera application is immediately exited, and the chat interface with Zhang San is entered through the user interfaces shown in the middle (1) and (2), i.e., the interface 20b shown in the middle (1), and after the control 20b-1 is clicked, the more function display interface of the interface 20b' is called out, and after the album 20b-2 is clicked, the pictures P2 and P3 of the user playing basketball taken just now can be displayed in the sharing interface to which the jump is made, i.e., the sharing interface is as shown in the middle (3). Figure 1 The pictures P2 and P3 of the user playing basketball taken just now can be displayed in the sharing interface to which the jump is made, i.e., the sharing interface is as shown in the middle (3). Figure 2 The pictures P2 and P3 of the user playing basketball taken just now can be displayed in the sharing interface to which the jump is made, i.e., the sharing interface is as shown in the middle (3). Figure 4 The pictures P2 and P3 of the user playing basketball taken just now can be displayed in the sharing interface to which the jump is made, i.e., the sharing interface is as shown in the middle (3). Figure 4 The pictures P2 and P3 of the user playing basketball taken just now can be displayed in the sharing interface to which the jump is made, i.e., the sharing interface is as shown in the middle (3).

[0076] To explain the beneficial effect in detail, the comparison with the related art is described below.

[0077] Referring to Figure 5, exemplary, in the related technical solutions, when the user presses the camera application shutter at T0 moment, if the third party application is clicked to enter the sharing interface at T1 moment, because the all pictures or part of pictures have not completed the corresponding picture processing process, the sharing interface may not display all pictures or part of pictures taken by the camera application at T0 moment, in the above scenario, the sharing interface can be as shown in interface 30a of (3) Figure 3 , no picture P1, picture P2 and picture P3 taken at T0 moment are displayed.

[0078] Continuing to refer to Figure 5 , exemplary, at T2 moment (the moment when all image processing processes of all pictures are completed), if the user clicks the third party application to enter the sharing interface, because all pictures taken have completed all image processing processes and obtained corresponding JPEG format pictures, the sharing interface will display all pictures taken by the camera application at T0 moment.

[0079] Continuing to refer to Figure 5 , exemplary, in the technical solutions of the embodiments of the present application, when the user presses the camera application shutter at T0 moment, if the third party application is clicked to enter the sharing interface at T1 moment, although all pictures or part of pictures have not completed the corresponding picture processing process, based on the picture sharing scheme provided by the embodiments of the present application, the lightweight image processing algorithm can be used to process the pictures (image frames) taken at T0 moment without image processing, so as to quickly obtain the JPEG format pictures which can be displayed in the sharing interface of the third party application, in the above scenario, the sharing interface can be as shown in interface 40a of (3) Figure 4 , which displays picture P2 and picture P3 taken at T0 moment (picture P1 taken at T0 moment has been processed using the image processing algorithm of the related technical solutions, and is not processed using the lightweight image processing algorithm, so when picture P2 and picture P3 are obtained, picture P1 may not be processed yet).

[0080] For convenience of distinction, the embodiments of the present application will use the image processing algorithm corresponding to the shooting mode at T0 moment when the shutter is pressed (the image processing algorithm corresponding to the first image processing path) to obtain the JPEG format picture at T2 moment as the first picture, and use the lightweight image processing algorithm (the image processing algorithm corresponding to the second image processing path) to obtain the JPEG format picture at T1 moment as the second picture.

[0081] It should be noted that the lightweight image processing algorithm mentioned in the embodiments of the present application is compared with the image algorithm corresponding to the first image processing path. In specific implementation, it can be set according to business needs. Taking the shooting mode as a portrait mode as an example, in an exemplary possible implementation, the first image processing path may, for example, include four image processing links of noise reduction processing, dual-camera blur, skin beautification processing, and face sharpness processing, and the image processing algorithms selected by the four image processing links have higher complexity (better processing effect). In a scenario where the business requirement is more sensitive to latency, i.e., a scenario that needs to meet low latency (opening a sharing interface of a third-party application can quickly and as much as possible display pictures and / or videos taken by a camera application in a system gallery), the lightweight image processing algorithm, i.e., the image processing algorithm corresponding to the second image processing path, may, for example, only include part of the above-mentioned four image processing links, and only include noise reduction processing and face sharpness. In a scenario where the business requirement requires consideration of both latency and sharpness, the lightweight image processing algorithm may, for example, include the above-mentioned four image processing links, but the complexity of the image processing algorithm used by each image processing link is lower than that of the image processing algorithm corresponding to the first image processing path.

[0082] It should be understood that the above description is only an example for better understanding the technical solutions of the embodiments and is not the only limitation of the embodiments.

[0083] Still taking the picture of the user playing basketball as an example, in an exemplary possible implementation, based on the technical solutions provided in the embodiments of the present application, the second picture available for sharing can be displayed at T1 using the image processing algorithm corresponding to the second image processing path, but the second picture shared out (such as Figure 6 The sharpness and overall effect of the picture 20c-1 displayed in the interface 20c (1) may not be as good as that of the first picture (such as Figure 6 The sharpness and overall effect of the picture 20c-1' displayed in the interface 20c' (2).

[0084] In order to better understand the technical solutions provided in the embodiments of the present application, the hardware structure and software structure of the mobile terminal will be introduced below. Figure 7 and Figure 8 The hardware structure and software structure of the mobile terminal will be introduced below.

[0085] It should be noted that the mobile terminal to which the embodiments of the present application are applicable is mainly a terminal with a camera and installed with a third-party application with a sharing function, such as a mobile phone, a tablet computer, and a smart wearable device. For ease of illustration, Figure 7 A mobile phone will be taken as an example for illustration.

[0086] Referring to Figure 7 The mobile phone 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0087] The audio module 170 can include a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, etc.; the sensor module 180 can include a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc., which are not listed one by one here, and the present application does not make any limitation.

[0088] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc., which are not listed one by one here, and the present application does not make any limitation.

[0089] Regarding the above-mentioned controller as a processing unit, it can be the nerve center and command center of the mobile phone 100. In actual application, the controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of instruction fetching and instruction execution.

[0090] Regarding the above-mentioned application processor, it can be used to output sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or to display images or videos through the display screen 194.

[0091] As to the above-mentioned digital signal processor, it can be used to process digital signals. Specifically, the digital signal processor can process not only digital image signals but also other digital signals.

[0092] As to the above-mentioned ISP, it can be used to output digital image signals to the DSP processing. Specifically, the ISP is used to process the data fed back by the camera 193. In the embodiment of the present application, when the user takes a picture, the user presses the shutter, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing, and converts it into an image (or image frame) visible to the naked eye. In this way, the image processing module in the camera hardware abstraction layer can process the image frame through the corresponding image processing channel, such as noise reduction processing, dual-camera blur, skin beautification processing, face sharpness processing, etc., and then obtain a picture that can be stored in the corresponding storage area of the system gallery.

[0093] As to the above-mentioned DSP, it can be used to convert digital image signals into standard RGB, YUV, etc. format image signals.

[0094] In addition, it should be further pointed out that, as to the processor 110 including the above-mentioned processing units, in some implementation manners, the different processing units can be independent devices. That is, each processing unit can be regarded as a processor. In other implementation manners, the different processing units can also be integrated in one or more processors.

[0095] It should be understood that the above description is only an example for better understanding the technical solutions of the embodiments and is not the only limitation of the embodiments.

[0096] In addition, the processor 110 can further include one or more interfaces. Among them, the interface can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, and the like, which will not be listed one by one here, and the present application does not make any limitation thereto.

[0097] In addition, the processor 110 can also be provided with a memory for storing instructions and data. In some implementations, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. Avoid repeated access and reduce the waiting time of the processor 110, thereby improving the efficiency of the system.

[0098] Among them, the external memory interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external storage card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in the external storage card.

[0099] The internal memory 121 can be configured to store computer executable program codes including instructions. The processor 110 can execute various functional applications and data processing of the mobile phone 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as the prime number shooting function and the sharing function in the embodiments of the present application), and the like. The data storage area can store data created during the use of the mobile phone 100 (such as pictures taken by the camera application in the embodiments of the present application), and the like. In addition, the internal memory 121 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), and the like.

[0100] The wireless communication function of the mobile phone 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.

[0101] It should be noted that the antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the mobile phone 100 can be configured to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other implementations, the antennas can be used in combination with a tuning switch.

[0102] The mobile communication module 150 can provide a solution including 2G / 3G / 4G / 5G wireless communication applied to the mobile phone 100. In some implementations, at least part of the functional modules of the mobile communication module 150 can be arranged in the processor 110. In some implementations, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be arranged in the same device.

[0103] The wireless communication module 160 can provide wireless communication solutions applied on the mobile phone 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The wireless communication module 160 can be one or more devices integrated with at least one communication processing module.

[0104] Specifically, the third-party application on the mobile phone, such as APP1, can establish a connection with a target server through the mobile communication module 150 and / or the wireless communication module 160, thereby establishing a communication connection with others, such as Zhang San's mobile phone, through the target server, and further sharing the picture to Zhang San's mobile phone.

[0105] The camera 193 is configured to capture still images or videos. The mobile phone 100 can realize the photographing function through an ISP, the camera 193, a video codec, a GPU, a display screen 194, and an application processor, etc. Specifically, an object generates an optical image through a lens and projects the optical image to a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some implementations, the mobile phone 100 can include one or N cameras 193, where N is a positive integer greater than 1.

[0106] The display screen 194 is configured to display images, videos, and the like. The display screen 194 includes a display panel. In some implementations, the mobile phone 100 can include one or N display screens 194, where N is a positive integer greater than 1. The mobile phone 100 can implement the display function through a GPU, the display screen 194, and an application processor, and the like. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is configured to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs, which execute program instructions to generate or change display information.

[0107] The hardware structure of the mobile phone 100 is described above. It should be understood that, Figure 7 The mobile phone 100 shown in the figure is only an example. In actual implementation, the mobile phone 100 can have more or fewer components than those shown in the figure, can combine two or more components, or can have a different component configuration. Figure 7 The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0108] In order to better understand Figure 7 The software structure of the mobile phone 100 is described below. Before describing the software structure of the mobile phone 100, the architecture that can be used by the software system of the mobile phone 100 is first described.

[0109] Specifically, in actual application, the software system of the mobile phone 100 can use a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.

[0110] In addition, it can be understood that the software system used by the current mainstream electronic device includes but is not limited to the Windows system, the Android system, and the iOS system. For ease of description, the software structure of the mobile phone 100 is exemplarily described by taking the Android system with a layered architecture as an example.

[0111] In addition, the picture sharing scheme provided by the embodiments of the present application is applicable to other systems in actual implementation.

[0112] Referring to Figure 8 , the software structure block diagram of the mobile phone 100 of the embodiments of the present application is shown.

[0113] As Figure 8As shown, the layered architecture of the mobile phone 100 divides software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through software interfaces. In some implementations, the Android system is divided into five layers, from top to bottom, the application layer (APK layer), the application framework layer (framework layer, FWK layer), the Android runtime and system library, the hardware abstraction layer (hardware abstraction layer, HAL), and the kernel layer.

[0114] The application layer can include a series of application packages. As shown, Figure 8 The application package can include system applications such as camera, settings, Bluetooth, gallery, etc., and third-party applications provided by a third-party application platform, which are not listed one by one here, and the present application does not limit this.

[0115] Specifically, in the embodiments of the present application, the camera application (system camera) and the gallery application (system gallery) are system applications, and the third-party application is an application program with a sharing function.

[0116] The application framework layer provides application programming interfaces (application programming interfaces, APIs) and programming frameworks for the applications of the application layer. In some implementations, these programming interfaces and programming frameworks can be described as functions. As shown, Figure 8 The application framework layer can include functions such as CameraService, ContentResolver, MediaProvider, scheduling module, system awareness module, etc., which are not listed one by one here, and the present application does not limit this.

[0117] The CameraService is used to implement camera-related operations, such as forwarding a shooting request requested by the camera application to a camera provider (CameraProvider) in the camera hardware abstraction layer (CameraHAL).

[0118] The ContentResolver is used to provide content access permissions for applications, such as providing third-party applications with access permissions to pictures in the multimedia database.

[0119] The multimedia database is used to be responsible for the access and management of multimedia files, and can manage the metadata of pictures. Understandably, the media files mentioned here can include pictures, videos, music, etc.

[0120] The system sensing module is configured to sense current memory information, temperature information, user behavior, etc. of the device, and to inform the scheduling module of the sensed information, so that the scheduling module determines whether to schedule a first image processing path in the image processing module of the CameraHAL to perform image processing or to schedule a second image processing path in the image processing module of the CameraHAL to perform image processing.

[0121] It should be noted that the system sensing module can be initialized to run in the background when the device is started, so as to sense the state information (memory information, temperature information, etc.) and user behavior of the device throughout the process.

[0122] The scheduling module is configured to determine whether to schedule a first image processing path in the image processing module of the CameraHAL to perform image processing or to schedule a second image processing path in the image processing module of the CameraHAL to perform image processing, based on current memory information (available running memory), temperature information (heating condition), user behavior (whether entering a sharing scenario of a third-party application), time consumption of a processing algorithm corresponding to the picture, and processing effect, etc.

[0123] It should be noted that in some possible implementations, the scheduling module can be initialized to start when the system sensing module senses that the current enters a sharing scenario of a third-party application. In this way, different image processing paths can be determined based on the scheduling module, the picture sharing method provided in the embodiments of the present application can be implemented, and the occupation of device resources and the power consumption of the device can be reduced.

[0124] The Android Runtime includes a core library and a virtual machine. The Android Runtime is responsible for scheduling and management of the Android system.

[0125] The core library includes two parts: one part is a function function that the java language needs to call, and the other part is the core library of Android.

[0126] The application program layer and the application program framework layer run in the virtual machine. The virtual machine executes the java files of the application program layer and the application program framework layer into binary files. The virtual machine is used to perform functions such as management of the object life cycle, stack management, thread management, security and exception management, and garbage collection.

[0127] The system library can include a plurality of functional modules. For example: a surface manager (surface manager), a media library (Media Libraries), a three-dimensional (3D) graphics processing library (for example: OpenGL ES), a two-dimensional (2D) graphics engine (for example: SGL), etc.

[0128] The surface manager is used to manage the display subsystem and provides 2D and 3D layer fusion for multiple applications.

[0129] The media library supports multiple commonly used audio, video format playback and recording, and static image files, etc. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0130] The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, synthesis, and layer processing, etc.

[0131] It can be understood that the 2D graphics engine described above is a drawing engine for 2D drawing.

[0132] The HAL is an interface layer between the operating system kernel and the hardware circuit. The HAL includes, but is not limited to: a camera hardware abstraction layer (Camera HAL), a display driver hardware abstraction layer, etc. Among them, the CameraProvider in the Camera HAL is used to drive the camera to take a picture according to a shooting request, and obtain an image frame; the image processing module in the Camera HAL is used to process the image frame according to the image processing path determined by the scheduling module to obtain a picture that can be shared. The display driver hardware abstraction layer is used to display different user interfaces, such as a sharing interface, etc.

[0133] In addition, it can be understood that the kernel layer in the Android system is a layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, a sensor driver, a power management driver, etc.

[0134] The software structure of the mobile phone 100 is introduced here, and it can be understood that, Figure 8 The layers in the illustrated software structure and the components included in each layer do not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 can include more or fewer layers than illustrated, and each layer can include more or fewer components, which are not limited by the present application.

[0135] Based on the above software structure, referring to Figure 9For example, in the picture sharing scheme provided in the embodiments of the present application, when the camera application of the APK layer requests to take a picture, the camera hardware abstraction layer can be notified of the camera service, and then the CameraProvider in the camera hardware abstraction layer is driven to control the camera to take a picture according to the request, and an image frame is obtained. After the image processing frame is obtained, the CameraProvider notifies the scheduling module, so that the scheduling module determines a suitable image processing path, such as the first image processing path or the second image processing path, according to the information (current state information of the device, user behavior, etc.) perceived by the system perception module.

[0136] Continuing to refer to Figure 9 For example, after the scheduling module determines a suitable image processing path, the image processing module can be notified to use the determined image processing path, such as the first image processing path or the second image processing path, to perform image processing on the captured image frame, so as to obtain a picture.

[0137] Continuing to refer to Figure 9 For example, the storage information of the finally obtained picture can be returned to the scheduling module, and the scheduling module can inform the multimedia database to perform management.

[0138] Continuing to refer to Figure 9 For example, when a third-party application enters a sharing scenario and loads pictures and / or videos in the system gallery, the third-party application (hereinafter referred to as: third-party application) can obtain the permission to access the multimedia database through the content parser, and then read the picture and / or video information managed by the multimedia database, so as to display in the sharing interface of the third-party application.

[0139] It should be noted that in some possible implementations, the image frame obtained by the CameraProvider driving the camera driver to control the camera to take a picture can be directly sent to the image processing module for image processing, or can be first cached in the user data partition of the internal storage, and then the scheduling module is notified of the specific caching information of the image frame, so that the scheduling module determines a suitable image processing path and instructs the image processing module to read the image frame from the caching area and perform image processing using the determined image processing path.

[0140] In addition, it should be noted that, compared with directly sending the image frame to the image processing module for processing, the caching manner can be used to immediately press the power button after the user clicks the shutter, without waiting for all the unprocessed image frames to be processed before power off and shutdown, or discarding the unprocessed image frames (which will cause the loss of pictures corresponding to the unprocessed image frames after restarting), and the unprocessed image frames can be continuously read from the caching area for processing after restarting.

[0141] In addition, it also needs to be explained that in order to solve the above-mentioned problems, after rebooting, the scheduling module can initialize the start at the start of the device, and continue to read the unprocessed image frames from the cache area for processing. In this way, after the device starts, the scheduling module can detect whether there are unprocessed image frames, and then determine whether to schedule the first image processing path in the image processing module of the CameraHAL to process the image frames in the cache area or to schedule the second image processing path in the image processing module of the CameraHAL to process the image frames in the cache area according to the current temperature information of the device, the memory information, the user behavior, the processing algorithm time consumption of the picture corresponding, and the processing effect and other decision factors.

[0142] It should be understood that the above description is only an example for better understanding the technical solutions of the embodiments and is not the only limitation of the embodiments.

[0143] In order to better understand the picture sharing method provided by the embodiments of the present application, the following embodiments take the image frames obtained by shooting as an example, which are cached first and then processed, and the mobile device is a mobile phone (as shown in the hardware structure of the mobile phone) Figure 7 , as shown in the software structure of the mobile phone) as an example, and the interaction of each functional module in the picture sharing scene is described in detail. Figure 8 Figure 10 Figure 9

[0144] S101, in the case that the user clicks the shooting shutter provided by the system camera, the system camera sends a shooting request to the camera service.

[0145] Among them, the shooting shutter provided by the system camera, for example Figure 1 The shooting shutter control 10b-1 in the interface 10b shown in (2) of the system camera.

[0146] Among them, in response to the clicking operation of the shooting shutter, the APK layer system camera can call the interface provided by the FWK layer facing the camera service, and then send the shooting request to the camera service.

[0147] It can be understood that since the system camera provides multiple shooting modes, different shooting modes may correspond to different image processing links. In order to facilitate subsequent processing of the image frames according to the image processing path suitable for the current shooting mode, so as to obtain the picture suitable for the current shooting mode, the shooting request can carry parameter information identifying the current shooting mode.

[0148] ​​​S102, the camera service forwards the shooting request sent by the system camera to a camera provider (CameraProvider) in the camera hardware abstraction layer.

[0149] S103, the CameraProvider controls the camera to take a photo through the camera driver after receiving the shooting request, and obtains a photographed image frame.

[0150] For ease of illustration, the embodiments of the present application still take the user continuously clicking the shutter three times as an example. Illustratively, in some possible implementation manners, steps S101 to S103 can be repeated three times. Illustratively, in another possible implementation manner, since the three clicks on the shutter are continuously performed in a short time, the shooting request can be sent only once, and the shooting number can be identified by using the agreed parameter in the shooting request.

[0151] It should be understood that the above description is only an example for better understanding the technical solutions of the embodiments and is not the only limitation of the embodiments.

[0152] Illustratively, in the case of the user continuously clicking the shutter three times, the image frames obtained by the camera shooting can include image frame 1 (obtained by the first click on the shutter), image frame 2 (obtained by the second click on the shutter), and image frame 3 (obtained by the third click on the shutter).

[0153] S104, the CameraProvider caches the obtained image frame to a preset cache area in the user data partition.

[0154] Illustratively, in the case of triggering a shooting request by continuously clicking the shutter three times, the image frames cached by the CameraProvider can include image frame 1, image frame 2, and image frame 3 obtained in sequence.

[0155] Illustratively, in the case of obtaining image frame 1, image frame 2, and image frame 3 according to three shooting requests, the CameraProvider can cache the obtained image frame after obtaining each image frame.

[0156] For ease of illustration, the embodiments of the present application take the scenario of triggering a shooting request by continuously clicking the shutter three times as an example.

[0157] S105, after caching the image frame obtained by shooting to the cache area, the CameraProvider notifies the scheduling module to process the cached image frame.

[0158] Exemplarily, the CameraProvider obtains the specific cache address (path) and the number of caches after caching the photographed image frame to the cache area. Therefore, when the CameraProvider informs the scheduling module to process the cached image frame, the CameraProvider can send the number, address and other information of the cached image frame to the scheduling module, so that the scheduling module knows which image frames need to be processed.

[0159] In S106, the scheduling module queries the current state, and determines to use the first image processing path to process the image according to the current state.

[0160] Exemplarily, the current state includes, for example, the temperature information, memory information, user behavior and the like of the device.

[0161] Understandably, by Figure 8 and Figure 9 As can be known from the description of the embodiments part for each functional module, the system perception module can be used to perceive the temperature information, memory information, user behavior and the like of the device. Therefore, the operation of the scheduling module querying the current state can be, for example, sending a request to acquire the current state information of the device to the system perception module, and the system perception module determines the current temperature information by acquiring the data of the corresponding device such as the temperature sensor according to the request sent by the scheduling module, determines the current memory information (available running memory) by acquiring the data of the running memory, and determines the user behavior by listening to the currently running application information, the click operation of the control and the called interface. Finally, the system perception module can send the acquired state information to the scheduling module for use.

[0162] In addition, it should also be understood that the operation of the scheduling module according to the current state is essentially to determine the image processing path suitable for the currently cached image frame, and not to fixedly determine the first image processing path. The above-mentioned step S106 is only the case existing in a specific scenario, i.e., the current state of the device is suitable for using the first image processing path to process the image.

[0163] In S107, the scheduling module informs the image processing module to use the first image processing path to process the image.

[0164] Specifically in actual application, the operation of the scheduling module in this step is to inform the image processing module to use the currently determined image processing path to process the image, i.e., not to fixedly use the first image processing path to process the image. The above-mentioned step S107 is only the case existing in a specific scenario, and is not a specific limitation on the embodiments of the present application.

[0165] In addition, it should be noted that, in the case that the scheduling module informs the image processing module to use the determined image processing channel, such as the first image processing channel, to perform layer processing, the image processing module can also be informed of the relevant information of the image frames to be processed, such as the number, address, etc.

[0166] S108, after receiving the notification sent by the scheduling module, the image processing module acquires the image frames to be processed from the cache area, and uses the first image processing channel to perform image processing on the acquired image frames.

[0167] For example, in some possible implementation manners, after receiving the notification sent by the scheduling module, the image processing module can acquire all the image frames, such as image frame 1, image frame 2 and image frame 3, from the cache area at one time. Then, the image processing module uses the image processing channel informed by the scheduling module, such as the first image processing channel, to sequentially perform image processing on the image frame 1, image frame 2 and image frame 3. For example, the image processing module first uses the first image processing channel to perform image processing on the image frame 1, and after obtaining the corresponding picture P1 after the image frame 1 is processed, the image processing module uses the first image processing channel to perform image processing on the image frame 2, and after obtaining the corresponding picture P2 after the image frame 1 is processed, the image processing module uses the first image processing channel to perform image processing on the image frame 3, and then obtains the corresponding picture P3 of the image frame 3.

[0168] S109, in the case that the system perception module perceives that the sharing scenario of the third-party application is entered, the scheduling module is informed that the sharing scenario of the third-party application is entered.

[0169] It should be noted that, when an application is started in the foreground, the system perception module can acquire the representation information of the application running in the foreground, such as the package name. In this way, whether the currently started application is a third-party application can be determined according to the package name.

[0170] For example, in some possible implementation manners, a white list of third-party applications with sharing functions can be pre-registered. In this way, after acquiring the application information of the currently running application, whether the application information is the application information of the application recorded in the white list is determined. If yes, it can be determined that the currently started application is a third-party application with sharing functions.

[0171] In addition, it should be understood that, when using the sharing function of the third-party application, the pictures and / or videos stored in the system gallery are usually shared. Therefore, the system perception module can further monitor whether the interface (access interface of the system gallery) of the system gallery is called by the third-party application with sharing functions. Accordingly, in the case that it is monitored that the interface of the system gallery is called by the currently started third-party application with sharing functions, it can be determined that the third-party application enters the sharing scenario, and the scheduling module is further informed.

[0172] S110, the scheduling module obtains the current state information of the device from the system perception module after receiving the message that the system perception module informs that the current sharing scenario of the third-party application is entered.

[0173] Understandably, since the system perception module has informed the scheduling module that the current sharing scenario of the third-party application is entered, that is, the user behavior is to operate the sharing function entrance of the third-party application. Therefore, the state information to be obtained in this link can include device temperature information (for determining the heating condition of the device) and memory information (available running memory).

[0174] Exemplarily, in some possible implementation manners, when informing the scheduling module that the current sharing scenario of the third-party application is entered, the system perception module can also directly send the current state information of the device to the scheduling module, thereby facilitating the scheduling module to quickly determine the appropriate image processing path, so that the image processing module can quickly complete the image processing of the unprocessed image frame according to the image processing path suitable for the current scenario.

[0175] S111, the scheduling module determines to use the second image processing path for image processing according to the device temperature information and the memory information.

[0176] Exemplarily, in some possible implementation manners, a preset temperature threshold (the maximum temperature value allowing the second image processing path or the first image processing path to be used) and a preset memory threshold (the minimum memory value allowing the second image processing path or the first image processing path to be used) can be set.

[0177] In the case that the current sharing scenario of the third-party application is entered, and the current temperature of the device is not greater than (less than or equal to) the preset temperature threshold, and the available running memory is not less than (greater than or equal to) the preset memory threshold, it is determined to use the second image processing path to process the unprocessed image frame. In the case that the current sharing scenario of the third-party application is entered, but the current temperature of the device is greater than the preset temperature threshold, and / or the available running memory is less than the preset memory threshold, it is determined to use the third image processing path to process the unprocessed image frame.

[0178] It should be noted that the third image processing path is an image processing path using an image processing algorithm that is more lightweight than the image processing algorithm used by the second image processing path. That is, in the case that the current temperature of the device has exceeded the preset temperature threshold (the heating may be serious) and / or the current available running memory of the device has been less than the preset memory threshold (the available running memory is insufficient), the third image processing path using an image processing algorithm with lower complexity, or even directly discarding part of the image processing link, is used to process the unprocessed image frame, so that the captured picture can be stored in the storage area corresponding to the system gallery.

[0179] In addition, it should be noted that, in the case that the system sensing module does not sense the current entering into the sharing scenario of the three-party application, but the current temperature of the device is greater than the preset temperature threshold, and / or the available running memory is less than the preset memory threshold, these decision factors for the decision image processing path can also be sent to the scheduling module, so that the scheduling module can adjust the image processing path in time in combination with the current state of the device, to ensure that the image frames can be processed into pictures and the device can be normally used.

[0180] S112, the scheduling module informs the image processing module to use the second image processing path for image processing.

[0181] Specifically, in actual application, the operation of the scheduling module in this step is to inform the image processing module to use the currently determined image processing path for image processing, that is, not to use the second image processing path for image processing. The above-mentioned step S112 is only the case existing in a specific scenario, and does not serve as a specific limitation on the embodiments of the present application.

[0182] S113, the image processing module uses the second image processing path to process the image frames which have not started to use the first image processing path for image processing.

[0183] That is to say, when the image processing module uses the second image processing path for image processing, for the image frames which have started to use the first image processing path for image processing but have not been processed, such as the image frame 1 processed at the beginning, the image processing module continues to use the first image processing path to process the image frame 1. For the image frames 2 and 3 which have not started to be processed, the second image processing path is used for image processing.

[0184] S114, the image processing module stores the processed pictures into the storage area corresponding to the system gallery in the user data partition.

[0185] It should be understood that the image processing method corresponding to the second image processing path is faster than the image processing method corresponding to the first image processing path, so in one possible implementation, after the image processing of the image frames 2 and 3 is completed using the second image processing path to obtain the pictures P2 and P3, the image processing module is still using the first image processing path to process the image frame 1. Therefore, the pictures stored in this link can be the pictures obtained by using the second image processing path for image processing, such as the pictures P2 and P3.

[0186] S115, the image processing module sends the storage paths of the pictures P2 and P3 to the scheduling module.

[0187] S116, the scheduling module sends the storage paths of the pictures P2 and P3 to the multimedia database.

[0188] S117, the multimedia database establishes a mapping relationship between the pictures P2 and P3 and the corresponding storage paths.

[0189] In this way, the mapping relationship between the pictures and the storage paths can be obtained, so as to facilitate management, so that the multimedia database can read the pictures available for sharing from the storage area corresponding to the system gallery according to the mapping relationship between the pictures and the storage paths when the content parser accesses the pictures in the system gallery.

[0190] It can be understood that if the obtained video and audio, the mapping relationship between the video and the storage path and the mapping relationship between the audio and the storage path can also be constructed.

[0191] S118, the third-party application requests to load the pictures (video and audio) in the system gallery through the content parser.

[0192] S119, after receiving the request of the third-party application to load the pictures in the system gallery, the content parser requests the multimedia database to read the pictures in the system gallery.

[0193] S120, the multimedia database reads the pictures from the storage area of the system gallery according to the mapping relationship between the pictures and the storage paths managed by the multimedia database.

[0194] Referring to Figure 10 , for example, in a possible implementation, when the multimedia database reads the pictures from the storage area of the system gallery according to the mapping relationship between the pictures and the storage paths managed by the multimedia database, the picture P1 corresponding to the image frame 1 can not have been stored in the storage area corresponding to the system gallery. Therefore, the pictures read from the storage area corresponding to the system gallery do not include the picture P1. In the embodiment of the application, the pictures read are taken as the pictures P2 and P3.

[0195] That is, the third-party application can obtain the access permission of the multimedia database through the content parser, and then read the pictures and / or video information managed by the multimedia database, so as to display in the sharing interface of the third-party application.

[0196] S121, the image processing module stores the picture P1 obtained by using the first image processing path into the storage area corresponding to the system gallery in the user data partition.

[0197] It can be understood that since the picture P1 is stored into the storage area corresponding to the system gallery at a time later than the time when the multimedia database reads the pictures from the storage area corresponding to the system gallery in response to the request of the third-party application to load the pictures in the system gallery, the third-party application cannot load the picture P1.

[0198] S122, the third-party application displays the pictures (including picture 2 and picture 3, but not including picture 1) read from the storage area corresponding to the system gallery in the sharing interface.

[0199] For example, in the case that the user clicks the shutter for a plurality of times (e.g., 3 times) in succession and immediately enters the sharing scenario of the third-party application, because the image processing algorithm corresponding to the first image processing path is relatively complex and involves a plurality of image processing links, the second image processing path is used to process the image frame 2 and the image frame 3. Thus, when the sharing interface of the third-party application is switched to, the processing of the image frame 2 and the image frame 3 can be completed. That is, after the picture is captured by using the system camera, the sharing scenario of the third-party application is immediately entered, and as many pictures as possible captured by the system camera can be displayed in the sharing interface of the third-party application, such as the interface 40a shown in (3) of FIG. 40. Figure 4

[0200] Therefore, based on the picture sharing method provided in the embodiments of the present application, the pictures and / or videos captured by the camera application in the system gallery can be quickly and as many as possible displayed, and the use experience of the user in using the sharing function of the third-party application is ensured.

[0201] Compared with the related technical solution in which the image processing algorithm used is decided according to the brightness of the current shooting environment after the shutter is pressed, the picture sharing method provided in the embodiments of the present application further adjusts the image processing path according to the device state information perceived by the system perception module, and then uses the image processing algorithm suitable for the current device state and scene to process the unprocessed image frame, so that the image processing effect can be ensured and the actual use scenario of the user can be better taken into account, and the use experience of the user is greatly improved.

[0202] In addition, it should be further noted that, in order to further improve the use experience of the user, after the user exits the sharing scenario of the third-party application, the image frame (e.g., the image frame 2 and the image frame 3) processed by using the second image processing path or the third image processing path can be reprocessed by using the first image processing path according to the current state information (e.g., temperature information and memory information) of the device, and after the picture (subsequently referred to as picture P2') of the image frame 2 and the picture (subsequently referred to as picture P3') of the image frame 3 obtained by using the first image processing path are obtained, the picture P2' and the picture P3' are used to replace the picture P2 and the picture P3 stored in the storage area corresponding to the system gallery. In this way, when the user uses the third-party application to share pictures in the future, the picture P2' and the picture P3' with better image effects can be selected for sharing.

[0203] ​Moreover, it is understood that the mobile terminal, in order to achieve the above-mentioned functions, comprises hardware and / or software modules corresponding to the respective functions. The algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented in hardware or in a combination of hardware and computer software. Whether a certain function is implemented in hardware or computer software driving hardware depends on the specific application and design constraints. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments. Such implementation should not be considered beyond the scope of the present application.

[0204] In addition, it should be noted that the picture sharing method provided by the above-mentioned embodiments implemented by the mobile terminal in the actual application scenario can also be executed by a chip system included in the mobile terminal, wherein the chip system can include a processor. The chip system can be coupled with a memory, so that the chip system invokes the computer program stored in the memory when running, and implements the steps executed by the above-mentioned mobile terminal. The processor in the chip system can be an application processor or a processor other than an application processor.

[0205] In addition, the embodiments of the present application also provide a computer readable storage medium, which stores computer instructions, when the computer instructions run on the mobile terminal, the mobile terminal executes the above-mentioned related method steps to implement the picture sharing method in the above-mentioned embodiments.

[0206] In addition, the embodiments of the present application also provide a computer program product, when the computer program product runs on the mobile terminal, the mobile terminal executes the above-mentioned related steps to implement the picture sharing method in the above-mentioned embodiments.

[0207] In addition, the embodiments of the present application also provide a chip (which can also be a component or a module), which can include one or more processing circuits and one or more transceiver pins; wherein the transceiver pins and the processing circuits communicate with each other through internal connection paths, and the processing circuits execute the above-mentioned related method steps to implement the picture sharing method in the above-mentioned embodiments, to control the receiving pins to receive signals, and to control the sending pins to send signals.

[0208] In addition, as known from the above description, the mobile terminal, computer readable storage medium, computer program product or chip provided by the embodiments of the present application are all used to execute the corresponding methods provided above, and therefore, the beneficial effects that can be achieved thereby can refer to the beneficial effects in the corresponding methods provided above, which will not be described here again.

[0209] The above-described embodiments are only used to illustrate the technical solutions of the present application, but not limit the present application; although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for sharing images, characterized in that, Applied to a mobile terminal, the mobile terminal includes a camera and has a system camera application and a third-party application with sharing function installed; The image sharing methods include: At the first moment, in response to the shutter operation of the system's camera application, multiple image frames are captured by the camera. The first image processing path is used to process the multiple image frames, and the images corresponding to the processed image frames are stored in a preset storage area. At the second moment, upon sensing that the third-party application has entered a sharing scenario, the sharing interface of the third-party application is loaded, and the second image processing path is used to process the image frames that the first image processing path has not yet started processing. The processing speed of the second image processing path is faster than that of the first image processing path, but the quality of the resulting image is worse than that of the image obtained using the first image processing path. Specifically, before the sharing interface is fully loaded, the second image processing path completes the image processing of the image frames that the first image processing path has not yet started processing, and stores the image corresponding to the image frame that has completed image processing in the preset storage area. The sharing interface is displayed after loading is complete; wherein the sharing interface after loading is complete includes the currently stored images in the preset storage area; The second moment is later than the first moment.

2. The method according to claim 1, characterized in that, In the second moment, upon sensing that the third-party application has been used to enter a sharing scenario, the sharing interface of the third-party application is loaded, and image processing is performed on image frames that have not yet been processed by the first image processing path using the second image processing path, including: At the second moment, upon sensing that the third-party application has been used to enter a sharing scenario, the current state information is obtained; When the status information indicates that the use of the second image processing path is currently satisfied, the sharing interface of the third-party application is loaded, and the second image processing path is used to process the image frames that the first image processing path has not yet started processing.

3. The method according to claim 2, characterized in that, The method further includes: If the status information indicates that the use of the second image processing path is not currently feasible, the sharing interface of the third-party application is loaded, and the third image processing path is used to process the image frames that the first image processing path has not yet started processing. The third image processing path is faster than the second image processing path, but the resulting image quality is inferior to that obtained using the second image processing path.

4. The method according to claim 1, characterized in that, The method further includes processing the image frame using the first image processing path and storing the resulting image in the preset storage area: At the third moment, when it is sensed that the third-party application has been used to enter the sharing scenario and all the captured image frames have been processed, the sharing interface of the third-party application is loaded. The sharing interface is displayed after loading is complete; wherein the sharing interface after loading is complete includes the currently stored images in the preset storage area; The third time point is later than the second time point.

5. The method according to claim 4, characterized in that, After the sharing interface is displayed and loaded, the method further includes: In response to closing the sharing interface or sending the selected image in the sharing interface, exit the sharing interface; If the current status information indicates that the first image processing path is used, the first image processing path is used to process the image frame that has been processed by the second or third image processing path, and the image obtained by processing the image using the first image processing path replaces the image of the corresponding image frame stored in the preset storage area. The third image processing path is faster than the second image processing path, but the resulting image quality is inferior to that obtained using the second image processing path.

6. The method according to claim 5, characterized in that, After obtaining multiple image frames, the method further includes: Cache the multiple image frames into a preset cache area; Specifically, when the first image processing path performs image processing on the plurality of image frames, the plurality of image frames are read from the preset cache area for image processing.

7. The method according to claim 6, characterized in that, After caching the plurality of image frames into a preset cache area, the method further includes: The device shuts down in response to the first operation of the power button. In response to a second operation of the power button, the device is powered on; After powering on, check whether there are image frames in the preset buffer area; If an image frame exists in the preset buffer area, the image processing path to be used is determined according to the current state information. The image processing path to be used includes the first image processing path, the second image processing path, or the third image processing path. The image frame is read from the preset cache area, the image frame is processed using the determined image processing path, and the image corresponding to the processed image frame is stored in the preset storage area.

8. The method according to claim 2, or 5, or 7, characterized in that, The status information includes any one or more of the following: temperature information, memory information, and user behavior. The temperature information refers to the temperature information of the mobile terminal, which is used to determine the heat generation status of the mobile terminal. The user behavior refers to the behavior of the mobile terminal, which describes whether the mobile terminal is currently entering the sharing scenario of the third-party application.

9. The method according to any one of claims 1 to 7, characterized in that, The detection of entering a sharing scenario using the third-party application includes: The system detects that the third-party application has initiated an access request to the preset storage area.

10. A mobile terminal, characterized in that, The mobile terminal includes: a memory and a processor, the memory and the processor being coupled; the memory stores program instructions, which, when executed by the processor, cause the mobile terminal to perform the image sharing method as described in any one of claims 1 to 9.

11. A computer-readable storage medium, characterized in that, The method includes a computer program that, when run on a mobile terminal, causes the mobile terminal to perform the image sharing method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Shot image sharing method and device, mobile terminal and readable storage medium

    CN112839163A

  • Image processing method, electronic equipment and computer storage medium

    CN114640798A