I am using this image. I would like to have only the human part from this image. I don't want the background of this image.
How to do this? Any logic, links or the best and simple way?
here is the thing i want Link but i want this in objective c
There is no easy and fast way to satisfy your requirements. For the beginning you can learn how to detect objects in OpenCV.
After this you can check haarcascade_fullbody.xml from OpenCV sources. This cascade is for detecting bodies, open it in text editor, there is additional information in header.
Anyway, I'm not sure that existing cascade is too accurate for your needs.
From iOS5 and above you can user face detection API. By using FaceDetection APi you can easily find the face of the person. For reference and sample code here is the link.
All the best !!!
For ios5.1+, using a CIDetector and CIFaceFeature class can be easily face recognition.
Body recognition, is you will need to use opencv library. Not yet supported by apple.
Have a look at this: http://niw.at/articles/2009/03/14/using-opencv-on-iphone/en
Cropping an image in iOS using OpenCV face detection
Related
I'm a noob to this forum, but wanted to give it a try.
I'm currently learning Objective-C and Cocoa; trying to build my first iPhone app.
One thing I'm working on is allowing the user to cut his/her face from an image they have taken and paste it into another image. (The idea is cut from one image and paste into another image with a spot for a face to go.)
How can this be done? I am thinking I would allow the user to just touch and drag over their face, in the shape of a rectangle, and then allow them to copy.
Thanks for the help.
Ok, nevertheless your bit arrogant style of asking, here are some guidelines about how to start: generic obj-c/iOS development (start from hello world); UIImage class; camera API; image processing algorithms, face detection algorithms. Go on gradually and do not wish to resolve all problems at once. Write first an application that simple loads an arbitrary photo and shows it to the user. Then modify it that you can crop a specified rectangular area from the image and save it into the new file. Then write an app that switches on the camera that you can take an image and save it to the disk. Then unite what you wrote that you save only a cropped area of the captured image.
When you arrive to this point, you will know much more about software development image handling. AFTER THIS you can start looking for image processing algorithms. Start also here with something simple like a trivial blur filter or similar implemented by you. If you know already a bit of image processing, search for face detection algorithms on the net. It is even possible that you will find some ready framework that includes also these features, or at least you will understand the concepts. You can even come back here to stack overflow and ask for suggestions about a good face detection algorithms, however we still prefer if you have chosen already one and have some concrete issue with it.
I have been making an iPhone App where I need to identify and decompose different shapes(e.g Wall, Chair, Book, etc..) in UIImageView's image and change their color. So far I have implemented code to allow user to select color and apply it to selected area (pixel base) using gesture recogniser but what I am looking for is far more than what I have done!
Is it posible to detect the different shapes available in given image and change their color?
Thanks.
whatever algorithm you use, you should place it on top of one of the best frameworks for computer Vision, open CV for iOS
then you might check other projects in other languages that do this image segmentation using open cv, and with the theory may be roll your own solution ;)
good luck
Object recognition and detection is a very wide topic in computer science and, as far as I know, is not supported by UIImage's public methods. I think you have a long way to go in order to achieve your goal. Try and look up any open source iOS projects that handle object detection or maybe even look into non-native libraries that have iOS wrappers, such as openCV. Good luck, don't give up.
Hello Everyone i am a new to openCV for iPhone and i want to recognize different objects inside any image like pen, pencil, balloon, car, bike etc....
So is it possible ? or is there any tutorial or perfect guide for the same?
Thanks in advance.
Here you find a good resource for learning opencv
http://opencv.willowgarage.com/wiki/OpenCVBooks
You can consider using pattern matching. but then you need a pattern for each object you want to detect, and the pattern matching ist not orientation-invariant. so your pattern only works for object that have the same rotation in the image. of course you could rotate that pattern and perform patternmatching again. but that's quite computative expensive.
so another approach is blob detection,
check out http://opencv.willowgarage.com/wiki/cvBlobsLib
and watch some videos on youtube on "blob detection opencv example", you will find many examples that show what it does. with blob detection you can identify where different objects are but not if it is a pencil, or a ballon ;)
HI all ,what i want is to map the images.Suppose i have two images of persons,one is of fat person and another is of weak person,Now i want to match their faces ,eyes.I want to increase or decrease the face size eye size of one image according to another.As you can see in adobe photoshop you can make the face fat,make it squueze.I want to do the image manuplation in this.These types of operations i want to implement.I don't know from where to start.
Pleas guide and help me.Can i perform all this with core graphics if so then how
Any reference,tutorial address ,sample code ........appreciated.
You are probably going to have to deal with some sort of edge detection and face recognition algorithms, at the very least, if this is to be accomplished automatically. Otherwise, if the user is going to be resizing one image to match the other, this will require simple resizing operations driven by perhaps user pinch & gestures.
UPDATE:
For manual resizing:
Download the source code for the great book Cool iPhone Projects. One of the projects is called 'Touching'. This project contains code that accomplishes what you need: pinch and zoom functionality.
I have to select any particular object visible in my image on i-phone.
Basically my project is to segment image objects on the basis of my touch.
The method I am following is to first detect contours of the image and then select a particular sequence based on finger touch.
Is there any other method which would be more robust because I have to run it on video frames?
I am using OpenCV and iphone for the project.
PLease help if there is any other idea which has been implemented or is feasible to implement.
Have you looked at SIFT or SURF implementations? They both track object features and are resilient (to a certain degree) to rotation, translation and scale.
Also check out FAST which is a corner detection algorithm which might help you, they have an app on the app store showing how quick it is too.