Commit 185836bc authored by Maksim Shabunin's avatar Maksim Shabunin

Java wrappers for bioinspired module

parent 99a5f4cf
......@@ -301,12 +301,12 @@ public:
*/
CV_WRAP virtual void activateContoursProcessing(const bool activate)=0;
};
CV_EXPORTS Ptr<Retina> createRetina(Size inputSize);
CV_EXPORTS Ptr<Retina> createRetina(Size inputSize, const bool colorMode, int colorSamplingMethod=RETINA_COLOR_BAYER, const bool useRetinaLogSampling=false, const double reductionFactor=1.0, const double samplingStrenght=10.0);
CV_EXPORTS_W Ptr<Retina> createRetina(Size inputSize);
CV_EXPORTS_W Ptr<Retina> createRetina(Size inputSize, const bool colorMode, int colorSamplingMethod=RETINA_COLOR_BAYER, const bool useRetinaLogSampling=false, const double reductionFactor=1.0, const double samplingStrenght=10.0);
#ifdef HAVE_OPENCV_OCL
CV_EXPORTS Ptr<Retina> createRetina_OCL(Size inputSize);
CV_EXPORTS Ptr<Retina> createRetina_OCL(Size inputSize, const bool colorMode, int colorSamplingMethod=RETINA_COLOR_BAYER, const bool useRetinaLogSampling=false, const double reductionFactor=1.0, const double samplingStrenght=10.0);
Ptr<Retina> createRetina_OCL(Size inputSize);
Ptr<Retina> createRetina_OCL(Size inputSize, const bool colorMode, int colorSamplingMethod=RETINA_COLOR_BAYER, const bool useRetinaLogSampling=false, const double reductionFactor=1.0, const double samplingStrenght=10.0);
#endif
}
}
......
......@@ -93,7 +93,7 @@ namespace bioinspired{
* regarding spatio-temporal filter and the bigger retina model :
* Vision: Images, Signals and Neural Networks: Models of Neural Processing in Visual Perception (Progress in Neural Processing),By: Jeanny Herault, ISBN: 9814273686. WAPI (Tower ID): 113266891.
*/
class CV_EXPORTS RetinaFastToneMapping : public Algorithm
class CV_EXPORTS_W RetinaFastToneMapping : public Algorithm
{
public:
......@@ -103,7 +103,7 @@ public:
@param inputImage the input image to process RGB or gray levels
@param outputToneMappedImage the output tone mapped image
*/
virtual void applyFastToneMapping(InputArray inputImage, OutputArray outputToneMappedImage)=0;
CV_WRAP virtual void applyFastToneMapping(InputArray inputImage, OutputArray outputToneMappedImage)=0;
/**
* setup method that updates tone mapping behaviors by adjusing the local luminance computation area
......@@ -111,10 +111,10 @@ public:
* @param ganglioncellsNeighborhoodRadius the second stage local adaptation area
* @param meanLuminanceModulatorK the factor applied to modulate the meanLuminance information (default is 1, see reference paper)
*/
virtual void setup(const float photoreceptorsNeighborhoodRadius=3.f, const float ganglioncellsNeighborhoodRadius=1.f, const float meanLuminanceModulatorK=1.f)=0;
CV_WRAP virtual void setup(const float photoreceptorsNeighborhoodRadius=3.f, const float ganglioncellsNeighborhoodRadius=1.f, const float meanLuminanceModulatorK=1.f)=0;
};
CV_EXPORTS Ptr<RetinaFastToneMapping> createRetinaFastToneMapping(Size inputSize);
CV_EXPORTS_W Ptr<RetinaFastToneMapping> createRetinaFastToneMapping(Size inputSize);
}
}
......
......@@ -83,12 +83,12 @@ namespace cv
namespace bioinspired
{
class CV_EXPORTS TransientAreasSegmentationModule: public Algorithm
class CV_EXPORTS_W TransientAreasSegmentationModule: public Algorithm
{
public:
// parameters structure
struct SegmentationParameters{
struct CV_EXPORTS_W SegmentationParameters{
SegmentationParameters():
thresholdON(100),
thresholdOFF(100),
......@@ -101,16 +101,16 @@ public:
// context neighborhood energy filtering parameters : the aim is to get information about the energy on a wide neighborhood area to filtered out local effects
contextEnergy_temporalConstant(1),
contextEnergy_spatialConstant(75){};// default setup
float thresholdON, thresholdOFF;
float localEnergy_temporalConstant, localEnergy_spatialConstant;
float neighborhoodEnergy_temporalConstant, neighborhoodEnergy_spatialConstant;
float contextEnergy_temporalConstant, contextEnergy_spatialConstant;
CV_PROP_RW float thresholdON, thresholdOFF;
CV_PROP_RW float localEnergy_temporalConstant, localEnergy_spatialConstant;
CV_PROP_RW float neighborhoodEnergy_temporalConstant, neighborhoodEnergy_spatialConstant;
CV_PROP_RW float contextEnergy_temporalConstant, contextEnergy_spatialConstant;
};
/**
* @return the sze of the manage input and output images
*/
virtual Size getSize()=0;
CV_WRAP virtual Size getSize()=0;
/**
* try to open an XML segmentation parameters file to adjust current segmentation instance setup
......@@ -119,7 +119,7 @@ public:
* @param retinaParameterFile : the parameters filename
* @param applyDefaultSetupOnFailure : set to true if an error must be thrown on error
*/
virtual void setup(String segmentationParameterFile="", const bool applyDefaultSetupOnFailure=true)=0;
CV_WRAP virtual void setup(String segmentationParameterFile="", const bool applyDefaultSetupOnFailure=true)=0;
/**
* try to open an XML segmentation parameters file to adjust current segmentation instance setup
......@@ -128,7 +128,7 @@ public:
* @param fs : the open Filestorage which contains segmentation parameters
* @param applyDefaultSetupOnFailure : set to true if an error must be thrown on error
*/
virtual void setup(cv::FileStorage &fs, const bool applyDefaultSetupOnFailure=true)=0;
CV_WRAP virtual void setup(cv::FileStorage &fs, const bool applyDefaultSetupOnFailure=true)=0;
/**
* try to open an XML segmentation parameters file to adjust current segmentation instance setup
......@@ -137,55 +137,55 @@ public:
* @param newParameters : a parameters structures updated with the new target configuration
* @param applyDefaultSetupOnFailure : set to true if an error must be thrown on error
*/
virtual void setup(SegmentationParameters newParameters)=0;
CV_WRAP virtual void setup(SegmentationParameters newParameters)=0;
/**
* @return the current parameters setup
*/
virtual SegmentationParameters getParameters()=0;
CV_WRAP virtual SegmentationParameters getParameters()=0;
/**
* parameters setup display method
* @return a string which contains formatted parameters information
*/
virtual const String printSetup()=0;
CV_WRAP virtual const String printSetup()=0;
/**
* write xml/yml formated parameters information
* @rparam fs : the filename of the xml file that will be open and writen with formatted parameters information
*/
virtual void write( String fs ) const=0;
CV_WRAP virtual void write( String fs ) const=0;
/**
* write xml/yml formated parameters information
* @param fs : a cv::Filestorage object ready to be filled
*/
virtual void write( cv::FileStorage& fs ) const=0;
CV_WRAP virtual void write( cv::FileStorage& fs ) const=0;
/**
* main processing method, get result using methods getSegmentationPicture()
* @param inputToSegment : the image to process, it must match the instance buffer size !
* @param channelIndex : the channel to process in case of multichannel images
*/
virtual void run(InputArray inputToSegment, const int channelIndex=0)=0;
CV_WRAP virtual void run(InputArray inputToSegment, const int channelIndex=0)=0;
/**
* access function
* @return the last segmentation result: a boolean picture which is resampled between 0 and 255 for a display purpose
*/
virtual void getSegmentationPicture(OutputArray transientAreas)=0;
CV_WRAP virtual void getSegmentationPicture(OutputArray transientAreas)=0;
/**
* cleans all the buffers of the instance
*/
virtual void clearAllBuffers()=0;
CV_WRAP virtual void clearAllBuffers()=0;
};
/**
* allocator
* @param Size : size of the images input to segment (output will be the same size)
*/
CV_EXPORTS Ptr<TransientAreasSegmentationModule> createTransientAreasSegmentationModule(Size inputSize);
CV_EXPORTS_W Ptr<TransientAreasSegmentationModule> createTransientAreasSegmentationModule(Size inputSize);
}} // namespaces end : cv and bioinspired
......
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