Skip to content
Snippets Groups Projects
Commit 8c00eef9 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: Mantis-942: Image and vector data now use the same physical space

parent b8c40a10
Branches
Tags
No related merge requests found
......@@ -314,10 +314,6 @@ PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType
ContinuousIndexType cidx;
this->GetInput()->TransformPhysicalPointToContinuousIndex(point, cidx);
// OGR convention : vector data are recorded with a 0.5 shift
cidx[0] -= 0.5;
cidx[1] -= 0.5;
RegionType paddedRegion = outputRegionForThread;
paddedRegion.PadByRadius(m_NeighborhoodRadius);
if (this->IsInsideWithNeighborhoodRadius(paddedRegion, cidx))
......
......@@ -264,12 +264,6 @@ PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFun
DescriptorsFunctionPointType point;
input->TransformIndexToPhysicalPoint(current, point);
ContinuousIndexType currentContinuous(current);
currentContinuous[0] += 0.5;
currentContinuous[1] += 0.5;
DescriptorsFunctionPointType pointOGR;
input->TransformContinuousIndexToPhysicalPoint(currentContinuous, pointOGR);
DescriptorType descriptor = m_DescriptorsFunction->Evaluate(point);
SVMModelMeasurementType modelMeasurement(descriptor.GetSize());
for (unsigned int i = 0; i < descriptor.GetSize(); ++i)
......@@ -280,7 +274,7 @@ PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFun
if (label != m_NoClassLabel)
{
m_ThreadPointArray[threadId].push_back(std::make_pair(pointOGR, label));
m_ThreadPointArray[threadId].push_back(std::make_pair(point, label));
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment