CN109375887B - Electronic equipment and video frame arrangement method - Google Patents
Electronic equipment and video frame arrangement method Download PDFInfo
- Publication number
- CN109375887B CN109375887B CN201710667015.7A CN201710667015A CN109375887B CN 109375887 B CN109375887 B CN 109375887B CN 201710667015 A CN201710667015 A CN 201710667015A CN 109375887 B CN109375887 B CN 109375887B
- Authority
- CN
- China
- Prior art keywords
- length
- window
- video frames
- video frame
- width
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 18
- 238000004364 calculation method Methods 0.000 claims description 8
- 230000000007 visual effect Effects 0.000 abstract 1
- 238000004458 analytical method Methods 0.000 description 27
- 238000004891 communication Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000007774 longterm Effects 0.000 description 4
- 230000004044 response Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
- G06F3/1423—Digital output to display device ; Cooperation and interconnection of the display device with other functional units controlling a plurality of local displays, e.g. CRT and flat panel display
- G06F3/1446—Digital output to display device ; Cooperation and interconnection of the display device with other functional units controlling a plurality of local displays, e.g. CRT and flat panel display display composed of modules, e.g. video walls
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/14—Systems for two-way working
- H04N7/15—Conference systems
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The invention provides a video frame arrangement method, which is applied to electronic equipment comprising a display screen. The size of the X frames is generated according to the size of the window and a preset length-width ratio. The invention also provides electronic equipment using the video frame arranging method. The invention can optimize the arrangement of the visual frames on the display screen.
Description
Technical Field
The invention relates to the technical field of electronic equipment display, in particular to electronic equipment and a video frame arrangement method.
Background
The video frame layout of the existing video conference software is that video frames are fixedly arranged on a window with a fixed size. However, the size of the window cannot be changed according to different requirements, which causes great inconvenience to the user.
Disclosure of Invention
In view of the above, it is desirable to provide a method for arranging video frames, which can optimize the arrangement of the video frames on the display screen.
In view of the above, it is desirable to provide an electronic device that can optimize the arrangement of frames on a display screen.
The video frame arrangement method is applied to electronic equipment comprising a display screen, and comprises the steps of generating a window and displaying the window on the display screen; determining X video frames to be generated according to the total number X of the cameras for collecting the videos, wherein the X video frames are respectively used for correspondingly playing the videos collected by the X cameras; determining a primary video frame and X-1 secondary video frames from the X video frames; generating the main video frame according to the length of the window and a preset length-width ratio, and displaying the generated main video frame in the window; determining the width of the residual layout of the window, and calculating to obtain a reference length according to the width of the residual layout of the window and the preset length-width ratio; calculating a reference total length of the X-1 sub-video frames according to the reference length, wherein the reference total length is equal to a product of the reference length and a value of the X-1; when the total length of the reference is smaller than or equal to the length of the window, determining that the width of each secondary video frame is equal to the width of the current residual layout, the length of each secondary video frame is equal to the reference length, correspondingly generating X-1 secondary video frames, and arranging the X-1 secondary video frames to the same line and displaying the same on the residual layout of the window; when the reference total length is larger than the length of the window, determining that the X-1 auxiliary video frames are arranged according to a total row number R; calculating the total number Y of the most arranged auxiliary video frames in each line at present according to the total line number R and the total number X-1 of the auxiliary video frames; calculating the target size of each secondary video frame according to the size of the window and the total number Y obtained by calculation; when the target size of each sub-video frame is obtained through calculation, judging whether the X-1 sub-video frames can be arranged according to R +1 lines, and when the X-1 sub-video frames can be arranged according to R +1 lines, adding 1 to the current total line number R, and recalculating the total number Y and the target size; when the X-1 auxiliary video frames can not be arranged according to the R +1 lines, dividing the width of the current residual layout by the current total line number R to calculate the actual width of each auxiliary video frame, calculating the actual length of each auxiliary video frame according to the actual width and the preset length-width ratio, and generating X-1 auxiliary video frames according to the actual length and the actual width; and arranging and displaying the generated X-1 auxiliary video frames in the residual layout of the window according to the current total line number R and the calculated total number Y.
Preferably, the size of the window is equal to the size of the display screen.
Preferably, the total number Y is equal to the total number X-1 divided by the current total number of rows R, and if the first total number X-1 divided by the current total number of rows R has decimal places, the numeric value after the decimal place is unconditionally carried.
Preferably, the step of calculating the target size of each sub-frame comprises: dividing the length of the window by the total number Y to obtain the target length of each secondary video frame; and calculating the target width of each secondary video frame according to the preset length-width ratio, and taking the calculated target length of each secondary video frame and the calculated target width of each secondary video frame as the target size of each secondary video frame.
Preferably, in the method, when the total number of rows R is set for the first time, R is set to 1.
The electronic device includes: a display screen; a memory; a processor; the memory has stored therein computer instructions, execution of which by the processor causes the processor to perform the steps of: generating a window and displaying the window on the display screen; determining X video frames to be generated according to the total number X of the cameras for collecting the videos, wherein the X video frames are respectively used for correspondingly playing the videos collected by the X cameras; determining a primary video frame and X-1 secondary video frames from the X video frames; generating the main video frame according to the length of the window and a preset length-width ratio, and displaying the generated main video frame in the window; determining the width of the residual layout of the window, and calculating to obtain a reference length according to the width of the residual layout of the window and the preset length-width ratio; calculating a reference total length of the X-1 sub-video frames according to the reference length, wherein the reference total length is equal to a product of the reference length and a value of the X-1; when the total length of the reference is smaller than or equal to the length of the window, determining that the width of each secondary video frame is equal to the width of the current residual layout, the length of each secondary video frame is equal to the reference length, correspondingly generating X-1 secondary video frames, and arranging the X-1 secondary video frames to the same line and displaying the same on the residual layout of the window; when the reference total length is larger than the length of the window, determining that the X-1 auxiliary video frames are arranged according to a total row number R; calculating the total number Y of the most arranged auxiliary video frames in each line at present according to the total line number R and the total number X-1 of the auxiliary video frames; calculating the target size of each secondary video frame according to the size of the window and the total number Y obtained by calculation; when the target size of each sub-video frame is obtained through calculation, judging whether the X-1 sub-video frames can be arranged according to R +1 lines, and when the X-1 sub-video frames can be arranged according to R +1 lines, adding 1 to the current total line number R, and recalculating the total number Y and the target size; when the X-1 auxiliary video frames can not be arranged according to the R +1 lines, dividing the width of the current residual layout by the current total line number R to calculate the actual width of each auxiliary video frame, calculating the actual length of each auxiliary video frame according to the actual width and the preset length-width ratio, and generating X-1 auxiliary video frames according to the actual length and the actual width; and arranging and displaying the generated X-1 auxiliary video frames in the residual layout of the window according to the current total line number R and the calculated total number Y.
Preferably, the size of the window is equal to the size of the display screen.
Preferably, the total number Y is equal to the total number X-1 divided by the current total number of rows R, and if the first total number X-1 divided by the current total number of rows R has decimal places, the numeric value after the decimal place is unconditionally carried.
Preferably, the step of calculating the target size of each sub-frame comprises: dividing the length of the window by the total number Y to obtain the target length of each secondary video frame; and calculating the target width of each secondary video frame according to the preset length-width ratio, and taking the calculated target length of each secondary video frame and the calculated target width of each secondary video frame as the target size of each secondary video frame.
Preferably, when the total number of rows R is set for the first time, R is set to 1.
Compared with the prior art, the electronic equipment and the video frame arrangement method can optimize the arrangement of the video frames on the display screen.
Drawings
FIG. 1 is a diagram of an exemplary video frame arrangement system.
FIG. 2 is a functional block diagram of a video frame arrangement system according to a preferred embodiment of the present invention.
FIG. 3 is a block diagram of a video frame arrangement method according to a preferred embodiment of the present invention.
Fig. 4A illustrates the remaining layout of the frame.
Fig. 4B illustrates the arrangement of the secondary frames in the remaining layout of the frames.
Description of the main elements
The following detailed description will further illustrate the invention in conjunction with the above-described figures.
Detailed Description
FIG. 1 is a diagram of an exemplary video frame arrangement system according to the present invention. In the present embodiment, the electronic device 1 includes, but is not limited to, a video frame alignment system 10, a camera 11, a communication device 12, a display 13, a memory 14, and a processor 15. The electronic device 1 and a plurality of video collecting devices 2 (only 2 are shown in the figure) establish communication connection by using communication devices 12 and 22. Each video capture device 2 also includes, but is not limited to, a camera 21. The video collecting device 2 collects videos in real time by using the camera 21 and transmits the videos to the electronic device 1 through the communication device 22.
The electronic device 1 and the video collecting device 2 may be a mobile phone, a personal computer, a tablet computer, a personal digital assistant, and the like. It should be noted that, this embodiment is only to simply describe the structures of the electronic device 1 and the video collecting device 2, and the electronic device 1 and the video collecting device 2 may further include other elements, such as a circuit system, a sound effect system, an I/O interface, a battery, an operating system, and the like.
In this embodiment, the camera 11 may be connected to the electronic device 1 in an internal or external manner. The camera 21 may be connected to the video collecting apparatus 2.
The communication devices 12, 22 may be connected to the electronic device 1 and the video capture device 2 via any conventional wired and/or wireless network. The wired network may be any type of conventional wired communication, such as the internet, a local area network. The Wireless network may be of any type of conventional Wireless communication, such as radio, Wireless Fidelity (WIFI), cellular, satellite, broadcast, etc. The wireless communication technology may include, but is not limited to, Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), wideband Code Division Multiple Access (W-CDMA), CDMA2000, IMT Single Carrier (IMT Single Carrier), Enhanced Data rate GSM Evolution (Enhanced Data rate for GSM Evolution), Long Term Evolution (Long-Term Evolution), LTE, advanced Long Term Evolution (LTE), Time-Division Long Term Evolution (TD-LTE), High Performance Radio Local Area Network (High lan), High Performance Wide Area Radio Network (High-Performance Radio Area Network, High-Performance Wide Area Network (wan), Local multi-point Radio Service (wan), and Global Area Network (Microwave Access System, Wide Area Network (lmwide Area Network, Wide Area Network (wan), WiMAX), ZigBee protocol (ZigBee), bluetooth, Orthogonal Frequency Division Multiplexing (Flash Orthogonal-Division Multiplexing, Flash-OFDM), High Capacity space Division Multiple Access (HC-SDMA), Universal Mobile Telecommunications System (UMTS), Universal Mobile Telecommunications System Time Division duplex (UMTS Time Division Multiplexing, UMTS-TDD), Evolved High Speed Packet Access (Evolved High Speed Packet Access, HSPA +), Time Division Synchronous Code Division Multiple Access (TD-SCDMA), Evolved Data optimization (EV-Optimized, EV-DO), digitally Enhanced Cordless communication (Digital Enhanced Cordless Telecommunications, Digital and other core networks, Digital Enhanced Cordless Telecommunications (Digital Enhanced Digital Telecommunications, DECT).
The display 13 may be a Multi-touch panel (Multi-touch panel) supporting Multi-touch, such as a resistive touch screen or a capacitive touch screen. In other embodiments, the display 13 may not be a touch screen, and when information needs to be input into the electronic device 1, the information can be input through an input device, such as a keyboard (not shown), respectively configured on the electronic device 1.
In this embodiment, the memory 14 may be used for storing various types of data of the electronic device 1, for example, the memory 14 may be used for storing program codes of the video frame arrangement system 10. In one embodiment, the memory 14 may be a memory of the electronic device 1 itself, or may be an external memory Card, such as a Secure Digital Card (SD Card).
The processor 15 may be a Central Processing Unit (CPU), a microprocessor, or any processor chip capable of performing data Processing functions.
In this embodiment, the video frame alignment system 10 can generate a window according to the size of the display 13 (e.g., the resolution of the display 13) and display the window on the display 13. The video frame arrangement system 10 also generates a plurality of video frames corresponding to the videos collected by the cameras 11 and 21. The frame alignment system 10 also aligns the plurality of frames and displays the frames within the windows.
In this embodiment, the maximum size of the window is substantially the same as the size of the display screen.
In this embodiment, the video frame alignment system 10 may include one or more computer instructions in the form of a program that is stored in the memory 14 and executed by the processor 15 to implement the functions provided by the present invention. Referring to fig. 2, in the present embodiment, the video frame arrangement system 10 can be divided into a generation module 101, an analysis module 102, and an arrangement module 103. The modules referred to in the present invention are program segments capable of performing a specific function, and are more suitable than programs for describing the execution process of software in the electronic device 1, and the detailed functions of the modules will be described in detail below.
FIG. 3 is a flow chart of a video frame arrangement method according to a preferred embodiment of the present invention. The execution order of the steps in the flowchart shown in fig. 3 may be changed and some steps may be omitted according to different requirements.
In step S31, the generating module 101 generates a window according to the size of the display screen 13 (e.g., the resolution of the display screen 13) and displays the window on the display screen 13. The size of the window may be equal to the size of the display screen 13.
The analysis module 102 determines that X video frames need to be generated according to the total number X of the cameras acquiring the video. The X video frames are respectively used for correspondingly playing videos collected by the X cameras. That is, the total number of video frames is the same as the total number of the cameras for acquiring the video.
The analysis module 102 determines a primary video frame from the X video frames, and the other X-1 are secondary video frames. The main video frame is used for playing a video collected by one of the X cameras. The X-1 auxiliary video frames are used for playing videos collected by other X-1 cameras.
In this embodiment, the analysis module 102 may respond to the user's input to determine which camera is used to play the main video frame. In other embodiments, the analysis module 101 may directly determine that the main video frame is used for playing a video captured by a camera (i.e., the camera 11) disposed in the electronic device 1.
For example, in a video teleconference, there are 6 conference rooms in total, where the conference room where the electronic device 1 is located is a main conference room, and the conference rooms where the other 5 video collecting devices 2 are respectively located are sub conference rooms, the generating module 101 may determine, in response to the input of the user, that the main video frame plays the video collected by the camera 11 of the electronic device 1, and determine that the other 5 video frames (i.e., sub video frames) are respectively used for playing the videos collected by the cameras 21 of the other 5 video collecting devices 2.
The generating module 101 generates the primary video frame according to the length of the window and a preset length-width ratio (e.g., 2: 1).
In one embodiment, the length of the primary window frame and the length of the window may be equal. For example, assuming that the window has a length of 100cm and a width of 80cm, the generating module 101 may generate a primary view frame having a length of 100cm and a width of 50 cm.
The alignment module 103 displays the generated main video frame in the window.
In one embodiment, the primary frames may be arranged within the window in a manner that is centered horizontally and aligned vertically against the upper boundary of the window.
For example, referring to FIG. 4A, the queue module 103 displays the generated primary frame 14 within the window 131. It should be noted that the length of the window 131 and the main frame 14 are drawn to be smaller than the length of the display 13 in the drawings of the present embodiment for clarity of the invention.
In step S32, the analysis module 102 determines the width of the remaining layout of the window, and calculates a reference length according to the width of the remaining layout of the window and the preset length-width ratio. The reference length is equal to the product of the width of the remaining panels and the ratio of the length to the width.
In this embodiment, the remaining layout of the window may be defined as an area (e.g., the area 16 shown in fig. 4A) of the window where the primary frame is not arranged. Accordingly, the area occupied by the primary video frame in the window can be defined as the video frame arrangement layout.
Still in the previous example, assume that the window is 100cm long and 80cm wide, and the primary frame is 100cm long and 50cm wide. Then the width of the current remaining layout of the window is 30 cm. The reference length then equals 60 cm.
In step S33, the analysis module 102 calculates the total reference length of the X-1 sub-frames according to the reference length. The reference total length is equal to the product of the reference length and the value of X-1.
Still taking the previous example as an example, assuming that X is equal to 6, the reference length is equal to 60 cm. The analysis module 102 calculates that the total reference length is equal to 300 cm.
In step S34, the analysis module 102 determines whether the reference total length is greater than the length of the window. If the reference total length is less than or equal to the length of the window, step S35 is executed. If the reference total length is greater than the length of the window, step S36 is executed.
For example, when the total reference length is calculated to be equal to 300cm, the process proceeds to step S36 because the total reference length is greater than the length of the window by 100 cm.
In step S35, if the total reference length is less than or equal to the window length, the generating module 101 determines that the width of each sub-view frame is equal to the width of the current remaining layout, and the length of each sub-view frame is the reference length, and generates X-1 sub-view frames accordingly (i.e., the width of each sub-view frame in the X-1 generated sub-view frames is equal to the width of the current remaining layout, and the length of each sub-view frame is equal to the reference length). The arrangement module 103 arranges the X-1 secondary video frames in the same row and displays them on the remaining pages of the window.
For example, referring to FIG. 4B, the alignment module 103 aligns 5 secondary video frames 141, 142, 143, 144, 145 in the remaining layout 16 of the window.
In step S36, if the reference total length is greater than the length of the window, the analysis module 102 determines that the X-1 auxiliary video frames are arranged according to the total row number R. The analysis module 102 calculates a total number Y (hereinafter referred to as "second total number") of the sub video frames arranged at most per row according to the total number R and the total number X-1 (hereinafter referred to as "first total number") of the sub video frames. The analysis module 102 further calculates a target size of each sub-frame according to the size of the window and the calculated second total number Y.
In one embodiment, the second total number Y is equal to the first total number X-1 divided by the current total number of rows R. In one embodiment, if the first total number X-1 divided by the current total number R has decimal places, the value after the decimal place is unconditionally carried.
In one embodiment, the step of the analysis module 102 calculating the target size of each sub-frame comprises: the length of the window is divided by the second total number Y to obtain the target length of each secondary video frame, and then the target width of each secondary video frame is obtained according to the preset length-width ratio (for example, 2: 1). And taking the calculated target length of each sub-view frame and the target width of each sub-view frame as the target size of each sub-view frame.
For example, still taking the previous example as an example, assuming that 5 sub-video frames are required to be generated, the window has a length of 100cm and a width of 80cm, the preset length-width ratio is 2:1, and assuming that the current total number of rows R is equal to 1, it is determined that the 5 sub-video frames are arranged in a row, the target length of each current video frame can be calculated to be 20cm, and then the target width of each current sub-video frame can be calculated to be 10cm according to the preset length-width ratio (e.g., 2: 1). From this, the target size of each sub-frame is calculated to be 20cm long and 10cm wide.
In this embodiment, the analysis module 102 sets the total number of rows R to 1 when setting the total number of rows R for the first time, i.e. all the secondary video frames are arranged in the same row. In one embodiment, the analysis module 102 may set the total number of rows R for the first time in response to a user input. For example, the analysis module 102 may provide a user interface for a user to input the value of the total number of rows R.
In step S37, the analysis module 102 analyzes whether the X-1 sub video frames can be arranged according to R +1 rows. If the X-1 sub-frames can be arranged in R +1 rows, step S38 is performed. If the X-1 sub-frames cannot be arranged according to the R +1 row, step S39 is executed.
In this embodiment, the analysis module 102 determines whether the X-1 secondary video frames can be arranged according to the R +1 line according to the width of the current remaining layout and the current target size of the secondary video frames. Specifically, the analysis module 102 divides the width of the remaining layout by the target width of each sub-video frame to obtain a value (if there is a decimal, the decimal place is unconditionally discarded), and when the value is greater than the total row number R, it is determined that the X-1 sub-video frames can be arranged according to the row number R + 1. Otherwise, when the value is less than or equal to the total number of rows R, it is determined that the X-1 sub-frames cannot be arranged according to the rows R + 1.
In this embodiment, the remaining layout of the window is the area of the window other than the main video frame.
For example, still in the previous example, assume that the window has a length of 100cm and a width of 80cm, the size of the primary view frame is 100cm and 50cm, the predetermined ratio of length to width is 2:1, and the target size of each secondary view frame is 20cm and 10 cm. The width of the remaining layout of the window is 30 cm. The analysis module 102 divides the width of the current remaining layout by the currently calculated target width of 10cm of each secondary video frame to obtain a value of 3, where the value of 3 is greater than the value of the current total row number R (i.e. 1), that is, 2 rows of secondary video frames may actually be rearranged, and then step S38 is executed.
In step S38, when the X-1 sub-frames can be arranged according to R +1 lines, the analysis module 102 adds 1 to the total number of current lines R (i.e., R +1), and returns to step S36 after step S38 is completed.
For example, the analysis module 102 adds 1 to the current total line number R to obtain the current total line number of 2 lines, and when the step S36 is returned, the analysis module 102 determines that the current total line number R is 2 lines. The analysis module 102 calculates the current second total number Y (i.e. the total number of the sub-frames arranged at most in each row) to be equal to 3 according to the current total number R (i.e. 2 rows) and the first total number X-1 (e.g. 5).
In step S39, when the X-1 secondary video frames may not be arranged according to R +1 rows, the analysis module 102 determines that the X-1 secondary video frames may only be arranged according to R rows. The analysis module 102 divides the width of the current remaining layout by the current total row number R to calculate the actual width of each secondary video frame. The analysis module 102 further calculates an actual length of each sub-frame according to the actual width and the preset length-width ratio. The generating module 101 generates X-1 sub-frames according to the actual length and the actual width, that is, the length of each generated sub-frame is equal to the calculated actual length, and the width of each generated sub-frame is equal to the calculated actual width. The arranging module 103 arranges and displays the generated X-1 auxiliary frames in the remaining layout of the window according to the current total row number R and the calculated second total number Y.
In one embodiment, the arrangement module 103 arranges each row of the secondary video frames according to the arrangement of the primary video frames. For example, when the X-1 sub-views are all arranged in the same column, the X-1 sub-views are aligned centrally in the horizontal direction and aligned vertically near the lower boundary of the main view. Correspondingly, if the X-1 auxiliary video frames need to be arranged according to multiple lines, the auxiliary video frames are sequentially arranged from left to right and from top to bottom on the premise of the arrangement mode.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the above preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims (10)
1. A method for arranging video frames is applied to electronic equipment comprising a display screen, and is characterized by comprising the following steps:
generating a window and displaying the window on the display screen;
determining X video frames to be generated according to the total number X of the cameras for collecting the videos, wherein the X video frames are respectively used for correspondingly playing the videos collected by the X cameras;
determining a primary video frame and X-1 secondary video frames from the X video frames;
generating the main video frame according to the length of the window and a preset length-width ratio, and displaying the generated main video frame in the window;
determining the width of the residual layout of the window, and calculating to obtain a reference length according to the width of the residual layout of the window and the preset length-width ratio;
calculating a reference total length of the X-1 sub-video frames according to the reference length, wherein the reference total length is equal to a product of the reference length and a value of the X-1;
when the total length of the reference is smaller than or equal to the length of the window, determining that the width of each secondary video frame is equal to the width of the current residual layout, the length of each secondary video frame is equal to the reference length, correspondingly generating X-1 secondary video frames, and arranging the X-1 secondary video frames to the same line and displaying the same on the residual layout of the window;
when the reference total length is larger than the length of the window, determining that the X-1 auxiliary video frames are arranged according to a total row number R; calculating the total number Y of the most arranged auxiliary video frames in each line at present according to the total line number R and the total number X-1 of the auxiliary video frames; calculating the target size of each secondary video frame according to the size of the window and the total number Y obtained by calculation; when the target size of each sub-video frame is obtained through calculation, judging whether the X-1 sub-video frames can be arranged according to R +1 lines, and when the X-1 sub-video frames can be arranged according to R +1 lines, adding 1 to the current total line number R, and recalculating the total number Y and the target size; when the X-1 auxiliary video frames can not be arranged according to the R +1 lines, dividing the width of the current residual layout by the current total line number R to calculate the actual width of each auxiliary video frame, calculating the actual length of each auxiliary video frame according to the actual width and the preset length-width ratio, and generating X-1 auxiliary video frames according to the actual length and the actual width; and arranging and displaying the generated X-1 auxiliary video frames in the residual layout of the window according to the current total line number R and the calculated total number Y.
2. The method of claim 1, wherein the size of the window is equal to the size of the display screen.
3. The method of claim 1, wherein the total number Y is equal to the total number X-1 divided by the current total number of rows R, and if the total number X-1 divided by the current total number of rows R has decimal places, the value before the decimal place is unconditionally carried.
4. The method of claim 1, wherein the step of calculating the target size for each sub-frame comprises:
dividing the length of the window by the total number Y to obtain the target length of each secondary video frame; and
and calculating the target width of each secondary video frame according to the preset length-width ratio, and taking the calculated target length of each secondary video frame and the calculated target width of each secondary video frame as the target size of each secondary video frame.
5. The method of claim 1, wherein R is set to 1 when the total number of rows R is first set.
6. An electronic device, comprising:
a display screen;
a memory;
a processor;
the memory has stored therein computer instructions, execution of which by the processor causes the processor to perform the steps of:
generating a window and displaying the window on the display screen;
determining X video frames to be generated according to the total number X of the cameras for collecting the videos, wherein the X video frames are respectively used for correspondingly playing the videos collected by the X cameras;
determining a primary video frame and X-1 secondary video frames from the X video frames;
generating the main video frame according to the length of the window and a preset length-width ratio, and displaying the generated main video frame in the window;
determining the width of the residual layout of the window, and calculating to obtain a reference length according to the width of the residual layout of the window and the preset length-width ratio;
calculating a reference total length of the X-1 sub-video frames according to the reference length, wherein the reference total length is equal to a product of the reference length and a value of the X-1;
when the total length of the reference is smaller than or equal to the length of the window, determining that the width of each secondary video frame is equal to the width of the current residual layout, the length of each secondary video frame is equal to the reference length, correspondingly generating X-1 secondary video frames, and arranging the X-1 secondary video frames to the same line and displaying the same on the residual layout of the window;
when the reference total length is larger than the length of the window, determining that the X-1 auxiliary video frames are arranged according to a total row number R; calculating the total number Y of the most arranged auxiliary video frames in each line at present according to the total line number R and the total number X-1 of the auxiliary video frames; calculating the target size of each secondary video frame according to the size of the window and the total number Y obtained by calculation; when the target size of each sub-video frame is obtained through calculation, judging whether the X-1 sub-video frames can be arranged according to R +1 lines, and when the X-1 sub-video frames can be arranged according to R +1 lines, adding 1 to the current total line number R, and recalculating the total number Y and the target size; when the X-1 auxiliary video frames can not be arranged according to the R +1 lines, dividing the width of the current residual layout by the current total line number R to calculate the actual width of each auxiliary video frame, calculating the actual length of each auxiliary video frame according to the actual width and the preset length-width ratio, and generating X-1 auxiliary video frames according to the actual length and the actual width; and arranging and displaying the generated X-1 auxiliary video frames in the residual layout of the window according to the current total line number R and the calculated total number Y.
7. The electronic device of claim 6, wherein the size of the window is equal to the size of the display screen.
8. The electronic device of claim 6, wherein the total number Y is equal to the total number X-1 divided by the current total number of rows R, and if the total number X-1 divided by the current total number of rows R has decimal places, the value before the decimal place is unconditionally carried.
9. The electronic device of claim 6, wherein the step of calculating the target size for each sub-frame comprises:
dividing the length of the window by the total number Y to obtain the target length of each secondary video frame; and
and calculating the target width of each secondary video frame according to the preset length-width ratio, and taking the calculated target length of each secondary video frame and the calculated target width of each secondary video frame as the target size of each secondary video frame.
10. The electronic device of claim 6, wherein when the total number of rows R is first set, R is set to 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710667015.7A CN109375887B (en) | 2017-08-03 | 2017-08-03 | Electronic equipment and video frame arrangement method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710667015.7A CN109375887B (en) | 2017-08-03 | 2017-08-03 | Electronic equipment and video frame arrangement method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109375887A CN109375887A (en) | 2019-02-22 |
CN109375887B true CN109375887B (en) | 2022-04-26 |
Family
ID=65403604
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710667015.7A Active CN109375887B (en) | 2017-08-03 | 2017-08-03 | Electronic equipment and video frame arrangement method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109375887B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102724528A (en) * | 2012-05-18 | 2012-10-10 | 清华大学 | Depth map generation device |
CN103702225A (en) * | 2013-12-26 | 2014-04-02 | 乐视网信息技术(北京)股份有限公司 | Method and device for locating element display positions in playing record display area |
CN103970894A (en) * | 2014-05-27 | 2014-08-06 | 合一网络技术(北京)有限公司 | Method and system for displaying interface streaming layout in adaptive adjustment mode |
CN105407312A (en) * | 2014-09-01 | 2016-03-16 | 鸿富锦精密工业(深圳)有限公司 | Video letter server, video letter terminal, and method for sending video letter |
CN105468347A (en) * | 2014-09-05 | 2016-04-06 | 富泰华工业(深圳)有限公司 | System and method for pausing video play |
CN106921866A (en) * | 2017-05-03 | 2017-07-04 | 广州华多网络科技有限公司 | The live many video guide's methods and apparatus of auxiliary |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102090962B1 (en) * | 2015-04-14 | 2020-03-19 | 캐논 가부시끼가이샤 | Image display apparatus and method for controlling the same |
-
2017
- 2017-08-03 CN CN201710667015.7A patent/CN109375887B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102724528A (en) * | 2012-05-18 | 2012-10-10 | 清华大学 | Depth map generation device |
CN103702225A (en) * | 2013-12-26 | 2014-04-02 | 乐视网信息技术(北京)股份有限公司 | Method and device for locating element display positions in playing record display area |
CN103970894A (en) * | 2014-05-27 | 2014-08-06 | 合一网络技术(北京)有限公司 | Method and system for displaying interface streaming layout in adaptive adjustment mode |
CN105407312A (en) * | 2014-09-01 | 2016-03-16 | 鸿富锦精密工业(深圳)有限公司 | Video letter server, video letter terminal, and method for sending video letter |
CN105468347A (en) * | 2014-09-05 | 2016-04-06 | 富泰华工业(深圳)有限公司 | System and method for pausing video play |
CN106921866A (en) * | 2017-05-03 | 2017-07-04 | 广州华多网络科技有限公司 | The live many video guide's methods and apparatus of auxiliary |
Also Published As
Publication number | Publication date |
---|---|
CN109375887A (en) | 2019-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9696958B2 (en) | Method and system for presenting content | |
CN103970417A (en) | Information processing method and electronic equipment | |
CN102866831A (en) | Method and device and mobile terminal for adjusting desktop icons | |
CN102662360B (en) | Wireless control system and method for remote device | |
EP2728497A2 (en) | Object based server page reception in electronic device | |
CN103744591B (en) | A kind of switching method and device for showing the page | |
EP2894544A1 (en) | Display apparatus and method for controlling display apparatus thereof | |
EP4343512A1 (en) | Control display method and apparatus, device, and medium | |
EP2871826B1 (en) | Method, device and terminal for adjusting widget | |
TWI622291B (en) | Electronic device and method for arranging video boxes | |
CN110163051B (en) | Text extraction method, device and storage medium | |
CN109992337B (en) | Webpage display method and device and storage medium | |
CN104571904B (en) | A kind of information processing method and electronic equipment | |
CN112905134A (en) | Method and device for refreshing display and electronic equipment | |
US20150015730A1 (en) | Apparatus and method for obtaining image | |
CN105700767B (en) | The stacked display system of file and method | |
US20140129979A1 (en) | Display device and list display method thereof | |
CN104423774B (en) | It is a kind of that the method and apparatus that right-hand man operates mobile terminal is determined based on finger print information | |
CN109375887B (en) | Electronic equipment and video frame arrangement method | |
US20150262332A1 (en) | Image processing method and electronic device supporting the same | |
CN105005550A (en) | Table generation method and apparatus | |
WO2018214684A1 (en) | Method and device for loading page data, electronic apparatus, and computer readable storage medium | |
US10140258B2 (en) | Portable device and image displaying method thereof | |
TWI628953B (en) | Electronic device and method for arranging video boxes on display | |
CN109388358B (en) | Electronic equipment and video frame arrangement method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TG01 | Patent term adjustment |