1 | sclass EyebrowFinder1 extends F1<RGBImage, RectAndState> { |
2 | F1<RGBImage, Rect> faceFinder; |
3 | int width; |
4 | LPair<RGBImage, S> pictures; // with state |
5 | |
6 | *() {} |
7 | *(F1<RGBImage, Rect> *faceFinder, int *width, LPair<RGBImage, S> *pictures) {} |
8 | |
9 | public RectAndState get(RGBImage img) { |
10 | Rect face = faceFinder.get(img); |
11 | if (face == null) null; |
12 | RGBImage faceImage = rgbClip(img, face); |
13 | RGBImage img2 = rgbResize(faceImage, width); |
14 | FoundImgPlus<S> found = rgbRawSingleImageSearch_multiplePatterns_states(img2, pictures, 0.8f); |
15 | //if (found != null) print("Found: " + found); |
16 | if (found == null) null; |
17 | ret RectAndState( |
18 | translateRect(face.x, face.y, rescaleRect_imageToImage(foundImgToRect(found), img2, faceImage)), found.data); |
19 | } |
20 | |
21 | toString { ret "EyebrowFinder1(" + faceFinder + ", " + width + ", " + n2(l(pictures), "image") + ")"; } |
22 | } |
Began life as a copy of #1019528
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: | #1019555 |
Snippet name: | EyebrowFinder1 |
Eternal ID of this version: | #1019555/3 |
Text MD5: | 902962068aef407e5a458bdce9bb8aa5 |
Author: | stefan |
Category: | javax / image recognition |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-11-12 01:12:17 |
Source code size: | 897 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 264 / 802 |
Version history: | 2 change(s) |
Referenced in: | [show references] |