问题
贵金属纳米颗粒如纳米金和纳米银
在暗场显微镜下
具有特定颜色的散射光斑
其颜色类型与纳米颗粒的大小,形貌以及聚集状态相关
现在获得了大量暗场细胞图像
细胞存在较高的背景
如何从这样的图像中对粒子进行统计分析
代码实现
因为时间关系,直接上代码,以后再细讲
/*
* count particles automatically
*/
//global parameters------
hue_blue = 300;
hue_green = 160;
hue_yellow = 65;
dot_k = 10;
p_noise = 20;
//functions------
function mark(){
type = newArray("monomer","dimer","polymer");
Dialog.create("mark it!");
for(i=0;i<lengthOf(type);i++){
Dialog.addNumber(type[i], 0);
}
Dialog.setLocation(900,200);
Dialog.show();
res = newArray(lengthOf(type));
for(i=0;i<lengthOf(type);i++){
res[i] = Dialog.getNumber();
}
return res;
}
function drawmap(map,title,width,height){
n = sqrt(lengthOf(map));
newImage(title,"RGB black",width,height,1);
n_width = width/n;
n_height = height/n;
for(i=0;i<n;i++){
for(j=0;j<n;j++){
x = i*n_width;
y = j*n_height;
c = map[i*n+j];
setColor(30*c,0,0);
fillRect(x,y,n_width,n_height);
setColor(180,180,180);
drawRect(x,y,n_width,n_he