Transpiled version (8435L) is out of date.
1 | static BWIntegralImage blendBWIntegralImages(Cl<? extends IIntegralImage> images) {
|
2 | if (empty(images)) null; |
3 | var img1 = first(images); |
4 | int nImages = l(images); |
5 | int w = img1.getWidth(), h = img1.getHeight(), n = w*h; |
6 | double[] pixels = new[w*h]; |
7 | for (var img : images) {
|
8 | int i = 0; |
9 | for y to h: |
10 | for x to w: |
11 | pixels[i++] += img.getPixel(x, y, 0); |
12 | } |
13 | |
14 | byte[] bytes = new[n]; |
15 | double inv = 1.0/nImages; |
16 | for i to n: bytes[i] = clampToUByte(iround(pixels[i]*inv)); |
17 | |
18 | ret new BWIntegralImage(BWImage(w, h, bytes)); |
19 | } |
Began life as a copy of #1019595
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
| Snippet ID: | #1032501 |
| Snippet name: | blendBWIntegralImages |
| Eternal ID of this version: | #1032501/6 |
| Text MD5: | fec5eec6bf95303ea5a78399581e0472 |
| Author: | stefan |
| Category: | javax / imaging |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-09-11 16:50:31 |
| Source code size: | 569 bytes / 19 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 379 / 492 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |