Summary of the invention
The embodiment of the present disclosure provides a kind of image processing method and device, and shooting behavior can not accurately be determined by being able to solve
Problem.The technical solution is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of image processing method is provided, this method comprises:
At least one live image in predeterminable area is obtained, predeterminable area includes showing with the target of data to be protected is shown
The opposite region of display screen;
Background is carried out at least one live image to eliminate to obtain at least one target image;
Image recognition is carried out at least one target image.
Because only remaining the target image in addition to background by carrying out background elimination at least one live image,
Carry out image recognition with target image, eliminate the interference of background, improve the precision of image recognition, can be more accurate sentence
Surely behavior is shot.
In one embodiment, background is carried out at least one live image to eliminate to obtain at least one target image, wrap
It includes:
At least one live image is compared, background area is determined at least one live image;
Background is carried out at least one live image according to background area to eliminate to obtain at least one target image.
In one embodiment, background is carried out at least one live image to eliminate to obtain at least one target image, wrap
It includes:
Reference picture is obtained, reference picture is used to indicate the background of predeterminable area;
Background is carried out at least one live image according to reference picture to eliminate to obtain at least one target image.
In one embodiment, image recognition is carried out at least one target image, comprising:
Image recognition is carried out at least one target image according to shooting identification model.
In one embodiment, this method further include:
When image recognition result indicates that at least one target image includes subject image element, control target display screen stops
Only show data to be protected.
According to the second aspect of an embodiment of the present disclosure, a kind of image processing apparatus is provided, comprising: image collection module, back
Scape cancellation module and picture recognition module;
Image collection module, for obtaining at least one live image in predeterminable area, predeterminable area includes and display
The opposite region of the target display screen of data to be protected;
Background cancellation module is eliminated to obtain at least one target image for carrying out background at least one live image;
Picture recognition module, for carrying out image recognition at least one target image.
In one embodiment, background cancellation module includes that comparison unit and first eliminate unit;
Comparison unit determines background for comparing at least one live image at least one live image
Region;
First eliminates unit, eliminates to obtain at least one for carrying out background at least one live image according to background area
A target image.
In one embodiment, background cancellation module includes that reference unit and second eliminate unit;
Reference unit, for obtaining reference picture, reference picture is used to indicate the background of predeterminable area;
Second eliminates unit, eliminates to obtain at least one for carrying out background at least one live image according to reference picture
A target image.
In one embodiment, picture recognition module is also used to according to shooting identification model at least one target image
Carry out image recognition.
In one embodiment, image processing apparatus further include: display control module;
Display control module, for indicating that at least one target image includes subject image element in image recognition result
When, control target display screen stops showing data to be protected.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The disclosure can be limited.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
The embodiment of the present disclosure provides a kind of image processing method, as shown in Figure 1, the image processing method includes following step
It is rapid:
101, at least one live image in predeterminable area is obtained.
Predeterminable area includes the region opposite with the target display screen of data to be protected is shown, predeterminable area is can to shoot
To the region of target display screen.
Optionally, Image Acquisition can be carried out to predeterminable area by image collecting device and generates live image.Image
Acquisition device can be a part of image processing apparatus, be also possible to through external interface and image processing apparatus connection communication
External image acquisition device;Image collecting device is also possible to a part of target display screen, or passes through external interface
With the external image acquisition device of target display screen connection communication.Image processing apparatus can be a part of target display screen,
Alternatively, target display screen be a part of image processing apparatus or image processing apparatus be connect with target display screen it is outer
Part device, the disclosure to this with no restriction.
For example, image processing apparatus is a device inside target display screen, image is installed on target display screen and is adopted
Acquisition means can carry out Image Acquisition to the predeterminable area opposite with target display screen.
Specifically, above-mentioned image collecting device can be camera, the frequency of Image Acquisition can be 30 times/second.Wait protect
Shield data can be preset classified papers etc., show that the opposite region of the target display screen of data to be protected belongs to target and shows
The direction of panel pair, for example, as shown in Fig. 2, image collecting device is set to target display screen upper edge, it is of course also possible to
It is other positions, towards, just facing towards identical, image collecting device can have multiple with target display screen, acquires the area of image
Domain can be used as predeterminable area.
In an alternative embodiment, camera starts after being configurable to booting, i.e., sets belonging to target display screen
After standby (such as: computer etc.) booting, camera starting obtains the image in predeterminable area.
In an alternative embodiment, ecret protection application program is can be set in computer, when user starts the privacy
When protecting application program, image collecting device starting.This mode can reduce power consumption.
102, background is carried out at least one live image to eliminate to obtain at least one target image.
To at least one live image carry out background eliminate can there are many mode, herein, enumerate two kinds of implementations into
Row explanation:
In the first implementation, background is carried out at least one live image to eliminate to obtain at least one target figure
Picture, comprising:
At least one live image is compared, background area is determined at least one live image;According to background
Region carries out background at least one live image and eliminates to obtain at least one target image.
In the first implementation, the quantity of live image at least there are two, can just compare.By at least one scene
The identical region of corresponding position pixel value is determined as background area in image, it should be noted that the pixel value of two pixels exists
It can determine that two pixels are identical in preset range.
In the second implementation, background is carried out at least one live image to eliminate to obtain at least one target figure
Picture, comprising:
Reference picture is obtained, reference picture is used to indicate the background of predeterminable area;It is existing at least one according to reference picture
Field picture carries out background and eliminates to obtain at least one target image.
In the second implementation, can be using the picture frame not changed for a long time as reference picture, reference picture can
To be one or more, the quantity of live image can be one or more, if it is one, by the live image and ginseng
It examines image to compare, the identical region of two image corresponding position pixel values is determined as background area.
Certainly, the above only exemplary illustration, does not represent the disclosure and is confined to this.
103, image recognition is carried out at least one target image.
Two specific examples can be enumerated and be illustrated herein there are many mode by carrying out image recognition to live image:
In first example, image recognition is carried out at least one target image, comprising:
Image recognition is carried out at least one target image according to shooting identification model.
Whether image recognition result can serve to indicate that in target image comprising subject image element.Mould is identified using shooting
Whether type judges more accurate comprising subject image element in target image, reduces erroneous judgement.
It should be noted that shooting identification model can be pre-set, can also be obtained by training study, for example,
Initial matching model and sample image are obtained, sample image includes first kind sample image and the second class sample image, wherein the
A kind of sample image includes subject image element, and the second class sample image does not include subject image element;Utilize initial matching mould
Type handles sample image to obtain the decision content of sample image;According to the difference pair of the decision content of sample image and reference value
The parameter of initial matching model obtains shooting identification model after being adjusted.
It should be noted that reference value can be it is preset.Herein, column take a particular example further explanation figure
As the acquisition process of Matching Model.For example, first kind sample image and the second class sample image are marked respectively, can incite somebody to action
First kind sample image is labeled as (1,0), and the second class sample image is labeled as (0,1), then using initial matching model to sample
This image A (sample image A is any one sample image, is only illustrated by taking sample image A as an example herein) is handled,
Two steps can be divided into using treatment process of the initial matching model to sample image A;The first step utilizes first network model
Feature extraction is carried out to sample image A, obtains the characteristic value of sample image A, the characteristic value of sample image A is for indicating sample graph
As the characteristics of image of A;Second step carries out the characteristic value of sample image A using the second network model sample image A is calculated
Decision content.If sample image A is first kind sample image, reference value is (1,0), if the judgement of sample image A
Value is (0.5,0), and the change of parameter in first network model and the second network model is calculated using the difference of decision content and reference value
Then change value is adjusted first network model and the second network model, and is trained next time.Into excessively a large amount of instruction
Practice, so that it may obtain images match model.
If being more than to the difference of the target image decision content handled and reference value using shooting identification model
Preset range, then illustrate that target image differs larger with the characteristics of image of sample image, using shooting identification model to scene
The difference of decision content and reference value that image is handled within a preset range, then illustrates target image and sample image
Characteristics of image is close, it is likely that includes subject image element.According to the decision content of sample image and reference value to initial matching mould
Type carries out parameter adjustment, and obtained images match model is more accurate for the processing of image, can more accurately determine target
Whether shooting behavior is occurred in image.
In second example, it can establish database, include a large amount of subject image elements in database, then by target
Image is matched with the subject image element in database, and then whether determine in target image includes subject image element,
For example, carrying out image recognition to target image obtains at least one pictorial element;By at least one pictorial element and target image
Element is matched, if successful match, it is determined that includes subject image element at least one pictorial element, if matching is lost
It loses, it is determined that do not include subject image element at least one pictorial element;Image recognition result is generated according to matching result.
It should be noted that each pictorial element includes at least one pixel, a target at least one pictorial element
Pictorial element also includes at least one pixel, at least one pictorial element with subject image element match can pass through by
Pixel in two pictorial element same positions is compared to determine.It is with the pictorial element A at least one pictorial element
Example, if the pixel value of two pixels on pictorial element A and subject image element same position is less than or equal to preset difference value,
Two pixels are then determined as same pixel pair, if the quantity of pictorial element A and subject image element same pixel pair is being schemed
The all pixels for including as elements A and subject image element are greater than or equal to preset ratio to ratio shared in quantity, then really
Determine pictorial element A and subject image element matching.Certainly, only exemplary illustration herein, does not represent the disclosure and is confined to this.
The matching of pictorial element A and subject image element is the matching of Pixel-level, and therefore, matching result is more acurrate, moreover, to database
In subject image element can be updated, allow subject image element to cover various shooting behaviors, data protection
Safety is higher.
Subject image element embodies the key message of shooting behavior, for example, posture of taking pictures, photographic device etc..Target image
Element may include the image of some specific people, also may include image (such as the figure of camera of image collecting device
Picture).
In one embodiment, this method further include:
When image recognition result indicates that at least one target image includes subject image element, control target display screen stops
Only show data to be protected.
In one embodiment, control target display screen stops showing data to be protected, comprising:
The display source of target display screen is cut off, and controls target display screen display warning image or other images.
The display source for cutting off target display screen, ensure that data to be protected are not revealed, while show screen display in target
Image is warned, reminds user to reinforce the protection to data, further improves Information Security.
The image processing method that the embodiment of the present disclosure provides, because being disappeared by carrying out background at least one live image
It removes, only remains the target image in addition to background, carry out image recognition with target image, eliminate the interference of background, improve
The precision of image recognition, more accurate can must determine shooting behavior.
Based on image processing method described in the corresponding embodiment of above-mentioned Fig. 1, following is embodiment of the present disclosure,
It can be used for executing embodiments of the present disclosure.
The embodiment of the present disclosure provides a kind of image processing apparatus, as shown in figure 3, the image processing apparatus 30 includes: image
Obtain module 301, background cancellation module 302 and picture recognition module 303;
Image collection module 301, for obtaining at least one live image in predeterminable area, predeterminable area includes and shows
Show the opposite region of the target display screen of data to be protected;
Background cancellation module 302 is eliminated to obtain at least one target figure for carrying out background at least one live image
Picture;
Picture recognition module 303, for carrying out image recognition at least one target image.
In one embodiment, as shown in figure 4, background cancellation module 302 includes that comparison unit 3021 and first eliminate list
Member 3022;
Comparison unit 3021 determines at least one live image for comparing at least one live image
Background area;
First eliminates unit 3022, for according to background area at least one live image carry out background eliminate to obtain to
A few target image.
In one embodiment, as shown in figure 5, background cancellation module 302 includes that reference unit 3023 and second eliminate list
Member 3024;
Reference unit 3023, for obtaining reference picture, reference picture is used to indicate the background of predeterminable area;
Second eliminates unit 3024, for according to reference picture at least one live image carry out background eliminate to obtain to
A few target image.
In one embodiment, picture recognition module 303 are also used to according to shooting identification model at least one target figure
As carrying out image recognition.
In one embodiment, as shown in fig. 6, image processing apparatus 30 further include: display control module 304;
Display control module 304, for indicating that at least one target image includes target image member in image recognition result
When plain, control target display screen stops showing data to be protected.
The image processing apparatus that the embodiment of the present disclosure provides, because being disappeared by carrying out background at least one live image
It removes, only remains the target image in addition to background, carry out image recognition with target image, eliminate the interference of background, improve
The precision of image recognition, more accurate can must determine shooting behavior.
Based on image processing method described in the corresponding embodiment of above-mentioned Fig. 1, the embodiment of the present disclosure also provides one kind
Computer readable storage medium, for example, non-transitorycomputer readable storage medium can be read-only memory (English: Read
Only Memory, ROM), it is random access memory (English: Random Access Memory, RAM), CD-ROM, tape, soft
Disk and optical data storage devices etc..It is stored with computer instruction on the storage medium, for executing the corresponding embodiment of above-mentioned Fig. 1
Described in image processing method, details are not described herein again.
Those skilled in the art will readily occur to its of the disclosure after considering specification and practicing disclosure disclosed herein
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or
Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following
Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.