horizontalpixelluminancevariationanalisis.lua 283 B

123456789101112131415
  1. wn=0;wo=0
  2. for y=0,height-1,1 do
  3. for x=0,width-1,1 do
  4. wo=wn;r,g,b=get_rgb(x,y);wn=(((b*11)+(r*30)+(g*59))/100)
  5. set_rgb(x,y,0,0,wn)
  6. if wn>wo then
  7. set_rgb(x,y,0,wn,0)
  8. end
  9. if wn<wo then
  10. set_rgb(x,y,wn,0,0)
  11. end
  12. end
  13. progress(y/height)
  14. end