Image processing method and device, electronic equipment, and storage medium
By establishing a communication connection between the terminal device and the printing device, displaying a viewfinder preview and editing interface, and filling the template frame with the preview image when a shooting operation is detected, the problem that single mobile phone accessories cannot meet the needs of combined image shooting is solved, thus improving the user's operating experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING XIAOMI MOBILE SOFTWARE CO LTD
- Filing Date
- 2023-10-24
- Publication Date
- 2026-07-24
AI Technical Summary
Current mobile phone accessories are limited and cannot meet users' needs for combined image capture in image acquisition scenarios, resulting in a poor user experience.
A communication connection is established between the terminal device and the printing device, displaying a viewfinder preview interface and an editing interface. When a shooting operation is detected, the preview image is filled into the template frame to generate the target image.
With flexible shooting options, users can view the image layout effect in real time, enhancing the user experience.
Smart Images

Figure CN119893265B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing, and more particularly to an image processing method and apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, mobile phone accessories are usually quite basic, such as phone cases to protect the screen and body of foldable phones from scratches and impacts. These accessories do not extend to various user scenarios, such as image acquisition scenarios where users need to capture composite images, thus hindering the improvement of the user's operating experience. Summary of the Invention
[0003] To overcome the problems existing in related technologies, this disclosure provides an image processing method and apparatus, an electronic device, and a storage medium. This overcomes the problem that existing terminal devices have limited accessories and cannot meet user needs.
[0004] According to a first aspect of the present disclosure, an image processing method is provided, comprising:
[0005] When a communication connection is established between the terminal device and the printing device, and the target shooting mode is enabled, a viewfinder preview interface and an editing interface are displayed on the terminal device.
[0006] When a shooting operation is detected, the image generated based on the preview screen in the viewfinder preview interface is filled into the corresponding template frame in the editing interface;
[0007] Upon detecting an image generation operation, a target image is generated based on the images within each of the template frames.
[0008] In some embodiments, when establishing a communication connection between the terminal device and the printing device, and the target shooting mode is enabled, displaying a viewfinder preview interface and an editing interface on the terminal device includes:
[0009] When a communication connection is established between the terminal device and the printing device, and the target shooting mode is enabled, the viewfinder preview interface and the editing interface are displayed in split screen on the terminal device.
[0010] In some embodiments, the terminal device has multiple folds;
[0011] Obtain the folding parameters of each folding part of the terminal device;
[0012] When the terminal device is determined to be in a target folded state based on the folding parameters, the target shooting mode is activated.
[0013] In some embodiments, the method further includes:
[0014] Based on the folding parameters, the bending angle of the terminal device is determined;
[0015] When the bending angle is within a preset angle range, the terminal device is determined to be in the target folded state.
[0016] In some embodiments, the method further includes:
[0017] Based on the fill state of each template frame and / or the layout parameters of each template frame, the template frame corresponding to the preview screen is determined;
[0018] Adjust the display size of the preview screen to match the template frame corresponding to the preview screen;
[0019] The step of filling the corresponding template frame in the editing interface with the image generated based on the preview screen in the viewfinder preview interface when a shooting operation is detected includes:
[0020] Upon detecting a shooting operation, the image corresponding to the preview screen is generated according to the display size of the preview screen;
[0021] Fill the template frame corresponding to the preview screen with the image.
[0022] In some embodiments, the method further includes:
[0023] If an update operation is detected targeting the image within the template frame, the image is cleared.
[0024] Based on the result of the clearing operation, the fill state of the template frame is updated.
[0025] In some embodiments, generating a target image based on the images within each of the template frames upon detecting an image generation operation includes:
[0026] Upon detecting the image generation operation, an initial image is generated based on the images within each of the template frames;
[0027] Upon detecting a selection event for the initial image, watermark information is acquired;
[0028] The target image is generated based on the initial image and the watermark information.
[0029] In some embodiments, the method further includes:
[0030] Based on the detected selection operation, determine the target layout strategy from the preset layout list;
[0031] According to the target layout strategy, each of the template boxes is displayed on the editing interface.
[0032] In some embodiments, the method further includes:
[0033] Upon detecting a first adjustment operation on the template frame, adjust the template frame based on the first adjustment operation; and / or
[0034] If a second adjustment operation is detected on the image within the template frame, the image within the template frame is adjusted based on the second adjustment operation.
[0035] In some embodiments, the method further includes:
[0036] Upon detecting a printing event for the target image, a print command is generated;
[0037] Based on the communication connection with the printing device, the printing instruction is sent to the printing device; wherein, the printing instruction is used to instruct the printing device to output the image entity of the target image.
[0038] According to a second aspect of the present disclosure, an image processing apparatus is provided, comprising:
[0039] The display module is configured to establish a communication connection between the terminal device and the printing device, and when the target shooting mode is enabled, to display a viewfinder preview interface and an editing interface on the terminal device.
[0040] The fill module is configured to fill the corresponding template frame in the editing interface with the image generated based on the preview screen in the viewfinder preview interface when a shooting operation is detected.
[0041] The first generation module is configured to generate a target image based on the images within each of the template frames when an image generation operation is detected.
[0042] In some embodiments, the display module is specifically configured as follows:
[0043] When a communication connection is established between the terminal device and the printing device, and the target shooting mode is enabled, the viewfinder preview interface and the editing interface are displayed in split screen on the terminal device.
[0044] In some embodiments, the terminal device has multiple folds, and the image processing apparatus further includes:
[0045] The first acquisition module is configured to acquire the folding parameters of each folding part of the terminal device;
[0046] The activation module is configured to activate the target shooting mode when the terminal device is determined to be in a target folded state based on the folding parameters.
[0047] In some embodiments, the image processing apparatus further includes:
[0048] The first determining module is configured to determine the bending angle of the terminal device based on the folding parameters;
[0049] The second determining module is configured to determine that the terminal device is in the target folded state when the bending angle is within a preset angle range.
[0050] In some embodiments, the image processing apparatus further includes:
[0051] The third determining module is configured to determine the template frame corresponding to the preview screen based on the fill state of each template frame and / or the layout parameters of each template frame.
[0052] The first adjustment module is configured to adjust the display size of the preview screen to match the template frame corresponding to the preview screen;
[0053] The filling module is specifically configured as follows:
[0054] Upon detecting a shooting operation, the image corresponding to the preview screen is generated according to the display size of the preview screen;
[0055] Fill the template box corresponding to the preview screen with the image.
[0056] In some embodiments, the image processing apparatus further includes:
[0057] The clearing module is configured to clear the image when an update operation is detected targeting the image within the template frame;
[0058] The update module is configured to update the fill state of the template frame based on the execution result of the clearing operation.
[0059] In some embodiments, the first generation module is specifically configured as follows:
[0060] Upon detecting the image generation operation, an initial image is generated based on the images within each of the template frames;
[0061] Upon detecting a selection event for the initial image, watermark information is acquired;
[0062] The target image is generated based on the initial image and the watermark information.
[0063] In some embodiments, the image processing apparatus further includes:
[0064] The fourth determination module is configured to determine the target layout strategy from a preset layout list based on the detected selection operation.
[0065] The operation module is configured to display each of the template boxes on the editing interface according to the target layout strategy.
[0066] In some embodiments, the image processing apparatus further includes:
[0067] The second adjustment module is configured to adjust the template frame based on the first adjustment operation when a first adjustment operation is detected; and / or
[0068] The third adjustment module is configured to adjust the image in the template frame based on the second adjustment operation when a second adjustment operation is detected for the image in the template frame.
[0069] In some embodiments, the image processing apparatus further includes:
[0070] The second generation module is configured to generate a print instruction upon detecting a print event for the target image;
[0071] A printing module is configured to send a printing instruction to the printing device based on a communication connection with the printing device; wherein the printing instruction is used to instruct the printing device to output the image entity of the target image.
[0072] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0073] processor;
[0074] Memory used to store processor-executable instructions;
[0075] The processor is configured to, when executing the executable command, implement the steps of any of the image processing methods in the first aspect described above.
[0076] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, comprising:
[0077] When the instructions in the storage medium are executed by the processor of the electronic device, the steps in any of the image processing methods in the first aspect described above are implemented.
[0078] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0079] In this embodiment, a communication connection is first established between the terminal device and the printing device. With the target shooting mode enabled, a viewfinder preview interface and an editing interface are displayed on the terminal device. Secondly, upon detecting a shooting operation, the image generated based on the preview image in the viewfinder preview interface is filled into the corresponding template frame in the editing interface. Finally, upon detecting an image generation operation, the target image is generated based on the images within each template frame. Thus, this embodiment, by establishing a communication connection between the terminal device and the printing device, changes the display interface of the terminal device, providing the user with a flexible shooting solution. This allows the user to view the layout effect of the template corresponding to the target image in real time, thereby improving the user's operating experience.
[0080] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0081] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0082] Figure 1 This is a flowchart illustrating an image processing method according to an exemplary embodiment;
[0083] Figure 2 This is a schematic diagram of the structure of a printing device according to an exemplary embodiment;
[0084] Figure 3 This is a schematic diagram of the structure of a terminal device according to an exemplary embodiment. Figure 1 ;
[0085] Figure 4 This is a schematic diagram illustrating a fixed connection between a terminal device and a printing device according to an exemplary embodiment;
[0086] Figure 5 This is a schematic diagram of the structure of a terminal device according to an exemplary embodiment. Figure 2 ;
[0087] Figure 6 This is a schematic diagram of the structure of a terminal device according to an exemplary embodiment. Figure 3 ;
[0088] Figure 7 This is a block diagram illustrating an image processing apparatus according to an exemplary embodiment;
[0089] Figure 8This is a hardware structure block diagram of an electronic device according to an exemplary embodiment. Figure 1 ;
[0090] Figure 9 This is a hardware structure block diagram of an electronic device according to an exemplary embodiment. Figure 2 .
[0091] Explanation of icon numbers:
[0092] 100, Printing device; 101, Housing; 102, Output port; 103, Receiving part; 104, Communication module; 105, Alignment part; 106, Moving part; 107, Magnetic suction part;
[0093] 200, terminal device; 201, first folding section; 202, second folding section. Detailed Implementation
[0094] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0095] Figure 1 This is a flowchart illustrating an image processing method according to an exemplary embodiment, such as... Figure 1 As shown, this image processing method mainly includes the following steps:
[0096] In step 301, when a communication connection is established between the terminal device and the printing device and the target shooting mode is enabled, the viewfinder preview interface and the editing interface are displayed in split screen.
[0097] In step 302, when a shooting operation is detected, the image generated based on the preview screen in the viewfinder preview interface is filled into the corresponding template frame in the editing interface.
[0098] In step 303, if an image generation operation is detected, a target image is generated based on the images within each of the template frames.
[0099] It should be noted that the image processing method proposed in this disclosure can be applied to electronic devices. Here, electronic devices may include terminal devices, such as mobile terminals or fixed terminals. Mobile terminals may include mobile phones, tablets, laptops, wearable electronic devices, etc. Fixed terminals may include desktop computers, smart TVs, in-vehicle systems, etc. In other embodiments, the image processing method can also be applied to applications installed on electronic devices.
[0100] In other embodiments, the image processing method described in this disclosure can be configured in an image processing device, which can be located in an electronic device; this disclosure does not limit this. It should be noted that the execution entity of this disclosure can be a central processing unit (CPU) in the electronic device in hardware, and a related background service in the electronic device in software; this is not limited.
[0101] It should be explained that in some image acquisition scenarios, users may wish to capture composite or stitched photos, meaning photos containing multiple identical or different images, for protection and sharing purposes. Therefore, this embodiment of the present disclosure, after establishing a connection between the terminal device and the printing device, generates a stitched image capture mode on the terminal device, enabling users to capture stitched images in real time, thereby improving the user experience.
[0102] It is understood that the target shooting mode is a stitched shooting mode. After the terminal device and the printing device establish a communication connection, the stitched shooting mode can be triggered, so that the user can directly obtain the stitched image.
[0103] There are many ways to trigger the target shooting mode, such as button triggering or screen triggering, and this embodiment does not limit this.
[0104] In some embodiments, a physical button for triggering the target shooting mode can be provided on the terminal device. After the terminal device is connected to the printing device, the user can press the physical button to trigger the target shooting mode, so that the terminal device generates a stitching shooting mode to facilitate the user to collect stitched images.
[0105] For example, the process of establishing a communication connection between the terminal device and the printing device is as follows: Figure 2 This is a schematic diagram of the structure of a printing device according to an exemplary embodiment; Figure 3 This is a schematic diagram of the structure of a terminal device according to an exemplary embodiment. Figure 1 ; Figure 4This is a schematic diagram illustrating a fixed connection between a terminal device and a printing device according to an exemplary embodiment; as shown below. Figure 2-4 As shown, the printing device 100 includes: a housing 103, a connection module (not shown in the figure), a communication module 104, a printing module (not shown in the figure), and a film output port 102.
[0106] By mounting the connection module on the housing, the terminal device is detachably fixed to the printing device. The communication module enables communication between the printing device and the terminal device, allowing them to exchange data. The printing module is then connected to the communication module, enabling it to execute printing commands transmitted by the communication module. These printing commands are generated by the terminal device based on printing events related to the target image. Finally, an output port is formed on the housing to output the image entity of the target image.
[0107] In addition, the connection module also includes a receiving part and / or a magnetic part, wherein the size of the receiving space of the receiving part matches the size of the first folding part of the terminal device, and can snap the first folding part into place; the magnetic part can attract the first folding part.
[0108] Thus, once the first folding part of the terminal device is fixed to the receiving part of the printing device, a communication connection can be established between the terminal device and the printing device by using the communication module of the printing device and the communication interface of the terminal device.
[0109] It should be noted that, in order to make it easier for users to view the effect of the stitched image, when the terminal device and the printing device are connected and the target shooting mode is triggered, the UI (User Interface) of the terminal device will change, and a viewfinder preview interface and an editing interface will be generated on the UI interface.
[0110] It is understandable that the viewfinder preview interface is the real-time preview interface, and the editing interface is the interface for controlling the viewfinder preview interface and adjusting the layout in real time.
[0111] Here, the viewfinder preview interface and the editing interface can be displayed on the same screen or on different screens, and this embodiment does not limit this.
[0112] Meanwhile, the positions of the viewfinder preview interface and the editing interface can be set arbitrarily by the user according to their needs, and the size of the viewfinder preview interface and the editing interface can also be set arbitrarily by the user according to their needs. This embodiment of the disclosure does not limit this.
[0113] In some embodiments, if the terminal device is a flat-screen mobile phone, when the flat-screen mobile phone and the printing device establish a connection and the target shooting mode is triggered, the viewfinder preview interface and the editing interface can be displayed simultaneously on the display screen of the flat-screen mobile phone.
[0114] In other embodiments, if the terminal device is a foldable screen phone, when the foldable screen phone and the printing device establish a connection and the target shooting mode is triggered, a viewfinder preview interface can be displayed on the first folded screen of the foldable screen phone, and an editing interface can be displayed on the second folded screen of the foldable screen phone.
[0115] For example, Figure 5 This is a schematic diagram of the structure of a terminal device according to an exemplary embodiment. Figure 2 ,like Figure 5 As shown, the terminal device 200 includes two folding sections. The first folding section 201 displays an editing interface on its screen, and the second folding section 202 displays a viewfinder preview interface on its screen. In some embodiments, the terminal device can pre-store preset templates, such as multi-grid templates. After the target shooting mode is activated, the editing interface of the terminal device can display the multi-grid template. Users can adjust the proportions of each template frame in the multi-grid template to obtain the template interface that best suits their needs.
[0116] It is understandable that the image generated from the preview screen in the viewfinder preview interface corresponds to the template frame in the editing interface. When the terminal device detects a shooting operation, it can automatically fill the corresponding template frame in the editing interface with the image generated from the preview screen in the viewfinder preview interface.
[0117] Here, the editing interface includes at least two template boxes, and the size of each template box can be set by the user according to their needs.
[0118] In some embodiments, when the terminal device is a foldable phone, the user can view the preview screen displayed on the second fold of the foldable phone in real time. When a satisfactory image is previewed, the user can trigger an image capture operation by touching the interface corresponding to the first fold of the foldable phone's display screen. After the terminal device detects the capture operation, the image generated from the preview screen in the current preview interface is filled into the corresponding template frame in the editing interface.
[0119] Here, users can take multiple shots of the same scene or take multiple shots of different scenes; this embodiment does not limit this.
[0120] Understandably, once the corresponding template frame in the editing interface is fully filled, the user can view the effect of the stitched image through the editing interface. Simultaneously, if the user does not make any adjustments to the editing interface, the terminal device can detect the image generation operation.
[0121] Here, the target image is composed of multiple images within each template frame in the editing interface. These multiple images can be the same image or different images, and this embodiment does not limit this.
[0122] In this embodiment, a communication connection is first established between the terminal device and the printing device. With the target shooting mode enabled, a split-screen preview interface and an editing interface are displayed. Secondly, upon detecting a shooting operation, the image generated from the preview screen in the preview interface is filled into the corresponding template frame in the editing interface. Finally, upon detecting an image generation operation, the target image is generated based on the images within each template frame. Thus, this embodiment, by establishing a communication connection between the terminal device and the printing device, changes the display interface of the terminal device, providing the user with a flexible shooting solution. This allows the user to view the layout effect of the template corresponding to the target image in real time, thereby improving the user's operating experience.
[0123] In some embodiments, when establishing a communication connection between the terminal device and the printing device, and the target shooting mode is enabled, displaying a viewfinder preview interface and an editing interface on the terminal device includes:
[0124] When a communication connection is established between the terminal device and the printing device, and the target shooting mode is enabled, the viewfinder preview interface and the editing interface are displayed in split screen on the terminal device.
[0125] It should be noted that when the viewfinder preview interface and the editing interface are displayed on the same screen, the editing interface will obstruct the viewfinder preview interface, affecting the user's image acquisition process. Therefore, in this embodiment of the present disclosure, when the terminal device and the printing device establish a connection and the target shooting mode is triggered, split-screen processing can be performed on the screen of the terminal device to display the viewfinder preview interface and the editing interface respectively.
[0126] Here, split-screen can be vertical or horizontal, and this embodiment does not limit it.
[0127] Meanwhile, the split-screen ratio can be set arbitrarily, and this embodiment does not limit it.
[0128] In some embodiments, in order to improve the user's image acquisition experience, when the terminal device and the printing device establish a connection and the target shooting mode is triggered, the screen of the terminal device can be split into upper and lower screens, with the upper screen having a larger screen area than the lower screen. This allows the upper screen to display a viewfinder preview interface and the lower screen to display an editing interface, so that the user can frame the shot in the viewfinder preview interface and control image acquisition in the editing interface.
[0129] In this embodiment of the disclosure, when a communication connection is established between the terminal device and the printing device and the target shooting mode is enabled, the viewfinder preview interface and the editing interface are displayed in a split screen on the terminal device. This avoids the problem of the editing interface obstructing the viewfinder preview interface when the viewfinder preview interface and the editing interface are displayed on the same screen, which helps to improve the user's operating experience.
[0130] In some embodiments, the terminal device has multiple folds;
[0131] Obtain the folding parameters of each folding part of the terminal device;
[0132] When the terminal device is determined to be in a target folded state based on the folding parameters, the target shooting mode is activated.
[0133] It should be noted that the target shooting mode is not automatically triggered after the terminal device and the printing device establish a communication connection. Therefore, in this embodiment of the disclosure, the target shooting mode is only activated when the terminal device is detected to be in a target folded state.
[0134] Understandably, to achieve the target folded state, the folding parameters of each folding part of the terminal device must first be determined. After determining the folding parameters, the folding state of each folding part of the terminal device is adjusted, and when the folding state is the target folded state, the target shooting mode is triggered.
[0135] Here, folding parameters include, but are not limited to, folding angle and / or folding direction, and the embodiments disclosed herein do not limit these.
[0136] Meanwhile, the target folding state can be set by the user according to their needs, and this embodiment does not limit this.
[0137] In some embodiments, if the target folding state is such that the bending direction of the first folding part of the terminal device is perpendicular to the horizontal ground and the bending direction of the second folding part of the terminal device is parallel to the horizontal ground, the folding angle and folding direction corresponding to the first folding part and the folding angle and folding direction corresponding to the second folding part of the terminal device are obtained. Based on the above folding parameters, the bending direction of the first folding part and the bending direction of the second folding part are adjusted so that the terminal device is in the target folding state, and the target shooting mode is triggered.
[0138] In this embodiment, the folding parameters of each folding part of the terminal device are obtained; and when the terminal device is determined to be in a target folding state based on the folding parameters, the target shooting mode is activated. Thus, the user can adjust the folding parameters of each folding part to bring the terminal device into the target folding state, thereby triggering the target shooting mode, which improves the user's operating experience.
[0139] In some embodiments, the method further includes:
[0140] Based on the folding parameters, the bending angle of the terminal device is determined;
[0141] When the bending angle is within a preset angle range, the terminal device is determined to be in the target folded state.
[0142] It is understandable that after obtaining the folding parameters of each folding part of the terminal device, the current folding state of the terminal device can be determined, thereby determining the bending angle between each folding part.
[0143] It should be noted that, in order to simplify the triggering process of the target shooting mode, a preset angle range between the folds of the terminal device can be set. When the current angle between the folds of the terminal device is within the preset angle range, the current folding state of the terminal device is determined to be the target folding state.
[0144] Here, the preset angle range can be set arbitrarily by the user according to their needs, and this embodiment of the present disclosure does not limit this.
[0145] For example, if the preset angle range is 75 degrees to 150 degrees, after obtaining the folding parameters of the first and second folding parts of the terminal device, the bending angle between the first and second folding parts of the terminal device is determined to be 30 degrees. The user can bend the second folding part at an angle of more than 45 degrees away from the first folding part. When the bending angle between the first and second folding parts is within the range of 75 degrees to 150 degrees, it can be determined that the terminal device is currently in the target folding state.
[0146] In this embodiment, the bending angle of the terminal device is determined based on the folding parameters; and when the bending angle is within a preset angle range, the terminal device is determined to be in the target folded state. Thus, the user can bend the terminal device to the preset angle range, causing the terminal device to be in the target folded state, thereby improving the accuracy of triggering the target shooting mode.
[0147] In some embodiments, the method further includes:
[0148] Based on the fill state of each template frame and / or the layout parameters of each template frame, the template frame corresponding to the preview screen is determined;
[0149] Adjust the display size of the preview screen to match the template frame corresponding to the preview screen;
[0150] The step of filling the corresponding template frame in the editing interface with the image generated based on the preview screen in the viewfinder preview interface when a shooting operation is detected includes:
[0151] Upon detecting a shooting operation, the image corresponding to the preview screen is generated according to the display size of the preview screen;
[0152] Fill the template frame corresponding to the preview screen with the image.
[0153] It should be noted that, since the image generated by the preview screen in the viewfinder preview interface corresponds to the template frame in the editing interface, in this embodiment of the disclosure, it is necessary to first determine the template frame corresponding to the current preview screen based on the fill state and / or layout parameters of each template frame.
[0154] Here, the fill state of each template box can be either filled or unfilled.
[0155] It is understandable that the layout of each template frame can be manipulated by the user. For example, if the user has selected the third template frame to fill the image, then the preview screen in the current viewfinder preview interface corresponds to the third template frame.
[0156] In some embodiments, if the user has not performed any layout operations on the template frames in the editing interface, the preview image in the current viewfinder preview interface corresponds to an unfilled template frame. If there are multiple unfilled template frames, the corresponding template frames can be located in order from left to right and from top to bottom.
[0157] It should be explained that after determining the template frame corresponding to the preview screen, the display size of the preview screen needs to be adjusted to match the template frame so that the user can adjust the viewfinder of the preview screen to capture an image that conforms to the size of the template frame.
[0158] It is understandable that when the terminal device detects a shooting operation, it can generate a corresponding image based on the display size of the preview screen. Since the image is captured according to the size of the template frame, after acquiring the image, no processing is required; the image can be filled into the template frame corresponding to the preview screen.
[0159] For example, Figure 6 This is a schematic diagram of the structure of a terminal device according to an exemplary embodiment. Figure 3 ,like Figure 6 As shown, the terminal device includes two folding sections. The display screen of the first folding section displays an editing interface, and the display screen of the second folding section displays a viewfinder preview interface. The editing interface is a three-grid template, and template frame A has different dimensions from template frames B and C. When the terminal device determines that the template frame corresponding to the current preview image is template frame A, it adjusts the display size of the preview image to match template frame A, i.e., the viewfinder frame D displayed on the second folding section's display screen. After capturing the image corresponding to viewfinder frame D, an image corresponding to the size of template frame A is generated, and the image is filled into template frame A.
[0160] In this embodiment, the template frame corresponding to the preview screen is first determined based on the fill state and / or layout parameters of each template frame; then, the display size of the preview screen is adjusted to match the template frame corresponding to the preview screen; and upon detecting a shooting operation, the image corresponding to the preview screen is generated according to the display size of the preview screen; finally, the image is filled into the template frame corresponding to the preview screen. Thus, this disclosure requires only one capture to obtain an image conforming to the template frame size, without requiring image processing, and the image can be filled into the template frame corresponding to the preview screen, thereby improving the user experience.
[0161] In some embodiments, the method further includes:
[0162] If an update operation is detected targeting the image within the template frame, the image is cleared.
[0163] Based on the result of the clearing operation, the fill state of the template frame is updated.
[0164] It should be noted that after all the template boxes in the editing interface are filled, users can view the layout effect of the images in each template box in the current editing interface. When the layout effect does not meet the requirements, the corresponding images in the template boxes in the editing interface can be updated.
[0165] Here, the update operation is a replacement operation. If the user is not satisfied with the current image in the template frame, they can re-frame the shot and re-capture the image to replace the current image.
[0166] It is understood that when the terminal device detects an update operation of the image within the template frame, it can perform a clearing operation on the image, and based on the clearing operation, update the fill state of the template frame, thereby updating the state of the template frame to an unfilled template frame, so that the re-acquired image can be filled.
[0167] Here, the user can update the image within the template frame multiple times, and this embodiment of the disclosure does not limit this.
[0168] For example, if the fill template in the editing interface is a four-grid template, after all four template boxes in the four-grid template are filled with the corresponding images, the user can view the presentation effect of the images in the current four-grid template. If the user needs to replace the image in the third template box, the user can touch the third template box. At this time, the terminal device sends a pop-up window to the user to prompt whether to update the current image. After the user confirms the update, the terminal device clears the image. At this time, the user can use the viewfinder preview interface of the terminal device to re-acquire a scene that meets the requirements, and after receiving the shooting operation, fill the third template box with the captured image.
[0169] In this embodiment of the disclosure, upon detecting an update operation on the image within the template frame, a clearing operation is performed on the image; based on the result of the clearing operation, the fill state of the template frame is updated. Thus, the user can view the layout effect of the target image through the editing interface, perform replacement shooting operations on the target image, update the target image, and flexibly adjust the layout effect of the editing interface, thereby improving the user's operating experience.
[0170] In some embodiments, generating a target image based on the images within each of the template frames upon detecting an image generation operation includes:
[0171] Upon detecting the image generation operation, an initial image is generated based on the images within each of the template frames;
[0172] Upon detecting a selection event for the initial image, watermark information is acquired;
[0173] The target image is generated based on the initial image and the watermark information.
[0174] It should be noted that when an image generation operation is detected, an initial image can be generated based on the images within each template frame. Users can acquire multiple different initial images using their terminal devices. Therefore, to improve the user experience and avoid wasting printing paper, the user needs to select the target image from the multiple initial images before generating the print command for the target image.
[0175] It should be explained that watermark information can be obtained upon detecting a selection event for the initial image. The user can then choose whether to add the watermark information to the selected initial image, thereby further generating the target image.
[0176] In some embodiments, if the user chooses to add watermark information to the initial image, the target image to be printed is the initial image with watermark information.
[0177] In other embodiments, if the user chooses not to add the watermark information to the initial image, the target image to be printed is the initial image without watermark information.
[0178] Here, the watermark information can be a watermark automatically generated by the terminal device system, and this embodiment of the disclosure does not limit it.
[0179] In some embodiments, users can adjust the text in the watermark information and the overall effect of the watermark information, including the font, font size, relative position of each text, whether it is hidden, the overall size of the watermark information, and the transparency of the watermark information.
[0180] In this embodiment of the disclosure, when the image generation operation is detected, an initial image is generated based on the images within each of the template frames, and when a selection event for the initial image is detected, watermark information is obtained; based on the initial image and the watermark information, the target image is generated, enabling the user to preprocess the initial image, such as whether to add watermark information to the initial image, thereby improving the user experience.
[0181] In some embodiments, the method further includes:
[0182] Based on the detected selection operation, determine the target layout strategy from the preset layout list;
[0183] According to the target layout strategy, each of the template boxes is displayed on the editing interface.
[0184] It is understandable that, in addition to the template frame display area, the editing interface will also have other control areas, such as areas for controlling image capture and areas for adjusting shooting parameters. In this embodiment of the disclosure, multiple preset layout schemes will be generated for the above-mentioned areas, and then a preset layout list will be generated based on the multiple preset layout schemes to facilitate the user in selecting a target preset layout scheme.
[0185] It should be explained that, in order to further enhance the user's operating experience, after the user selects a target preset layout scheme, a target layout strategy can be generated for the target preset layout scheme, and then each template box can be displayed on the editing interface according to the target layout strategy.
[0186] Here, displaying each template frame on the editing interface according to the target layout strategy can be a process in which the user adjusts the position of each display area within the target preset layout scheme so that the position of each area within the target preset layout scheme meets the requirements.
[0187] In this embodiment of the disclosure, a target layout strategy is determined from a preset layout list based on the detected selection operation; according to the target layout strategy, each template frame is displayed on the editing interface, so that the user can adjust the position of each display area of the editing interface as needed, which is beneficial to improving the user's operating experience.
[0188] In some embodiments, the method further includes:
[0189] Upon detecting a first adjustment operation on the template frame, adjust the template frame based on the first adjustment operation; and / or
[0190] If a second adjustment operation is detected on the image within the template frame, the image within the template frame is adjusted based on the second adjustment operation.
[0191] It should be noted that users not only have layout adjustment needs for the editing interface, but also for the template frame storing images. Therefore, in this embodiment of the disclosure, when a user adjusts the template frame and / or the image within the template frame, if a first adjustment operation is detected on the template frame, the template frame can be adjusted based on the first adjustment operation; if a second adjustment operation is detected on the image within the template frame, the image within the template frame can be adjusted based on the second adjustment operation.
[0192] It is understandable that the first adjustment operation could be to adjust the size of each template frame, and the second adjustment operation could be to adjust the distribution ratio of the images in each template frame.
[0193] Here, when the user needs to adjust both the template frame and the image within the template frame, the template frame can be adjusted first, followed by the image within the template frame; alternatively, the image within the template frame can be adjusted first, followed by the template frame. This embodiment does not limit the choice between these two options.
[0194] In some embodiments, if the template display area of the editing interface has four template boxes of the same size, the user can adjust the proportional size of each template box to change the four template boxes of the same size into four template boxes of different sizes.
[0195] In other embodiments, if all four template boxes of the editing interface are filled with images, the user can adjust the distribution ratio of the images within the template boxes to create a new display ratio for each image, thereby generating a stitched image that meets the requirements.
[0196] In this embodiment of the disclosure, when a first adjustment operation is detected on the template frame, the template frame is adjusted based on the first adjustment operation; and / or, when a second adjustment operation is detected on the image in the template frame, the image in the template frame is adjusted based on the second adjustment operation, so that the user can adjust the template frame and / or the image in the template frame as needed, thereby improving the user's operating experience.
[0197] In some embodiments, the method further includes:
[0198] Upon detecting a printing event for the target image, a print command is generated;
[0199] Based on the communication connection with the printing device, the printing instruction is sent to the printing device; wherein, the printing instruction is used to instruct the printing device to output the image entity of the target image.
[0200] It should be explained that, in order for users to obtain real-time photos of the entity corresponding to the target image, after the printing device establishes a communication connection with the terminal device, the terminal device can send a printing command to the printing device, so that the printing device executes the printing command to obtain the image entity corresponding to the target image.
[0201] It is understood that after receiving the print command, the printing device can execute the print command using the printing module within the printing device, enabling the user to obtain the image entity corresponding to the target image in real time, thereby improving the user's operating experience.
[0202] Here, the communication connection between the printing device and the terminal device can be a wired connection or a wireless connection, and this disclosure does not limit this.
[0203] In some embodiments, after a wired connection is established between the printing device and the terminal device, a wireless connection can be further established. To improve the security and reliability of transmission, a communication check is required between the two devices before establishing a wireless connection. Specifically, it is first verified whether the other device is supported by the first device. After the initial connection is established, the two devices communicate with each other, sending their respective project numbers to each other and checking whether the name sent by the other party is in their respective support list. Only after confirming that the two devices are mutually supported will a wireless connection channel be established.
[0204] Therefore, in this embodiment of the present disclosure, when there is no wired connection between the printing device and the terminal device, within a limited distance (i.e., when there is still a wireless connection between the printing device and the terminal device), the printing device can still receive the printing instructions sent by the terminal device, execute the printing instructions, and output the image entity of the target image.
[0205] In this embodiment of the disclosure, upon detecting a printing event targeting a target image, a printing instruction is generated. The terminal device sends the printing instruction to the printing device based on a communication connection with the printing device. The printing instruction instructs the printing device to output the image entity of the target image. Thus, after establishing a communication connection between the printing device and the terminal device, the terminal device can send the target image to the printing device, and the printing device can print the target image, allowing the user to obtain the entity image in real time, thereby improving the user's operating experience.
[0206] Figure 7 This is a block diagram illustrating an image processing apparatus according to an exemplary embodiment, such as... Figure 7 As shown, the image processing device 400 includes:
[0207] Display module 401 is configured to establish a communication connection between the terminal device and the printing device, and when the target shooting mode is enabled, display a viewfinder preview interface and an editing interface on the terminal device.
[0208] The filling module 402 is configured to fill the corresponding template frame in the editing interface with the image generated based on the preview screen in the viewfinder preview interface when a shooting operation is detected.
[0209] The first generation module 403 is configured to generate a target image based on the images within each of the template frames when an image generation operation is detected.
[0210] In some embodiments, the display module is specifically configured as follows:
[0211] When a communication connection is established between the terminal device and the printing device, and the target shooting mode is enabled, the viewfinder preview interface and the editing interface are displayed in split screen on the terminal device.
[0212] In some embodiments, the terminal device has multiple folds, and the image processing apparatus 400 further includes:
[0213] The first acquisition module is configured to acquire the folding parameters of each folding part of the terminal device;
[0214] The activation module is configured to activate the target shooting mode when the terminal device is determined to be in a target folded state based on the folding parameters.
[0215] In some embodiments, the image processing apparatus 400 further includes:
[0216] The first determining module is configured to determine the bending angle of the terminal device based on the folding parameters;
[0217] The second determining module is configured to determine that the terminal device is in the target folded state when the bending angle is within a preset angle range.
[0218] In some embodiments, the image processing apparatus 400 further includes:
[0219] The third determining module is configured to determine the template frame corresponding to the preview screen based on the fill state of each template frame and / or the layout parameters of each template frame.
[0220] The first adjustment module is configured to adjust the display size of the preview screen to match the template frame corresponding to the preview screen;
[0221] The filling module 402 is specifically configured as follows:
[0222] Upon detecting a shooting operation, the image corresponding to the preview screen is generated according to the display size of the preview screen;
[0223] Fill the template box corresponding to the preview screen with the image.
[0224] In some embodiments, the image processing apparatus 400 further includes:
[0225] The clearing module is configured to clear the image when an update operation is detected targeting the image within the template frame;
[0226] The update module is configured to update the fill state of the template frame based on the execution result of the clearing operation.
[0227] In some embodiments, the first generation module 403 is specifically configured as follows:
[0228] Upon detecting the image generation operation, an initial image is generated based on the images within each of the template frames;
[0229] Upon detecting a selection event for the initial image, watermark information is acquired;
[0230] The target image is generated based on the initial image and the watermark information.
[0231] In some embodiments, the image processing apparatus further includes:
[0232] The fourth determination module is configured to determine the target layout strategy from a preset layout list based on the detected selection operation.
[0233] The operation module is configured to display each of the template boxes on the editing interface according to the target layout strategy.
[0234] In some embodiments, the image processing apparatus further includes:
[0235] The second adjustment module is configured to adjust the template frame based on the first adjustment operation when a first adjustment operation is detected; and / or
[0236] The third adjustment module is configured to adjust the image in the template frame based on the second adjustment operation when a second adjustment operation is detected for the image in the template frame.
[0237] In some embodiments, the image processing apparatus 400 further includes:
[0238] The second generation module is configured to generate a print instruction upon detecting a print event for the target image;
[0239] A printing module is configured to send a printing instruction to the printing device based on a communication connection with the printing device; wherein the printing instruction is used to instruct the printing device to output the image entity of the target image.
[0240] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0241] Figure 8 This is a hardware structure block diagram of an electronic device according to an exemplary embodiment. Figure 1For example, device 800 can be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0242] Reference Figure 8 The device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.
[0243] Processing component 802 typically controls the overall operation of device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0244] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0245] Power supply component 806 provides power to various components of device 800. Power supply component 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to device 800.
[0246] Multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0247] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
[0248] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0249] Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of device 800. For example, sensor assembly 814 may detect the on / off state of device 800, the relative positioning of components such as the display and keypad of device 800, changes in the position of device 800 or a component of device 800, the presence or absence of user contact with device 800, the orientation or acceleration / deceleration of device 800, and temperature changes of device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0250] Communication component 816 is configured to facilitate wired or wireless communication between device 800 and other devices. Device 800 can access wireless networks based on communication standards, such as WiFi, 4G, or 5G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0251] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0252] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of the device 800 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0253] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform an image processing method, the method comprising:
[0254] When a communication connection is established between the terminal device and the printing device, and the target shooting mode is enabled, a viewfinder preview interface and an editing interface are displayed on the terminal device.
[0255] When a shooting operation is detected, the image generated based on the preview screen in the viewfinder preview interface is filled into the corresponding template frame in the editing interface;
[0256] Upon detecting an image generation operation, a target image is generated based on the images within each of the template frames.
[0257] Figure 9 This is a hardware structure block diagram of an electronic device according to an exemplary embodiment. Figure 2 For example, device 1900 can be provided as a server. (See reference...) Figure 9The apparatus 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.
[0258] When a communication connection is established between the terminal device and the printing device, and the target shooting mode is enabled, a viewfinder preview interface and an editing interface are displayed on the terminal device.
[0259] When a shooting operation is detected, the image generated based on the preview screen in the viewfinder preview interface is filled into the corresponding template frame in the editing interface;
[0260] Upon detecting an image generation operation, a target image is generated based on the images within each of the template frames.
[0261] Device 1900 may also include a power supply component 1926 configured to perform power management of device 1900, a wired or wireless network interface 1950 configured to connect device 1900 to a network, and an input / output (I / O) interface 1958. Device 1900 can operate on an operating system stored in memory 1932, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™, or similar.
[0262] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0263] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. An image processing method, characterized in that, The method includes: When a communication connection is established between the terminal device and the printing device, and the target shooting mode is enabled, a viewfinder preview interface and an editing interface are displayed on the terminal device. Based on the fill status of each template frame in the editing interface and / or the layout parameters of each template frame, determine the template frame corresponding to the preview screen of the viewfinder preview interface. Adjust the display size of the preview screen to match the template frame corresponding to the preview screen; Upon detecting a shooting operation, an image corresponding to the preview screen is generated according to the display size of the preview screen, and the image is filled into the template frame corresponding to the preview screen; Upon detecting an image generation operation, a target image is generated based on the images within each of the template frames.
2. The method according to claim 1, characterized in that, When a communication connection is established between the terminal device and the printing device, and the target shooting mode is enabled, displaying a viewfinder preview interface and an editing interface on the terminal device includes: When a communication connection is established between the terminal device and the printing device, and the target shooting mode is enabled, the viewfinder preview interface and the editing interface are displayed in split screen on the terminal device.
3. The method according to claim 1, characterized in that, The terminal device has multiple folds; Obtain the folding parameters of each folding part of the terminal device; When the terminal device is determined to be in a target folded state based on the folding parameters, the target shooting mode is activated.
4. The method according to claim 3, characterized in that, The method further includes: Based on the folding parameters, the bending angle of the terminal device is determined; When the bending angle is within a preset angle range, the terminal device is determined to be in the target folded state.
5. The method according to claim 1, characterized in that, The method further includes: If an update operation is detected targeting the image within the template frame, the image is cleared. Based on the result of the clearing operation, the fill state of the template frame is updated.
6. The method according to claim 1, characterized in that, The step of generating a target image based on the images within each of the template frames when an image generation operation is detected includes: Upon detecting the image generation operation, an initial image is generated based on the images within each of the template frames; Upon detecting a selection event for the initial image, watermark information is acquired; The target image is generated based on the initial image and the watermark information.
7. The method according to claim 1, characterized in that, The method further includes: Based on the detected selection operation, determine the target layout strategy from the preset layout list; According to the target layout strategy, each of the template boxes is displayed on the editing interface.
8. The method according to claim 1, characterized in that, The method further includes: Upon detecting a first adjustment operation on the template frame, the template frame is adjusted based on the first adjustment operation; and / or, If a second adjustment operation is detected on the image within the template frame, the image within the template frame is adjusted based on the second adjustment operation.
9. The method according to any one of claims 1 to 8, characterized in that, The method further includes: Upon detecting a printing event for the target image, a print command is generated; Based on the communication connection with the printing device, the printing instruction is sent to the printing device; wherein, the printing instruction is used to instruct the printing device to output the image entity of the target image.
10. An image processing apparatus, characterized in that, The device includes: The display module is configured to establish a communication connection between the terminal device and the printing device, and when the target shooting mode is enabled, to display a viewfinder preview interface and an editing interface on the terminal device. The first adjustment module is configured to determine the template frame corresponding to the preview screen of the viewfinder preview interface based on the fill state of each template frame in the editing interface and / or the layout parameters of each template frame; and adjust the display size of the preview screen to match the template frame corresponding to the preview screen. The filling module is configured to generate an image corresponding to the preview screen according to the display size of the preview screen when a shooting operation is detected, and fill the image into the template frame corresponding to the preview screen; The first generation module is configured to generate a target image based on the images within each of the template frames when an image generation operation is detected.
11. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to, when executing the executable instructions, implement the steps of the image processing method as described in any one of claims 1 to 9.
12. A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, implement the steps of the image processing method as claimed in any one of claims 1 to 9.