1 | sclass IICheckerBoard implements IIntegralImage { |
2 | int w = 256, h = 256; |
3 | double cols = 8, rows = 8; |
4 | RGB color1 = RGB(Color.black), color2 = RGB(Color.white); |
5 | |
6 | public int getWidth() { ret w; } |
7 | public int getHeight() { ret h; } |
8 | |
9 | public double getIntegralValue(int x, int y, int channel) { |
10 | double col = doubleRatio(x, w)*cols/2; |
11 | double row = doubleRatio(x, h)*rows/2; |
12 | double xlow = frac(col), ylow = frac(row); |
13 | ret rgbInt(color1, channel)*(ifloor(col)*.5 + ...) |
14 | } |
15 | } |
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: | 139 / 150 |
Referenced in: | [show references] |