Commit 538cd502 authored by Victor Poughon's avatar Victor Poughon

BUG: !A || (A && B) is equivalent to !A || B

parent aceeb2aa
Pipeline #2112 failed with stages
in 5 minutes and 3 seconds
......@@ -260,7 +260,7 @@ DisparityMapMedianFilter< TInputImage, TOutputImage, TMask>
InputIt.SetLocation(outputIt.GetIndex());
for (unsigned int i=0; i<InputIt.Size(); i++)
{
if (!inputmaskPtr || (inputmaskPtr && MaskInputIt.GetPixel(i) != 0))
if (!inputmaskPtr || (MaskInputIt.GetPixel(i) != 0))
{
p++;
pixels.push_back(InputIt.GetPixel(i));
......@@ -347,7 +347,7 @@ DisparityMapMedianFilter< TInputImage, TOutputImage, TMask>
MaskInputIt.SetLocation(outputIt.GetIndex());
}
if ((!inputmaskPtr || (inputmaskPtr && MaskInputIt.GetCenterPixel() != 0)) &&
if ((!inputmaskPtr || (MaskInputIt.GetCenterPixel() != 0)) &&
std::fabs(InputIt.GetCenterPixel() - MedianIt.Get())>m_IncoherenceThreshold)
{
outputDisparityMapIt.Set(0.0); //Remove pixel from disparity map//
......
......@@ -670,9 +670,9 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor>
((tmpIndex[1] - this->m_GridIndex[1] + this->m_Step) % this->m_Step == 0))
{
// If the mask is present and valid
if(!inLeftMaskPtr || (inLeftMaskPtr && inLeftMaskIt.Get() > 0) )
if(!inLeftMaskPtr || (inLeftMaskIt.Get() > 0) )
{
if(!inRightMaskPtr || (inRightMaskPtr && inRightMaskIt.Get() > 0) )
if(!inRightMaskPtr || (inRightMaskIt.Get() > 0) )
{
int estimatedMinHDisp = m_MinimumHorizontalDisparity;
int estimatedMinVDisp = m_MinimumVerticalDisparity;
......
......@@ -762,9 +762,9 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor>
inRightMaskIt.SetIndex(curRightPos);
}
// check that the current positions are not masked
if(!inLeftMaskPtr || (inLeftMaskPtr && inLeftMaskIt.Get() > 0) )
if(!inLeftMaskPtr || (inLeftMaskIt.Get() > 0) )
{
if(!inRightMaskPtr || (inRightMaskPtr && inRightMaskIt.Get() > 0) )
if(!inRightMaskPtr || (inRightMaskIt.Get() > 0) )
{
RegionType smallRightRegion;
smallRightRegion.SetIndex(0,curRightPos[0]-1);
......@@ -1195,9 +1195,9 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor>
inRightMaskIt.SetIndex(curRightPos);
}
// check that the current positions are not masked
if(!inLeftMaskPtr || (inLeftMaskPtr && inLeftMaskIt.Get() > 0) )
if(!inLeftMaskPtr || (inLeftMaskIt.Get() > 0) )
{
if(!inRightMaskPtr || (inRightMaskPtr && inRightMaskIt.Get() > 0) )
if(!inRightMaskPtr || (inRightMaskIt.Get() > 0) )
{
RegionType smallRightRegion;
smallRightRegion.SetIndex(0,curRightPos[0]-1);
......@@ -1696,9 +1696,9 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor>
inRightMaskIt.SetIndex(curRightPos);
}
// check that the current positions are not masked
if(!inLeftMaskPtr || (inLeftMaskPtr && inLeftMaskIt.Get() > 0) )
if(!inLeftMaskPtr || (inLeftMaskIt.Get() > 0) )
{
if(!inRightMaskPtr || (inRightMaskPtr && inRightMaskIt.Get() > 0) )
if(!inRightMaskPtr || (inRightMaskIt.Get() > 0) )
{
RegionType smallRightRegion;
smallRightRegion.SetIndex(0,curRightPos[0]-1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment