Moodbar Distance

Overview

The Distance Function in this Module works with the following providers:

Technical Details:

The individual attributes are weighted and computes as following:

Name Weight Formula
diffsum 0.135 abs(v1 - v2) / 50
histogram 0.135 1.0 - sum(a - b for a, b in lefts, rights) / 5 * 255
dominant colors 0.63 len(common) / max(len(lefts), len(rights))
blackness 0.05 abs(v1 - v2) / 50
average min/max 0.05 abs(v1 - v2) / 255
  1.0  

Reference

class munin.distance.moodbar.MoodbarDistance(provider=None)[source]

Distance Function that compares two MoodbarDescriptions.

This class is supposed to be overriden, but can also be used as fallback.

__call__ is implemented as shortcut to compute()

Parameters:name (String.) – Name of the DistanceFunction (used for display)
do_compute(lefts, rights)[source]

Compute the distance between two moodbar desc

Only the first element in the individual lists is used.

Parameters:
  • lefts – Packed left moodbar description.
  • rights – Packed right moodbar description.

Table Of Contents

Related Topics

This Page

Useful links:

Package:

Github: