Skip to content
/ AzCvToKb Public

A playground project written in Windows Forms (.NET Core 3.1) that uses Azure Computer Vision to perform Optical Character Recognition (OCR) on images in the Windows Clipboard. The recognised text can then be copied, or sent to a predefined list of Windows processes via the Keyboard Buffer (SendKeys) method.

Notifications You must be signed in to change notification settings

kcow3/AzCvToKb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure computer vision

A playground project written in Windows Forms (.NET Core 3.1) that uses Azure Computer Vision to perform Optical Character Recognition (OCR) on images in the Windows Clipboard. The recognised text can then be copied, or sent to a predefined list of Windows processes via the Keyboard Buffer (SendKeys) method.

OCR drawio

Azure setup

This project requires you to create a Computer Vision project on Microsoft Azure. For more information on Azure Computer Vision, refer to this link.

After you created a Computer Vision Project on Azure, navigate to the resource, and find the "Keys and Endpoint" option. You need two values from this section:

  1. Key
  2. Endpoint

Note down these values as you will require them when configuring Local User Secrets on your dev environment. See the image below for reference.

image

Local setup

After pulling the code, you have to configure local user secrets.

In Visual Studio, right-click on your project and click on "Manage User Secrets". This will open your secrets.json file. Paste the following code in your secrets file and enter your Azure Computer Vision key and endpoint mentioned before.

{
  "cvApiEndpoint": "Your endpoint here",
  "cvApiKey": "Your key here"
}

For more information on user secrets, refer to this documentation

Config

The idea for this project was just to play with OCR capabilities of Azure. With this in mind, you can perform some simple operations using the Windows Forms application like:

  • Take screenshots - Credit
  • Process text in screenshot
  • Output text to process

To modify the precess list, modify the following code in MainWindow.cs:

ProcessList.DataSource = new List<string> { "N/A", "msedge", "chrome", "notepad" };

Demo

Demo

About

A playground project written in Windows Forms (.NET Core 3.1) that uses Azure Computer Vision to perform Optical Character Recognition (OCR) on images in the Windows Clipboard. The recognised text can then be copied, or sent to a predefined list of Windows processes via the Keyboard Buffer (SendKeys) method.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages