How do make an automatic cropping for the interest area in MATLAB? - matlab

I'm the beginner of image processing by using MATLAB and i have to do some tasks, i want to crop or cut for the specific area like using imcrop but want to make it automatic (i cannot upload picture because i'm the new user, the picture that i use is the cross-section of a plant) i really don't know how to detect and cut out only that area. I'll really appreciate if there's someone can help me to figure out this problem.

You need to give us more information. If you want to automate the detection of a part of an image to crop it, you need to do some image processing. What kind will depend on the characteristics of your images and the part you want to crop.
You can post an image using, for example, http://www.postimage.org/

Related

How can clearly show image in Matlab?

I want show large image in Matlab gui, but when show my image not clearly and not possible for read. for example show my image in Matlab in follow.
Any way show my image like this image?
I know can use zoom in and zoom out, but image in first should clearly.
You can use InitialMagnification to preview the image at your native resolution. If your concern is getting a nice looking zoomed-out image, you can try using reduce parameter of imshow to sub sample it.

Extracting measurements from a finger via ROI and image processing MATLAB

I am trying to do a number of things via MATLAB but I am getting a bit lost with what techniques to use. My ultimate goal is to extract various measurements from a users fingerprint presentation, e.g. how far the finger over/undershoots, the co-ordinates of where the finger enters, the angle of the finger.
In my current setup, I have a web camera recording footage of a top down view of the presentation which I then take the video file and break down into individual frames. https://www.dropbox.com/s/zhvo1vs2615wr29/004.bmp?dl=0
What I am trying to work on at the moment is using ROI based image processing to create a binary mask around the edges of the scanner. I'm using the imbw function to get a binarised image and getting this as a result. https://www.dropbox.com/s/1re7a3hl90pggyl/mASK.bmp?dl=0
What I could use is some guidance on where to go from here. I want to be able to take measurements from the defined ROI to work out various metrics e.g. how far a certain point is from the ROI so I must have some sort of border for the scanner edges. From my experience in image processing so far, this has been hard to clearly define. I would like to get a clearer image where the finger is outlined and defined and the background (i.e. the scanner light/blocks) are removed.
Any help would be appreciated.
Thanks

Human Detection using edge detection

I am trying to detect exact silhouette of human body in this dataset using background subtraction. After doing some thresholding I was getting split blobs so I looked at this tutorial by Steve but now I am getting blob other that human body as shown below
So here is the original
After Subtracting it from background, background was considered as the first frame of the video, so after subtracting it from orignal image I get the following image
so I did basic thresholding and I get the following image, which is split from further areas
and using Steve's method I get this
But this contains a lot of area which is not a part of human body, any suggestion if somehow or using edges I can get good blob of human body.
EDIT
As #lennon310 asked me to upload color image so here it is
and as #NKN asked me to upload edge information of the same image so here it is
Instead of literally subtracting the background, try using the vision.ForegroundDetector object, which is part of the Computer Vision System Toolbox. It implements the mixture-of-gaussians adaptive background modeling, and it may give you a cleaner segmentation.
Having said that, it is very unlikely that you will get the "exact" silhouette. Some error is inevitable.
In your result image, you have tow types of black regions. one is moving and the other is stationary.
So when you you want to fill the human body, you have to choose only the moving region, for this purpose, I suggest to segment your image by adding optical flow technique to know where the moving regions are.
This is an interesting tutorial doing what you need to do:
http://docs.opencv.org/trunk/doc/py_tutorials/py_video/py_lucas_kanade/py_lucas_kanade.html

Copy face from Image

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.

How to draw an image according to the pixels of another image?

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.