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

https://support.microsoft.com/en-us/office/remove-the-background-of-a-picture-c0819a62-6844-4190-8d67-6fb1713a12bf

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?

这功能类似photoshop的抠图

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?

这个和cocos没关系了,完全是图形算法方面的问题。你可以通过cocos拿到图片的ARGB点阵,然后自己去学一个算法,来进行分辨。然后回来分享给大家。

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