Picture sharing method, terminal and storage medium

By using the fast image processing path to process and store image frames after the camera application is taken, the problem that the camera application is not displayed on the third-party application sharing interface is solved, and the rapid sharing and image effects are achieved.

CN119271322AActive Publication Date: 2025-01-07HONOR DEVICE CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

After taking photos with the camera application and entering the sharing function of the third-party application immediately, since the photos are not generated and stored in the storage medium of the mobile device, the photos that have just been taken cannot be displayed in the sharing interface of the third-party application, which affects the user's sharing Experience.

Method used

After the camera application captures an image frame, a fast image processing path (second image processing path) is used to perform image processing on image frames that have not yet started and stored in a preset storage area, so that a third-party application can be made by using a fast image processing path (second image processing path) to process the image frames that have not started processing and store them in a preset storage area. Ability to quickly identify and display photos taken by the camera application. This image processing path is used when the device satisfies specific state information (temperature and memory thresholds), ensuring fast processing speed but poor image effect; and using a third image processing path with fast processing speed but poor effect if it is not satisfied.

Benefits of technology

It realizes the rapid display of photos taken by the system camera application in the sharing interface of third-party applications, ensuring the user's sharing function experience, and ensuring better picture effect when the device state allows.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271322A_ABST
    Figure CN119271322A_ABST
Patent Text Reader

Abstract

The invention provides a picture sharing method, a terminal and a storage medium. According to the method, when a photographing shutter is pressed to shoot an image frame, a sharing scene of a three-party application is immediately entered, and image processing is performed on the image frame which is not processed by using a second image processing path with a high processing speed, so that after the sharing interface of the three-party application is loaded, the sharing interface of the three-party application is loaded. Pictures and / or videos shot by a camera application in a system picture library can be quickly displayed as much as possible, and then the user experience of using a sharing function of a three-party application is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the development of terminal equipment technology, more and more applications are supported by terminal equipment. These applications include applications provided by terminal manufacturers (hereinafter referred to as system applications) and applications provided by third-party platforms (hereinafter referred to as third-party applications).

[0003] Currently, users can take photos through the camera app, a system app, and then share the photos taken by the camera app with others through a third-party app with sharing function. However, since image processing takes a certain amount of time, if the user uses the sharing function provided by the third-party app immediately after pressing the shutter button when taking photos with the camera app, the photos taken by the camera app will not be displayed in the sharing interface of the third-party app, as the photos have not yet been generated and stored in the storage medium of the mobile device, and the photos cannot be shared. Summary of the invention

[0004] The embodiments of the present application provide a picture sharing method, terminal and storage medium, which are intended to enable a third-party application to quickly identify photos taken by the system's built-in camera application, thereby facilitating users to use third-party applications to share photos taken by the camera application.

[0005] In a first aspect, an embodiment of the present application provides a picture sharing method, which is applied to a mobile terminal. The mobile terminal includes a camera, and a system camera application and a third-party application with a sharing function are installed. The picture sharing method includes: at a first moment, in response to the operation of the camera shutter of the system camera application, the camera is used to shoot and obtain an image frame; at a second moment, when it is perceived that a third-party application is used to enter a sharing scene, the sharing interface of the third-party application is loaded, and 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, and the processing speed of the second image processing path is faster than the processing speed of the first image processing path, but the effect of the obtained picture is worse than the effect of the picture obtained by using the first image processing path; wherein, before the sharing interface is loaded, the second image processing completes the image processing of 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; wherein the second moment is later than the first moment.

[0006] Among them, the system camera application can also be called a system application, or directly described as a camera application.

[0007] Among them, third-party applications can be referred to as third-party applications, specifically applications provided for third-party platforms.

[0008] Among them, the first moment, for example Figure 5 The T0 time.

[0009] Among them, the second moment, for example Figure 5 The time T1 is shown.

[0010] The image frames obtained by shooting are, for example, image frame 1, image frame 2, image frame 3, etc. mentioned in the following embodiments.

[0011] Among them, the preset storage area is the storage area corresponding to the system gallery in the user data partition.

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

[0013] Therefore, when the camera shutter is pressed to capture an image frame, the sharing scenario of the third-party application is immediately entered. By using the second image processing path with a fast processing speed to process the image frame that has not yet been processed, after the sharing interface of the third-party application is loaded, the pictures and / or videos captured by the camera application in the system gallery can be displayed quickly and as much as possible, thereby ensuring the user experience of using the sharing function of the third-party application.

[0014] According to the first aspect, at the second moment, when it is perceived that a third-party application is used to enter a sharing scene, the sharing interface of the third-party application is loaded, and the second image processing pathway is used to perform image processing on image frames that have not yet been processed by the first image processing pathway, including: at the second moment, when it is perceived that a third-party application is used to enter a sharing scene, current status information is obtained; when the status information indicates that the conditions for using the second image processing pathway are currently met, the sharing interface of the third-party application is loaded, and the second image processing pathway is used to perform image processing on image frames that have not yet been processed by the first image processing pathway.

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

[0016] Specifically in this aspect, when the use of a third-party application to enter a sharing scenario has been sensed, that is, the user behavior is known, the status information is, for example, temperature information used to describe the heating condition of the device and memory information used to reflect the currently available running memory of the device.

[0017] When the status information includes temperature information and memory information, it can be determined by judging whether the current temperature is not greater than (less than or equal to) a preset temperature threshold and whether the available running memory is not less than (greater than or equal to) a preset memory threshold.

[0018] Accordingly, when it is determined that the temperature is not greater than (less than or equal to) the preset temperature threshold, and the running memory is not less than (greater than or equal to) the preset memory threshold, it is determined that the situation of using the second image processing path is currently satisfied. On the contrary, that is, when the temperature is greater than the preset temperature threshold and / or the available running memory is less than the preset memory threshold, it is determined that the situation of using the second image processing path is not currently satisfied.

[0019] Therefore, when the requirements for using the second image processing pathway are met, the second image processing pathway is used to process image frames that have not yet been processed by the first image processing pathway, thereby ensuring both the processing speed of the image frames and the image effect obtained by the processing, thereby ensuring the user experience.

[0020] According to the first aspect, or any implementation of the first aspect above, the method also includes: when the status information indicates that the second image processing path is not currently satisfied, loading a sharing interface of a third-party application, and using the third image processing path to perform image processing on image frames that the first image processing path has not yet started to process; 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 obtained image is worse than the effect of the image obtained using the second image processing path.

[0021] Therefore, when the second image processing path is not sufficient, the third image processing path is used to process the image frames that have not yet been processed by the first image processing path, abandoning the image effect and giving priority to the processing speed, so that the sharing interface can display as many pictures as possible that can be shared by users.

[0022] According to the first aspect, or any implementation of the first aspect above, before sensing the use of a third-party application to enter a sharing scene, the method also includes: using a first image processing path to process the image frame, and storing the obtained image in a preset storage area.

[0023] In this way, when the image frame is captured by the system camera application and the user does not enter the sharing scene of the third-party application, the first image processing path with good processing effect but relatively time-consuming is used by default to process the image frame, thereby ensuring that the picture finally stored in the preset storage area has better clarity and effect, and the user can share better pictures later.

[0024] According to the first aspect, or any implementation of the first aspect above, the image frame is processed using the first image processing path, and the obtained picture is stored in a preset storage area. The method also includes: at a third moment, when it is perceived that a third-party application is used to enter a sharing scene and all the image frames obtained by shooting are processed, the sharing interface of the third-party application is loaded; the loaded sharing interface is displayed; wherein the loaded sharing interface includes the picture currently stored in the preset storage area; wherein the third moment is later than the second moment.

[0025] Among them, the third moment, for example Figure 5 The T2 moment.

[0026] In this way, after the user uses the system camera application to capture the image frame, the user does not enter the sharing scene of the third-party application at the second moment, but has already stored the picture with better effect obtained by using the first image path processing in the preset storage area. If the user enters the sharing scene of the third-party application at the third moment, the currently stored picture is directly read from the preset storage area, so that the picture with better effect can be displayed on the sharing interface for the user to choose.

[0027] According to the first aspect, or any implementation of the first aspect above, after displaying the sharing interface that has been loaded, the method also includes: exiting the sharing interface in response to the operation of closing the sharing interface or sending the selected picture in the sharing interface; when the current status information indicates that the first image processing path is satisfied, using the first image processing path to perform image processing on the image frame that has been processed by the second image processing path or the third image processing path, and replacing the picture of the corresponding image frame stored in the preset storage area with the picture obtained by the image processing using the first image processing path.

[0028] Therefore, when exiting the sharing scenario of the third-party application and the current status information of the device (such as temperature information, memory information and user behavior) indicates that the conditions for using the first image processing pathway are currently met, the first image processing pathway is used to perform image processing on the image frames that have been processed by the second image processing pathway or the third image processing pathway to obtain a better picture, and the obtained picture replaces the picture of the corresponding image frame in the preset storage area, thereby ensuring that the picture finally stored in the preset storage area has better clarity and effect, and when the user subsequently shares the picture in the preset storage area, he can choose the better picture to share.

[0029] According to the first aspect, or any implementation of the first aspect above, after obtaining the image frame, the method also includes: caching the image frame to a preset cache area; wherein, when performing image processing on the image frame, the image frame is read from the preset cache area for image processing.

[0030] Therefore, by caching the image frames obtained by shooting, when the user presses the power button immediately after clicking to take a photo, there is no need to wait for all unprocessed image frames to be processed before powering off, or to discard the unprocessed image frames (which will cause the pictures corresponding to the unprocessed image frames to be lost after restarting the power). After restarting the power, the unprocessed image frames can be continued to be read from the cache area for processing.

[0031] According to the first aspect, or any implementation of the first aspect above, after caching the image frame into a preset cache area, the method also includes: in response to a first operation on a power button, shutting down the power; in response to a second operation on the power button, turning on the power; after turning on the power, detecting whether there are unprocessed image frames in the preset cache area; in the case where there are unprocessed images in the preset cache area, determining an image processing path based on current status information, the image processing path being a first image processing path, or a second image processing, or a third image processing path; wherein a processing speed of the third image processing path is faster than a processing speed of the second image processing path, but an effect of the obtained picture is worse than an effect of the picture obtained using the second image processing path; reading unprocessed image frames from the preset cache area, performing image processing on the unprocessed image frames using the determined image processing path, and storing the obtained pictures in a preset storage area.

[0032] After powering on, the operation of detecting whether there are any unprocessed image frames in the preset cache area can be implemented by initializing and starting a scheduling module when the computer is powered on.

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

[0034] In this way, 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 implementation of the first aspect above, the state information includes any one or more of temperature information, memory information, and user behavior.

[0036] According to the first aspect, or any implementation of the first aspect above, sensing that a third-party application is used to enter a sharing scenario includes: sensing that the third-party application has initiated an access request to a preset storage area.

[0037] Among them, in the case that the preset storage area is the storage area corresponding to the system gallery, it is perceived that a third-party application has initiated a request to access the preset storage area. For example, it is perceived that a third-party application has called the interface of the system gallery, and a request is made to the multimedia database through the content parser to access the preset storage area (the storage area corresponding to the system gallery), thereby realizing access to the preset storage area, and then reading the request for pictures that can be shared by users from the preset storage area.

[0038] In a second aspect, an embodiment of the present application provides a mobile terminal. The mobile terminal includes: a memory and a processor, the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the mobile terminal executes instructions of the method in the first aspect or any possible implementation 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, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.

[0040] In a fourth aspect, an embodiment of the present application provides a computer program, which includes instructions for executing the method in the first aspect or any possible implementation 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, wherein 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 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 THE DRAWINGS

[0042] Figure 1 A schematic diagram of a user interface involved in a process of shooting using a camera application is exemplified;

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

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

[0045] Figure 4 This is a schematic diagram of a user interface involved in a process of using a sharing function provided by a third-party application, which is exemplarily shown as a method for sharing pictures provided in an embodiment of the present application;

[0046] Figure 5This is a schematic diagram showing the correspondence between various links and time nodes in a process from taking a photo using a camera application to sharing the photo using a third-party application.

[0047] Figure 6 This is a schematic diagram showing the effect of sharing a picture using a third-party application at time T1 and time T2 based on a picture sharing method provided in an embodiment of the present application;

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

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

[0050] Fig. 9 The following is a schematic diagram showing the interaction of functional modules involved in a picture sharing method provided in an embodiment of the present application;

[0051] Fig.10 The figure is a flowchart showing an exemplary method for sharing pictures provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0053] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

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

[0055] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

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

[0057] Image sharing is one of the scenarios frequently used by terminal users (hereinafter referred to as users). For example, a user can use the camera application built into the mobile terminal system to take photos or videos, and then share the photos or videos 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 using a third-party application to share content taken by a camera application, the following description is made by taking the photos taken by the camera application as an example in conjunction with the accompanying drawings.

[0059] See also Figure 1 In (1), a mobile phone interface 10a is exemplarily shown. Exemplarily, the interface 10a displays icons of multiple applications, such as an icon 10a-1 of a camera application, an icon 10a-2 of a third-party application with a sharing function, such as APP1, and icons of applications such as address book, phone, information, clock, calendar, gallery, memo, file management, email, music, calculator, video, 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 the main interface. When the user clicks the icon 10a-1 in the interface 10a, the camera application can be used to implement shooting functions, such as taking photos, shooting (recording) videos, etc.

[0061] Continue to refer to Figure 1 In (1), for example, when the user clicks the icon 10a-1 of the camera application, the mobile phone responds to the user operation, identifies the icon corresponding to the user's click operation as 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 by calling the kernel layer, and collects the image stream (preview stream in this case) through the camera. At this time, the mobile phone displays the interface of the camera application, for example Figure 1 The interface 10b shown in (2) will display a screen corresponding to the preview stream in the interface 10b, such as Figure 1 (2) shows a screen of a user playing basketball.

[0062] As the shooting function of mobile phones improves, the camera application supports more and more shooting modes. For example, the shooting mode may include aperture mode, night scene mode, portrait mode, photo mode, video mode, smile mode, professional mode, etc. Figure 1 Mode options are displayed in the shooting mode list 10b-2 in (2).

[0063] For example, when the user clicks on an icon option corresponding to a shooting mode, the mobile phone displays the camera application interface in the corresponding shooting mode. For example, if the user clicks on the icon option of the photo mode, the mobile phone displays the interface of the camera application in the photo mode. Figure 1 Interface 10b shown in (2).

[0064] It should be noted that in some possible implementations, after the mobile phone starts the camera application, the camera application selects the photo mode by default, that is, the photo mode is the default shooting mode of the camera application. Among them, in the photo mode, the photo shutter control 10b-1 will also be displayed in the interface 10b. Exemplarily, when the user clicks the photo shutter control 10b-1, for example, clicking the photo shutter control 10b-1 three times in a row, the mobile phone will detect the user operation acting on the photo shutter control 10b-1, and then take a photo in response to the operation (shoot three times, and you will get pictures P1, P2 and P3 respectively). At this time, the thumbnail corresponding to the control 10b-3 displayed in the interface 10b for opening the system's built-in gallery will be updated to the thumbnail of the user playing basketball that has just been taken (the thumbnail of the picture taken by clicking the photo shutter control 10b-1 for the last time), such as Figure 1 Control 10b-3' in interface 10b' shown in (3).

[0065] It should be noted that at this time, 10b-3' corresponds to a thumbnail that has not been processed. The gallery may not have generated a picture processed by the image processing algorithm corresponding to the current shooting mode, such as a JPEG format picture. Therefore, if the gallery has not generated a picture processed by the image processing algorithm corresponding to the current shooting mode, the user immediately exits the camera application, such as returning to Figure 2 In the interface 10a shown in (1), and clicking the icon 10a-2, the mobile phone responds to the user operation, starts APP1 and then displays the following Figure 2 Interface 20a shown in (2).

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

[0067] See also Figure 3In (1), for example, the interface 20b may include a chat record bar and a chat information input bar, and the chat record bar may display historical and / or current chat records; the chat information input bar may include a variety of information input controls, such as a voice input control, a text input box, an emoticon input control, and a control 20b-1 for viewing other functions. Among them, the control 20b-1 is used to trigger a more function display interface after the user clicks it.

[0068] For example, in a possible application scenario, a user Figure 3 In (1), the control 20b-1 is clicked, and the mobile phone responds to the user operation and can display the following Figure 3 Interface 20b' shown in (2).

[0069] See also Figure 3 In (2), the function items on the above-mentioned more function display interface include album 20b-2, photo, video call, location, red envelope, transfer, voice input and my favorites. Exemplarily, when the user clicks album 20b-2, the mobile phone responds to the user operation and can jump from interface 20b' to the following interface: Figure 3 Interface 30a shown in (3).

[0070] See also Figure 3 In (3), illustratively, the interface 30a may include a picture and video display area and a send button. The pictures and videos displayed in the picture and video display area are pictures and videos stored in the gallery.

[0071] Continue to see Figure 3 In (3), for example, each picture and video corresponds to a check button. After the user selects the corresponding check button, he clicks the send button to complete the sharing of the picture and / or video.

[0072] However, since image processing takes a certain amount of time, in some possible implementations, when using the camera application to take a photo, if the user presses the shutter button and then immediately uses the sharing function provided by a third-party application, the photo taken by the camera application will not be displayed in the sharing interface of the third-party application, as the photo has not yet been generated and stored in the storage medium of the mobile device. Figure 1 The three pictures of the user playing basketball taken in (2) have not completed the image processing algorithm of the corresponding shooting mode (for example, in the portrait shooting mode, it is necessary to go through noise reduction processing, dual-camera blur, skin beautification processing, face clarity processing and other image processing algorithms to obtain the corresponding JPEG format pictures). Before obtaining the corresponding JPEG format pictures, if the user clicks Figure 3In the album 20b-2 shown in (2), when entering the interface corresponding to the sharing function, the sharing interface may include a picture of the user playing basketball, such as picture P1, while pictures P2 and P3 will not be displayed. That is, the sharing interface is as shown in FIG. Figure 3 Interface 30a shown in (3).

[0073] From the above introduction to the scenario of using a third-party application to share pictures taken by the camera application, it can be seen that if the sharing function of the third-party application is used immediately after pressing the camera application's shutter, the sharing interface corresponding to the third-party application in this scenario may not display the picture just taken by the camera application, or may display only a small number (only one picture that has completed image processing can be displayed), which results in the user being unable to select the desired picture to share, affecting the user experience.

[0074] In view of this, in another possible implementation, an embodiment of the present application provides a picture sharing method for solving the problem in the above-mentioned scenario, so that third-party applications can quickly and as much as possible identify photos taken by the system's built-in camera application, thereby facilitating users to use third-party applications to share photos taken by the camera application.

[0075] Still using the camera app to take pictures Figure 1 Taking the pictures P1, P2 and P3 of the user playing basketball as an example, based on the picture sharing method provided in the embodiment of the present application, when the user presses the Figure 1 After the camera shutter control 10b-1 shown in (2) is pressed, the camera application is immediately exited and the Figure 2 The user interface shown in (1) and (2) enters the chat interface with Zhang San, such as Figure 4 After clicking the control 20b-1 to call out the more function display interface of the interface 20b', click the album 20b-2 to jump to the sharing interface, which can display the pictures of the user playing basketball just taken, such as pictures P2 and P3, that is, the sharing interface is as shown in FIG. Figure 4 The interface 40a shown in (3) enables the user to share the picture P2 and / or picture P3 just taken by the camera application by selecting the check button of the picture P2 and / or picture P3 and then clicking the send control 40a-1.

[0076] To illustrate the beneficial effect in detail, the following is explained by comparing with the related art.

[0077] See also Figure 5For example, in the related technical solution, after the user presses the shutter button of the camera application at time T0, if the user clicks on the third-party application to enter the sharing interface at time T1, since all or part of the captured pictures have not yet completed the corresponding picture processing flow, all or part of the pictures captured by the camera application at time T0 may not appear in the sharing interface. Specifically for the above scenario, the sharing interface can be as follows: Figure 3 The interface 30a shown in (3) does not display the pictures P1, P2 and P3 taken continuously at time T0.

[0078] Continue to see Figure 5 For example, at time T2 (the moment when the entire image processing process is completed for all pictures), if the user clicks on a third-party application to enter the sharing interface, since all the pictures taken have completed the entire image processing process and obtained the corresponding JPEG format pictures, all the pictures taken by the camera application at time T0 will be displayed in the sharing interface.

[0079] Continue to see Figure 5 For example, in the technical solution of the embodiment of the present application, after the user presses the shutter button of the camera application at time T0, if the user clicks on the third-party application to enter the sharing interface at time T1, although all or part of the captured pictures have not yet completed the corresponding picture processing flow, based on the picture sharing solution provided by the embodiment of the present application, in this scenario, a lightweight image processing algorithm can be used to process the picture (image frame) taken at time T0 that has not been image processed, so as to quickly obtain a JPEG format picture that can be displayed in the sharing interface of the third-party application. Specifically in the above scenario, the sharing interface can be as follows: Figure 4 The interface 40a shown in (3) displays the pictures P2 and P3 taken continuously at time T0 (the picture P1 taken at time T0 has been processed using the image processing algorithm of the relevant technical solution, and is not reprocessed using the lightweight image processing algorithm. Therefore, when pictures P2 and P3 are obtained, picture P1 may not have been processed yet).

[0080] For ease of distinction, in the embodiment of the present application, the JPEG format picture obtained at time T2 using the image processing algorithm corresponding to the shooting mode when the shutter button is pressed at time T0 (the image processing algorithm corresponding to the first image processing path) is referred to as the first picture, and the JPEG format picture obtained at time T1 using the lightweight image processing algorithm (the image processing algorithm corresponding to the second image processing path) is referred to as the second picture.

[0081] It should be noted that the lightweight image processing algorithm described in the embodiment of the present application is compared with the image algorithm corresponding to the first image processing path. In the specific implementation, it can be set according to business needs. Taking the shooting mode as the portrait mode as an example, illustratively, in a possible implementation method, the first image processing path may include four image processing links: noise reduction processing, dual-camera blur, skin beautification processing, and face clarity processing, and the image processing algorithms selected for these four image processing links are more complex (better processing effect). In scenarios where business needs are more sensitive to latency, that is, scenarios where low latency needs to be met (opening the sharing interface of a third-party application can quickly and as much as possible display the pictures and / or videos taken by the camera application in the system gallery), the lightweight image processing algorithm, that is, the image processing algorithm corresponding to the second image processing path, for example, may only include some of the above four image processing links, and the class only includes the two links of noise reduction processing and face clarity. In scenarios where business needs require both latency and clarity, a lightweight image processing algorithm may, for example, include the above-mentioned four image processing links, but the complexity of the image processing algorithm used in each image processing link is lower than the complexity of the image processing algorithm corresponding to the first image processing path.

[0082] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

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

[0084] In order to better understand the technical solution provided by the embodiments of the present application, Figure 7 and Figure 8 This article introduces the hardware and software structures of mobile terminals.

[0085] It should be noted that the mobile terminals to which the embodiments of the present application are applicable are mainly mobile phones, tablet computers, smart wearable devices, etc. that have cameras and are installed with third-party applications with sharing functions. Figure 7 Let's take a mobile phone as an example.

[0086] See also Figure 7 The mobile phone 100 may 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 button 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] Among them, the audio module 170 may include a speaker 170A, a receiver 170B, a microphone 170C, an earphone jack 170D, etc.; the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air 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 impose any limitation on this.

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

[0089] The controller as the processing unit mentioned above may be the nerve center and command center of the mobile phone 100. In practical applications, the controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

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

[0091] The digital signal processor mentioned above 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] The ISP mentioned above can be used to output digital image signals to the DSP for processing. Specifically, the ISP is used to process data fed back by the camera 193. Specifically in the embodiment of the present application, when the user takes a photo, he presses the shutter button, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical 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 path, such as noise reduction, dual-camera blur, skin beautification, face clarity processing, etc., and then obtain a picture that can be stored in the storage area corresponding to the system gallery.

[0093] The DSP mentioned above can be used to convert digital image signals into image signals in standard RGB, YUV and other formats.

[0094] In addition, it should be noted that, regarding the processor 110 including the above-mentioned processing units, in some implementations, different processing units may be independent devices. That is, each processing unit may be regarded as a processor. In other implementations, different processing units may also be integrated into one or more processors.

[0095] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0096] In addition, the processor 110 may further include one or more interfaces. The interfaces may 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, etc., which are not listed here one by one, and the present application does not limit this.

[0097] In addition, the processor 110 may 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 may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

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

[0099] Among them, the internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes 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 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as the shooting function and sharing function of the prime number in the embodiment of the present application), etc. 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 embodiment of the present application), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0100] Among them, the wireless communication function of the mobile phone 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

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

[0102] Among them, the mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the mobile phone 100. In some implementations, at least some functional modules of the mobile communication module 150 can be set in the processor 110. In some implementations, at least some functional modules of the mobile communication module 150 can be set in the same device as at least some modules of the processor 110.

[0103] Among them, the wireless communication module 160 can provide wireless communication solutions 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 technology (NFC), infrared technology (IR), etc., which are applied to the mobile phone 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module.

[0104] Specifically in the technical solution provided in the embodiment of the present application, a third-party application on a mobile phone, such as APP1, can establish a connection with the 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 then sharing the picture to Zhang San’s mobile phone.

[0105] Among them, the camera 193 is used to capture static images or videos. The mobile phone 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor. Specifically, the object generates an optical image through the lens and projects it onto the 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 for conversion 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 other format. In some implementations, the mobile phone 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0106] Among them, the display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some implementations, the mobile phone 100 may include 1 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, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0107] This concludes the introduction to the hardware structure of the mobile phone 100. It should be understood that Figure 7 The illustrated mobile phone 100 is merely an example, and in a specific implementation, the mobile phone 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have a different component configuration. Figure 7 The various components shown in the drawings may 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] To better understand Figure 7 The software structure of the mobile phone 100 is shown, and 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 adopted by the software system of the mobile phone 100 is first described.

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

[0110] In addition, it is understandable that the software systems used by current mainstream electronic devices include but are not limited to Windows systems, Android systems, and iOS systems. For ease of explanation, the present application embodiment takes the layered Android system as an example to exemplify the software structure of the mobile phone 100.

[0111] In addition, the picture sharing solution provided in the subsequent embodiments of the present application is also applicable to other systems in specific implementations.

[0112] See also Figure 8 , which is a software structure block diagram of the mobile phone 100 according to an embodiment of the present application.

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

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

[0115] Specifically in the embodiment 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 with a sharing function.

[0116] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. In some implementations, these programming interfaces and programming frameworks can be described as functions. Figure 8 As shown, the application framework layer may include functions such as camera service (CameraService), content resolver (ContentResolver), multimedia database (MediaProvider), scheduling module, system perception module, etc., which are not listed one by one here and this application does not impose any restrictions on this.

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

[0118] Content parser, used to provide content access permissions to applications, such as providing third-party applications with access permissions to images in a multimedia database.

[0119] The multimedia database is responsible for accessing and managing multimedia files and can manage metadata of pictures. It can be understood that the media files mentioned here can include pictures, videos, music, etc.

[0120] The system perception module is used to perceive the current memory information, temperature information, user behavior, etc. of the device, and inform the scheduling module of the perceived information so that the scheduling module can determine whether to schedule the first image processing path in the image processing module in the CameraHAL for image processing, or to schedule the second image processing path in the image processing module in the CameraHAL for image processing.

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

[0122] The scheduling module is used to determine whether to schedule the first image processing path in the image processing module in the CameraHAL to perform image processing, or to schedule the second image processing path in the image processing module in the CameraHAL to perform image processing, based on the device's current memory information (available running memory), temperature information (heating), user behavior (whether to enter the sharing scenario of a third-party application), the time consumption of the processing algorithm corresponding to the image, and the processing effect and other determining factors.

[0123] It should be noted that in some possible implementations, the scheduling module can be initialized and started when the system perception module senses that the sharing scene of the third-party application is currently entered. In this way, different image processing paths can be decided based on the scheduling module to implement the picture sharing method provided in the embodiment of the present application, and the occupation of device resources and the power consumption of the device can be reduced.

[0124] Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system.

[0125] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

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

[0127] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

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

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

[0130] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

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

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

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

[0134] This concludes the introduction to the software structure of the mobile phone 100. It can be understood that: Figure 8 The layers in the software structure shown 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 may include more or fewer layers than shown, and each layer may include more or fewer components, which is not limited in the present application.

[0135] Based on the above software structure, see Fig. 9, for example, in the picture sharing solution provided in the embodiment of the present application, when the camera application in the APK layer requests to take a picture, the CameraProvider in the camera hardware abstraction layer can be notified through the camera service, so that the CameraProvider drives the camera driver to control the camera to take a picture according to the shooting request, and obtains an image frame. After obtaining the image processing frame, the CameraProvider will notify the scheduling module so that the scheduling module can determine the appropriate image processing path, such as the first image processing path or the second image processing path, according to the information perceived by the system perception module (current status information of the device, user behavior, etc.).

[0136] Continue to see Fig. 9 Exemplarily, after the scheduling module determines the image processing path that is suitable for the current image processing, it can notify the image processing module 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 to obtain a picture.

[0137] Continue to see Fig. 9 , exemplarily, the storage information of the final picture can be returned to the scheduling module, which informs the multimedia database for management.

[0138] Continue to see Fig. 9 For example, when a third-party application enters a sharing scenario and loads pictures and / or videos from the system gallery, the third-party application (hereinafter referred to as a third-party application) can obtain permission to access 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 them in the sharing interface of the third-party application.

[0139] It should be noted that in some possible implementations, the image frames obtained by the CameraProvider driver controlling the camera to take pictures can be directly handed over to the image processing module for image processing, or they can be cached in the user data partition in the internal memory first, and then the scheduling module is informed of the specific cache information of the image frames, so that the scheduling module can determine the appropriate image processing path, instruct the image processing module to read the image frames from the cache area, and use the determined image processing path for image processing.

[0140] In addition, it should be noted that compared to directly sending the image frames to the image processing module for processing, the method of caching the image frames first can eliminate the need to wait for all unprocessed image frames to be processed before powering off or discarding the unprocessed image frames (which will cause the images corresponding to the unprocessed image frames to be lost after restarting the power supply) when the user presses the power button immediately after clicking to take a photo. After restarting the power supply, the unprocessed image frames can be continued to be read from the cache area for processing.

[0141] In addition, it should be noted that in order to solve the problem of the above scenario, after restarting, the scheduling module can be initialized and started when the device starts to continue reading unprocessed image frames from the cache area for processing. In this way, after the device is started, the scheduling module can detect whether there are currently unprocessed image frames, and then when the unprocessed image frames are detected, according to the current temperature information, memory information, user behavior, time consumption of the processing algorithm corresponding to the image, and processing effect of the device, determine whether to schedule the first image processing path in the image processing module in the CameraHAL to perform image processing on the image frames in the cache area, or to schedule the second image processing path in the image processing module in the CameraHAL to perform image processing on the image frames in the cache area.

[0142] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0143] In order to better understand the picture sharing method provided in the embodiment of the present application, the following embodiment first caches the image frames obtained by shooting, and then performs image processing. The mobile device is a mobile phone ( Figure 7 The hardware structure shown is Figure 8 As an example, combined with Fig.10 right Fig. 9 The interaction of each functional module in the picture sharing scenario is described in detail.

[0144] S101: When a user clicks a photo shutter button provided by a system camera, the system camera sends a photo shooting request to a camera service.

[0145] Among them, the system camera provides a shutter, such as Figure 1 The photo shutter control 10b-1 in the interface 10b shown in (2).

[0146] In response to a click operation on the camera shutter, the system camera of the APK layer can call the interface for the camera service provided by the FWK layer, and then send the shooting request to the camera service.

[0147] Understandably, since the system camera provides multiple shooting modes, different shooting modes may correspond to different image processing links. In order to facilitate the subsequent processing of the captured image frames according to the image processing path suitable for the current shooting mode to obtain pictures 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 the camera provider (CameraProvider) in the camera hardware abstraction layer.

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

[0150] For ease of explanation, the embodiment of the present application still takes the case where the user clicks the shutter button three times in succession as an example. For example, in some possible implementations, steps S101 to S103 may be repeated three times. For example, in some other possible implementations, since the three clicks on the shutter button are performed continuously within a short period of time, only one shooting request may be sent, and the agreed parameters may be used in the shooting request to identify the number of shots.

[0151] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0152] Exemplarily, when the user clicks the shutter button three times in succession, the image frames captured by the camera may include image frame 1 (obtained by the first click of the shutter button), image frame 2 (obtained by the second click of the shutter button), and image frame 3 (obtained by the third click of the shutter button).

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

[0154] Exemplarily, when the camera shutter is clicked three times in succession to trigger a shooting request, the image frames cached by the CameraProvider may include image frame 1, image frame 2, and image frame 3 obtained successively.

[0155] Exemplarily, when image frame 1, image frame 2, and image frame 3 are obtained according to three shooting requests, CameraProvider may cache each image frame after obtaining the image frame.

[0156] For ease of explanation, the embodiment of the present application takes the scenario of clicking the shutter button three times in a row to trigger a shooting request as an example.

[0157] S105: After caching the captured image frames into the cache area, CameraProvider notifies the scheduling module to process the cached image frames.

[0158] For example, after caching the captured image frames into the cache area, CameraProvider will obtain the specific cache address (path) and the cache quantity. Therefore, when CameraProvider notifies the scheduling module to process the cached image frames, it can send information such as the cached image frame quantity and address to the scheduling module so that the scheduling module knows which image frames need to be processed.

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

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

[0161] Understandably, through Figure 8 and Fig. 9 From the description of each functional module in the embodiment, it can be known that the system perception module can be used to perceive the current temperature information, memory information, user behavior, etc. of the device. Therefore, the operation of the scheduling module to query the current state can be, for example, by sending a request to obtain the current state information of the device to the system perception module, and the system perception module determines the current temperature information by obtaining 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 obtaining the data of the running memory; and determines the user behavior by monitoring the currently running application information, the click operation on the control, the called interface, etc. Finally, the system perception module can send the obtained state information to the scheduling module for use.

[0162] In addition, it should be understood that the operation performed by the scheduling module according to the current state is essentially to determine the image processing path suitable for the currently cached image frame, rather than to determine the first image processing path in a fixed manner. The above step S106 is only a situation existing in a specific scenario, that is, the current state of the device is suitable for using the first image processing path for image processing.

[0163] S107: The scheduling module notifies the image processing module to use the first image processing path to perform image processing.

[0164] Specifically in practical applications, the operation performed by the scheduling module in this step is to notify the image processing module to use the currently determined image processing path for image processing, that is, it is not fixed to use the first image processing path for image processing. The above step S107 is only a situation existing in a specific scenario and is not a specific limitation of the embodiments of the present application.

[0165] In addition, it should be noted that when the scheduling module notifies the image processing module to use a certain image processing path, such as the first image processing path for layer processing, it can also inform the image processing module of relevant information of the image frames to be processed, such as quantity, address, etc.

[0166] S108, after receiving the notification sent by the scheduling module, the image processing module obtains the image frame to be processed from the cache area, and uses the first image processing path to perform image processing on the obtained image frame.

[0167] Exemplarily, in some possible implementations, after receiving the notification sent by the scheduling module, the image processing module can obtain all image frames from the cache area at one time, such as image frame 1, image frame 2, and image frame 3. Then, the image processing path notified by the scheduling module, such as the first image processing path, is used to sequentially process image frames 1, image frame 2, and image frame 3. For example, the first image processing path is used to perform image processing on image frame 1 first, and after image frame 1 is processed to obtain the corresponding picture P1, the first image processing path is used to perform image processing on image frame 2, and after image frame 1 is processed to obtain the corresponding picture P2, the first image processing path is used to perform image processing on image frame 3, thereby obtaining the picture P3 corresponding to image frame 3.

[0168] S109 , when the system perception module perceives that the current sharing scenario of the third-party application has been entered, the system perception module notifies the scheduling module that the current sharing scenario of the third-party application has been entered.

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

[0170] For example, in some possible implementations, a whitelist of third-party applications with sharing functions can be pre-registered. In this way, after obtaining the currently running application information, it is determined whether the application information is the application information of the application recorded in the whitelist. If so, it can be determined that the currently started third-party application has the sharing function.

[0171] In addition, it should be understood that when using the sharing function of a third-party application, what is usually shared are pictures and / or videos stored in the system gallery. Therefore, the system perception module can further monitor whether the third-party application with the sharing function has called the interface of the system gallery (the interface for accessing the system gallery). Accordingly, when it is monitored that the currently launched third-party application with the sharing function has called the interface of the system gallery, it can be determined that the third-party application has been monitored to enter the sharing scene, and then the scheduling module is notified.

[0172] S110, after receiving the message notified by the system perception module that the sharing scene of the third-party application is currently entered, the scheduling module obtains the current status information of the device from the system perception module.

[0173] Understandably, since the system perception module has informed the scheduling module that the sharing scene of the third-party application has been entered, that is, the user behavior is to operate the sharing function entrance of the third-party application. Therefore, the status information that needs to be obtained in this link may include device temperature information (used to determine the heating status of the device) and memory information (available running memory).

[0174] Exemplarily, in some possible implementations, when the system perception module notifies the scheduling module that it has entered a sharing scenario of a third-party application, the system perception module may also directly send the current status information of the device to the scheduling module, thereby facilitating the scheduling module to quickly determine a suitable image processing path, so that the image processing module can quickly complete image processing of unprocessed image frames according to an image processing path suitable for the current scenario.

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

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

[0177] Among them, when the current scenario is a sharing scenario of a third-party application, 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 perform image processing on the unprocessed image frames. When the current scenario is a sharing scenario of a third-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, it is determined to use the third image processing path to perform image processing on the unprocessed image frames.

[0178] It should be noted that the third image processing path is an image processing algorithm used, which is a more lightweight image processing path than the image processing algorithm used in the second image processing path. That is, when the current temperature of the device has exceeded the preset temperature threshold (maybe the temperature is too high), and / or the current available running memory of the device is less than the preset memory threshold (the available running memory is insufficient), the third image processing path with a lower complexity image processing algorithm or even directly abandoning some image processing links is used to process the unprocessed image frames, thereby ensuring that the captured pictures can be stored in the storage area corresponding to the system gallery.

[0179] In addition, it should be noted that when the system perception module does not perceive the current sharing scenario of the third-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 used to decide the image processing path can also be sent to the scheduling module, so that the scheduling module can adjust the image processing path in time according to the current status of the device, so as to ensure that the image frame can be processed into a picture and the device can be used normally.

[0180] S112, the scheduling module notifies the image processing module to use the second image processing path to perform image processing.

[0181] Specifically in practical applications, the operation performed by the scheduling module in this step is to notify the image processing module to use the currently determined image processing path for image processing, that is, it is not fixed to use the second image processing path for image processing. The above step S112 is only a situation existing in a specific scenario and is not a specific limitation of the embodiments of the present application.

[0182] S113, the image processing module uses the second image processing path to perform image processing on the image frames that have not yet been processed using the first image processing path.

[0183] That is, when the image processing module uses the second image processing pathway to perform image processing, for image frames that have already been processed using the first image processing pathway but have not yet been processed, such as the image frame 1 that is processed first, the image processing module continues to use the first image processing pathway to process image frame 1. For image frames 2 and 3 that have not yet been processed, the second image processing pathway is used to perform image processing.

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

[0185] It should be understood that the image processing method corresponding to the second image processing path has a faster processing speed than the image processing method corresponding to the first image processing path. Therefore, in a possible implementation, after the image processing of image frame 2 and image frame 3 is completed using the second image processing path to obtain pictures P2 and P3, the image processing module still uses the first image processing path to perform image processing on image frame 1. Therefore, the pictures stored in this link can be pictures obtained by image processing using the second image processing path, such as 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 pictures and storage paths can be obtained, which is convenient for management. When the subsequent content parser accesses pictures in the system gallery, the multimedia database can read pictures that can be shared by users from the storage area corresponding to the system gallery based on the mapping relationship between pictures and storage paths.

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

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

[0192] S119, after receiving the request for the picture in the parent system picture of the third-party application, the content parser requests the multimedia database for permission to read the pictures in the system picture library.

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

[0194] See also Fig.10 , exemplarily, in a possible implementation, when the multimedia database reads pictures from the storage area of ​​the system library according to the mapping relationship between the managed pictures and the storage paths, the storage area corresponding to the system library may not yet store the picture P1 corresponding to the image frame 1. Therefore, the pictures read from the storage area corresponding to the system library do not include the picture P1. Specifically in the embodiment of the present application, the pictures read are the pictures P2 and P3 as an example.

[0195] That is, the 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 it 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 picture library in the user data partition.

[0197] Understandably, since the time when picture P1 is stored in the storage area corresponding to the system gallery is later than the time when the multimedia database responds to the picture in the system gallery of the third-party application parent and reads the picture from the storage area corresponding to the system gallery, the third-party application cannot load picture P1.

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

[0199] For example, after the user clicks the shutter button for multiple times (e.g., 3 times) and immediately enters the sharing scene of the third-party application, the image processing algorithm corresponding to the first image processing path is relatively complex and involves more image processing links. Therefore, the second image processing path is used to process image frames 2 and 3, and the processing of image frames 2 and 3 may be completed when jumping to the sharing interface of the third-party application. That is, after taking a picture with the system camera and immediately entering the sharing scene of the third-party application, the sharing interface of the third-party application can display as many pictures just taken by the system camera as possible, such as Figure 4 The interface 40a shown in (3) can at least display the picture P2 and the picture P3.

[0200] Therefore, based on the picture sharing method provided in the embodiment of the present application, it is possible to quickly and as much as possible display the pictures and / or videos taken by the camera application in the system gallery, thereby ensuring the user experience of using the sharing function of the third-party application.

[0201] Compared with the related technical solutions, after pressing the shutter button, the image processing algorithm to be used is decided according to the brightness of the current shooting environment. The picture sharing method provided in the embodiment of the present application will also adjust the image processing path in time according to the device status information perceived by the system perception module, and then use the image processing algorithm suitable for the current device status and scene to process the unprocessed image frames. This not only ensures the image processing effect, but also better takes into account the user's actual usage scenarios, greatly improving the user experience.

[0202] In addition, it should be noted that in order to further enhance the user experience, after the user exits the sharing scene of the third-party application, according to the current status information of the device, such as temperature information and memory information, the first image processing path can also be used to reprocess the image frames that have been processed by the second image processing path or the third image processing path, such as image frame 2 and image frame 3, and after obtaining the image of image frame 2 (hereinafter referred to as image P2') and image frame 3 (hereinafter referred to as image P3') obtained by image processing using the first image processing path, use image P2' and image P3' to replace the image P2 and image P3 stored in the storage area corresponding to the system gallery. In this way, when the user subsequently uses the third-party application to share pictures, he can choose to share the pictures P2' and P3' with better image effects.

[0203] In addition, it is understandable that, in order to implement the above functions, the mobile terminal includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of this application.

[0204] In addition, it should be noted that the picture sharing method provided by the above 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 may include a processor. The chip system can be coupled to the memory so that the chip system calls the computer program stored in the memory when it is running to implement the steps executed by the above mobile terminal. The processor in the chip system can be an application processor or a processor other than an application processor.

[0205] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a mobile terminal, the mobile terminal executes the above-mentioned related method steps to implement the picture sharing method in the above-mentioned embodiment.

[0206] In addition, an embodiment of the present application further provides a computer program product. When the computer program product is run on a mobile terminal, the mobile terminal executes the above-mentioned related steps to implement the picture sharing method in the above-mentioned embodiment.

[0207] In addition, an embodiment of the present application also provides a chip (which may also be a component or module), which may include one or more processing circuits and one or more transceiver pins; wherein the transceiver pins and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the above-mentioned related method steps to implement the picture sharing method in the above-mentioned embodiment, so as to control the receiving pin to receive the signal, so as to control the sending pin to send the signal.

[0208] In addition, it can be seen from the above description that the mobile terminal, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0209] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A picture sharing method, characterized in that: Applied to a mobile terminal, the mobile terminal includes a camera, and has installed a system camera application and a third-party application with a sharing function; The picture sharing method comprises: At a first moment, in response to an operation of a shutter button applied to the system camera, the camera is used to capture an image frame; At the second moment, when it is sensed that the sharing scene is entered by using the third-party application, the sharing interface of the third-party application is loaded, and the second image processing path is used to perform image processing on the image frame that has not yet been processed by the first image processing path, the processing speed of the second image processing path is faster than the processing speed of the first image processing path, but the effect of the obtained picture is worse than the effect of the 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 of the image frame that has not yet been processed by the first image processing path, and stores the obtained picture in a preset storage area; Displaying the sharing interface after loading; wherein the sharing interface after loading includes the pictures currently stored in the preset storage area; The second moment is later than the first moment.

2. The method according to claim 1, characterized in that: At the second moment, when it is sensed that the third-party application is used to enter the sharing scene, the sharing interface of the third-party application is loaded, and 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, including: At the second moment, when it is sensed that the third-party application is used to enter the sharing scene, current state information is acquired; When the status information indicates that the second image processing path is currently used, the sharing interface of the third-party application is loaded, and the second image processing path is used to perform image processing on image frames that have not yet been processed by the first image processing path.

3. The method according to claim 2, characterized in that The method further comprises: When the status information indicates that the second image processing path is not currently used, loading the sharing interface of the third-party application, and using the third image processing path to perform image processing on the image frames that have not yet been processed by the first image processing path; The processing speed of the third image processing pathway is faster than that of the second image processing pathway, but the effect of the obtained picture is worse than that of the picture obtained by using the second image processing pathway.

4. The method according to any one of claims 1 to 3, characterized in that: Before sensing that the third-party application is used to enter the sharing scenario, the method further includes: The image frame is processed using the first image processing path, and the obtained image is stored in the preset storage area.

5. The method according to claim 4, characterized in that In the step of processing the image frame using the first image processing path and storing the obtained image in the preset storage area, the method further includes: At the third moment, when it is sensed that the third-party application is used to enter the sharing scene and all the captured image frames are processed, the sharing interface of the third-party application is loaded; Displaying the sharing interface after loading; wherein the sharing interface after loading includes the pictures currently stored in the preset storage area; The third moment is later than the second moment.

6. The method according to any one of claims 1 to 5, characterized in that: After displaying the sharing interface showing the loading is completed, 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; When the current status information indicates that the first image processing path is sufficient for use, the first image processing path is used to perform image processing on image frames that have been processed using the second image processing path or the third image processing path, and the image obtained by image processing using the first image processing path replaces the image of the corresponding image frame stored in the preset storage area.

7. The method according to any one of claims 1 to 6, characterized in that: After obtaining the image frame, the method further includes: Cache the image frame into a preset cache area; Wherein, when performing image processing on the image frame, the image frame is read from the preset cache area for image processing.

8. The method according to claim 7, characterized in that After caching the image frame into a preset cache area, the method further includes: In response to a first operation on the power key, shutting down the device; In response to a second operation on the power key, turning on the device; After powering on, detecting whether there are unprocessed image frames in the preset cache area; In the case where there is an unprocessed image in the preset cache area, an image processing path is determined according to current state information, and the image processing path is the first image processing path, or the second image processing path, or the 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 obtained image is worse than the effect of the image obtained by using the second image processing path; The unprocessed image frame is read from the preset cache area, the unprocessed image frame is image processed using the determined image processing path, and the obtained image is stored in the preset storage area.

9. The method according to claim 2, or 6, or 8, characterized in that: The state information includes any one or more of temperature information, memory information, and user behavior.

10. The method according to any one of claims 1 to 9, characterized in that: The sensing of using the third-party application to enter a sharing scenario includes: It is sensed that the third-party application has initiated an access request to the preset storage area.

11. A mobile terminal, characterized in that: The mobile terminal includes: a memory and a processor, the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the mobile terminal executes the picture sharing method as described in any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that: It comprises a computer program, and when the computer program is run on a mobile terminal, the mobile terminal executes the picture sharing method as claimed in any one of claims 1 to 10.

Citation Information

Patent Citations

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

    CN112839163A

  • Method and system for transmitting photo by using photographing, storage medium and computer equipment

    CN114157626A

  • Image processing method, electronic equipment and computer storage medium

    CN114640798A

  • Image processing method and related equipment thereof

    CN116055855A

  • Camera Application

    US20170310888A1

Cited By

  • Picture sharing method and related device

    CN119906719A

  • Picture sharing method and related apparatus

    CN119906719B