CN110400312A - Determine the method, apparatus and server of image vague category identifier - Google Patents

Determine the method, apparatus and server of image vague category identifier Download PDF

Info

Publication number
CN110400312A
CN110400312A CN201910706781.9A CN201910706781A CN110400312A CN 110400312 A CN110400312 A CN 110400312A CN 201910706781 A CN201910706781 A CN 201910706781A CN 110400312 A CN110400312 A CN 110400312A
Authority
CN
China
Prior art keywords
image
processed
category identifier
deblurring
vague category
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.)
Pending
Application number
CN201910706781.9A
Other languages
Chinese (zh)
Inventor
张玉梅
樊鸿飞
李果
张文杰
贺沁雯
李虎
许道远
鲁方波
汪贤
成超
熊宝玉
陈熊
蔡媛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201910706781.9A priority Critical patent/CN110400312A/en
Publication of CN110400312A publication Critical patent/CN110400312A/en
Pending legal-status Critical Current

Links

Classifications

    • G06T5/73
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The present invention provides the method, apparatus and server of a kind of determining image vague category identifier, wherein this method comprises: judging whether image to be processed is blurred picture;If it is blurred picture, using the corresponding deblurring mode of default vague category identifier, deblurring processing is carried out to image to be processed;Determine image to be processed and deblurring treated the similarity degree of image to be processed;Finally according to the similarity degree, the vague category identifier of image to be processed is determined.In the present invention, by comparing the similarity degree of the blurred picture after blurred picture and deblurring, the vague category identifier of blurred picture can be obtained, the differentiation to the vague category identifier of blurred picture may be implemented in which, to improve the subsequent effect to blurred picture reparation.

Description

Determine the method, apparatus and server of image vague category identifier
Technical field
The present invention relates to technical field of image processing, more particularly, to a kind of method, apparatus of determining image vague category identifier And server.
Background technique
It in the shooting process of image or video, may be affected by various factors, as there are physics to lack for capture apparatus Fall into, user operates that capture apparatus is wrong, shooting environmental is unfavorable for imaging or subject quickly moves, easily cause to clap The image taken the photograph is fuzzy.There is only distinguish the mode that shooting figure seems clear image or blurred picture in the related technology, it is difficult to real Now the vague category identifier of blurred picture or fuzzy reason are distinguished, cause subsequent when being repaired to blurred picture, repairs effect Fruit is bad.
Summary of the invention
In view of this, the purpose of the present invention is to provide the method, apparatus and server that determine image vague category identifier, with area Divide the vague category identifier of blurred picture, to improve the effect to blurred picture reparation.
In a first aspect, the embodiment of the invention provides a kind of method for determining image vague category identifier, this method comprises: judgement Whether image to be processed is blurred picture;It is treated if it is blurred picture using the corresponding deblurring mode of default vague category identifier It handles image and carries out deblurring processing;Determine image to be processed and deblurring treated the similarity degree of image to be processed;Root According to the similarity degree, the vague category identifier of image to be processed is determined.
It is above-mentioned according to the similarity degree in preferred embodiments of the present invention, determine the vague category identifier of image to be processed Step, comprising: if above-mentioned similarity degree is lower than preset similar threshold value, determine that the vague category identifier of image to be processed is default mould Paste type.
In preferred embodiments of the present invention, above-mentioned default vague category identifier includes motion blur;Above-mentioned vague category identifier includes Motion blur and defocus blur;According to the similarity degree, the step of determining the vague category identifier of image to be processed, further includes: if Above-mentioned similarity degree is greater than or equal to preset similar threshold value, determines that the vague category identifier of image to be processed is defocus blur.
It is above-mentioned using the default corresponding deblurring mode of vague category identifier in preferred embodiments of the present invention, to be processed Image carries out the step of deblurring processing, comprising: image to be processed is input in the deblurring model that training is completed in advance, it is defeated Image to be processed after Fuzzy Processing of going out;The deblurring model is obtained by the generator training that production fights network.
In preferred embodiments of the present invention, above-mentioned determination image to be processed and deblurring treated image to be processed The step of similarity degree, comprising: calculate image to be processed and deblurring treated the error amount of image to be processed;The error amount Including square mean error amount or mean absolute error value;The error amount is determined as image to be processed and deblurring, and treated wait locate Manage the similarity degree of image;Alternatively, that treated is to be processed for the image quality evaluation index and deblurring that calculate image to be processed The index difference of the image quality evaluation index of image;The image quality evaluation index includes PSNR value or SSIM value;By index Difference is determined as image to be processed and deblurring treated the similarity degree of image to be processed.
Second aspect, the embodiment of the invention provides a kind of devices of determining image vague category identifier, which includes: fuzzy Image judgment module, for judging whether image to be processed is blurred picture;Deblurring module is used for if it is blurred picture, Using the corresponding deblurring mode of default vague category identifier, deblurring processing is carried out to image to be processed;Similarity degree determining module, The similarity degree of treated for determining image to be processed and deblurring image to be processed;Vague category identifier determining module, is used for According to similarity degree, the vague category identifier of image to be processed is determined.
In preferred embodiments of the present invention, above-mentioned vague category identifier determining module is also used to: if above-mentioned similarity degree is low In preset similar threshold value, determine that the vague category identifier of image to be processed is default vague category identifier.
In preferred embodiments of the present invention, above-mentioned default vague category identifier includes motion blur;Above-mentioned vague category identifier includes Motion blur and defocus blur;Above-mentioned vague category identifier determining module, is also used to: if similarity degree is greater than or equal to preset phase Like threshold value, determine that the vague category identifier of image to be processed is defocus blur.
The third aspect, the embodiment of the invention provides a kind of server, including processor and memory, memory storages There is the machine-executable instruction that can be executed by processor, which executes machine-executable instruction to realize above-mentioned determining figure As the method for vague category identifier.
Fourth aspect, the embodiment of the invention provides a kind of machine readable storage medium, which is deposited Machine-executable instruction is contained, when being called and being executed by processor, which promotees the machine-executable instruction The method for making processor realize above-mentioned determining image vague category identifier.
The embodiment of the present invention bring it is following the utility model has the advantages that
The present invention provides the method, apparatus and server of a kind of determining image vague category identifier, first determine whether figure to be processed It seem no for blurred picture;If it is blurred picture, using the corresponding deblurring mode of default vague category identifier, to image to be processed Carry out deblurring processing;Then image to be processed and deblurring are determined treated the similarity degree of image to be processed;Last root According to the similarity degree, the vague category identifier of image to be processed is determined.In the present invention, by comparing the mould after blurred picture and deblurring The similarity degree for pasting image, can be obtained the vague category identifier of blurred picture, the fuzzy class to blurred picture may be implemented in which The differentiation of type, to improve the subsequent effect to blurred picture reparation.
Other feature and advantage of the disclosure will illustrate in the following description, alternatively, Partial Feature and advantage can be with Deduce from specification or unambiguously determine, or by implement the disclosure above-mentioned technology it can be learnt that.
To enable the above objects, features, and advantages of the disclosure to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate Appended attached drawing, is described in detail below.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor It puts, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of the method for determining image vague category identifier provided in an embodiment of the present invention;
Fig. 2 is the flow chart of another method for determining image vague category identifier provided in an embodiment of the present invention;
Fig. 3 is the flow chart of another method for determining image vague category identifier provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram that a kind of production provided in an embodiment of the present invention fights network;
Fig. 5 is the training flow chart that a kind of production provided in an embodiment of the present invention fights network;
Fig. 6 is the flow chart of another method for determining image vague category identifier provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of the device of determining image vague category identifier provided in an embodiment of the present invention;
Fig. 8 is a kind of structural schematic diagram of server provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention Technical solution be clearly and completely described, it is clear that described embodiments are some of the embodiments of the present invention, rather than Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise Under every other embodiment obtained, shall fall within the protection scope of the present invention.
In the related technology, it is difficult to distinguish blurred picture vague category identifier or fuzzy reason, lead to the reparation to blurred picture Effect is poor, is based on this, the embodiment of the invention provides the method, apparatus and server of a kind of determining image vague category identifier, can To be applied in the deblurring scene of video or image, it is particularly possible to applied to fuzzy comprising motion blur and defocus blur In type classification scene.
To obscure class to a kind of determining image disclosed in the embodiment of the present invention first convenient for understanding the present embodiment The method of type describes in detail;As shown in Figure 1, this method comprises the following steps:
Step S102 judges whether image to be processed is blurred picture.
The video frame in photo or video that above-mentioned image to be processed is shot generally by camera;In shooting process, If there is the focal length of relative motion, camera not adjust or shoot intensity of illumination between camera and the scenery being taken Deficiency, the image that will lead to shooting are fuzzy.In actual implementation, the models such as deep learning, neural network can be specifically used, Image to be processed is input in the model, that is, can determine whether the image to be processed is blurred picture;Variance can also be used The modes such as determining method, gradient calculating method or spectrogram judge whether the image to be processed is blurred picture, right in the present embodiment Judge image to be processed whether be the concrete mode of blurred picture without limitation.
Step S104, if it is blurred picture, using the corresponding deblurring mode of default vague category identifier, to above-mentioned to be processed Image carries out deblurring processing.
In general, causing the fuzzy reason of image different, cause the vague category identifier of image different.For example, in shooting process, It shoots camera and by there are relative motions between bat scenery, motion blur (alternatively referred to as dynamic fuzzy) can be caused;Using phase When machine, the focal length adjustment of camera is bad, can cause defocus blur (alternatively referred to as focusing is fuzzy).Based on this, for difference Vague category identifier need just the effect of deblurring can be made more preferable using different deblurring modes.
The corresponding deblurring mode of above-mentioned default vague category identifier can only handle the image of default vague category identifier, for presetting mould Other vague category identifiers except type are pasted, deblurring is ineffective, thus the image after deblurring and the image difference before deblurring It is different little;If in image to be processed there is no default vague category identifier or in addition to default vague category identifier further including other fuzzy classes Type, the deblurring mode cannot handle the blooming in image to be processed;If in image to be processed, there is only preset models Type, which can handle the blooming in image to be processed, and obtain clear image.
Step S106 determines above-mentioned image to be processed and deblurring treated the similarity degree of image to be processed.
If the vague category identifier of image to be processed is identical as default vague category identifier, mould is removed using default vague category identifier is corresponding Paste mode carries out deblurring processing to image to be processed, and the image to be processed after obtained deblurring should be more clear than image to be processed It is clear, therefore the similarity degree of image to be processed and deblurring treated image to be processed is lower, the two differs greatly;If to The vague category identifier for handling image is different from default vague category identifier, using the corresponding deblurring mode of default vague category identifier to be processed Image carries out deblurring processing, and the image to be processed after obtained deblurring should be higher with image similarity degree to be processed, very To completely it is similar.
For example, when default vague category identifier is defocus blur, using the corresponding deblurring mode of defocus blur to be processed Image carries out deblurring processing, if the obtained image gone after defocus blur and image similarity degree to be processed are higher, determination The vague category identifier of the image to be processed is not defocus blur;If the obtained image gone after defocus blur and image phase to be processed It is lower like degree, determine that the vague category identifier of the image to be processed is defocus blur.
Step S108 determines the vague category identifier of image to be processed according to above-mentioned similarity degree.
In specific implementation, if obtained image to be processed and deblurring treated image to be processed it is similar compared with It is low, determine that the vague category identifier of the image to be processed is default vague category identifier;If obtained image to be processed and deblurring processing Image to be processed afterwards it is similar higher, determine that the vague category identifier of the image to be processed is the fuzzy class except default vague category identifier Type.
The present invention provides a kind of method of determining image vague category identifier, first determine whether image to be processed is fuzzy graph Picture;Image to be processed is carried out at deblurring using the corresponding deblurring mode of default vague category identifier if it is blurred picture Reason;Then image to be processed and deblurring are determined treated the similarity degree of image to be processed;Finally according to the similarity degree, Determine the vague category identifier of image to be processed.It is similar to the blurred picture after deblurring by comparing blurred picture in the present invention Degree, can be obtained the vague category identifier of blurred picture, which can differentiation of the reality to the vague category identifier of blurred picture, thus Improve the subsequent effect to blurred picture reparation.
The embodiment of the present invention also provides another method for determining image vague category identifier, and this method is described in above-described embodiment It is realized on the basis of method;This method emphasis describe image vague category identifier be motion blur and defocus blur when, determine image Vague category identifier detailed process, as shown in Fig. 2, this method comprises the following steps:
Step S202 judges whether image to be processed is blurred picture.
Step S204 by the way of removing motion blur, carries out mould to above-mentioned image to be processed if it is blurred picture Paste processing;Wherein, the vague category identifier of image includes motion blur and defocus blur.
The above-mentioned mode for removing motion blur can be realized using deep learning method or other conventional methods.
Step S206 judges above-mentioned image to be processed and deblurring treated whether the similarity degree of image to be processed is low In preset similar threshold value;If the similarity degree is lower than preset similar threshold value, step S208 is executed;If the similarity degree Greater than or equal to preset similar threshold value, step S210 is executed.
In the concrete realization, can treated by calculating image to be processed and deblurring image to be processed gap it is true Both fixed similarity degree;Wherein, the gap of image to be processed and deblurring treated image to be processed can pass through calculating The difference acquisition of the square mean error amount, mean absolute error value, peak value comparison result or signal-to-noise ratio of two images.It is above-mentioned similar Threshold value can be preset based on experience value.
If above-mentioned similarity degree is lower than similar threshold value, the image to be processed after deblurring is relative to image to be processed Clearly, illustrate using it is above-mentioned remove motion blur by the way of can remove the fuzzy of image to be processed, accordingly, it can be determined that this is to be processed The vague category identifier of image is motion blur;If above-mentioned similarity degree is not less than the similar threshold value, after deblurring wait locate It is almost unchanged relative to image to be processed to manage image, illustrates to use and goes the deblurring mode of motion blur that cannot remove wait locate The fuzzy of image is managed, accordingly, it can be determined that the vague category identifier of the image to be processed is defocus blur.
Step S208 determines that the vague category identifier of above-mentioned image to be processed is motion blur;Terminate.
Step S210 determines that the vague category identifier of above-mentioned image to be processed is defocus blur.
In aforesaid way, first determine whether image to be processed is blurred picture;If it is blurred picture, using movement mould Corresponding deblurring mode is pasted, deblurring processing is carried out to image to be processed;Then judge above-mentioned image to be processed and deblurring Whether the similarity degree of treated image to be processed is lower than preset similar threshold value;If the similarity degree is lower than preset phase Like threshold value, determine that the vague category identifier of image to be processed is motion blur;If the similarity degree is greater than or equal to preset similar Threshold value determines that the vague category identifier of image to be processed is defocus blur.Which by after image to be processed and deblurring wait locate Manage image similarity degree and preset similar threshold value relationship, can determine image vague category identifier be motion blur still from Coke is fuzzy;The implementation that image vague category identifier is distinguished in which is simple, and accuracy is higher, while subsequent to fuzzy graph As that can determine the deblurring method used according to vague category identifier in repairing, the effect of blurred picture reparation is improved.
The embodiment of the present invention also provides another method for determining image vague category identifier, and this method is described in above-described embodiment It is realized on the basis of method;The description of this method emphasis is using the default corresponding deblurring mode of vague category identifier, to image to be processed The detailed process for carrying out deblurring processing, as shown in figure 3, this method comprises the following steps:
Step S302 judges whether image to be processed is blurred picture.
Specifically, above-mentioned image to be processed can be input in the image detection model that training is completed in advance, it can be defeated The testing result of image to be processed out;Wherein, image detection model includes deep learning model or image classification model;By this Testing result can determine whether image to be processed is blurred picture.
Above-mentioned image detection model can be obtained by following manner training: will have clear image and the band of clear marking There is the blurred picture of blur indicia to be input in the models such as model to be learned or image classification model to be trained, so that model can To distinguish clear image and blurred picture, by constantly training, image detection model is obtained.Image to be processed is input to figure As in detection model, can distinguish the image to be processed is clear image or blurred picture.
It is above-mentioned judge image to be processed whether be blurred picture mode, following manner one can also be passed through or mode two is real It is existing:
Mode one calculates the gradient value of image to be processed, in general, the edge clear of clear image, gradient value are big;Fuzzy graph The blur margin of picture is clear, and gradient value is small;Judge whether above-mentioned gradient value is greater than predetermined gradient value again, if it is greater than predetermined gradient Value, is determined as clear image for image to be processed, and if it is less than or equal to preset value, image to be processed is determined as fuzzy graph Picture;Wherein, preset threshold can rule of thumb be set.
Mode two carries out discrete cosine transform processing to image to be processed, obtains in the frequency component of image to be processed High fdrequency component (in general, clear image high fdrequency component is more, blurred picture low frequency component is more);Judge whether the high fdrequency component is big In preset value;If it is greater than preset value, image to be processed is determined as clear image;Otherwise, image to be processed is determined as mould Paste image;Wherein, preset value is rule of thumb set.
Above-mentioned image to be processed is input to the deblurring mould that training is completed in advance if it is blurred picture by step S304 In type, output deblurring treated image to be processed;The deblurring model fights the generator training of network by production It obtains.
Above-mentioned deblurring model is typically only capable to remove preset vague category identifier, for example, deblurring model can remove movement mould Paste.Above-mentioned production confrontation network contains two models, and one is generator, the other is arbiter;Generator is usually not Disconnected learning training concentrates the probability distribution of truthful data, converts the random noise of input in the picture that can be mixed the spurious with the genuine. Arbiter usually judges whether picture is true picture, the "true" figure in the "false" picture that generator is generated and training set Piece resolution is opened.The implementation method of production confrontation network is usually that generator and arbiter is allowed to carry out game, by mutually competing Striving makes two models while being enhanced.
The structural schematic diagram of above-mentioned production confrontation network is as shown in figure 4, generally comprise the convolution unit at two intervals 1/2 (unit for 3*3conv, IntanceNorm and ReLU composition being equivalent in Fig. 4), 9 residual error modules (are equivalent in Fig. 42 3*3conv, 2 IntanceNorm, 1 ReLU and 1 adder composition unit) and 2 warp product units (be equivalent to Fig. 4 In ConvTranspose, IntanceNorm and ReLU composition unit);Wherein residual error module can be by convolutional layer (quite In above-mentioned convolution unit), normalization layer (unit for being equivalent to 3*3conv, ReLU and adder composition) and ReLU activation primitive It constitutes.Based on foregoing description, above-mentioned production confrontation network is residual error network, therefore production confrontation network can train The image of motion blur and the image after motion blur is removed, obtain residual error IR, when input image IB to be processed, production is fought The image IS=IB+IR of network output.
The training process of above-mentioned production confrontation network is as shown in figure 5, the image that motion blur will be present first is input to It is generated in generator and removes the image after motion blur, then arbiter is to the image and the fuzzy figure of without motion after removing motion blur As being differentiated, using continuous training, so that the image-capable of generator and arbiter constantly enhances.It is based on This, goes motion blur model that can obtain by following step 30-33 training in step S304:
Step 30, motion blur is carried out to the sample image that vague category identifier is motion blur by generator to handle, it is defeated It goes out the sample image after motion blur.
Step 31, the first differentiation processing is carried out to the sample image after removing motion blur by arbiter, output first is sentenced It is not worth;The second differentiation processing is carried out to sample image by arbiter, exports the second discriminant value.
Above-mentioned first discriminant value is usually that the sample image after motion blur will be gone to be input to the number exported after arbiter Value, the value of the numerical value is usually the arbitrary value between 0 to 1;Then original sample image is input in arbiter again, is sentenced Other device is to original sample image and the image after motion blur is gone to carry out the second differentiation processing, exports the second discriminant value, this The value of two discriminant values is usually the arbitrary value between 0 to 1.
In specific implementation, it is assumed that 0 represents blurred picture, and 1 represents clear image, and for generator, it wishes Image after motion blur is identified as 1, and without motion blurred picture is identified as 0, and it is more clear to be just desirable to the image that it is generated It is clear;For arbiter, it wishes that the image after motion blur is identified as 0, and the image that without motion obscures is differentiated It is 1, be exactly regardless of how clear the image that generator generates is, arbiter remains to distinguish truth from false, so that generator and arbiter are not Disconnected enhancing, generator go motion blur ability more and more stronger, and arbiter distinguishes the image after removing motion blur and without motion is fuzzy The ability of image is also increasingly stronger.
Step 32, according to the first discriminant value and the second discriminant value, the penalty values of computational discrimination device and the penalty values of generator.
The penalty values of above-mentioned arbiter can be calculated by the first discriminant value and the second discriminant value.The damage of above-mentioned generator Mistake value generally includes confrontation penalty values (being calculated by the first discriminant value and the second discriminant value) and content loss value;Wherein, interior Appearance penalty values are usually extraction nerve net after sample image and without motion blurred picture feeding neural network after removing motion blur The characteristic pattern of a certain layer of network, and calculate the numerical value that mean square error obtains.
Step 33, the penalty values training arbiter based on arbiter, the penalty values training generator based on generator, until The penalty values of arbiter meet the first preset threshold, and the penalty values of generator meet the second preset threshold.
Above-mentioned first preset threshold and above-mentioned second preset threshold, which respectively represent trained arbiter and generator, to be reached The precision arrived.First preset threshold is arranged lower, and decision device identifies clear image and the ability of blurred picture is stronger;Second is pre- If threshold value setting is lower, generator goes the ability of motion blur also stronger.In specific implementation, if the penalty values of generator It is larger, it may also be said to do not meet the second preset threshold, raw relevant parameter need to be adjusted and continue to train generator, so that generator Penalty values meet the second preset threshold;After the completion of generator training, the image that motion blur will be present is input to generator, raw The fuzzy image of an exportable without motion of growing up to be a useful person.
Step S306 determines above-mentioned image to be processed and deblurring treated the similarity degree of image to be processed.
Step S308 determines the vague category identifier of image to be processed according to above-mentioned similarity degree.
In aforesaid way, fuzzy image to be processed will be present and be input in the deblurring model that training is completed in advance, it is defeated Image to be processed after Fuzzy Processing of going out;The deblurring model is obtained by the generator training that production fights network.It should Mode carries out deblurring processing to default vague category identifier by the deblurring model that training is completed in advance, and default mould can be improved The accuracy of type is pasted, to improve the precision for distinguishing the vague category identifier of image.
The embodiment of the present invention also provides another method for determining image vague category identifier, and this method is described in above-described embodiment It is realized on the basis of method;The description of this method emphasis judge image to be processed whether be blurred picture detailed process, and it is true The detailed process of the similarity degree of fixed image to be processed and deblurring treated image to be processed, as shown in fig. 6, this method packet Include following steps:
Step S602 carries out gray count to image to be processed, obtains grayscale image.
Step S604 is filtered above-mentioned grayscale image by Laplace operator.
Step S606, determines whether the variance of filtered grayscale image and grayscale image meets preset value.
When variance is less than preset value, determine that the image to be processed is blurred picture;It is preset when variance is more than or equal to When value, determine that the image to be processed is clear image;Wherein, which has experience setting.
Step S608 determines that above-mentioned image to be processed is blurred picture if meeting preset value, and using default fuzzy class The corresponding deblurring mode of type carries out deblurring processing to image to be processed.
Step S610 determines above-mentioned image to be processed and deblurring treated the similarity degree of image to be processed.
In specific implementation, determine that the process of similarity degree can pass through following manner one or mode in above-mentioned steps S608 Two realize:
Mode one: image to be processed and deblurring are calculated treated the error amount of image to be processed;The error amount includes Square mean error amount or mean absolute error value;Error amount is determined as image to be processed and deblurring treated image to be processed Similarity degree.
Specifically, when above-mentioned error amount is greater than preset error threshold, the vague category identifier of above-mentioned image to be processed is determined To preset vague category identifier;When error threshold is less than or equal to preset error threshold, determine that above-mentioned image to be processed is Vague category identifier except default vague category identifier.
Mode two: the image quality evaluation index of image to be processed and the figure of deblurring treated image to be processed are calculated As the index difference of quality evaluation index;The image quality evaluation index includes PSNR (Peak Signal to Noise Ratio, Y-PSNR) value or SSIM (structural similarity index, structural similarity) value;By index error Value is determined as image to be processed and deblurring treated the similarity degree of image to be processed.
Step S612 determines the vague category identifier of image to be processed according to above-mentioned similarity degree.
In aforesaid way, gray count is carried out to image to be processed first and obtains grayscale image;Pass through Laplace operator again Above-mentioned grayscale image is filtered;And then judge whether the variance of filtered grayscale image and grayscale image meets preset value;If Meet preset value, determines that above-mentioned image to be processed is blurred picture, and using the default corresponding deblurring mode of vague category identifier, it is right Image to be processed carries out deblurring processing;Then pass through the similar journey of image to be processed and deblurring treated image to be processed Degree, determines the vague category identifier of image to be processed.Which can accurately determine whether image is blurred picture, and then can be quasi- The vague category identifier for really determining image, also facilitates the performance of subsequent evaluation image deblurring scheme.
Corresponding to above method embodiment, the embodiment of the present invention provides a kind of device of determining image vague category identifier, such as Fig. 7 Shown, which includes:
Blurred picture judgment module 70, for judging whether image to be processed is blurred picture;
Deblurring module 71, for being treated if it is blurred picture using the corresponding deblurring mode of default vague category identifier It handles image and carries out deblurring processing;
Similarity degree determining module 72, treated for determining image to be processed and deblurring image to be processed it is similar Degree;
Vague category identifier determining module 73, for determining the vague category identifier of image to be processed according to similarity degree.
The device of above-mentioned determining image vague category identifier first determines whether image to be processed is blurred picture;If it is mould Image is pasted, using the corresponding deblurring mode of default vague category identifier, deblurring processing is carried out to image to be processed;Then determine to Handle image and deblurring treated the similarity degree of image to be processed;Finally according to the similarity degree, figure to be processed is determined The vague category identifier of picture.In which, by comparing the similarity degree of the blurred picture after blurred picture and deblurring, it can be obtained The differentiation to the vague category identifier of blurred picture may be implemented in the vague category identifier of blurred picture, which, thus improve it is subsequent right The effect of blurred picture reparation.
Further, above-mentioned vague category identifier determining module 73, is also used to: if similarity degree is lower than preset similar threshold Value determines that the vague category identifier of image to be processed is default vague category identifier.
Further, above-mentioned default vague category identifier includes motion blur;Above-mentioned vague category identifier includes motion blur and defocus It is fuzzy;Above-mentioned vague category identifier determining module 73, is also used to: if similarity degree is greater than or equal to preset similar threshold value, determining The vague category identifier of image to be processed is defocus blur.
The technical effect of the device of image vague category identifier, realization principle and generation is determined provided by the embodiment of the present invention Identical with preceding method embodiment, to briefly describe, Installation practice part does not refer to place, can refer to preceding method embodiment Middle corresponding contents.
The embodiment of the invention also provides a kind of servers, the method for running above-mentioned determining image vague category identifier, ginseng As shown in Figure 8, which includes processor and memory, which is stored with the machine that can be executed by processor and can hold Row instruction, the processor execute method of the machine-executable instruction to realize above-mentioned determining image vague category identifier.
Further, server shown in Fig. 8 further includes bus 102 and communication interface 103, processor 101, communication interface 103 and memory 100 connected by bus 102.
Wherein, memory 100 may include high-speed random access memory (RAM, Random Access Memory), It may further include non-labile memory (non-volatile memory), for example, at least a magnetic disk storage.By extremely A few communication interface 103 (can be wired or wireless) is realized logical between the system network element and at least one other network element Letter connection, can be used internet, wide area network, local network, Metropolitan Area Network (MAN) etc..Bus 102 can be isa bus, pci bus or Eisa bus etc..The bus can be divided into address bus, data/address bus, control bus etc..Only to be used in Fig. 8 convenient for indicating One four-headed arrow indicates, it is not intended that an only bus or a type of bus.
Processor 101 may be a kind of IC chip, the processing capacity with signal.It is above-mentioned during realization Each step of method can be completed by the integrated logic circuit of the hardware in processor 101 or the instruction of software form.On The processor 101 stated can be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (Digital Signal Processing, abbreviation DSP), specific integrated circuit (Application Specific Integrated Circuit, abbreviation ASIC), ready-made programmable gate array (Field-Programmable Gate Array, abbreviation FPGA) or Person other programmable logic device, discrete gate or transistor logic, discrete hardware components.It may be implemented or execute sheet Disclosed each method, step and logic diagram in inventive embodiments.General processor can be microprocessor or the processing Device is also possible to any conventional processor etc..The step of method in conjunction with disclosed in the embodiment of the present invention, can be embodied directly in Hardware decoding processor executes completion, or in decoding processor hardware and software module combination execute completion.Software mould Block can be located at random access memory, flash memory, read-only memory, programmable read only memory or electrically erasable programmable storage In the storage medium of this fields such as device, register maturation.The storage medium is located at memory 100, and processor 101 reads memory Information in 100, in conjunction with its hardware complete previous embodiment method the step of.
The embodiment of the invention also provides a kind of machine readable storage medium, which is stored with machine Executable instruction, for the machine-executable instruction when being called and being executed by processor, which promotes processor The method for realizing above-mentioned determining image vague category identifier, specific implementation can be found in embodiment of the method, and details are not described herein.
The method, apparatus of image vague category identifier and the computer program of electronic equipment are determined provided by the embodiment of the present invention Product, the computer readable storage medium including storing program code, the instruction that said program code includes can be used for executing Previous methods method as described in the examples, specific implementation can be found in embodiment of the method, and details are not described herein.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
Finally, it should be noted that embodiment described above, only a specific embodiment of the invention, to illustrate the present invention Technical solution, rather than its limitations, scope of protection of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair It is bright to be described in detail, those skilled in the art should understand that: anyone skilled in the art In the technical scope disclosed by the present invention, it can still modify to technical solution documented by previous embodiment or can be light It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make The essence of corresponding technical solution is detached from the spirit and scope of technical solution of the embodiment of the present invention, should all cover in protection of the invention Within the scope of.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. a kind of method of determining image vague category identifier, which is characterized in that the described method includes:
Judge whether image to be processed is blurred picture;
If it is blurred picture, using the corresponding deblurring mode of default vague category identifier, mould is carried out to the image to be processed Paste processing;
Determine the image to be processed and deblurring treated the similarity degree of the image to be processed;
According to the similarity degree, the vague category identifier of the image to be processed is determined.
2. the method according to claim 1, wherein determining the image to be processed according to the similarity degree Vague category identifier the step of, comprising:
If the similarity degree is lower than preset similar threshold value, determine that the vague category identifier of the image to be processed is described default Vague category identifier.
3. according to the method described in claim 2, it is characterized in that, the default vague category identifier includes motion blur;The mould Pasting type includes the motion blur and defocus blur;
It is described according to the similarity degree, the step of determining the vague category identifier of the image to be processed, further includes:
If the similarity degree is greater than or equal to preset similar threshold value, determine the vague category identifier of the image to be processed for institute State defocus blur.
4. the method according to claim 1, wherein described using the default corresponding deblurring side of vague category identifier Formula, the step of deblurring processing is carried out to the image to be processed, comprising:
The image to be processed is input in the deblurring model that training is completed in advance, that treated is to be processed for output deblurring Image;The deblurring model is obtained by the generator training that production fights network.
5. the method according to claim 1, wherein determining the image to be processed and deblurring treated institute The step of stating the similarity degree of image to be processed, comprising:
Calculate the image to be processed and deblurring treated the error amount of the image to be processed;The error amount includes equal Square error amount or mean absolute error value;The error amount is determined as the image to be processed and deblurring treated is described The similarity degree of image to be processed;
Alternatively, calculating the image quality evaluation index and deblurring treated the image to be processed of the image to be processed The index difference of image quality evaluation index;Described image quality evaluation index includes PSNR value or SSIM value;By the index Difference is determined as the image to be processed and deblurring treated the similarity degree of the image to be processed.
6. a kind of device of determining image vague category identifier, which is characterized in that described device includes:
Blurred picture judgment module, for judging whether image to be processed is blurred picture;
Deblurring module is used for if it is blurred picture, using the corresponding deblurring mode of default vague category identifier, to described wait locate It manages image and carries out deblurring processing;
Similarity degree determining module, the phase of treated for the determining the image to be processed and deblurring image to be processed Like degree;
Vague category identifier determining module, for determining the vague category identifier of the image to be processed according to the similarity degree.
7. device according to claim 6, which is characterized in that the vague category identifier determining module is also used to:
If the similarity degree is lower than preset similar threshold value, determine that the vague category identifier of the image to be processed is described default Vague category identifier.
8. device according to claim 7, which is characterized in that the default vague category identifier includes motion blur;The mould Pasting type includes the motion blur and defocus blur;The vague category identifier determining module, is also used to:
If the similarity degree is greater than or equal to preset similar threshold value, determine the vague category identifier of the image to be processed for institute State defocus blur.
9. a kind of server, which is characterized in that including processor and memory, the memory is stored with can be by the processing The machine-executable instruction that device executes, the processor execute the machine-executable instruction to realize that claim 1 to 5 is any The method of determination image vague category identifier described in.
10. a kind of machine readable storage medium, which is characterized in that the machine readable storage medium is stored with the executable finger of machine It enables, for the machine-executable instruction when being called and being executed by processor, the machine-executable instruction promotes processor to realize The method of determining image vague category identifier described in any one of claim 1 to 5.
CN201910706781.9A 2019-07-31 2019-07-31 Determine the method, apparatus and server of image vague category identifier Pending CN110400312A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910706781.9A CN110400312A (en) 2019-07-31 2019-07-31 Determine the method, apparatus and server of image vague category identifier

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910706781.9A CN110400312A (en) 2019-07-31 2019-07-31 Determine the method, apparatus and server of image vague category identifier

Publications (1)

Publication Number Publication Date
CN110400312A true CN110400312A (en) 2019-11-01

Family

ID=68327229

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910706781.9A Pending CN110400312A (en) 2019-07-31 2019-07-31 Determine the method, apparatus and server of image vague category identifier

Country Status (1)

Country Link
CN (1) CN110400312A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112102185A (en) * 2020-09-04 2020-12-18 腾讯科技(深圳)有限公司 Image deblurring method and device based on deep learning and electronic equipment
CN113688850A (en) * 2020-05-14 2021-11-23 武汉Tcl集团工业研究院有限公司 Image processing method and terminal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331871A (en) * 2014-12-02 2015-02-04 苏州大学 Image de-blurring method and image de-blurring device
US20170365046A1 (en) * 2014-08-15 2017-12-21 Nikon Corporation Algorithm and device for image processing
CN108416752A (en) * 2018-03-12 2018-08-17 中山大学 A method of image is carried out based on production confrontation network and removes motion blur
CN108765325A (en) * 2018-05-17 2018-11-06 中国人民解放军陆军工程大学 A kind of small drone Restoration method of blurred image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170365046A1 (en) * 2014-08-15 2017-12-21 Nikon Corporation Algorithm and device for image processing
CN104331871A (en) * 2014-12-02 2015-02-04 苏州大学 Image de-blurring method and image de-blurring device
CN108416752A (en) * 2018-03-12 2018-08-17 中山大学 A method of image is carried out based on production confrontation network and removes motion blur
CN108765325A (en) * 2018-05-17 2018-11-06 中国人民解放军陆军工程大学 A kind of small drone Restoration method of blurred image

Non-Patent Citations (8)

* Cited by examiner, † Cited by third party
Title
J.L. PECH-PACHECO ET.AL: "Diatom autofocusing in brightfield microscopy: a comparative study", 《PROCEEDINGS 15TH INTERNATIONAL CONFERENCE ON PATTERN RECOGNITION》 *
OREST KUPYN ET.AL: "DeblurGAN: Blind Motion Deblurring Using Conditional Adversarial Networks", 《2018 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION》 *
WS118184139: "模糊的图片怎么变清晰?【非PS,附软件】", 《百度经验》 *
中国宇航学会光电技术专业委员会: "《2004年全国光电技术学术交流会论文集 下》", 31 October 2004 *
木木博客: "如何让模糊图片变得更清晰", 《HTTPS://WWW.SOHU.COM/A/122170723_126109》 *
木木老贼: "这个图真模糊!如何让模糊图片变清晰?", 《百度快照》 *
王辉登: "基于振铃抑制的运动模糊图像复原方法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
融融春阳: "这个图真模糊!如何让模糊图片变清晰?", 《HTTP://WWW.360DOC.COM/CONTENT/16/1222/12/37951088_616775847.SHTML》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113688850A (en) * 2020-05-14 2021-11-23 武汉Tcl集团工业研究院有限公司 Image processing method and terminal
CN112102185A (en) * 2020-09-04 2020-12-18 腾讯科技(深圳)有限公司 Image deblurring method and device based on deep learning and electronic equipment

Similar Documents

Publication Publication Date Title
Li et al. Aod-net: All-in-one dehazing network
CN109325954B (en) Image segmentation method and device and electronic equipment
Liu et al. Contrast in haze removal: Configurable contrast enhancement model based on dark channel prior
CN111582150A (en) Method and device for evaluating face quality and computer storage medium
CN112785572B (en) Image quality evaluation method, apparatus and computer readable storage medium
Nair et al. At-ddpm: Restoring faces degraded by atmospheric turbulence using denoising diffusion probabilistic models
CN107172354A (en) Method for processing video frequency, device, electronic equipment and storage medium
CN110400312A (en) Determine the method, apparatus and server of image vague category identifier
CN111008935A (en) Face image enhancement method, device, system and storage medium
Swami et al. Candy: Conditional adversarial networks based fully end-to-end system for single image haze removal
Wang et al. An efficient method for image dehazing
CN113643217B (en) Video motion blur removing method and device, terminal equipment and readable storage medium
CN109712134B (en) Iris image quality evaluation method and device and electronic equipment
CN111311562A (en) Method and device for detecting ambiguity of virtual focus image
CN109698946A (en) Projection device Atomatic focusing method, projection device and computer readable storage medium
CN113963149A (en) Medical bill picture fuzzy judgment method, system, equipment and medium
Fuh et al. Mcpa: A fast single image haze removal method based on the minimum channel and patchless approach
CN106778777A (en) A kind of vehicle match method and system
CN105893578B (en) A kind of method and device of photo selection
CN116071415B (en) Stereo matching method based on improved Census algorithm
CN111476056B (en) Target object identification method, device, terminal equipment and computer storage medium
CN111311610A (en) Image segmentation method and terminal equipment
WO2023019681A1 (en) Image content extraction method and apparatus, and terminal and storage medium
CN112686851B (en) Image detection method, device and storage medium
CN109727193B (en) Image blurring method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20191101

RJ01 Rejection of invention patent application after publication