Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue