2

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.

Girl with the background

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

Thanks in advance

Sahara Pune
  • 129
  • 2
  • 9

1 Answers1

2

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];

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. 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..

:)

Paras Joshi
  • 20,427
  • 11
  • 57
  • 70
  • Both the girl and the nature are in the same image, how will i differentiate the girl from nature? – Sahara Pune May 24 '13 at 05:31
  • 1
    @SaharaPune There isn't an easy way to do what you want in an iOS app, that requires something like Photoshop – Eric Amorde May 24 '13 at 05:33
  • yes right @EricAmorde it is possible that you can change some hue or colors of Images with EgleView or Quart2d but it is hard to remove its inbuilt background Image i will post code if i got it.. – Paras Joshi May 24 '13 at 05:35
  • any other idea sir remove colourful background please let me know how to possible – Ramani Hitesh Mar 16 '18 at 04:22
  • @RamaniHitesh To set the black background of the image or set shadow on the image like some image editing app is doing, you can do it using GPUImage SDK. You can set different type of filters on the image and maybe it will near to work for you. You can set filters like Black&White, Hue, Vintage, etc... – Paras Joshi Mar 16 '18 at 05:34
  • it right but GPUImage sdk only black, white one color background image crop not colourful background! – Ramani Hitesh Mar 16 '18 at 05:50
  • it use gpuimage sdk my project – Ramani Hitesh Mar 16 '18 at 05:51
  • There is also some filters are available on which user can taps on the image and else part of that touch are will be blur or signout with the color. The Blur filter and other like these filters are there. You can check the details from thjis link. https://github.com/BradLarson/GPUImage. – Paras Joshi Mar 16 '18 at 06:04