OCR powered screen-capture tool to capture information instead of images

Overview

NormCap

OCR powered screen-capture tool to capture information instead of images.

Build passing License: GPLv3 Code style: black Coverage Status

Links: Repo | PyPi | Releases | Changelog | FAQs

Content: Quickstart | Python package | Usage | Contribute | Credits

Screencast

Features

  • On-screen recognition of selected text
  • Multi platform support for Linux, Windows, MacOS
  • Multi monitor support, incl. HDPI displays
  • "Magically" parsing the text (optional, on by default)
  • Show notifications (optional)
  • Stay in system tray (optional)
  • Check for updates (optional, off by default)

Quickstart

❱❱ Download & run a pre-build package for Linux, MacOS or Windows ❰❰

If you experience issues please look at the FAQs or open an issue.

(On MacOS, allow the unsigned application on first start: "System Preferences" → "Security & Privacy" → "General" → "Open anyway". You might also need to allow NormCap to take screenshots.)

Python package

As an alternative to a pre-build package you can install the NormCap Python package:

On Linux

# Install dependencies (Ubuntu/Debian)
sudo apt install tesseract-ocr tesseract-ocr-eng \
                 libtesseract-dev libleptonica-dev \
                 python3-dev

## Install dependencies (Arch)
sudo pacman -S tesseract tesseract-data-eng leptonica

## Install dependencies (Fedora)
sudo dnf install tesseract tesseract-devel \
                 libleptonica-devel python3-devel

# Install normcap
pip install normcap

# Run
./normcap

On MacOS

# Install dependencies
brew install tesseract tesseract-lang

# Install normcap
pip install normcap

# Run
./normcap

On Windows

1. Install "Tesseract 4.1", e.g. by using the installer provided by UB Mannheim.

2. Set the environment variable TESSDATA_PREFIX to Tesseract's data folder, e.g.:

setx TESSDATA_PREFIX "C:\Program Files\Tesseract-OCR\tessdata"

3. Install tesserocr using the Windows specific wheel and NormCap afterwards:

# Install tesserocr package
pip install https://github.com/simonflueckiger/tesserocr-windows_build/releases/download/tesserocr-v2.4.0-tesseract-4.0.0/tesserocr-2.4.0-cp37-cp37m-win_amd64.whl

# Install normcap
pip install normcap

# Run
normcap

Usage

General

  • Select a region on screen with your mouse to perform text recognition

  • Press <esc> key to abort a capture and quit the application.

Magics

"Magics" are like add-ons providing automated functionality to intelligently detect and format the captured input.

First, every "magic" calculates a "score" to determine the likelihood of being responsible for this type of text. Second, the "magic" which achieved the highest "score" takes the necessary actions to "transform" the input text according to its type.

Currently implemented Magics:

Magic Score Transform
Single line Only single line is detected Trim unnecessary whitespace
Multi line Multi lines, but single Paragraph Separated by line breaks and trim each lined
Paragraph Multiple blocks of lines or multiple paragraphs Join every paragraph into a single line, separate different paragraphs by empty line
E-Mail Number of chars in email addresses vs. overall chars Transform to a comma-separated list of email addresses
URL Number of chars in URLs vs. overall chars Transform to line-break separated URLs

Why "NormCap"?

See XKCD:

Comic

Contribute

Setup Environment

Prerequisites are Python >=3.7.1, Poetry, Tesseract (incl. language data).

# Clone repository
git clone https://github.com/dynobo/normcap.git

# Change into project directory
cd normcap

# Create virtual env and install dependencies
poetry install

# Register pre-commit hook
poetry run pre-commit install

# Run NormCap in virtual env
poetry run python -m normcap

Credits

This project uses the following non-standard libraries:

Packaging is done with:

  • briefcase - converting Python projects into standalone apps

And it depends on external software

Thanks to the maintainers of those nice libraries!

Certification

WOMM

Comments
  • appimage v3 beta

    appimage v3 beta

    Hello,

    On Gnome

    • Wayland session, the appimage simply invokes the xdg-desktop-portal-gnome screenshot tool and grabs the entire screen, then it closes, leaving just the Screeshot dialog to save the image file ...
    • X11 session, with the Pop_Shell extension enabled, the appinage only shows the grab screen on the secondary monitor, with no options to change language, no settings gear visible. So, disabling Pop_Shell brings back the functionality. As side note, there is a peculiar way to add normcap to the exception list, but it will actually show as __main__.pi ... Regardless, it will display whatever screengrab was taken first, like a screenshot preview.

    On KDE Plasma Tested only X11 session as the wayland is failing on me sometimes. Is bringing in front the first window opened in that session prior to open normcap appimage, and even if that window is closed after, it will show a capture of it and will be the only one available to grab content from. A slightly different behavior than on Gnome, but the outcome is the same, it can't be used twice in the same session.

    Update cough when opened from terminal and taking a text grab: 22:18:56 - CRITICAL - normcap.gui.utils:111 - Uncaught exception! Quitting NormCap!

    System:

    {  'cli_args': '/tmp/.mount_NormCal5T7Nh/usr/app/normcap/__main__.py',
       'config_directory': PosixPath('/home/REDACTED/.config/normcap'),
       'desktop_environment': <DesktopEnvironment.KDE: 2>,
       'display_manager_is_wayland': False,
       'envs': {  'TESSDATA_PREFIX': None,
                  'TESSERACT_CMD': '/tmp/.mount_NormCal5T7Nh/usr/bin/tesseract',
                  'TESSERACT_VERSION': None},
       'gnome_shell_version': None,
       'is_briefcase_package': True,
       'normcap_version': '0.3.0-beta',
       'platform': 'linux',
       'pyside6_version': '6.2.3',
       'qt_library_path': '/tmp/.mount_NormCal5T7Nh/usr/app_packages/PySide6/Qt/plugins, '
                          '/tmp/.mount_NormCal5T7Nh/usr/bin',
       'qt_version': '6.2.3',
       'screens': {  0: Screen(is_primary=True, device_pixel_ratio=1.0, geometry=Rect(left=0, top=0, right=1920, bottom=1080), index=0, screenshot=None),
                     1: Screen(is_primary=False, device_pixel_ratio=1.0, geometry=Rect(left=1920, top=0, right=3840, bottom=1080), index=1, screenshot=None)},
       'tessdata_path': '/home/REDACTED/.config/normcap/tessdata'}
    

    Variables:

       '_capture_to_ocr': {'self': 'REDACTED'},
       'image_to_data': {  'args': [...],
                           'config': '-c tessedit_create_tsv=1 --tessdata-dir '
                                     '"/home/REDACTED/.config/normcap/tessdata"',
                           'image': '/tmp/tmpc38mwy_w.png',
                           'lang': 'e+n+g',
                           'nice': 0,
                           'output_type': 'dict',
                           'pandas_config': None,
                           'timeout': 30},
       'recognize': {  'fp': <tempfile._TemporaryFileWrapper object at 0x7fe25e8ddc40>,
                       'image': <PIL.Image.Image image mode=RGB size=1529x960 at 0x7FE25ECA2E50>,
                       'languages': [...],
                       'padding_size': 80,
                       'parse': True,
                       'resize_factor': 3.2,
                       'tess_args': TessArgs(path='/home/REDACTED/.config/normcap/tessdata', lang='e+n+g', oem=<OEM.TESSERACT_LSTM_COMBINED: 3>, psm=<PSM.AUTO_OSD: 2>, version=<LegacyVersion('5.0.1-9-g31a968')>),
                       'tessdata_path': '/home/REDACTED/.config/normcap/tessdata'},
       'run_and_get_output': {  'config': '-c tessedit_create_tsv=1 --tessdata-dir '
                                          '"/home/REDACTED/.config/normcap/tessdata"',
                                'extension': 'tsv',
                                'image': '/tmp/tmpc38mwy_w.png',
                                'input_filename': '/tmp/tmpc38mwy_w.png',
                                'kwargs': {...},
                                'lang': 'e+n+g',
                                'nice': 0,
                                'return_bytes': False,
                                'temp_name': '/tmp/tess_zz1i435s',
                                'timeout': 30},
       'run_tesseract': {  'cmd_args': [...],
                           'config': '-c tessedit_create_tsv=1 --tessdata-dir '
                                     '"/home/REDACTED/.config/normcap/tessdata"',
                           'error_string': b'Error opening data file /home/bogdan'
                                           b'/.config/normcap/tessdata/e.trainedd'
                                           b'ata\nPlease make sure the TESSDATA_PR'
                                           b'EFIX environment variable is set to '
                                           b'your "tessdata" directory.\nFailed lo'
                                           b"ading language 'e'\nError opening dat"
                                           b'a file /home/REDACTED/.config/normcap/'
                                           b'tessdata/n.traineddata\nPlease make s'
                                           b'ure the TESSDATA_PREFIX environment '
                                           b'variable is set to your "tessdata" d'
                                           b"irectory.\nFailed loading language 'n"
                                           b"'\nError opening data file /home/bogd"
                                           b'an/.config/normcap/tessdata/g.traine'
                                           b'ddata\nPlease make sure the TESSDATA_'
                                           b'PREFIX environment variable is set t'
                                           b'o your "tessdata" directory.\nFailed '
                                           b"loading language 'g'\nTesseract could"
                                           b"n't load any languages!\nCould not in"
                                           b'itialize tesseract.\n',
                           'extension': 'tsv',
                           'input_filename': '/tmp/tmpc38mwy_w.png',
                           'lang': 'e+n+g',
                           'nice': 0,
                           'output_filename_base': '/tmp/tess_zz1i435s',
                           'proc': <Popen: returncode: 1 args: ['/tmp/.mount_NormCal5T7Nh/usr/bin/tesseract', '...>,
                           'timeout': 30}}
    

    Exception:

      pytesseract.pytesseract.TesseractError: (1, 'Error opening data file /home/REDACTED/.config/normcap/tessdata/e.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory. Failed loading language \'e\' Error opening data file /home/REDACTED/.config/normcap/tessdata/n.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory. Failed loading language \'n\' Error opening data file /home/REDACTED/.config/normcap/tessdata/g.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory. Failed loading language \'g\' Tesseract couldn\'t load any languages! Could not initialize tesseract.')
    

    Traceback:

      File "/tmp/.mount_NormCal5T7Nh/usr/app/normcap/gui/main_window.py", line 320, in _capture_to_ocr
        ocr_result = ocr.recognize(
      File "/tmp/.mount_NormCal5T7Nh/usr/app/normcap/ocr/recognize.py", line 46, in recognize
        tsv_data = pytesseract.image_to_data(
      File "/tmp/.mount_NormCal5T7Nh/usr/app_packages/pytesseract/pytesseract.py", line 517, in image_to_data
        return {
      File "/tmp/.mount_NormCal5T7Nh/usr/app_packages/pytesseract/pytesseract.py", line 523, in <lambda>
        Output.DICT: lambda: file_to_dict(run_and_get_output(*args), '\t', -1),
      File "/tmp/.mount_NormCal5T7Nh/usr/app_packages/pytesseract/pytesseract.py", line 284, in run_and_get_output
        run_tesseract(**kwargs)
      File "/tmp/.mount_NormCal5T7Nh/usr/app_packages/pytesseract/pytesseract.py", line 260, in run_tesseract
        raise TesseractError(proc.returncode, get_errors(error_string))
    
    bug 
    opened by bogdancovaciu 14
  • [ERROR] Not launching in Fedora 35 Wayland

    [ERROR] Not launching in Fedora 35 Wayland

    Log:

    19:12:31 - INFO - normcap.normcap - Starting NormCap v0.1.13 ...
    Traceback (most recent call last):
      File "/home/nep/.local/bin/normcap", line 8, in <module>
        sys.exit(run())
      File "/home/nep/.local/lib/python3.10/site-packages/normcap/__main__.py", line 5, in run
        _ = main()
      File "/home/nep/.local/lib/python3.10/site-packages/normcap/normcap.py", line 171, in main
        normcap_data = client_code(capture, normcap_data)
      File "/home/nep/.local/lib/python3.10/site-packages/normcap/normcap.py", line 122, in client_code
        result = handler.handle(normcap_data)
      File "/home/nep/.local/lib/python3.10/site-packages/normcap/handlers/capture_handler.py", line 44, in handle
        request = self._take_screenshot_alternative(request)
      File "/home/nep/.local/lib/python3.10/site-packages/normcap/handlers/capture_handler.py", line 101, in _take_screenshot_alternative
        img_complete = ImageGrab.grab(backend="gnome-screenshot")
      File "/home/nep/.local/lib/python3.10/site-packages/pyscreenshot/__init__.py", line 30, in grab
        return backend_grab(backend, bbox, childprocess)
      File "/home/nep/.local/lib/python3.10/site-packages/pyscreenshot/loader.py", line 156, in backend_grab
        return force(backend, bbox, childprocess)
      File "/home/nep/.local/lib/python3.10/site-packages/pyscreenshot/loader.py", line 150, in force
        im = obj.grab(bbox)
      File "/home/nep/.local/lib/python3.10/site-packages/pyscreenshot/plugins/gnome_screenshot.py", line 27, in grab
        im = read_prog_img([PROGRAM, "-f"])
      File "/home/nep/.local/lib/python3.10/site-packages/pyscreenshot/tempexport.py", line 27, in read_prog_img
        im = read_func_img(run_prog)
      File "/home/nep/.local/lib/python3.10/site-packages/pyscreenshot/tempexport.py", line 15, in read_func_img
        func(filename, bbox)
      File "/home/nep/.local/lib/python3.10/site-packages/pyscreenshot/tempexport.py", line 25, in run_prog
        raise RunProgError(p.stderr)
    pyscreenshot.tempexport.RunProgError: ** Message: 19:12:31.876: Unable to use GNOME Shell's builtin screenshot interface, resorting to fallback X11.
    
    (gnome-screenshot:15494): Gdk-CRITICAL **: 19:12:31.876: gdk_pixbuf_get_from_surface: assertion 'width > 0 && height > 0' failed
    
    (gnome-screenshot:15494): GdkPixbuf-CRITICAL **: 19:12:31.876: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
    
    (gnome-screenshot:15494): GdkPixbuf-CRITICAL **: 19:12:31.876: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
    *** BUG ***
    In pixman_region32_init_rect: Invalid rectangle passed
    Set a breakpoint on '_pixman_log_error' to debug
    
    
    (gnome-screenshot:15494): GdkPixbuf-CRITICAL **: 19:12:31.876: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
    
    (gnome-screenshot:15494): GdkPixbuf-CRITICAL **: 19:12:31.876: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
    
    (gnome-screenshot:15494): Gtk-CRITICAL **: 19:12:31.906: gtk_window_resize: assertion 'width > 0' failed
    
    ** (gnome-screenshot:15494): CRITICAL **: 19:12:31.906: Unable to capture a screenshot of any window
    
    duplicate 
    opened by nesper8 13
  • Please help testing the new beta version 0.2.0-b1

    Please help testing the new beta version 0.2.0-b1

    I've published a 0.2.0-b1 beta-release, with major changes.

    It would be really great if you could help testing it and provide feedback (positive or negative) here in this ticket

    Changes

    • (Almost) total rewrite of NormCap!
    • Switch from Tk to Qt as UI Framework
    • Easy to use binary package releases (no hassle with dependencies anymore!)
    • Better support for HiDPI
    • Better support multi monitor setups (MacOS)
    • Better support for Wayland (Linux)
    • Experimental system tray support (start with --tray )

    How to test

    Either download the binary/installer or build from source off the branch feature/switch-to-qt5.

    The updated README provides additional information.

    help wanted 
    opened by dynobo 11
  • I shall open an Issue - Error tk Mac OSX

    I shall open an Issue - Error tk Mac OSX

    It said so so I did. Mac OS Sierra (10.12) installed with pip (Python3.9) launched from Terminal normcap useful Application Window never appeared.

    If you need anymore information ask for it I am happy to help.

    Bildschirmfoto 2021-03-05 um 11 42 11 bug help wanted 
    opened by tcptps 11
  • [flatpak] Fails to start in Ubuntu Unity with

    [flatpak] Fails to start in Ubuntu Unity with "Invalid tesseract version"

    Here is the error message. I am running Ubuntu Unity 22.10.

    $ flatpak run com.github.dynobo.normcap 
    ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
    Gtk-Message: 18:33:58.284: Failed to load module "xapp-gtk3-module"
    Gtk-Message: 18:33:58.284: Failed to load module "unity-gtk-module"
    Gtk-Message: 18:33:58.345: Failed to load module "canberra-gtk-module"
    Gtk-Message: 18:33:58.345: Failed to load module "canberra-gtk-module"
    18:33:58 - CRITICAL - normcap.gui.utils:160 - Uncaught exception! Quitting NormCap!
    18:33:58 - WARNING - normcap.screengrab.utils:92 - Exception when trying to get gnome version from xml 
    

    System:

    {  'cli_args': '/app/bin/normcap',
       'config_directory': PosixPath('/home/REDACTED/.var/app/com.github.dynobo.normcap/config/normcap'),
       'desktop_environment': <DesktopEnvironment.GNOME: 1>,
       'display_manager_is_wayland': False,
       'envs': {  'LD_LIBRARY_PATH': '',
                  'TESSDATA_PREFIX': '/app/share',
                  'TESSERACT_CMD': None,
                  'TESSERACT_VERSION': None},
       'gnome_version': None,
       'is_flatpak_package': True,
       'is_prebuild_package': None,
       'normcap_version': '0.3.12',
       'platform': 'linux',
       'pyside6_version': '6.4.0',
       'qt_library_path': '/usr/share/runtime/lib/plugins, '
                          '/app/lib/python3.9/site-packages/PySide6/Qt/plugins',
       'qt_version': '6.4.0',
       'screens': {},
       'tessdata_path': '/home/REDACTED/.var/app/com.github.dynobo.normcap/config/normcap/tessdata'}
    

    Variables:

                      '__builtins__': <module 'builtins' (built-in)>,
                      '__cached__': None,
                      '__doc__': None,
                      '__file__': '/app/bin/normcap',
                      '__loader__': <_frozen_importlib_external.SourceFileLoader object at 0x7facee1eaf70>,
                      '__name__': '__main__',
                      '__package__': None,
                      '__spec__': None,
                      'main': <function main at 0x7facee13b3a0>,
                      're': <module 're' from '/usr/lib/python3.9/re.py'>,
                      'sys': <module 'sys' (built-in)>},
       'main': {  'args': Namespace(color=None, language=None, mode=None, notification=None, tray=None, update=None, reset=False, verbosity='warning'),
                  'logger': <Logger normcap (WARNING)>},
       'qt_log_wrapper': {  '_': <PySide6.QtCore.QMessageLogContext object at 0x7face71867c0>,
                            'message': 'QApplication: invalid style override '
                                       "'kvantum' passed, ignoring it.\n"
                                       '\tAvailable styles: Windows, Fusion',
                            'mode': <QtMsgType.QtWarningMsg: 1>}}
    

    Exception:

      AttributeError: 'str' object has no attribute 'decode'
    

    Traceback:

      File "/app/bin/normcap", line 8, in <module>
        sys.exit(main())
      File "/app/lib/python3.9/site-packages/normcap/app.py", line 54, in main
        app = QtWidgets.QApplication(sys.argv)
      File "/app/lib/python3.9/site-packages/normcap/gui/utils.py", line 53, in qt_log_wrapper
        level = mode.name.decode("utf8").lower()
    

    18:33:58 - CRITICAL - normcap.gui.utils:227 - Please open an issue with the output above on https://github.com/dynobo/normcap/issues

    bug 
    opened by apandada1 10
  • delayed screen capture and no notifications in versions newer than 0.3.0 (Windows)

    delayed screen capture and no notifications in versions newer than 0.3.0 (Windows)

    I just updated to the latest version normcap-0.3.4 after a Windows 10 reinstall. In this version, the screen capture function is heavily delayed for me (a few seconds) and no Windows notification appears anymore after successful text recognition.

    A downgrade to 0.3.0 fixed the problem. But I had to remove some registry keys manually to reinstall an older version.

    Thanks a lot for your work. I enjoy normcap.

    bug 
    opened by schnednet 10
  • [Feature Request] Would a flatpak package distribution be possible?

    [Feature Request] Would a flatpak package distribution be possible?

    Would it maybe be possible to add a flatpak based distribution?

    I asking because i can see myself and others running this software on a day to day basis and I came to like flatpak packages since i find the concepts it imploys
    (sandbox, dbus(gates), shared repos (ostree), xdg desktop integration, configurable repository, ... ) rather compeling and in comparison to other alternatives complete (mature).

    Since there is already an appimage, i guess flatpak might already be known, but just in case here are addional links:

    • General: https://flatpak.org/
    • Getting Started Guide: https://docs.flatpak.org/en/latest/first-build.html

    Thanks for reading and maybe considering it.

    enhancement 
    opened by igorlogius 10
  • Crashes on notifier when trying to capture text

    Crashes on notifier when trying to capture text

    Hi, I am having this same problem with version 0.3.9 and 0.3.10, but it works fine with version 0.3.8

    I am using Endeavor OS with everything updated.

    It is happening in my 2 systems with the exact same result, I select the area then the KDE panel freeze for this 30 secs, until it timeout, and the text is not copied to my clipboard.

    System:

    {  'cli_args': '/tmp/.mount_NormCaVd77ep/usr/app/normcap/__main__.py',
       'config_directory': PosixPath('/home/REDACTED/.config/normcap'),
       'desktop_environment': <DesktopEnvironment.KDE: 2>,
       'display_manager_is_wayland': False,
       'envs': {  'LD_LIBRARY_PATH': None,
                  'TESSDATA_PREFIX': None,
                  'TESSERACT_CMD': '/tmp/.mount_NormCaVd77ep/usr/bin/tesseract',
                  'TESSERACT_VERSION': None},
       'gnome_version': None,
       'is_flatpak_package': False,
       'is_prebuild_package': 'briefcase',
       'normcap_version': '0.3.10',
       'platform': 'linux',
       'pyside6_version': '6.2.4',
       'qt_library_path': '/tmp/.mount_NormCaVd77ep/usr/app_packages/PySide6/Qt/plugins, '
                          '/tmp/.mount_NormCaVd77ep/usr/bin',
       'qt_version': '6.2.4',
       'screens': {  0: Screen(is_primary=True,
                               device_pixel_ratio=1.0,
                               geometry=Rect(left=0,
                                             top=0,
                                             right=1920,
                                             bottom=1080),
                               index=0,
                               screenshot=None)},
       'tessdata_path': '/home/REDACTED/.config/normcap/tessdata'}
    

    Variables:

                          'input': None,
                          'orig_timeout': 30,
                          'selector': <selectors.PollSelector object at 0x7f9e20972830>,
                          'self': 'REDACTED',
                          'stderr': None,
                          'stdout': None},
       '_wait': {  'delay': 0.02221966999786673,
                   'endtime': 19036.506140264,
                   'pid': 0,
                   'remaining': -0.00020479600061662495,
                   'self': 'REDACTED',
                   'sts': 0,
                   'timeout': 29.99998025199966},
       'communicate': {  'endtime': 19036.506138091,
                         'input': None,
                         'self': 'REDACTED',
                         'timeout': 30},
       'run': {  'capture_output': False,
                 'check': True,
                 'input': None,
                 'kwargs': {...},
                 'popenargs': (...,),
                 'process': <Popen: returncode: -9 args: ['notify-send', '--icon=/tmp/.mount_NormCaVd77e...>,
                 'timeout': 30},
       'send_notification': {  'capture': Capture(mode=<CaptureMode.PARSE: 1>,
                                                  image=<PySide6.QtGui.QImage(QSize(267, 44),format=QImage::Format_RGB32,depth=32,devicePixelRatio=1,bytesPerLine=1068,sizeInBytes=46992) at 0x7f9e2094e480>,
                                                  screen=Screen(is_primary=True,
                                                                device_pixel_ratio=1.0,
                                                                geometry=Rect(left=0,
                                                                              top=0,
                                                                              right=1920,
                                                                              bottom=1080),
                                                                index=0,
                                                                screenshot=<PySide6.QtGui.QImage(QSize(1920, 1080),format=QImage::Format_RGB32,depth=32,devicePixelRatio=1,bytesPerLine=7680,sizeInBytes=8294400) at 0x7f9e2094ca80>),
                                                  scale_factor=1,
                                                  rect=Rect(left=819,
                                                            top=140,
                                                            right=1086,
                                                            bottom=184),
                                                  ocr_text='REDACTED',
                                                  ocr_applied_magic='SingleLineMagic'),
                               'message': './NormCap-0.3.10-x86_64.appimage',
                               'self': 'REDACTED',
                               'title': '1 word captured'},
       'send_via_libnotify': {  'icon_path': PosixPath('/tmp/.mount_NormCaVd77ep/usr/app/normcap/resources/tray.png'),
                                'message': './NormCap-0.3.10-x86_64.appimage',
                                'self': 'REDACTED',
                                'title': '1 word captured'},
       'wait': {  'endtime': 19036.506139008,
                  'self': 'REDACTED',
                  'timeout': 29.99998025199966}}
    

    Exception:

      subprocess.TimeoutExpired: Command '['notify-send', '--icon=/tmp/.mount_NormCaVd77ep/usr/app/normcap/resources/tray.png', '--app-name=NormCap', '1 word captured', './NormCap-0.3.10-x86_64.appimage']' timed out after 29.99998025199966 seconds
    

    Traceback:

      File "/tmp/.mount_NormCaVd77ep/usr/app/normcap/gui/notifier.py", line 34, in send_notification
        self.send_via_libnotify(title, message)
      File "/tmp/.mount_NormCaVd77ep/usr/app/normcap/gui/notifier.py", line 46, in send_via_libnotify
        subprocess.run(
      File "/tmp/.mount_NormCaVd77ep/usr/lib/python3.10/subprocess.py", line 503, in run
        stdout, stderr = process.communicate(input, timeout=timeout)
      File "/tmp/.mount_NormCaVd77ep/usr/lib/python3.10/subprocess.py", line 1152, in communicate
        stdout, stderr = self._communicate(input, endtime, timeout)
      File "/tmp/.mount_NormCaVd77ep/usr/lib/python3.10/subprocess.py", line 2029, in _communicate
        self.wait(timeout=self._remaining_time(endtime))
      File "/tmp/.mount_NormCaVd77ep/usr/lib/python3.10/subprocess.py", line 1207, in wait
        return self._wait(timeout=timeout)
      File "/tmp/.mount_NormCaVd77ep/usr/lib/python3.10/subprocess.py", line 1933, in _wait
        raise TimeoutExpired(self.args, timeout)
    
    bug 
    opened by OLoKo64 8
  • [Linux] Latest version ( 0.3.7 ) doesn't copy text to clipboard

    [Linux] Latest version ( 0.3.7 ) doesn't copy text to clipboard

    I'm sorry that I keep discovering issues, but I thought I should let you know that the latest version ( 0.3.7 ) doesn't copy text to the clipboard, atleast on Fedora KDE Wayland. The AppImage of 0.3.5 works. In the CLI output it recognizes the text fine.

    Another thing is the AppImage has notifications and tray support, but the flatpak doesn't. Also, the flatpak sometimes doesn't copy to clipboard, even on older versions. The AppImage of 0.3.5 is the most reliable (for me).

    bug 
    opened by pizzadude 8
  • [Win 10] Normcap windows notifications can't turned back on

    [Win 10] Normcap windows notifications can't turned back on

    Before my i would like to thank you for application, it is just what i wanted. I am not a programmer of anykind i just wanted app like this for everyday use so here is my problem. I turned of the windows notifications form notifications area but it was a bad decision and i wanted to turn it back on but i can't find any option to turn the apps notifications on. I guess because app is working from a file and not installed the pc windows does not sees the app and i can't be found in the notifications settings. Because of that maybe there can be a another download option like a setup to improve notification settings etc. Or do you know i way i can handle this issue ?

    enhancement 
    opened by Barisrky 8
  • Blank screen on Arch

    Blank screen on Arch

    I run archlinux kde and upon launching normcap I only see this: Screenshot_2021 11 30_15:17:58 It seems to be inline with issue 126 over on giters, although it wasn't fixed for me by enabling the compositor (it was never off), and I know that I can have transparent windows, asl GLava works fine. Here's my logs:

    normcap -V
    
    15:20:08 - INFO    - normcap.app            - L:41  - Start NormCap v0.2.8
    15:20:08 - DEBUG   - normcap.app            - L:42  - CLI command: /usr/bin/normcap -V
    15:20:08 - DEBUG   - normcap.app            - L:43  - QT LibraryPaths: ['/usr/lib/qt/plugins']
    QSslSocket:  OpenSSL 1.1.1l  24 Aug 2021 True
    15:20:08 - INFO    - normcap.utils          - L:150 - Copy 0 traineddata files to config directory
    15:20:08 - DEBUG   - normcap.app            - L:65  - System info:
    {  'config_directory': PosixPath('/home/felix/.config/normcap'),
       'desktop_environment': <DesktopEnvironment.KDE: 2>,
       'display_manager': <DisplayManager.X11: 2>,
       'is_briefcase_package': False,
       'normcap_version': '0.2.8',
       'platform': 'linux',
       'pyside2_version': '5.15.2',
       'qt_version': '5.15.2',
       'screens': {  0: ScreenInfo(is_primary=True, device_pixel_ratio=1.0, geometry=Rect(left=1920, top=0, right=3840, bottom=1080), index=0),
                     1: ScreenInfo(is_primary=False, device_pixel_ratio=1.0, geometry=Rect(left=0, top=0, right=1920, bottom=1080), index=1),
                     2: ScreenInfo(is_primary=False, device_pixel_ratio=1.0, geometry=Rect(left=3840, top=0, right=4890, bottom=1680), index=2)},
       'tessdata_path': '/usr/share/tessdata/',
       'tesseract_languages': ['eng', 'osd'],
       'tesseract_version': '4.1.1'}
    15:20:08 - DEBUG   - normcap.base_window    - L:49  - Create window for screen 0
    15:20:08 - DEBUG   - normcap.base_window    - L:248 - Set window for screen 0 to fullscreen
    15:20:08 - DEBUG   - normcap.system_tray    - L:21  - Set up tray icon
    15:20:08 - DEBUG   - normcap.base_window    - L:49  - Create window for screen 1
    15:20:08 - DEBUG   - normcap.base_window    - L:248 - Set window for screen 1 to fullscreen
    15:20:08 - DEBUG   - normcap.base_window    - L:49  - Create window for screen 2
    15:20:08 - DEBUG   - normcap.base_window    - L:248 - Set window for screen 2 to fullscreen
    15:20:09 - DEBUG   - normcap.main_window    - L:179 - Hide 3 window(s)
    15:20:10 - INFO    - normcap.main_window    - L:272 - Take screenshot of position (2174, 171, 3197, 885)
    15:20:10 - DEBUG   - normcap.screengrab     - L:32  - Grab screen: ScreenInfo(is_primary=True, device_pixel_ratio=1.0, geometry=Rect(left=1920, top=0, right=3840, bottom=1080), index=0)
    15:20:10 - DEBUG   - normcap.screengrab     - L:73  - Use capture method: QT by screen
    15:20:10 - DEBUG   - normcap.utils          - L:32  - Store debug image in: /tmp/normcap/2021-11-30_15-20-10_009850_raw_qt.png
    15:20:10 - DEBUG   - normcap.screengrab     - L:106 - Screen scale factor: 1.0
    15:20:10 - DEBUG   - normcap.screengrab     - L:107 - Image devicePixelRatio: 1.0
    15:20:10 - DEBUG   - normcap.screengrab     - L:110 - Image crop box rect: (254, 171, 1023, 714)
    15:20:10 - DEBUG   - normcap.utils          - L:32  - Store debug image in: /tmp/normcap/2021-11-30_15-20-10_086670_cropped.png
    15:20:10 - DEBUG   - normcap.main_window    - L:281 - Prepare image for OCR
    15:20:10 - INFO    - normcap.enhance        - L:17  - Apply enhancements to image
    15:20:10 - DEBUG   - normcap.enhance        - L:92  - Resize screenshot by factor 3.2
    15:20:10 - DEBUG   - normcap.utils          - L:32  - Store debug image in: /tmp/normcap/2021-11-30_15-20-10_111800_enlarged.png
    15:20:10 - DEBUG   - normcap.utils          - L:32  - Store debug image in: /tmp/normcap/2021-11-30_15-20-10_334464_padded.png
    15:20:10 - DEBUG   - normcap.main_window    - L:290 - Perform OCR
    15:20:10 - DEBUG   - normcap.ocr            - L:62  - Init tesseract with args: {'path': '/usr/share/tessdata/', 'lang': 'eng', 'oem': 1, 'psm': 1}
    15:20:11 - INFO    - normcap.ocr            - L:85  - PSM Mode: 1, OSM Mode: 1, Mean Conf: 13.00
    15:20:11 - INFO    - normcap.main_window    - L:295 - Raw text from OCR:
    [= —— — ——————————————————————— ——————————— ————————— —————————————————— ——————————————————
    15:20:11 - DEBUG   - normcap.main_window    - L:296 - Result from OCR:
    best_magic: 
    image: <PySide2.QtGui.QImage(QSize(3433, 2444),format=QImage::Format_RGB32,depth=32,devicePixelRatio=1,bytesPerLine=13732,sizeInBytes=33561008) at 0x7f755bb5cfc0>
    image_area: 8390252
    image_size: (3433, 2444)
    lines: [= ——  — ——————————————————————— ——————————— ————————— —————————————————— ——————————————————
    mean_conf: 14.625
    mode: 1
    num_blocks: 1
    num_lines: 1
    num_pars: 1
    psm_opt: 1
    rect: Rect(left=2174, top=171, right=3197, bottom=885)
    scale_factor: 1.0
    scores: {}
    screen: ScreenInfo(is_primary=True, device_pixel_ratio=1.0, geometry=Rect(left=1920, top=0, right=3840, bottom=1080), index=0)
    text: [= —— — ——————————————————————— ——————————— ————————— —————————————————— ——————————————————
    transformed: 
    words: 
    level:5  | page_num:1  | block_num:1  | par_num:1  | line_num:1  | word_num:1  | left:134  | top:102  | width:36   | height:34   | conf:4  | text:[=
    level:5  | page_num:1  | block_num:1  | par_num:1  | line_num:1  | word_num:2  | left:175  | top:115  | width:70   | height:7    | conf:16 | text:——
    level:5  | page_num:1  | block_num:1  | par_num:1  | line_num:1  | word_num:3  | left:259  | top:115  | width:63   | height:7    | conf:0  | text: —
    level:5  | page_num:1  | block_num:1  | par_num:1  | line_num:1  | word_num:4  | left:329  | top:115  | width:3024 | height:7    | conf:0  | text:———————————————————————
    level:5  | page_num:1  | block_num:1  | par_num:1  | line_num:1  | word_num:5  | left:1205 | top:102  | width:423  | height:34   | conf:27 | text:———————————
    level:5  | page_num:1  | block_num:1  | par_num:1  | line_num:1  | word_num:6  | left:1627 | top:102  | width:347  | height:34   | conf:24 | text:—————————
    level:5  | page_num:1  | block_num:1  | par_num:1  | line_num:1  | word_num:7  | left:1973 | top:102  | width:692  | height:34   | conf:33 | text:——————————————————
    level:5  | page_num:1  | block_num:1  | par_num:1  | line_num:1  | word_num:8  | left:2664 | top:102  | width:692  | height:34   | conf:13 | text:——————————————————
    15:20:11 - DEBUG   - normcap.main_window    - L:302 - Apply Magics
    15:20:11 - INFO    - normcap.email_magic    - L:33  - 0 emails found ['']
    15:20:11 - DEBUG   - normcap.email_magic    - L:44  - 0/91 chars in emails. Ratio: 0.0)
    15:20:11 - INFO    - normcap.url_magic      - L:52  - 0 URLs found ['']
    15:20:11 - DEBUG   - normcap.url_magic      - L:62  - 0 of 91 chars in emails (ratio: 0.0)
    15:20:11 - DEBUG   - normcap.magic          - L:70  - All scores: {'SingleLineMagic': 50, 'MultiLineMagic': 0, 'ParagraphMagic': 0.0, 'EmailMagic': 0.0, 'UrlMagic': 0.0}
    15:20:11 - INFO    - normcap.magic          - L:87  - Highest scored magic: SingleLineMagic (50)
    15:20:11 - DEBUG   - normcap.main_window    - L:304 - Result from applying Magics:
    best_magic: SingleLineMagic
    image: <PySide2.QtGui.QImage(QSize(3433, 2444),format=QImage::Format_RGB32,depth=32,devicePixelRatio=1,bytesPerLine=13732,sizeInBytes=33561008) at 0x7f755bb5cfc0>
    image_area: 8390252
    image_size: (3433, 2444)
    lines: [= ——  — ——————————————————————— ——————————— ————————— —————————————————— ——————————————————
    mean_conf: 14.625
    mode: 1
    num_blocks: 1
    num_lines: 1
    num_pars: 1
    psm_opt: 1
    rect: Rect(left=2174, top=171, right=3197, bottom=885)
    scale_factor: 1.0
    scores: {'SingleLineMagic': 50, 'MultiLineMagic': 0, 'ParagraphMagic': 0.0, 'EmailMagic': 0.0, 'UrlMagic': 0.0}
    screen: ScreenInfo(is_primary=True, device_pixel_ratio=1.0, geometry=Rect(left=1920, top=0, right=3840, bottom=1080), index=0)
    text: [= —— — ——————————————————————— ——————————— ————————— —————————————————— ——————————————————
    transformed: [= —— — ——————————————————————— ——————————— ————————— —————————————————— ——————————————————
    words: 
    level:5  | page_num:1  | block_num:1  | par_num:1  | line_num:1  | word_num:1  | left:134  | top:102  | width:36   | height:34   | conf:4  | text:[=
    level:5  | page_num:1  | block_num:1  | par_num:1  | line_num:1  | word_num:2  | left:175  | top:115  | width:70   | height:7    | conf:16 | text:——
    level:5  | page_num:1  | block_num:1  | par_num:1  | line_num:1  | word_num:3  | left:259  | top:115  | width:63   | height:7    | conf:0  | text: —
    level:5  | page_num:1  | block_num:1  | par_num:1  | line_num:1  | word_num:4  | left:329  | top:115  | width:3024 | height:7    | conf:0  | text:———————————————————————
    level:5  | page_num:1  | block_num:1  | par_num:1  | line_num:1  | word_num:5  | left:1205 | top:102  | width:423  | height:34   | conf:27 | text:———————————
    level:5  | page_num:1  | block_num:1  | par_num:1  | line_num:1  | word_num:6  | left:1627 | top:102  | width:347  | height:34   | conf:24 | text:—————————
    level:5  | page_num:1  | block_num:1  | par_num:1  | line_num:1  | word_num:7  | left:1973 | top:102  | width:692  | height:34   | conf:33 | text:——————————————————
    level:5  | page_num:1  | block_num:1  | par_num:1  | line_num:1  | word_num:8  | left:2664 | top:102  | width:692  | height:34   | conf:13 | text:——————————————————
    15:20:11 - DEBUG   - normcap.clipboard      - L:15  - Copy to clipboard:
    [= —— — ——————————————————————— ——————————— ————————— —————————————————— ——————————————————
    15:20:11 - DEBUG   - normcap.notifier       - L:29  - Send notification
    15:20:11 - DEBUG   - normcap.main_window    - L:207 - Path to debug images: /tmp/normcap
    15:20:11 - INFO    - normcap.main_window    - L:208 - Exit normcap (reason: notification sent)
    
    bug 
    opened by fischer-felix 7
  • Normcap for ARM64

    Normcap for ARM64

    It would be great if you enable arm64 builds of Normcap in Flathub. Nowadays, there are a lot of powerful ARM computers which can run GNU/Linux.

    Since Normcap is written in Python, it should work out of the box on ARM.

    enhancement help wanted 
    opened by apandada1 3
  • [Linux] FlatPak crashs with

    [Linux] FlatPak crashs with "TimeoutError" on Gnome 43

    System:

    {  'cli_args': '/app/bin/normcap -v debug',
       'config_directory': PosixPath('/home/REDACTED/.var/app/com.github.dynobo.normcap/config/normcap'),
       'desktop_environment': <DesktopEnvironment.GNOME: 1>,
       'display_manager_is_wayland': True,
       'envs': {  'LD_LIBRARY_PATH': '',
                  'TESSDATA_PREFIX': '/app/share',
                  'TESSERACT_CMD': None,
                  'TESSERACT_VERSION': None},
       'gnome_version': None,
       'is_flatpak_package': True,
       'is_prebuild_package': None,
       'normcap_version': '0.3.14',
       'platform': 'linux',
       'pyside6_version': '6.4.0.1',
       'qt_library_path': '/usr/share/runtime/lib/plugins, '
                          '/app/lib/python3.9/site-packages/PySide6/Qt/plugins, '
                          '/usr/bin',
       'qt_version': '6.4.0',
       'screens': {  0: Screen(is_primary=True, device_pixel_ratio=1.0, geometry=Rect(left=0, top=0, right=1920, bottom=1080), index=0, screenshot=None)},
       'tessdata_path': '/home/REDACTED/.var/app/com.github.dynobo.normcap/config/normcap/tessdata'}
    

    Variables:

                      '__builtins__': <module 'builtins' (built-in)>,
                      '__cached__': None,
                      '__doc__': None,
                      '__file__': '/app/bin/normcap',
                      '__loader__': <_frozen_importlib_external.SourceFileLoader object at 0x7f8b1c1e5c10>,
                      '__name__': '__main__',
                      '__package__': None,
                      '__spec__': None,
                      'main': <function main at 0x7f8b1c0a53a0>,
                      're': <module 're' from '/usr/lib/python3.9/re.py'>,
                      'sys': <module 'sys' (built-in)>},
       '__init__': {  '__class__': <class 'normcap.gui.tray.SystemTray'>,
                      'args': {...},
                      'parent': <PySide6.QtWidgets.QApplication(0x5591af3c10b0) at 0x7f8b15187580>,
                      'self': 'REDACTED'},
       '_read_some_data': {'self': 'REDACTED', 'timeout': 14.999996797996573},
       '_receive': {  'deadline': 17350.304494858996,
                      'msg': None,
                      'self': 'REDACTED'},
       '_update_screenshots': {  'capture': <function capture at 0x7f8b10dcfe50>,
                                 'self': 'REDACTED'},
       'capture': {},
       'grab_full_desktop': {  'connection': <jeepney.io.blocking.DBusConnection object at 0x7f8b1518b700>,
                               'handle': '/org/freedesktop/portal/desktop/request/1_1460/normcap_fgjajpag',
                               'image': None,
                               'msg': Message(Header(<Endianness.little: 1>, <MessageType.method_call: 1>, <MessageFlag.0: 0>, 1, 88, -1, fields={<HeaderFields.path: 1>: '/org/freedesktop/portal/desktop', <HeaderFields.destination: 6>: 'org.freedesktop.portal.Desktop', <HeaderFields.interface: 2>: 'org.freedesktop.portal.Screenshot', <HeaderFields.member: 3>: 'Screenshot', <HeaderFields.signature: 8>: 'sa{sv}'}), ('', {'handle_token': ('s', 'normcap_fgjajpag'), 'interactive': ('b', False)})),
                               'pseudo_unique_str': 'fgjajpag',
                               'response_rule': <jeepney.bus_messages.MatchRule object at 0x7f8b10dce250>,
                               'responses': deque([], maxlen=1),
                               'sender_name': '1_1460',
                               'token': 'normcap_fgjajpag'},
       'main': {  'app': <PySide6.QtWidgets.QApplication(0x5591af3c10b0) at 0x7f8b15187580>,
                  'args': Namespace(color=None, language=None, mode=None, notification=None, tray=None, update=None, reset=False, verbosity='debug', version=False),
                  'logger': <Logger normcap (DEBUG)>},
       'receive': {'self': 'REDACTED', 'timeout': 14.999998282997694},
       'recv_messages': {'self': 'REDACTED', 'timeout': 14.999998282997694},
       'recv_until_filtered': {  'deadline': 17350.304492661,
                                 'queue': deque([], maxlen=1),
                                 'self': 'REDACTED',
                                 'timeout': 15}}
    

    Exception:

      TimeoutError
    

    Traceback:

      File "/app/bin/normcap", line 8, in <module>
        sys.exit(main())
      File "/app/lib/python3.9/site-packages/normcap/app.py", line 58, in main
        tray = SystemTray(app, vars(args))
      File "/app/lib/python3.9/site-packages/normcap/gui/tray.py", line 72, in __init__
        self._update_screenshots()
      File "/app/lib/python3.9/site-packages/normcap/gui/tray.py", line 164, in _update_screenshots
        screens = capture()
      File "/app/lib/python3.9/site-packages/normcap/screengrab/dbus_portal.py", line 91, in capture
        full_image = grab_full_desktop()
      File "/app/lib/python3.9/site-packages/normcap/screengrab/dbus_portal.py", line 68, in grab_full_desktop
        response = connection.recv_until_filtered(responses, timeout=15)
      File "/app/lib/python3.9/site-packages/jeepney/io/blocking.py", line 242, in recv_until_filtered
        self.recv_messages(timeout=deadline_to_timeout(deadline))
      File "/app/lib/python3.9/site-packages/jeepney/io/blocking.py", line 172, in recv_messages
        msg = self.receive(timeout=timeout)
      File "/app/lib/python3.9/site-packages/jeepney/io/blocking.py", line 165, in receive
        return self._receive(timeout_to_deadline(timeout))
      File "/app/lib/python3.9/site-packages/jeepney/io/blocking.py", line 102, in _receive
        b, fds = self._read_some_data(timeout=deadline_to_timeout(deadline))
      File "/app/lib/python3.9/site-packages/jeepney/io/blocking.py", line 113, in _read_some_data
        raise TimeoutError
    
    bug 
    opened by dynobo 6
  • Add possibility to re-capture via hotkey when NormCap is running in tray

    Add possibility to re-capture via hotkey when NormCap is running in tray

    Problem description

    Right now, the only options to repeatedly perform captures are:

    1. Configure your system to start NormCap via a Hotkey and deactivate NormCap's "Keep in system tray" setting. Then you can repeatedly capture text via that hotkey.
      • :heavy_plus_sign: Keyboard driven
      • :heavy_minus_sign: Slower, as startup time of NormCap adds up
      • :heavy_minus_sign: It's not always clear, when NormCap is closed completely and ready for a second capture
    2. Activate NormCap's "Keep in system tray" setting. Then you can repeatedly capture texts via right-click on the tray icon and selecting "Capture".
      • :heavy_plus_sign: Faster, as NormCap is already loaded
      • :heavy_minus_sign: Not accessible via keyboard
      • :heavy_minus_sign: One right-click and one left-click needed

    The goal of this ticket is to improve the situation by enabling re-capture from tray via a hotkey.

    Solution idea

    On most operating system's NormCap can't (and doesn't want to) listen to keyboard input for hotkeys all the time, so one idea to tackle this issue could be to modify NormCap's startup behavior:

    • As a very first step when NormCap is executed, check if NormCap is already running in the system tray
    • If it is, just trigger a re-capture in this already running instance and immediately quit the second instance.

    Pro:

    • This would also solve the issue, that currently multiple instances of NormCap can be started (but shouldn't).

    Open questions:

    • How to communicate with the already running instance? Socket?
    • Does this solution work with all kind of packages of NormCap?

    Intermediate Workaround

    A quick and easy improvement could be to implement a "Capture on left-click" and "Open menu on right-click" behavior for the system tray. While not perfect, this might be fairly simple to implement and saves the user one right-click.

    enhancement help wanted 
    opened by dynobo 0
  • [Linux]

    [Linux] "ValueError: A distribution name is required" after installing on pip on Kubuntu

    After running normcap in command line I get the following error:

    5:23:59` - ERROR - normcap.utils - L:104 - Uncaught exception! Quitting NormCap! Traceback (most recent call last): File "/home/tavit/.local/bin/normcap", line 8, in sys.exit(main()) File "/home/tavit/.local/lib/python3.8/site-packages/normcap/app.py", line 56, in main logger.debug("System info:\n%s", system_info.to_string()) File "/home/tavit/.local/lib/python3.8/site-packages/normcap/system_info.py", line 190, in to_string is_briefcase_package=is_briefcase_package(), File "/home/tavit/.local/lib/python3.8/site-packages/normcap/system_info.py", line 161, in is_briefcase_package metadata = importlib_metadata.metadata(app_module) File "/home/tavit/.local/lib/python3.8/site-packages/importlib_metadata/init.py", line 1011, in metadata return Distribution.from_name(distribution_name).metadata File "/home/tavit/.local/lib/python3.8/site-packages/importlib_metadata/init.py", line 567, in from_name raise ValueError("A distribution name is required.") ValueError: A distribution name is required.

    It seem to work after I commented line responsible for exception.

    opened by tavit111 1
Releases(v0.3.15)
aardio的opencv库

opencv_aardio dll库下载地址:https://github.com/xuncv/opencv-plugin/releases import cv2 img = cv2.imread("./images/Lena.jpg",1) img = cv2.medianBlur(img,5)

71 Dec 31, 2022
Document Layout Analysis

Eynollah Document Layout Analysis Introduction This tool performs document layout analysis (segmentation) from image data and returns the results as P

QURATOR-SPK 198 Dec 29, 2022
Code for the paper STN-OCR: A single Neural Network for Text Detection and Text Recognition

STN-OCR: A single Neural Network for Text Detection and Text Recognition This repository contains the code for the paper: STN-OCR: A single Neural Net

Christian Bartz 496 Jan 05, 2023
A small C++ implementation of LSTM networks, focused on OCR.

clstm CLSTM is an implementation of the LSTM recurrent neural network model in C++, using the Eigen library for numerical computations. Status and sco

Tom 794 Dec 30, 2022
Just a script for detecting the lanes in any car game (not just gta 5) with specific resolution and road design ( very basic and limited )

GTA-5-Lane-detection Just a script for detecting the lanes in any car game (not just gta 5) with specific resolution and road design ( very basic and

Danciu Georgian 4 Aug 01, 2021
An Agnostic Computer Vision Framework - Pluggable to any Training Library: Fastai, Pytorch-Lightning with more to come

An Agnostic Object Detection Framework IceVision is the first agnostic computer vision framework to offer a curated collection with hundreds of high-q

airctic 790 Jan 05, 2023
1st place solution for SIIM-FISABIO-RSNA COVID-19 Detection Challenge

SIIM-COVID19-Detection Source code of the 1st place solution for SIIM-FISABIO-RSNA COVID-19 Detection Challenge. 1.INSTALLATION Ubuntu 18.04.5 LTS CUD

Nguyen Ba Dung 170 Dec 21, 2022
Rotational region detection based on Faster-RCNN.

R2CNN_Faster_RCNN_Tensorflow Abstract This is a tensorflow re-implementation of R2CNN: Rotational Region CNN for Orientation Robust Scene Text Detecti

UCAS-Det 581 Nov 22, 2022
Rubik's Cube in pygame with OpenGL

Rubik Rubik's Cube in pygame with OpenGL The script show on the screen a Rubik Cube buit with OpenGL. Then I have also implemented all the possible mo

Gabro 2 Apr 15, 2022
Turn images of tables into CSV data. Detect tables from images and run OCR on the cells.

Table of Contents Overview Requirements Demo Modules Overview This python package contains modules to help with finding and extracting tabular data fr

Eric Ihli 311 Dec 24, 2022
huoyijie 1.2k Dec 29, 2022
Official implementation of "An Image is Worth 16x16 Words, What is a Video Worth?" (2021 paper)

An Image is Worth 16x16 Words, What is a Video Worth? paper Official PyTorch Implementation Gilad Sharir, Asaf Noy, Lihi Zelnik-Manor DAMO Academy, Al

213 Nov 12, 2022
color detection using python

colordetection color detection using python In this color detection Python project, we are going to build an application through which you can automat

Ruchith Kumar 1 Nov 04, 2021
Natural language detection

Detect the language of text. What’s so cool about franc? franc can support more languages(†) than any other library franc is packaged with support for

Titus 3.8k Jan 02, 2023
Volume Control using OpenCV

Gesture-Volume-Control Volume Control using OpenCV Here i made volume control using Python and OpenCV in which we can control the volume of our laptop

Mudit Sinha 3 Oct 10, 2021
[BMVC'21] Official PyTorch Implementation of Grounded Situation Recognition with Transformers

Grounded Situation Recognition with Transformers Paper | Model Checkpoint This is the official PyTorch implementation of Grounded Situation Recognitio

Junhyeong Cho 18 Jul 19, 2022
This is an API written in python that uses FastAPI. It is a simple API that can detect discord tokens in Images.

Welcome This is an API written in python that uses FastAPI. It is a simple API that can detect discord tokens in Images. Installation There are curren

8 Jul 29, 2022
A simple Digits Recogniser made in Python

⭐ Python Digit Recogniser A simple digit Recogniser made in Python Demo Run Locally Clone the project git clone https://github.com/yashraj-n/python-

Yashraj narke 4 Nov 29, 2021
This repository contains codes on how to handle mouse event using OpenCV

Handling-Mouse-Click-Events-Using-OpenCV This repository contains codes on how t

Happy N. Monday 3 Feb 15, 2022
OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched

OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched or copy-pasted. ocrmypdf # it's a scriptable c

jbarlow83 7.9k Jan 03, 2023