Hi All,
Am new to this area, it would great if any one help me on my request.
I would like to retrieve each words co-ordiantes (x,y axis) from a jpg file, which is scanned hard copy.
I know this can be done with the help of OCR sdk's. But i dont know how to integrate those sdk's with my .net application and retrieve the value. It would be great if some one suggest me the best way or sample codes to do that.....

Regards,
Nanda

Dani AI

Generated

Short practical guide for getting word coordinates from a scanned JPEG (expands on comments by , and ).

Use an OCR engine that returns word-level bounding boxes rather than trying to detect words by scanning pixels. Typical workflow: choose an engine (open-source Tesseract or a commercial/cloud OCR), install its .NET package or native DLLs, preprocess the image (deskew, denoise, set correct DPI, convert to grayscale and binarize), run OCR, then iterate the OCR results at the word level to collect each word and its bounding box. Most engines return rectangles or four-point polygons in image pixel units; some provide confidence scores as well.

Integration tips and mapping:

  • Install via NuGet or add the vendor DLLs, and ensure any native data files (for example Tesseract’s traineddata) are in place.
  • Preprocessing strongly improves both word detection and box accuracy (higher DPI, Otsu thresholding, morphological filters, deskew).
  • Bounding boxes are in image pixels. To convert to inches: inches = pixels / DPI. To convert to points: points = (pixels / DPI) * 72. If the browser or UI scales the image, multiply boxes by the displayed/actual scale factor.
  • Watch for rotated text: some engines return quad coordinates, which handle skewed words better than plain rectangles.
  • Licensing: check terms for commercial SDKs or cloud APIs before production use.

References for setup and APIs: Tesseract documentation and the .NET wrapper (charlesw/tesseract).

Recommended Answers

All 5 Replies

I don't know how to recognise the character, but this code could help you:

Imports System.Drawing

...
        ' image is PictureBox control

        Dim bitmap As New Bitmap("LOCATION TO IMAGE")
        Dim rectangle As New Rectangle(New Point(image.Location.X, image.Location.Y), New Size(bitmap.Size.Width, bitmap.Size.Height))

        image.DrawToBitmap(bitmap, rectangle)

        For i = 0 To bitmap.Size.Width Step +1
            For f = 0 To bitmap.Size.Height Step +1
                If bitmap.GetPixel(i, f) = Color.Black Then
                    ' add cordinates to some ListBox or array
                End If
            Next
        Next

Thanks Jugo,
But what am exactly looking for is: I have a scanned copy of a page (saved as .jpg file), from that .jpg i need to find out the each words x and y axis.
I came to know that using OCR tools we can retrieve words but the thing is i want the co-ordinates too...

Regards,
Nanda

There is no easy way to achieve this.
But the newest version of this third-party component has functionality for it.
http://www.ocrtools.com/fi/Default.aspx

Thanks Oxiegen, :)
Already i have gone thro that page, my request is "how to integrate the sdk in .net"

Regards,
Nanda

If the file that you have downloaded is dll library, add reference to your project.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.