如何去除iphone应用程序中的图像背景? [英] How to remove the background of image in iphone app?

查看:57
本文介绍了如何去除iphone应用程序中的图像背景?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我正在创建的应用程序中,我需要删除图像的背景,但图像中的人物或人物除外.我搜索了很多链接,但没有找到任何相关信息.

In the app that I am creating, I need to remove the background of the image except for the people or person in the image. I have searched many links, but i didn't find any relevant information .

例如:女孩应该是可见的,不包括自然背景.

For eg : Girl should be visible excluding the nature background.

任何人都可以向我提供一些关于这是否可能的信息吗?

Can anyone please provide me some information regarding this as whether is it possible ?

提前致谢

推荐答案

注意:1. 如果你有另一个带有 backgroundImage 的 UIImageView 然后使用波纹管逻辑

Note:1. If you have Another UIImageView with backgroundImage then use bellow logic

当你想要裁剪图像时,只需使用以下代码隐藏该背景图像..

When you want to Cropped Image at that time just hide that backgroundImage with this bellow code..

    [yourBackgroundImage setHidden:YES];

在使用 bezierPath 编写裁剪图像的代码之前编写此代码,之后如果您想再次显示该 backGroundImage 则使用以下代码显示它..

write this code before you write code of Cropped image with bezierPath, After if you want to display that backGroundImage Again then Display it with bellow code..

    [yourBackgroundImage setHidden:NO];

2. 如果你想删除内置的背景图片,那么使用 OpenCV..

2. If you want to Remove inbuilt BackgroundImage then use OpenCV..

在这里看一些例子可能你会得到一些对你有帮助的东西...... 此链接

see some example here may be you get something which is helpful to you... This Link

希望这个回答对你有帮助..

i hope this answer helpful to you..

:)

这篇关于如何去除iphone应用程序中的图像背景?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆