owncloud / android

:phone: The ownCloud Android App
GNU General Public License v2.0
3.78k stars 3.04k forks source link

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 #2119

Open davigonz opened 6 years ago

davigonz commented 6 years ago

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.

shashvat-kedia commented 6 years ago

@davigonz I would like to work on this.

davigonz commented 6 years ago

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

shashvat-kedia commented 6 years ago

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

michaelstingl commented 6 years ago

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

shashvat-kedia commented 6 years ago

@michaelstingl Thanks.

shashvat-kedia commented 6 years ago

@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.?

davigonz commented 6 years ago

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.

Unsigno commented 6 years ago

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 ?

davigonz commented 6 years ago

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.

Unsigno commented 6 years ago

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 ?

shashvat-kedia commented 6 years ago

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

Unsigno commented 6 years ago

@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 .

davigonz commented 6 years ago

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.
shashvat-kedia commented 6 years ago

@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?

davigonz commented 6 years ago

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).

shashvat-kedia commented 6 years ago

@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.

Unsigno commented 5 years ago

Hi all, this issue is still open ?

davigonz commented 5 years ago

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.

iamzubin commented 4 years ago

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,

michaelstingl commented 4 years ago

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

michaelstingl commented 4 years ago

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

Bables55 commented 3 years ago

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

hannesa2 commented 3 years ago

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 ...

vibhuti019 commented 2 years ago

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

abelgardep commented 2 years ago

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

hannesa2 commented 2 years ago

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

vibhuti019 commented 2 years ago

@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 ..

fesave commented 2 years ago

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 commented 2 years ago

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.

More info here


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

More info here


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

More info here


cc @jesmrec @abelgardep @JuancaG05 @michaelstingl

JuancaG05 commented 4 months ago

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