@@ -86,8 +86,7 @@ namespace cv
86
86
namespace bioinspired
87
87
{
88
88
89
- class TransientAreasSegmentationModuleImpl :
90
- protected BasicRetinaFilter
89
+ class TransientAreasSegmentationModuleImpl : protected BasicRetinaFilter
91
90
{
92
91
public:
93
92
@@ -105,7 +104,7 @@ class TransientAreasSegmentationModuleImpl :
105
104
/* *
106
105
* @return the size of the manage input and output images
107
106
*/
108
- Size getSize (){return cv::Size (getNBcolumns (), getNBrows ());};
107
+ Size getSize (){return cv::Size (getNBcolumns (), getNBrows ());}
109
108
110
109
/* *
111
110
* try to open an XML segmentation parameters file to adjust current segmentation instance setup
@@ -189,19 +188,19 @@ class TransientAreasSegmentationModuleImpl :
189
188
* access function
190
189
* @return the local motion energy level picture (experimental, not usefull)
191
190
*/
192
- inline const std::valarray<float > &getLocalMotionPicture () const {return _localMotion;};
191
+ inline const std::valarray<float > &getLocalMotionPicture () const {return _localMotion;}
193
192
194
193
/* *
195
194
* access function
196
195
* @return the neighborhood motion energy level picture (experimental, not usefull)
197
196
*/
198
- inline const std::valarray<float > &getNeighborhoodMotionPicture () const {return _neighborhoodMotion;};
197
+ inline const std::valarray<float > &getNeighborhoodMotionPicture () const {return _neighborhoodMotion;}
199
198
200
199
/* *
201
200
* access function
202
201
* @return the motion energy context level picture (experimental, not usefull)
203
202
*/
204
- inline const std::valarray<float > &getMotionContextPicture () const {return _contextMotionEnergy;};
203
+ inline const std::valarray<float > &getMotionContextPicture () const {return _contextMotionEnergy;}
205
204
206
205
struct cv ::bioinspired::SegmentationParameters _segmentationParameters;
207
206
// template buffers and related acess pointers
@@ -220,25 +219,25 @@ class TransientAreasSegmentationModuleImpl :
220
219
// Buffer conversion utilities
221
220
void _convertValarrayBuffer2cvMat (const std::valarray<bool > &grayMatrixToConvert, const unsigned int nbRows, const unsigned int nbColumns, OutputArray outBuffer);
222
221
bool _convertCvMat2ValarrayBuffer (InputArray inputMat, std::valarray<float > &outputValarrayMatrix);
223
-
222
+
224
223
const TransientAreasSegmentationModuleImpl & operator = (const TransientAreasSegmentationModuleImpl &);
225
224
};
226
225
227
226
class TransientAreasSegmentationModuleImpl_ : public TransientAreasSegmentationModule
228
227
{
229
228
public:
230
- TransientAreasSegmentationModuleImpl_ (const Size size):_segmTool(size){};
231
- inline virtual Size getSize (){return _segmTool.getSize ();};
232
- inline virtual void write ( cv::FileStorage& fs ) const {_segmTool.write (fs);};
233
- inline virtual void setup (String segmentationParameterFile, const bool applyDefaultSetupOnFailure){_segmTool.setup (segmentationParameterFile, applyDefaultSetupOnFailure);};
234
- inline virtual void setup (cv::FileStorage &fs, const bool applyDefaultSetupOnFailure){_segmTool.setup (fs, applyDefaultSetupOnFailure);};
235
- inline virtual void setup (SegmentationParameters newParameters){_segmTool.setup (newParameters);};
236
- inline virtual const String printSetup (){return _segmTool.printSetup ();};
237
- inline virtual struct SegmentationParameters getParameters (){return _segmTool.getParameters ();};
238
- inline virtual void write ( String fs ) const {_segmTool.write (fs);};
239
- inline virtual void run (InputArray inputToSegment, const int channelIndex){_segmTool.run (inputToSegment, channelIndex);};
240
- inline virtual void getSegmentationPicture (OutputArray transientAreas){return _segmTool.getSegmentationPicture (transientAreas);};
241
- inline virtual void clearAllBuffers (){_segmTool.clearAllBuffers ();};
229
+ TransientAreasSegmentationModuleImpl_ (const Size size):_segmTool(size){}
230
+ inline virtual Size getSize (){return _segmTool.getSize ();}
231
+ inline virtual void write ( cv::FileStorage& fs ) const {_segmTool.write (fs);}
232
+ inline virtual void setup (String segmentationParameterFile, const bool applyDefaultSetupOnFailure){_segmTool.setup (segmentationParameterFile, applyDefaultSetupOnFailure);}
233
+ inline virtual void setup (cv::FileStorage &fs, const bool applyDefaultSetupOnFailure){_segmTool.setup (fs, applyDefaultSetupOnFailure);}
234
+ inline virtual void setup (SegmentationParameters newParameters){_segmTool.setup (newParameters);}
235
+ inline virtual const String printSetup (){return _segmTool.printSetup ();}
236
+ inline virtual struct SegmentationParameters getParameters (){return _segmTool.getParameters ();}
237
+ inline virtual void write ( String fs ) const {_segmTool.write (fs);}
238
+ inline virtual void run (InputArray inputToSegment, const int channelIndex){_segmTool.run (inputToSegment, channelIndex);}
239
+ inline virtual void getSegmentationPicture (OutputArray transientAreas){return _segmTool.getSegmentationPicture (transientAreas);}
240
+ inline virtual void clearAllBuffers (){_segmTool.clearAllBuffers ();}
242
241
243
242
private:
244
243
TransientAreasSegmentationModuleImpl _segmTool;
@@ -250,7 +249,7 @@ class TransientAreasSegmentationModuleImpl_: public TransientAreasSegmentationM
250
249
*/
251
250
Ptr <TransientAreasSegmentationModule> createTransientAreasSegmentationModule (Size inputSize){
252
251
return makePtr<TransientAreasSegmentationModuleImpl_>(inputSize);
253
- };
252
+ }
254
253
255
254
// Constructor and destructors
256
255
TransientAreasSegmentationModuleImpl::TransientAreasSegmentationModuleImpl (const Size size)
@@ -288,8 +287,8 @@ void TransientAreasSegmentationModuleImpl::clearAllBuffers()
288
287
289
288
struct SegmentationParameters TransientAreasSegmentationModuleImpl::getParameters ()
290
289
{
291
- return _segmentationParameters;
292
- };
290
+ return _segmentationParameters;
291
+ }
293
292
294
293
// setup from XML file
295
294
void TransientAreasSegmentationModuleImpl::setup (String segmentationParameterFile, const bool applyDefaultSetupOnFailure)
@@ -350,9 +349,6 @@ void TransientAreasSegmentationModuleImpl::setup(cv::FileStorage &fs, const bool
350
349
std::cout<<" SegmentationModule::setup: wrong/unappropriate xml parameter file : error report :`n=>" <<e.what ()<<std::endl;
351
350
std::cout<<" => keeping current parameters" <<std::endl;
352
351
}
353
-
354
- // report current configuration
355
- printf (" %s\n " , printSetup ().c_str ());
356
352
}
357
353
358
354
// setup parameters for the 2 filters that allow the segmentation
@@ -592,9 +588,3 @@ bool TransientAreasSegmentationModuleImpl::_convertCvMat2ValarrayBuffer(InputArr
592
588
}
593
589
594
590
}} // namespaces end : cv and bioinspired
595
-
596
-
597
-
598
-
599
-
600
-
0 commit comments