android - how to increase the accuracy of Grabcut Algorithm using OpenCV? -


I am using OpenCV's square algorithm for background subtraction of an image in Android. The algorithm runs fine but the result is not accurate. Like my input image:

Output looks like image:

So how can we increase the accuracy of the graft algorithm Are you

PS: Apologies for not uploading images due to low reputation: (

I am battling the same problem for a while, I have some tips and tricks for this.

1> Improve your seed. Keeping in mind that GrabCut is basically a black Box, which you give seeds and expect fragmented image as output, seeds can control all of you and this is good If you have some expectations for the image that you want to segment, there are many things in this regard. In some cases these are considered:

a > Is there a man in your image? Use the face detector to find the face and mark those pixels as potential / fixed foreground, as you think fit. Refine your seeds further. Model in some areas of interest for the sector

b & gt; If you have some data that you expect to expect after partition, then you can train the color model and even more Use them to mark more pixels

The list will move You want to come creative in different ways to add more precise seeds.

2 & gt; Post Processing: Try simple post processing techniques such as opening and closing operations to touch your fagmasks will help you get rid of a lot of noise in the final output.

Normal graphic (and therefore rob) quickly lean towards the edges and so if you have the edges close to the foreground border, then you can expect impurities in the results.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -