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

25
LINES

< > BotCompany Repo | #1019066 // Test HaarCascade_FaceDetector (Maven version of OpenIMAJ)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 91404K of libraries. Click here for Pure Java version (10171L/59K).

!7

//static LS _stickyLibs_HaarCascade_FaceDetector = ll(#1400140);

lib 1400140 // OpenIMAJ/faces

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())
      });
  }
}

p {
  pnl(new HaarCascade_FaceDetector().get(loadImage2(#1101409)));
}

Author comment

Began life as a copy of #1019065

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, iveijnkanddl, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

-
Snippet ID: #1019066
Snippet name: Test HaarCascade_FaceDetector (Maven version of OpenIMAJ)
Eternal ID of this version: #1019066/1
Text MD5: 8a493aeb1bfb1f3a1b2c6abf68ad06a6
Transpilation MD5: bd4ed508a85405a6ca05471f7e2d35ac
Author: stefan
Category: javax / image recognition
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-22 00:36:50
Source code size: 800 bytes / 25 lines
Pitched / IR pitched: No / No
Views / Downloads: 377 / 1006
Referenced in: