Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing measuring handles #209

Open
anushbhatia opened this issue Mar 18, 2021 · 13 comments · Fixed by #249
Open

Implementing measuring handles #209

anushbhatia opened this issue Mar 18, 2021 · 13 comments · Fixed by #249
Assignees
Labels
gssoc21 GirlScript Summer of Code 2021

Comments

@anushbhatia
Copy link
Collaborator

anushbhatia commented Mar 18, 2021

Adding a feature to add dynamic cropping box explained in this [repo]https://github.com/doo/scanbot-sdk-example-flutter)
image
Adding measuring handles in the project to get better output.

@anushbhatia anushbhatia added the gssoc21 GirlScript Summer of Code 2021 label Mar 18, 2021
@anushbhatia anushbhatia changed the title Implementing OCR Implementing measuring handles Mar 18, 2021
@Sahil-kachhap
Copy link
Contributor

@anushbhatia https://pub.dev/packages/edge_detection . Here is a package that can help for this purpose .

@anushbhatia
Copy link
Collaborator Author

This can be used. Do you want to go ahead with this?

@nicks101
Copy link
Contributor

If no one's assigned, can I work on it?

@anushbhatia
Copy link
Collaborator Author

sure

@nicks101
Copy link
Contributor

Hey @anushbhatia , for implementing edge detection we following choices.

  • use edge_detection package. The problem with this is it's not active and doesn't have a null safety version. Not customizable also.
  • use opencv package. Problems are the same as above.
  • use scanbot_sdk package. It's migrated to null safety. It's paid (have a free trial but we can't publish under it). It has many other functionalities also. Here's a reference.
  • Implement using OpenCV by binding to native code using dart:ffi. This is a little tricky. Here's an article for reference. Mainly we'll write C/C++ code within our project and use it in flutter with dart:ffi.

Please let me know which one should I go forward with. Also if you have any other suggestions, please let me know.

@anushbhatia
Copy link
Collaborator Author

Hey @anushbhatia , for implementing edge detection we following choices.

  • use edge_detection package. The problem with this is it's not active and doesn't have a null safety version. Not customizable also.
  • use opencv package. Problems are the same as above.
  • use scanbot_sdk package. It's migrated to null safety. It's paid (have a free trial but we can't publish under it). It has many other functionalities also. Here's a reference.
  • Implement using OpenCV by binding to native code using dart:ffi. This is a little tricky. Here's an article for reference. Mainly we'll write C/C++ code within our project and use it in flutter with dart:ffi.

Please let me know which one should I go forward with. Also if you have any other suggestions, please let me know.

I have a codebase based on OpenCV you can use that will push it on another branch. i think the version I m using is stable in that can be used. Let me know I will upload the code if needed

@smaranjitghose
Copy link
Owner

Hey @anushbhatia , for implementing edge detection we following choices.

  • use edge_detection package. The problem with this is it's not active and doesn't have a null safety version. Not customizable also.
  • use opencv package. Problems are the same as above.
  • use scanbot_sdk package. It's migrated to null safety. It's paid (have a free trial but we can't publish under it). It has many other functionalities also. Here's a reference.
  • Implement using OpenCV by binding to native code using dart:ffi. This is a little tricky. Here's an article for reference. Mainly we'll write C/C++ code within our project and use it in flutter with dart:ffi.

Please let me know which one should I go forward with. Also if you have any other suggestions, please let me know.

Is there any way we can make use of a wrapper around the python code of opencv-python or opencv-python-contrib?

@nicks101
Copy link
Contributor

Hey @anushbhatia , for implementing edge detection we following choices.

  • use edge_detection package. The problem with this is it's not active and doesn't have a null safety version. Not customizable also.
  • use opencv package. Problems are the same as above.
  • use scanbot_sdk package. It's migrated to null safety. It's paid (have a free trial but we can't publish under it). It has many other functionalities also. Here's a reference.
  • Implement using OpenCV by binding to native code using dart:ffi. This is a little tricky. Here's an article for reference. Mainly we'll write C/C++ code within our project and use it in flutter with dart:ffi.

Please let me know which one should I go forward with. Also if you have any other suggestions, please let me know.

I have a codebase based on OpenCV you can use that will push it on another branch. i think the version I m using is stable in that can be used. Let me know I will upload the code if needed

Yes, please upload it. Will look into it.

@nicks101
Copy link
Contributor

nicks101 commented Mar 26, 2021

Hey @anushbhatia , for implementing edge detection we following choices.

  • use edge_detection package. The problem with this is it's not active and doesn't have a null safety version. Not customizable also.
  • use opencv package. Problems are the same as above.
  • use scanbot_sdk package. It's migrated to null safety. It's paid (have a free trial but we can't publish under it). It has many other functionalities also. Here's a reference.
  • Implement using OpenCV by binding to native code using dart:ffi. This is a little tricky. Here's an article for reference. Mainly we'll write C/C++ code within our project and use it in flutter with dart:ffi.

Please let me know which one should I go forward with. Also if you have any other suggestions, please let me know.

Is there any way we can make use of a wrapper around the python code of opencv-python or opencv-python-contrib?

So there are two ways that I could find -

  1. Deploy python code (probably flask) and use API in dart.

  2. There's a package starflut which does exactly this. Integrated python code in flutter.
    Will have to check about null safety version.

These are related links -

How to run the python code in the Flutter app

Python and Dart Integration in Flutter Mobile Application

@smaranjitghose
Copy link
Owner

In 2021, we don't use Flask anymore..the defacto choice has become Fastapi. That being said in case you plan to go ahead with the api integration, let me know if you need any assistance

@nicks101
Copy link
Contributor

In 2021, we don't use Flask anymore..the defacto choice has become Fastapi. That being said in case you plan to go ahead with the api integration, let me know if you need any assistance

If I go with making my own API (either with FastApi or flask or any other tech), we'll have to deploy it as well right? Also, the app needs internet then, it won't work offline.
There could be some third-party APIs available also.

Just to be clear, this is what we want :

  1. A screen with a camera preview that has two buttons: take a photo and choose an image from the gallery
  2. A screen that appears when an image was taken or chosen that displays the image and renders the detected edges on top
  3. There is a button that lets the user return from the edge screen to the main screen
  4. The UI must not be blocked during edge detection. Instead, the image is shown already and the edges appear once the process is finished

@anushbhatia
Copy link
Collaborator Author

https://github.com/smaranjitghose/DocLense/tree/old_code this is the code used before implementing the measuring handles.

@anushbhatia
Copy link
Collaborator Author

In 2021, we don't use Flask anymore..the defacto choice has become Fastapi. That being said in case you plan to go ahead with the api integration, let me know if you need any assistance

If I go with making my own API (either with FastApi or flask or any other tech), we'll have to deploy it as well right? Also, the app needs internet then, it won't work offline.
There could be some third-party APIs available also.

Just to be clear, this is what we want :

  1. A screen with a camera preview that has two buttons: take a photo and choose an image from the gallery
  2. A screen that appears when an image was taken or chosen that displays the image and renders the detected edges on top
  3. There is a button that lets the user return from the edge screen to the main screen
  4. The UI must not be blocked during edge detection. Instead, the image is shown already and the edges appear once the process is finished

For this, we can do one thing simply

  1. if the user is online then we can provide this feature of the measuring handles.
  2. if the user is offline we can go ahead with the usual method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc21 GirlScript Summer of Code 2021
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants