Disclosure of Invention
One of the purposes of the invention is to provide a method for extracting a screen of an intelligent device based on a positioning image, which can automatically and conveniently extract the screen image of the intelligent device within the frame range in the screen of the intelligent device. And further extracting the screen image of the intelligent device within the range of the outer frame of the screen of the intelligent device.
According to the above purpose, the present invention provides a method for extracting a screen of an intelligent device based on a positioning image, which comprises the following steps:
100: displaying a positioning image for determining the position, size and direction of the screen of the intelligent equipment on the screen of the intelligent equipment;
200: acquiring an intelligent equipment screen image containing a positioning image and transmitting the intelligent equipment screen image containing the positioning image to an extraction server;
300: the extraction server side identifies the positioning image to determine the original coordinate of the positioning image in the screen image of the intelligent device;
400: the extraction server corrects the screen image of the intelligent device on the basis of the original coordinates;
500: the extraction server side searches and extracts an inner frame of the screen of the intelligent equipment displayed in the screen image of the intelligent equipment from the positioning image;
600: and the extraction server extracts the screen image of the intelligent device within the frame range in the screen of the intelligent device.
The method for extracting the screen of the intelligent equipment based on the positioning image displays the positioning image on the screen of the intelligent equipment, identifies the positioning image in the acquired screen image of the intelligent equipment and determines the original coordinate of the positioning image, and can correct the screen image of the intelligent equipment based on the original coordinate of the positioning image, search and extract the inner frame of the screen of the intelligent equipment from the positioning image and further extract the screen image of the intelligent equipment within the range of the inner frame of the screen of the intelligent equipment as the position, the size and the direction of the screen of the intelligent equipment can be determined based on the original coordinate of the positioning image. Wherein:
the positioning image in step 100 may be preset in size and displayed at a fixed position in the screen of the smart device, and thus may be used to determine the position, size, and direction of the screen of the smart device. The positioning image generally has different easily recognized features from the screen image of the smart device, so that the positioning image is conveniently recognized.
In step 200, the screen image of the smart device may be captured and transmitted by an image capturing and transmitting device, such as a mobile phone, having an image capturing function and an image transmitting function.
In step 300, the positioning image may be identified by scanning to determine its original coordinates. If the positioning image cannot be found, the user can be prompted to find the positioning image and to adjust the shooting position and angle.
In some embodiments, the smart device screen image may be corrected according to the mapping relationship between the original coordinates and the expected coordinates in step 400. The coordinate system of the desired coordinates is generally a two-dimensional coordinate system perpendicular to the image capturing optical axis of the screen of the smart device.
In step 500 and step 600, because the positioning image is located inside the frame inside the screen of the smart device, the frame inside the screen of the smart device can be searched outwards from the positioning image and the screen image of the smart device within the frame range inside the screen of the smart device can be extracted.
In conclusion, the method can automatically and conveniently extract the screen image of the intelligent equipment within the frame range in the screen of the intelligent equipment.
Further, in the method for extracting a screen of an intelligent device based on a positioning image according to the present invention, step 400 further includes: after the screen image of the intelligent device is corrected, the corrected coordinates of the positioning image in the screen image are determined or acquired.
Further, in the method for extracting a screen of an intelligent device based on a positioning image, the positioning image is a positioning image generated immediately or a positioning image stored in a database.
In the above scheme, the positioning image may use an existing positioning image stored in the database, or may be generated in real time according to a specific business logic. The positioning image stored in the database may use a one-dimensional code, a two-dimensional code, or the like.
Further, in the method for extracting the screen of the intelligent device based on the positioning image, the positioning image is a two-dimensional code image.
In the above scheme, the two-dimensional code image belongs to a two-dimensional positioning image. If the screen image of the intelligent device needs to be completely extracted subsequently, the positioning image is preferably a positioning image with two dimensions, namely a two-dimensional positioning image. Using two-dimensional positioning images generally requires consideration of at least four points of the quadrilateral through which the complete projection correction of the device screen image can be performed. For the two-dimensional code, since the two-dimensional code has three anchor points and one hidden anchor point information, a complete screen correction can be performed through the anchor point information.
Of course, the positioning image may also be selected as a one-dimensional code. Locating an image using a one-dimensional code typically requires attention to the following points:
the one-dimensional code can only support left and right correction of the image, and does not have enough information to support front and back of the image, namely projection correction;
the one-dimensional code cannot calculate the range of the screen through complete deduction logic, and can only find the position of the screen in a heuristic mode, such as a connected region, flooding and approximate parallel finding.
Further, in the method for extracting the screen of the intelligent device based on the positioning image, the extraction server is a client or a cloud, and an extraction program runs on the client or the cloud.
In the above scheme, the extraction server executes the relevant steps through the extraction program. The client or the cloud can be selected as the extraction server according to specific business requirements.
When the extraction server side is the cloud side, interaction can be carried out on the intelligent device of the screen image to be extracted through the cloud side, so that generation of the positioning image is controlled more finely, the fine control is simpler and more convenient for subsequent screen image extraction, and complicated back-end processing logic is avoided. For example, the two-dimensional code is selected as the positioning image, parameters can be returned to the intelligent device of the screen image to be extracted through the cloud service provider, the two-dimensional code positioning image is generated in the middle of the screen, namely the height is 50% and the width is 50%, and the subsequent cloud service provider can extract the screen image by using the parameters.
Further, in the method for extracting a screen of an intelligent device based on a positioning image, the correction includes rotation correction and projection correction.
Further, in the method for extracting a screen of an intelligent device based on a positioning image, the positioning image contains identity information, so that when the extraction server receives the screen image of the intelligent device containing the positioning image, whether the screen image of the intelligent device is the screen image of the intelligent device specified or not is judged.
In the above scheme, since the specific service requirement usually requires to audit the identity of the intelligent device from which the screen image is to be extracted, the identity information is added to the positioning image so as to determine whether the screen image of the intelligent device is the screen image of the intelligent device specified.
For a two-dimensional code positioning image, information encoding is generally required to be supported, and if a plurality of two-dimensional code positioning images exist on a screen image of an intelligent device, which intelligent device belongs to the screen image to be extracted can be determined or not through decoding the two-dimensional code positioning images.
Further, in the method for extracting a screen of an intelligent device based on a positioning image according to the present invention, in step 500, the extraction server reversely deduces the position of the inner frame of the screen of the intelligent device based on the preset size ratio relationship between the positioning image and the screen of the intelligent device or the distance between the edge of the positioning image and the inner frame of the screen of the intelligent device, so as to search and extract the inner frame of the screen of the intelligent device displayed in the screen image of the intelligent device from the positioning image.
In the above scheme, the positioning image may be a quadrangle, such as a two-dimensional code. Taking a two-dimensional code as an example, the two-dimensional code generally has three anchor points and one hidden anchor point information. The positioning point information can be used for displaying based on the position relation, such as the proportional relation or the edge distance, of the preset two-dimensional code and the inner frame of the intelligent device screen, so that the size and the position of the inner frame of the intelligent device screen in the corrected intelligent device screen can be reversely deduced according to the size and the position of the two-dimensional code in the corrected intelligent device screen image, and the intelligent device screen image within the range of the inner frame of the intelligent device screen is extracted.
Further, in the method for extracting a screen of an intelligent device based on a positioning image according to the present invention, in the step 500, an inner frame of the screen of the intelligent device displayed in the screen image of the intelligent device is searched and extracted from the positioning image in a manner of area connectivity determination.
In the above scheme, if the backward derivation calculation cannot be performed according to the positioning image, the inner frame of the screen of the smart device displayed in the screen image of the smart device needs to be searched and extracted from the positioning image in an area connectivity discrimination manner. The specific search mode may be a 'flooding' mode, or a search based on the property that a certain edge of the positioning image is parallel to the inner frame.
Further, the method for extracting the screen of the intelligent device based on the positioning image further comprises the following steps: the extraction server side continuously searches outwards from the inner frame of the screen of the intelligent equipment and extracts the outer frame of the screen of the intelligent equipment displayed in the screen image of the intelligent equipment; and the extraction server extracts the screen image of the intelligent equipment within the range of the outer frame of the screen of the intelligent equipment.
Whether searching and extracting of the intelligent device screen outer frame displayed in the intelligent device screen image and extracting of the intelligent device screen image within the intelligent device screen outer frame range in the scheme are carried out can be selected according to specific business requirements or extraction fineness requirements.
The fineness generally includes both coarse and fine particle sizes. The coarse granularity corresponds to searching and extracting of frames in the screen of the intelligent device displayed in the screen image of the intelligent device, and extracting of the screen image of the intelligent device within the range of the frames in the screen of the intelligent device. And the fine granularity corresponds to searching and extracting of the outer frame of the screen of the intelligent equipment displayed in the screen image of the intelligent equipment, and extracting the screen image of the intelligent equipment within the range of the outer frame of the screen of the intelligent equipment.
Because the outer frames of the screens in various intelligent devices are different in expression form and have no fixed rule to follow, the extraction is usually performed in a machine learning manner, and the extraction is usually performed at a proportional position where the inner frames overflow.
And the outer screen can be omitted for the service which is not sensitive to the outer screen between the inner frame and the outer frame, and the coarse-grained screen image extraction can be directly carried out.
The invention further aims to provide a smart device screen extraction system based on positioning images, which can automatically and conveniently extract smart device screen images within the frame range in the smart device screen. And further extracting the screen image of the intelligent device within the range of the outer frame of the screen of the intelligent device.
Based on the above object, the present invention further provides a system for extracting a screen of an intelligent device based on a positioning image, which executes any one of the above methods for extracting a screen of an intelligent device based on a positioning image.
According to the intelligent equipment screen extraction system based on the positioning image, any intelligent equipment screen extraction method based on the positioning image is executed, so that the intelligent equipment screen image within the frame range in the intelligent equipment screen can be automatically and conveniently extracted. And further extracting the screen image of the intelligent device within the range of the outer frame of the screen of the intelligent device. The method of the present invention has been described in detail, and will not be described herein.
The system generally comprises an intelligent device for acquiring the screen image, an image acquisition and transmission device and an extraction server. The intelligent device of the screen image to be collected executes the step 100, the image collecting and transmitting device executes the step 200, and the extraction server executes the steps 300 to 600.
Still another object of the present invention is to provide a use of a screen image of a smart device, which can effectively utilize the screen image of the smart device extracted by the method of the present invention.
Based on the purpose, the invention also provides the application of the screen image of the intelligent device, and the screen image of the intelligent device extracted by adopting any one of the extraction methods based on the positioning image is used for identifying screen damage or detecting screen display content.
The application of the screen image of the intelligent equipment, which is extracted by adopting any one of the extraction methods based on the positioning image, is used for identifying screen damage or detecting screen display content, so that the screen image of the intelligent equipment extracted by the method is effectively utilized.
The intelligent equipment screen extraction method based on the positioning image has the following advantages and beneficial effects:
(1) the intelligent device screen image within the frame range in the intelligent device screen can be automatically and conveniently extracted, and the intelligent device screen image within the frame range outside the intelligent device screen can also be extracted.
(2) The complexity of screen recognition is greatly reduced, and meanwhile, the original screen information can be efficiently transmitted for the subsequent application for the processing of the subsequent application.
(3) The accuracy of screen image extraction is greatly improved, the interference of unnecessary features to model training is reduced, the amount of processed content information is reduced, and the operating efficiency of the whole automatic process is improved.
(4) By searching the positioning image and then searching the equipment screen according to the positioning image, the difficulty of searching the equipment screen due to different background scenes is avoided.
(5) Through the correction based on the positioning image, the accuracy of screen image extraction is further improved, so that the subsequent application operation can be efficiently carried out.
(6) Some corresponding prompts can be given on the basis of screen image extraction, such as incomplete screen shooting, no positioning image found and other information which is helpful for the user to adjust.
(7) The approximate range of the screen of the equipment is searched from inside to outside by using a positioning image mode, and then an accurate screen position is searched by a machine learning method, so that the influence of the content outside the screen is eliminated, and the input characteristics of training and prediction are provided for subsequent screen content detection and screen fragmentation identification of the screen.
(8) Without loss of generality, in principle, all intelligent devices which are provided with screens and can be connected with the Internet, including but not limited to screen image extraction methods of tablet computers, notebook computers, intelligent watches and the like, are all applicable to the method provided by the invention.
The intelligent equipment screen extraction system based on the positioning image also has the advantages and beneficial effects.
The application of the screen image of the intelligent device also has the advantages and the beneficial effects.
Detailed Description
The method, system and use of smart device screen extraction based on positioning images according to the present invention will be further described in detail with reference to the drawings and specific embodiments, but the detailed description is not to be construed as limiting the invention.
Fig. 1 shows a flow of the method for extracting a screen of an intelligent device based on a positioning image according to an embodiment of the present invention. As shown in fig. 1, the method for extracting a screen of an intelligent device based on a positioning image includes the steps of:
100: displaying a positioning image for determining the position, size and direction of the screen of the intelligent equipment on the screen of the intelligent equipment;
200: acquiring an intelligent equipment screen image containing a positioning image and transmitting the intelligent equipment screen image containing the positioning image to an extraction server;
300: the extraction server side identifies the positioning image to determine the original coordinate of the positioning image in the screen image of the intelligent device;
400: extracting a server side to correct the screen image of the intelligent device based on the original coordinates;
500: the extraction server side searches outwards from the positioning image and extracts an inner frame of the screen of the intelligent equipment displayed in the screen image of the intelligent equipment;
600: and the extraction server extracts the screen image of the intelligent equipment within the frame range in the screen of the intelligent equipment.
In certain embodiments, step 400 further comprises: after the screen image of the intelligent device is corrected, the corrected coordinates of the positioning image in the screen image are determined or acquired.
In some embodiments, the positioning image is a positioning image generated on-the-fly or a positioning image stored in a database.
In some embodiments, the positioning image is a two-dimensional code image.
In some embodiments, the extraction server is a client or a cloud, and the client or the cloud runs an extraction program.
In some embodiments, the correction includes a rotation correction and a projection correction.
In some embodiments, the location image contains identity information, so that when the extraction server receives the smart device screen image containing the location image, it determines whether the smart device screen image is the smart device screen image of the specified smart device.
In some embodiments, in step 500, the extraction server reversely deduces the position of the inner frame of the smart device screen based on the preset size ratio between the positioning image and the smart device screen or the distance between the edge of the positioning image and the inner frame of the smart device screen, so as to search and extract the inner frame of the smart device screen displayed in the screen image of the smart device from the positioning image.
In some embodiments, in step 500, the intra-screen frame of the smart device displayed in the screen image of the smart device is searched and extracted from the positioning image by means of the region connectivity determination.
In certain embodiments, further comprising the step of: the extraction server side continuously searches outwards from the inner frame of the screen of the intelligent equipment and extracts the outer frame of the screen of the intelligent equipment displayed in the screen image of the intelligent equipment; and the extraction server extracts the screen image of the intelligent equipment within the range of the outer frame of the screen of the intelligent equipment.
The intelligent device screen extraction system based on the positioning image comprises a mobile phone A to be detected of the intelligent device used as a screen image to be acquired, a camera mobile phone B used as an image acquisition and transmission device and a cloud C used as an extraction server side, wherein an extraction program runs on the cloud C. And storing a two-dimensional code image D as a positioning image in a database, wherein the two-dimensional code image D is a code of the identity information of the mobile phone A to be detected.
Fig. 2 shows a workflow of a smart device screen extraction system based on a positioning image as an embodiment. As shown in fig. 2, the workflow of the smart device screen extraction system based on positioning images of this embodiment includes:
step 100: the mobile phone A to be tested reads the two-dimensional code image D used for determining the position, size and direction of the screen of the mobile phone A to be tested from the database, and displays the two-dimensional code image D on the screen of the mobile phone A to be tested in a preset size and position according to the size proportional relation between the preset two-dimensional code image D from the cloud C and the screen of the mobile phone A to be tested or a distance instruction of the edge of the two-dimensional code image D from the inner frame of the screen of the mobile phone A to be tested.
Step 200: the camera mobile phone B collects a screen image of the mobile phone A to be detected containing the two-dimension code image D and transmits the screen image of the mobile phone A to be detected containing the two-dimension code image D to the cloud C.
Step 300: the cloud C identifies the two-dimensional code image D through an extraction program running on the cloud C, firstly decodes the two-dimensional code image D and compares the two-dimensional code image D with the identity information of the mobile phone A to be detected so as to judge whether the received screen image is the screen image of the mobile phone A to be detected or not, and then determines the original coordinate of the two-dimensional code image D in the screen image of the mobile phone A to be detected.
In the step, if the positioning image cannot be found, the user is prompted that the positioning image cannot be found, and the user is prompted to adjust the shooting position and angle.
Step 400: and the cloud C corrects the screen image of the mobile phone A to be detected based on the original coordinates through an extraction program running on the cloud C, and the correction comprises rotation correction and projection correction. And after the screen image of the mobile phone A to be detected is corrected, recording the correction coordinate of the two-dimensional code image D.
In this step, the screen image of the mobile phone a to be tested can be corrected according to the mapping relationship between the original coordinates and the expected coordinates. The coordinate system of the desired coordinates is a two-dimensional coordinate system perpendicular to the image capture optical axis of the camera phone B.
Step 500: and the cloud C searches and extracts the inner frame of the screen of the mobile phone A to be detected displayed in the screen image of the mobile phone A to be detected from the two-dimensional code image D through the extraction program running on the cloud C.
In this step, the cloud C reversely deduces the position of the inner frame of the screen of the mobile phone a to be detected based on the preset size proportional relationship between the two-dimensional code image D and the screen of the mobile phone a to be detected or the distance between the edge of the two-dimensional code image D and the inner frame of the screen of the mobile phone a to be detected, so as to search and extract the inner frame of the screen of the mobile phone a to be detected displayed in the screen image of the mobile phone a to be detected from the two-dimensional code image D. For example, if the instruction requires that the two-dimensional code is generated at the center of the screen of the mobile phone a to be tested, and the distance between the upper side and the left side of the screen of the mobile phone a to be tested has a preset proportional relationship, the inner frame of the screen of the mobile phone a to be tested is directly searched and extracted according to the proportional relationship.
Step 600: and extracting a coarse-grained screen image. And the cloud C extracts the screen image of the mobile phone A to be detected within the frame range in the screen of the mobile phone A to be detected through the extraction program running on the cloud C.
Step 700: and extracting the fine-grained screen image. The cloud C continuously searches outwards from the inner frame of the screen of the mobile phone A to be detected and extracts the outer frame of the screen of the mobile phone A to be detected displayed in the screen image of the mobile phone A to be detected; and the cloud C extracts the screen image of the mobile phone A to be detected within the range of the outer frame of the screen of the mobile phone A to be detected.
In the step, a proportion position overflowing from the inner frame is extracted in a machine learning mode.
The screen image of the mobile phone a to be detected extracted by the positioning image-based intelligent device screen extraction system and method in the above embodiments can be used for identifying the screen damage of the mobile phone a to be detected or detecting the screen display content of the mobile phone a to be detected. The method comprises the following specific steps:
step 800: and (3) performing characteristic processing, such as resizing (resize), reshaping (reshape) and marginalization, on the screen image of the mobile phone A to be detected within the range of the outer frame of the screen of the mobile phone A to be detected extracted in the step 700, and using the processed screen image to train and predict a broken screen recognition model.
Step 900: and predicting the broken screen of the mobile phone A to be tested by using the broken screen identification model and updating and training the parameters of the broken screen identification model.
It should be noted that the combination of the features in the present application is not limited to the combination described in the claims or the combination described in the embodiments, and all the features described in the present application may be freely combined or combined in any manner unless contradictory to each other.
It should be noted that the above-mentioned embodiments are only specific examples of the present invention, and obviously, the present invention is not limited to the above-mentioned embodiments, and many similar variations exist. All modifications which would occur to one skilled in the art and which are, therefore, directly derived or suggested from the disclosure herein are deemed to be within the scope of the present invention.