Invention content
For this purpose, a kind of image fuzzy detection method of present invention offer, computing device and readable storage medium storing program for executing, to try hard to solve
Or at least alleviate existing at least one problem above.
According to an aspect of the invention, there is provided a kind of image fuzzy detection method, suitable for being executed in computing device,
The method comprising the steps of:Receive image to be detected;Light spot image is intercepted from image, light spot image includes at least one light
Spot;Extract the contour line of each hot spot in light spot image;For the every contour line extracted, it is right to its to calculate this contour line
The Hausdorff distance for the standard contour line answered;Judge the Hausdorff distance that is calculated whether be less than standard contour line away from
From threshold value, the distance threshold of standard contour line and standard contour line is based on multiple no blur spot images and is previously obtained;And
If the Hausdorff distance for arriving its corresponding standard contour line is not less than the contour line of the distance threshold of the standard contour line in institute
Accounting in all contour lines of extraction is more than predetermined ratio, it is determined that image, which exists, to be obscured, and vague category identifier is motion blur.
Optionally, in image fuzzy detection method according to the present invention, from image intercept light spot image the step of wrap
It includes:Area-of-interest is intercepted from image, area-of-interest includes light spot image;Based at least one described in area-of-interest acquisition
The beam pattern of a hot spot;Light spot image is intercepted according to the beam pattern of at least one hot spot.
Optionally, in image fuzzy detection method according to the present invention, at least one light is obtained based on area-of-interest
The step of beam pattern of spot includes:To area-of-interest into row threshold division, the bianry image of area-of-interest is obtained;According to
Bianry image determines the beam pattern of at least one hot spot.
Optionally, in image fuzzy detection method according to the present invention, the beam pattern of at least one hot spot includes packet
The minimum enclosed rectangle for enclosing at least one hot spot, the step of light spot image is intercepted according to the beam pattern of at least one hot spot
Suddenly include:The light spot image is intercepted according to the minimum enclosed rectangle for surrounding at least one hot spot.
Optionally, in image fuzzy detection method according to the present invention, the beam pattern of at least one hot spot further includes
The minimum enclosed rectangle length-width ratio and area of each hot spot, method further includes step:At least one is being obtained based on area-of-interest
After the beam pattern of a hot spot, judge whether the minimum enclosed rectangle length-width ratio of each hot spot meets the first hot spot screening item
Part;If it is more than first that minimum enclosed rectangle length-width ratio, which is unsatisfactory for accounting of the hot spot of the first hot spot screening conditions in all hot spots,
Hot spot ratio, it is determined that image, which exists, to be obscured, and vague category identifier is motion blur;If minimum enclosed rectangle length-width ratio meets first
Accounting of the hot spot of hot spot screening conditions in all hot spots is more than the first hot spot ratio, then judge each hot spot area whether
Meet the second hot spot screening conditions;If area is unsatisfactory for the hot spot of the second hot spot screening conditions, the accounting in all hot spots is more than
Second hot spot ratio, it is determined that image, which exists, to be obscured, and vague category identifier is focus blur.
Optionally, in image fuzzy detection method according to the present invention, method further includes step:In extraction light spot image
In each hot spot contour line after, obtain the contour line feature of every contour line, the contour line feature of every contour line includes
Perimeter, area and the minimum enclosed rectangle length-width ratio of this contour line;For every contour line, the perimeter of this contour line is judged
Whether meet whether first contour line screening conditions, area meet the second contour line screening conditions and minimum enclosed rectangle is long
Whether width than meets third contour line screening conditions;If being unsatisfactory for first contour line screening conditions, the second contour line screening conditions
It is more than contour line with accounting of the contour line of any one in all contour lines extracted in third contour line screening conditions
Ratio, it is determined that image, which exists, to be obscured, and vague category identifier is focus blur.
Optionally, in image fuzzy detection method according to the present invention, method further includes step:It is every for what is extracted
Contour line calculates separately this before calculating Hausdorff distance of this contour line to its corresponding standard contour line
Hausdorff distance of the contour line to every standard contour line;Select the standard contour line of wherein Hausdorff distance minimum as
The corresponding standard contour line of this contour line.
Optionally, in image fuzzy detection method according to the present invention, method further includes being based on multiple no blur spots
Image obtains the step of distance threshold of at least one standard contour line and every standard contour line, including:Extract each nothing
The contour line of each hot spot in blur spot image;The a plurality of contour line extracted is divided at least one contour line collection
It closes;For each contour line set, a standard contour line for representing the contour line set is obtained, and be based on the contour line set
Calculate the distance threshold of this standard contour line.
Optionally, in image fuzzy detection method according to the present invention, a plurality of contour line extracted is divided into
The step of at least one contour line set includes:Calculate Hao Siduofu in a plurality of contour line that is extracted between any two away from
From;In a plurality of contour line extracted, detect whether there is the contour line for not being divided to any contour line set;If
It is, then according to the Hausdorff distance being calculated, one to be built in the contour line for not being divided to any contour line set
Contour line set;The step of repeating above-mentioned detection contour line and structure contour line set, until a plurality of profile extracted
Until the contour line for not being divided to any contour line set is not present in line.
Optionally, in image fuzzy detection method according to the present invention, according to the Hausdorff distance being calculated,
Not being divided in the contour line of any contour line set the step of building a contour line set includes:Any wheel be not added
In the contour line of profile set, two contour lines of Hausdorff distance minimum between any two are selected, a contour line is newly formed
Set;In the contour line that any contour line set is not added, search whether to exist into the contour line set newly formed arbitrary
The Hausdorff distance of one contour line is less than the contour line of predetermined threshold;If it is present calculate separately lookup obtain it is every
The sum of the Hausdorff distance of all contour lines in contour line to the contour line set newly formed, and will wherein Hao Siduofu away from
From the sum of minimum contour line be added to the contour line set newly formed;Repeat above-mentioned lookup contour line, calculate Hao Siduofu away from
From the sum of and the step of addition contour line, until not being added in the contour line of any contour line set, there is no to new composition
Contour line set in any one contour line Hausdorff distance be less than predetermined threshold contour line until.
Optionally, in image fuzzy detection method according to the present invention, predetermined threshold is 0.15~0.19.
Optionally, in image fuzzy detection method according to the present invention, a mark for representing the contour line set is obtained
The step of quasi- contour line includes:In the contour line set, the step of repeating to select an alternative criteria contour line, until
Until the alternative criteria contour line selected reaches predetermined number item;The predetermined number alternative criteria profile that will be selected
Line merges into a standard contour line;The step of wherein selecting an alternative criteria contour line include:For the contour line set
In be not picked as every contour line of alternative criteria contour line, calculating is not picked as alternatively marking in addition to this contour line
The contour line of quasi- contour line is to this contour line and the sum of the Hausdorff distance of all alternative criteria contour lines;Selection is wherein
The contour line of the sum of Hausdorff distance minimum is as an alternative criteria contour line.
Optionally, in image fuzzy detection method according to the present invention, this standard is calculated based on the contour line set
The step of distance threshold of contour line includes:Every contour line is calculated separately in the contour line set to this standard contour line
Hausdorff distance;Select maximum Hausdorff distance as the distance threshold of this standard contour line.
Optionally, in image fuzzy detection method according to the present invention, by following formula come calculate Hao Siduofu away from
From:
HD (A, B)=max { h (A, B), h (B, A) }
Wherein
A={ pa1,pa2,pa3,......,pamB={ pb1,pb2,pb3,......,pbn}
Hausdorff distances of the HD (A, B) between A and B, h (A, B) and h (A, B) are respectively that this is more by the unidirectional person of outstanding talent of A to B
The unidirectional Hausdorff distance of husband's distance and B to A, A and B are respectively two set for including limited pixel, | | pa-pb| | it is
Pixel paWith pixel pbBetween Euclidean distance, | | pb-pa| | it is pixel pbWith pixel paBetween Euclidean distance.
Optionally, in image fuzzy detection method according to the present invention, the step of contour line for extracting hot spot, includes:It adopts
The contour line of hot spot is extracted with isocline algorithms.
Optionally, in image fuzzy detection method according to the present invention, image is the close of eye circumference or iris or face
Infrared image.
According to another aspect of the present invention, a kind of computing device is provided, including:One or more processors;Storage
Device;And one or more programs, wherein one or more programs are stored in memory and are configured as by one or more
Processor executes, and one or more programs include for executing the either method in image fuzzy detection method according to the present invention
Instruction.
According to the present invention there are one aspects, provide a kind of readable storage medium storing program for executing of storage program, described program packet
Instruction is included, described instruction is when executed by a computing apparatus so that computing device executes image fuzzy detection side according to the present invention
Any one of method.
Image fuzzy detection scheme according to the present invention is in advance based on multiple no blur spot images and obtains at least one mark
Quasi- contour line extracts the contour line of each hot spot in image to be detected, based on Hausdorff distance to every contour line and this
The corresponding standard contour line of contour line is compared, and to realize the fuzzy detection to image, and accuracy is high, calculation amount is small,
And the vague category identifier that can distinguish image is focus blur and motion blur.
Specific implementation mode
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
Completely it is communicated to those skilled in the art.
Fig. 1 is exemplarily illustrated the structure diagram of computing device 100.The computing device 100 can be implemented as server, example
Such as file server, database server, apps server and network server can also be embodied as including desktop meter
The personal computer of calculation machine and notebook computer configuration.In addition, computing device 100 be also implemented as small size it is portable (or
Person moves) part of electronic equipment, these electronic equipments can be such as cellular phone, personal digital assistant (PDA), personal
Media player device, wireless network browsing apparatus, personal helmet, application specific equipment or may include appointing above
The mixing apparatus of what function.
In basic configuration 102, computing device 100 typically comprise system storage 106 and one or more at
Manage device 104.Memory bus 108 can be used for the communication between processor 104 and system storage 106.
Depending on desired configuration, processor 104 can be any kind of processing, including but not limited to:Microprocessor
((μ P), microcontroller (μ C), digital information processor (DSP) or any combination of them.Processor 104 may include all
Cache, processor core such as one or more rank of on-chip cache 110 and second level cache 112 etc
114 and register 116.Exemplary processor core 114 may include arithmetic and logical unit (ALU), floating-point unit (FPU),
Digital signal processing core (DSP core) or any combination of them.Exemplary Memory Controller 118 can be with processor
104 are used together, or in some implementations, and Memory Controller 218 can be an interior section of processor 104.
Depending on desired configuration, system storage 106 can be any type of memory, including but not limited to:Easily
The property lost memory (RAM), nonvolatile memory (ROM, flash memory etc.) or any combination of them.System stores
Device 106 may include operating system 120, one or more program 122 and program data 124.In some embodiments,
Program 122 can be configured as to be referred to by one or more processor 104 using the execution of program data 124 on an operating system
It enables.
Computing device 100 can also include contributing to from various interface equipments (for example, output equipment 142, Peripheral Interface
144 and communication equipment 146) to basic configuration 102 via the communication of bus/interface controller 130 interface bus 140.Example
Output equipment 142 include graphics processing unit 148 and audio treatment unit 150.They can be configured as contribute to via
One or more port A/V 152 is communicated with the various external equipments of such as display or loud speaker etc.Outside example
If interface 144 may include serial interface controller 154 and parallel interface controller 156, they, which can be configured as, contributes to
Via one or more port I/O 158 and such as input equipment (for example, keyboard, mouse, pen, voice-input device, touch
Input equipment) or the external equipment of other peripheral hardwares (such as printer, scanner etc.) etc communicated.Exemplary communication is set
Standby 146 may include network controller 160, can be arranged to convenient for via one or more communication port 164 and one
The communication that other a or multiple computing devices 162 pass through network communication link.
Network communication link can be an example of communication media.Communication media can be usually presented as in such as carrier wave
Or the computer-readable instruction in the modulated data signal of other transmission mechanisms etc, data structure, program module, and can
To include any information delivery media." modulated data signal " can such signal, one in its data set or more
It is a or it change can the mode of coding information in the signal carry out.As unrestricted example, communication media can be with
Include the wire medium of such as cable network or private line network etc, and such as sound, radio frequency (RF), microwave, infrared
(IR) the various wireless mediums or including other wireless mediums.Term computer-readable medium used herein may include depositing
Both storage media and communication media.
One or more programs 122 of computing device 100 include for executing image fuzzy detection side according to the present invention
The instruction of any one of method.Fig. 2 illustrates image fuzzy detection method 200 according to one embodiment of the present invention
Flow chart.
As shown in Fig. 2, image fuzzy detection method 200 starts from step S210.In step S210, figure to be detected is received
Picture.The image obtains usually at image capture device.According to embodiment of the present invention, computing device 100 can be through
Communication by above-mentioned network communication link is carried out by one or more communication port 164 and image capture device, from the figure
As obtaining its near-infrared image for including iris shot, such as the near-infrared image of face, eye circumference, iris at collecting device.
Image capture device usually may include near-infrared light source, optical lens and imaging sensor.
Then in step S220, light spot image is intercepted from the image, which includes at least one hot spot.It can
To understand ground, these hot spots are that the bright object (such as near-infrared light source) of surrounding is reflected on pupil and is formed.
According to embodiment of the present invention, light spot image can be intercepted by following step:
Area-of-interest is first intercepted from image.Area-of-interest includes light spot image, and it typically is pupil regions, can
To be intercepted by positioning the position of pupil in the picture.
Then, the beam pattern of at least one hot spot can be obtained based on area-of-interest.Specifically, to area-of-interest
Into row threshold division, the bianry image of the area-of-interest is obtained, hot spot and background separation are opened.Wherein, Threshold segmentation side
Method can be the dividing method based on threshold value of such as fixed threshold segmentation, adaptive threshold image segmentation etc, can be all
Such as the dividing method based on region of watershed method etc, can also be such as Level Set Method etc based on geometric active wheel
The dividing method of wide model, the present invention are without limitation.
Fig. 3 A and Fig. 3 B illustrate area-of-interest and its binary map according to one embodiment of the present invention respectively
The schematic diagram of picture, in bianry image as shown in Figure 3B, white portion is hot spot, and black portions are background.
The beam pattern of at least one hot spot can be then determined according to the bianry image of area-of-interest.Normally, at least
The beam pattern of one hot spot may include the minimum enclosed rectangle for surrounding at least one hot spot, the external square of minimum of each hot spot
Shape length-width ratio and area etc..
According to another implementation of the invention, in the beam pattern for obtaining at least one hot spot based on area-of-interest
Later, it can be determined that whether the minimum enclosed rectangle length-width ratio of each hot spot meets the first hot spot screening conditions, first hot spot
Screening conditions are that minimum enclosed rectangle length-width ratio is less than hot spot length and width ratio (such as 1.5).
If it is super that minimum enclosed rectangle length-width ratio is unsatisfactory for accounting of the hot spot of the first hot spot screening conditions in all hot spots
Cross the first hot spot ratio (being usually 1/2), it is determined that image, which exists, to be obscured, and vague category identifier is motion blur.If minimum external
It is more than the first hot spot ratio that rectangular aspect ratio, which meets accounting of the hot spot of the first hot spot screening conditions in all hot spots, then continues
Judge whether the area of each hot spot meets the second hot spot screening conditions, which is that area is located at hot spot face
Minimum value is accumulated to (such as 40 pixels are between 200 pixels) between facula area maximum value, including facula area minimum value
With facula area maximum value.
If it is more than the second hot spot ratio that area, which is unsatisfactory for accounting of the hot spot of the second hot spot screening conditions in all hot spots,
(being usually 1/2), it is determined that image, which exists, to be obscured, and vague category identifier is focus blur.
If area meets the hot spot of the second hot spot screening conditions, the accounting in all hot spots is more than the second hot spot ratio,
Light spot image can be intercepted according to the beam pattern of at least one hot spot.It specifically, can be according at least one hot spot of encirclement
Minimum enclosed rectangle intercept the light spot image, for example, the light spot image being truncated to is at least to surround the minimum enclosed rectangle
Rectangular image.
It is truncated to after light spot image, in step S230, extracts the contour line of each hot spot in light spot image.According to this
One embodiment of invention, may be used isocline algorithms to extract the contour line of hot spot.Isocline algorithms are existing
Technology, basic principle are that the identical point of gray value is looked for connect into contour line in gray level image, and the present invention is to this without detailed
It states.
Fig. 4 illustrates the schematic diagram of the contour line of hot spot according to one embodiment of the present invention, as shown in Figure 4
Light spot image includes 2 hot spots, extracts 2 contour lines (being indicated with black lines).
In extracting light spot image after the contour line of each hot spot, it according to embodiment of the present invention, can be with
Mean value and normalized are carried out to the contour line extracted.
According to another implementation of the invention, may be used also after the contour line of each hot spot in extracting light spot image
To obtain the contour line feature of every contour line, the contour line feature of every contour line may include outside the minimum of this contour line
Connect rectangular aspect ratio, area, perimeter etc..Image can be judged with the presence or absence of fuzzy according to the area of this contour line, perimeter.
According to embodiment of the present invention, for every contour line, judge whether the perimeter of this contour line meets
Whether whether first contour line screening conditions, area meet the second contour line screening conditions and minimum enclosed rectangle length-width ratio
Meet third contour line screening conditions.First contour line screening conditions can be that perimeter is located at contour line perimeter minimum value to profile
Between line perimeter maximum value (such as 30 pixels are between 150 pixels), including contour line perimeter minimum value and contour line week
Long maximum value.Second contour line screening conditions can be area be located at contour line area minimum value to contour line Maximum Area it
Between (such as 40 pixels are between 200 pixels), including contour line area minimum value and contour line Maximum Area.Third round
Profile screening conditions can be that minimum enclosed rectangle length-width ratio is less than contour line length and width ratio (such as 1.5).
If being unsatisfactory for appointing in first contour line screening conditions, the second contour line screening conditions and third contour line screening conditions
Accounting of the contour line of meaning one in all contour lines extracted is more than contour line ratio (being usually 1/2), it is determined that figure
It is fuzzy as existing, and vague category identifier is focus blur.
If being unsatisfactory for appointing in first contour line screening conditions, the second contour line screening conditions and third contour line screening conditions
Accounting of the contour line of meaning one in all contour lines extracted is no more than contour line ratio, then can enter step
S240。
In step S240, for the every contour line extracted, this contour line can be calculated to its corresponding standard
The Hausdorff distance of contour line.According to embodiment of the present invention, Hao Siduofu can be calculated by following formula
Distance:
HD (A, B)=max { h (A, B), h (B, A) }
Wherein
A={ pa1,pa2,pa3,......,pamB={ pb1,pb2,pb3,......,pbn}
Hausdorff distances (also referred to as two-way Hausdorff distance) of the HD (A, B) between A and B, h (A, B) and h (A,
B) be respectively A to B unidirectional Hausdorff distance and B to A unidirectional Hausdorff distance, A and B are respectively two comprising limited
The set of pixel, | | pa-pb| | it is pixel paWith pixel pbBetween Euclidean distance, | | pb-pa| | it is pixel pbWith
Pixel paBetween Euclidean distance.
According to embodiment of the present invention, image fuzzy detection method 200 can also include step:Based on multiple nothings
Blur spot image is previously obtained the distance threshold of at least one standard contour line and every standard contour line.Therefore, for
The every contour line extracted needs before calculating Hausdorff distance of this contour line to its corresponding standard contour line
First to determine the standard contour line corresponding to this contour line.Specifically, this contour line can be calculated separately to every standard
The Hausdorff distance of contour line finally selects the standard contour line of wherein Hausdorff distance minimum as this contour line pair
The standard contour line answered.
After Hausdorff distance of this contour line to its corresponding standard contour line is calculated, can then it exist
Judge whether the Hausdorff distance being calculated is less than the distance threshold of the standard contour line in step S240.
Finally in step s 250, if the Hausdorff distance to its corresponding standard contour line is not less than the nominal contour
Accounting of the contour line of the distance threshold of line in all contour lines extracted is more than predetermined ratio, it is determined that there are moulds for image
Paste, and vague category identifier is motion blur.The predetermined ratio can be adjusted by user according to actual conditions, such as can be removed for 1
With all contour line numbers extracted, or 1/2.
If the Hausdorff distance for arriving its corresponding standard contour line is not less than the wheel of the distance threshold of the standard contour line
Accounting of the profile in all contour lines extracted is no more than predetermined ratio, it is determined that motion blur is not present in image.
At least one standard contour line and every nominal contour will be obtained to being based on multiple no blur spot images below
The process of the distance threshold of line is described in detail.
Firstly, for multiple no blur spot images, the wheel each without each hot spot in blur spot image can be extracted
Profile.Specifically isocline algorithms, which may be used, carrys out Extracting contour.These without blur spot image be artificially screen,
Think that there is no fuzzy light spot image samples.It can be similar to the aforementioned step that light spot image is intercepted from image to be detected
Suddenly, from it is artificially screening, think there is no being intercepted in fuzzy face or the near-infrared image of eye circumference or iris, size with
Aforementioned light spot image is identical.The present invention repeats no more this.
Then, a plurality of contour line extracted is divided at least one contour line set.
Fig. 5 illustrates the flow chart of contour line set partitioning method 500 according to one embodiment of the present invention.Such as
Shown in Fig. 5, contour line set partitioning method 500 starts from step S510.
In step S510, Hausdorff distance between any two in a plurality of contour line extracted is calculated.Then exist
In step S520, detect in a plurality of contour line extracted, if there is the wheel for not being divided to any contour line set
Profile.If so, entering step S530, according to the Hausdorff distance being calculated, it be not divided to any contour line collection
A contour line set is built in the contour line of conjunction.After this contour line set structure is completed, it is back to step S520 relayings
Continuous to be detected, if detecting in a plurality of contour line extracted, there are still be not divided to any contour line set
Contour line then still enters step S530, continues, according to the Hausdorff distance being calculated, be not divided to any profile
A contour line set is built in the contour line of line set.Repeat the above steps S520 and step S530 in this way, until being carried
In a plurality of contour line got, until the contour line for not being divided to any contour line set.
According to embodiment of the present invention, if detecting in a plurality of contour line extracted, there is only two
It is not divided to the contour line of any contour line set, then this two contour lines are directly divided into a contour line set.Root
According to another embodiment of the invention, if detecting in a plurality of contour line extracted, there is only one not to be divided
To the contour line of any contour line set, then directly this contour line is abandoned, it is believed that there is no be not divided to any profile
The contour line of line set.
The Hausdorff distance that basis will be calculated below, in the contour line for not being divided to any contour line set
The process of one contour line set of middle structure is described in detail.
Fig. 6 illustrates the stream of the method 600 of one contour line set of structure according to one embodiment of the present invention
Cheng Tu.As shown in fig. 6, the method 600 of one contour line set of structure starts from step S610.
In step S610, in the contour line that any contour line set is not added, selection between any two Hao Siduofu away from
From two minimum contour lines, a contour line set is newly formed.
Then, in step S620, in the contour line that any contour line set is not added, search whether exist to new group
At contour line set in any one contour line Hausdorff distance be less than predetermined threshold contour line.Predetermined threshold takes
Value is usually between 0.15 to 0.19 (including 0.15 and 0.19).
If it is present in step S630, calculates separately and search obtained every contour line to the contour line newly formed
The sum of the Hausdorff distance of all contour lines in set.
Assuming that the contour line set P={ l newly formed1,l2,......,li,......,ln, lookup is obtained every
Contour lineThis contour lineThe sum of Hausdorff distance to all contour lines in the contour line set P newly formed is:
Then in step S640, the contour line of wherein the sum of Hausdorff distance minimum is added to the profile newly formed
Line set.Certainly, if searching obtained contour line only has one, this contour line is directly added to the contour line collection newly formed
Conjunction.
Repeat the above steps S620, step S630 and step S640, until the contour line of any contour line set is not added
In there is no to any one contour line in the contour line set newly formed Hausdorff distance be less than predetermined threshold profile
Until line, also mean that the contour line set structure of this new composition is completed.
After the every contour line extracted is divided to corresponding contour line set, for each contour line collection
It closes, can obtain a standard contour line for representing the contour line set, and this standard is calculated based on the contour line set
The distance threshold of contour line.
Specifically, in the contour line set, the step of can repeating to select an alternative criteria contour line, until
Until the alternative criteria contour line selected reaches predetermined number item.Predetermined number is usually 1~3.
The step of selecting an alternative criteria contour line can be as follows:
For not being picked as every contour line of alternative criteria contour line in the contour line set, calculates and remove this profile
The contour line for not being picked as alternative criteria contour line other than line is to this contour line and all alternative criteria contour lines
The sum of Hausdorff distance.
Assuming that contour line collection is combined into P, the contour line composition set of alternative criteria contour line is picked as in contour line set P
Q.For not being picked as every contour line l of alternative criteria contour line in contour line set P, except this contour line l with
The outer contour line composition set S=P-Q- { l } for not being picked as alternative criteria contour line, then in addition to this contour line l
The contour line for not being picked as alternative criteria contour line to the person of outstanding talent of this contour line l and all alternative criteria contour lines, this is more
Husband's sum of the distance is:
The contour line of wherein the sum of Hausdorff distance minimum can be selected as an alternative criteria contour line.
Finally, the predetermined number alternative criteria contour line selected is merged into represent the contour line set one
Standard contour line.Specifically, it is assumed that pick out alternative criteria contour line lq1、lq2And lq3, it is possible to understand that ground, every alternative criteria
Contour line is all a set for including limited pixel, therefore it is l to merge an obtained standard contour lineq1+lq2+lq3,
It is exactly the union for the pixel that this three alternative criteria contour lines are included.
According to embodiment of the present invention, make a reservation for if the contour line number that contour line set is included is less than or equal to
Number, then all contour lines that directly the contour line set is included merge to obtain a standard wheels for representing the contour line set
Profile.For example, predetermined number is 3, contour line set only includes two contour lines, then merges this two contour lines and represented
One standard contour line of the contour line set.
After obtaining a standard contour line for representing the contour line set, it can calculate separately every in the contour line set
Contour line selects maximum Hausdorff distance as this standard to the Hausdorff distance of this standard contour line
The distance threshold of contour line.
In conclusion image fuzzy detection scheme according to the present invention, being in advance based on multiple no blur spot images can be with
At least one high standard contour line of degree of can refer to is obtained, so as to extract the contour line of each hot spot in image to be detected,
Every contour line standard contour line corresponding with this contour line is compared based on Hausdorff distance, is realized to image
Fuzzy detection, and accuracy is high, calculation amount is small, and the vague category identifier that can distinguish image is focus blur or motion blur.
It should be appreciated that various technologies described herein are realized together in combination with hardware or software or combination thereof.From
And some aspects or part of the process and apparatus of the present invention or the process and apparatus of the present invention can take embedded tangible matchmaker
It is situated between, such as the program code in floppy disk, CD-ROM, hard disk drive or other arbitrary machine readable storage mediums (refers to
Enable) form, wherein when program is loaded into the machine of such as computer etc, and when being executed by the machine, which becomes real
The equipment for trampling the present invention.
In the case where program code executes on programmable computers, computing device generally comprises processor, processor
Readable storage medium (including volatile and non-volatile memory and or memory element), at least one input unit, and extremely
A few output device.Wherein, memory is configured for storage program code;Processor is configured for according to the memory
Instruction in the program code of middle storage executes the various methods of the present invention.
The present invention can also include:A9, the image fuzzy detection method as described in A8, wherein described to be extracted
A plurality of contour line is divided into the step of at least one contour line set and includes:Calculate in a plurality of contour line that is extracted two-by-two it
Between Hausdorff distance;In a plurality of contour line extracted, detect whether exist be not divided to any contour line collection
The contour line of conjunction;If so, according to the Hausdorff distance being calculated, in the profile for not being divided to any contour line set
A contour line set is built in line;The step of repeating above-mentioned detection contour line and structure contour line set, until being extracted
To a plurality of contour line in there is no until not being divided to the contour line of any contour line set.A10, the image as described in A9
Fuzzy detection method, wherein the Hausdorff distance that the basis is calculated be not divided to any contour line set
The step of one contour line set of structure, includes in contour line:In the contour line that any contour line set is not added, two are selected
Two contour lines of Hausdorff distance minimum between two newly form a contour line set;Any contour line collection be not added
In the contour line of conjunction, search whether that the Hausdorff distance that there is any one contour line into the contour line set newly formed is small
In the contour line of predetermined threshold;Obtained every contour line is searched to the contour line collection newly formed if it is present calculating separately
The sum of the Hausdorff distance of all contour lines in conjunction, and the contour line of wherein the sum of Hausdorff distance minimum is added to newly
The contour line set of composition;Repeat the step of the sum of above-mentioned lookup contour line, calculating Hausdorff distance and addition contour line
Suddenly, it is not present to any one profile in the contour line set newly formed until not being added in the contour line of any contour line set
Until the Hausdorff distance of line is less than the contour line of predetermined threshold.A11, the image fuzzy detection method as described in A10,
In, the predetermined threshold is 0.15~0.19.A12, the image fuzzy detection method as described in any one of A9-11, wherein institute
Stating the step of acquisition represents a standard contour line of the contour line set includes:In the contour line set, repeat to choose
The step of selecting an alternative criteria contour line, until the alternative criteria contour line selected reaches predetermined number item;It will
The predetermined number alternative criteria contour line selected merges into a standard contour line;Wherein it is described select one it is standby
The step of selecting standard contour line include:For every profile of alternative criteria contour line is not picked as in the contour line set
Line calculates the contour line for not being picked as alternative criteria contour line in addition to this contour line to this contour line and owns
The sum of the Hausdorff distance of alternative criteria contour line;Select the contour line of wherein the sum of Hausdorff distance minimum as one
Alternative criteria contour line.A13, the image fuzzy detection method as described in any one of A9-12, wherein described to be based on the profile
Line set calculates the step of distance threshold of this standard contour line and includes:Calculate separately every contour line in the contour line set
To the Hausdorff distance of this standard contour line;Select maximum Hausdorff distance as this standard contour line
Distance threshold.A14, the image fuzzy detection method as described in any one of A9-13, wherein person of outstanding talent is calculated by following formula
Si Duofu distances:
HD (A, B)=max { h (A, B), h (B, A) }
Wherein
A={ pa1,pa2,pa3,......,pamB={ pb1,pb2,pb3,......,pbn}
Hausdorff distances of the HD (A, B) between A and B, h (A, B) and h (A, B) are respectively that this is more by the unidirectional person of outstanding talent of A to B
The unidirectional Hausdorff distance of husband's distance and B to A, A and B are respectively two set for including limited pixel, | | pa-pb| | it is
Pixel paWith pixel pbBetween Euclidean distance, | | pb-pa| | it is pixel pbWith pixel paBetween Euclidean distance.
A15, the image fuzzy detection method as described in any one of A1-14, wherein the step of contour line for extracting hot spot includes:It adopts
The contour line of hot spot is extracted with isocline algorithms.A16, the image fuzzy detection method as described in any one of A1-15,
In, described image is the near-infrared image of eye circumference or iris or face.
By way of example and not limitation, computer-readable medium includes computer storage media and communication media.It calculates
Machine readable medium includes computer storage media and communication media.Computer storage media storage such as computer-readable instruction,
The information such as data structure, program module or other data.Communication media is generally modulated with carrier wave or other transmission mechanisms etc.
Data-signal processed embodies computer-readable instruction, data structure, program module or other data, and includes that any information passes
Pass medium.Above any combination is also included within the scope of computer-readable medium.
It should be appreciated that in order to simplify the disclosure and help to understand one or more of each inventive aspect, it is right above
In the description of exemplary embodiment of the present invention, each feature of the invention be grouped together into sometimes single embodiment, figure or
In person's descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. claimed hair
The bright feature more features required than being expressly recited in each claim.More precisely, as the following claims
As book reflects, inventive aspect is all features less than single embodiment disclosed above.Therefore, it then follows specific real
Thus the claims for applying mode are expressly incorporated in the specific implementation mode, wherein each claim itself is used as this hair
Bright separate embodiments.
Those skilled in the art should understand that the module of the equipment in example disclosed herein or unit or groups
Part can be arranged in equipment as depicted in this embodiment, or alternatively can be positioned at and the equipment in the example
In different one or more equipment.Module in aforementioned exemplary can be combined into a module or be segmented into addition multiple
Submodule.
Those skilled in the art, which are appreciated that, to carry out adaptively the module in the equipment in embodiment
Change and they are arranged in the one or more equipment different from the embodiment.It can be the module or list in embodiment
Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or
Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it may be used any
Combination is disclosed to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so to appoint
Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power
Profit requires, abstract and attached drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation
It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
One of meaning mode can use in any combination.
In addition, be described as herein can be by the processor of computer system or by executing for some in the embodiment
The combination of method or method element that other devices of the function are implemented.Therefore, have for implementing the method or method
The processor of the necessary instruction of element forms the device for implementing this method or method element.In addition, device embodiment
Element described in this is the example of following device:The device is used to implement performed by the element by the purpose in order to implement the invention
Function.
As used in this, unless specifically stated, come using ordinal number " first ", " second ", " third " etc.
Description plain objects are merely representative of the different instances for being related to similar object, and are not intended to imply that the object being described in this way must
Must have the time it is upper, spatially, in terms of sequence or given sequence in any other manner.
Although the embodiment according to limited quantity describes the present invention, above description, the art are benefited from
It is interior it is clear for the skilled person that in the scope of the present invention thus described, it can be envisaged that other embodiments.Additionally, it should be noted that
The language that is used in this specification primarily to readable and introduction purpose and select, rather than in order to explain or limit
Determine subject of the present invention and selects.Therefore, without departing from the scope and spirit of the appended claims, for this
Many modifications and changes will be apparent from for the those of ordinary skill of technical field.For the scope of the present invention, to this
The done disclosure of invention is illustrative and not restrictive, and it is intended that the scope of the present invention be defined by the claims appended hereto.