Answered by:
how to effectively remove background of an image c#

Question
-
Answers
-
If the image has a solid color background, you can use System.Drawing.Bitmap.GetPixel() and System.Drawing.Bitmap.SetPixel(). You may also want to look at the methods of the System.Drawing.Graphics object.
If the background is more complex, you'll need to use a process / algorithm that is beyond the scope of the forum. Good luck.
http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.getpixel(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.setpixel(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/System.Drawing.Graphics(v=vs.110).aspx
Deltazon
- Marked as answer by Caillen Saturday, July 12, 2014 2:04 PM
-
Hi medley2014,
I think you need some knowledges about graphics processing to accomplish this task, maybe some graphical analysis algrithms. C# can't help you on this, as Deltazon said.
The same question is asked here, you can refer to the ansers in this thread:
I think this article will also give you some ideas, it is about the contour analysis of images:
http://www.codeproject.com/Articles/196168/Contour-Analysis-for-Image-Recognition-in-C
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Marked as answer by Caillen Saturday, July 12, 2014 2:04 PM
-
Establish a rule, for example that the pixel at [0,0] must be the 'transparent' color (the background). Load the image as a Bitmap (let's call it bmp), and then do something like this:
bmp.MakeTransparent(bmp.GetPixel(0, 0));
- Marked as answer by medley2014 Friday, July 18, 2014 5:13 AM
All replies
-
If the image has a solid color background, you can use System.Drawing.Bitmap.GetPixel() and System.Drawing.Bitmap.SetPixel(). You may also want to look at the methods of the System.Drawing.Graphics object.
If the background is more complex, you'll need to use a process / algorithm that is beyond the scope of the forum. Good luck.
http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.getpixel(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.setpixel(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/System.Drawing.Graphics(v=vs.110).aspx
Deltazon
- Marked as answer by Caillen Saturday, July 12, 2014 2:04 PM
-
Hi medley2014,
I think you need some knowledges about graphics processing to accomplish this task, maybe some graphical analysis algrithms. C# can't help you on this, as Deltazon said.
The same question is asked here, you can refer to the ansers in this thread:
I think this article will also give you some ideas, it is about the contour analysis of images:
http://www.codeproject.com/Articles/196168/Contour-Analysis-for-Image-Recognition-in-C
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Marked as answer by Caillen Saturday, July 12, 2014 2:04 PM
-
Establish a rule, for example that the pixel at [0,0] must be the 'transparent' color (the background). Load the image as a Bitmap (let's call it bmp), and then do something like this:
bmp.MakeTransparent(bmp.GetPixel(0, 0));
- Marked as answer by medley2014 Friday, July 18, 2014 5:13 AM
-