android icon indicating copy to clipboard operation
android copied to clipboard

As a user, I would like to take a picture of my handwritten notes or printed documents, scan them and upload it directly to my ownCloud

Open davigonz opened this issue 7 years ago • 30 comments

The current ownCloud Android app has different options to upload files to an ownCloud server, such as selecting them from the internal storage, selecting content from other apps or uploading photos directly from the camera.

It would be great to include a new option which enables the user to take a new picture with the camera and select the edges of handwritten notes or printed documents. After that, the image will be processed, adjusted to a better view and uploaded to a folder on the server.

davigonz avatar Feb 19 '18 09:02 davigonz

@davigonz I would like to work on this.

shashvat-kedia avatar Feb 19 '18 09:02 shashvat-kedia

Great @sd1998 , glad to hear you want to contribute with this. Just for you to know, there's a bounty for implementing this feature.

davigonz avatar Feb 21 '18 15:02 davigonz

@davigonz Where can I get the information about the bounty for this feature?

shashvat-kedia avatar Feb 21 '18 15:02 shashvat-kedia

@sd1998 https://www.bountysource.com/issues/55217024

michaelstingl avatar Feb 21 '18 16:02 michaelstingl

@michaelstingl Thanks.

shashvat-kedia avatar Feb 21 '18 16:02 shashvat-kedia

@davigonz For this feature should I use a 3rd party dependency like this or should I try to implement the feature from scratch using opencv etc.?

shashvat-kedia avatar Feb 22 '18 08:02 shashvat-kedia

For this feature should I use a 3rd party dependency like this or should I try to implement the feature from scratch using opencv etc.?

@sd1998 Sure, you can use 3rd party dependencies as long as they are free license and we include the required attributions.

davigonz avatar Feb 22 '18 12:02 davigonz

Hi guys , when you talk about "the image will be processed", do you mean using OCR to get plain text or adjust the marked edges to get a rect and aligned document ?

Unsigno avatar Feb 26 '18 09:02 Unsigno

Hi guys , when you talk about "the image will be processed", do you mean using OCR to get plain text or adjust the marked edges to get a rect and aligned document ?

@Unsigno Actually is not OCR itself, is just about taking a picture and adding some kind of filters so that the picture looks like a scanned document.

davigonz avatar Feb 26 '18 10:02 davigonz

Oki , i am looking for a PR and have some questions.

1 - Could be added OpenCV as dependency to do this ? 2 - If i send a PR, it has to contain all the translations of the texts used ?

Unsigno avatar Feb 27 '18 15:02 Unsigno

@Unsigno I am already working on this. Could you work on any other issue? Thanks.

shashvat-kedia avatar Feb 27 '18 16:02 shashvat-kedia

@sd1998 You could mark it on bountysource as started and give an aproximated time to prevent bounty hunters :p . give some news if you leave it please .

If some one can asnwer 2 i still curious .

Unsigno avatar Feb 28 '18 15:02 Unsigno

1 - Could be added OpenCV as dependency to do this ? 2 - If i send a PR, it has to contain all the translations of the texts used ?

@Unsigno

  1. Yes, OpenCV could be used to detect the document edges for example.
  2. Not necessarily, including texts in english is enough since they will be automatically translated by transifex. If you have a look at the master commits history, you will see that many of them are automatically added by owncloud-bot and include the translations I mention.

davigonz avatar Feb 28 '18 18:02 davigonz

@davigonz I am using camera2 API it requires the API level 21 and currently, the minimum API level has been set to 14. Should I change it? Or try an alternate approach?

shashvat-kedia avatar Mar 04 '18 06:03 shashvat-kedia

I am using camera2 API it requires the API level 21 and currently, the minimum API level has been set to 14. Should I change it? Or try an alternate approach?

@sd1998

Were not you using https://github.com/jhansireddy/AndroidScannerDemo to implement this feature? What is camera2 API used for?

If there's no way to include this feature in APIs lower than 21, I would include a condition to disable the feature for versions lower than 21 instead of updating the minimum API level.

Keep in mind we still have users with Android versions previous to Lollipop (API 21).

davigonz avatar Mar 08 '18 09:03 davigonz

@davigonz I did not use https://github.com/jhansireddy/AndroidScannerDemo but have implemented the feature in a better way. And it will also work for minSDk = 14 thus supporting Android version previous to Lollipop.

shashvat-kedia avatar Mar 10 '18 10:03 shashvat-kedia

Hi all, this issue is still open ?

Unsigno avatar Dec 17 '18 01:12 Unsigno

Hi all, this issue is still open ?

Yes @Unsigno , but it was delayed because is not trivial at all, have a look at this overview.

davigonz avatar Dec 17 '18 08:12 davigonz

hey, so will this issue be on google summer of code this year? as this issue has a bounty as well. I can do it as a GSoC project or I can fix it a now,

iamzubin avatar Dec 31 '19 19:12 iamzubin

@iamzubin previous attempt: https://github.com/owncloud/android/pull/2143

michaelstingl avatar Jan 07 '20 13:01 michaelstingl

No plans for GSoC yet, but yes. there's an open bounty: https://www.bountysource.com/issues/55217024

michaelstingl avatar Jan 07 '20 13:01 michaelstingl

The iOS version is able to achieve this feature. Is it difficult to adopt this feature in the Android version?

Bables55 avatar Mar 15 '21 08:03 Bables55

The iOS version is able to achieve this feature. Is it difficult to adopt this feature in the Android version?

To make it perfect: yes

I made such a feature, which fulfill my needs https://github.com/hannesa2/owncloud-android/releases. But it's not perfect.

@michaelstingl About the bounty. Ok, it's not that much, but why not ask for it ? What has to be fulfilled to receive it ? I ask because I know, there will be always improvements and there is alwasy someone who is not satisfied ...

hannesa2 avatar Mar 15 '21 09:03 hannesa2

Hello, can I work on this issue? This is a really old issue, is this still open? I would like to work on it.

vibhuti019 avatar Oct 09 '21 21:10 vibhuti019

Sure @vibhuti019, feel free to work on that and send a PR 👍

You can check the latest attempt https://github.com/owncloud/android/pull/2143 to get more information about it

abelgardep avatar Oct 13 '21 10:10 abelgardep

Hello, can I work on this issue? This is a really old issue, is this still open? I would like to work on it.

@vibhuti019 Please see my post, my fork already comes with that feature

hannesa2 avatar Oct 13 '21 10:10 hannesa2

@hannesa2 yes, I saw that now, I was working on this issue.. @abelgardep please let me know if you wish to implement some changes in it. I would love to upgrade it ..

vibhuti019 avatar Oct 16 '21 12:10 vibhuti019

Hi @hannesa2 ! I have tried your fork of ownCloud with the integrated document scanner, it works really well, but I have a question. I have not been able to get the Scan edge document to work, it always throws the same error: Use darker background. Can you tell me how it works?

Also, we have seen that the size of the .apk increases excessively and it's a bit annoying the automatic detection and upload of the scanned document, since sometimes it doesn't detect correctly and uploads a single color image. Do you have any improvement or update in mind? Thanks and good work!

fesave avatar Nov 08 '21 08:11 fesave

After an intense search, I have found a couple of possible solutions to evaluate.


The first one is not free, called Scanbot SDK and is available for Android and iOS.

  • Advantages:

    • It is very well documented.
    • It is continuously updated.
    • Fixed price.
    • Support.
    • Demo App where we can test it. (It works fine!)
  • Cons:

    • We have to pay .
    • We need to talk with a sales manager.
    • I don't know if its code can be part of an open source project like ownCloud.

More info here


The second one is free, it is a Github's library.

  • Advantages:

    • It is free (obviously).
    • It uses CameraX and OpenCV.
    • Made using Kotlin.
  • Cons:

    • Some bugs.
    • Will it be deprecated in the future?.

More info here


The last one is free too!, it is a Github's library.

  • Advantages:

    • It is free (obviously).
    • It uses CameraX and tiny version of OpenCV.
    • Made using Kotlin.
  • Cons:

    • Some bugs.
    • Will it be deprecated in the future?.

More info here


cc @jesmrec @abelgardep @JuancaG05 @michaelstingl

fesave avatar Nov 16 '21 08:11 fesave

New Google API to scan documents, available for API 21 or above:

  • https://android-developers.googleblog.com/2024/02/ml-kit-document-scanner-api.html
  • https://developers.google.com/ml-kit/vision/doc-scanner

JuancaG05 avatar Mar 05 '24 09:03 JuancaG05