Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -1,5 +1,5 @@
fcn histogram(image){
hist:=List.createLong(256,0); // array[256] of zero
hist:=List.createLong(256,0); // array[256] of zero
image.data.howza(0).pump(Void,'wrap(c){ hist[c]+=1 }); // byte by byte loop
hist;
}
@ -8,7 +8,7 @@ fcn histogramMedian(hist){
left,right:=hist[from],hist[to];
while(from!=to){
if(left<right){ from+=1; left +=hist[from]; }
else { to -=1; right+=hist[to]; }
else { to -=1; right+=hist[to]; }
}
from
}