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

27
LINES

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

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 91404K of libraries. Click here for Pure Java version (14817L/102K).

1  
!7
2  
3  
//static LS _stickyLibs_HaarCascade_FaceDetector = ll(#1400140);
4  
5  
lib 1400140 // OpenIMAJ/faces
6  
7  
import org.openimaj.image.ImageUtilities;
8  
import org.openimaj.image.processing.face.detection.DetectedFace;
9  
import org.openimaj.image.processing.face.detection.HaarCascadeDetector;
10  
11  
sclass HaarCascade_FaceDetector extends F1<BufferedImage, L<RectAndConfidence>> {
12  
  new HaarCascadeDetector detector;
13  
  
14  
  public L<RectAndConfidence> get(BufferedImage img) {
15  
    if (img == null) null;
16  
    ret map(detector.detectFaces(ImageUtilities.createFImage(img)),
17  
      func(DetectedFace f) -> RectAndConfidence {
18  
        RectAndConfidence(openImajRectangleToRect(f.getBounds()), f.getConfidence())
19  
      });
20  
  }
21  
}
22  
23  
module HCFD > DynSingleFunctionWithPrintLog {
24  
  void doIt {
25  
    pnl(new HaarCascade_FaceDetector().get(loadImage2(#1101409)));
26  
  }
27  
}

Author comment

Began life as a copy of #1019063

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: #1019065
Snippet name: Test HaarCascade_FaceDetector (Maven version of OpenIMAJ)
Eternal ID of this version: #1019065/3
Text MD5: 317155f1701f3d06316051de4ed42687
Transpilation MD5: f75468ae09491997768a665f2a4128a0
Author: stefan
Category: javax / stefan's os
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-22 00:09:19
Source code size: 864 bytes / 27 lines
Pitched / IR pitched: No / No
Views / Downloads: 250 / 330
Version history: 2 change(s)
Referenced in: [show references]