11 lines
399 B
Plaintext
11 lines
399 B
Plaintext
:HISTOGRAM:
|
|
#30 = Buf_Free // #30 = buffer to store histogram data
|
|
for (#9=0; #9<256; #9++) {
|
|
Out_Reg(21) TC(#9) Out_Reg(Clear) // @21 = intensity value to be counted
|
|
Buf_Switch(#15) // switch to image buffer
|
|
#8 = Search(@21, CASE+BEGIN+ALL+NOERR) // count intensity values
|
|
Buf_Switch(#30) // switch to histogram buffer
|
|
Num_Ins(#8, FILL) // store count
|
|
}
|
|
Return
|