Hi
I have one requirement like remove the background from live video.
So i tried Emgu CV for the same but i didn't get any exact solution for the above requirement.
If any one have any idea please help me ...
Its very urgent.....
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vivek A SPosted Jun 3, 2013, 1:10 AM
Now i got the solution for this by using GrabCutter,
First i display live video from webcam(particular person standing front of the fixed background "Grean/Blue").
Then i take one frame from the live video and remove the background by using GrabCutter,
but i faced one issue in this solution .i mean, by executing the GrabCutter function it will take long time .
In below please check the code,
int numberOfIterations = 1;
System.Drawing.Rectangle rect = new System.Drawing.Rectangle(0, 10, frame.Width, frame.Height);
Image
while executing this line it will take around 4 minutes...
mask = mask.ThresholdBinary(new Gray(2), new Gray(255));
System.Drawing.Color cl = System.Drawing.Color.FromArgb(0, 255, 255, 255);
Image
frame.Copy(processed_image, mask);
using (var stream = new MemoryStream())
{
// My way to display frame
processed_image.Bitmap.Save(stream, ImageFormat.Bmp);
BitmapImage bitmap = new BitmapImage();
bitmap.BeginInit();
bitmap.StreamSource = new MemoryStream(stream.ToArray());
bitmap.EndInit();
img1.Source = bitmap;
};
Thanks & Regards
Vivek A S
Keyur PatelPosted May 31, 2013, 8:29 AM
I know , it would not help you much but i believe, you have gone through following library and code for Live webcam video in WPF. You can get background property from this library and remove background area.
http://easywebcam.codeplex.com/