I'm producing a lot of crystals with needle-like shape. Currently, I used optical microscope to manually measure the length and the width of the crystals. Can MATLAB do this task?
An easy way method would be to get coordinates of the crystal end points using your mouse, then calculate the distance of the end points. Take a look at the ginput(...) function in Matlab.
I think he wants to do this in a automated fashion.
You'll need to use the image processing toolbox. There are many papers though on shape and size recognition of crystals via optical imaging. One of the algorithms in there will likely help you. Check out papers on the subject by Gilles Fevotte.
I have a quick fix for you. Just in case you have not solved your problem. I see you have a scale on the picture. Now, I have measured your scale with image processing toolbox and found that 500 microns is represented by 243 pixels or 1 pix=2.058 microns. You know pixels are both a length and area measurement. From your picture I can see three crystals of different sizes:
The problem is not yet solved. Thank you for calculating the size of crystals for that particular image. I just downloaded a few notes on the image processing toolbox in Matlab. Right now, i feel lost. Can you advise me on how to get started especially for a beginner?
Hey! Do you still have this problem? I had your problem a couple weeks ago but I managed to figure it out. For now, here are a couple of links that I used to solve mine:
(Make sure to adjust parameters in the example below, so that the program selects the top left of your image, where your scale bar is.)
https://www.ocf.berkeley.edu/~mikeck/?p=512
(Answer by Divakar, to measure the length of your scale bar in each image)
I hope this helps! If not for another who stumbled upon this thread.
For Matlab advice: treat all variables as a matrix, because that's what they are in the program. That means that something like Original(:,:,:) [where Original is an image] refers to the values of (row, column, ??) of the image matrix, which are effectively the coordinates of the picture. I'm not sure what the last parameter is to be honest, I'm relatively new to Matlab as well.