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

5
LINES

< > BotCompany Repo | #1032073 // colorDistanceToProbability - for normalized colors only. should use (squared?) euclidean distance I guess

JavaX source code (desktop) - run with: x30.jar

Download Jar.

static double colorDistanceToProbability(RGB col1, RGB col2) {
  double sim = colorSimilarity(col1, col2), sqr = sqr(sim);
  //printFunctionCall colorDistanceToProbability(+col1, +col2, +sim, +sqr);
  ret sqr;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

-
Snippet ID: #1032073
Snippet name: colorDistanceToProbability - for normalized colors only. should use (squared?) euclidean distance I guess
Eternal ID of this version: #1032073/1
Text MD5: 9dd2a0d8829b53a88874bba1e6fb6d06
Author: stefan
Category: javax / imaging
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-11 11:51:47
Source code size: 215 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 197 / 377
Referenced in: