for(int y=0; y<height; y++){
for(int x=0; x<width; x++){
if (abs(brightness(motionD[width*y+x])-brightness(get(x,y)))>20){
counter++;
}
motionD[width*y+x]=get(x,y);
}
}
println("Different"+counter);//number of differnt pix
counter=0;
}
///END
This program check the pixel every 10 second and if the brightnesses are significantly different this program return huge number.
It is possible to apply this program to detect a existence of human in front of static background.
0 件のコメント:
コメントを投稿