|
|
|
|
<Image>.CoordinateFromImage (Function) In french: <Image>.CoordonnéeDepuisImage Converts the coordinates of a rectangle in the image to the corresponding coordinates in the Image control. This function is used to match the coordinates of the source image to the coordinates displayed in the Image control.
// Load image for OCR ImageForOCR is Image = dLoadImage(MyImage) // Display a thumbnail of the image in the control IMG_Thumbnail = ImageForOCR // Detect text areas arrAreas is array of Polygon = OCRDetectTextArea(ImageForOCR) // Draw rectangles in the thumbnail IMG_Thumbnail.StartDrawing() FOR EACH rect OF arrAreas // Transform polygon into a rectangle (here we consider that the polygon has a right angle) recTemp is Rectangle recTemp.X = rect.Point[1].X recTemp.Y = rect.Point[1].Y recTemp.Width = rect.Point[2].X - rect.Point[1].X recTemp.Height = rect.Point[3].Y - rect.Point[1].Y Â Â let rectImage = IMG_Thumbnail.CoordinateImageToImageControl(recTemp) rectImage.DrawRectangle() END
Syntax
<Result> = <Image control>.CoordinateFromImage(<Coordinates to convert>)
<Result>: Rectangle variable Rectangle variable that corresponds to the rectangle in relation to the Image control. <Image control>: Control name Image control used. <Coordinates to convert>: Rectangle variable Name of the Rectangle variable that corresponds to the rectangle in relation image. Remarks - The conversion takes into account the display mode of the image.
- The function is ignored if the displayed image is repeated.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|