Page MenuHomePhabricator

ProofreadPage: Implement region selection UI for the OCR tool directly in the PRP page editor
Open, HighPublicFeature

Description

Should be able to select part of an image and get the OCR text for just that region

The OCR tool already has an API for this, so it's a matter of building a suitable client-side UI into the PRP page editor.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 736203 had a related patch set uploaded (by Inductiveload; author: Inductiveload):

[mediawiki/extensions/ProofreadPage@master] Add image region selection module to ProofreadPage editor

https://gerrit.wikimedia.org/r/736203

The implementation of this is basically done, it needs the OSD viewer to be enabled in the Page NS.

Not quite sure about the ideal UI for the toggle button, but it at least is functional as shown:

2021-11-01_191021_640x649_screenshot.png (649×640 px, 186 KB)

How about:

  • a select-region button next to the zoom buttons; and
  • if a region is selected, the transcribe button changes to 'Transcribe selected text'

Perhaps it'd also need a 'select all' or 'remove region' button, akin to the reset-zoom one.

@nayoub might have an opinion; I'm not sure if this was covered in the original designs for OCR?

@Samwilson I don't think the buttons are necessary because "select all" is the same as just turning the region selector off.

Changing the text is nice. Note, it will make the button change size and anything on the left of it would jump about. But there's nothing there at the moment, and the viewport control area is on the right.

2021-11-04_160914_454x158_screenshot.png (158×454 px, 73 KB)

You're right, if it's a toggle button then it's easy to see that it's on or off; that's great.

The jumping of the button is a bit annoying, but I think it's sort of okay given that the cursor won't be on it when it happens and as you say there's nothing to the left of it.

Change 736997 had a related patch set uploaded (by Inductiveload; author: Inductiveload):

[mediawiki/extensions/Wikisource@master] OCR: Use the PRP region selector to select regions for OCR

https://gerrit.wikimedia.org/r/736997

Test wiki created on Patch Demo by Inductiveload using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/75598a1c56/w/

Test wiki on Patch Demo by Inductiveload using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/75598a1c56/w/

Test wiki created on Patch Demo by Inductiveload using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/f8997c87c6/w/

Samwilson renamed this task from ProofreadPage: Implement region selection UI for the OCR tool directling in the PRP page editor to ProofreadPage: Implement region selection UI for the OCR tool directly in the PRP page editor.Feb 18 2022, 7:01 AM
Samwilson updated the task description. (Show Details)

Test wiki on Patch demo by Inductiveload using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/f8997c87c6/w/