CN105574857B - Image analysis method and device - Google Patents
Image analysis method and device Download PDFInfo
- Publication number
- CN105574857B CN105574857B CN201510921111.0A CN201510921111A CN105574857B CN 105574857 B CN105574857 B CN 105574857B CN 201510921111 A CN201510921111 A CN 201510921111A CN 105574857 B CN105574857 B CN 105574857B
- Authority
- CN
- China
- Prior art keywords
- image
- picture
- clarity
- analyzed
- region
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
Landscapes
- Image Analysis (AREA)
Abstract
The embodiment of the present disclosure discloses a kind of image analysis method and device, is distinguished using the clarity of foreground image in picture and background image, analyzes the foreground image in image.The clarity of foreground image is typically larger than the clarity of background image.Base vector dictionary is inquired, analysis picture is treated and carries out clarity estimation, obtains clarity estimation image corresponding with picture to be analyzed;Then, the unintelligible region in filtering clarity estimation image, final clarity estimate that remaining image is the higher region of clarity, i.e. clear area in image one by one.The image for determining clear area is the foreground image of picture to be analyzed, other region, that is, background images in picture to be analyzed.This method determines foreground image and background image in image using another thinking, foreground image and background image are determined using the clarity of image, the clarity of foreground image in image is higher than the clarity of background image, therefore higher using the foreground image accuracy rate that such method obtains.
Description
Technical field
This disclosure relates to technical field of image processing, more particularly to a kind of image analysis method and device.
Background technique
Interested object or region (that is, target), the commonly referred to as prospect of image in image.In the related technology, it commonly uses
Foreground segmentation method, usually display foreground is split using characteristics of image such as the color of image-region, textures.
Using color, Texture eigenvalue segmented image prospect, usual more complex, various colors regions by texture in image
It is determined as display foreground.But the texture of the image background object that is included may also more complicated, color it is also relatively abundanter.
Therefore, the accuracy rate using such method display foreground analyzed and image background is low.
Summary of the invention
To overcome the problems in correlation technique, the disclosure provides a kind of image analysis method and device.
In order to solve the above-mentioned technical problem, the embodiment of the present disclosure discloses following technical solution:
According to the first aspect of the embodiments of the present disclosure, a kind of image analysis method is provided, comprising:
Obtain picture to be analyzed;
Clarity estimation is carried out to the picture to be analyzed, obtains clarity estimation image;
Each unintelligible region in the clarity estimation image is filtered out one by one, obtains the clarity estimation image
In clear area;
It determines that the clear area is the foreground image of the picture to be analyzed, removes the prospect in the picture to be analyzed
Other images except image are the background image of the picture to be analyzed.
The image analysis method that first aspect provides determines foreground image and Background in image using another thinking
Picture determines foreground image and background image using the clarity of image, and the clarity of the foreground image in image is higher than Background
The clarity of picture, thus it is higher using the foreground image accuracy rate that such method obtains.
Optionally, described that clarity estimation is carried out to the picture to be analyzed, obtain clarity estimation image, comprising:
The picture to be analyzed is divided to the image-region of default size;
For each image-region, carried out on the direction for each base vector that the base vector dictionary being obtained ahead of time is included
Projection, obtains the corresponding projection matrix in present image area;
Determine each image-region it is corresponding be 0 base vector, obtain the projection base of each image-region
Vector;
According to the corresponding all projection base vectors of the picture to be analyzed, clarity estimation image is obtained.
Optionally, the method also includes:
Obtain fuzzy samples pictures;
Study is trained to the fuzzy samples pictures, obtains the base vector dictionary, the base vector dictionary includes
Whole base vectors needed for decomposing image.
Image analysis method provided in this embodiment then, will be wait divide using fuzzy samples pictures training base vector dictionary
Analysis picture projection included to base vector dictionary base vector on, according to projection base vector quantity survey picture clarity,
Accuracy rate is high.
Optionally, each unintelligible region filtered out in the clarity estimation image one by one, comprising:
Using adaptive two value-based algorithm, preset threshold is determined;
When the quantity of the corresponding projection base vector in described image region is greater than the preset threshold, described image area is determined
Domain is clear area;Alternatively,
When the quantity of the corresponding projection base vector in described image region is less than or equal to the preset threshold, described in determination
Image-region is unintelligible region.
Optionally, the method also includes:
Obtain the pixel quantity that the foreground image is included;
Calculate the pixel quantity of the foreground image and the ratio of whole pixel quantities that the picture to be analyzed is included;
When the ratio is less than or equal to default ratio, determine that the picture to be analyzed is blurred picture.
Optionally, the method also includes:
Export the first reminder message, picture to be analyzed described in user is fuzzy graph to first reminder message for reminding
Piece.
Image analysis method provided in this embodiment, the foreground image and background image for determining picture to be analyzed it
Afterwards, the whole clarity of further analysis picture, if it is determined that picture to be analyzed is blurred picture, then exports the first reminder message
Prompting user's picture to be analyzed is blurred picture, so that user is handled for blurred picture is further.
According to the second aspect of an embodiment of the present disclosure, a kind of image analysis apparatus is provided, comprising:
First obtains module, for obtaining picture to be analyzed;
Clarity estimation module carries out clarity estimation for obtaining the picture to be analyzed that module obtains to described first,
Obtain clarity estimation image;
Filtering module, it is each in the clarity estimation image that the clarity estimation module obtains for filtering out one by one
Unintelligible region obtains the clear area in the clarity estimation image;
First determining module, for determining the clear area that the filtering module obtains for the prospect of the picture to be analyzed
Image, other images in the picture to be analyzed in addition to the foreground image are the background image of the picture to be analyzed.
Optionally, the clarity estimation module, comprising:
Submodule is divided, for the picture to be analyzed to be divided to the image-region of default size;
Submodule is projected, each image-region for dividing for the division submodule, what is be obtained ahead of time
It is projected on the direction for each base vector that base vector dictionary is included, obtains the corresponding projection matrix in present image area;
First determines submodule, for determine each image-region it is corresponding be not 0 base vector, obtain described every
The projection base vector of a image-region;
Submodule is generated, for obtaining clarity estimation according to the corresponding all projection base vectors of the picture to be analyzed
Image.
Optionally, described device further include:
Second obtains module, for obtaining fuzzy samples pictures;
Training module obtains the base vector dictionary, the base for being trained study to the fuzzy samples pictures
Vector dictionary includes whole base vectors needed for decomposing image.
Optionally, the filtering module, comprising:
Second determines submodule, for utilizing adaptive two value-based algorithm, determines preset threshold;
Third determines submodule, for being greater than the default threshold when the quantity of the corresponding projection base vector in described image region
When value, determine that described image region is clear area;Alternatively,
4th determines submodule, described in being less than or equal to when the quantity of the corresponding projection base vector in described image region
When preset threshold, determine that described image region is unintelligible region.
Optionally, described device further include:
Third obtains module, the pixel quantity for being included for obtaining the foreground image;
Computing module, whole pictures that the pixel quantity for calculating the foreground image is included with the picture to be analyzed
The ratio of prime number amount;
Second determining module, for determining that the picture to be analyzed is when the ratio is less than or equal to default ratio
Blurred picture.
Optionally, described device further include:
Output module, for exporting the first reminder message, first reminder message is to be analyzed described in user for reminding
Picture is blurred picture.
According to the third aspect of an embodiment of the present disclosure, a kind of terminal device is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
Obtain picture to be analyzed;
Clarity estimation is carried out to the picture to be analyzed, obtains clarity estimation image;
Each unintelligible region in the clarity estimation image is filtered out one by one, obtains the clarity estimation image
In clear area;
It determines that the clear area is the foreground image of the picture to be analyzed, removes the prospect in the picture to be analyzed
Other images except image are the background image of the picture to be analyzed.
The technical scheme provided by this disclosed embodiment can include the following benefits: the image analysis that the disclosure provides
Method is distinguished using the clarity of foreground image in picture and background image, analyzes the foreground image in image.Foreground image
Clarity be typically larger than the clarity of background image.Base vector dictionary is inquired, analysis picture is treated and carries out clarity estimation, obtain
Image is estimated to clarity corresponding with picture to be analyzed;Then, filtering clarity estimates the unintelligible region in image one by one,
Remaining image is the higher region of clarity, i.e. clear area in final clarity estimation image.Determine the figure of clear area
Picture is the foreground image of picture to be analyzed, other region, that is, background images in picture to be analyzed.This method is thought using another
Road determines foreground image and background image in image, determines foreground image and background image, image using the clarity of image
In foreground image clarity be higher than background image clarity, therefore using such method obtain foreground image accuracy rate
It is higher.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited
It is open.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention
Example, and be used to explain the principle of the present invention together with specification.
Fig. 1 is a kind of flow chart of image analysis method shown according to an exemplary embodiment;
Fig. 2 is the flow chart of another image analysis method shown according to an exemplary embodiment;
Fig. 3 is the flow chart of another image analysis method shown according to an exemplary embodiment;
Fig. 4 is a kind of image analysis apparatus block diagram shown according to an exemplary embodiment;
Fig. 5 is the block diagram of clarity estimation module shown according to an exemplary embodiment;
Fig. 6 is the block diagram of filtering module shown according to an exemplary embodiment;
Fig. 7 is the block diagram of another image analysis apparatus shown according to an exemplary embodiment;
Fig. 8 is the block diagram of another image analysis apparatus shown according to an exemplary embodiment;
Fig. 9 is a kind of block diagram of device for image analysis shown according to an exemplary embodiment;
Figure 10 is a kind of block diagram of device for image analysis shown according to an exemplary embodiment.
Through the above attached drawings, it has been shown that the specific embodiment of the disclosure will be hereinafter described in more detail.These attached drawings
It is not intended to limit the scope of this disclosure concept by any means, but is by referring to specific embodiments art technology
Personnel illustrate the concept of the disclosure.
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.
Fig. 1 is a kind of flow chart of image analysis method shown according to an exemplary embodiment, and this method can be applied
In terminal device or server, as shown in Figure 1, image analysis method may comprise steps of:
In step s 110, picture to be analyzed is obtained.
Picture to be analyzed can be the picture stored in terminal device, be also possible to the picture obtained from server.
In the step s 120, it treats analysis picture and carries out clarity estimation, obtain clarity estimation image.
In one embodiment of the present disclosure, resolution chart picture can be obtained according to base vector dictionary;Wherein, base vector word
By obtaining to a large amount of fuzzy samples pictures training study, the arbitrary image region in any one picture can decompose allusion quotation
At the combination comprising several base vectors.Moreover, the number of base vector needed for the high image-region of clarity is higher than clarity
The number of base vector number needed for low image-region, i.e. base vector required for the higher image-region of clarity is more.
Therefore, the base vector according to required for image-region can estimate the clarity of image.
It is analysed to picture to be projected on each base vector in base vector dictionary, obtains projection matrix, wherein throw
It is not projected on the corresponding base vector of the element in shadow matrix for 0 element representation image, is not 0 element in projection matrix
Show that image has projection on the corresponding base vector of the element.It is not 0 number of elements, i.e. present image in statistics projection matrix
Required base vector number.Clarity, which is generated, using the corresponding base vector of image estimates image.
In another embodiment of the disclosure, the clear of the difference image simple evaluation image of image in time domain can use
Clear degree.Difference image is to subtract each other to obtain by the pixel value in piece image in some region.
In step s 130, each unintelligible region in the clarity estimation image is filtered out one by one, is obtained described
Clarity estimates the clear area in image.
The unintelligible region in the corresponding clarity estimation image of picture to be analyzed is filtered out, specifically, if clarity
Base vector quantity needed for estimating the image-region in image is greater than preset threshold, it is determined that the image-region is clear area;
If base vector quantity needed for image-region is less than or equal to preset threshold, it is determined that the image-region is unintelligible region.
After clarity is estimated that the unintelligible region in image filters out one by one, remaining image-region, that is, circle of good definition
Domain.
In step S140, determine the clear area image be the picture to be analyzed foreground image, it is described to
Other images in analysis picture in addition to the foreground image are the background image of the picture to be analyzed.
Interested target is usually than more visible in image, therefore, the image for the clear area identified i.e. foreground image;
Other images in picture to be analyzed in addition to foreground image are background image.
Image analysis method provided in this embodiment is distinguished using the clarity of foreground image in picture and background image,
Analyze the foreground image in image.The clarity of foreground image is typically larger than the clarity of background image.Inquire base vector word
Allusion quotation treats analysis picture and carries out clarity estimation, obtains clarity estimation image corresponding with picture to be analyzed;Then, one by one
The unintelligible region in clarity estimation image is filtered, remaining image is that clarity is higher in final clarity estimation image
Region, i.e. clear area.The image for determining clear area is the foreground image of picture to be analyzed, other areas in picture to be analyzed
Domain, that is, background image.This method determines foreground image and background image in image using another thinking, utilizes the clear of image
Clear degree determines foreground image and background image, and the clarity of the foreground image in image is higher than the clarity of background image, therefore
The foreground image accuracy rate obtained using such method is higher.
Fig. 2 is the flow chart of another image analysis method shown according to an exemplary embodiment, this implementation is further
The detailed process of image analysis is described in detail.As shown in Fig. 2, the image analysis method may comprise steps of:
In step S210, fuzzy samples pictures are obtained.
A large amount of blurred picture is collected as fuzzy samples pictures.
In step S220, study is trained to the fuzzy samples pictures, obtains base vector dictionary;The base vector
Dictionary includes whole base vectors needed for decomposing image.
Fuzzy samples pictures are trained according to formula 1:
(formula 1)
Wherein, Y indicates fuzzy samples pictures;D is base vector dictionary;X is base vector projection matrix needed for composition Y;|X
|0It is not the quantity of 0 element in expression X matrix;K is degree of rarefication, for example, k value can be set as 5;st|X|0≤ k is constraint item
Part indicates that the quantity in X matrix not for 0 element is less than or equal to k;Formula 1, which is to solve for working as, meets st | X |0When≤k, so thatThe smallest D is solved specifically, can use following formula 2.
(formula 2)
In formula 2, λ is constraint factor item, and t is current iteration number, number when T is iteration ends.
In formula 2, D and X are unknown number, and D is the flat matrix that a column are greater than row, can be according to EM algorithm
(that is, EM algorithm) solves: firstly, the value of random initializtion D, as the base vector for including in base vector dictionary, meanwhile, X matrix
Interior element is all 0 when initial;Then, excellent using the continuous iteration of gradient descent method for the gradient of functional value and X at this time
Change, solves so that formula 2 is X the smallest.
Then, obtained X will be solved to substitute into formula 2, for the gradient of functional value and D at this time, is declined using gradient
The continuous iteration optimization of method solves so that 2 minimum D of formula.
In step S230, picture to be analyzed is obtained.
In step S240, the picture to be analyzed is divided into the image-region of default size.
Image-region can be set according to factors such as the pixel size of picture to be analyzed, actual demand, accuracy rate requirements
Default size.For example, default size can be the block of pixels of 8*8 size.
In step s 250, for each image-region, in the side for each base vector that the base vector dictionary is included
It is projected upwards, obtains the corresponding projection matrix in present image area.
For each of picture to be analyzed image-region, projected on each base vector of base vector dictionary D,
Obtain projection matrix X.
It is then possible to calculate the clarity of the image-region using formula 2:
(formula 3)
Wherein, t value can be image to be projected for 0.07,0.001,0.001, Y, and D is the base that training study obtains
Vector dictionary, X are the projection matrixes that Y is projected on D, | X |1It is not the summation of 0 element, the number in expression projection matrix
Amount show required base vector image to be projected coefficient and.
Formula 3 is to solve for working asWhen, so that not being the 0 the smallest X of element summation in matrix X.
In another embodiment of the disclosure, it can be solved with formula 1 and formula 2.
In step S260, determine each image-region it is corresponding be 0 base vector, obtain each image
The projection base vector in region.
The corresponding base vector of element in projection matrix not for 0 is known as projection vector;It is of course also possible to not define this name
Word.
In step S270, according to the corresponding all projection base vectors of the picture to be analyzed, clarity estimation figure is obtained
Picture.
Clarity estimation figure is generated using the corresponding base vector of element in projection matrix obtained in step S250 not for 0
Picture.
In step S280, the unintelligible region in clarity estimation image is filtered out one by one, obtains clear area.
In training base vector dictionary, the maximal projection base vector quantity k taken carries out first to clarity estimation image
When secondary filtering, preset threshold is set as k.That is, image-region of the projection base vector quantity less than or equal to k is unintelligible region;
Projecting image-region of the base vector quantity greater than k is clear area.Clarity is estimated that the unintelligible area filter in image falls
Later, image S is obtained1, wherein clarity estimation image S is filtered according to formula 4, obtains filtered image S1。
(formula 4)
Wherein, Mask1Indicate pattern mask region.Then, the image S obtained after filtration1On do at self-adaption binaryzation
Reason, obtains optimal preset threshold th, to obtain clearest, interested image S in clarity estimation image S2.Wherein,
S is obtained using formula 52:
(formula 5)
Adaptive two value-based algorithm is the gamma characteristic according to image, divides the image into foreground and background two parts, background and
Inter-class variance between prospect is bigger, illustrate constitute image two-part difference it is bigger, when part prospect mistake be divided into background or
When part background mistake is divided into prospect, all two-part difference can be caused to become smaller, therefore, mean the maximum segmentation of inter-class variance
Misclassification probability is minimum.The optimal preset threshold th, that is, corresponding threshold value of optimum segmentation.
When the quantity of the corresponding projection base vector in described image region is greater than preset threshold, determine that image-region is clear
Region;When the quantity of the corresponding projection base vector in described image region is less than or equal to preset threshold, described image area is determined
Domain is unintelligible region.
In step S290, determine the clear area image be the picture to be analyzed foreground image, it is described to
Other images in analysis picture in addition to the foreground image are the background image of the picture to be analyzed.
Image analysis method provided in this embodiment determines foreground image and Background in image using another thinking
Picture determines foreground image and background image using the clarity of image, and the clarity of the foreground image in image is higher than Background
The clarity of picture, thus it is higher using the foreground image accuracy rate that such method obtains.
Fig. 3 is the flow chart of another image analysis method shown according to an exemplary embodiment, and this method is in Fig. 1 institute
Show on the basis of embodiment can with the following steps are included:
In step s310, the pixel quantity that the foreground image is included is obtained.
In step s 320, the pixel quantity of the foreground image is calculated and whole pictures that the picture to be analyzed is included
The ratio of prime number amount.
The ratio between pixel number that the pixel number and whole picture to be analyzed for calculating determining foreground image are included, i.e.,
Calculate foreground image ratio shared in picture to be analyzed.
In step S330, when the ratio is less than or equal to default ratio, determine that the picture to be analyzed is fuzzy
Picture.
If foreground image proportion in picture to be analyzed is smaller, show that the picture to be analyzed integrally all compares mould
Paste, that is, the picture is blurred picture.
In step S340, the blurred picture is separated.
In an application scenarios of the disclosure, detect after storing blurred picture in the picture library in terminal device, it can
To separate blurred picture from picture library, for example, establishing the file for individually storing blurred picture in picture library
It presss from both sides, after every detection blurred picture, blurred picture is moved on in this document folder.
In step S350, the first reminder message is exported;First reminder message is for reminding user that picture to be analyzed is
Blurred picture.
The first reminder message is shown to user, reminds user that there are after blurred picture;It can also further show that second mentions
Awake message, it is proposed that user deletes blurred picture.
Image analysis method provided in this embodiment, the foreground image and background image for determining picture to be analyzed it
Afterwards, the whole clarity of further analysis picture, if it is determined that picture to be analyzed is blurred picture, then by blurred picture and clearly
Picture separates;And exporting the first reminder message prompting user's picture to be analyzed is blurred picture, so that user is directed to fuzzy graph
Piece is further to be handled.
Fig. 4 is a kind of image analysis apparatus block diagram shown according to an exemplary embodiment, which can be applied to end
In end equipment or server.As shown in figure 4, the device includes the first acquisition module 410, clarity estimation module 420, filter module
Block 430 and the first determining module 440.
First acquisition module 410 is configured as, and obtains picture to be analyzed.
Picture to be analyzed can be the picture stored in terminal device, be also possible to the picture obtained from server.
Clarity estimation module 420 is configured as, and is obtained the picture to be analyzed that module obtains to described first and is carried out clearly
Degree estimation obtains clarity estimation image.
Fig. 5 is the block diagram of clarity estimation module shown according to an exemplary embodiment, as shown in figure 5, clarity is estimated
Meter module includes: to divide submodule 421, the determining submodule 423 of projection submodule 422, first and generate submodule 424.
It divides submodule 421 to be configured as, the picture to be analyzed is divided to the image-region of default size.
Image-region can be set according to factors such as the pixel size of picture to be analyzed, actual demand, accuracy rate requirements
Default size.For example, default size can be the block of pixels of 8*8 size.
Projection submodule 422 is configured as, for each image-region that the division submodule divides, preparatory
It is projected on the direction for each base vector that the base vector dictionary of acquisition is included, obtains the corresponding projection in present image area
Matrix.
For each of picture to be analyzed image-region, projected on each base vector of base vector dictionary D,
Obtain projection matrix X.
First determine submodule 423, for determine each image-region it is corresponding be 0 base vector, obtain institute
State the projection base vector of each image-region.
The corresponding base vector of element in projection matrix X not for 0 is known as projection vector;It is of course also possible to not define this
Noun.
Submodule 424 is generated, for clarity being obtained and being estimated according to the corresponding all projection base vectors of the picture to be analyzed
Count image.
The corresponding base vector of element in projection matrix X not for 0 generates clarity estimation image.
In another embodiment of the disclosure, the clear of the difference image simple evaluation image of image in time domain can use
Clear degree.Difference image is to subtract each other to obtain by the pixel value in piece image in some region.
Filtering module 430 is configured as, and filters out the clarity estimation image that the clarity estimation module obtains one by one
In each unintelligible region, obtain the clear area in clarity estimation image.
The unintelligible region in the corresponding clarity estimation image of picture to be analyzed is filtered out, specifically, if clarity
Base vector quantity needed for estimating the image-region in image is greater than preset threshold, it is determined that the image-region is clear area;
If base vector quantity needed for image-region is less than or equal to preset threshold, it is determined that the image-region is unintelligible region.
After clarity is estimated that the unintelligible region in image filters out one by one, remaining image-region, that is, circle of good definition
Domain.
Fig. 6 is the block diagram of filtering module shown according to an exemplary embodiment, as shown in fig. 6, filtering module 430 can be with
It include: second to determine that submodule 431, third determine that 432 pieces of submodule and the 4th determines submodule 433.
Second determines that submodule 431 is configured as, and using adaptive two value-based algorithm, determines preset threshold.
Adaptive two value-based algorithm is the gamma characteristic according to image, divides the image into foreground and background two parts, background and
Inter-class variance between prospect is bigger, illustrate constitute image two-part difference it is bigger, when part prospect mistake be divided into background or
When part background mistake is divided into prospect, all two-part difference can be caused to become smaller, therefore, mean the maximum segmentation of inter-class variance
Misclassification probability is minimum.The optimal preset threshold th, that is, corresponding threshold value of optimum segmentation.
Third determines that submodule 432 is configured as, when the quantity of the corresponding projection base vector in described image region is greater than institute
When stating preset threshold, determine that described image region is clear area.
4th determine submodule 433 be configured as, when described image region it is corresponding projection base vector quantity be less than or
When equal to the preset threshold, determine that described image region is unintelligible region.
First determining module 440 is configured as, and determines that the clear area that the filtering module obtains is the figure to be analyzed
The foreground image of piece, other images in the picture to be analyzed in addition to the foreground image are the back of the picture to be analyzed
Scape image.
Interested target is usually than more visible in image, therefore, the image for the clear area identified i.e. foreground image;
Other images in picture to be analyzed in addition to foreground image are background image.
Image analysis apparatus provided in this embodiment is distinguished using the clarity of foreground image in picture and background image,
Analyze the foreground image in image.The clarity of foreground image is typically larger than the clarity of background image.Inquire base vector word
Allusion quotation treats analysis picture and carries out clarity estimation, obtains clarity estimation image corresponding with picture to be analyzed;Then, one by one
The unintelligible region in clarity estimation image is filtered, remaining image is that clarity is higher in final clarity estimation image
Region, i.e. clear area.The image for determining clear area is the foreground image of picture to be analyzed, other areas in picture to be analyzed
Domain, that is, background image.The device determines foreground image and background image in image using another thinking, utilizes the clear of image
Clear degree determines foreground image and background image, and the clarity of the foreground image in image is higher than the clarity of background image, therefore
The foreground image accuracy rate obtained using such method is higher.
Fig. 7 is the block diagram of another image analysis apparatus shown according to an exemplary embodiment, and the device is shown in Fig. 4
On the basis of embodiment further include: second obtains module 710 and training module 720.
Second acquisition module 710 is configured as, and obtains fuzzy samples pictures.
Training module 720 is configured as, and is trained study to the fuzzy samples pictures, is obtained the base vector word
Allusion quotation, the base vector dictionary include whole base vectors needed for decomposing image.
The method of training base vector dictionary may refer to the training process of step S220 in embodiment illustrated in fig. 2, herein not
It repeats again.
Image analysis apparatus provided in this embodiment then, will be wait divide using fuzzy samples pictures training base vector dictionary
Analysis picture projection included to base vector dictionary base vector on, according to projection base vector quantity survey picture clarity,
Accuracy rate is high.
Fig. 8 is the block diagram of another image analysis apparatus shown according to an exemplary embodiment, and the device is shown in Fig. 4
On the basis of embodiment further include: third obtains module 810, computing module 820, the second determining module 830 and output module
840。
Third obtains module 810 and is configured as, and obtains the pixel quantity that the foreground image is included.
Computing module 820 is configured as, and the pixel quantity and the picture to be analyzed for calculating the foreground image are included
Whole pixel quantities ratio.
The ratio between pixel number that the pixel number and whole picture to be analyzed for calculating determining foreground image are included, i.e.,
Calculate foreground image ratio shared in picture to be analyzed.
Second determining module 830 is configured as, and when the ratio is less than or equal to default ratio, is determined described to be analyzed
Picture is blurred picture.
If foreground image proportion in picture to be analyzed is smaller, show that the picture to be analyzed integrally all compares mould
Paste, that is, the picture is blurred picture.
In an application scenarios of the disclosure, after detecting storage blurred picture in the picture library in terminal device,
Blurred picture can be separated from picture library, for example, establishing the text for individually storing blurred picture in picture library
Part presss from both sides, and after every detection blurred picture, blurred picture is moved on in this document folder.
Output module 840 is configured as, and exports the first reminder message, first reminder message is for reminding described in user
Picture to be analyzed is blurred picture.
The first reminder message is shown to user, reminds user that there are after blurred picture;It can also further show that second mentions
Awake message, it is proposed that user deletes blurred picture.
Image analysis apparatus provided in this embodiment, the foreground image and background image for determining picture to be analyzed it
Afterwards, the whole clarity of further analysis picture, if it is determined that picture to be analyzed is blurred picture, then by blurred picture and clearly
Picture separates;And exporting the first reminder message prompting user's picture to be analyzed is blurred picture, so that user is directed to fuzzy graph
Piece is further to be handled.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
Fig. 9 is a kind of block diagram of device 900 for image analysis shown according to an exemplary embodiment.For example, dress
Setting 900 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical treatment
Equipment, body-building equipment, personal digital assistant etc..
As shown in figure 9, device 900 may include following one or more components: processing component 902, memory 904, electricity
Source component 906, multimedia component 908, audio component 910, the interface 912 of input/output (I/O), sensor module 914, with
And communication component 916.
The integrated operation of the usual control device 900 of processing component 902, such as with display, telephone call, data communication, phase
Machine operation and record operate associated operation.Processing component 902 may include that one or more processors 920 refer to execute
It enables, to perform all or part of the steps of the methods described above.In addition, processing component 902 may include one or more modules, just
Interaction between processing component 902 and other assemblies.For example, processing component 902 may include multi-media module, it is more to facilitate
Interaction between media component 908 and processing component 902.
Memory 904 is configured as storing various types of data to support the operation in device 900.These data are shown
Example includes the instruction of any application or method for operating on device 900, contact data, and telephone book data disappears
Breath, picture, video etc..Memory 904 can be by any kind of volatibility or non-volatile memory device or their group
It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile
Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash
Device, disk or CD.
Power supply module 906 provides electric power for the various assemblies of device 900.Power supply module 906 may include power management system
System, one or more power supplys and other with for device 900 generate, manage, and distribute the associated component of electric power.
Multimedia component 908 includes the screen of one output interface of offer between described device 900 and user.One
In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen
Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings
Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action
Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers
Body component 908 includes a front camera and/or rear camera.When device 900 is in operation mode, such as screening-mode or
When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and
Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 910 is configured as output and/or input audio signal.For example, audio component 910 includes a Mike
Wind (MIC), when device 900 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched
It is set to reception external audio signal.The received audio signal can be further stored in memory 904 or via communication set
Part 916 is sent.In some embodiments, audio component 910 further includes a loudspeaker, is used for output audio signal.
I/O interface 912 provides interface between processing component 902 and peripheral interface module, and above-mentioned peripheral interface module can
To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock
Determine button.
Sensor module 914 includes one or more sensors, and the state for providing various aspects for device 900 is commented
Estimate.For example, sensor module 914 can detecte the state that opens/closes of device 900, and the relative positioning of component, for example, it is described
Component is the display and keypad of device 900, and sensor module 914 can be with 900 1 components of detection device 900 or device
Position change, the existence or non-existence that user contacts with device 900,900 orientation of device or acceleration/deceleration and device 900
Temperature change.Sensor module 914 may include proximity sensor, be configured to detect without any physical contact
Presence of nearby objects.Sensor module 914 can also include optical sensor, such as CMOS or ccd image sensor, at
As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors
Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 916 is configured to facilitate the communication of wired or wireless way between device 900 and other equipment.Device
900 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation
In example, communication component 916 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel.
In one exemplary embodiment, the communication component 916 further includes near-field communication (NFC) module, to promote short range communication.Example
Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology,
Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 900 can be believed by one or more application specific integrated circuit (ASIC), number
Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided
It such as include the memory 904 of instruction, above-metioned instruction can be executed by the processor 920 of device 900 to complete the above method.For example,
The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk
With optical data storage devices etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processing of mobile terminal
When device executes, so that terminal device is able to carry out a kind of image analysis method, which comprises
Obtain picture to be analyzed;
Clarity estimation is carried out to the picture to be analyzed, obtains clarity estimation image;
Each unintelligible region in the clarity estimation image is filtered out one by one, obtains the clarity estimation image
In clear area;
It determines that the clear area is the foreground image of the picture to be analyzed, removes the prospect in the picture to be analyzed
Other images except image are the background image of the picture to be analyzed.
Figure 10 is a kind of block diagram of device 1000 for image analysis shown according to an exemplary embodiment.For example,
Device 1000 may be provided as a server.As shown in Figure 10, device 1000 includes processing component 1022, further comprises
One or more processors, and the memory resource as representated by memory 1032, can be by processing component 1022 for storing
Execution instruction, such as application program.The application program stored in memory 1032 may include one or more
Each corresponds to the module of one group of instruction.In addition, processing component 1022 is configured as executing instruction, with execute above-mentioned Fig. 1~
Embodiment of the method shown in Fig. 3.
Device 1000 can also include that a power supply module 1026 be configured as the power management of executive device 1000, and one
Wired or wireless network interface 1050 is configured as device 1000 being connected to network and input and output (I/O) interface
1058.Device 1000 can be operated based on the operating system for being stored in memory 1032, such as Windows ServerTM, Mac
OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or
Person's adaptive change follows general principle of the invention 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 true scope and spirit of the invention are by following
Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.
Claims (11)
1. a kind of image analysis method characterized by comprising
Obtain picture to be analyzed;
Clarity estimation is carried out to the picture to be analyzed, obtains clarity estimation image;
Each unintelligible region in the clarity estimation image is filtered out one by one, is obtained in the clarity estimation image
Clear area;
It determines that the clear area is the foreground image of the picture to be analyzed, removes the foreground image in the picture to be analyzed
Except other images be the picture to be analyzed background image;
It is described that clarity estimation is carried out to the picture to be analyzed, obtain clarity estimation image, comprising:
The picture to be analyzed is divided to the image-region of default size;
For each image-region, thrown on the direction for each base vector that the base vector dictionary being obtained ahead of time is included
Shadow obtains the corresponding projection matrix in present image area;
Determine each image-region it is corresponding be 0 base vector, obtain the projection base vector of each image-region;
According to the corresponding all projection base vectors of the picture to be analyzed, clarity estimation image is obtained.
2. the method according to claim 1, wherein the method also includes:
Obtain fuzzy samples pictures;
Study is trained to the fuzzy samples pictures, obtains the base vector dictionary, the base vector dictionary includes to decompose
Whole base vectors needed for image.
3. method according to claim 1 or 2, which is characterized in that described to filter out the clarity estimation image one by one
In each unintelligible region, comprising:
Using adaptive two value-based algorithm, preset threshold is determined;
When the quantity of the corresponding projection base vector in described image region is greater than the preset threshold, determine that described image region is
Clear area;Alternatively,
When the quantity of the corresponding projection base vector in described image region is less than or equal to the preset threshold, described image is determined
Region is unintelligible region.
4. the method according to claim 1, wherein the method also includes:
Obtain the pixel quantity that the foreground image is included;
Calculate the pixel quantity of the foreground image and the ratio of whole pixel quantities that the picture to be analyzed is included;
When the ratio is less than or equal to default ratio, determine that the picture to be analyzed is blurred picture.
5. according to the method described in claim 4, it is characterized in that, the method also includes:
Export the first reminder message, picture to be analyzed described in user is blurred picture to first reminder message for reminding.
6. a kind of image analysis apparatus characterized by comprising
First obtains module, for obtaining picture to be analyzed;
Clarity estimation module carries out clarity estimation for obtaining the picture to be analyzed that module obtains to described first, obtains
Clarity estimates image;
Filtering module, it is each unclear in the clarity estimation image that the clarity estimation module obtains for filtering out one by one
Clear region obtains the clear area in the clarity estimation image;
First determining module, for determining the clear area that the filtering module obtains for the foreground picture of the picture to be analyzed
Picture, other images in the picture to be analyzed in addition to the foreground image are the background image of the picture to be analyzed;
The clarity estimation module, comprising:
Submodule is divided, for the picture to be analyzed to be divided to the image-region of default size;
Submodule is projected, each image-region for dividing for the division submodule, in the basal orientation being obtained ahead of time
It is projected on the direction for each base vector that amount dictionary is included, obtains the corresponding projection matrix in present image area;
First determine submodule, for determine each image-region it is corresponding be 0 base vector, obtain each figure
As the projection base vector in region;
Submodule is generated, for obtaining clarity estimation image according to the corresponding all projection base vectors of the picture to be analyzed.
7. device according to claim 6, which is characterized in that described device further include:
Second obtains module, for obtaining fuzzy samples pictures;
Training module obtains the base vector dictionary, the base vector for being trained study to the fuzzy samples pictures
Dictionary includes whole base vectors needed for decomposing image.
8. device according to claim 6 or 7, which is characterized in that the filtering module, comprising:
Second determines submodule, for utilizing adaptive two value-based algorithm, determines preset threshold;
Third determines submodule, for being greater than the preset threshold when the quantity of the corresponding projection base vector in described image region
When, determine that described image region is clear area;Alternatively,
4th determines submodule, for being less than or equal to described preset when the quantity of the corresponding projection base vector in described image region
When threshold value, determine that described image region is unintelligible region.
9. device according to claim 6, which is characterized in that described device further include:
Third obtains module, the pixel quantity for being included for obtaining the foreground image;
Computing module, whole pixel numbers that the pixel quantity for calculating the foreground image is included with the picture to be analyzed
The ratio of amount;
Second determining module, for determining that the picture to be analyzed is fuzzy when the ratio is less than or equal to default ratio
Picture.
10. device according to claim 9, which is characterized in that described device further include:
Output module, for exporting the first reminder message, first reminder message is for reminding picture to be analyzed described in user
It is blurred picture.
11. a kind of terminal device characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
Obtain picture to be analyzed;
Clarity estimation is carried out to the picture to be analyzed, obtains clarity estimation image;
Each unintelligible region in the clarity estimation image is filtered out one by one, is obtained in the clarity estimation image
Clear area;
It determines that the clear area is the foreground image of the picture to be analyzed, removes the foreground image in the picture to be analyzed
Except other images be the picture to be analyzed background image;
It is described that clarity estimation is carried out to the picture to be analyzed, obtain clarity estimation image, comprising:
The picture to be analyzed is divided to the image-region of default size;
For each image-region, thrown on the direction for each base vector that the base vector dictionary being obtained ahead of time is included
Shadow obtains the corresponding projection matrix in present image area;
Determine each image-region it is corresponding be 0 base vector, obtain the projection base vector of each image-region;
According to the corresponding all projection base vectors of the picture to be analyzed, clarity estimation image is obtained.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510921111.0A CN105574857B (en) | 2015-12-11 | 2015-12-11 | Image analysis method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510921111.0A CN105574857B (en) | 2015-12-11 | 2015-12-11 | Image analysis method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105574857A CN105574857A (en) | 2016-05-11 |
CN105574857B true CN105574857B (en) | 2019-02-15 |
Family
ID=55884948
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510921111.0A Active CN105574857B (en) | 2015-12-11 | 2015-12-11 | Image analysis method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105574857B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108630156A (en) * | 2017-03-24 | 2018-10-09 | 京东方科技集团股份有限公司 | Display device and display methods |
CN107341484A (en) * | 2017-07-21 | 2017-11-10 | 金鹏电子信息机器有限公司 | A kind of network video image analysis method based on big data |
WO2019173954A1 (en) * | 2018-03-12 | 2019-09-19 | 华为技术有限公司 | Method and apparatus for detecting resolution of image |
CN110580428A (en) | 2018-06-08 | 2019-12-17 | Oppo广东移动通信有限公司 | image processing method, image processing device, computer-readable storage medium and electronic equipment |
CN109410169B (en) * | 2018-09-11 | 2020-06-05 | 广东智媒云图科技股份有限公司 | Image background interference degree identification method and device |
CN110969602B (en) * | 2019-11-26 | 2023-09-05 | 北京奇艺世纪科技有限公司 | Image definition detection method and device |
CN110933304B (en) * | 2019-11-27 | 2022-02-25 | RealMe重庆移动通信有限公司 | Method and device for determining to-be-blurred region, storage medium and terminal equipment |
CN112884797B (en) * | 2021-02-02 | 2023-12-08 | 武汉钢铁有限公司 | Image background removing method and device and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102903098A (en) * | 2012-08-28 | 2013-01-30 | 四川虹微技术有限公司 | Depth estimation method based on image definition difference |
CN103236061A (en) * | 2013-04-28 | 2013-08-07 | 北京农业信息技术研究中心 | Trialeurodes vaporariorum image segmentation method based on discrete cosine transformation (DCT) and region growing |
CN103996198A (en) * | 2014-06-04 | 2014-08-20 | 天津工业大学 | Method for detecting region of interest in complicated natural environment |
US8842908B2 (en) * | 2010-12-20 | 2014-09-23 | Samsung Electronics Co., Ltd. | Method of separating front view and background and apparatus |
CN104134204A (en) * | 2014-07-09 | 2014-11-05 | 中国矿业大学 | Image definition evaluation method and image definition evaluation device based on sparse representation |
-
2015
- 2015-12-11 CN CN201510921111.0A patent/CN105574857B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8842908B2 (en) * | 2010-12-20 | 2014-09-23 | Samsung Electronics Co., Ltd. | Method of separating front view and background and apparatus |
CN102903098A (en) * | 2012-08-28 | 2013-01-30 | 四川虹微技术有限公司 | Depth estimation method based on image definition difference |
CN103236061A (en) * | 2013-04-28 | 2013-08-07 | 北京农业信息技术研究中心 | Trialeurodes vaporariorum image segmentation method based on discrete cosine transformation (DCT) and region growing |
CN103996198A (en) * | 2014-06-04 | 2014-08-20 | 天津工业大学 | Method for detecting region of interest in complicated natural environment |
CN104134204A (en) * | 2014-07-09 | 2014-11-05 | 中国矿业大学 | Image definition evaluation method and image definition evaluation device based on sparse representation |
Also Published As
Publication number | Publication date |
---|---|
CN105574857A (en) | 2016-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105574857B (en) | Image analysis method and device | |
US11532180B2 (en) | Image processing method and device and storage medium | |
CN111310616B (en) | Image processing method and device, electronic equipment and storage medium | |
EP2977959B1 (en) | Method and device for adjusting skin color | |
RU2577188C1 (en) | Method, apparatus and device for image segmentation | |
US10007841B2 (en) | Human face recognition method, apparatus and terminal | |
WO2020134866A1 (en) | Key point detection method and apparatus, electronic device, and storage medium | |
CN106454336B (en) | The method and device and terminal that detection terminal camera is blocked | |
CN110580688B (en) | Image processing method and device, electronic equipment and storage medium | |
WO2021169136A1 (en) | Image processing method and apparatus, and electronic device and storage medium | |
CN109977860B (en) | Image processing method and device, electronic equipment and storage medium | |
CN105528078B (en) | The method and device of controlling electronic devices | |
CN105426878B (en) | Face cluster method and device | |
WO2020114236A1 (en) | Keypoint detection method and apparatus, electronic device, and storage medium | |
CN104408404A (en) | Face identification method and apparatus | |
US20220222831A1 (en) | Method for processing images and electronic device therefor | |
CN113409342A (en) | Training method and device for image style migration model and electronic equipment | |
CN110717399A (en) | Face recognition method and electronic terminal equipment | |
CN112347911A (en) | Method and device for adding special effects of fingernails, electronic equipment and storage medium | |
CN110619325A (en) | Text recognition method and device | |
CN109784327B (en) | Boundary box determining method and device, electronic equipment and storage medium | |
CN109784537A (en) | Predictor method, device and the server and storage medium of ad click rate | |
CN106469446B (en) | Depth image segmentation method and segmentation device | |
CN114926350A (en) | Image beautifying method and device, electronic equipment and storage medium | |
CN109376588B (en) | A kind of face surveys luminous point choosing method, device and capture apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |