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

Bulk scan capability #10

Open
eleybourn opened this issue Apr 21, 2010 · 26 comments
Open

Bulk scan capability #10

eleybourn opened this issue Apr 21, 2010 · 26 comments
Labels

Comments

@eleybourn
Copy link
Owner

Scan 10-20 books at a time, and perform a bulk search

@Argon0
Copy link

Argon0 commented Aug 13, 2010

Absolutely, and/or do a bulk import from other source (e.g. csv...)

@Argon0
Copy link

Argon0 commented Aug 14, 2010

There's an app out there that does this - called clipbot...

@Grunthos
Copy link
Collaborator

With background processing in place, it becomes easier to handle forground scanning and background lookups.

The question is, how should it work?

This is how I imagine it working:

  • start scanner
  • scan a book.
  • If ISBN is valid, make a 'good' beep, add it to queue, return to scanner
  • if ISBN is bad, make a "bad" beep, show a toast message, resume scanning
  • when user returns from scanner present them with a list of queued books.

The list will show:

  • if found, ISBN, Cover, Title, Author

Clicking on a 'found' item in list will take them to the add screen
Clicking on a 'not found' item will take them to the ISBN entry screen?

The process really breaks down with the "not found" items and with "misfound". How do thy know which physical book was the failure? Or worse, which phsyical book corresponds to the incorrectly found "Mrs Smiths Cookbook for Vegan Dogs"?

This is why I have never been in a hurry to batch scan. But if anyone out there is passionate about it, now is the time to describe how it whould work!

@Grunthos
Copy link
Collaborator

From a user:

When I'm scanning without wifi connection, ISBN barcode is correctly read -- however, it often drops the registration. Is there an option to scan barcodes and when wifi or data connection is not active, the scanned ISBN codes are put in a "hold" list which can be updated/included/further processed when online connection is available?

Which provides a very good justification for batch scanning, imo.

We probably need to investigate the best method.

@Grunthos
Copy link
Collaborator

Suggestions from another user:

For the books with no bar code, I would love to simply take photos of the cover (or inside page with library information). Then I would batch-process them on the PC, where I have a real keyboard. Do you see this as feasible, I mean for example something where pictures of books without a bar code are put in a folder? (This could be done with the Android camera app, but still it would require back and forth between apps. It could also be done by putting all the books on a pile, but that would require physically moving books, whereas I would prefer to quickly take out and "click" one book at a time.)

@simonpickering
Copy link

The process really breaks down with the "not found" items and with "misfound". How do thy know which physical book was the failure? Or worse, which phsyical book corresponds to the incorrectly found "Mrs Smiths Cookbook for Vegan Dogs"?

This is why I have never been in a hurry to batch scan. But if anyone out there is passionate about it, now is the time to describe how it whould work!

If the initially returned list contains a cover thumbnail (optional), author and title, it should be reasonably straightforward to determine which book failed by looking at the surrounding successful ones. I would envisage using a bulk scan facility to allow me to scan e.g. a bookshelf at a time, with the processing being handled in the background while I scan (as opposed to being offline) which would mean that any failures would have been scanned quite recently, so I can go back and modify them.

@simonpickering
Copy link

For the books with no bar code, I would love to simply take photos of the cover (or inside page with library information). Then I would batch-process them on the PC, where I have a real keyboard. Do you see this as feasible, I mean for example something where pictures of books without a bar code are put in a folder? (This could be done with the Android camera app, but still it would require back and forth between apps. It could also be done by putting all the books on a pile, but that would require physically moving books, whereas I would prefer to quickly take out and "click" one book at a time.)

I also have this problem when scanning books - I end up with a pile of books which have no barcode but do have an ISBN inside the cover. What would be interesting is to see how well OCR could be made to extract the relevant data, but in order to do this (or even the obvious first step of just saving an image of the page/cover into the bulk scan list for later viewing and manual transcription), it seems to me that using an internal barcode scanner would be the only method by which one could provide the extra "take a photo now/check this frame for ISBN text" button.

With that said, I'm only just starting out with Android (coming from Maemo/Linux), so perhaps it would be possible to perform both functions outside the main app via an Intent.

@Grunthos
Copy link
Collaborator

The OCR idea is kind of what Google Goggles does...except it is not batch. I have no idea if there are OCR tools out there, but given OCR error rates...it might be better to just type them.

I must admit, having only scanned 1/3 of my books, I am very tempted by any viable batch scan. For me, the work-flow would be something like:

Start a physical shelf:

  • scan multiple
  • enter an ISBN or three
  • scan some more
  • put aside books that need to be searched by title/author (maybe?)

When I reach the end of a shelf

  • enter the non-ISBN title/author searches (to be processed in background? And show multiple results?). Perhaps leave this to work on PC and edit the CSV file?

review the results:

  • photograph covers as necessary
  • manually search again where necessary

Move on to next shelf.

A key part of this process would be switching from scanner to data entry. Perhaps we have a 'Batch Add' screen which has two tabs: one looks like the ISBN entry screen, the other looks like the title/author screen, and each has a 'Scan' button. Exiting the scanner would return to this screen.

I do find it useful to enter a rating and notes for most books, and an updated cover for many books (perhaps 15%). It's not clear how the 'review' process should work. Perhaps just use the 'Date Added' list, since typically background tasks are deleted if they are successful.

@simonpickering
Copy link

I am in the same situation, but have only added something like a 1/5th of my books so far.

I must admit I don't bother updating the covers, I plan to do this eventually, but it's more useful for me to have the title/author data available ASAP to avoid my buying duplicates. I also don't use the review screen at all (and it would be nice to be able to disable it somewhere as it means I have to tap again to enter the book). Again I will probably go through the books reviewing them eventually (if, for example, we can implement some sort of automatic recommendations).

A key part of this process would be switching from scanner to data entry.

Hence my thought of being able to take a photo and add it to the batch scanning list for later inspection and transcription. This would avoid the extra steps of needing to stop passing books across the camera and start typing things, instead leaving that step for the review process at which point the user could look at the photo and transcribe the ISBN. This does make the workflow a little non-linear for these cases though:

  • Scan book barcodes, send to queue.
  • Continue scanning barcodes while in the background the queued items are being looked-up and the results cached
    ** Probably accept the first result as per the current process here (but add button to review screen to allow a re-lookup/listing of first ~10 results - addressing Issue List of books as search result #284)
  • If a book has no barcodes, allow the user to take a picture of the data inside the cover, or the cover itself if no ISBN present, add this photo to the queue as a placeholder
  • When finished with the shelf, user inspects the queue and can see a listbox (not sure of the Android widget names, sorry!) containing thumbnail, title, author.
  • Click on listbox row to open review page for that item
  • If item is a photo, open search page with photo to one side so that ISBN/title can be entered and searched for

It's not clear how the 'review' process should work. Perhaps just use the 'Date Added' list, since typically background tasks are deleted if they are successful.

Can the cached results be held in memory, or is this not easy with the current code structure? Alternatively add them to a specific "temporary" bookshelf, though then moving them to their eventual destination will be a bit annoying.

@Grunthos
Copy link
Collaborator

On 12/06/2012 7:17 PM, simonpickering wrote:

It's not clear how the 'review' process should work. Perhaps just use the 'Date Added' list, since typically background tasks are deleted if they are successful.
Can the cached results be held in memory, or is this not easy with the current code structure? Alternatively add them to a specific "temporary" bookshelf, though then moving them to their eventual destination will be a bit annoying.

Could be, but it would be dangerous. Some phones have such small amounts
of memory, and we are also talking cover images.

The existing background task queue has the ability to store (fairly)
arbitrary context; we could store the book details and cover...but I had
hoped that for the batch process they would just be added.

@simonpickering
Copy link

The images need not be held in memory, they could be written to disk - whichever way it's done it would require control of the barcode scanner, either by bringing it into the app (not ideal), or by writing a custom app that could provide either the ISBN or image data/file location to book-catalogue.

I think that writing a simple app that uses the ZXing library only for 1D (to make it quick) might be the best method if this is of interest, would give me something to cut my teeth on ;) I should also note that using the external ZXing scanner is too slow foe my liking at the moment, and so customising it for this use-case might be a good thing (as the scanner backend is quick in my experience). Having control of the scanner might also allow nice/pretty features such as overlaying the results of the lookups while scanning so you know something is happening. I'm not sure how bi-directional data transfer with the Intent provider can be achieved but I'm sure there's a way.

we could store the book details and cover...but I had hoped that for the batch process they would just be added.

Are you talking about the photos or all the data? For ISBNs which have been looked up I think the user should be able to add or reject/edit items. Whether this is achieved by having to look at the review page for each one, or whether one adds checkboxes to the listbox so you can add lots at once then only look at the ones which aren't right in detail I don't know,

For the photos I wonder if we could try handing off the image to an OCR Intent provider (e.g. modify this: https://github.com/rmtheis/android-ocr) OCR ought to be doable as the format of the data being recognised is quite well defined. It would certainly take some work, but that's where the interest lies of course :)

@simonpickering
Copy link

Re OCR, perhaps the Google Goggles API when it's finally released (or in the reverse-engineered current state)?: http://notanothercodeblog.blogspot.co.uk/2011/02/google-goggles-api.html

@Grunthos
Copy link
Collaborator

I have wondered from time to time about integrating ZXing.

From the PoV of BookCatalogue, and off the top of my head, I suspect that the best option would involve a screen that had a camera view, with 3 (auto-hide?) buttons:

  • 'scan barcode' -> which just loops, scanning barcodes until another button is pressed (or 'back' is pressed)
  • 'take photo' -> which just returns a photo of the current cover for use as the cover and to allow the user to enter data later
  • 'enter data' -> which just goes to an author/title entry screen...which loops until another button is pressed (or 'back' is pressed)

Do you think any of this would be possible with the available APIs?

@Grunthos
Copy link
Collaborator

P.S. Mild preference for ZXing as I believe it is stand-alone (to back and forth to Google) and more mature.

@simonpickering
Copy link

Yes this is certainly possible with the ZXing API (which allows you to send it a frame at a time, and this was the method I used for mBarcode on the Maemo platform). The decoder was fast enough to provide full framerate decoding (with a reduced frame size), however I implemented it as a thread which pulled frames from the video stream when it had finished as some of the other decoders were much slower. I imagine something similar could be done under Android, though I don't know how (yet!).

I don't know how one overlays widgets (i.e. buttons, text) on the live camera view in Android, but it's obviously possible as other apps do this. Under Maemo it required messing about with OpenGL-ES, which was fine, but a bit messy (and low level). So something else to look into.

@simonpickering
Copy link

Re buttons on the screen - while it looks very pretty for them to be overlaid on the live camera view, if you look at the ZXing app, it only scans for barcodes in the centre, so it would be possible to do away with the un-used edges and only display the useful centre region which would allow us to display things around the outside (to to the left/right/above/below the live view) - i.e. buttons as you suggest and perhaps also a summary of the last scanned item.

I think I've seen this approach in some of the other barcode scanning apps on Android, I'll take a look and see which they were.

@simonpickering
Copy link

P.S. Mild preference for ZXing as I believe it is stand-alone (to back and forth to Google) and more mature.

I was only thinking of Google Goggles for the OCR actually but tesseract would provide a stand-alone alternative.

P.S. Is talking via the Issues the best way to discuss this? Do you chaps hang out on IRC, or a forum, or even email (tack @gmail.com onto the end of my user name)?

@Grunthos
Copy link
Collaborator

Issues is fine with me, but not ideal for details. Our emails are in the
app...feel free to send email. The good thing about Issues is they
provide a trail, and there are other people who can contribute.

On 12/06/2012 10:01 PM, Simon Pickering wrote:

P.S. Mild preference for ZXing as I believe it is stand-alone (to back and forth to Google) and more mature.
I was only thinking of Google Goggles for the OCR actually but tesseract would provide a stand-alone alternative.

P.S. Is talking via the Issues the best way to discuss this? Do you chaps hang out on IRC, or a forum, or even email (tack @gmail.com onto the end of my user name)?


Reply to this email directly or view it on GitHub:
#10 (comment)

@treestryder
Copy link

I found this thread, after adding the first of many boxes of books. It seemed like, every other book failed to scan for one reason or another, but the ISBN search was spot on for all but a couple. After that experience my suggestion was going to be to unify the Add Book menu. My thought being to start and always return to a broader search screen. Which would include ISBN, title and author fields. With buttons added for triggering the scanner and manual entry (Which maybe could be pre-populated with data from the last failed search) modes.

Not sure sure how, exactly, my vision for a better workflow would play with the topic of this thread, which seems primarily focused on high speed scanning. Just wanted to put the idea out there.

@Grunthos
Copy link
Collaborator

Grunthos commented Mar 6, 2013

I must admit I have been considering a "general" search screen for a while. This will probably become more important when we get "search results as a list", because we will probably broaden the search criteria as well.

That said, it won't really help the scan problem you describe, which also confuses me.

Can you describe the problem you were having? Scanning an ISBN should produce exactly the same results as typing an ISBN. Unless of course you were not scanning ISBNs?

@treestryder
Copy link

Sorry I wasn't more clear. The scanning worked, when I had a near perfect UPC. The box full that I scanned was all used text books and many of them had their UPCs mutilated, one or two had blurry UPCs and one only had the ISBN listed. I was able to type in the ISBNs for all of these and that worked well. Rather than hoping back and forth in the menus between scan and search modes, or piling all the unscan-ables up to do later, I thought it would have worked well to start at the search screen and turn on the scan mode when I was ready to attempt the next scan. Who knows, it might even be lighter on the battery.

Thanks for listening! I love the app and if I had more time I would do more than make crazy suggestions.

@Grunthos
Copy link
Collaborator

Grunthos commented Mar 6, 2013

Ah, OK...yes that makes sense. It's actually part of the reason I have never got around to bulk scanning.Even with 20% unscannable books, or worse, wrong covers retrieved, bulk scanning would be more of a liability (hence this thread).

It is appealing to integrate Zxing first, then we could put some buttons on the Zxing screen to allow quick manual entry of ISBNs while scanning. Or something like that.

We need a really simple UI with a very cleverly designed workflow.

@SteveH008
Copy link

Can I import from Amazon a list of all the books that I have ever bought? That would be a huge step towards a complete database.

@jberkus
Copy link

jberkus commented Oct 5, 2014

Bump.

Speaking as someone who is in the process of scanning an entire large collection in order to pack it up for shipping, I don't actually need the scanner to work any differently. What would save me a lot of time would be the ability to set a template for the editable fields, so that I don't have to keep re-selecting the catetory and typing "Box 002". The scanning itself is sufficiently "bulk" for my purposes.

@simonpickering
Copy link

Are you talking about the bookshelf that the current book will be added to (I can't see category anywhere)?

If you're creating a bookshelf per box, you can then select that bookshelf in the My Books view before you start adding books then when you add books they will be added to that bookshelf (that one will be selected automatically).

HTH

@david-bakin
Copy link

david-bakin commented Nov 25, 2020

Maybe if BookCatalogue supported an Android "intent" to add a book to the database someone could use (or write) a different app that would send ISBN or ASIN to BookCatalogue and get it to add that book to the database (with appropriate lookups for everything). that would decouple the question of "how to do a bulk UI" from this excellent app.

A scripting application that could script both barcode reading and then book adding would suffice.

My use case is that I have a nice JSON with ~1880 Amazon-purchased books - ASINs (+ authors and title) and I could easily write a little python script to read the JSON and then add them all, one at a time, via such an intent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants