Skip to content

Commit

Permalink
if globalFMThr is not explicitly set in convenience function apply, t…
Browse files Browse the repository at this point in the history
…he value from FocusEstimation is the current one (default or set)
  • Loading branch information
flow79 committed Jan 11, 2017
1 parent 0211594 commit 403059d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/src/main/jni/FocusMeasure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,9 @@ namespace dsc {
fe.setWindowSize(ws);

fe.setImg(src);
fe.setGlobalFMThreshold(globalFMThr);

if (globalFMThr > 0) {
fe.setGlobalFMThreshold(globalFMThr);
}

////version 1
//fe.compute(dsc::FocusEstimation::FocusMeasure::LAPV);
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/jni/FocusMeasure.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ namespace dsc {
void setTextThrshold(double t);
double textThr() const;

static std::vector<dsc::Patch> apply(const cv::Mat& src, const double globalFMThr = 0.15);
static std::vector<dsc::Patch> apply(const cv::Mat& src, const double globalFMThr = -1.0);

protected:
cv::Mat mSrcImg;
Expand Down

0 comments on commit 403059d

Please sign in to comment.