diff --git a/Code/ObjectDetection/otbObjectDetectionClassifier.txx b/Code/ObjectDetection/otbObjectDetectionClassifier.txx index 985236fa072615ef1ecb89eb6b78b9d6f32a7e15..1c58ba1fa1ecb02dcad08721235e55af3227948d 100644 --- a/Code/ObjectDetection/otbObjectDetectionClassifier.txx +++ b/Code/ObjectDetection/otbObjectDetectionClassifier.txx @@ -132,7 +132,7 @@ PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFuncti { // merge all points in a single vector data //std::copy(m_ThreadPointArray[0].begin(), m_ThreadPointArray[0].end(), - // std::ostream_iterator<DescriptorsFunctionPointType>(std::cout, "\n") ); + //std::ostream_iterator<DescriptorsFunctionPointType>(std::cout, "\n") ); VectorDataType* vdata = this->GetOutputVectorData(); @@ -231,17 +231,14 @@ PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFuncti } - - template <class TInputImage, class TOutputVectorData, class TLabel, class TFunctionType> void PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionType> ::ThreadedGenerateData(const RegionType& outputRegionForThread, int threadId) { -#define LOGG(t) std::cout << #t << " : " << t << std::endl - - SVMModelType* model = static_cast<SVMModelType*>(this->itk::ProcessObject::GetInput(1)); + InputImageType* input = static_cast<InputImageType*>(this->itk::ProcessObject::GetInput(0)); + SVMModelType* model = static_cast<SVMModelType*>(this->itk::ProcessObject::GetInput(1)); typedef typename RegionType::IndexType IndexType; typedef typename RegionType::IndexValueType IndexValueType; @@ -264,27 +261,19 @@ PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFuncti point[0] = current[0]; point[1] = current[1]; - //LOGG(point); DescriptorType descriptor = m_DescriptorsFunction->Evaluate(point); - //LOGG(descriptor); SVMModelMeasurementType modelMeasurement(descriptor.GetSize()); for (unsigned int i = 0; i < descriptor.GetSize(); ++i) { modelMeasurement[i] = (descriptor[i] - m_Shifts[i]) * m_InvertedScales[i]; - -/* - LOGG(i); - LOGG(descriptor[i]); - LOGG(m_Shifts[i]); - LOGG(m_InvertedScales[i]); - LOGG( modelMeasurement[i]); -*/ } LabelType label = model->EvaluateLabel(modelMeasurement); - //LOGG(label); + if (label != m_NoClassLabel) { - m_ThreadPointArray[threadId].push_back(std::make_pair(point, label)); + DescriptorsFunctionPointType phyPoint; + input->TransformIndexToPhysicalPoint(current, phyPoint); + m_ThreadPointArray[threadId].push_back(std::make_pair(phyPoint, label)); } } } diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt index 265a4b7a2a9185669cddf5ad2e2fdd86a4346ae9..68047a4d5713771575c01663e8747223e629adfd 100644 --- a/RELEASE_NOTES.txt +++ b/RELEASE_NOTES.txt @@ -2,20 +2,50 @@ OTB-v.3.8.0 - Changes since version 3.6.0 (????/??/??) ----------------------------------------- * Monteverdi - * + * New Polarimetric Synthesis module + * New DEM image extraction / HillShading module: creates an image from a DEM tiles directory, with optional hillshading + * New ColorMapping module: apply a colormap to a mono band image + * Viewer module: add multi input support, with slideshow or transparency mode, add more rendering functions, add splitted/packed layout option + * Vectorization module: new semi-automatic mode based on segmentation results proposals * Applications - * + * Object Detection applications (see also http://wiki.orfeo-toolbox.org/index.php/Object_detection) + * EstimateFeatureStatistics to evaluate descriptors statistics on a set of images + * TrainObjectDetector: generates an SVM model from input images and a vector data + * ObjectDetector: detects points in an image from an SVM model + * Add automatically generated GUI wrappers for OTB processing chains + * Add FLTK wrapper + * Add a generic Qt based widget class + * Add a Qt GUI wrapper based on the generic Qt widget + * Add a Qgis plugin wrapper based on the generic Qt widget * Library - * Rework FlusserImageFunction andHuImageFunction to output all moments in one pass - * Rework RealMomentsImagefilter and ComplexMomentImageFilter to output a matrix of all moments associated to p, q inferior to a given parameter - * Add RadiometricMomentsImage function that output a vector containing the local mean, variance, skewness and kurtosis - + * Improved local descriptors tools based on ImageFunction : + * Rework FlusserImageFunction and HuImageFunction to output all moments in one pass (FlusserMomentsImageFunction, HuMomentsImageFunction) + * Rework RealMomentsImagefilter and ComplexMomentImageFilter to output a matrix of all moments associated to p, q inferior to a given parameter (ComplexMomentsImageFunction, HuMomentsImageFunction) + * Add image function to compute a vector containing the local mean, variance, skewness and kurtosis (RadiometricMomentsImageFunction) + * Add local histogram image function (LocalHistogramImageFunction) + * Add image function to compute the local Fourier Mellin coefficients (FourierMellinDescriptorsImageFunction) + * Add a class to adapt any image function return types to itk::VariableLengthVector (ImageFunctionAdaptor) + * Add a class to build composite image functions (MetaImageFunction) + * New object detection framework (see also http://wiki.orfeo-toolbox.org/index.php/Object_detection) + * Add filter to generate negative samples (LabeledSampleLocalizationGenerator) + * Add filter to evaluate an image function on a set of point and generate ListSample (DescriptorsListSampleGenerator) + * Add filter to balance the sample number of different classes in a ListSample by generating new samples from existing ones plus noise (ListSampleToBalancedListSampleFilter, GaussianAdditiveNoiseSampleListFilter) + * Add filter to apply a shift/scale to a ListSample (ShiftScaleSampleListFilter) + * Add filter to detect object from an SVM model and an image function (ObjectDetectionClassifier) + * SVMClassifier: add hyperplanes distances as output + * GDALImageIO: support writing of non-streamable format (JPEG, PNG) + * Support reading vector images of std::complex + * BandMathFilter: add physical and image coordinates variables * System * Internal liblas updated to 1.6.0b2 + OTB patches (root CMakeList.txt) - + * Internal libsvm updated to 3.0 + OTB patches (additionnal kernels) + * Internal ITK: removed compilation of medical image formats library and associated ImageIO + * Internal ITK: removed dependency on libtiff, libjpeg, libpng and zlib, now handled by gdal + * Support for gcc-4.5 + OTB-v.3.6.0 - Changes since version 3.4.0 (2010/10/07) ----------------------------------------- diff --git a/Testing/Code/ObjectDetection/CMakeLists.txt b/Testing/Code/ObjectDetection/CMakeLists.txt index 4ab5028ad9d6703959b753d964493c31c31d8e41..65333ff743097c470cc923bc5e37550461e5ec91 100644 --- a/Testing/Code/ObjectDetection/CMakeLists.txt +++ b/Testing/Code/ObjectDetection/CMakeLists.txt @@ -94,6 +94,19 @@ ADD_TEST(odTvObjectDetectionClassifier ${OBJECTDETECTION_TESTS1} 5 # neighborhood radius ) +ADD_TEST(odTvObjectDetectionClassifierStreaming ${OBJECTDETECTION_TESTS1} + --compare-ogr ${NOTOL} + ${BASELINE_FILES}/TvObjectDetectionClassifierOutput.shp + ${TEMP}/TvObjectDetectionClassifierOutput.shp + otbObjectDetectionClassifier + ${INPUTDATA}/ObjectReco/Boats/maur_B010202_01_extract_amplitude.tif + ${INPUTDATA}/ObjectReco/Boats/FeatureStats_RadiometricMoments_amplitude.xml + ${BASELINE_FILES}/TvDescriptorsSVMModelCreation.svm + ${TEMP}/TvObjectDetectionClassifierOutput.shp + 50 # streaming + 5 # neighborhood radius + ) + ADD_TEST(odTuStandardMetaImageFunctionBuilderNew ${OBJECTDETECTION_TESTS1} otbStandardMetaImageFunctionBuilderNew )