int maxDelta=50; | |
for(int i=0;i<1279;++i) | |
{ | |
for(int j=0;j<1023;++j) | |
{ | |
if(abs(pixels[i+1][j]-pixels[i][j])>maxDelta) | |
{ | |
alarm(i,j); | |
} | |
if(abs(pixels[i][j+1]-pixels[i][j])>maxDelta) | |
{ | |
alarm(i,j); | |
} | |
} | |
} | |
for(int i=0;i<1279;++i) | |
{ | |
if(abs(pixels[i+1][1023]-pixels[i][1023])>maxDelta) | |
{ | |
alarm(i,j); | |
} | |
} | |
for(int j=0;j<1023;++j) | |
{ | |
if(abs(pixels[1280][j+1]-pixels[1280][j])>maxDelta) | |
{ | |
alarm(i,j); | |
} | |
} |
SpaceApps is a NASA incubator innovation program.