darrenlafreniere / lafarren-image-completer

Implementation of the research titled: "Image Completion Using Efficient Belief Propagation via Priority Scheduling and Dynamic Pruning"
http://www.lafarren.com/image-completer/
GNU General Public License v3.0
32 stars 18 forks source link

Automatically compute "acceptable" difference #57

Open daviddoria opened 13 years ago

daviddoria commented 13 years ago

In Settings.cpp lines 79-83, there are some settings specific to RGB patches. Can these be computed somehow rather than hardcoded? Maybe pick some random patches and compare them?

I don't understand this comment: "an acceptable component difference (between 0.0 and 1.0)" - Is this because the component difference is computed as a FloatImage class?

const float ssd0ComponentAcceptableDiff = 0.15f; Is this like "15%"?

darrenlafreniere commented 13 years ago

For the first question, this: 3 * ssd0ComponentDiffSq

would just have to be changed to this: Image::Pixel::NUM_CHANNELS:: * ssd0ComponentDiffSq

For the second question, yes that is a percentage. That math is unrelated to the ImageFloat class; ssd0ComponentAcceptableDiff is a percentage that's multiplied by 255 on the very next line.