Can I get foreground image removed background from sprite??

I want to get a image removed background from sprite like below.

Remove the background of a picture

Is there any way to get a image removed background from sprite in cocos creator??


Can you share the third party library or image processing algorithms you said??
I want to use ‘removed background function’ in cocos creator.

Sorry, this is beyond my competence, you can ask others

有点难,shader层面可能可以,例如 判断颜色值?discard?


Yes right. I want to know how to judge foreground area and background area.
And is there any way to do that by cocos creator?


OK. Thank you. If you get the algorithm to distinguish , share it, please.