BING bb sorting modified and SuBSENSE compiling error fixed

pull/39/head
jaco 11 years ago
parent 88bae7be36
commit 4e478bc0b3
  1. 10
      modules/saliency/src/BING/objectnessBING.cpp
  2. 6
      modules/saliency/src/SuBSENSE/BackgroundSubtractorLBSP.cpp
  3. 7
      modules/saliency/src/SuBSENSE/BackgroundSubtractorLBSP.h

@ -177,9 +177,9 @@ void ObjectnessBING::predictBBoxSII( ValStructVec<float, Vec4i> &valBoxes, const
valBoxes( i ) = valBoxes( i ) * svmIIw[0] + svmIIw[1];
}
//valBoxes.sort();
// Ascending order. At the top there are the values with lower
// values of objectness, ie more likely to have objects in the their corresponding rectangles.
valBoxes.sort( false );
// Descending order. At the top there are the values with higher
// values, ie more likely to have objects in the their corresponding rectangles.
valBoxes.sort( true );
}
// Get potential bounding boxes, each of which is represented by a Vec4i for (minX, minY, maxX, maxY).
@ -481,8 +481,8 @@ bool ObjectnessBING::computeSaliencyImpl( const InputArray image, OutputArray ob
ValStructVec<float, Vec4i> finalBoxes;
getObjBndBoxesForSingleImage( image.getMat(), finalBoxes, 250 );
// List of rectangles returned by objectess function in ascending order.
// At the top there are the rectangles with lower values of objectness, ie more
// List of rectangles returned by objectess function in descending order.
// At the top there are the rectangles with higher values, ie more
// likely to have objects in them.
vector<Vec4i> sortedBB = finalBoxes.getSortedStructVal();
Mat( sortedBB ).copyTo( objBoundingBox );

@ -25,9 +25,9 @@ void BackgroundSubtractorLBSP::initialize(const cv::Mat& oInitImg) {
this->initialize(oInitImg,std::vector<cv::KeyPoint>());
}
cv::AlgorithmInfo* BackgroundSubtractorLBSP::info() const {
return nullptr;
}
//cv::AlgorithmInfo* BackgroundSubtractorLBSP::info() const {
// //return nullptr;
//}
void BackgroundSubtractorLBSP::getBackgroundDescriptorsImage(cv::OutputArray backgroundDescImage) const {
CV_Assert(LBSP::DESC_SIZE==2);

@ -1,7 +1,7 @@
#pragma once
#include <opencv2/features2d.hpp>
#include <opencv2/video/background_segm.hpp>
//#include <opencv2/video/background_segm.hpp>
#include "LBSP.h"
/*!
@ -13,7 +13,8 @@
This algorithm is currently NOT thread-safe.
*/
class BackgroundSubtractorLBSP /* : public cv::BackgroundSubtractor */ {
class BackgroundSubtractorLBSP /* : public cv::BackgroundSubtractor */
{
public:
//! full constructor
BackgroundSubtractorLBSP( float fRelLBSPThreshold, size_t nDescDistThreshold, size_t nLBSPThresholdOffset = 0 );
@ -26,7 +27,7 @@ public:
//! primary model update function; the learning param is used to override the internal learning speed (ignored when <= 0)
virtual void operator()( cv::InputArray image, cv::OutputArray fgmask, double learningRate = 0 )=0;
//! unused, always returns nullptr
virtual cv::AlgorithmInfo* info() const;
cv::AlgorithmInfo* info() const;
//! returns a copy of the latest reconstructed background descriptors image
virtual void getBackgroundDescriptorsImage( cv::OutputArray backgroundDescImage ) const;
//! returns the keypoints list used for descriptor extraction (note: by default, these are generated from the DenseFeatureDetector class, and the border points are removed)

Loading…
Cancel
Save