qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Thomas Huth <thuth@redhat.com>, Peter Maydell <peter.maydell@linaro.org>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PULL 7/8] tests/acceptance: Add test of NeXTcube framebuffer using OCR
Date: Tue, 10 Sep 2019 14:58:06 +0200	[thread overview]
Message-ID: <456eb793-dac0-618a-bf55-01848e6263ab@redhat.com> (raw)
In-Reply-To: <a4de8c0c-5758-13a4-0f74-3e7a0208ad34@redhat.com>

On 9/10/19 2:07 PM, Thomas Huth wrote:
> On 10/09/2019 14.02, Peter Maydell wrote:
>> On Sat, 7 Sep 2019 at 16:47, Thomas Huth <huth@tuxfamily.org> wrote:
>>>
>>> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>>
>>> Add a test of the NeXTcube framebuffer using the Tesseract OCR
>>> engine on a screenshot of the framebuffer device.
>>>
>>> The test is very quick:
>>>
>>>   $ avocado --show=app,console run tests/acceptance/machine_m68k_nextcube.py
>>>   JOB ID     : 78844a92424cc495bd068c3874d542d1e20f24bc
>>>   JOB LOG    : /home/phil/avocado/job-results/job-2019-08-13T13.16-78844a9/job.log
>>>    (1/3) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_size: PASS (2.16 s)
>>>    (2/3) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_ocr_with_tesseract_v3: -
>>>   ue r pun Honl'flx ; 5‘ 55‘
>>>   avg ncaaaaa 25 MHZ, memary jag m
>>>   Backplane slat «a
>>>   Ethernet address a a r a r3 2
>>>   Memgry sackets aea canflqured far 16MB Darlly page made stMs but have 16MB page made stMs )nstalled
>>
>> By the way, do we know why the output from this test case is
>> garbled like this ? It suggests that something's not right
>> somewhere...

I got better result using few options to tune, but later noticed they
differ on Fedora/Ubuntu.
Tesseract v4 has better result but it is alpha and we need to install
train data. Not that big, 15MiB:
https://github.com/tesseract-ocr/tessdata_best/blob/master/eng.traineddata
I preferred to keep the simplest tests with acceptable result, we are
not interested in fully understandable text output: we only want to know
the framebuffer model works. Reading "Ethernet address" is good and
quick enough.

> The text is created from the framebuffer with the OCR-tool Tesseract -
> which is just not good enough to recognize all words properly here.
> 
>  Thomas
> 


  reply	other threads:[~2019-09-10 13:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-07 15:47 [Qemu-devel] [PULL 0/8] Add the m68k next-cube machine Thomas Huth
2019-09-07 15:47 ` [Qemu-devel] [PULL 1/8] m68k: Add NeXTcube framebuffer device emulation Thomas Huth
2019-09-07 15:47 ` [Qemu-devel] [PULL 2/8] m68k: Add NeXTcube keyboard device Thomas Huth
2019-09-07 15:47 ` [Qemu-devel] [PULL 3/8] m68k: Add NeXTcube machine Thomas Huth
2019-09-16 10:48   ` Peter Maydell
2019-09-18  9:27     ` Thomas Huth
2019-09-07 15:47 ` [Qemu-devel] [PULL 4/8] escc: introduce a selector for the register bit Thomas Huth
2019-09-07 15:47 ` [Qemu-devel] [PULL 5/8] m68k: Add serial controller to the NeXTcube machine Thomas Huth
2019-09-07 15:47 ` [Qemu-devel] [PULL 6/8] m68k: Add an entry for the NeXTcube machine to the MAINTAINERS file Thomas Huth
2019-09-07 15:47 ` [Qemu-devel] [PULL 7/8] tests/acceptance: Add test of NeXTcube framebuffer using OCR Thomas Huth
2019-09-10 12:02   ` Peter Maydell
2019-09-10 12:07     ` Thomas Huth
2019-09-10 12:58       ` Philippe Mathieu-Daudé [this message]
2019-09-07 15:47 ` [Qemu-devel] [PULL 8/8] .travis.yml: Let the avocado job run the NeXTcube tests Thomas Huth
2019-09-09 14:43 ` [Qemu-devel] [PULL 0/8] Add the m68k next-cube machine Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=456eb793-dac0-618a-bf55-01848e6263ab@redhat.com \
    --to=philmd@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).