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

19
LINES

< > BotCompany Repo | #1019193 // Show Marked Faces Pixelated [OK]

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

Download Jar. Libraryless. Click here for Pure Java version (11580L/83K).

!7

static int width = 8;

p-exp {
  new L<BufferedImage> images;
  for (File f : listImageFiles(ai_markedFacesDir())) {
    BufferedImage img = loadImage2(f);
    Rect face = unstruct(getFileInfoField(f, "Face position"));
    if (face == null) continue;
    BufferedImage img2 = scaleImageToWidth(img, width);
    Rect face2 = rescaleRect_imageToImage(face, img, img2);
    BufferedImage img3 = scaleImage_noSmooth(img2, 128.0/img2.getWidth());
    Rect face3 = rescaleRect_imageToImage(face2, img2, img3);
    drawRect(img3, face3, Color.white);
    images.add(img3);
  }
  showImage(mergeBufferedImagesVertically(images));
}

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: #1019193
Snippet name: Show Marked Faces Pixelated [OK]
Eternal ID of this version: #1019193/4
Text MD5: 53c0eec30b9f3ef3a0f69e85af666a17
Transpilation MD5: 3a253e0dbed8262339915ac9cfc95206
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-27 14:46:22
Source code size: 646 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 517 / 1047
Version history: 3 change(s)
Referenced in: [show references]