1 | sclass FaceFinderByPictures1 extends F1<RGBImage, Rect> { |
2 | int width; |
3 | L<RGBImage> pictures; |
4 | float similarity = 0.8f; |
5 | |
6 | *() {} |
7 | *(int *width, L<RGBImage> *pictures) {} |
8 | |
9 | public Rect get(RGBImage img) { |
10 | RGBImage img2 = rgbResize(img, width); |
11 | FoundImg found = rgbRawSingleImageSearch_multiplePatterns(img2, pictures, similarity); |
12 | //if (found != null) print("Found: " + found); |
13 | ret rescaleRect_imageToImage(foundImgToRect(found), img2, img); |
14 | } |
15 | |
16 | public FoundImgPlus<RGBImage> getPlus(RGBImage img) { |
17 | RGBImage img2 = rgbResize(img, width); |
18 | FoundImgPlus<RGBImage> found = rgbRawSingleImageSearch_multiplePatterns_plusImage(img2, pictures, similarity); |
19 | //if (found != null) print("Found: " + found); |
20 | if (found != null) found.r = rescaleRect_imageToImage(found.r, img2, img); |
21 | ret found; |
22 | } |
23 | |
24 | toString { ret "FaceFinderByPictures1(" + width + ", " + n2(l(pictures), "image") + ", similarity=" + similarity + ")"; } |
25 | } |
Began life as a copy of #1019211
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: | #1019528 |
Snippet name: | FaceFinderByPictures1 - works on RGBImage, searches for patterns by raw scan |
Eternal ID of this version: | #1019528/10 |
Text MD5: | e4bc6aa7fc214e9a75214e653d5a9e36 |
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:39:15 |
Source code size: | 986 bytes / 25 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 322 / 875 |
Version history: | 9 change(s) |
Referenced in: | [show references] |