mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
Increased version to 0.12.4, Tango: gain compensation on each channel, added min depth parameter, fixed exporting failing when doing export just after opening a database
This commit is contained in:
@@ -43,7 +43,7 @@ namespace rtabmap {
|
||||
*/
|
||||
class RTABMAP_EXP GainCompensator {
|
||||
public:
|
||||
GainCompensator(double maxCorrespondenceDistance = 0.02, double minOverlap = 0.05, double alpha = 0.01, double beta = 10);
|
||||
GainCompensator(double maxCorrespondenceDistance = 0.02, double minOverlap = 0.0, double alpha = 0.01, double beta = 10);
|
||||
virtual ~GainCompensator();
|
||||
|
||||
void feed(
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
int id,
|
||||
cv::Mat & image) const;
|
||||
|
||||
double getGain(int id) const;
|
||||
double getGain(int id, double * r=0, double * g=0, double * b=0) const;
|
||||
int getIndex(int id) const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -468,9 +468,23 @@ void GainCompensator::apply(
|
||||
}
|
||||
}
|
||||
|
||||
double GainCompensator::getGain(int id) const
|
||||
double GainCompensator::getGain(int id, double * r, double * g, double * b) const
|
||||
{
|
||||
UASSERT_MSG(uContains(idToIndex_, id), uFormat("id=%d idToIndex_.size()=%d", id, (int)idToIndex_.size()).c_str());
|
||||
|
||||
if(r)
|
||||
{
|
||||
*r = gains_(idToIndex_.at(id), 1);
|
||||
}
|
||||
if(g)
|
||||
{
|
||||
*g = gains_(idToIndex_.at(id), 2);
|
||||
}
|
||||
if(b)
|
||||
{
|
||||
*b = gains_(idToIndex_.at(id), 3);
|
||||
}
|
||||
|
||||
return gains_(idToIndex_.at(id), 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user