Screen capturing method and device
Technical Field
The application relates to the technical field of mobile terminals, in particular to a screen capturing method and device for a mobile terminal.
Background
With the popularization of intelligent mobile terminals, more and more people need to store the content of a screen when using the mobile terminals, and generally, the whole screen is intercepted intelligently through hardware buttons or software operation or gestures. However, people often need only a part of the screen, and the whole screen has to be intercepted and then edited in image application software, and the screen can be used after operations such as cutting, marking and the like, and the steps are various. With the increasing emphasis on personalization, screen pattern usage is also more and more specialized in personalization and convenience, and there is undoubtedly a great need to arbitrarily intercept graphics of arbitrary shapes.
In the prior art, document CN103530056A proposes a global screen capture operation for quickly implementing an arbitrary local screen capture function. In addition, a plurality of screen intercepting modes are provided, a user can intercept a screen area of a geometric shape or any shape to be acquired in any scene with a lighted screen, the operation action is rapid and convenient, and more intelligent, personalized, more relaxed and interesting graphic editing and sharing emotional experience is brought to an intelligent mobile terminal user.
Firstly, the method for capturing the screen by the user based on the shape is a simple and rough image information acquisition mode, quite obvious cutting traces are left when the user shares the image information with other users, meanwhile, higher requirements are provided for the operation gestures of the user, and the image shape is very limited; in addition, the way that the user performs screen capture based on the shape is not only to realize personalized display of the screen capture image, but also to hide some private information, and the screen capture method does not consider the privacy requirement of the user.
In view of the above analysis, the prior art does not provide a flexible, high-security screen capture method based on specific interface content.
Disclosure of Invention
A screen capture method, the method comprising the steps of:
s1, detecting a screen capturing instruction of a user, and acquiring current screen image data of the terminal according to the screen capturing instruction;
s2, analyzing the image data, and judging whether the first content exists in the image data;
s3, if yes, acquiring the screen image data covered by the first content at the same time as the current screen image data, generating screen capture image data based on the current screen image data and the screen image data covered by the first content, and storing the screen capture image data; and if the image data does not exist, saving the image data as screen capture image data.
In a preferred embodiment, the first content generation watermark is overlaid on the screenshot image data.
As a preferred embodiment, the first content is any one or more of the following: clock information, operator signal information, wireless local area network information, battery power information, bluetooth signal information, and system mode information.
As a preferred embodiment, the method further comprises:
receiving first content set by a user;
analyzing the image data, judging whether first content exists in the image data or not, if so, identifying one or more first content of the image data, if all the first content belongs to the first content set by the user, automatically cutting a rectangular area of the image data where the first content is located, and automatically stretching the rest area of the image data to be consistent with the size of the image data; and automatically storing the stretched image data as screen capture image data.
As a preferred embodiment, the method further comprises:
receiving second content set by a user; the second content is different from the first content;
analyzing the image data, if the second content exists in the rectangular area of the image data where the first content is located, acquiring the screen image data of the current screen image data covered by the first content at the same time, and generating and storing screenshot image data based on the current screen image data and the screen image data covered by the first content.
The invention provides a terminal screen capture method and device based on image content, which judge whether the content is the preset content of a user, namely privacy content, by identifying the content of a specific area of image data, and further synthesize the image data and an image covered by the preset content into screen capture data, thereby not only protecting the privacy of the user, but also ensuring that the screen capture image is not deducted by the preset content to cause modification traces, and realizing vivid display of the screen capture image. In addition, because the rectangular area of the image data occupies a small area, the stretching of the image data obtained after the deletion of the rectangular area of the image data does not cause serious distortion of the image, thereby not only being beautiful, but also protecting the privacy of the user.
In addition, the invention provides a screen capture device, which comprises the following modules:
the screen capture instruction detection module is used for detecting a screen capture instruction of a user and acquiring current screen image data of the terminal according to the screen capture instruction;
the image data analysis module is used for analyzing the image data and judging whether first content exists in the image data or not;
the screen capture image generation module is used for acquiring screen image data covered by first content at the same time of the current screen image data when the first content exists in the image data, and generating and storing screen capture image data based on the current screen image data and the screen image data covered by the first content; and if the image data does not exist, saving the image data as screen capture image data.
In a preferred embodiment, the first content generation watermark is overlaid on the screenshot image data.
As a preferred embodiment, the first content is any one or more of the following: clock information, operator signal information, wireless local area network information, battery power information, bluetooth signal information, and system mode information.
As a preferred embodiment, the apparatus further comprises:
receiving first content set by a user;
analyzing the image data, judging whether first content exists in the image data or not, if so, identifying one or more first content of the image data, if all the first content belongs to the first content set by the user, automatically cutting a rectangular area of the image data where the first content is located, and automatically stretching the rest area of the image data to be consistent with the size of the image data; and automatically storing the stretched image data as screen capture image data.
As a preferred embodiment, the apparatus further comprises:
receiving second content set by a user; the second content is different from the first content;
analyzing the image data, if the second content exists in the rectangular area of the image data where the first content is located, acquiring the screen image data of the current screen image data covered by the first content at the same time, and generating and storing screenshot image data based on the current screen image data and the screen image data covered by the first content.
The invention provides a terminal screen capture device based on image content, which judges whether the content is the preset content of a user, namely privacy content, by identifying the content of a specific area of image data, and then synthesizes the image data and an image covered by the preset content into screen capture data, thereby not only protecting the privacy of the user, but also ensuring that the screen capture image is not deducted by the preset content to cause modification traces, and realizing vivid display of the screen capture image. In addition, because the rectangular area of the image data occupies a small area, the stretching of the image data obtained after the deletion of the rectangular area of the image data does not cause serious distortion of the image, thereby not only being beautiful, but also protecting the privacy of the user.
Drawings
Fig. 1 is a schematic flow chart of a screen capture method of the present invention.
Detailed Description
The embodiments of the present invention are further described below with reference to the drawings.
The first embodiment is as follows:
fig. 1 is a schematic flow chart of a screen capture method of the present invention, which includes the following steps:
s1, detecting a screen capturing instruction of a user, and acquiring current screen image data of the terminal according to the screen capturing instruction; the screen capture instruction may be a screen capture instruction commonly found in the prior art, such as a combination of a home key and a screen locking key, which is not limited herein. The current screen image data is original screen capture image data, namely original interface image data presented at the screen capture time.
S2, analyzing the image data, and judging whether the first content exists in the image data; the first content is content preset by a user, and the content may be specific text data or specific graphic data, which is not limited herein. The image data is analyzed by using an image analysis algorithm which is conventional in the art, and the method is not limited herein.
S3, if yes, acquiring the screen image data covered by the first content at the same time as the current screen image data, generating screen capture image data based on the current screen image data and the screen image data covered by the first content, and storing the screen capture image data; and if the image data does not exist, saving the image data as screen capture image data.
The screen image data covered by the first content is image data which can be originally presented to a user by the terminal but is not presented due to the coverage of the first content; the method for generating the screen capture image data deducts the first content covering part from the current screen image data, and fills the screen image data covered by the first content, so that the original ecology display of the screen capture image is realized, the privacy of a user is prevented from being revealed, and the method is an automatic, convenient and safe screen capture method.
In a preferred embodiment, the first content generation watermark is overlaid on the screenshot image data. The size, position and shape of the position covered by the watermark can be freely set by a user; since the first content can be multiple, the user can select one or more first contents which do not relate to personal privacy information according to personal preferences to generate the watermark to be covered on a specific position of the screenshot image, thereby realizing the flexibility and personalized display of the screenshot.
As a preferred embodiment, the first content is any one or more of the following: clock information, operator signal information, wireless local area network information, battery power information, bluetooth signal information, and system mode information. Preferably, when the first content is clock information, operator signal information and wireless local area network information, the original image data obtained by screen capture is an original screen capture image containing the above information, and the method for generating the screen capture image data is to subtract the covered part of the first content, i.e. the clock information, the operator signal information and the wireless local area network information, from the current screen image data, i.e. the original screen capture image, and fill the screen image data covered by the first content, i.e. the clock information, the operator signal information and the wireless local area network information, thereby realizing the 'original ecological' display of the screen capture image. Furthermore, according to personal preferences, if the user considers that the clock information does not relate to personal privacy, the user can generate the watermark by the clock information at the screen capturing moment to cover the specific position of the screen capturing image, and the size and the shape of the clock information display are set, so that the flexibility and the personalized display of the screen capturing are realized.
As a preferred embodiment, the method further comprises:
receiving first content set by a user;
analyzing the image data, judging whether first content exists in the image data or not, if so, identifying one or more first content of the image data, if all the first content belongs to the first content set by the user, automatically cutting a rectangular area of the image data where the first content is located, and automatically stretching the rest area of the image data to be consistent with the size of the image data; and automatically storing the stretched image data as screen capture image data.
Preferably, if the first content set by the user, namely the privacy information, is wireless local area network information, battery power information, bluetooth signal information, and system mode information, and the first content obtained by analyzing the image data obtained by screen capture is wireless local area network information, battery power information, and bluetooth signal information; at the moment, the first content is obtained through analysis and is a subset of the first content set by the user, and at the moment, the area where the first content is located belongs to the area where the privacy information is located, so that in order to improve the generation efficiency of the screenshot image, the deduction and filling mode of the image is replaced, and the screenshot image data is obtained by directly cutting the rectangular area where the first content is located; in addition, in order to ensure that the finally obtained screen capture image is displayed on the screen in a full-coverage manner, the cut image data is correspondingly stretched to completely cover the display screen of the terminal, so that the privacy of a user is protected, the screen capture efficiency is improved, and meanwhile, the full-screen and attractive display of the screen capture image is realized. Preferably, the rectangular area is a rectangular area with a narrow frame as one side in a narrow frame direction of the terminal display screen.
As a preferred embodiment, the method further comprises:
receiving second content set by a user; the second content is different from the first content;
analyzing the image data, if the second content exists in the rectangular area of the image data where the first content is located, acquiring the screen image data of the current screen image data covered by the first content at the same time, and generating and storing screenshot image data based on the current screen image data and the screen image data covered by the first content.
Continuing with the description of the above embodiment, if the first content, i.e. the privacy information, set by the user is wlan information, battery level information, bluetooth signal information, and system mode information, and the second content set by the user is clock information; the content obtained by analyzing the image data obtained by screen capture is clock information, battery power information and Bluetooth signal information; at this time, if the second content clock information exists in the rectangular area of the image data where the first content is located, the screen image data covered by the first content at the same time of the current screen image data is obtained, and screenshot image data is generated and stored based on the current screen image data and the screen image data covered by the first content. Because the second content is the information that the user wants to keep, and the area where the first content and the second content are located is crossed or overlapped, in order to ensure the complete and clear display of the second content required by the user, at this time, the final screen capture image is generated without adopting the above-mentioned clipping or non-clipping mode, and the final screen capture image is generated by adopting the original image deduction and filling mode, thereby ensuring the accurate display of the information required by the user.
The invention provides a terminal screen capture method and device based on image content, which judge whether the content is the preset content of a user, namely privacy content, by identifying the content of a specific area of image data, and further synthesize the image data and an image covered by the preset content into screen capture data, thereby not only protecting the privacy of the user, but also ensuring that the screen capture image is not deducted by the preset content to cause modification traces, and realizing vivid display of the screen capture image. In addition, because the rectangular area of the image data occupies a small area, the stretching of the image data obtained after the deletion of the rectangular area of the image data does not cause serious distortion of the image, and the privacy of the user is also protected.
Example two:
the invention provides a screen capture device, which comprises the following modules:
the screen capture instruction detection module is used for detecting a screen capture instruction of a user and acquiring current screen image data of the terminal according to the screen capture instruction; the screen capture instruction may be a screen capture instruction commonly found in the prior art, such as a combination of a home key and a screen locking key, which is not limited herein. The current screen image data is original screen capture image data, namely original interface image data presented at the screen capture time.
The image data analysis module is used for analyzing the image data and judging whether first content exists in the image data or not; the first content is content preset by a user, and the content may be specific text data or specific graphic data, which is not limited herein. The image data is analyzed by using an image analysis algorithm which is conventional in the art, and the method is not limited herein.
The screen capture image generation module is used for acquiring screen image data covered by first content at the same time of the current screen image data when the first content exists in the image data, and generating and storing screen capture image data based on the current screen image data and the screen image data covered by the first content; and if the image data does not exist, saving the image data as screen capture image data.
The screen image data covered by the first content is image data which can be originally presented to a user by the terminal but is not presented due to the coverage of the first content; the method for generating the screen capture image data deducts the first content covering part from the current screen image data, and fills the screen image data covered by the first content, so that the original ecology display of the screen capture image is realized, the privacy of a user is prevented from being revealed, and the method is an automatic, convenient and safe screen capture method.
In a preferred embodiment, the first content generation watermark is overlaid on the screenshot image data. The size, position and shape of the position covered by the watermark can be freely set by a user; since the first content can be multiple, the user can select one or more first contents which do not relate to personal privacy information according to personal preferences to generate the watermark to be covered on a specific position of the screenshot image, thereby realizing the flexibility and personalized display of the screenshot.
As a preferred embodiment, the first content is any one or more of the following: clock information, operator signal information, wireless local area network information, battery power information, bluetooth signal information, and system mode information. Preferably, when the first content is clock information, operator signal information and wireless local area network information, the original image data obtained by screen capture is an original screen capture image containing the above information, and the method for generating the screen capture image data is to subtract the covered part of the first content, i.e. the clock information, the operator signal information and the wireless local area network information, from the current screen image data, i.e. the original screen capture image, and fill the screen image data covered by the first content, i.e. the clock information, the operator signal information and the wireless local area network information, thereby realizing the 'original ecological' display of the screen capture image. Furthermore, according to personal preferences, if the user considers that the clock information does not relate to personal privacy, the user can generate the watermark by the clock information at the screen capturing moment to cover the specific position of the screen capturing image, and the size and the shape of the clock information display are set, so that the flexibility and the personalized display of the screen capturing are realized.
As a preferred embodiment, the apparatus further comprises:
receiving first content set by a user;
analyzing the image data, judging whether first content exists in the image data or not, if so, identifying one or more first content of the image data, if all the first content belongs to the first content set by the user, automatically cutting a rectangular area of the image data where the first content is located, and automatically stretching the rest area of the image data to be consistent with the size of the image data; and automatically storing the stretched image data as screen capture image data.
Preferably, if the first content set by the user, namely the privacy information, is wireless local area network information, battery power information, bluetooth signal information, and system mode information, and the first content obtained by analyzing the image data obtained by screen capture is wireless local area network information, battery power information, and bluetooth signal information; at the moment, the first content is obtained through analysis and is a subset of the first content set by the user, and at the moment, the area where the first content is located belongs to the area where the privacy information is located, so that in order to improve the generation efficiency of the screenshot image, the deduction and filling mode of the image is replaced, and the screenshot image data is obtained by directly cutting the rectangular area where the first content is located; in addition, in order to ensure that the finally obtained screen capture image is displayed on the screen in a full-coverage manner, the cut image data is correspondingly stretched to completely cover the display screen of the terminal, so that the privacy of a user is protected, the screen capture efficiency is improved, and meanwhile, the full-screen and attractive display of the screen capture image is realized. Preferably, the rectangular area is a rectangular area with a narrow frame as one side in a narrow frame direction of the terminal display screen.
As a preferred embodiment, the apparatus further comprises:
receiving second content set by a user; the second content is different from the first content;
analyzing the image data, if the second content exists in the rectangular area of the image data where the first content is located, acquiring the screen image data of the current screen image data covered by the first content at the same time, and generating and storing screenshot image data based on the current screen image data and the screen image data covered by the first content.
Continuing with the description of the above embodiment, if the first content, i.e. the privacy information, set by the user is wlan information, battery level information, bluetooth signal information, and system mode information, and the second content set by the user is clock information; the content obtained by analyzing the image data obtained by screen capture is clock information, battery power information and Bluetooth signal information; at this time, if the second content clock information exists in the rectangular area of the image data where the first content is located, the screen image data covered by the first content at the same time of the current screen image data is obtained, and screenshot image data is generated and stored based on the current screen image data and the screen image data covered by the first content. Because the second content is the information that the user wants to keep, and the area where the first content and the second content are located is crossed or overlapped, in order to ensure the complete and clear display of the second content required by the user, at this time, the final screen capture image is generated without adopting the above-mentioned clipping or non-clipping mode, and the final screen capture image is generated by adopting the original image deduction and filling mode, thereby ensuring the accurate display of the information required by the user.
The invention provides a terminal screen capture device based on image content, which judges whether the content is the preset content of a user, namely privacy content, by identifying the content of a specific area of image data, and then synthesizes the image data and an image covered by the preset content into screen capture data, thereby not only protecting the privacy of the user, but also ensuring that the screen capture image is not deducted by the preset content to cause modification traces, and realizing vivid display of the screen capture image. In addition, because the rectangular area of the image data occupies a small area, the stretching of the image data obtained after the deletion of the rectangular area of the image data does not cause serious distortion of the image, and the privacy of the user is also protected.
It will be understood by those within the art that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the methods specified in the block or blocks of the block diagrams and/or flowchart block or blocks.
Those of skill in the art will appreciate that various operations, methods, steps in the processes, acts, or solutions discussed in the present application may be alternated, modified, combined, or deleted. Further, various operations, methods, steps in the flows, which have been discussed in the present application, may be interchanged, modified, rearranged, decomposed, combined, or eliminated. Further, steps, measures, schemes in the various operations, methods, procedures disclosed in the prior art and the present invention can also be alternated, changed, rearranged, decomposed, combined, or deleted.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.