Image processing method and processing device
By responding to the user's folding operation in the folding screen electronic device, automatically split the screen and generate the stacked image, the problem of cumbersome processing of stacked image in the prior art is solved, and the processing efficiency and operation simplicity are improved.
Patent Information
- Application Number
- CN202211499938.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2042-11-28
AI Technical Summary
In the prior art, the process of generating overlapping images is cumbersome, and users need to manually take screenshots frame by frame and process them through image editing software, resulting in low processing efficiency.
By receiving the user's folding operation in the folding screen electronic device, the video and the overlay image are automatically displayed on the split screen, and the overlay image is generated based on the played video frame, simplifying the operation steps.
No need for manual screenshots and editing of users, significantly improving the efficiency and ease of operation of stacked image images.
Smart Images

Figure CN116320140B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic equipment, and specifically relates to an image processing method and a processing device. Background Art
[0002] In the related art, an overlay image refers to stacking multiple frames of images. For example, in a video with subtitles, multiple video frames of the video are stacked in sequence in a manner that exposes the subtitle portion of each video frame. The final stacked overlay image includes the entire content of the top video frame and the subtitle portion at the bottom of each other video frame. Therefore, the overlay image can clearly and intuitively display the video content.
[0003] In order to generate such an overlay image, the user needs to manually pause the playing video frame by frame and take screenshots frame by frame, and then use image editing software to process the screenshot video frames one by one to finally generate the overlay image, which makes the image processing operation cumbersome and the processing efficiency low. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide an image processing method and a processing device, which can simplify the steps of overlay image processing and improve processing efficiency.
[0005] In a first aspect, an embodiment of the present application provides an image processing method, which is performed by an electronic device, the electronic device including a folding screen, and the image processing method includes:
[0006] When the electronic device is playing the target video, receiving a folding operation on the folding screen;
[0007] In response to the folding operation, a first interface and a second interface are displayed in split screen, wherein the first interface includes a target video and the second interface includes an overlay image; wherein the overlay image is generated based on a target video frame of the target video.
[0008] In a second aspect, an embodiment of the present application provides an image processing device, which is applied to an electronic device, wherein the electronic device includes a folding screen, and the image processing device includes:
[0009] A receiving module, used for receiving a folding operation on the folding screen when the electronic device is playing a target video;
[0010] The display module is used to display a first interface and a second interface in split screen in response to a folding operation, wherein the first interface includes a target video and the second interface includes an overlay image; wherein the overlay image is generated based on a target video frame of the target video.
[0011] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein the memory stores programs or instructions that can be executed on the processor, and when the programs or instructions are executed by the processor, the steps of the method of the first aspect are implemented.
[0012] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.
[0013] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the steps of the method of the first aspect.
[0014] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method of the first aspect.
[0015] In an embodiment of the present application, utilizing the characteristics of a foldable screen electronic device, when the foldable screen electronic device is playing a target video, if a folding operation of the foldable screen by the user is detected, the display content of the current electronic device is split-screen, specifically, the first interface and the second interface are displayed in split-screen, and based on the time point when the split-screen operation is received, the target video frame of the currently playing video is started to be acquired.
[0016] The electronic device continues to play the video in the first interface after the split screen, and displays the overlay image automatically generated according to the acquired target video frame in the second interface after the split screen. Therefore, the user does not need to manually take screenshots of the video frames, nor does the user need to process the video frames through image editing software. The operating steps for generating the overlay image are optimized and the image processing efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A flowchart of an image processing method according to an embodiment of the present application is shown;
[0018] Figure 2 A schematic diagram of an overlay image in an image processing method according to an embodiment of the present application is shown;
[0019] Figure 3 A schematic diagram of the structure of an electronic device according to an embodiment of the present application is shown;
[0020] Figure 4 One of the interface schematic diagrams of an electronic device according to an embodiment of the present application is shown;
[0021] Figure 5 A second schematic diagram of an interface of an electronic device according to an embodiment of the present application is shown;
[0022] Figure 6 A structural block diagram of an image processing device according to an embodiment of the present application is shown;
[0023] Figure 7 A structural block diagram of an electronic device according to an embodiment of the present application is shown;
[0024] Figure 8 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0025] Reference numerals:
[0026] 300 electronic device, 302 first folding body, 304 second folding body. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0028] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0029] The image processing method and processing device provided in the embodiments of the present application are described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0030] In some embodiments of the present application, an image processing method is provided, the method being executed by an electronic device, the electronic device comprising a folding screen, Figure 1 A flowchart of an image processing method according to an embodiment of the present application is shown. Figure 1 As shown, the image processing method includes:
[0031] Step 102, when the electronic device is playing the target video, receiving a folding operation on the folding screen;
[0032] Step 104, in response to the folding operation, displaying a first interface and a second interface in split screen, wherein the first interface includes the target video and the second interface includes an overlay image;
[0033] The overlay image is generated according to the target video frame of the target video.
[0034] In an embodiment of the present application, a superimposed image refers to an image formed by stacking multiple frames of images. For a video with subtitles, multiple video frames of the video with subtitles are stacked in order of their sequence in the timeline of the video, with the earliest video frame being stacked at the bottom and the latest video frame being stacked at the top.
[0035] Specifically, Figure 2 A schematic diagram of an overlay image in an image processing method according to an embodiment of the present application is shown, Figure 2 As shown, three video frames are stacked, and the image content of the stacked overlay image includes the frame image content of the third video frame and the subtitle content of the three video frames. Specifically, the frame image content displayed in the overlay image can be the frame image content of any one of the three video frames.
[0036] The electronic device is specifically an electronic device with a folding screen, such as a folding screen mobile phone. Figure 3 A schematic diagram of the structure of an electronic device according to an embodiment of the present application is shown. Figure 3 As shown, the electronic device 300 includes a first folding body 302 and a second folding body 304. When the electronic device 300 is in an unfolded state, the angle between the first folding body 302 and the second folding body 304 is 180°, that is, the screens of the first folding body and the second folding body can form a screen to display content, and when the electronic device 300 is folded, the angle between the first folding body and the second folding body is less than 180°.
[0037] Figure 4 FIG. 1 shows one of the interface schematic diagrams of an electronic device according to an embodiment of the present application, such as Figure 4 As shown, the electronic device 400 displays a video playback interface 402 , and video playback content including a target video is played in the video playback interface 402 .
[0038] During the video playback, when receiving a folding input from the user to the electronic device 400, the electronic device 400 splits the screen into a first interface 404 and a second interface 406. The first interface 404 is used to continue playing the target video, and the second interface 406 displays an overlay image generated according to the target video frame.
[0039] It can be understood that the folding input of the electronic device at this time is not a completely folding input, that is, the two screens of the electronic device are still facing the user and can both display content.
[0040] Specifically, when receiving a folding operation from the user, the electronic device starts split-screen display and simultaneously starts acquiring video frames of the target video currently being played. In some embodiments, after receiving the folding operation, the electronic device collects all video frames of the target video being played and merges video frames with the same content, so that the display content in the collected video frames is different.
[0041] In other embodiments, after receiving a folding operation from the user, the electronic device starts collecting video frames from the current moment and identifies the subtitle part in the video frames in real time. Whenever the subtitle changes, a video frame is collected, thereby obtaining video frames corresponding to different subtitles.
[0042] After acquiring the video frames, the electronic device performs an overlay process on the video frames. Specifically, the video frames are stacked up in the acquisition order of the video frames, and the subtitle part of each video frame is exposed. The final overlay image is as follows: Figure 2 As shown, the overlay image is displayed in the third interface, so that the user can preview the generated overlay image in real time.
[0043] The embodiments of the present application can automatically acquire video frames of the video being played according to the user's folding operation of the folding screen, and automatically generate an overlay image based on the acquired video frames. Therefore, the user does not need to manually take screenshots of the video frames, nor does the user need to process the video frames through image editing software. This simplifies the operating steps for generating overlay images and improves image processing efficiency.
[0044] In some embodiments of the present application, in response to the folding operation, the first interface and the second interface are displayed in split screen, specifically including:
[0045] In response to the folding operation, the first interface, the second interface and the third interface are displayed in split screen, and the third interface is used to display N video frames of the target video, the N video frames include the target video frame, and N is a positive integer.
[0046] In the embodiments of the present application, Figure 5 A second schematic diagram of an interface of an electronic device according to an embodiment of the present application is shown. Figure 5 As shown, after the user folds the folding screen, the electronic device 500 displays the first interface 502, the second interface 504 and the third interface 506 in split screen.
[0047] The first interface 502 continues to play the target video, the second interface 504 displays the overlay image generated according to the acquired N target video frames, and the third interface 506 displays the acquired N target video frames.
[0048] In some implementations, all N acquired target video frames are displayed in the third interface 506. In other implementations, the third interface 506 displays the latest acquired target video frame, and the user can switch the target video frame displayed in the third interface 506 by sliding input.
[0049] The overlay image displayed in the second interface 504 may be dynamically generated, that is, whenever the electronic device acquires a new target video frame, the target video frame is immediately stacked with the currently displayed overlay image to form a new overlay image. The user may preview the current status of the overlay image in real time through the second interface 504.
[0050] In some embodiments, the user can edit the overlay image in real time through the second interface 504 and the third interface 506, such as deleting a target video frame A in the second interface 504, thereby removing the content corresponding to the target video frame A in the overlay image. The user can also adjust the order of the video frames in the second interface 504 to adjust the stacking order of the video frames in the overlay image.
[0051] The embodiment of the present application displays the acquired video frames and overlay images separately, so that the user can grasp the generation status of the overlay images at any time, and edit and adjust the video frames and the generated overlay images in real time, thereby improving the freedom of image processing.
[0052] In some embodiments of the present application, the operation time of the folding operation corresponds to the first playback time point of the target video;
[0053] After receiving a folding operation on the folding screen, the image processing method further includes:
[0054] When a first unfolding operation on the folding screen is received, determining a second playback time point of the target video according to the operation time of the first unfolding operation;
[0055] In the case where the first expansion operation is not received, determining a second playback time point according to the current time;
[0056] The N video frames are all video frames of the target video between the first playback time point and the second playback time point.
[0057] In an embodiment of the present application, when the user performs a folding operation on the folding screen, the playback progress of the target video at the moment the folding operation is received is recorded as the first playback time point. The electronic device takes the first playback time point as the starting point and begins to acquire each video frame in the playback process of the target video as the target video frame.
[0058] The above-mentioned folding operation is an operation of folding the folding angle of the folding screen to a value less than or equal to the first angle threshold and greater than or equal to the second angle threshold. For example, the folding operation is an operation of folding the folding angle of the folding screen to a value less than or equal to 145° and greater than or equal to 90°. Therefore, it can be understood that the folded folding screen is not in a completely folded state, and content can be displayed on both screens and can be seen by the user.
[0059] If after receiving the user's folding operation on the folding screen, the user receives the first unfolding operation on the folding screen, the playback progress of the target video at the moment when the first unfolding operation is received is recorded as the second playback time point, and the electronic device takes the second playback time point of the target video as the end point for obtaining the target video frame, that is, the electronic device obtains all video frames of the target video between the time point when the folding operation is received and the time point when the first unfolding operation is received, and uses them as the target video frame.
[0060] If after receiving the user's folding operation on the folding screen, the user's first unfolding operation has not been received, the current playback progress of the current target video is used as the second playback time point. That is to say, if the target video is in a playback state, the playback progress of the target video is followed, and all video frames of the target video from the first playback time point to the current second playback time point are obtained in real time and used as the target video frames.
[0061] It can be understood that if the user pauses the target video, the second playback time point is the time point when the pause operation is received, that is, the target video frame is all video frames between the first playback time point when the fold operation is received and the second playback time point when the pause operation is received.
[0062] The first unfolding operation is to unfold the folding angle of the folding screen to a value greater than the first angle threshold. As in the above example, the first unfolding operation is to unfold the folding screen to 150°. It can be further understood that the first unfolding operation will not put the folding screen in a fully unfolded state, that is, the folding angle of the folding screen is not 180°.
[0063] The embodiment of the present application controls the number of video frames acquired by the electronic device according to the user's folding operation and the first unfolding operation of the folding screen, thereby eliminating the need for the user to manually take screenshots of the video frame by frame, thereby improving the efficiency of image processing.
[0064] In some embodiments of the present application, before displaying the first interface and the second interface in split screen in response to the folding operation, the image processing method further includes:
[0065] In the case where the contents of the N video frames include subtitles, M video frame groups are determined from the N video frames, wherein the subtitles of the video frames in each of the M video frame groups are the same;
[0066] Determine a target video frame in each of the M video frame groups to obtain M target video frames;
[0067] An overlay image is generated according to the M target video frames, wherein display content of the overlay image includes M subtitles corresponding to the M target video frames.
[0068] In the embodiment of the present application, the target video includes subtitles, and the contents of the N acquired video frames also include subtitles. The subtitles can be located at the bottom of the video screen of the target video, or at the top of the video screen of the target video. Taking the subtitles at the bottom of the video screen of the target video as an example, a detailed example is given as follows:
[0069] After receiving the user's folding operation, the electronic device starts to obtain the video frames of the target video being played. It can be understood that the video simulates the effect of the picture "moving" by continuously switching the video frames at a certain frame rate. Taking a video with a frame rate of 24 frames as an example, it is to quickly switch and display 24 consecutive video frames within 1 second, and the display time of each video frame is 1 / 24 second.
[0070] When acquiring video frames, the electronic device will acquire all of these video frames. For example, the time between the first playback time point corresponding to the user's folding operation and the second playback time point corresponding to the first expansion operation is 3 seconds, then the electronic device collects a total of 3×24=72 video frames, that is, N=72.
[0071] Since some of the 72 video frames have the same or similar contents, the embodiment of the present application screens the target video frames based on the subtitle contents in each target video frame, and determines M video frame groups with different subtitles, where the M video frame groups correspond to M different subtitles, that is, the subtitles corresponding to the video frames in each video frame group are the same, and the subtitles corresponding to different video frame groups are different. Furthermore, one video frame can be determined from each of the M video frame groups as the target video frame, and an overlay image can be generated based on the M target video frames.
[0072] For example, among the 72 video frames, the subtitle contents of frames 1 to 24 are all first subtitles, the subtitle contents of frames 25 to 48 are all second subtitles, and the subtitle contents of frames 49 to 72 are all third subtitles. In the above implementation, the 72 video frames are divided into three groups according to the subtitle contents, that is, M=3. Specifically, frames 1 to 24 are the first group of video frames, frames 25 to 48 are the second group of video frames, and frames 49 to 72 are the third group of video frames.
[0073] Furthermore, in some embodiments, the 1st frame, the 25th frame, and the 49th frame may be respectively determined as target video frames in each group of video frames, and an overlay image may be generated based on these three video frames.
[0074] In other embodiments, image recognition technology can be used to select the clearest video frame from the 1st to the 24th frames as the first target video frame for generating the overlay image. Similarly, the clearest frame from the 25th to the 48th frames and from the 49th to the 72nd frames can be selected as the target video frame for generating the overlay image.
[0075] The embodiment of the present application filters the N acquired video frames to select M target video frames with different subtitle contents, and generates an overlay image through these target video frames with different subtitle contents, which can effectively reduce the repeated content in the generated overlay image.
[0076] In some embodiments of the present application, the image processing method further includes:
[0077] Receiving a second unfolding operation on the folding screen;
[0078] In response to the second expansion operation, the split-screen display of the first interface and the second interface is canceled, and the fourth interface is displayed in full screen, wherein the display content of the fourth interface includes at least one of the following:
[0079] Overlay image, target video.
[0080] In the embodiment of the present application, the second unfolding operation of the folding screen is specifically an operation of fully unfolding the folding screen. It can be understood that the second unfolding operation can specifically be an operation of unfolding the folding screen to a folding angle of 180°.
[0081] Specifically, an electronic device with a foldable screen is generally provided with a lock. When the foldable screen of the electronic device is fully unfolded, the lock will lock the folding angle of the foldable screen, and the electronic device will become a large-screen device similar to a tablet computer. The second unfolding operation can be an operation of unfolding the foldable screen of the electronic device to a locked state.
[0082] When a first interface and a second interface are displayed in a split screen in an electronic device, if the user's expand operation is received, it means that the user has determined that the overlay image currently displayed in the second interface is the overlay image that the user wants. At this time, the electronic device is folded and fully unfolded to cancel the split screen of the electronic device, that is, cancel the split screen display of the first interface and the second interface, and display the fourth interface in full screen.
[0083] In the displayed fourth interface, the finally generated overlay image can be displayed, or the target video can continue to be played, and the overlay image can be further saved directly. The user can freely set the display content of the fourth interface, and can also switch the content currently displayed on the fourth interface through user input. For example, when the overlay image is displayed on the fourth interface, if the user's switching input is received, the target video will continue to be played in the fourth interface.
[0084] It is understandable that when the overlay image is displayed through the fourth interface, the target video may be in a paused state or may continue to play in the background, and the embodiment of the present application does not impose any limitation on this.
[0085] The embodiment of the present application quickly ends the overlay processing of the target video through the second unfolding operation of the folding screen by the user, and can display the finally generated overlay image on a large screen or save the overlay image, so that when the overlay image that satisfies the user is obtained, the overlay image can be saved.
[0086] In some embodiments of the present application, for example, when a user encounters a wonderful clip while playing a target video through an electronic device, the user can bend and fold the phone screen to perform a folding input, thereby triggering the electronic device to generate an overlay image.
[0087] At this time, the electronic screen automatically splits into left and right, with the left side being the video playback area and the right side being the overlay preview area. At this time, the subtitle changes of each frame of the video will be detected in real time, and the video frames with subtitle changes will be automatically captured and saved as framed images. In the upper half of the right split screen, each captured video frame will be displayed in real time, and the user can manually drag and drop to delete, replace or change the order of some video frames. The lower half of the right split screen displays the overlay image automatically generated by the video frames in the upper half area, and each frame of the image is overlaid in a user-defined manner, such as in the order of the timeline.
[0088] Specifically, the spacing of the overlay image display can be manually set by the user. If the user does not set it, it is automatically set with a default spacing.
[0089] When the generated overlay image is not clear or does not meet the user's needs, the user can delete some unclear video frames from the upper half of the right split screen. Specifically, when the user's finger stays on a certain video frame, the video frame will be automatically enlarged and displayed to facilitate the user to view and select.
[0090] When the user needs to add or insert a new image into the previewed overlay image, he can long press the video playback area, select the currently playing video frame, and directly add it to the previewed overlay image. At this time, the system will automatically update the previewed overlay image according to the time sequence of each video frame.
[0091] After the user has finished editing the overlay image, that is, after the user has obtained a satisfactory overlay image, the folding screen can be restored to the unfolded state, and the current page can be exited, and the overlay image can be displayed in full screen. Thus, the user can directly forward and share the overlay image or continue to edit it. At this time, the user can long press the image and swipe up to exit the current image viewing page and resume full-screen video playback.
[0092] The image processing method provided in the embodiment of the present application can be executed by an image processing device. In the embodiment of the present application, the image processing device provided in the embodiment of the present application is described by taking the method for executing image processing by an image processing device as an example.
[0093] In some embodiments of the present application, an image processing device is provided, which is applied to an electronic device, wherein the electronic device includes a folding screen. Figure 6 FIG. 4 shows a structural block diagram of an image processing device according to an embodiment of the present application. Figure 6 As shown, the image processing device 600 includes:
[0094] A receiving module 602 is used to receive a folding operation on the folding screen when the electronic device is playing a target video;
[0095] The display module 604 is used to display a first interface and a second interface in split screen in response to a folding operation, wherein the first interface includes a target video and the second interface includes an overlay image; wherein the overlay image is generated based on a target video frame of the target video.
[0096] The embodiment of the present application can automatically acquire video frames of the video being played according to the user's folding operation of the folding screen, and automatically generate an overlay image based on the acquired video frames. Therefore, the user does not need to manually take screenshots of the video frames, nor does the user need to process the video frames through image editing software. The operating steps for generating the overlay image are optimized, and the image processing efficiency is improved.
[0097] In some embodiments of the present application, the display module is specifically used to display the first interface, the second interface and the third interface in split screen in response to a folding operation, and the third interface is used to display N video frames of the target video, the N video frames include the target video frame, and N is a positive integer.
[0098] The embodiment of the present application displays the acquired video frames and overlay images separately, so that the user can grasp the generation status of the overlay images at any time, and edit and adjust the video frames and the generated overlay images in real time, thereby improving the freedom of image processing.
[0099] In some embodiments of the present application, the operation time of the folding operation corresponds to the first playback time point of the target video;
[0100] The image processing device further includes a determining module, configured to:
[0101] When a first unfolding operation on the folding screen is received, determining a second playback time point of the target video according to the operation time of the first unfolding operation;
[0102] In the case where the first expansion operation is not received, determining a second playback time point according to the current time;
[0103] The N video frames are all video frames of the target video between the first playback time point and the second playback time point.
[0104] The embodiment of the present application controls the electronic device to obtain video frames according to the user's folding and unfolding operations on the folding screen, so there is no need for the user to manually take screenshots of the video frame by frame, which simplifies the image processing steps of the superimposed image and improves the efficiency of image processing.
[0105] In some embodiments of the present application, the determination module is further configured to, when the content of the N video frames includes subtitles, determine M video frame groups in the N video frames, wherein the subtitles of the video frames in each of the M video frame groups are the same; and determine a target video frame in each of the M video frame groups to obtain M target video frames;
[0106] The image processing device also includes:
[0107] A generating module is used to generate an overlay image according to M target video frames, wherein the display content of the overlay image includes M subtitles corresponding to the M video frames.
[0108] The embodiment of the present application filters the acquired target video frames to select M target video frames with different subtitle contents, and generates an overlay image through these target video frames with different subtitle contents. This can effectively reduce the repeated content in the acquired video frames and the generated overlay image, facilitate user operation, and improve image processing efficiency.
[0109] In some embodiments of the present application, the receiving module is further used to receive a second unfolding operation on the folding screen;
[0110] The display module is further configured to, in response to the second expansion operation, cancel the split-screen display of the first interface and the second interface, and display the fourth interface in full screen, wherein the display content of the fourth interface includes at least one of the following:
[0111] Overlay image, target video.
[0112] The embodiment of the present application ends the processing of the overlay image by the user unfolding the folding screen, and displays the final overlay image on the large screen. At the same time, after the user exits the processing interface, the playback of the original video is automatically restored, thereby reducing the user's operation steps.
[0113] The image processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0114] The image processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0115] The image processing device provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and will not be described again here to avoid repetition.
[0116] Optionally, an embodiment of the present application further provides an electronic device, Figure 7 A structural block diagram of an electronic device according to an embodiment of the present application is shown. Figure 7 As shown, the electronic device 700 includes a processor 702, a memory 704, and a program or instruction stored in the memory 704 and executable on the processor 702. When the program or instruction is executed by the processor 702, each process of the above-mentioned method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0117] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0118] Figure 8 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0119] The electronic device 800 includes but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, a processor 810 and other components.
[0120] Those skilled in the art will appreciate that the electronic device 800 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 810 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0121] The processor 810 is configured to receive a folding operation on the folding screen when the electronic device is playing a target video;
[0122] The display unit 806 is used to display a first interface and a second interface in split screen in response to a folding operation, wherein the first interface includes a target video and the second interface includes an overlay image; wherein the overlay image is generated based on a target video frame of the target video.
[0123] The embodiment of the present application can automatically acquire video frames of the video being played according to the user's folding operation of the folding screen, and automatically generate an overlay image based on the acquired video frames. Therefore, the user does not need to manually take screenshots of the video frames, nor does the user need to process the video frames through image editing software. The operating steps for generating the overlay image are optimized, and the image processing efficiency is improved.
[0124] Optionally, the display unit 806 is specifically used to display the first interface, the second interface and the third interface in split screen in response to the folding operation, and the third interface is used to display N video frames of the target video, the N video frames include the target video frame, and N is a positive integer.
[0125] The embodiment of the present application displays the acquired video frames and overlay images separately, so that the user can grasp the generation status of the overlay images at any time, and edit and adjust the video frames and the generated overlay images in real time, thereby improving the freedom of image processing.
[0126] Optionally, the operation time of the folding operation corresponds to the first playback time point of the target video;
[0127] The processor 810 is further configured to, when receiving a first unfolding operation on the folding screen, determine a second playback time point of the target video according to an operation time of the first unfolding operation;
[0128] In the case where the first expansion operation is not received, determining a second playback time point according to the current time;
[0129] The N video frames are all video frames of the target video between the first playback time point and the second playback time point.
[0130] The embodiment of the present application controls the electronic device to obtain video frames according to the user's folding and unfolding operations on the folding screen, so there is no need for the user to manually take screenshots of the video frame by frame, which simplifies the image processing steps of the superimposed image and improves the efficiency of image processing.
[0131] Optionally, the processor 810 is further used to, when the content of N video frames includes subtitles, determine M video frame groups among the N video frames, wherein the subtitles of the video frames in each of the M video frame groups are the same; determine a target video frame in each of the M video frame groups to obtain M target video frames; and a generation module is used to generate an overlay image based on the M target video frames, wherein the display content of the overlay image includes M subtitles corresponding to the M video frames.
[0132] The embodiment of the present application filters the acquired target video frames to select M target video frames with different subtitle contents, and generates an overlay image through these target video frames with different subtitle contents. This can effectively reduce the repeated content in the acquired video frames and the generated overlay image, facilitate user operation, and improve image processing efficiency.
[0133] Optionally, the processor 810 is further configured to receive a second unfolding operation on the folding screen;
[0134] The display unit 806 is further configured to cancel the split-screen display of the first interface and the second interface in response to the second expansion operation, and display the fourth interface in full screen, wherein the display content of the fourth interface includes at least one of the following:
[0135] Overlay image, target video.
[0136] The embodiment of the present application ends the processing of the overlay image by the user unfolding the folding screen, and displays the final overlay image on the large screen. At the same time, after the user exits the processing interface, the playback of the original video is automatically restored, thereby reducing the user's operation steps.
[0137] It should be understood that in the embodiment of the present application, the input unit 804 may include a graphics processor (Graphics Processing Unit, GPU) 8041 and a microphone 8042, and the graphics processor 8041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 807 includes a touch panel 8071 and at least one of other input devices 8072. The touch panel 8071 is also called a touch screen. The touch panel 8071 may include two parts: a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0138] The memory 809 can be used to store software programs and various data. The memory 809 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 809 may include a volatile memory or a non-volatile memory, or the memory 809 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 809 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0139] The processor 810 may include one or more processing units; optionally, the processor 810 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 810.
[0140] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0141] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0142] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0143] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0144] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0145] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0146] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0147] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An image processing method, executed by an electronic device, characterized in that: The electronic device includes a folding screen, and the image processing method includes: When the electronic device is playing a target video, receiving a folding operation on the folding screen; The operation time of the folding operation corresponds to the first playback time point of the target video; When a first unfolding operation on the folding screen is received, determining a second playback time point of the target video according to the operation time of the first unfolding operation; In the case where the first expansion operation is not received, determining the second playback time point according to the current time; The N video frames are all video frames of the target video between the first playback time point and the second playback time point, the N video frames include the target video frame, and N is a positive integer; In a case where the contents of the N video frames include subtitles, determining M video frame groups from the N video frames, wherein the subtitles of the video frames in each of the M video frame groups are the same; Determine one target video frame in each of the M video frame groups to obtain M target video frames; generating an overlay image according to the M target video frames, wherein display content of the overlay image includes M subtitles corresponding to the M target video frames; In response to the folding operation, a first interface and a second interface are displayed in split screen, wherein the first interface includes the target video and the second interface includes the overlay image; wherein the overlay image is generated based on the target video frame of the target video.
2. The image processing method according to claim 1, characterized in that: In response to the folding operation, the first interface and the second interface are displayed in split screen, specifically including: In response to the folding operation, the first interface, the second interface and the third interface are displayed in split screens, and the third interface is used to display N video frames of the target video.
3. The image processing method according to claim 1 or 2, characterized in that: Also includes: receiving a second unfolding operation on the folding screen; In response to the second expansion operation, the split-screen display of the first interface and the second interface is canceled, and the fourth interface is displayed in full screen, wherein the display content of the fourth interface includes at least one of the following: The overlay image and the target video.
4. An image processing device, applied to an electronic device, characterized in that: The electronic device includes a folding screen, and the image processing device includes: A receiving module, configured to receive a folding operation on the folding screen when the electronic device is playing a target video; The operation time of the folding operation corresponds to the first playback time point of the target video; The image processing device further includes a determining module, configured to: When a first unfolding operation on the folding screen is received, determining a second playback time point of the target video according to the operation time of the first unfolding operation; In the case where the first expansion operation is not received, determining the second playback time point according to the current time; The N video frames are all video frames of the target video between the first playback time point and the second playback time point, the N video frames include the target video frame, and N is a positive integer; The determining module is further configured to, when the contents of the N video frames include subtitles, determine M video frame groups among the N video frames, wherein the subtitles of the video frames in each of the M video frame groups are the same; and Determine one target video frame in each of the M video frame groups to obtain M target video frames; The image processing device further comprises: A generating module, configured to generate an overlay image according to the M target video frames, wherein the display content of the overlay image includes M subtitles corresponding to the M video frames; The display module is used to display a first interface and a second interface in split screen in response to the folding operation, wherein the first interface includes the target video and the second interface includes the overlay image; wherein the overlay image is generated based on the target video frame of the target video.
5. The image processing device according to claim 4, characterized in that: The display module is specifically used to display the first interface, the second interface and the third interface in split screen in response to the folding operation, and the third interface is used to display N video frames of the target video.
6. The image processing device according to claim 4 or 5, characterized in that: The receiving module is further used to receive a second unfolding operation on the folding screen; The display module is further configured to, in response to the second expansion operation, cancel the split-screen display of the first interface and the second interface, and display a fourth interface in full screen, wherein display content of the fourth interface includes at least one of the following: The overlay image and the target video.
Citation Information
Patent Citations
Information processing method and electronic device
CN104572004A
Screen shot method and device and terminal
CN107765952A