Ask Your Question
0

Auto cropping object in a image - iOS

asked 2013-03-12 02:07:54 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

Please help me to auto cropping objects in a image by finding its borders.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-03-12 07:11:11 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

First of all, your question is fairly vague. There is almost no information contained to actually point out where our help can be located inside your own project. This makes it very difficult to answer specific.

Considering you have to find an object and an image, and crop that actual image there are several steps you should take:

Locate the actual object in the input image

This can be done in several ways and it depend on what information you have available.

--> Do you know the actual object beforehand? Do you have a 2D or 3D model defining it's borders? Do you have a sequence of images from the object?

--> Possibilities here are object recognition (template matching) or object detection (cascade detector, SVM detector, random forest detector, ...)

Give us some more input here please...

Define the objects boundaries

Depending on knowing the actual borders, once locating the bounding box, you could cut out the sample that you have retrieved. You could use a mask to define the actual borders and only segment that specified range of interest.

Resize the object

Basic cropping functionality is possible by downsampling and basic image operations. Go through the OpenCV docs for this problems. http://docs.opencv.org/modules/imgproc/doc/imgproc.html

Basically, if you do not provide us with more information, we cannot help you.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-03-12 02:07:54 -0500

Seen: 1,228 times

Last updated: Mar 12 '13