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

24
LINES

< > BotCompany Repo | #1019054 // HaarCascade_FaceDetector

JavaX fragment (include) [tags: use-pretranspiled]

Uses 21723K of libraries. Click here for Pure Java version (4234L/24K).

!include once #1010056 // OpenIMAJ
import java.awt.Image;

static LS _stickyLibs_HaarCascade_FaceDetector = ll(#1009014, #1009015, #1009016);

lib 1009014 // processing.face
lib 1009015 // object detection
lib 1009016 // xpp (xmlpull implementation) for the above

import org.openimaj.image.ImageUtilities;
import org.openimaj.image.processing.face.detection.DetectedFace;
import org.openimaj.image.processing.face.detection.HaarCascadeDetector;

sclass HaarCascade_FaceDetector extends F1<BufferedImage, L<RectAndConfidence>> {
  new HaarCascadeDetector detector;
  
  public L<RectAndConfidence> get(BufferedImage img) {
    if (img == null) null;
    ret map(detector.detectFaces(ImageUtilities.createFImage(img)),
      func(DetectedFace f) -> RectAndConfidence {
        RectAndConfidence(openImajRectangleToRect(f.getBounds()), f.getConfidence())
      });
  }
}

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: #1019054
Snippet name: HaarCascade_FaceDetector
Eternal ID of this version: #1019054/9
Text MD5: 60e449cce347fb9f0a803fd7e5942467
Transpilation MD5: edcc9b2f50ed8b4724cabb39983635ab
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-09 18:32:44
Source code size: 891 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 380 / 987
Version history: 8 change(s)
Referenced in: #1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674)