Libraryless. Click here for Pure Java version (4491L/26K).
1 | sclass IISingleColor extends Meta implements IIntegralImage { |
2 | int w, h; |
3 | int[] color; |
4 | |
5 | *() {} |
6 | *(int *w, int *h, int[] *color) {} |
7 | |
8 | public int getWidth() { ret w; } |
9 | public int getHeight() { ret h; } |
10 | |
11 | public double getIntegralValue(int x, int y, int channel) { |
12 | ret (x+1)*(y+1)*color[channel]; |
13 | } |
14 | |
15 | public BufferedImage getBufferedImage() { |
16 | ret newBufferedImage(getWidth(), getHeight(), toColor(color)); |
17 | } |
18 | } |
Began life as a copy of #1031964
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1032000 |
Snippet name: | IISingleColor - IIntegralImage filled with a single color |
Eternal ID of this version: | #1032000/3 |
Text MD5: | c2887c20835826d7c72a94c3afeff857 |
Transpilation MD5: | 8db2bd2628f9e4527ec1d2d6f92a2a31 |
Author: | stefan |
Category: | javax / image recognition |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-08-08 15:53:30 |
Source code size: | 453 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 164 / 305 |
Version history: | 2 change(s) |
Referenced in: | [show references] |