There are many programs available that can remove the background of a photo (with a bit of work of the User).
Has anyone written functions in PB to do this, where the image is set on a Canvas Gadget?
Remove background of photographic Image
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Remove background of photographic Image
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Remove background of photographic Image
He wants to know how to make your avatar look like this, by using code:Saki wrote:I understand not the question ?
Re: Remove background of photographic Image
The closest I've seen is by Dobro here -> viewtopic.php?f=12&t=69613IdeasVacuum wrote:Has anyone written functions in PB to do this
Re: Remove background of photographic Image
Ah, I see.
It always depends on whether it is a photo or an image, whether the crop should be rectangular or freely pixel-exact.
If the colors of the image and the background differ, you can have it done automatically.
In GFX_Wizzard_BF there is the function FloodFill_BF.
You can set a Color Distance value there, then everything in a certain color spectrum will be replaced with a color or transparency.
This corresponds to an outline calculation.
If there is no outline, this does not work, of course.
But this is not a small function that you can separate, because it is very, very complex and has dependencies.
A stamp function is quickly made, it also depends on whether it should be a copy stamp or an eraser.
That needs then still another magnifying glass or zoom.
So nothing that you can do just so quickly
The function "TextureBrush_canvas_BF" (Photo_merge.pb) can do this without a magnifying glass,
but it must be adapted to the requirements, it is only a function (With included stepples undo) and not a tool.
It always depends on whether it is a photo or an image, whether the crop should be rectangular or freely pixel-exact.
If the colors of the image and the background differ, you can have it done automatically.
In GFX_Wizzard_BF there is the function FloodFill_BF.
You can set a Color Distance value there, then everything in a certain color spectrum will be replaced with a color or transparency.
This corresponds to an outline calculation.
If there is no outline, this does not work, of course.
But this is not a small function that you can separate, because it is very, very complex and has dependencies.
A stamp function is quickly made, it also depends on whether it should be a copy stamp or an eraser.
That needs then still another magnifying glass or zoom.
So nothing that you can do just so quickly
The function "TextureBrush_canvas_BF" (Photo_merge.pb) can do this without a magnifying glass,
but it must be adapted to the requirements, it is only a function (With included stepples undo) and not a tool.
地球上の平和
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Remove background of photographic Image
That is a very nice solution, I can work with that, thanks BarryG.The closest I've seen is by Dobro here -> viewtopic.php?f=12&t=69613
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Remove background of photographic Image
It works not with scalings >100%IdeasVacuum wrote:That is a very nice solution, I can work with that, thanks BarryG.The closest I've seen is by Dobro here -> viewtopic.php?f=12&t=69613
地球上の平和
Re: Remove background of photographic Image
Hi IdeasVacuum,
It sounds like you have very specific requirements and have found a suitable method, so the following solution is for reference only.
The two methods I'm familiar with are watershed segmentation and grabcut segmentation.
Watershed Segmentation
It sounds like you have very specific requirements and have found a suitable method, so the following solution is for reference only.
The two methods I'm familiar with are watershed segmentation and grabcut segmentation.
Watershed Segmentation
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Remove background of photographic Image
That is relatively easy to add, via the Vector Lib. This though is one of the areas where a 32bit Canvas supporting transparency and layers would be more fun.It works not with scalings >100%
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
- netmaestro
- PureBasic Bullfrog
- Posts: 8433
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada