Resource Base
Table of contents
Notice: This documentation is archived. For the latest product features and documentation, please visit Dynamsoft Capture Vision Documentation.

Result Methods

Method Description
FreeDetectedQuadResultArray Releases memory allocated for CDetectedQuadResultArray.
FreeNormalizedImageResult Releases memory allocated for CNormalizedImageResult.
FreeString Releases memory allocated for a string.
SaveImageDataToFile Save the image data to a file.

FreeDetectedQuadResultArray

Releases memory allocated for CDetectedQuadResultArray.

static void dynamsoft::ddn::CDocumentNormalizer::FreeDetectedQuadResultArray(CDetectedQuadResultArray** results)

Parameters

[in] results An array of all detected quad results that needs to be released.

Code Snippet

CDocumentNormalizer ddn;
CDetectedQuadResultArray* detectedQuadResultArray = NULL;
ddn.DetectQuad("YOUR-SOURCE-FILE-PATH", "", &detectedQuadResultArray);
//...do something with the detectedQuadResultArray
if (detectedQuadResultArray != NULL)
    CDocumentNormalizer::FreeDetectedQuadResultArray(&detectedQuadResultArray);

FreeNormalizedImageResult

Releases memory allocated for CNormalizedImageResult.

static void dynamsoft::ddn::CDocumentNormalizer::FreeNormalizedImageResult(CNormalizedImageResult** result)

Parameters

[in] result The normalized image result that needs to be released.

Code Snippet

CDocumentNormalizer ddn;
CNormalizedImageResult* normalizedResult = NULL;
ddn.Normalize("YOUR-SOURCE-FILE-PATH", "", NULL, &normalizedResult);
//...do something with the normalizedResult
if (normalizedResult != NULL)
    CDocumentNormalizer::FreeNormalizedImageResult(&normalizedResult);

FreeString

Releases memory allocated for a string.

static void dynamsoft::ddn::CDocumentNormalizer::FreeString(char** content)

Parameters

[in] content The string that needs to be released.

Code Snippet

CDocumentNormalizer ddn;
char* content = NULL;
ddn.OutputRuntimeSettingsToString("", &content);
//...do something with the content
if (content != NULL)
    CDocumentNormalizer::FreeString(&content);

SaveImageDataToFile

Save the image data to a file.

static int dynamsoft::ddn::CDocumentNormalizer::SaveImageDataToFile(const CImageData* imageData, const char* filePath)

Parameters

[in] imageData The image data that needs to be saved.

[in] filePath The path of the output image file with the extension specifying the image format. It supports BMP and PNG files.

Code Snippet

CDocumentNormalizer ddn;
CNormalizedImageResult* normalizedResult = NULL;
ddn.Normalize("YOUR-SOURCE-FILE-PATH", "", NULL, &normalizedResult);
if (normalizedResult != NULL)
{   
    CDocumentNormalizer::SaveImageDataToFile(normalizedResult->GetImageData(), "YOUR-TARGET-FILE-PATH");
    CDocumentNormalizer::FreeNormalizedImageResult(&normalizedResult);
}

Is this page helpful?

YesYes NoNo

In this article:

version 1.0.0

  • version 2.4.10
  • Version 2.x
    • Version 2.2.10
    • Version 2.2.0
    • Version 2.0.20
    • Version 2.0.10
    • Version 2.0.0
  • Version 1.x
    • Version 1.0.20
    • Version 1.0.10
    • Version 1.0.0
Change +