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

22
LINES

< > BotCompany Repo | #1010060 // Test Felzenszwalb-Huttenlocher Segmenter [OK]

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

Uses 14971K of libraries. Click here for Pure Java version (4534L/31K/116K).

!7

lib 1010061 // OpenIMAJ feature extraction (1.3.5)
lib 1009074 // trove

import org.openimaj.image.segmentation.*;
import org.openimaj.image.pixel.*;

static float sigma = 0.5f;

// 2500 is pretty good
static float k = 2500f / 255f; // 5000f / 255f; // 20f / 255f; // 500f / 255f;

static int minSize = 50;

p {
  MBFImage image = readMBF(#1002132);
  FelzenszwalbHuttenlocherSegmenter segmenter = new(sigma, k, minSize);
  L<ConnectedComponent> components = segmenter.segment(image);
  print("Have " + n(components, "component"));
  showMBF(SegmentationUtilities.renderSegments(image, components));
}

Author comment

Began life as a copy of #1010058

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1010060
Snippet name: Test Felzenszwalb-Huttenlocher Segmenter [OK]
Eternal ID of this version: #1010060/15
Text MD5: 15b12dc293e10fa9c5518bfb8f69e3d0
Transpilation MD5: 1b15009a04cb2557f121cefaac2d958a
Author: stefan
Category: javax / imaging
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-01 20:55:20
Source code size: 626 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 289 / 390
Version history: 14 change(s)
Referenced in: [show references]