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> ...@@ -260,7 +260,7 @@ DisparityMapMedianFilter< TInputImage, TOutputImage, TMask>
InputIt.SetLocation(outputIt.GetIndex()); InputIt.SetLocation(outputIt.GetIndex());
for (unsigned int i=0; i<InputIt.Size(); i++) for (unsigned int i=0; i<InputIt.Size(); i++)
{ {
if (!inputmaskPtr || (inputmaskPtr && MaskInputIt.GetPixel(i) != 0)) if (!inputmaskPtr || (MaskInputIt.GetPixel(i) != 0))
{ {
p++; p++;
pixels.push_back(InputIt.GetPixel(i)); pixels.push_back(InputIt.GetPixel(i));
...@@ -347,7 +347,7 @@ DisparityMapMedianFilter< TInputImage, TOutputImage, TMask> ...@@ -347,7 +347,7 @@ DisparityMapMedianFilter< TInputImage, TOutputImage, TMask>
MaskInputIt.SetLocation(outputIt.GetIndex()); MaskInputIt.SetLocation(outputIt.GetIndex());
} }
if ((!inputmaskPtr || (inputmaskPtr && MaskInputIt.GetCenterPixel() != 0)) && if ((!inputmaskPtr || (MaskInputIt.GetCenterPixel() != 0)) &&
std::fabs(InputIt.GetCenterPixel() - MedianIt.Get())>m_IncoherenceThreshold) std::fabs(InputIt.GetCenterPixel() - MedianIt.Get())>m_IncoherenceThreshold)
{ {
outputDisparityMapIt.Set(0.0); //Remove pixel from disparity map// outputDisparityMapIt.Set(0.0); //Remove pixel from disparity map//
......
...@@ -670,9 +670,9 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor> ...@@ -670,9 +670,9 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor>
((tmpIndex[1] - this->m_GridIndex[1] + this->m_Step) % this->m_Step == 0)) ((tmpIndex[1] - this->m_GridIndex[1] + this->m_Step) % this->m_Step == 0))
{ {
// If the mask is present and valid // 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 estimatedMinHDisp = m_MinimumHorizontalDisparity;
int estimatedMinVDisp = m_MinimumVerticalDisparity; int estimatedMinVDisp = m_MinimumVerticalDisparity;
......
...@@ -762,9 +762,9 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor> ...@@ -762,9 +762,9 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor>
inRightMaskIt.SetIndex(curRightPos); inRightMaskIt.SetIndex(curRightPos);
} }
// check that the current positions are not masked // 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; RegionType smallRightRegion;
smallRightRegion.SetIndex(0,curRightPos[0]-1); smallRightRegion.SetIndex(0,curRightPos[0]-1);
...@@ -1195,9 +1195,9 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor> ...@@ -1195,9 +1195,9 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor>
inRightMaskIt.SetIndex(curRightPos); inRightMaskIt.SetIndex(curRightPos);
} }
// check that the current positions are not masked // 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; RegionType smallRightRegion;
smallRightRegion.SetIndex(0,curRightPos[0]-1); smallRightRegion.SetIndex(0,curRightPos[0]-1);
...@@ -1696,9 +1696,9 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor> ...@@ -1696,9 +1696,9 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor>
inRightMaskIt.SetIndex(curRightPos); inRightMaskIt.SetIndex(curRightPos);
} }
// check that the current positions are not masked // 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; RegionType smallRightRegion;
smallRightRegion.SetIndex(0,curRightPos[0]-1); 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