Interface for CPerspective wrapper.
More...
Go to the source code of this file.
|
| CPerspective | CPerspective_Create (const CIDRS objIdrs, idrs_exception *pargException) |
| | Creates a new CPerspective object.
|
| |
| PerspectiveCorners | CPerspective_DetectDocumentCorners (CPerspective argCPerspective, const CImage argImage, idrs_exception *pargException) |
| | DetectDocumentCorners retrieves the corners for the supplied image.
|
| |
| void | CPerspective_CorrectPerspective (CPerspective argCPerspective, CImage argImage, const PerspectiveCorners *stPerspectiveCorners, idrs_exception *pargException) |
| | ApplyCorrection corrects perspective distortion of the supplied image using the provided corners.
|
| |
| void | CPerspective_SetCropToDocumentArea (CPerspective argCPerspective, IDRS_BOOL const bCropToDocumentArea, idrs_exception *pargException) |
| | Sets the flag to crop to document area.
|
| |
| IDRS_BOOL | CPerspective_GetCropToDocumentArea (const CPerspective argCPerspective, idrs_exception *pargException) |
| | Gets the flag to crop to document area.
|
| |
| void | CPerspective_Destroy (CPerspective argCPerspective, idrs_exception *pargException) |
| | Destroys a CPerspective handle.
|
| |
Interface for CPerspective wrapper.
◆ CPerspective_CorrectPerspective()
ApplyCorrection corrects perspective distortion of the supplied image using the provided corners.
- Parameters
-
| argCPerspective | CPerspective handle |
| argImage | The image where perspective distortions will be corrected, using the corners provided in pcPerspectiveCorners |
| stPerspectiveCorners | The corners of corrected document (usually obtained using |
- See also
- DetectDocumentCorners).
- Parameters
-
| pargException | Pointer to exception structure that will be filled if an exception occurs |
◆ CPerspective_Create()
| CPerspective CPerspective_Create |
( |
const CIDRS |
objIdrs, |
|
|
idrs_exception * |
pargException |
|
) |
| |
Creates a new CPerspective object.
- Parameters
-
| objIdrs | Idrs handle |
| pargException | Pointer to exception structure that will be filled if an exception occurs |
- Returns
- The newly created CPerspective object.
◆ CPerspective_Destroy()
| void CPerspective_Destroy |
( |
CPerspective |
argCPerspective, |
|
|
idrs_exception * |
pargException |
|
) |
| |
Destroys a CPerspective handle.
- Parameters
-
| argCPerspective | CPerspective handle to destroy |
| pargException | Pointer to exception structure that will be filled if an exception occurs |
◆ CPerspective_DetectDocumentCorners()
DetectDocumentCorners retrieves the corners for the supplied image.
- Parameters
-
| argCPerspective | CPerspective handle |
| argImage | The image for which the perspective distortion corners will be computed. |
| pargException | Pointer to exception structure that will be filled if an exception occurs |
- Returns
- The perspective distortion corners.
◆ CPerspective_GetCropToDocumentArea()
| IDRS_BOOL CPerspective_GetCropToDocumentArea |
( |
const CPerspective |
argCPerspective, |
|
|
idrs_exception * |
pargException |
|
) |
| |
Gets the flag to crop to document area.
If the flag is set to IDRS_TRUE, the method CorrectPerspective () will crop the underlying CImage or CPage object so that it contains only the area delimited by the four corners provided as parameters. If the flag is set to IDRS_FALSE, the method CorrectPerspective () will keep all pixels of the underlying CImage object (and add extra pixels for area not represented by the original image)
Default value for the flag is IDRS_TRUE.
- Returns
- The value of the flag.
- Parameters
-
| argCPerspective | CPerspective handle |
| pargException | Pointer to exception structure that will be filled if an exception occurs |
◆ CPerspective_SetCropToDocumentArea()
| void CPerspective_SetCropToDocumentArea |
( |
CPerspective |
argCPerspective, |
|
|
IDRS_BOOL const |
bCropToDocumentArea, |
|
|
idrs_exception * |
pargException |
|
) |
| |
Sets the flag to crop to document area.
If the flag is set to IDRS_TRUE, the method CorrectPerspective () will crop the underlying CImage or CPage object so that it contains only the area delimited by the four corners provided as parameters. If the flag is set to IDRS_FALSE, the method CorrectPerspective () will keep all pixels of the underlying CImage object (and add extra pixels for area not represented by the original image)
- Parameters
-
| argCPerspective | CPerspective handle |
| bCropToDocumentArea | the value for the flag. |
| pargException | Pointer to exception structure that will be filled if an exception occurs |