1 | sclass FaceFinderX1 extends F1<RGBImage, Rect> { |
2 | int width, y1, y2, deltaX1, deltaX2; |
3 | |
4 | public Rect get(RGBImage img) { |
5 | RGBImage img2 = rgbResize(img, width); |
6 | RGBImage img3 = rgbClipLineRange(img2, y1, y2); |
7 | float[] f = rgbImageColumnBrightnesses(img3); |
8 | int x = indexOfSmallestFloat(f); |
9 | ret rescaleRect_imageToImage(rectFromPoints(x+deltaX1, y1, x+deltaX2, y2), img2, img); |
10 | } |
11 | |
12 | toString { ret sfu(this); } |
13 | } |
download show line numbers debug dex old transpilations
Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019211 |
Snippet name: | FaceFinderX1 - just looks for a dark blob |
Eternal ID of this version: | #1019211/6 |
Text MD5: | a6ed18aec9960731493ab733c9b70443 |
Author: | stefan |
Category: | javax / image recognition |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-02-25 12:42:06 |
Source code size: | 448 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 372 / 906 |
Version history: | 5 change(s) |
Referenced in: | [show references] |