The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 size analysing of mosaic image
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

carsten

Switzerland
78 Posts

Posted - 02/15/2011 :  08:26:13 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver.8 and Service Release 5 (Select Help-->About Origin):
Operating System: XP

Is it possible to evaluate the size distribution of areas of a mosaic image which consist of irregular curved areas (e.g. blue) with surrounded by white lines? The result should be displayed as a histogram of different area sizes vs counts (for a given bin).

If yes how can I do this?

Thanks in advance


greg

USA
1378 Posts

Posted - 02/16/2011 :  3:28:36 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
There are some additions in 8.1 and 8.5 that make this type of analysis possible. Specifically, contour plots in 8.1 added a context menu to extract contour lines as data, and 8.5 added a polyarea function.

So to do this in 8.5 ...
(1) Import the image.
(2) Use the Image : Conversion : Threshold function to clean up the image a bit(an Upper Bound of 160 seemed to work well).
(3) Plot the image as a Color Contour.
(4) Set the color Levels to 1 and adjust the Z value to get a clean separation of image and background (4.2E4 seemed to work well).
(5) Right-click on the plot and choose Extract Contours.

The first two columns are just the boundary of the contour plot while the next two columns contains the contour data which will be separated by missing values for each contour set which in this case means each 'blob' in the image.

The above can be done in 8.1. The rest requires 8.5:

(6) Run this script
// BEGIN SCRIPT
double MyArea;
int iStart = 1;
int iRow = 1;
wks.Addcol(Area);
range ra = col(4);
loop(idx,1,ra.GetSize())
{
if(ra[idx] == 0/0)
{
iEnd = idx - 1;
polyarea iy:=(3,4)[iStart:iEnd] type:=1 area:=MyArea;
col(Area)[iRow] = MyArea;
iStart = idx + 1;
iRow++;
}
}
range raO = col(Area);
ty $(rao.GetSize()) objects found with total area $(total(raO));
// END SCRIPT
(7) Plot a Histogram of the Area column
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000