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).

1  
svoid g22_runPostAnalysisLeftArrowScript(Gazelle22_ImageToRegions itr,
2  
  GazelleV_LeftArrowScript.Script script) {
3  
  if (script == null) ret;
4  
  
5  
  // def score region { ... }
6  
  
7  
  var fScore = script.getFunction("score");
8  
  if (fScore != null) {
9  
    L<IImageRegion<BWImage>> regions = itr.regions.regions();
10  
    int n = l(regions);
11  
    new Map<IImageRegion<BWImage>, Double> scores;
12  
    for (region : regions)
13  
      scores.put(region, toDouble(fScore.call(null, region)));
14  
    itr.scoredRegions = mapSortedByValue(scores);
15  
  }
16  
}

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: 156 / 269
Version history: 7 change(s)
Referenced in: [show references]