Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

22
LINES

< > BotCompany Repo | #1019555 // EyebrowFinder1

JavaX fragment (include)

sclass EyebrowFinder1 extends F1<RGBImage, RectAndState> {
  F1<RGBImage, Rect> faceFinder;
  int width;
  LPair<RGBImage, S> pictures; // with state
  
  *() {}
  *(F1<RGBImage, Rect> *faceFinder, int *width, LPair<RGBImage, S> *pictures) {}

  public RectAndState get(RGBImage img) {
    Rect face = faceFinder.get(img);
    if (face == null) null;
    RGBImage faceImage = rgbClip(img, face);
    RGBImage img2 = rgbResize(faceImage, width);
    FoundImgPlus<S> found = rgbRawSingleImageSearch_multiplePatterns_states(img2, pictures, 0.8f);
    //if (found != null) print("Found: " + found);
    if (found == null) null;
    ret RectAndState(
      translateRect(face.x, face.y, rescaleRect_imageToImage(foundImgToRect(found), img2, faceImage)), found.data);
  }
  
  toString { ret "EyebrowFinder1(" + faceFinder + ", " + width + ", " + n2(l(pictures), "image") + ")"; }
}

Author comment

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: 186 / 725
Version history: 2 change(s)
Referenced in: [show references]