CN109493363B - A kind of FIG pull handle method, apparatus and image processing equipment based on geodesic distance - Google Patents

A kind of FIG pull handle method, apparatus and image processing equipment based on geodesic distance Download PDF

Info

Publication number
CN109493363B
CN109493363B CN201811058841.2A CN201811058841A CN109493363B CN 109493363 B CN109493363 B CN 109493363B CN 201811058841 A CN201811058841 A CN 201811058841A CN 109493363 B CN109493363 B CN 109493363B
Authority
CN
China
Prior art keywords
pixel
geodesic distance
value
prospect
background
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811058841.2A
Other languages
Chinese (zh)
Other versions
CN109493363A (en
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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201811058841.2A priority Critical patent/CN109493363B/en
Publication of CN109493363A publication Critical patent/CN109493363A/en
Application granted granted Critical
Publication of CN109493363B publication Critical patent/CN109493363B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation

Abstract

This application provides a kind of FIG pull handle method, apparatus and image processing equipment based on geodesic distance, this method and device are applied to image processing equipment.This programme introduces the confidence level obtained by inverse proportion function, the difference of two geodesic distances of the confidence level and respective pixel is negatively correlated, therefore, in two close situations of geodesic distance of respective pixel, the reliability of the initial alpha value of the pixel is determined by the confidence level of the pixel and it is modified, to make the linear combination of the probability α value of final α value probability graph and the initial alpha value of original image, so that final α value is more convincing, the misjudged generation of pixel is effectively prevented, stingy figure effect is improved.

Description

A kind of FIG pull handle method, apparatus and image processing equipment based on geodesic distance
Technical field
This disclosure relates to image processing techniques more particularly to a kind of FIG pull handle method, apparatus based on geodesic distance and Image processing equipment.
Background technique
In image procossing, scratching figure naturally is an extremely important and challenging project, main purpose be by Prospect in image is plucked out from background, so that prospect is realized specific effect in conjunction with a new background.
The prior art is that geodesic distance pixel-based carries out the stingy figure of α, specifically finds out each pixel and is selected Prospect sample point and background sample point between geodesic distance, and then obtain the α of current pixel according to the two geodesic distances Value, the i.e. nontransparent degree of current pixel.FIG pull handle is finally carried out according to the α value of each pixel, i.e., by area in the content of original image Separate foreground and background.
But will appear two close situations of geodesic distance with the joining place of background in prospect, cause the pixel at this to have Prospect may be belonged to be also possible to belong to background, pixel is very likely misjudged in the case, so as to cause stingy figure effect compared with Difference.
Summary of the invention
To overcome the problems in correlation technique, the disclosure provide a kind of FIG pull handle method based on geodesic distance, Final and image processing equipment.
According to the first aspect of the embodiments of the present disclosure, a kind of FIG pull handle method based on geodesic distance is provided, is applied to Image processing equipment, the FIG pull handle method comprising steps of
Obtain the probability graph of original image and the original image to be processed;
Prospect geodesic distance of each pixel relative to prospect sample point in the original image is calculated, and relative to background sample The background geodesic distance of this point;
The initial alpha of respective pixel is calculated according to the prospect geodesic distance of each pixel and the background geodesic distance Value;
The prospect geodesic distance and the background geodesic distance are calculated according to preset inverse proportion function, obtained The confidence level of each pixel;
The initial alpha value is repaired using pixel each in the confidence level and the probability graph corresponding probability α value It is positive to calculate, obtain the final α value of each pixel;
According to the final α value of each pixel to the original image carry out FIG pull handle, obtain the original image prospect and Background.
Optionally, the probability graph is to be handled to obtain to the original image using deep neural network trained in advance 's.
Optionally, prospect geodesic distance of each pixel relative to prospect sample point in the calculating original image, and Background geodesic distance relative to background sample point, comprising:
The prospect geodesic distance and the background geodesic distance are calculated separately using Dijkstra's algorithm.
Optionally, described that corresponding picture is calculated according to the prospect geodesic distance of each pixel and the background geodesic distance The initial alpha value of element, comprising:
The initial alpha value of each pixel is calculated according to the following formula:
Wherein, α (x) is the initial alpha value of each pixel, DBFor the background geodesic distance of respective pixel, DFFor respective pixel Prospect geodesic distance.
Optionally, the inverse proportion function are as follows:
Wherein, λ is confidence level, and e is Euler's numbers, DFFor background geodesic distance, DBFor prospect geodesic distance, β is default normal Number.
Optionally, the calculation formula of the final α value is as follows:
Final α value=(1- λ) * initial alpha (x)+λ * probability α value.
According to the second aspect of an embodiment of the present disclosure, a kind of FIG pull handle device based on geodesic distance is provided, is applied to Image processing equipment, the FIG pull handle device include:
Image collection module is configured as obtaining the probability graph of original image and the original image to be processed;
First computing module is configured as calculating prospect geodetic of each pixel relative to prospect sample point in the original image Distance, and the background geodesic distance relative to background sample point;
Second computing module is configured as the prospect geodesic distance and the background geodesic distance according to each pixel Calculate the initial alpha value of respective pixel;
Third computing module is configured as according to preset inverse proportion function to the prospect geodesic distance and the background Geodesic distance is calculated, and the confidence level of each pixel is obtained;
4th computing module is configured as utilizing the corresponding probability α of pixel each in the confidence level and the probability graph Value is modified calculating to the initial alpha value, obtains the final α value of each pixel;
Figure execution module is scratched, is configured as carrying out FIG pull handle to the original image according to the final α value of each pixel, Obtain the foreground and background of the original image.
Optionally, the probability graph is to be handled to obtain to the original image using deep neural network trained in advance 's.
Optionally, first computing module is configured as calculating separately the prospect geodetic using Dijkstra's algorithm Distance and the background geodesic distance.
Optionally, second computing module is configured as calculating the initial alpha value of each pixel according to the following formula:
Wherein, α (x) is the initial alpha value of each pixel, DBFor the background geodesic distance of respective pixel, DFFor respective pixel Prospect geodesic distance.
Optionally, the inverse proportion function are as follows:
Wherein, λ is confidence level, and e is Euler's numbers, DFFor background geodesic distance, DBFor prospect geodesic distance, β is default normal Number.
Optionally, the calculation formula of the final α value is as follows:
Final α value=(1- λ) * initial alpha (x)+λ * probability α value.
According to the third aspect of an embodiment of the present disclosure, a kind of image processing equipment is provided, as described above scratch is provided with and schemes Processing unit.
According to a fourth aspect of embodiments of the present disclosure, a kind of image processing equipment is provided, comprising:
Processor;
For storing the memory of the processor-executable instruction;
Wherein, the processor is configured to:
Obtain the probability graph of original image and the original image to be processed;
Prospect geodesic distance of each pixel relative to prospect sample point in the original image is calculated, and relative to background sample The background geodesic distance of this point;
The initial alpha of respective pixel is calculated according to the prospect geodesic distance of each pixel and the background geodesic distance Value;
The prospect geodesic distance and the background geodesic distance are calculated according to preset inverse proportion function, obtained The confidence level of each pixel;
The initial alpha value is repaired using pixel each in the confidence level and the probability graph corresponding probability α value It is positive to calculate, obtain the final α value of each pixel;
According to the final α value of each pixel to the original image carry out FIG pull handle, obtain the original image prospect and Background.
According to a fifth aspect of the embodiments of the present disclosure, a kind of computer program product is provided, is included the following steps:
Obtain the probability graph of original image and the original image to be processed;
Prospect geodesic distance of each pixel relative to prospect sample point in the original image is calculated, and relative to background sample The background geodesic distance of this point;
The initial alpha of respective pixel is calculated according to the prospect geodesic distance of each pixel and the background geodesic distance Value;
The prospect geodesic distance and the background geodesic distance are calculated according to preset inverse proportion function, obtained The confidence level of each pixel;
The initial alpha value is repaired using pixel each in the confidence level and the probability graph corresponding probability α value It is positive to calculate, obtain the final α value of each pixel;
According to the final α value of each pixel to the original image carry out FIG pull handle, obtain the original image prospect and Background.
The technical scheme provided by this disclosed embodiment can include the following benefits: this programme, which introduces, passes through inverse ratio The difference of two geodesic distances of the confidence level that example function obtains, the confidence level and respective pixel is negatively correlated, therefore, corresponding When two close situations of geodesic distance of pixel, the reliability of the initial alpha value of the pixel is determined by the confidence level of the pixel And it is modified, to make the linear combination of the probability α value of final α value probability graph and the initial alpha value of original image, so that most Whole α value is more convincing, effectively prevents the misjudged generation of pixel, improves stingy figure effect.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and be used to explain the principle of the present invention together with specification.
Fig. 1 is a kind of flow chart of FIG pull handle method based on geodesic distance shown according to an exemplary embodiment.
Fig. 2 is a kind of structural frames of FIG pull handle device based on geodesic device shown according to an exemplary embodiment Figure.
Fig. 3 is a kind of structural block diagram of image processing equipment shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Fig. 1 is a kind of flow chart of FIG pull handle method based on geodesic distance shown according to an exemplary embodiment.
As shown in Figure 1, the FIG pull handle method is applied in image processing equipment, include the following steps.
In step sl, the probability graph of original image and original image to be processed is obtained.
Original image refers to that image be not processed, that wherein foreground and background is not distinguished, this image can make Static picture is also possible to video pictures.The probability graph of original image refers to through deep neural network trained in advance to the original image It is being handled as a result, containing the probability that each pixel in original image particularly belongs to prospect in the probability graph, it may also be said to include Each pixel belongs to the probability of background.The trimap figure of the original image is obtained on the basis of obtaining probability graph.
Multiple training samples are needed in the training process of deep neural network therein, training sample includes a certain number of Original image sample and the probability graph sample by having marked prospect background, are entered into neural network mould after obtaining above-mentioned sample It is trained in type, to finally obtain the deep neural network.
In step s 2, the prospect geodesic distance and background geodesic distance of each pixel in original image are calculated.
After getting original image, user needs to scribble sampling is carried out in original image, and wherein sample point includes prospect sample point With background sample point.After determining prospect sample point and background sample point, each pixel is just calculated relative to prospect sample point Prospect geodesic distance, is denoted as DF, while background geodesic distance of the pixel relative to background sample point is also calculated, it is denoted as DB
It is to calculate each pixel using Dijkstra's algorithm to survey relative to the prospect of prospect sample point in specific calculate Ground distance and background geodesic distance relative to background sample point.
In step s3, the initial alpha value of each pixel is calculated according to prospect geodesic distance and background geodesic distance.
After the prospect geodesic distance and background geodesic distance for obtaining respective pixel, it can be calculated according to a calculation formula Calculate the initial alpha value of each pixel, which is also the initial opacity value of pixel in fact, but we not as into The direct basis of the stingy figure of row.Calculate the formula of the initial alpha value are as follows:
Wherein, α (x) is the initial alpha value of respective pixel, DBFor the background geodesic distance of respective pixel, DFIt is then the pixel Prospect geodesic distance.
The source of above-mentioned formula is as follows:
For the pixel of each unknown alpha value, after we obtain prospect background geodesic distance, this can be calculated Pixel is the probability of prospect.Utilize formula PF (x)=DB (x)/(DF (x)+DB (x)).So the probability that the pixel is background is PB (x)=1-PF (x).The alpha value prime formula of unknown pixel is sought according to the programIn conjunction with formula PF (x)=DB (x)/(DF (x)+DB (x)), It can simplify and ask the formula of alpha value to be
In step s 4, the confidence level of each pixel is calculated.
While calculating the initial alpha value of respective pixel, also according to an inverse proportion function to the prospect geodetic of the pixel Distance and background geodesic distance are calculated, to obtain the confidence level λ of the pixel, the confidence level can also be regarded as this in fact The confidence level of the initial alpha value of pixel.The calculation formula of the specific confidence level are as follows:
Wherein, λ is confidence level, and e is Euler's numbers, DFFor background geodesic distance, DBFor prospect geodesic distance, β is default normal Number.Specifically, the β constant is an empirical parameter, the integer between 1~100 is selected in the present embodiment.
The confidence level represents the prospect measure distance of respective pixel and the degree of background geodesic distance otherness, and λ value is got over Greatly, it is smaller to represent otherness, on the contrary it is bigger.The value range of λ is between 0-1.It is surveyed when consideration extreme case, such as to prospect When ground distance and equal background geodesic distance, λ is equal to 1.Pixel the case where determination is prospect or background completely Under, λ 0.
By seeking the corresponding λ value of each pixel, we may determine that current pixel acquires the credibility of initial alpha value. For example λ value is bigger, initial alpha value is more unreliable.
In step s 5, initial alpha value is modified using the confidence level of each pixel and probability α value.
By the corrected Calculation to the initial alpha value, the final α value of each pixel is obtained.Specifically body in the final α value The initial alpha value of original image is showed, pixel corresponding with pixel each in original image is general in the confidence level and probability graph of each pixel Rate α value.Wherein the calculating process of probability α value is identical as the calculating process of initial alpha value of pixel each in original image.Final α value Calculation formula is as follows:
Final α value=(1- λ) * initial alpha (x)+λ * probability α value.
Wherein λ refers to the confidence level of respective pixel.
In step s 6, original image is carried out based on obtained final α value scratching figure.
After obtaining the final α value of each pixel, according to the value to original image carry out scratch figure, thus obtain original image prospect and Background is completed final scratch and is schemed.
It can be seen from the above technical proposal that a kind of FIG pull handle method based on geodesic distance is present embodiments provided, This method is applied to image processing equipment, specially obtains the probability graph of original image and original image to be processed;It calculates each in original image Prospect geodesic distance of the pixel relative to prospect sample point, and the background geodesic distance relative to background sample point;According to every The prospect geodesic distance and background geodesic distance of a pixel calculate the initial alpha value of respective pixel;According to preset inverse proportion function Prospect geodesic distance and background geodesic distance are calculated, the confidence level of each pixel is obtained;Utilize confidence level and probability graph In each pixel corresponding probability α value calculating is modified to initial alpha value, obtain the final α value of each pixel;According to each picture The final α value of element carries out FIG pull handle to original image, obtains the foreground and background of original image.Pass through inverse proportion since this programme introduces The difference of two geodesic distances of the confidence level that function obtains, the confidence level and respective pixel is negatively correlated, therefore, in corresponding picture When two close situations of geodesic distance of element, the reliability of the initial alpha value of the pixel is determined simultaneously by the confidence level of the pixel It is modified, to make the linear combination of the probability α value of final α value probability graph and the initial alpha value of original image, so that finally α value is more convincing, effectively prevents the misjudged generation of pixel, improves stingy figure effect.
Fig. 2 is a kind of structural frames of FIG pull handle device based on geodesic distance shown according to an exemplary embodiment Figure.
As shown in Fig. 2, the FIG pull handle device is applied in image processing equipment, including image collection module 10, first Computing module 20, the second computing module 30, third computing module 40, the 4th computing module 50 and stingy figure execution module 60.
Image collection module 10 is configured as obtaining the probability graph of original image and original image to be processed.
Original image refers to that image be not processed, that wherein foreground and background is not distinguished, this image can make Static picture is also possible to video pictures.The probability graph of original image refers to through deep neural network trained in advance to the original image It is being handled as a result, containing the probability that each pixel in original image particularly belongs to prospect in the probability graph, it may also be said to include Each pixel belongs to the probability of background.The trimap figure of the original image is obtained on the basis of obtaining probability graph.
Multiple training samples are needed in the training process of deep neural network therein, training sample includes a certain number of Original image sample and the probability graph sample by having marked prospect background, are entered into neural network mould after obtaining above-mentioned sample It is trained in type, to finally obtain the deep neural network.
First computing module 20 is configured as calculating the prospect geodesic distance and background geodesic distance of each pixel in original image.
After getting original image, user needs to scribble sampling is carried out in original image, and wherein sample point includes prospect sample point With background sample point.After determining prospect sample point and background sample point, each pixel is just calculated relative to prospect sample point Prospect geodesic distance, is denoted as DF, while background geodesic distance of the pixel relative to background sample point is also calculated, it is denoted as DB
It is to calculate each pixel using Dijkstra's algorithm to survey relative to the prospect of prospect sample point in specific calculate Ground distance and background geodesic distance relative to background sample point.
Second computing module 30 is configured as calculating the first of each pixel according to prospect geodesic distance and background geodesic distance Beginning α value.
After the prospect geodesic distance and background geodesic distance for obtaining respective pixel, it can be calculated according to a calculation formula Calculate the initial alpha value of each pixel, which is also the initial opacity value of pixel in fact, but we not as into The direct basis of the stingy figure of row.Calculate the formula of the initial alpha value are as follows:
Wherein, α (x) is the initial alpha value of respective pixel, DBFor the background geodesic distance of respective pixel, DFIt is then the pixel Prospect geodesic distance.
Third computing module 40 is configured as calculating the confidence level of each pixel.
While calculating the initial alpha value of respective pixel, also according to an inverse proportion function to the prospect geodetic of the pixel Distance and background geodesic distance are calculated, to obtain the confidence level λ of the pixel, the confidence level can also be regarded as this in fact The confidence level of the initial alpha value of pixel.The calculation formula of the specific confidence level are as follows:
Wherein, λ is confidence level, and e is Euler's numbers, DFFor background geodesic distance, DBFor prospect geodesic distance, β is default normal Number.Specifically, the β constant is an empirical parameter, the integer between 1~100 is selected in the present embodiment.
The confidence level represents the prospect measure distance of respective pixel and the degree of background geodesic distance otherness, and λ value is got over Greatly, it is smaller to represent otherness, on the contrary it is bigger.The value range of λ is between 0-1.It is surveyed when consideration extreme case, such as to prospect When ground distance and equal background geodesic distance, λ is equal to 1.Pixel the case where determination is prospect or background completely Under, λ 0.
By seeking the corresponding λ value of each pixel, we may determine that current pixel acquires the credibility of initial alpha value. For example λ value is bigger, initial alpha value is more unreliable.
4th computing module 50 is configured as being modified initial alpha value using the confidence level and probability α value of each pixel.
By the corrected Calculation to the initial alpha value, the final α value of each pixel is obtained.Specifically body in the final α value The initial alpha value of original image is showed, pixel corresponding with pixel each in original image is general in the confidence level and probability graph of each pixel Rate α value.Wherein the calculating process of probability α value is identical as the calculating process of initial alpha value of pixel each in original image.Final α value Calculation formula is as follows:
Final α value=(1- λ) * initial alpha (x)+λ * probability α value.
Wherein λ refers to the confidence level of respective pixel.
Figure execution module 60 is scratched to be configured as that original image is carried out based on obtained final α value to scratch figure.
After obtaining the final α value of each pixel, according to the value to original image carry out scratch figure, thus obtain original image prospect and Background is completed final scratch and is schemed.
It can be seen from the above technical proposal that a kind of FIG pull handle device based on geodesic distance is present embodiments provided, The device is applied to image processing equipment, specially obtains the probability graph of original image and original image to be processed;It calculates each in original image Prospect geodesic distance of the pixel relative to prospect sample point, and the background geodesic distance relative to background sample point;According to every The prospect geodesic distance and background geodesic distance of a pixel calculate the initial alpha value of respective pixel;According to preset inverse proportion function Prospect geodesic distance and background geodesic distance are calculated, the confidence level of each pixel is obtained;Utilize confidence level and probability graph In each pixel corresponding probability α value calculating is modified to initial alpha value, obtain the final α value of each pixel;According to each picture The final α value of element carries out FIG pull handle to original image, obtains the foreground and background of original image.Pass through inverse proportion since this programme introduces The difference of two geodesic distances of the confidence level that function obtains, the confidence level and respective pixel is negatively correlated, therefore, in corresponding picture When two close situations of geodesic distance of element, the reliability of the initial alpha value of the pixel is determined simultaneously by the confidence level of the pixel It is modified, to make the linear combination of the probability α value of final α value probability graph and the initial alpha value of original image, so that finally α value is more convincing, effectively prevents the misjudged generation of pixel, improves stingy figure effect.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
In one specific embodiment of the application, a kind of image processing equipment is additionally provided, the image processing equipment is specific It is provided with FIG pull handle device provided by an embodiment.
The FIG pull handle device is specifically used for obtaining the probability graph of original image and original image to be processed;Calculate each picture in original image Prospect geodesic distance of the element relative to prospect sample point, and the background geodesic distance relative to background sample point;According to each The prospect geodesic distance and background geodesic distance of pixel calculate the initial alpha value of respective pixel;According to preset inverse proportion function pair Prospect geodesic distance and background geodesic distance are calculated, and the confidence level of each pixel is obtained;Using in confidence level and probability graph The corresponding probability α value of each pixel is modified calculating to initial alpha value, obtains the final α value of each pixel;According to each pixel Final α value to original image carry out FIG pull handle, obtain the foreground and background of original image.Since this programme is introduced through inverse proportion letter The difference of two geodesic distances of the confidence level that number obtains, the confidence level and respective pixel is negatively correlated, therefore, in respective pixel Two geodesic distance close situations when, the reliability of the initial alpha value of the pixel and right is determined by the confidence level of the pixel It is modified, to make the linear combination of the probability α value of final α value probability graph and the initial alpha value of original image, so that final α Value is more convincing, effectively prevents the misjudged generation of pixel, improves stingy figure effect.
Fig. 3 is a kind of block diagram of image processing equipment 300 shown according to an exemplary embodiment.
Referring to Fig. 3, it further comprises one or more processors, and by depositing that device 300, which includes processing component 322, Memory resource representated by reservoir 332, can be by the instruction of the execution of processing component 322, such as application program for storing.It deposits The application program stored in reservoir 332 may include it is one or more each correspond to one group of instruction module.This Outside, processing component 322 is configured as executing instruction, to execute following method:
Obtain the probability graph of original image and the original image to be processed;
Prospect geodesic distance of each pixel relative to prospect sample point in the original image is calculated, and relative to background sample The background geodesic distance of this point;
The initial alpha of respective pixel is calculated according to the prospect geodesic distance of each pixel and the background geodesic distance Value;
The prospect geodesic distance and the background geodesic distance are calculated according to preset inverse proportion function, obtained The confidence level of each pixel;
The initial alpha value is repaired using pixel each in the confidence level and the probability graph corresponding probability α value It is positive to calculate, obtain the final α value of each pixel;
According to the final α value of each pixel to the original image carry out FIG pull handle, obtain the original image prospect and Background.
Device 300 can also include the power management that a power supply module 326 is configured as executive device 300, and one has Line or radio network interface 350 are configured as device 300 being connected to network and input and output (I/O) interface 358.Dress Setting 300 can operate based on the operating system for being stored in memory 332, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.

Claims (10)

1. a kind of FIG pull handle method based on geodesic distance is applied to image processing equipment, which is characterized in that at the stingy figure Reason method comprising steps of
Obtain the probability graph of original image and the original image to be processed;
Prospect geodesic distance of each pixel relative to prospect sample point in the original image is calculated, and relative to background sample point Background geodesic distance;
The initial alpha value of respective pixel is calculated according to the prospect geodesic distance of each pixel and the background geodesic distance;
The prospect geodesic distance and the background geodesic distance are calculated according to preset inverse proportion function, obtained each The confidence level of pixel;
Meter is modified to the initial alpha value using pixel each in the confidence level and the probability graph corresponding probability α value It calculates, obtains the final α value of each pixel;
FIG pull handle is carried out to the original image according to the final α value of each pixel, obtains the foreground and background of the original image;
The inverse proportion function are as follows:
Wherein, λ is confidence level, and e is Euler's numbers, DFFor background geodesic distance, DBFor prospect geodesic distance, β is preset constant;
The calculation formula of the final α value is as follows:
Final α value=(1- λ) * initial alpha value+λ * probability α value.
2. FIG pull handle method as described in claim 1, which is characterized in that the probability graph is to utilize depth trained in advance Neural network handles the original image.
3. FIG pull handle method as described in claim 1, which is characterized in that each pixel is opposite in the calculating original image In the prospect geodesic distance of prospect sample point, and relative to the background geodesic distance of background sample point, comprising:
The prospect geodesic distance and the background geodesic distance are calculated separately using Dijkstra's algorithm.
4. FIG pull handle method as described in claim 1, which is characterized in that the prospect geodetic according to each pixel Distance and the background geodesic distance calculate the initial alpha value of respective pixel, comprising:
The initial alpha value of each pixel is calculated according to the following formula:
Wherein, α (x) is the initial alpha value of each pixel, DBFor the background geodesic distance of respective pixel, DFFor the prospect of respective pixel Geodesic distance.
5. a kind of FIG pull handle device based on geodesic distance is applied to image processing equipment, which is characterized in that at the stingy figure Managing device includes:
Image collection module is configured as obtaining the probability graph of original image and the original image to be processed;
First computing module is configured as calculating prospect geodesic distance of each pixel relative to prospect sample point in the original image From, and relative to the background geodesic distance of background sample point;
Second computing module is configured as being calculated according to the prospect geodesic distance of each pixel and the background geodesic distance The initial alpha value of respective pixel;
Third computing module is configured as according to preset inverse proportion function to the prospect geodesic distance and the background geodetic Distance is calculated, and the confidence level of each pixel is obtained;
4th computing module is configured as utilizing the corresponding probability α value pair of pixel each in the confidence level and the probability graph The initial alpha value is modified calculating, obtains the final α value of each pixel;
Figure execution module is scratched, is configured as carrying out FIG pull handle to the original image according to the final α value of each pixel, obtain The foreground and background of the original image;
The inverse proportion function are as follows:
Wherein, λ is confidence level, and e is Euler's numbers, DFFor background geodesic distance, DBFor prospect geodesic distance, β is preset constant;
The calculation formula of the final α value is as follows:
Final α value=(1- λ) * initial alpha value+λ * probability α value.
6. FIG pull handle device as claimed in claim 5, which is characterized in that the probability graph is to utilize depth trained in advance Neural network handles the original image.
7. FIG pull handle device as claimed in claim 5, which is characterized in that first computing module is configured as utilizing enlightening Jie Sitela algorithm calculates separately the prospect geodesic distance and the background geodesic distance.
8. FIG pull handle device as claimed in claim 5, which is characterized in that second computing module is configured as according to such as Lower formula calculates the initial alpha value of each pixel:
Wherein, α (x) is the initial alpha value of each pixel, DBFor the background geodesic distance of respective pixel, DFFor the prospect of respective pixel Geodesic distance.
9. a kind of image processing equipment, which is characterized in that setting is just like the described in any item FIG pull handle dresses of claim 5~8 It sets.
10. a kind of image processing equipment characterized by comprising
Processor;
For storing the memory of the processor-executable instruction;
Wherein, the processor is configured to:
Obtain the probability graph of original image and the original image to be processed;
Prospect geodesic distance of each pixel relative to prospect sample point in the original image is calculated, and relative to background sample point Background geodesic distance;
The initial alpha value of respective pixel is calculated according to the prospect geodesic distance of each pixel and the background geodesic distance;
The prospect geodesic distance and the background geodesic distance are calculated according to preset inverse proportion function, obtained each The confidence level of pixel;
Meter is modified to the initial alpha value using pixel each in the confidence level and the probability graph corresponding probability α value It calculates, obtains the final α value of each pixel;
FIG pull handle is carried out to the original image according to the final α value of each pixel, obtains the foreground and background of the original image;
The inverse proportion function are as follows:
Wherein, λ is confidence level, and e is Euler's numbers, DFFor background geodesic distance, DBFor prospect geodesic distance, β is preset constant;
The calculation formula of the final α value is as follows:
Final α value=(1- λ) * initial alpha value+λ * probability α value.
CN201811058841.2A 2018-09-11 2018-09-11 A kind of FIG pull handle method, apparatus and image processing equipment based on geodesic distance Active CN109493363B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811058841.2A CN109493363B (en) 2018-09-11 2018-09-11 A kind of FIG pull handle method, apparatus and image processing equipment based on geodesic distance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811058841.2A CN109493363B (en) 2018-09-11 2018-09-11 A kind of FIG pull handle method, apparatus and image processing equipment based on geodesic distance

Publications (2)

Publication Number Publication Date
CN109493363A CN109493363A (en) 2019-03-19
CN109493363B true CN109493363B (en) 2019-09-27

Family

ID=65689581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811058841.2A Active CN109493363B (en) 2018-09-11 2018-09-11 A kind of FIG pull handle method, apparatus and image processing equipment based on geodesic distance

Country Status (1)

Country Link
CN (1) CN109493363B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301642A (en) * 2017-06-01 2017-10-27 中国人民解放军国防科学技术大学 A kind of full-automatic prospect background segregation method based on binocular vision
CN107452010A (en) * 2017-07-31 2017-12-08 中国科学院长春光学精密机械与物理研究所 A kind of automatically stingy nomography and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542543A (en) * 2012-01-06 2012-07-04 西安电子科技大学 Block similarity-based interactive image segmenting method
CN108460770B (en) * 2016-12-13 2020-03-10 华为技术有限公司 Matting method and device
CN107452003A (en) * 2017-06-30 2017-12-08 大圣科技股份有限公司 A kind of method and device of the image segmentation containing depth information

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301642A (en) * 2017-06-01 2017-10-27 中国人民解放军国防科学技术大学 A kind of full-automatic prospect background segregation method based on binocular vision
CN107452010A (en) * 2017-07-31 2017-12-08 中国科学院长春光学精密机械与物理研究所 A kind of automatically stingy nomography and device

Also Published As

Publication number Publication date
CN109493363A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
Goodfellow On distinguishability criteria for estimating generative models
CN111950638B (en) Image classification method and device based on model distillation and electronic equipment
US20210042664A1 (en) Model training and service recommendation
US20190164312A1 (en) Neural network-based camera calibration
US11250292B2 (en) Method and apparatus for generating information
US20060228002A1 (en) Simultaneous optical flow estimation and image segmentation
US20180109776A1 (en) Method, system and medium for improving the quality of 2d-to-3d automatic image conversion using machine learning techniques
CN108509921B (en) Method and apparatus for generating information
Liu et al. Image de-hazing from the perspective of noise filtering
US20140279771A1 (en) Novel Quadratic Regularization For Neural Network With Skip-Layer Connections
US20140168204A1 (en) Model based video projection
Peng et al. Active contours driven by normalized local image fitting energy
CN112232397A (en) Knowledge distillation method and device of image classification model and computer equipment
US9208404B2 (en) Object detection with boosted exemplars
US11367206B2 (en) Edge-guided ranking loss for monocular depth prediction
WO2022206729A1 (en) Method and apparatus for selecting cover of video, computer device, and storage medium
Yuan et al. Two new PRP conjugate gradient algorithms for minimization optimization models
CN114463603A (en) Training method and device for image detection model, electronic equipment and storage medium
Meng et al. Shape-aware weakly/semi-supervised optic disc and cup segmentation with regional/marginal consistency
CN109493363B (en) A kind of FIG pull handle method, apparatus and image processing equipment based on geodesic distance
Rajasekar et al. A pattern analysis based underwater video segmentation system for target object detection
CN117456236A (en) Zero sample classification method, device and equipment for 3D point cloud data and storage medium
KR20160128869A (en) Method for visual object localization using privileged information and apparatus for performing the same
JP6359985B2 (en) Depth estimation model generation device and depth estimation device
CN109785376B (en) Training method of depth estimation device, depth estimation device and storage medium

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
GR01 Patent grant
GR01 Patent grant