Libraryless. Click here for Pure Java version (8446L/49K).
1 | // f: (x, y) -> 0..255 |
2 | // TODO: optimize!! |
3 | static BWIntegralImage bwIntegralImageFromFunction(int w, int h default w, IF2_Int f) {
|
4 | byte[] pixels = new[w*h]; |
5 | int i = 0; |
6 | for y to h: |
7 | for x to w: |
8 | pixels[i++] = (byte) f.get(x, y); |
9 | ret BWIntegralImage(BWImage(w, h, pixels)); |
10 | } |
Began life as a copy of #1032161
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
| Snippet ID: | #1032468 |
| Snippet name: | bwIntegralImageFromFunction |
| Eternal ID of this version: | #1032468/3 |
| Text MD5: | 72ab647de6515dc0fe06e3181d14ddcb |
| Transpilation MD5: | b0fb9c52db2d06cddf0f720204cda21f |
| Author: | stefan |
| Category: | javax / imaging |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-10-11 14:23:07 |
| Source code size: | 298 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 379 / 491 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |