1 | static double colorDistanceToProbability(RGB col1, RGB col2) { |
2 | double sim = colorSimilarity(col1, col2), sqr = sqr(sim); |
3 | //printFunctionCall colorDistanceToProbability(+col1, +col2, +sim, +sqr); |
4 | ret sqr; |
5 | } |
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: | 196 / 377 |
Referenced in: | [show references] |