CN109934769B - Method, terminal and storage medium for long screenshot of screen - Google Patents
Method, terminal and storage medium for long screenshot of screen Download PDFInfo
- Publication number
- CN109934769B CN109934769B CN201910345281.7A CN201910345281A CN109934769B CN 109934769 B CN109934769 B CN 109934769B CN 201910345281 A CN201910345281 A CN 201910345281A CN 109934769 B CN109934769 B CN 109934769B
- Authority
- CN
- China
- Prior art keywords
- full screen
- screen shot
- area
- screenshot
- comparison
- 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
Landscapes
- Image Analysis (AREA)
- Telephone Function (AREA)
Abstract
The embodiment of the invention discloses a method, a terminal and a storage medium for long screenshot of a screen, wherein the method comprises the following steps: comparing the first full screen screenshot with the second full screen screenshot, and calculating the displacement of the second full screen screenshot relative to the first full screen screenshot; acquiring a connection line between the first full screen shot and the second full screen shot according to the displacement; and comparing and checking the connection line by the preset checking height, and splicing the first full screen capturing with the second full screen capturing by the connection line only when the comparison and the checking pass, so as to obtain the screen length capturing. The embodiment of the invention judges whether the currently spliced picture is correct or not by adding the checking mechanism so as to reduce the occurrence of the situation of splicing errors of long screenshot.
Description
Technical Field
The embodiment of the invention relates to the technical field of terminal picture processing, in particular to a method for screen long screenshot, a terminal and a storage medium.
Background
As is well known, the process of combining the contents displayed in different screens into a long chart is mainly dependent on the analysis of images, so that in order to obtain the contents of the long chart, the contents should be displayed under the knowledge of the public, the assistance of an algorithm using image analysis is needed. The realization of the current long screenshot is mainly completed through a template matching algorithm, a template is a known small image, template matching is to search for a target in a large image, the target in the image is known to have the same size, direction and image as the template, the target can be found in the image through a certain algorithm, the coordinate position of the target can be determined, so that a connecting line between the front and rear screenshots is obtained, and the splicing of the front and rear screenshots can be realized based on the connecting line, so that the long screenshot is obtained. However, in practical use, we find that this long screen shot implementation has a problem that it relies heavily on the algorithm to obtain the relative displacement of the two pictures, and sometimes the relative displacement is calculated incorrectly, resulting in a spliced picture being wrong, and there is no way to correct it in time.
Disclosure of Invention
The embodiment of the invention mainly aims to provide a method, a terminal and a storage medium for long screen capturing, and aims to solve the technical problems that if calculation errors occur during the acquisition of relative displacement between two spliced screen capturing images, the spliced images are wrong and cannot be corrected in time in the existing long screen capturing mode.
To achieve the above object, an embodiment of the present invention provides a method for long screen capturing, including the following steps: comparing a first full screen screenshot with a second full screen screenshot, and calculating the displacement of the second full screen screenshot relative to the first full screen screenshot; acquiring a connection line between the first full screen shot and the second full screen shot according to the displacement; and comparing and checking the connection line through a preset checking height, and splicing the first full screen shot and the second full screen shot through the connection line only when the comparison and checking are passed, so as to obtain a screen length screenshot.
Optionally, before the step of comparing the first full screen shot with the second full screen shot and calculating the displacement of the second full screen shot relative to the first full screen shot, the method further includes: and intercepting a screen interface before screen sliding to acquire the first full screen capture, and intercepting a screen interface after screen sliding to acquire the second full screen capture.
Optionally, the step of comparing the first full screen capture with the second full screen capture and calculating the displacement of the second full screen capture relative to the first full screen capture specifically includes: dividing the second full screen shot into a first area, a second area, a third area and a fourth area in sequence along the longitudinal direction of the screen; and comparing the first full screen shot with the second area through a template matching algorithm, and finding out the position of the second area in the first full screen shot so as to calculate the displacement.
Optionally, the connection line includes a first connection line and a second connection line, the first connection line is located in the first full screen capturing, the second connection line is located in the second full screen capturing, and the step of obtaining the connection line between the first full screen capturing and the second full screen capturing according to the displacement specifically includes: subtracting the displacement from the height of the first full screen shot to obtain the position of the first connecting line; subtracting the height of the first area from the height of the second full screen shot to obtain the position of the second connecting line.
Optionally, the step of performing comparison verification on the connection line by using a preset verification height specifically includes respectively marking a comparison range of the first connection line and a comparison range of the second connection line based on the preset verification height; and comparing the content included in the comparison range of the first connecting wire with the content included in the comparison range of the second connecting wire through a template matching algorithm so as to realize comparison and verification of the connecting wires.
Optionally, the comparison range of the first connecting wire is that the position of the first connecting wire shifts upwards the preset checking height to the position of the first connecting wire shifts downwards the preset checking height; the comparison range of the second connecting wire is that the position of the second connecting wire shifts upwards by the preset checking height to the position of the second connecting wire shifts downwards by the preset checking height.
Optionally, the step of comparing and checking the connection line by a preset checking height, and only when the comparison and checking pass, splicing the first full screen shot and the second full screen shot by the connection line to obtain a long screen shot further includes: if the comparison verification is not passed, the displacement of the second full screen capture relative to the first full screen capture is recalculated through a standby scheme, and a new connecting line is obtained, so that after the new connecting line passes the comparison verification, the first full screen capture and the second full screen capture are spliced through the new connecting line, and a screen length capture is obtained.
Optionally, the standby scheme specifically includes the following steps: dividing the second full screen shot into a fifth area, a sixth area, a seventh area, an eighth area and a ninth area in sequence along the longitudinal direction of the screen, wherein the sixth area and the seventh area are combined together to form a comparison area; and comparing the first full screen shot with the comparison area through a template matching algorithm, and finding out the position of the comparison area in the first full screen shot so as to calculate the displacement.
In addition, in order to achieve the above object, an embodiment of the present invention also proposes a terminal including a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for implementing connection communication between the processor and the memory, the program implementing the steps of the above method when executed by the processor.
In addition, to achieve the above object, an embodiment of the present invention also proposes a storage medium for computer-readable storage, the storage medium storing one or more programs executable by one or more processors to implement the steps of the above method.
According to the method, the terminal and the storage medium for the screen long screenshot, when the screen long screenshot is carried out, displacement of the second full screen screenshot relative to the first full screen screenshot is calculated when the first full screen screenshot and the second full screen screenshot of the screen long screenshot are compared, a verification mechanism is added after a connection line between the first full screen screenshot and the second full screen screenshot is obtained according to the displacement, so that comparison verification is carried out on the connection line through a preset verification height, and finally, the first full screen screenshot and the second full screen screenshot are spliced through the connection line only when the comparison verification is passed, so that the final screen long screenshot is obtained. In this way, according to the technical scheme, whether the currently spliced picture is correct or not is judged by adding the verification mechanism, so that the situation of splicing errors of long screenshot is reduced.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention.
Fig. 2 is a diagram of a communication system architecture on which the mobile terminal shown in fig. 1 is based.
FIG. 3 is a flowchart of a method for capturing a long screen shot according to an embodiment of the present invention.
Fig. 4 is a specific flowchart of step S110 in the method of the long screenshot shown in fig. 3.
Fig. 5 is a schematic diagram of a first full screen shot in the method of long screen shot shown in fig. 3.
Fig. 6 is a schematic diagram of a second full screen shot in the method of long screen shot shown in fig. 3.
FIG. 7 is a flowchart showing a step S120 in the method of the long screenshot of FIG. 3
Fig. 8 is a flowchart showing a specific step S130 in the method of the long screenshot shown in fig. 3.
Fig. 9 is a schematic diagram of an alignment range division of the first connecting line of the first full screen shot shown in fig. 5.
Fig. 10 is a schematic diagram of an alignment range division of a second connecting line of the second full screen shot shown in fig. 6.
FIG. 11 is a flowchart illustrating a method of generating a long screenshot according to an embodiment of the present invention.
Fig. 12 is a specific flowchart of step S140 in the method of the long screenshot of fig. 11.
Fig. 13 is a block diagram of a second terminal according to the embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present invention, and have no specific meaning per se. Thus, "module," "component," or "unit" may be used in combination.
The terminal may be implemented in various forms. For example, the terminals described in the present invention may include mobile terminals such as cell phones, tablet computers, notebook computers, palm computers, personal digital assistants (Personal Digital Assistant, PDA), portable media players (Portable Media Player, PMP), navigation devices, wearable devices, smart bracelets, pedometers, and fixed terminals such as digital TVs, desktop computers, and the like.
The following description will be given taking a mobile terminal as an example, and those skilled in the art will understand that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for a moving purpose.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention, the mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an a/V (audio/video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will appreciate that the mobile terminal structure shown in fig. 1 is not limiting of the mobile terminal and that the mobile terminal may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The following describes the components of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be used for receiving and transmitting signals during a message or a call, specifically, receiving a downlink message of a base station, and then processing the downlink message with the processor 110; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, global System for Mobile communications), GPRS (General Packet Radio Service ), CDMA2000 (Code Division Multiple Access, CDMA 2000), WCDMA (Wideband Code Division Multiple Access ), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time Division synchronous code Division multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency Division Duplex Long term evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution, time Division Duplex Long term evolution), etc.
WiFi belongs to a short-distance wireless transmission technology, and a mobile terminal can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 102, so that wireless broadband Internet access is provided for the user. Although fig. 1 shows a WiFi module 102, it is understood that it does not belong to the necessary constitution of a mobile terminal, and can be omitted entirely as required within a range that does not change the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the mobile terminal 100. The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive an audio or video signal. The a/V input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, the graphics processor 1041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound into audio data. The processed audio (voice) data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting the audio signal.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the mobile terminal 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; as for other sensors such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured in the mobile phone, the detailed description thereof will be omitted.
The display unit 106 is used to display a message input by a user or a message provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive an input numeric or character message and to generate key signal inputs related to user settings and function control of the mobile terminal. In particular, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1071 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives a touch message from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 110, and can receive commands from the processor 110 and execute them. Further, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc., as specifically not limited herein.
Further, the touch panel 1071 may overlay the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or thereabout, the touch panel 1071 is transferred to the processor 110 to determine the type of touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in fig. 1, the touch panel 1071 and the display panel 1061 are two independent components for implementing the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 may be integrated with the display panel 1061 to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 108 serves as an interface through which at least one external device can be connected with the mobile terminal 100. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data messages, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.
Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power source 111 (e.g., a battery) for supplying power to the respective components, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described herein.
In order to facilitate understanding of the embodiments of the present invention, a communication system on which the mobile terminal of the present invention is based will be described below.
Referring to fig. 2, fig. 2 is a schematic diagram of a communication system according to an embodiment of the present invention, where the communication system is an LTE system of a general mobile communication technology, and the LTE system includes a UE (User Equipment) 201, an e-UTRAN (Evolved UMTS Terrestrial Radio Access Network ) 202, an epc (Evolved Packet Core, evolved packet core) 203, and an IP service 204 of an operator that are sequentially connected in communication.
Specifically, the UE201 may be the terminal 100 described above, and will not be described herein.
The E-UTRAN202 includes eNodeB2021 and other eNodeB2022, etc. The eNodeB2021 may be connected with other eNodeB2022 by a backhaul (e.g., an X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide access from the UE201 to the EPC 203.
EPC203 may include MME (Mobility Management Entity ) 2031, hss (Home Subscriber Server, home subscriber server) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, pgw (PDN Gate Way) 2035 and PCRF (Policy and Charging Rules Function, policy and tariff function entity) 2036, and so on. The MME2031 is a control node that handles signaling between the UE201 and EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location registers (not shown) and to hold subscriber-specific messages regarding service characteristics, data rates, etc. All user data may be sent through SGW2034 and PGW2035 may provide IP address allocation and other functions for UE201, PCRF2036 is a policy and charging control policy decision point for traffic data flows and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem ), or other IP services, etc.
Although the LTE system is described above as an example, it should be understood by those skilled in the art that the present invention is not limited to LTE systems, but may be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new communication systems.
Based on the above mobile terminal hardware structure and the communication system, various embodiments of the method of the present invention are provided.
Example 1
As shown in fig. 3, a method for capturing a long screen shot is provided in an embodiment of the present invention, and the method specifically includes the following steps:
step S110: comparing the first full screen screenshot with the second full screen screenshot, and calculating the displacement of the second full screen screenshot relative to the first full screen screenshot.
Specifically, the composition of the current screen long screenshot mainly comprises two full screen shots before and after the screen slides, namely the two full screen shots are spliced together to obtain the full screen screenshot, so before the step of comparing the first full screen screenshot with the second full screen screenshot and calculating the displacement of the second full screen screenshot relative to the first full screen screenshot is executed, the method further comprises the following steps: intercepting a screen interface before screen sliding to acquire a first full screen capture, and intercepting a screen interface after screen sliding to acquire a second full screen capture.
After the first full screen capturing and the second full screen capturing are sequentially obtained through the steps of the method, the steps of the method can be spliced based on the first full screen capturing and the second full screen capturing, so that the final long screen capturing is obtained. As shown in fig. 4, a final screen shot is obtained by the method of the present screen shot, first, this step is performed to "compare the first full screen shot with the second full screen shot, calculate the displacement of the second full screen shot relative to the first full screen shot", and the specific process includes:
step S111: and dividing the second full screen shot into a first area, a second area, a third area and a fourth area in turn along the longitudinal direction of the screen.
Step S112: and comparing the first full screen shot with the second area through a template matching algorithm, and finding out the position of the second area in the first full screen shot so as to calculate the displacement.
As shown in fig. 5, it is a screen interface before screen sliding that is intercepted to obtain the resulting first full screen shot 100. As shown in fig. 6, the second full screen shot 200 is obtained by capturing a screen interface after the screen slides, according to the above method steps, the second full screen shot 200 is divided into a first area 201, a second area 202, a third area 203 and a fourth area 204 in turn along the longitudinal direction of the screen, then, by means of a template matching algorithm (the template is a known small image, the template matching is searching for a target in a large image, the target is known to have the same size, direction and image as the target in the image, the target can be found in the image by a certain algorithm, and the coordinate position of the target is determined) compared with the first full screen shot 100 and the second area 202 (the reason that the first area 201 is easy to generate an interference area (the top and bottom contents of the full screen shot are often the same due to the existence of the same background), the third area 203 and the fourth area 204 are often newly generated contents, and the displacement is not easy to calculate the displacement, so that the position of the second area 202 in the first full screen shot 100 is found. As shown in fig. 5, the area 101 in the figure is matched with the second area 202, that is, the position of the area 101 in the figure is the position of the second area 202 in the first full screen 100, and finally, the displacement Y of the second full screen 100 relative to the first full screen 100 is calculated by calculating the position of the area 101 in the figure.
Step S120: and acquiring a connection line between the first full screen shot and the second full screen shot according to the displacement.
Specifically, after the displacement Y of the second full screen shot 200 relative to the first full screen shot 100 is calculated through the steps of the method, a connection line between the first full screen shot 100 and the second full screen shot 200 can be obtained according to the displacement Y, the connection line specifically comprises a first connection line and a second connection line, as shown in fig. 5, the first connection line 11 is located in the first full screen shot 100, and the position of the first connection line can be obtained by subtracting the displacement Y from the height H of the first full screen shot 100; as shown in fig. 6, the second connecting line 21 is located in the second full screen 200, and is located at a position where the height H of the first area is subtracted from the height H of the second full screen 200 1 (H in the present embodiment since the second full screen shot in the present embodiment is divided into the first region, the second region, the third region, and the fourth region in this order in the longitudinal direction of the screen 1 =1/4H).
Thus, as shown in fig. 7, the specific process of executing this step of "acquiring the line of engagement between the first full screen shot and the second full screen shot according to the displacement" includes:
step S121: the displacement is subtracted from the height of the first full screen shot to obtain the location of the first line of engagement.
Step S122: subtracting the height of the first area from the height of the second full screen shot to obtain the position of the second connecting line.
Step S130: and comparing and checking the connection line by the preset checking height, and splicing the first full screen shot and the second full screen shot by the connection line only when the comparison and the checking pass, so as to obtain the screen length screenshot.
Specifically, after the positions of the connecting lines (including the first connecting line 11 and the second connecting line 21) between the first full screen shot and the second full screen shot are obtained through the steps of the method, the connecting lines (including the first connecting line 11 and the second connecting line 21) can be compared and checked through a preset checking height, as shown in fig. 8, and the specific process includes:
step S131: and respectively marking out a comparison range of the first connecting wire and a comparison range of the second connecting wire by taking a preset checking height as a reference.
Step S132: and comparing the content included in the comparison range of the first connecting wire with the content included in the comparison range of the second connecting wire through a template matching algorithm so as to realize comparison and verification of the connecting wire.
The pictures are not spliced directly, but the comparison range of the first connecting wire 11 is marked by taking the preset checking height X as a reference, as shown in fig. 9, specifically, the position of the first connecting wire 11 is shifted upwards by the preset checking height X to the position of the first connecting wire 11 is shifted downwards by the preset checking height X (namely, the area H-Y+X- & gt surrounded by two broken lines in fig. 9)>H-Y-X); as shown in fig. 10, the comparison range of the second connecting wire 21 is defined, specifically, the position of the second connecting wire 21 is shifted upward by a preset check height X to the position of the second connecting wire 21 is shifted downward by a preset check height X (i.e.Region H-H enclosed by two dotted lines in FIG. 10 1 +X-->H-H 1 -X). Next, the comparison range of the first connecting line 11 (i.e., the region H-Y+X-surrounded by two dotted lines in FIG. 9) is compared by the template matching algorithm>H-Y-X) includes a comparison range of the content and the second connecting line (i.e., a region H-H surrounded by two broken lines in FIG. 10) 1 +X-->H-H 1 -X) comparing the content comprised in the link line to achieve a comparison check of the link line. At this time, if the previously calculated displacement Y value is accurate (the corresponding obtained join line is also accurate), the comparison range of the first join line 11 (i.e., the region H-Y+X- > surrounded by two broken lines in FIG. 9)>H-Y-X) includes a comparison range of the content and the second connecting line (i.e., a region H-H surrounded by two broken lines in FIG. 10) 1 +X-->H-H 1 X) should be identical, and comparing the two areas by the template matching algorithm, if the relative displacement is returned to be 0, the displacement Y calculated before is correct (the corresponding acquired connecting line is also accurate), and the first full screen screenshot and the second full screen screenshot are spliced by the connecting line, so that the accurate long screen screenshot can be finally acquired.
In addition, as shown in fig. 11, after the step of performing the present step of performing the comparison and verification on the connection line by the preset verification height, only when the comparison and verification pass, the first full screen capturing and the second full screen capturing are spliced by the connection line, so as to obtain a long screen capturing, the method further includes:
step S140: if the comparison verification is not passed, the displacement of the second full screen capture relative to the first full screen capture is recalculated through a standby scheme, and a new connection line is obtained, so that after the new connection line passes the comparison verification, the first full screen capture and the second full screen capture are spliced through the new connection line, and a screen length capture is obtained.
Specifically, if the return relative displacement is 0, it indicates that the displacement Y calculated before is correct (the corresponding acquired connection line is also accurate), and indicates that the first full screen shot and the second full screen shot are spliced through the connection line, so that an accurate screen length screenshot can be finally acquired. Otherwise, if the return relative displacement is not 0, the calculated displacement Y is wrong, the first full screen screenshot and the second full screen screenshot cannot be spliced through the connecting line (at this time, if the first full screen screenshot and the second full screen screenshot are spliced through the connecting line, splicing errors are generated), at this time, the displacement of the second full screen screenshot relative to the first full screen screenshot can be recalculated through a further new scheme, namely, a standby scheme, and a new connecting line is acquired, so that after the new connecting line passes the comparison verification, the first full screen screenshot and the second full screen screenshot are spliced through the new connecting line, and a screen length screenshot is obtained. As shown in fig. 12, the standby scheme preferably includes the steps of:
step S141: and dividing the second full screen shot into a fifth area, a sixth area, a seventh area, an eighth area and a ninth area in turn along the longitudinal direction of the screen, wherein the sixth area and the seventh area are combined together to form a comparison area.
Step S142: and comparing the first full screen shot with the comparison area through a template matching algorithm, and finding out the position of the comparison area in the first full screen shot so as to calculate the displacement.
The basic principle of calculating the displacement of the second full screen capturing relative to the first full screen capturing through the standby scheme is the same as that of the original scheme, and the difference is that the standby scheme improves the calculation precision of the displacement by changing the area for comparison in the second full screen capturing (increasing the area of the comparison area), so as to continuously perfect the long screen capturing to obtain a correct result. Thus, other alternative schemes may be implemented similarly to those skilled in the art.
Example two
As shown in fig. 13, a second embodiment of the present invention proposes a terminal 30, where the terminal 30 includes a memory 31, a processor 32, a program stored on the memory and capable of running on the processor, and a data bus 33 for implementing connection communication between the processor 31 and the memory 32, and the program is executed by the processor to implement the steps of the method for long screen capturing in the first embodiment, which is specifically described above and not repeated herein.
It should be noted that, the embodiment of the terminal 30 and the embodiment of the method in the embodiment of the present invention belong to the same concept, the detailed implementation process of the embodiment of the method is shown in the embodiment of the method, and the technical features in the embodiment of the method are correspondingly applicable in the embodiment of the terminal 30, which is not repeated herein.
Example III
The third embodiment of the present invention proposes a storage medium for computer readable storage, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement the specific steps of the method for long screen shots in the first embodiment.
It should be noted that the storage medium and the method embodiment belong to the same concept, the detailed implementation process of the storage medium and the method embodiment one are shown in the method embodiment one, and the technical features in the method embodiment one are correspondingly applicable to the storage medium embodiment, which is not repeated herein.
According to the method, the terminal and the storage medium for the screen long screenshot, when the screen long screenshot is carried out, displacement of the second full screen screenshot relative to the first full screen screenshot is calculated when the first full screen screenshot and the second full screen screenshot of the screen long screenshot are compared, a verification mechanism is added after a connection line between the first full screen screenshot and the second full screen screenshot is obtained according to the displacement, so that comparison verification is carried out on the connection line through a preset verification height, and finally, the first full screen screenshot and the second full screen screenshot are spliced through the connection line only when the comparison verification is passed, so that the final screen long screenshot is obtained. In this way, according to the technical scheme, whether the currently spliced picture is correct or not is judged by adding the verification mechanism, so that the situation of splicing errors of long screenshot is reduced.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.
Claims (7)
1. A method of screen shot length, the method comprising the steps of:
comparing a first full screen screenshot with a second full screen screenshot, and calculating the displacement of the second full screen screenshot relative to the first full screen screenshot;
acquiring a connection line between the first full screen shot and the second full screen shot according to the displacement;
comparing and checking the connection line through a preset checking height, and splicing the first full screen shot and the second full screen shot through the connection line only when the comparison and checking are passed, so as to obtain a screen length screenshot;
the step of comparing the first full screen screenshot with the second full screen screenshot and calculating the displacement of the second full screen screenshot relative to the first full screen screenshot specifically comprises the following steps:
dividing the second full screen shot into a first area, a second area, a third area and a fourth area in sequence along the longitudinal direction of the screen;
comparing the first full screen shot with the second area through a template matching algorithm, and finding out the position of the second area in the first full screen shot so as to calculate the displacement;
the connecting line comprises a first connecting line and a second connecting line, the first connecting line is positioned in the first full screen shot, the second connecting line is positioned in the second full screen shot, and the step of acquiring the connecting line between the first full screen shot and the second full screen shot according to the displacement specifically comprises the following steps:
subtracting the displacement from the height of the first full screen shot to obtain the position of the first connecting line;
subtracting the height of the first area from the height of the second full screen shot to obtain the position of the second connecting line;
the step of comparing and checking the connection line through the preset checking height, and only when the comparison and checking pass, splicing the first full screen shot and the second full screen shot through the connection line to obtain a screen long screen shot, further comprises the following steps:
if the comparison verification is not passed, the displacement of the second full screen capture relative to the first full screen capture is recalculated through a standby scheme, and a new connecting line is obtained, so that after the new connecting line passes the comparison verification, the first full screen capture and the second full screen capture are spliced through the new connecting line, and a screen length capture is obtained.
2. The method of claim 1, wherein the step of comparing the first full screen shot with the second full screen shot and calculating the displacement of the second full screen shot relative to the first full screen shot is preceded by the step of:
and intercepting a screen interface before screen sliding to acquire the first full screen capture, and intercepting a screen interface after screen sliding to acquire the second full screen capture.
3. The method according to claim 1, wherein the step of comparing the connection lines by a preset checking height specifically includes:
drawing a comparison range of the first connecting wire and a comparison range of the second connecting wire respectively by taking the preset checking height as a reference;
and comparing the content included in the comparison range of the first connecting wire with the content included in the comparison range of the second connecting wire through a template matching algorithm so as to realize comparison and verification of the connecting wires.
4. A method according to claim 3, wherein the alignment of the first line of engagement is in a range where the first line of engagement is displaced upwardly by the preset check height to the position where the first line of engagement is displaced downwardly by the preset check height; the comparison range of the second connecting wire is that the position of the second connecting wire shifts upwards by the preset checking height to the position of the second connecting wire shifts downwards by the preset checking height.
5. The method according to claim 1, characterized in that the standby scheme comprises in particular the following steps:
dividing the second full screen shot into a fifth area, a sixth area, a seventh area, an eighth area and a ninth area in sequence along the longitudinal direction of the screen, wherein the sixth area and the seventh area are combined together to form a comparison area;
and comparing the first full screen shot with the comparison area through a template matching algorithm, and finding out the position of the comparison area in the first full screen shot so as to calculate the displacement.
6. A terminal, comprising: a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for enabling a connected communication between the processor and the memory, which program, when being executed by the processor, implements the steps of the method according to any of claims 1-5.
7. A storage medium for computer readable storage, wherein the storage medium stores one or more programs executable by one or more processors to implement the steps of the method of any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910345281.7A CN109934769B (en) | 2019-04-26 | 2019-04-26 | Method, terminal and storage medium for long screenshot of screen |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910345281.7A CN109934769B (en) | 2019-04-26 | 2019-04-26 | Method, terminal and storage medium for long screenshot of screen |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109934769A CN109934769A (en) | 2019-06-25 |
CN109934769B true CN109934769B (en) | 2023-09-19 |
Family
ID=66991044
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910345281.7A Active CN109934769B (en) | 2019-04-26 | 2019-04-26 | Method, terminal and storage medium for long screenshot of screen |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109934769B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110475016B (en) * | 2019-07-10 | 2021-05-04 | 努比亚技术有限公司 | Long screen capture control method, terminal and computer readable storage medium |
CN110456969B (en) * | 2019-07-10 | 2022-09-27 | 努比亚技术有限公司 | Long screenshot implementation method, terminal and computer readable storage medium |
CN110764852B (en) * | 2019-08-27 | 2023-08-22 | 努比亚技术有限公司 | Screenshot method, terminal and computer readable storage medium |
CN115268741B (en) * | 2021-04-30 | 2024-09-24 | 华为技术有限公司 | Screen capturing method, graphical interface and electronic equipment |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106296577A (en) * | 2015-05-19 | 2017-01-04 | 富士通株式会社 | Image split-joint method and image mosaic device |
CN106502507A (en) * | 2016-11-01 | 2017-03-15 | 上海传英信息技术有限公司 | Screenshotss method and mobile terminal |
CN106527906A (en) * | 2016-10-31 | 2017-03-22 | 维沃移动通信有限公司 | Picture capture method and mobile terminal |
CN106775301A (en) * | 2016-11-29 | 2017-05-31 | 珠海市魅族科技有限公司 | The screenshot method and terminal device of a kind of terminal |
CN107229401A (en) * | 2017-04-18 | 2017-10-03 | 硕诺科技(深圳)有限公司 | A kind of long screenshotss method of mobile terminal |
WO2018072413A1 (en) * | 2016-10-19 | 2018-04-26 | 中兴通讯股份有限公司 | Terminal screenshot method and apparatus, and mobile terminal and storage medium |
CN108037871A (en) * | 2017-11-07 | 2018-05-15 | 维沃移动通信有限公司 | Screenshotss method and mobile terminal |
CN108681428A (en) * | 2018-04-04 | 2018-10-19 | 四川巧夺天工信息安全智能设备有限公司 | A kind of rolling screenshotss method under windows systems |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9015037B2 (en) * | 2011-06-10 | 2015-04-21 | Linkedin Corporation | Interactive fact checking system |
KR20180039529A (en) * | 2016-10-10 | 2018-04-18 | 엘지전자 주식회사 | Mobile terminal and operating method thereof |
-
2019
- 2019-04-26 CN CN201910345281.7A patent/CN109934769B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106296577A (en) * | 2015-05-19 | 2017-01-04 | 富士通株式会社 | Image split-joint method and image mosaic device |
WO2018072413A1 (en) * | 2016-10-19 | 2018-04-26 | 中兴通讯股份有限公司 | Terminal screenshot method and apparatus, and mobile terminal and storage medium |
CN106527906A (en) * | 2016-10-31 | 2017-03-22 | 维沃移动通信有限公司 | Picture capture method and mobile terminal |
CN106502507A (en) * | 2016-11-01 | 2017-03-15 | 上海传英信息技术有限公司 | Screenshotss method and mobile terminal |
CN106775301A (en) * | 2016-11-29 | 2017-05-31 | 珠海市魅族科技有限公司 | The screenshot method and terminal device of a kind of terminal |
CN107229401A (en) * | 2017-04-18 | 2017-10-03 | 硕诺科技(深圳)有限公司 | A kind of long screenshotss method of mobile terminal |
CN108037871A (en) * | 2017-11-07 | 2018-05-15 | 维沃移动通信有限公司 | Screenshotss method and mobile terminal |
CN108681428A (en) * | 2018-04-04 | 2018-10-19 | 四川巧夺天工信息安全智能设备有限公司 | A kind of rolling screenshotss method under windows systems |
Non-Patent Citations (1)
Title |
---|
"A framework for supporting the recall of the scenes in complicated documenting processes using screenshots";Masahiro Seino 等;2017 IEEE International Conference on Cybernetics and Computational Intelligence (CyberneticsCom);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN109934769A (en) | 2019-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109934769B (en) | Method, terminal and storage medium for long screenshot of screen | |
CN108512625B (en) | Anti-interference method for camera, mobile terminal and storage medium | |
CN109195213B (en) | Mobile terminal screen control method, mobile terminal and computer readable storage medium | |
CN110009004B (en) | Image data processing method, computer device, and storage medium | |
CN109144705B (en) | Application management method, mobile terminal and computer readable storage medium | |
CN110180181B (en) | Method and device for capturing wonderful moment video and computer readable storage medium | |
CN109471579B (en) | Terminal screen information layout adjustment method and device, mobile terminal and storage medium | |
CN110189368B (en) | Image registration method, mobile terminal and computer readable storage medium | |
CN110113779B (en) | eSIM card testing method, system and medium | |
CN109840444B (en) | Code scanning identification method, equipment and computer readable storage medium | |
CN109582981B (en) | Translation method based on mobile terminal, mobile terminal and readable storage medium | |
CN109816619B (en) | Image fusion method, device, terminal and computer readable storage medium | |
CN112637410B (en) | Method, terminal and storage medium for displaying message notification | |
CN109389394B (en) | Multi-screen payment control method, equipment and computer readable storage medium | |
CN113301251B (en) | Auxiliary shooting method, mobile terminal and computer readable storage medium | |
CN109711850B (en) | Secure payment method, device and computer readable storage medium | |
CN110069320B (en) | Classification correction method, terminal, system and storage medium for application program | |
CN112866685A (en) | Screen projection delay measuring method, mobile terminal and computer readable storage medium | |
CN110334559B (en) | Code scanning identification method, terminal and computer readable storage medium | |
CN109462829B (en) | Call transfer method, device and computer readable storage medium | |
CN109740121B (en) | Search method of mobile terminal, mobile terminal and storage medium | |
CN107562304B (en) | Control method, mobile terminal and computer readable storage medium | |
CN107256108B (en) | Screen splitting method, device and computer readable storage medium | |
CN111476231B (en) | Image area identification method, device and computer readable storage medium | |
CN112954225B (en) | Multi-frame picture shooting method and device and computer readable storage medium |
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 |