Browse Source

Documentation improvements.

pull/768/merge
Canming Huang 2 months ago
parent
commit
b88171784c
  1. 49
      Emgu.CV.OCR/ITessResultRenderer.cs

49
Emgu.CV.OCR/ITessResultRenderer.cs

@ -2,24 +2,17 @@
// Copyright (C) 2004-2025 by EMGU Corporation. All rights reserved. // Copyright (C) 2004-2025 by EMGU Corporation. All rights reserved.
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
using Emgu.CV.Util;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text;
using System.IO;
using Emgu.CV; using Emgu.CV;
using Emgu.CV.Structure; using Emgu.CV.Structure;
using Emgu.Util;
using System.Diagnostics;
namespace Emgu.CV.OCR namespace Emgu.CV.OCR
{ {
/// <summary> /// <summary>
/// Interface to the TesseractResultRender
/// Interface to the TessResultRenderer
/// </summary> /// </summary>
public interface ITessResultRenderer public interface ITessResultRenderer
{ {
@ -29,16 +22,40 @@ namespace Emgu.CV.OCR
IntPtr TessResultRendererPtr { get; } IntPtr TessResultRendererPtr { get; }
} }
/// <summary>
/// Provides a debugger proxy for the <see cref="ITessResultRenderer"/> interface.
/// This class is used to simplify the debugging experience by exposing key properties
/// of the <see cref="ITessResultRenderer"/> implementation in a more accessible manner.
/// </summary>
public class TessResultRendererDebuggerProxy public class TessResultRendererDebuggerProxy
{ {
private ITessResultRenderer _v; private ITessResultRenderer _v;
/// <summary>
/// Initializes a new instance of the <see cref="TessResultRendererDebuggerProxy"/> class.
/// </summary>
/// <param name="v">
/// An implementation of the <see cref="ITessResultRenderer"/> interface to be wrapped by this debugger proxy.
/// </param>
/// <remarks>
/// This constructor is used to create a debugger proxy for the provided <see cref="ITessResultRenderer"/> instance,
/// allowing easier inspection of its properties during debugging.
/// </remarks>
public TessResultRendererDebuggerProxy(ITessResultRenderer v) public TessResultRendererDebuggerProxy(ITessResultRenderer v)
{ {
_v = v; _v = v;
} }
/// <summary>
/// Gets a value indicating whether the associated Tesseract result renderer is in a "happy" state.
/// </summary>
/// <value>
/// <c>true</c> if the renderer is in a "happy" state; otherwise, <c>false</c>.
/// </value>
/// <remarks>
/// This property provides a simplified way to check the internal state of the Tesseract result renderer
/// during debugging. A "happy" state typically indicates that the renderer is functioning correctly.
/// </remarks>
public bool Happy public bool Happy
{ {
get get
@ -47,6 +64,20 @@ namespace Emgu.CV.OCR
} }
} }
/// <summary>
/// Gets the index of the last image provided to the renderer.
/// </summary>
/// <remarks>
/// This property reflects the index of the most recent image given to the renderer,
/// regardless of whether the image was successfully processed or not.
/// It provides insight into the current state of the rendering process:
/// - During a document lifecycle, it indicates the number of the current or last image.
/// - In a completed document, it represents the total number of images processed.
/// - If no document was started, it returns -1.
/// </remarks>
/// <value>
/// The index of the last image provided to the renderer, or -1 if no document was started.
/// </value>
public int ImageNum public int ImageNum
{ {
get get

Loading…
Cancel
Save