Zamknięty

CLI linux software that builds a version of a scanned image to fit it's original based on QR codes

Ten projekt został przyznany użytkownikowi AImobile za $800 USD.

Otrzymaj darmowe wyceny do podobnego projektu
Budżet Projektu
$750 - $1500 USD
Ofert Razem
7
Opis Projektu

A PDF Page is generated by our software, that inserts a QR Code or a Barcode at a certain position of that page.

This very same Page is further printed and signed by technicians and, after that, is scanned.

The scanned image does not match it’s original file.

What we need is a command line interface software that runs on linux, windows and osx and that will change the scanned image so it perfectly matches it’s original file.

The command line interface should follow the use cases below:

#1 Find QR code inside any png/jpg image.

##########################################

Command:

--------

qrbarcode --findqr [url removed, login to view]

Result:

--------

{ 'filename': '[url removed, login to view]', 'width': 600, 'height': 1024, codes: [{ 'type': 'qr', 'value': 'text of the QR tag', 'position': { 'tl': [10, 10] 'tr': [50, 20], 'bl': [10, 50], 'br': [50, 50] }] }

#2 Find Barcode inside any png/jpg image.

##########################################

Command:

--------

qrbarcode --findbarcode [url removed, login to view]

Result:

--------

{ 'filename': '[url removed, login to view]', 'width': 600, 'height': 1024, codes: [{ 'type': 'bar', 'value': '098729464917', 'position': { 'tl': [10, 10] 'tr': [50, 20], 'bl': [10, 20], 'br': [50, 20] }] }

#3 Deskew and crop an image to fit it's original

##########################################

Command:

--------

qrbarcode --fit [url removed, login to view] --code "{ 'type': 'qr', 'value': 'text of the QR tag', 'position': { 'tl': [[url removed, login to view], [url removed, login to view]] 'tr': [[url removed, login to view], [url removed, login to view]], 'bl': [[url removed, login to view], [url removed, login to view]], 'br': [[url removed, login to view], [url removed, login to view]] }" [url removed, login to view]

Result:

--------

[url removed, login to view] generated based on the scanned image ([url removed, login to view]) but corrected using the information of the position of the qr code (or bar code).

Suggested Process of correcting the Scanned Image:

---------------------------------------------------

- Find the QR Code and it’s position on the scanned image, and find the one that matches the code argument (make sure we’re looking at the expected QR)

- Based on the corners of the QR Code, deskew the image (the QR Code becomes perfectly horizontal)

- Trim the Scanned Image so that the QR Code will match it’s relative position (as a percentage from top, left, bottom, right) to it’s position on the Original PDF Final (code argument);

- To that matter, this function will receive, as parameters, the QR Code position (4 corners) as percentages of the page size (From Left to Right, From Top to Bottom)

Further Details:

----------------

1) How to Deskew the Page (Rotation Correction)

- A line connecting the two top corners of the first QR-Code found on the image can have it’s angle calculated.

- Assuming the QR Code Top/Left Corner is QR-TL, QR Code Top/Right Corner is QR-TR and X,Y are it's corresponding coordinate (represented in pixels), the image angle is (QR-TL.Y minus QR-TR.Y) / (QR-TR.X minus QR-TL.X)

2) Trimming the Page (Position Correction)

- Say that in the original file the QR Code position is represented by QROrigTR, QROrigTL (both with X and Y coordinates and in pixels)

- Say that in the original final Page size is represented by POrig (also in pixels)

- This Function should FIND AGAIN QR Code Position in the Image and use the position of the QR Code in the image (again, after matching the code with the parameter)

- Say that QR Code position is represented by QRTR and QRTL (both with X and Y coordinates)

- Say that the size of the Scanned Page is represented by PScan

- Trim the page LEFT by Crop = [ QRTL.X-PScan.X*QROrigTL.X/POrig.X ] / [ 1-QROrigTL.X/POrig.X ]

- If Crop is Negative, a blank border is to be added to the image (the opposite effect of a trim), with Image Page height and Crop as width.

- Trim the page TOP by Crop = [ QRTL.Y-PScanY*QROrigTL.Y/POrigY ] / [ 1- QROrigTL.Y/POrig.Y ]

- If Crop is Negative, a blank border is to be added to the image (the opposite effect of a trim) with Image Page width and Crop as height.

Zlecony dla:

Chcesz zarobić trochę pieniędzy?

  • Napisz kwotę, za jaką jesteś w stanie podjąć się projektu i przedział czasowy, w którym będziesz w stanie go zrealizować
  • Opisz, w jaki sposób wykonasz projekt
  • Otrzymaj wynagrodzenie za pracę

Zatrudnij Freelancerów, którzy również składają oferty do tego projektu

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online