sclass IICheckerBoard implements IIntegralImage { int w = 256, h = 256; double cols = 8, rows = 8; RGB color1 = RGB(Color.black), color2 = RGB(Color.white); public int getWidth() { ret w; } public int getHeight() { ret h; } public double getIntegralValue(int x, int y, int channel) { double col = doubleRatio(x, w)*cols/2; double row = doubleRatio(x, h)*rows/2; double xlow = frac(col), ylow = frac(row); ret rgbInt(color1, channel)*(ifloor(col)*.5 + ...) } }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1032070 |
Snippet name: | IICheckerBoard [dev.] |
Eternal ID of this version: | #1032070/1 |
Text MD5: | 9f7ec37a3500d362956fc062b091d024 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-08-11 11:39:00 |
Source code size: | 509 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 138 / 148 |
Referenced in: | [show references] |