Video playback method and apparatus, and electronic device
By dynamically adjusting the pane area according to the video resolution of the camera device, the problem of low matching between the video and the playback area in multi-channel video playback is solved, and a more efficient video playback effect is achieved.
Patent Information
- Application Number
- PCT/CN2024/093063
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-29
- Filing Date
- 2024-05-14
- Publication Date
- 2025-07-03
AI Technical Summary
In the prior art, when playing multi-channel video, the matching degree between the video and the playback area is low, resulting in poor playback effect.
By determining the size of the video playback window and the video resolution of the camera device, dynamically adjust the pane area to ensure that the pane area of each camera device is consistent with its video resolution, and custom window opening technology is used to improve matching.
It improves the effect of video playback, reduces picture distortion, and improves the utilization rate of video playback window.
Smart Images

Figure CN2024093063_03072025_PF_FP_ABST
Abstract
Description
Video playback method, device and electronic equipment
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application No. 2023118568653, filed on December 29, 2023, entitled “Video Playback Method and Device,” which is incorporated herein by reference in its entirety. Technical Field
[0003] The present application relates to the field of video display technology, and in particular to a video playback method, device, and electronic device. Background Art
[0004] The video playback system supports multi-channel video playback function, that is, the images captured by multiple cameras are played simultaneously in one video playback window.
[0005] Multi-channel video playback requires splitting the video playback window to determine the playback area corresponding to each camera device for playback. Current split-screen methods primarily divide the video playback window evenly or in fixed intervals. However, this split-screen approach results in poor alignment between the video and the corresponding playback area, resulting in poor playback quality.
[0006] Summary of the Invention
[0007] The present application provides a video playback method, device, and electronic device to solve the problem of poor playback effect caused by low matching between the video and the corresponding playback area.
[0008] In a first aspect, the present application provides a video playback method, comprising:
[0009] Determining the size of a video playback window and the resolution of videos captured by at least two camera devices respectively playing videos through the video playback window;
[0010] Determining, from the video playback window, respective pane areas of the at least two camera devices based on respective video resolutions captured by the at least two camera devices and a size of the video playback window;
[0011] In each of the pane areas, the video shot by the corresponding camera device is played.
[0012] In a second aspect, the present application provides a video playback device, comprising:
[0013] a determination module configured to determine a size of a video playback window and a video resolution captured by at least two camera devices respectively playing a video through the video playback window;
[0014] a processing module configured to determine, from the video playback window, respective pane areas of the at least two camera devices based on resolutions of the videos captured by the at least two camera devices and a size of the video playback window;
[0015] The playback module is configured to play the video shot by the corresponding camera device in each of the window pane areas.
[0016] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the video playback method as described in any one of the first aspects is implemented.
[0017] The video playback method, device and electronic device provided in the present application first determine the size of the video playback window and the video resolution captured by at least two camera devices that play videos through the video playback window. Then, based on the video resolution captured by at least two camera devices and the size of the video playback window, the respective window pane areas of at least two camera devices are determined from the video playback window, and the video captured by the corresponding camera device is played in each window pane area. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The following will introduce the drawings required for the description of the embodiments. The drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] FIG1 is a schematic diagram showing a comparison of two playback modes in a corridor mode;
[0020] FIG2 is a flow chart of a video playback method provided in an embodiment of the present application;
[0021] FIG3 is a flowchart of determining a window pane area of a camera device according to an embodiment of the present application;
[0022] FIG4 is a flowchart of determining a window layout area of a first type of camera device according to an embodiment of the present application;
[0023] FIG5 is a first schematic diagram of a window layout area provided in an embodiment of the present application;
[0024] FIG6 is a second schematic diagram of a window layout area provided in an embodiment of the present application;
[0025] FIG7 is a flowchart of determining a window layout area for a second type of camera device according to an embodiment of the present application;
[0026] FIG8 is a schematic diagram of a layout area provided in an embodiment of the present application;
[0027] FIG9 is a schematic diagram of stretching a window layout area of a first type of camera device according to an embodiment of the present application;
[0028] FIG10 is a schematic diagram of determining a window layout area of a second type of camera device according to an embodiment of the present application;
[0029] FIG11 is a schematic diagram of determining a window layout area of a seventh camera device according to an embodiment of the present application;
[0030] FIG12 is a schematic structural diagram of a video playback device provided in an embodiment of the present application;
[0031] FIG13 is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The technical solutions in this application will be described below in conjunction with the drawings in this application. The described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0033] First, the basic concepts involved in the embodiments of the present application are introduced.
[0034] Full-ratio playback: The video playback ratio is determined by the size of the corresponding window area, that is, the live video screen fills the entire window area.
[0035] Play in proportion: Ignore the aspect ratio of the corresponding pane area, and play the video according to the proportion of the actual playback channel.
[0036] In places like airports, subways, and hospitals, the large number of cameras installed necessitates the need to play videos captured by multiple cameras within a single video playback window. In multi-channel video playback scenarios, the video playback window needs to be split. Currently, there are two main ways to split the video playback window: the first is to evenly or fixedly divide the video playback window, and the second is to determine the layout of each video by cropping and stretching the video.
[0037] Uniform partitioning divides the video playback window into equal sections, creating several equally sized panes for playing videos from different cameras. Fixed partitioning pre-sets the video playback window's partitioning method, creating fixed panes for playing videos from different cameras. Therefore, neither uniform nor fixed partitioning can dynamically divide the panes as video channels change, and the degree of match between the panes and the video is low. Cropping and stretching videos can also affect the original aspect ratio, causing corresponding image distortion.
[0038] FIG1 is a schematic diagram comparing two playback modes in a corridor mode. As shown in FIG1 , taking the video playback in the corridor mode as an example, due to the low matching degree between the pane area and the video, the utilization rate of the pane area is low in the case of proportional playback, and in the case of full-scale playback, the display image is severely distorted.
[0039] Based on this, an embodiment of the present application provides a video playback method that, in a multi-channel video playback scenario, implements customized windowing based on the resolution of the camera device, so that the window area is more compatible with the video captured by the camera device, thereby improving the video playback effect. The following describes the solution of the embodiment of the present application with reference to the accompanying drawings.
[0040] FIG2 is a flow chart of a video playback method provided in an embodiment of the present application. As shown in FIG2 , the method includes:
[0041] S21, determining the size of the video playback window and the resolution of the videos captured by at least two camera devices respectively playing the video through the video playback window.
[0042] The video playback window is used to play videos shot by at least two camera devices. The size of the video playback window may include the horizontal size and the vertical size of the video playback window.
[0043] In some embodiments, when the video playback window is a playback window of video playback software, the size of the video playback window can be determined based on the display resolution of the corresponding video playback device and the operating mode of the video playback software. For example, the operating modes of the video playback software include full-screen mode and downward restore mode. In full-screen mode, the video playback window fills the display interface of the video playback device, so the size of the video playback window can be obtained based on the display resolution of the video playback device; in downward restore mode, the video playback window does not fill the display interface of the video playback device, so the size of the video playback window needs to be determined in combination with the display resolution of the video playback device and the downward restore mode.
[0044] The camera device is used to capture the corresponding video. The camera device may include, for example, a fisheye camera, a dome camera, a quad camera, a tube camera, and the like, which is not limited in the present embodiment. Each camera device has a video resolution during the capture process. The video resolution captured by the camera device may include a horizontal video resolution and a vertical video resolution. The horizontal video resolution indicates the number of pixels in the horizontal direction of the video captured by the corresponding camera device, and the vertical video resolution indicates the number of pixels in the vertical direction of the video captured by the corresponding camera device.
[0045] S22: Determine the respective pane areas of the at least two camera devices from the video playback window based on the resolutions of the videos captured by the at least two camera devices and the size of the video playback window.
[0046] After obtaining the video resolution captured by each camera device, the window area of each camera device can be determined in the video playback window based on the video resolution captured by each camera device and the size of the video playback window. For each camera device, the window area of the camera device is the area used by the camera device to play the captured video in the video playback window. Because the window area of the camera device is determined based on the video resolution captured by the camera device, the size of the window area of the camera device is highly compatible with the video resolution captured by the camera device, which can improve the utilization rate of the video playback window while ensuring that the image is not excessively distorted.
[0047] S23: In each window pane area, play the video captured by the corresponding camera device.
[0048] After the window pane area of each camera device is determined, the video shot by the corresponding camera device can be played in each window pane area.
[0049] The video playback method provided in an embodiment of the present application first determines the size of the video playback window and the video resolution captured by at least two camera devices that play videos through the video playback window, and then determines the window pane area of at least two camera devices from the video playback window based on the video resolution captured by at least two camera devices and the size of the video playback window, and plays the video captured by the corresponding camera device in each window pane area. Since the window pane area of each camera device is determined based on the video resolution captured by the camera device and the size of the video playback window, the video captured by the camera device can be more adapted to the window pane area of the camera device, thereby improving the video playback effect.
[0050] Based on any of the above embodiments, the solutions of the embodiments of the present application are further introduced below with reference to the accompanying drawings.
[0051] FIG3 is a flow chart of determining a window pane area of a camera device according to an embodiment of the present application, as shown in FIG3 , including:
[0052] S31 : For each camera device, determine the size type of the image captured by the camera device based on the resolution of the video captured by the camera device.
[0053] After obtaining the video resolution captured by each camera device, the image size type captured by each camera device can be determined based on the horizontal resolution and vertical resolution of the video captured by each camera device. The image size type includes a first image size type and a second image size type. The first image size type is when the horizontal resolution of the video captured by the camera device is less than or equal to the vertical resolution of the video (referred to as type A in the following embodiment), and the second image size type is when the horizontal resolution of the video captured by the camera device is greater than the vertical resolution of the video (referred to as type B in the following embodiment); or the first image size type is type B and the second image size type is type A.
[0054] For any camera device, after obtaining the video resolution shot by the camera device, the size type of the video image shot by the camera device can be determined by comparing the horizontal resolution and vertical resolution of the video shot by the camera device.
[0055] S32: Determine window layout areas of the at least two camera devices in the layout area corresponding to the video playback window based on the resolution and image size type of the videos captured by the at least two camera devices.
[0056] Each camera device may be classified based on its image size type. Specifically, if one of at least two cameras has an image size type of a first image size type, it is determined to be a first-type camera device; and if one of at least two cameras has an image size type of a second image size type, it is determined to be a second-type camera device.
[0057] After each camera device is classified, the window layout areas of the at least two camera devices can be determined based on the resolution of the videos shot by the at least two camera devices and the types of the camera devices.
[0058] In one possible implementation, the at least two camera devices include at least one first-type camera device, which is a camera device that captures images of a first image size type. After obtaining the video resolution captured by each of the at least one first-type camera devices, the window layout area of each of the at least one first-type camera devices is determined within the layout area, starting from a first position of the layout area corresponding to the video playback window, in descending order of vertical resolution of the videos captured by the at least one first-type camera device.
[0059] In an embodiment of the present application, the window layout areas are arranged in descending order according to the vertical resolution of the videos shot by at least one first-type camera device, which is conducive to the reasonable distribution of the display area of the camera device, reducing display deformation or distortion, and improving the display effect.
[0060] FIG4 is a flowchart of determining a window layout area of a first type of camera device according to an embodiment of the present application, as shown in FIG4 , including:
[0061] S41 : Determine a window layout area of a first camera device that captures videos with the maximum vertical resolution among at least one first-type camera device, wherein the window layout area of the first camera device is located at a first position.
[0062] In the embodiments of the present application, the first type of camera device may be a type A camera device or a type B camera device. In the following embodiments, for ease of description, the first type of camera device is described as a type A camera device. Those skilled in the art will appreciate that when the first type of camera device is a type B camera device, the method for determining the corresponding window layout area is similar.
[0063] First, a window layout area of a first camera device is determined. The first camera device is a camera device that captures the maximum vertical resolution of the video among at least one first type of camera devices. The window layout area of the first camera device is located at a first position in the layout area corresponding to the video playback window. The first position can be, for example, the leftmost side of the layout area, the rightmost side of the layout area, the upper left corner of the layout area, the upper right corner of the layout area, the lower left corner of the layout area, the lower right corner of the layout area, etc., and this embodiment of the present application is not limited to this.
[0064] The number of the first camera device may be one or more. When the number of the first camera device is one, the window layout area of the first camera device is set at the first position.
[0065] When there are multiple first camera devices, determining the window layout area of the first camera device with the maximum vertical resolution of the video captured among the at least one first-type camera device is achieved in the following manner: determining the window layout area of each of the multiple first camera devices based on the respective horizontal video resolutions of the multiple first camera devices.
[0066] Exemplarily, the window layout area of each first camera device can be determined in sequence in the layout area, starting from the first position of the layout area, in descending order of the respective video horizontal resolutions of the multiple first cameras. For example, including first camera 1, first camera 2, and first camera 3, wherein the video horizontal resolution of first camera 1 is greater than the video horizontal resolution of first camera 2, and the video horizontal resolution of first camera 2 is greater than the video horizontal resolution of first camera 3, then the window layout area of first camera 1 is located at the first position of the layout area, the window layout area of first camera 2 is adjacent to the first position, and the window layout area of first camera 3 is adjacent to the window layout area of first camera 2. Alternatively, the window layout area of any one of the multiple first cameras can be set at the first position, and the other first cameras can be set adjacent to each other in sequence.
[0067] FIG5 is a schematic diagram of the window layout area provided in an embodiment of the present application. As shown in FIG5 , the dotted line illustrates the layout area 50 corresponding to the video playback window. The layout area 50 includes a first layout area and a second layout area. The first layout area is a layout area corresponding to the first image size type, and the second layout area is a layout area corresponding to the second image size type. Among the camera devices of type A, the camera devices with the maximum vertical resolution of the video captured are determined, including camera device 1, camera device 2, and camera device 3, respectively. Then, the window layout areas of camera device 1, camera device 2, and camera device 3 can be determined first.
[0068] Taking the first position as the leftmost side of the layout area 50 as an example, since the vertical resolutions of the videos captured by camera 1, camera 2 and camera 3 are equal, the window layout area of any one of the three camera devices can be set at the leftmost side of the layout area 50, and then the window layout areas of the remaining two camera devices can be set adjacent to each other in sequence.
[0069] In one possible implementation, when the vertical resolutions of the videos captured by camera 1, camera 2, and camera 3 are equal, the horizontal resolutions of the videos captured by camera 1, camera 2, and camera 3 can be compared, and then the window layout areas of camera 1, camera 2, and camera 3 can be determined based on the horizontal resolutions of the captured videos. For example, in FIG5 , the horizontal resolutions of the videos captured by camera 1, camera 2, and camera 3 are, from largest to smallest, camera 1, camera 2, and camera 3. Therefore, the window layout area of camera 1 can be set at the leftmost side of layout area 50, and the window layout area of camera 2 can be set adjacent to the window layout area of camera 1, and the window layout area of camera 3 can be set adjacent to the window layout area of camera 2.
[0070] S42 : When there is a first other camera device other than the first camera device in the at least one first type camera device, determine a second camera device with a second largest vertical resolution of captured videos from the first other camera devices.
[0071] After determining the window layout area of the first camera device, determining whether a first other camera device other than the first camera device exists in at least one first-type camera device. If no first other camera device exists, the window layout area of all first-type camera devices has been determined. If the first other camera device exists, further determining the window layout area of the first other camera device is required.
[0072] Exemplarily, when it is determined that there is a first other camera device, a second camera device that shoots videos with the second largest vertical resolution is first determined from the first other camera devices, wherein the vertical resolution of the video shot by the second camera device is smaller than the vertical resolution of the video shot by the first camera device, but the second camera device is the camera device that shoots videos with the largest vertical resolution among the first other camera devices.
[0073] S43 : Determine a window layout area of the second camera device based on a resolution of the video captured by the second camera device, where the window layout area of the second camera device is adjacent to the window layout area of the first camera device.
[0074] After determining the second camera device, the window layout area of the second camera device can be obtained based on the video resolution captured by the second camera device. The window layout area of the second camera device is adjacent to the window layout area of the first camera device, and the top of the window layout area of the second camera device is flush with the top of the window layout area of the first camera device.
[0075] For example, see the example of Figure 6. Figure 6 is a second schematic diagram of the window layout area provided in an embodiment of the present application. As shown in Figure 6, after the window layout areas of camera device 1, camera device 2, and camera device 3 are determined in the layout area 50, the camera device with the largest vertical resolution of the video captured is determined among the remaining type A cameras, that is, camera device 4. Then, based on the resolution of the video captured by camera device 4, the window layout area of camera device 4 is determined, and the window layout area of camera device 4 is adjacent to the window layout area of camera device 3.
[0076] S44, when there is a second other camera device in addition to the second camera device in the first other camera devices, determine the window layout area of the second other camera device based on the video resolution captured by the first camera device, the video resolution captured by the second camera device, and the video resolution captured by the second other camera device.
[0077] After determining the window layout area of the second camera device, it is necessary to further determine whether there is a second other camera device in the first other camera device except the second camera device. If not, the window layout area of the first type of camera device has been fully determined. If so, it is necessary to further determine the window layout area of the second other camera device.
[0078] In an embodiment of the present application, the window layout areas of each camera device are arranged in order of the vertical resolution of the video from high to low, the window layout of the second camera device is adjacent to the window layout area of the first camera device, and when there is a second camera device other than the second camera device in the first other camera device, the window layout area of the second other camera device is determined based on the video resolution captured by the first camera device, the video resolution captured by the second camera device, and the video resolution captured by the second other camera device, which is conducive to the reasonable distribution of the display areas of each camera device, reduces display deformation or distortion, and improves the display effect.
[0079] When there is a second other camera device in the first other camera device, first determine whether there is a third camera device in the second other camera device, wherein the vertical resolution of the video captured by the third camera device is less than or equal to the difference between the vertical resolution of the video captured by the first camera device and the vertical resolution of the video captured by the second camera device, and the horizontal resolution of the video captured by the third camera device is less than or equal to the horizontal resolution of the video captured by the second camera device.
[0080] In the presence of a third camera device, the window layout area of the third camera device can be determined based on the video resolution captured by the third camera device. The window layout area of the third camera device is adjacent to the window layout area of the first camera device and the window layout area of the second camera device.
[0081] Please refer to the example of Figure 6. After determining the window layout area of camera device 4, among the remaining type A camera devices, determine whether there is a third camera device that satisfies the requirement that the vertical resolution of the video captured is less than the difference between the vertical resolution of the video captured by camera device 1 and the vertical resolution of the video captured by camera device 4, and the horizontal resolution of the video captured is less than or equal to the horizontal resolution of the video captured by camera device 4. If such a third camera device exists, the window layout area of the corresponding third camera device can be set below the window layout area of camera device 4.
[0082] As shown in Figure 6 , camera 5 meets the aforementioned conditions: the vertical resolution of the video captured by camera 5 is equal to the difference between the vertical resolutions of the video captured by camera 1 and the vertical resolution of the video captured by camera 4, and the horizontal resolution of the video captured by camera 5 is lower than the horizontal resolution of the video captured by camera 4. Therefore, the window layout area of camera 5 can be determined based on the resolution of the video captured by camera 5. The window layout area of camera 5 is located below the window layout area of camera 4 and is adjacent to the window layout areas of camera 3 and camera 4, respectively.
[0083] After the window layout area of the third imaging device is determined, it is determined whether there is a third other imaging device other than the third imaging device among the second other imaging devices.
[0084] In the case that there is a third other camera device in addition to the third camera device in the second other camera device, the window layout area of the third other camera device is determined based on the video resolution captured by the first camera device, the video resolution captured by the second camera device, the video resolution captured by the third camera device, and the video resolution captured by the third other camera device.
[0085] In an embodiment of the present application, the window layout of the third camera device is adjacent to the window layout area of the first camera device and the window layout area of the second camera device, and when there is a third camera device other than the third camera device in the second camera device, the window layout area of the third camera device is determined based on the video resolution captured by the first camera device, the video resolution captured by the second camera device, the video resolution of the third camera device and the video resolution captured by the third camera device, which is conducive to the reasonable distribution of the display areas of each camera device, reduces display deformation or distortion, and improves the display effect.
[0086] Exemplarily, candidate areas are first determined in the layout area based on the video resolution captured by the first camera device, the video resolution captured by the second camera device, the video resolution captured by the third camera device, and the video resolution captured by another third camera device.
[0087] The candidate area is the area formed by the width of the window layout area of the second camera device and the difference in height between the window layout area of the first camera device and the window layout area of the second camera device, excluding the window layout area of the third camera device. Referring to FIG. 6 , the candidate area is represented by the shaded portion in FIG. That is, the height of the candidate area is formed by the difference in height between the window layout areas of camera devices 1 and 4, and the width of the window layout area of camera device 4 is the width of the candidate area, excluding the window layout area of camera device 5.
[0088] Then, it is determined whether there is a fourth camera whose captured video resolution satisfies the candidate area size, and a fifth camera other than the fourth camera, from among the third other camera apparatuses.
[0089] The fourth camera device is a camera device that can be deployed in the candidate area. The number of the fourth camera device may be 0 or one or more. Based on the video resolution captured by the third other camera device, it can be determined whether there is a fourth camera device that meets the size of the candidate area.
[0090] Exemplarily, it is determined whether there is a camera device among the third other camera devices whose vertical resolution of the video shot is less than or equal to the difference between the vertical resolution of the video shot by the first camera device and the vertical resolution of the video shot by the second camera device, and whose horizontal resolution of the video shot is less than or equal to the difference between the horizontal resolution of the video shot by the second camera device and the horizontal resolution of the video shot by the third camera device. If such a camera device exists, it can be determined as the fourth camera device.
[0091] As shown in Figure 6, after the window layout area of the camera device 5 is determined, there is only a first other area below the window layout area of the camera device 4 except for the window layout area of the camera device 5, and the first other area can only satisfy the layout of camera devices whose vertical resolution of the video shot is less than or equal to the difference between the vertical resolution of the video shot by the camera device 1 and the vertical resolution of the video shot by the camera device 4, and whose horizontal resolution of the video shot is less than or equal to the difference between the horizontal resolution of the video shot by the camera device 4 and the horizontal resolution of the video shot by the camera device 5.
[0092] In the presence of a fourth camera device, the window layout area of the fourth camera device is determined based on the video resolution captured by the fourth camera device. The window layout area of the fourth camera device is adjacent to the window layout area of the second camera device and the window layout area of the third camera device.
[0093] Please refer to Figure 6. Among the remaining type A camera devices, camera device 6 satisfies the vertical resolution less than or equal to the difference between the vertical resolution of camera device 1 and the vertical resolution of camera device 4, and the horizontal resolution less than or equal to the difference between the horizontal resolution of camera device 4 and the horizontal resolution of camera device 5. Therefore, the window layout area of camera device 6 is located below camera device 4, and the window layout area of camera device 6 is adjacent to the window layout area of camera device 4 and the window layout area of camera device 5.
[0094] After each window layout area for a fourth camera device is determined, the remaining area in the candidate area available for camera device placement is updated accordingly. For example, in Figure 6 , after the window layout area for camera device 6 is determined, the area available for camera device placement in the candidate area is the area obtained by subtracting the window layout area for camera device 6 from the shaded area in Figure 6 . The remaining third other cameras are then determined to determine whether a camera device can be placed in the candidate area. If a camera device exists, it is determined as the fourth camera device. This process continues until no camera device in the remaining third other cameras is available for placement in the candidate area.
[0095] The fifth camera device is a camera device whose captured video resolution does not meet the candidate area size, that is, a camera device other than the fourth camera device in the third other camera device. If the fifth camera device exists, the window layout area of the fifth camera device is determined based on the resolution of the fifth camera device, wherein the window layout area of the fifth camera device is adjacent to the window layout area of the second camera device.
[0096] Referring to Figure 6 , after determining the window layout area of camera device 4, the window layout area of the fifth camera device can be positioned adjacent to the window layout area of camera device 4. If there are multiple fifth camera devices, they can be positioned adjacent to each other in descending order of the vertical resolution of the captured videos, with the window layout area of the camera device with the highest vertical resolution positioned adjacent to the window layout area of camera device 4. After determining the window layout area of the fifth camera device, a corresponding remaining area exists below the window layout area of the fifth camera device. The height of the remaining area is equal to the difference between the vertical resolutions of the videos captured by the first and fifth cameras, and the width of the remaining area is equal to the horizontal resolution of the videos captured by the fifth camera device. A determination is then made among the unarranged first-type camera devices to determine whether a camera device with a captured video resolution that meets the size of the remaining area. If so, its window layout area is positioned within the remaining area. The process for determining whether a camera device with a captured video resolution that meets the size of the remaining area among the unarranged first-type camera devices is similar to the process for determining whether a fourth camera device with a captured video resolution that meets the size of the candidate area among the third other camera devices, and will not be further described here.
[0097] In an embodiment of the present application, the window layout of the fourth camera device is adjacent to the window layout area of the second camera device and the window layout area of the third camera device, and in the presence of a fifth camera device, the window layout area of the fifth camera device is determined based on the video resolution captured by the fifth camera device, and the window layout area of the fifth camera device is adjacent to the window layout area of the second camera device, which is more conducive to the reasonable distribution of the display areas of each camera device, reduces display deformation or distortion, and improves the display effect.
[0098] The above embodiment describes how to determine the window layout area for a first-type camera device when at least two cameras include at least one first-type camera device. In some cases, the at least two cameras also include at least one second-type camera device, which captures images of a second image size. The following describes how to determine the window layout area for a second-type camera device, with reference to the accompanying drawings.
[0099] FIG7 is a flowchart of determining a window layout area of a second-type camera device according to an embodiment of the present application, as shown in FIG7 , including:
[0100] S71 : Determine, based on a window layout area of at least one first-type camera device, a first layout area corresponding to a first image size type in the layout area.
[0101] The first layout area includes a window layout area of at least one first-type camera device.
[0102] FIG8 is a schematic diagram of layout areas provided in an embodiment of the present application. As shown in FIG8 , the window layout areas of each camera device of type A are illustrated. Therefore, the first layout area corresponding to type A is determined based on the spatial domain of the window layout areas of each camera device of type A. The height of the first layout area is determined by the vertical resolution of the video captured by camera device 1, and the width of the first layout area is determined by the horizontal resolution of the video captured by camera devices 1, 2, 3, 4, and 7.
[0103] S72: Determine whether there is an idle area in the first layout area.
[0104] The idle area is an area in the first layout area except for the window layout area of the at least one first-type camera device.
[0105] Exemplarily, for each first-type camera device's window layout area in the first layout area, if there is an area below the first-type camera device's window layout area that does not include the window layout areas of other camera devices, and the vertical resolution of the image captured by the first-type camera device is less than the height of the first layout area, a target width is determined within the width of the first-type camera device's window layout area, and the area is stretched downward to the bottom of the first layout area using the target width as the area width to obtain a corresponding free area. The target width is the width of the first-type camera device's window layout area that does not include the window layout areas of other camera devices below it.
[0106] Referring to Figure 8 , there are no window layout areas for other camera devices below camera device 6. Therefore, the width of the window layout area for camera device 6 can be determined as the corresponding target width p. Using p as the area width, the area can be regularly stretched downward to the bottom of the first layout area to obtain the free area C corresponding to camera device 6. There is an area below camera device 4 that does not include the window layout areas of other camera devices. Therefore, the width of the window layout areas for cameras 5 and 6 can be subtracted from the width of the window layout area for camera device 4 to obtain the corresponding target width p1. Using p1 as the area width, the area can be regularly stretched downward to the bottom of the first layout area to obtain the free area D corresponding to camera device 4. In a similar manner, the free area E corresponding to camera device 7 can be obtained.
[0107] In the absence of the second type camera device, the window layout area of the first type camera device may be stretched, as shown in the example of FIG. 9 .
[0108] Figure 9 is a schematic diagram of stretching the window layout area of the first type of camera device provided in an embodiment of the present application. As shown in Figure 9, an example is given of how to determine the process of stretching the window layout area of the type A camera device when there are three idle areas C, D, and E and there is no type B camera device.
[0109] Referring to the example in FIG9 , since there is no camera device of type B, the window layout area of camera device 6 can be first proportionally stretched for free areas C and D until the window layout area of camera device 6 reaches the corresponding boundary, which includes the bottom of the first layout area or the rightmost side of the window layout area of camera device 4 (whichever is reached first). If there are still gaps, they can be filled by border adsorption so that the window layout area of camera device 6 fills free areas C and D.
[0110] As for the idle area E, the window layout area of the rightmost camera device 7 can be stretched in equal proportions.
[0111] S73 : Determine a window layout area of the at least one second-type camera device based on the determination result and the resolution of the video captured by the at least one second-type camera device.
[0112] The determination result is that there is an idle area in the first layout area, or there is no idle area. Based on the determination result and the video resolution captured by the at least one second-type camera device, it can be determined from the at least one second-type camera device whether there is a sixth camera device and a seventh camera device other than the sixth camera device. In this embodiment of the present application, the sixth camera device is a camera device suitable for setting the corresponding window layout area within the idle area, and the seventh camera device is a camera device not suitable for setting the corresponding window layout area within the idle area.
[0113] Exemplarily, when the determination result is that the idle area exists in the first layout area, based on the idle area size and the video resolution captured by each of the at least one second-type camera devices, it is determined whether there is a camera device that meets the idle area size in the at least one second-type camera device. If there is a camera device that meets the idle area size, the camera device that meets the idle area size is determined as the sixth camera device, and the camera devices other than the sixth camera device in the at least one second-type camera device are determined as the seventh camera device.
[0114] If the determination result is that the vacant area does not exist in the first layout area, it is determined that the sixth camera does not exist in the at least one second-type camera, and the at least one second-type camera is determined to be the seventh camera.
[0115] Exemplarily, when the determination result indicates that there is no idle area in the first layout area, it is determined that there is no sixth camera in the at least one second-type camera, and then all the second-type camera devices are determined to be the seventh camera.
[0116] When the determination result indicates that there is an idle area in the first layout area, it is necessary to determine whether there is a sixth camera device and a seventh camera device in at least one second type camera device based on the size of the idle area and the video resolution captured by the second type camera device.
[0117] To determine whether the sixth camera device exists in the second type of camera device, the following two factors are mainly considered:
[0118] One factor is whether the difference between the vertical resolution of the video captured by the second-type camera device and the height of the free area is greater than a first preset threshold. Since the free area is the area remaining in the first layout area after excluding the window layout area of the first-type camera device, the free area is typically small. When the vertical resolution of the video captured by the second-type camera device is high, setting its window layout area in the free area will not produce a good display effect. Therefore, for any free area, it is possible to determine whether there is a camera device among at least one second-type camera device whose difference between the vertical resolution of the video captured and the height of the free area is less than or equal to the first preset threshold.
[0119] Another factor is whether the difference between the first aspect ratio of the video shot by the second type of camera device and the second aspect ratio of the idle area is greater than a second preset threshold. The aspect ratio of the video shot by the second type of camera device can be calculated by the vertical resolution and the horizontal resolution of the video, and the aspect ratio of the idle area can be calculated by the height and width of the idle area. When the difference between the first aspect ratio and the second aspect ratio is greater than the second preset threshold, setting the window layout of the camera device in the idle area will result in large picture distortion and poor display effect. Therefore, for any idle area, it can be determined in at least one second type of camera device whether there is a camera device whose corresponding first aspect ratio and the second aspect ratio of the idle area are less than or equal to the second preset threshold.
[0120] For any free area, if there is a camera device among the second-type camera devices that satisfies the conditions that the difference between the vertical resolution of the captured video and the height of the free area is less than or equal to a first preset threshold, and the difference between the corresponding first aspect ratio and the second aspect ratio of the free area is less than or equal to a second preset threshold, it is determined that at least one of the second-type camera devices has a camera device that meets the free area size, and the camera device that meets the free area size is determined as the sixth camera device. If there are other cameras in addition to the sixth camera device among the at least one second-type camera device, the other cameras are determined as the seventh camera device.
[0121] Then, in a case where there is a sixth camera among the at least one second-type camera, the vacant area is determined as the window layout area of the sixth camera.
[0122] Figure 10 is a schematic diagram of determining the window layout area of the second type of camera device provided in an embodiment of the present application. As shown in Figure 10, an example is given of how to determine the window layout area of the type B camera device when there are three idle areas C, D, and E and there is only one type B camera device.
[0123] Referring to the example in Figure 10 , among the three free areas, a determination is made as to whether there is a free area where the difference between the second aspect ratio corresponding to the free area and the first aspect ratio corresponding to the type B camera device is less than or equal to the second preset threshold, and the difference between the height corresponding to the free area and the vertical resolution of the video captured by the type B camera device is less than or equal to the first preset threshold. As shown in Figure 10 , free area E meets these conditions, and therefore free area E is determined to be the window layout area for the type B camera device.
[0124] As for the idle areas C and D, the window layout area of the camera device 6 can be first stretched proportionally until the window layout area of the camera device 6 reaches the corresponding boundary, which includes the bottom of the first layout area or the rightmost side of the window layout area of the camera device 4 (whichever is reached first). If there are still gaps, they can be filled by border adsorption so that the window layout area of the camera device 6 fills the idle areas C and D.
[0125] In a case where there is a seventh imaging device in the at least one second-type imaging device, the window layout area of the seventh imaging device is determined based on the resolution of the seventh imaging device.
[0126] For the seventh camera device, a second layout area corresponding to the second image size type is first determined in the layout area, where the second layout area is adjacent to the first layout area. Then, based on the resolution of the video captured by the seventh camera device, a window layout area for the seventh camera device is determined in the second layout area.
[0127] Figure 11 is a schematic diagram illustrating how to determine the window layout area for the seventh camera device according to an embodiment of the present application. As shown in Figure 11 , the seventh camera device includes camera 11 and camera 12, with camera 12 being the last camera device of type B. The vertical resolution of the video captured by camera 11 is greater than the vertical resolution of the video captured by camera 12, so the window layout area for camera 11 is determined first. The window layout area for camera 11 is adjacent to the window layout area for camera 1.
[0128] Then, the window layout area of the imaging apparatus 12 is determined, and the window layout area of the imaging apparatus 12 is adjacent to the window layout area of the imaging apparatus 11 .
[0129] In some cases, please refer to the example on the left in Figure 11. If the window layout area of the camera device 12 does not reach the boundary of the second layout area, you can first determine the first difference between the window layout area of the camera device 12 and the bottom of the second layout area and the second difference between the window layout area of the camera device 12 and the rightmost side of the second layout area, and use the smaller value between the first difference and the second difference as a reference for geometric stretching, and then perform border adsorption to the other side. As shown on the left in Figure 11, you can first supplement the width of the window layout area of the camera device 12 so that it is aligned with the rightmost side of the first layout area, and then supplement the height of the same length downward. This geometric stretching method will not cause distortion. When the window layout area of the camera device 12 is still not aligned with the height of the window layout area of the camera device 11 after the supplement is completed, continue to stretch downward until it is consistent. Although the stretching at this time will produce a certain amount of image distortion, the degree of image distortion is small.
[0130] In some cases, as shown in the example on the right side of Figure 11, the width of the window layout area of camera device 12 exceeds the boundary of the second layout area. In this case, the width of the window layout area of camera device 12 needs to be reduced to align with the rightmost edge of the first layout area. As shown on the right side of Figure 11, the width of the window layout area of camera device 12 can be compressed to align with the rightmost edge of the first layout area. Then, the border can be adjusted downward to align the height of the window layout area of camera device 12 with that of camera device 11. Although this stretching will cause some image distortion, the degree of distortion is relatively small.
[0131] It should be noted that, for the seventh camera device, the implementation method of determining the window layout area of the seventh camera device in the second layout area is similar to the implementation method of determining the window layout area of the first type of camera device in the first layout area, and will not be repeated here.
[0132] In an embodiment of the present application, when at least two camera devices also include at least one second-type camera device, it is determined whether there is an idle area in the first layout area corresponding to the first image size type, and based on the determination result and the video resolution captured by at least one second-type camera device, the window layout area of at least one second-type camera device is determined to better utilize the idle area and the second layout area, thereby improving the utilization rate of the video playback window and enhancing the video display effect.
[0133] S33: Determine the respective window pane areas of the at least two camera devices from the video playback window based on the respective window layout areas of the at least two camera devices and the size of the video playback window.
[0134] After obtaining the window layout areas of at least two camera devices, the ratio of the window layout area of each camera device to the video playback window can be determined based on the window layout areas of at least two camera devices and the size of the video playback window, and then the window pane area of each camera device can be determined based on the ratio.
[0135] Exemplarily, the width and height of the layout area are first determined, where the width of the layout area is equal to the sum of the horizontal resolutions of the videos captured by all the top-most first-type cameras within the first layout area. If the at least two cameras include only the first-type camera, the height of the layout area is equal to the vertical resolution of the videos captured by the first camera. If the at least two cameras include the first-type camera and the second-type camera, the height of the layout area is equal to the vertical resolution of the videos captured by the first camera plus the vertical resolution of the videos captured by the leftmost second-type camera.
[0136] Taking Figure 11 as an example, the width of the layout area is equal to the sum of the horizontal resolutions of the videos shot by camera 1, camera 2, camera 3, camera 4, and camera 7, and the height of the layout area is equal to the sum of the vertical resolutions of the videos shot by camera 1 and camera 11.
[0137] After obtaining the height and width of the layout area, combined with the size of the video playback window, the width scaling ratio m and height scaling ratio n can be obtained. Where m = width of the video playback window / width of the layout area, n = height of the video playback window / height of the layout area.
[0138] For each camera device, the width of the window pane area of the camera device can be obtained based on the width and m of the window layout area of the camera device, and the height of the window pane area of the camera device can be obtained based on the height and n of the window layout area of the camera device.
[0139] Then, a corresponding coordinate system is established, and the coordinates of the pane area of each camera device are determined based on the height and width of the pane area of each camera device and the relative positional relationship between the pane areas of each camera device. Then, a window is opened based on the coordinates of the pane area of each camera device, and the video shot by the corresponding camera device is played in the pane area of each camera device. Among them, the playback mode can be adapted to proportional playback or full-scale playback. Exemplarily, for each camera device, the error value caused by image stretching can be calculated based on the aspect ratio of the pane area of the camera device and the resolution aspect ratio of the camera device, and compared with the preset error threshold. When the error value is greater than or equal to the preset error threshold, the proportional playback mode is selected; when the error value is less than the preset error threshold, the full-scale playback mode is selected.
[0140] In summary, the solution of the embodiment of the present application classifies the camera devices according to the aspect ratio of the video resolution captured by the camera devices, and uses a recursive method to determine the window layout area of each camera device, fills the idle area by equal stretching and scaling, and calculates the absolute coordinates of the corresponding pane area after the window layout area is regularly arranged, performs customized and rational window opening, and adaptive playback mode, so that camera devices with different video resolutions can play videos when the pane area is close to the actual resolution ratio, reducing video picture distortion, and can also improve the utilization rate of the playback pane and enhance the video display effect.
[0141] The video playback device provided in the present application is described below. The video playback device described below and the video playback method described above can be referenced to each other.
[0142] FIG12 is a schematic diagram of the structure of a video playback device provided in an embodiment of the present application. As shown in FIG12 , the device includes:
[0143] A determination module 121 is configured to determine the size of a video playback window and the resolution of videos captured by at least two camera devices respectively playing videos through the video playback window;
[0144] The processing module 122 is configured to determine the respective pane areas of the at least two camera devices from the video playback window based on the resolution of the videos captured by the at least two camera devices and the size of the video playback window;
[0145] The playing module 123 is configured to play the video shot by the corresponding camera device in each of the window pane areas.
[0146] In a possible implementation, the processing module 122 may be configured to:
[0147] For each camera device, determining the size type of the image captured by the camera device based on the video resolution captured by the camera device;
[0148] Determining, in the layout area corresponding to the video playback window, respective window layout areas of the at least two camera devices based on the video resolutions and image size types captured by the at least two camera devices;
[0149] Based on the window layout areas of the at least two camera devices and the size of the video playback window, the pane areas of the at least two camera devices are determined from the video playback window.
[0150] In a possible implementation, the at least two camera devices include at least one first-type camera device, where the first-type camera device is a camera device of a first image size type. The processing module 122 may be configured as follows:
[0151] The window layout areas of the at least one first type camera device are determined in the layout area starting from the first position of the layout area in descending order of vertical resolution of the videos shot by the at least one first type camera device.
[0152] In a possible implementation, the processing module 122 may be configured to:
[0153] Determining a window layout area of a first camera device that captures videos with the highest vertical resolution among the at least one first-type camera device, wherein the window layout area of the first camera device is located at the first position;
[0154] In a case where there is a first other camera device other than the first camera device in the at least one first type camera device, determining a second camera device that captures a video with a second largest vertical resolution from the first other camera devices;
[0155] determining a window layout area of the second camera device based on a resolution of the video captured by the second camera device, where the window layout area of the second camera device is adjacent to the window layout area of the first camera device;
[0156] In the case that there is a second other camera device in addition to the second camera device among the first other camera devices, the window layout area of the second other camera device is determined based on the video resolution captured by the first camera device, the video resolution captured by the second camera device, and the video resolution captured by the second other camera device.
[0157] In a possible implementation, when there are multiple first camera devices, the processing module 122 may be configured as follows:
[0158] The window layout areas of the respective first camera devices are determined according to the respective video horizontal resolutions of the plurality of first camera devices.
[0159] In a possible implementation, the processing module 122 may be configured to:
[0160] Determining whether there is a third camera device among the second other camera devices, the vertical resolution of the video captured by the third camera device is less than or equal to the difference between the vertical resolution of the video captured by the first camera device and the vertical resolution of the video captured by the second camera device, and the horizontal resolution of the video captured by the third camera device is less than or equal to the horizontal resolution of the video captured by the second camera device;
[0161] In the case where the third camera device exists, determining a window layout area of the third camera device based on a resolution of a video captured by the third camera device, where the window layout area of the third camera device is adjacent to the window layout area of the first camera device and the window layout area of the second camera device;
[0162] In the case that there is a third other camera device in addition to the third camera device among the second other camera devices, the window layout area of the third other camera device is determined based on the video resolution captured by the first camera device, the video resolution captured by the second camera device, the video resolution captured by the third camera device, and the video resolution captured by the third other camera device.
[0163] In a possible implementation, the processing module 122 may be configured to:
[0164] Determine from the third other camera devices whether there is a fourth camera device whose captured video resolution meets the size of the candidate area, and a fifth camera device other than the fourth camera device; the candidate area is an area within an area formed by the width of the window layout area of the second camera device and the difference between the heights of the window layout area of the first camera device and the window layout area of the second camera device, excluding the window layout area of the third camera device;
[0165] In the case where the fourth camera device exists, determining a window layout area of the fourth camera device based on a resolution of a video captured by the fourth camera device, where the window layout area of the fourth camera device is adjacent to the window layout area of the second camera device and the window layout area of the third camera device;
[0166] In the case where the fifth camera device exists, the window layout area of the fifth camera device is determined based on the resolution of the video captured by the fifth camera device, and the window layout area of the fifth camera device is adjacent to the window layout area of the second camera device.
[0167] In a possible implementation, the at least two camera devices further include at least one second-type camera device, where the second-type camera device is a camera device of a second image size type. The processing module 122 may be configured as follows:
[0168] Determining, in the layout area, a first layout area corresponding to the first image size type based on the window layout area of each of the at least one first-type camera devices;
[0169] Determine whether there is an idle area in the first layout area;
[0170] Based on the determination result and the resolution of the video captured by each of the at least one second-type camera devices, a window layout area of the at least one second-type camera device is determined.
[0171] In a possible implementation, the processing module 122 may be configured to:
[0172] Based on the determination result and the resolution of the videos captured by each of the at least one second-type camera devices, determining whether a sixth camera device and a seventh camera device other than the sixth camera device exist from the at least one second-type camera device;
[0173] In a case where the sixth camera device exists in the at least one second-type camera device, determining the idle area as a window layout area of the sixth camera device;
[0174] In a case where the seventh camera device exists in the at least one second-type camera device, the window layout area of the seventh camera device is determined based on a resolution of a video captured by the seventh camera device.
[0175] In a possible implementation, the processing module 122 may be configured to:
[0176] If the determination result indicates that the idle area exists in the first layout area, determining whether there is a camera device that meets the idle area size in the at least one second-type camera device based on the idle area size and the video resolution captured by each of the at least one second-type camera devices, and if there is a camera device that meets the idle area size, determining the camera device that meets the idle area size as the sixth camera device, and determining the camera devices other than the sixth camera device in the at least one second-type camera device as the seventh camera device;
[0177] If the determination result is that the vacant area does not exist in the first layout area, it is determined that the sixth camera does not exist in the at least one second-type camera, and the at least one second-type camera is determined to be the seventh camera.
[0178] In a possible implementation, the processing module 122 may be configured to:
[0179] determining a second layout area corresponding to the second image size type in the layout area, where the second layout area is adjacent to the first layout area;
[0180] Based on the resolution of the video captured by the seventh camera device, a window layout area of the seventh camera device is determined in the second layout area.
[0181] FIG13 illustrates a schematic diagram of the physical structure of an electronic device. As shown in FIG13 , the electronic device may include: a processor 1310, a communication interface 1320, a memory 1330, and a communication bus 1340, wherein the processor 1310, the communication interface 1320, and the memory 1330 communicate with each other via the communication bus 1340. The processor 1310 may call logic instructions in the memory 1330 to execute a video playback method, which includes: determining the size of a video playback window and the resolution of videos captured by at least two cameras that play videos through the video playback window; determining the window pane areas of the at least two cameras from the video playback window based on the resolution of the videos captured by the at least two cameras and the size of the video playback window; and playing the video captured by the corresponding camera in each window pane area.
[0182] In addition, the logic instructions in the above-mentioned memory 1330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0183] On the other hand, the present application also provides a computer program product, which includes a computer program, which can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the video playback method provided by each of the above methods, the method including: determining the size of the video playback window and the video resolution captured by each of the at least two camera devices that play the video through the video playback window; based on the video resolution captured by each of the at least two camera devices and the size of the video playback window, determining the window pane area of each of the at least two camera devices from the video playback window; in each of the window pane areas, playing the video captured by the corresponding camera device.
[0184] On the other hand, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the video playback method provided by each of the above methods, the method including: determining the size of the video playback window, and the video resolution captured by each of the at least two camera devices that play the video through the video playback window; based on the video resolution captured by each of the at least two camera devices and the size of the video playback window, determining the window pane area of each of the at least two camera devices from the video playback window; and in each of the window pane areas, playing the video captured by the corresponding camera device.
[0185] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. A person of ordinary skill in the art can understand and implement the present embodiment without inventive effort. Through the description of the above embodiments, a person of ordinary skill in the art can clearly understand that each embodiment can be implemented using software plus a necessary general hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution or the portion that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method described in each embodiment or certain portions of the embodiment. Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in each of the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of each embodiment of the present application.
Claims
1. A video playback method, comprising: determining the size of a video playback window and the video resolution of each of at least two imaging devices that play videos through the video playback window; determining, based on the video resolution of each of the at least two imaging devices and the size of the video playback window, a pane area of each of the at least two imaging devices from the video playback window; playing, in each of the pane areas, the video captured by the corresponding imaging device.
2. The method according to claim 1, wherein, The determining, based on the video resolution of each of the at least two imaging devices and the size of the video playback window, a pane area of each of the at least two imaging devices from the video playback window includes: for each imaging device, determining an image size type of the image captured by the imaging device based on the video resolution of the imaging device; determining, based on the video resolution and the image size type of each of the at least two imaging devices, a window layout area of each of the at least two imaging devices in a layout area corresponding to the video playback window; determining, based on the window layout area of each of the at least two imaging devices and the size of the video playback window, a pane area of each of the at least two imaging devices from the video playback window.
3. The method according to claim 2, wherein At least one of the at least two imaging devices is a first type of imaging device that captures a first image size type. The determining, based on the video resolution and the image size type of each of the at least two imaging devices, a window layout area of each of the at least two imaging devices in a layout area corresponding to the video playback window includes: determining, in order from the highest to the lowest vertical video resolution of each of the at least one first type of imaging device, a window layout area of each of the at least one first type of imaging device in the layout area starting from a first position in the layout area.
4. The method according to claim 3, wherein The determining, in order from the highest to the lowest vertical video resolution of each of the at least one first type of imaging device, a window layout area of each of the at least one first type of imaging device in the layout area starting from a first position in the layout area includes: determining a window layout area of a first imaging device that captures the maximum vertical video resolution among the at least one first type of imaging device, the window layout area of the first imaging device being located at the first position; in the case where there is a first other imaging device other than the first imaging device among the at least one first type of imaging device, determining a second imaging device that captures the second highest vertical video resolution from the first other imaging devices; determining a window layout area of the second imaging device based on the video resolution of the second imaging device, the window layout area of the second imaging device being adjacent to the window layout area of the first imaging device; When there is a second other imaging device other than the second imaging device in the first other imaging device, based on the video resolution captured by the first imaging device, the video resolution captured by the second imaging device, and the video resolution captured by the second other imaging device, determine the window layout area of the second other imaging device.
5. The method according to claim 4, wherein When the number of the first imaging devices is multiple, determining the window layout area of the first imaging device with the maximum video vertical resolution captured among the at least one first type of imaging devices includes: According to the video horizontal resolutions of the multiple first imaging devices, determine the window layout areas of the multiple first imaging devices respectively.
6. The method according to claim 4, wherein, The determining the window layout area of the second other imaging device based on the video resolution captured by the first imaging device, the video resolution captured by the second imaging device, and the video resolution captured by the second other imaging device includes: Determine whether there is a third imaging device in the second other imaging device, the video vertical resolution captured by the third imaging device is less than or equal to the difference between the video vertical resolution captured by the first imaging device and the video vertical resolution captured by the second imaging device, and the video horizontal resolution captured by the third imaging device is less than or equal to the video horizontal resolution captured by the second imaging device; When there is the third imaging device, based on the video resolution captured by the third imaging device, determine the window layout area of the third imaging device, and the window layout area of the third imaging device is adjacent to both the window layout area of the first imaging device and the window layout area of the second imaging device; When there is a third other imaging device other than the third imaging device in the second other imaging device, based on the video resolution captured by the first imaging device, the video resolution captured by the second imaging device, the video resolution captured by the third imaging device, and the video resolution captured by the third other imaging device, determine the window layout area of the third other imaging device.
7. The method according to claim 6, wherein The determining the window layout area of the third other imaging device based on the video resolution captured by the first imaging device, the video resolution captured by the second imaging device, the video resolution captured by the third imaging device, and the video resolution captured by the third other imaging device includes: Determine whether there is a fourth imaging device with a captured video resolution that meets the candidate area size and a fifth imaging device other than the fourth imaging device in the third other imaging device; the candidate area is the area other than the window layout area of the third imaging device in the area formed by the width of the window layout area of the second imaging device and the difference in height between the window layout areas of the first imaging device and the second imaging device; In the presence of the fourth imaging device, based on the video resolution captured by the fourth imaging device, determine the window layout area of the fourth imaging device, and the window layout area of the fourth imaging device is adjacent to the window layout areas of the second imaging device and the third imaging device; In the presence of the fifth imaging device, based on the video resolution captured by the fifth imaging device, determine the window layout area of the fifth imaging device, and the window layout area of the fifth imaging device is adjacent to the window layout area of the second imaging device.
8. The method according to any one of claims 3 to 7, wherein, The at least two imaging devices further include at least one second type of imaging device, and the second type of imaging device is an imaging device that captures a second image size type. Determining the window layout areas of the at least two imaging devices respectively in the layout area corresponding to the video playback window based on the video resolutions and image size types captured by the at least two imaging devices respectively includes: Based on the window layout areas of the at least one first type of imaging device respectively, determine the first layout area corresponding to the first image size type in the layout area; Determine whether there is an idle area in the first layout area; Based on the determination result and the video resolutions captured by the at least one second type of imaging device respectively, determine the window layout areas of the at least one second type of imaging device.
9. The method according to claim 8, wherein, The determining the window layout areas of the at least one second type of imaging device based on the determination result and the video resolutions captured by the at least one second type of imaging device respectively includes: Based on the determination result and the video resolutions captured by the at least one second type of imaging device respectively, determine whether there is a sixth imaging device and a seventh imaging device other than the sixth imaging device among the at least one second type of imaging device; In the case where the sixth imaging device exists among the at least one second type of imaging device, determine the idle area as the window layout area of the sixth imaging device; In the case where the seventh imaging device exists among the at least one second type of imaging device, based on the video resolution captured by the seventh imaging device, determine the window layout area of the seventh imaging device.
10. The method according to claim 9, wherein, The determining whether there is a sixth imaging device and a seventh imaging device other than the sixth imaging device among the at least one second type of imaging device based on the determination result and the video resolutions captured by the at least one second type of imaging device respectively includes: In the case where the determination result is that there is an idle area in the first layout area, based on the size of the idle area and the video resolutions captured by the at least one second type of imaging device respectively, determine whether there is an imaging device that meets the size of the idle area among the at least one second type of imaging device. In the case where there is an imaging device that meets the size of the idle area, the one that meets... The imaging device with the determined idle area size is determined as the sixth imaging device, and the imaging devices among the at least one second-type imaging device other than the sixth imaging device are determined as the seventh imaging device; In the case where the determination result is that there is no idle area in the first layout area, it is determined that there is no sixth imaging device among the at least one second-type imaging device, and the at least one second-type imaging device is determined as the seventh imaging device.
11. The method according to claim 9, wherein, Determining the window layout area of the seventh imaging device based on the video resolution captured by the seventh imaging device includes: Determining a second layout area corresponding to the second image size type in the layout area, where the second layout area is adjacent to the first layout area; Based on the video resolution captured by the seventh imaging device, determining the window layout area of the seventh imaging device in the second layout area.
12. A video playback device, comprising: A determination module configured to determine the size of a video playback window and the video resolutions respectively captured by at least two imaging devices that play videos through the video playback window; A processing module configured to determine the respective pane areas of the at least two imaging devices from the video playback window based on the video resolutions respectively captured by the at least two imaging devices and the size of the video playback window; A playback module configured to play the videos captured by the corresponding imaging devices in each of the pane areas.
13. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the program, it implements the video playback method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Display control method and device, electronic equipment and medium
CN112929566A
Polling display control method and device and storage medium
CN116418940A
Video processing method and device, computer, readable storage medium and program product
CN116980688A
Information processing device, program, and information processing method
JP2015050572A
An Obtain and Display Method of Panorama MovingPicture having High Resolution
KR1020000072269A