:param src:The training images, that means the faces you want to learn. The data has to be given as a ``vector<Mat>``.
@ -193,7 +193,7 @@ This method updates a (probably trained) :ocv:class:`FaceRecognizer`, but only i
//
// Now updating the model is as easy as calling:
model->update(newImages,newLabels);
// This will preserve the old model data and extend the existing model
// This will preserve the old model data and extend the existing model
// with the new features extracted from newImages!
Calling update on an Eigenfaces model (see :ocv:func:`createEigenFaceRecognizer`), which doesn't support updating, will throw an error similar to:
@ -203,8 +203,8 @@ Calling update on an Eigenfaces model (see :ocv:func:`createEigenFaceRecognizer`
OpenCV Error: The function/feature is not implemented (This FaceRecognizer (FaceRecognizer.Eigenfaces) does not support updating, you have to use FaceRecognizer::train to update it.) in update, file /home/philipp/git/opencv/modules/contrib/src/facerec.cpp, line 305
terminate called after throwing an instance of 'cv::Exception'
Please note: The :ocv:class:`FaceRecognizer` does not store your training images, because this would be very memory intense and it's not the responsibility of te :ocv:class:`FaceRecognizer` to do so. The caller is responsible for maintaining the dataset, he want to work with.
Please note: The :ocv:class:`FaceRecognizer` does not store your training images, because this would be very memory intense and it's not the responsibility of te :ocv:class:`FaceRecognizer` to do so. The caller is responsible for maintaining the dataset, he want to work with.
@ -14,7 +14,7 @@ Class which provides the main controls to the Gipsa/Listic labs human retina mo
* periphearal vision for sensitive transient signals detection (motion and events) : the magnocellular pathway.
The retina can be settled up with various parameters, by default, the retina cancels mean luminance and enforces all details of the visual scene. In order to use your own parameters, you can use at least one time the *write(std::string fs)* method which will write a proper XML file with all default parameters. Then, tweak it on your own and reload them at any time using method *setup(std::string fs)*. These methods update a *cv::Retina::RetinaParameters* member structure that is described hereafter. ::
The retina can be settled up with various parameters, by default, the retina cancels mean luminance and enforces all details of the visual scene. In order to use your own parameters, you can use at least one time the *write(std::string fs)* method which will write a proper XML file with all default parameters. Then, tweak it on your own and reload them at any time using method *setup(std::string fs)*. These methods update a *Retina::RetinaParameters* member structure that is described hereafter. ::
class Retina
{
@ -25,7 +25,7 @@ The retina can be settled up with various parameters, by default, the retina can
@ -75,13 +75,13 @@ Class which allows the `Gipsa <http://www.gipsa-lab.inpg.fr>`_ (preliminary work
* local logarithmic luminance compression allows details to be enhanced even in low light conditions
Use : this model can be used basically for spatio-temporal video effects but also in the aim of :
Use : this model can be used basically for spatio-temporal video effects but also in the aim of :
* performing texture analysis with enhanced signal to noise ratio and enhanced details robust against input images luminance ranges (check out the parvocellular retina channel output, by using the provided **getParvo** methods)
* performing motion analysis also taking benefit of the previously cited properties (check out the magnocellular retina channel output, by using the provided **getMagno** methods)
For more information, refer to the following papers :
For more information, refer to the following papers :
* Benoit A., Caplier A., Durette B., Herault, J., "Using Human Visual System Modeling For Bio-Inspired Low Level Image Processing", Elsevier, Computer Vision and Image Understanding 114 (2010), pp. 758-773. DOI <http://dx.doi.org/10.1016/j.cviu.2010.01.011>
@ -100,7 +100,7 @@ Demos and experiments !
Take a look at the C++ examples provided with OpenCV :
* **samples/cpp/retinademo.cpp** shows how to use the retina module for details enhancement (Parvo channel output) and transient maps observation (Magno channel output). You can play with images, video sequences and webcam video.
* **samples/cpp/retinademo.cpp** shows how to use the retina module for details enhancement (Parvo channel output) and transient maps observation (Magno channel output). You can play with images, video sequences and webcam video.
Typical uses are (provided your OpenCV installation is situated in folder *OpenCVReleaseFolder*)
**Note :** This demo generates the file *RetinaDefaultParameters.xml* which contains the default parameters of the retina. Then, rename this as *RetinaSpecificParameters.xml*, adjust the parameters the way you want and reload the program to check the effect.
* **samples/cpp/OpenEXRimages_HighDynamicRange_Retina_toneMapping.cpp** shows how to use the retina to perform High Dynamic Range (HDR) luminance compression
@ -119,13 +119,13 @@ Take a look at the C++ examples provided with OpenCV :
Typical use, supposing that you have the OpenEXR image *memorial.exr* (present in the samples/cpp/ folder)
Clears all retina buffers (equivalent to opening the eyes after a long period of eye close ;o) whatchout the temporal transition occuring just after this method call.
Accessor of the details channel of the retina (models foveal vision)
:param retinaOutput_parvo:the output buffer (reallocated if necessary), format can be :
* a cv::Mat, this output is rescaled for standard 8bits image processing use in OpenCV
* a Mat, this output is rescaled for standard 8bits image processing use in OpenCV
* a 1D std::valarray Buffer (encoding is R1, R2, ... Rn), this output is the original retina filter model output, without any quantification or rescaling
Accessor of the motion channel of the retina (models peripheral vision)
:param retinaOutput_magno:the output buffer (reallocated if necessary), format can be :
* a cv::Mat, this output is rescaled for standard 8bits image processing use in OpenCV
* a Mat, this output is rescaled for standard 8bits image processing use in OpenCV
* a 1D std::valarray Buffer (encoding is R1, R2, ... Rn), this output is the original retina filter model output, without any quantification or rescaling
Outputs a string showing the used parameters setup
@ -237,16 +239,16 @@ Retina::printSetup
Retina::run
+++++++++++
..ocv:function:: void cv::Retina::run(const Mat & inputImage)
..ocv:function:: void Retina::run(const Mat & inputImage)
Method which allows retina to be applied on an input image, after run, encapsulated retina module is ready to deliver its outputs using dedicated acccessors, see getParvo and getMagno methods
:param inputImage:the input cv::Mat image to be processed, can be gray level or BGR coded in any format (from 8bit to 16bits)
:param inputImage:the input Mat image to be processed, can be gray level or BGR coded in any format (from 8bit to 16bits)
Activate color saturation as the final step of the color demultiplexing process -> this saturation is a sigmoide function applied to each channel of the demultiplexed image.
Try to open an XML retina parameters file to adjust current retina instance setup => if the xml file does not exist, then default setup is applied => warning, Exceptions are thrown if read XML file is not valid
Set parameters values for the Inner Plexiform Layer (IPL) magnocellular channel this channel processes signals output from OPL processing stage in peripheral vision, it allows motion information enhancement. It is decorrelated from the details channel. See reference papers for more details.
Setup the OPL and IPL parvo channels (see biologocal model) OPL is referred as Outer Plexiform Layer of the retina, it allows the spatio-temporal filtering which withens the spectrum and reduces spatio-temporal noise while attenuating global luminance (low frequency energy) IPL parvo is the OPL next processing stage, it refers to a part of the Inner Plexiform layer of the retina, it allows high contours sensitivity in foveal vision. See reference papers for more informations.
This structure merges all the parameters that can be adjusted threw the **cv::Retina::setup()**, **cv::Retina::setupOPLandIPLParvoChannel** and **cv::Retina::setupIPLMagnoChannel** setup methods
..ocv:struct:: Retina::RetinaParameters
This structure merges all the parameters that can be adjusted threw the **Retina::setup()**, **Retina::setupOPLandIPLParvoChannel** and **Retina::setupIPLMagnoChannel** setup methods
Parameters structure for better clarity, check explenations on the comments of methods : setupOPLandIPLParvoChannel and setupIPLMagnoChannel. ::
:param sigma_color:Filter sigma in the color space.
:param sigma_spatial:Filter sigma in the coordinate space.
:param sigma_color:Filter sigma in the color space.
:param sigma_spatial:Filter sigma in the coordinate space.
:param borderMode:Border type. See :ocv:func:`borderInterpolate` for details. ``BORDER_REFLECT101`` , ``BORDER_REPLICATE`` , ``BORDER_CONSTANT`` , ``BORDER_REFLECT`` and ``BORDER_WRAP`` are supported for now.
@ -843,24 +843,24 @@ Performs bilateral filtering of passed image
..seealso::
:ocv:func:`bilateralFilter`,
gpu::nonLocalMeans
-------------------
Performs pure non local means denoising without any simplification, and thus it is not fast.
..ocv:function:: void nonLocalMeans(const GpuMat& src, GpuMat& dst, float h, int search_widow_size = 11, int block_size = 7, int borderMode = BORDER_DEFAULT, Stream& s = Stream::Null());
..ocv:function:: void nonLocalMeans(const GpuMat& src, GpuMat& dst, float h, int search_widow_size = 11, int block_size = 7, int borderMode = BORDER_DEFAULT, Stream& s = Stream::Null())
:param src:Source image. Supports only CV_8UC1, CV_8UC3.
:param dst:Destination imagwe.
:param h:Filter sigma regulating filter strength for color.
:param h:Filter sigma regulating filter strength for color.
:param search_widow_size:Size of search window.
:param block_size:Size of block used for computing weights.
:param block_size:Size of block used for computing weights.
:param borderMode:Border type. See :ocv:func:`borderInterpolate` for details. ``BORDER_REFLECT101`` , ``BORDER_REPLICATE`` , ``BORDER_CONSTANT`` , ``BORDER_REFLECT`` and ``BORDER_WRAP`` are supported for now.
:param stream:Stream for the asynchronous version.
@ -868,7 +868,7 @@ Performs pure non local means denoising without any simplification, and thus it
..seealso::
:ocv:func:`fastNlMeansDenoising`
gpu::alphaComp
-------------------
Composites two images using alpha opacity values contained in each image.