コード例 #1
0
ファイル: Retina.cs プロジェクト: ersinkecis/EmguCV
 /// <summary>
 /// Accessors of the details channel of the retina (models foveal vision)
 /// </summary>
 /// <param name="parvo">The details channel of the retina.</param>
 public void GetParvo(IOutputArray parvo)
 {
     if (_ptr != IntPtr.Zero)
     {
         using (OutputArray oaParvo = parvo.GetOutputArray())
             BioinspiredInvoke.cveRetinaGetParvo(_ptr, oaParvo);
     }
 }
コード例 #2
0
ファイル: Retina.cs プロジェクト: ersinkecis/EmguCV
 /// <summary>
 /// Accessors of the motion channel of the retina (models peripheral vision)
 /// </summary>
 /// <param name="magno">The motion channel of the retina.</param>
 public void GetMagno(IOutputArray magno)
 {
     if (_ptr != IntPtr.Zero)
     {
         using (OutputArray oaMagno = magno.GetOutputArray())
             BioinspiredInvoke.cveRetinaGetMagno(_ptr, oaMagno);
     }
 }
コード例 #3
0
 /// <summary>
 /// Release all unmanaged memory associated with the RetinaFastToneMapping model.
 /// </summary>
 protected override void DisposeObject()
 {
     if (_sharedPtr != IntPtr.Zero)
     {
         BioinspiredInvoke.cveRetinaFastToneMappingRelease(ref _sharedPtr);
         _ptr = IntPtr.Zero;
     }
 }
コード例 #4
0
 /// <summary>
 /// Applies a luminance correction (initially High Dynamic Range (HDR) tone mapping)
 /// </summary>
 /// <param name="inputImage">The input image to process RGB or gray levels</param>
 /// <param name="outputToneMappedImage">The output tone mapped image</param>
 public void ApplyFastToneMapping(
     IInputArray inputImage,
     IOutputArray outputToneMappedImage)
 {
     using (InputArray iaInputImage = inputImage.GetInputArray())
         using (OutputArray oaOutputToneMappedImage = outputToneMappedImage.GetOutputArray())
             BioinspiredInvoke.cveRetinaFastToneMappingApplyFastToneMapping(_ptr, iaInputImage, oaOutputToneMappedImage);
 }
コード例 #5
0
 /// <summary>
 /// Updates tone mapping behaviors by adjusting the local luminance computation area
 /// </summary>
 /// <param name="photoreceptorsNeighborhoodRadius">The first stage local adaptation area</param>
 /// <param name="ganglioncellsNeighborhoodRadius">The second stage local adaptation area</param>
 /// <param name="meanLuminanceModulatorK">The factor applied to modulate the meanLuminance information (default is 1, see reference paper)</param>
 public void Setup(
     float photoreceptorsNeighborhoodRadius = 3.0f,
     float ganglioncellsNeighborhoodRadius  = 1.0f,
     float meanLuminanceModulatorK          = 1.0f)
 {
     BioinspiredInvoke.cveRetinaFastToneMappingSetup(
         _ptr,
         photoreceptorsNeighborhoodRadius,
         ganglioncellsNeighborhoodRadius,
         meanLuminanceModulatorK);
 }
コード例 #6
0
ファイル: Retina.cs プロジェクト: ersinkecis/EmguCV
 /// <summary>
 /// 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. <seealso cref="GetParvo"/> and <seealso cref="GetMagno"/>
 /// </summary>
 /// <param name="image">The input image to be processed</param>
 public void Run(IInputArray image)
 {
     using (InputArray iaImage = image.GetInputArray())
         BioinspiredInvoke.cveRetinaRun(_ptr, iaImage);
 }
コード例 #7
0
ファイル: Retina.cs プロジェクト: ersinkecis/EmguCV
 /// <summary>
 /// Create a retina model
 /// </summary>
 /// <param name="inputSize">The input frame size</param>
 /// <param name="colorMode">Specifies if (true) color is processed of not (false) to then processing gray level image</param>
 /// <param name="colorSamplingMethod">Specifies which kind of color sampling will be used</param>
 /// <param name="useRetinaLogSampling">Activate retina log sampling, if true, the 2 following parameters can be used</param>
 /// <param name="reductionFactor">Only useful if param useRetinaLogSampling=true, specifies the reduction factor of the output frame (as the center (fovea) is high resolution and corners can be underscaled, then a reduction of the output is allowed without precision leak</param>
 /// <param name="samplingStrength">Only useful if param useRetinaLogSampling=true, specifies the strength of the log scale that is applied</param>
 public Retina(Size inputSize, bool colorMode, ColorSamplingMethod colorSamplingMethod, bool useRetinaLogSampling, double reductionFactor, double samplingStrength)
 {
     _ptr = BioinspiredInvoke.cveRetinaCreate(ref inputSize, colorMode, colorSamplingMethod, useRetinaLogSampling, reductionFactor, samplingStrength, ref _sharePtr);
 }
コード例 #8
0
ファイル: Retina.cs プロジェクト: ersinkecis/EmguCV
 /// <summary>
 /// Release all unmanaged memory associated with the retina model.
 /// </summary>
 protected override void DisposeObject()
 {
     BioinspiredInvoke.cveRetinaRelease(ref _ptr, ref _sharePtr);
 }
コード例 #9
0
ファイル: Retina.cs プロジェクト: ersinkecis/EmguCV
 /// <summary>
 /// Clear all retina buffers (equivalent to opening the eyes after a long period of eye close.
 /// </summary>
 public void ClearBuffers()
 {
     BioinspiredInvoke.cveRetinaClearBuffers(_ptr);
 }
コード例 #10
0
 /// <summary>
 /// Create a wrapper class which allows the tone mapping algorithm of Meylan &amp; al(2007) to be used with OpenCV.
 /// </summary>
 /// <param name="inputSize">The size of the images to process</param>
 public RetinaFastToneMapping(Size inputSize)
 {
     _ptr = BioinspiredInvoke.cveRetinaFastToneMappingCreate(ref inputSize, ref _sharedPtr);
 }