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

16
LINES

< > BotCompany Repo | #1034042 // g22_runPostAnalysisLeftArrowScript

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

Libraryless. Click here for Pure Java version (26975L/164K).

svoid g22_runPostAnalysisLeftArrowScript(Gazelle22_ImageToRegions itr,
  GazelleV_LeftArrowScript.Script script) {
  if (script == null) ret;
  
  // def score region { ... }
  
  var fScore = script.getFunction("score");
  if (fScore != null) {
    L<IImageRegion<BWImage>> regions = itr.regions.regions();
    int n = l(regions);
    new Map<IImageRegion<BWImage>, Double> scores;
    for (region : regions)
      scores.put(region, toDouble(fScore.call(null, region)));
    itr.scoredRegions = mapSortedByValue(scores);
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034042
Snippet name: g22_runPostAnalysisLeftArrowScript
Eternal ID of this version: #1034042/8
Text MD5: 760aed1b7925db91561ac82fb449a48d
Transpilation MD5: cefec1fa3c0fa65397c12dedddd92fc6
Author: stefan
Category: javax / gazelle 22
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-29 10:31:15
Source code size: 543 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 155 / 268
Version history: 7 change(s)
Referenced in: [show references]