Skip to content

OCR saveSearchImageToFile parameter #599

@joel-duffie

Description

@joel-duffie

Short overview
Provide the ability to save an image of the search area from a screen.find(singleWord/textLine) call.

Use case
To more easily debug OCR match fails.

Detailed description
Just like screen.find(image) can be given providerData: { saveSearchImageToFile } to save the search area and input images to disk, OCR should have the same ability, but because there is no search input image, it would just save the search area image.

Additional content
The call would look like this:

await nut.screen.find(textLine("this is a test"), { 
   searchRegion: myRegion, 
   providerData: { 
      saveSearchImageToFile: true 
   }
}

And it would save the search area (bounded by myRegion) to the current working directory, OR, if specified, to a different provided directory under a given filename.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @s1hofmann@joel-duffie

      Issue actions

        OCR `saveSearchImageToFile` parameter · Issue #599 · nut-tree/nut.js