8 ms·
As a prof seeings students waste time scanning their homework, one gadget I want to build is a easy to use scanner, with a Rpi Zero and a cheap camera. The ide
by abdullahkhalids 6y ago
As a prof seeings students waste time scanning their homework, one gadget I want to build is a easy to use scanner, with a Rpi Zero and a cheap camera.
The idea is to have the camera with a wide angle lens attached to the top of stack of papers/notebook. Pressing a button takes a picture, and then does a affine transform (?) on it get the perspective right, then uploads it to the LMS.
Just a clean, hassle free experience. No orienting your phone awkwardly, no getting the lighting right, no mini edits on your phone, no compiling pdfs.
Also, very useful for me, as I like to do math by hand.
Edit: Image https://imgur.com/Fb45H7M.png https://imgur.com/Fb45H7M.png The fact that camera is fixed relative to paper means the transform is also fixed. Multi-colored led (and knowledge of paper color) can also fix lighting.
- jimbob45 6y agoDo you not accept phone pictures of homework? That's what I used to submit and the clarity was enough for TAs to be able to readily spot mistakes.
- abdullahkhalids 6y agoOf course I do. But students are probably taking like 50 pictures a week for their various courses. I don't think they like the tediousness of it. Plus with this, I could look at student solutions much easier during class or office hours. Similarly, I don't want to whip out my phone to take 30 pictures of my research notes one by one.
- mlyle 6y agoClearscanner on the phone does this -- my kids use it for their homework. Snaps pictures, finds edges, does affine transform, corrects exposure, and assembles into PDF.
- sneak 6y agoI went into the app store to see about this app, having not heard about it yet. The app's privacy policy says it uses Firebase (Google) Analytics, which transmits information about your use of the app off the device without consent. This, to me, means I can never trust it for scanning sensitive or private documents, because who knows what it's sending. I declined to install it. YMMV.
- mlyle 6y agoThis is in the context of scanning homework assignments. Not to mention-- Firebase tracks what, events? You think somehow it's encoding the documents in an event stream to exfiltrate them?
- sneak 6y agoAn app that shares my event data silently and without consent cannot be trusted with even low-grade private information. Why would I ever allow it on a device that handles high-grade private information?
- mlyle 6y ago> An app that shares my event data silently and without consent You're complaining about a -disclosed- use of analytics. It seems like you'd be happier with an app that just didn't mention the use.
- jjeaff 6y agoIt's not without consent nor is it silently. You consent when you decide to install it and it's not silently if they just told you that it happens.
- erklik 6y ago> event data silently and without consent It's neither silent nor without consent since you were told about it.
- snthd 6y agoYou might like OpenNoteScanner https://github.com/allgood/OpenNoteScanner https://github.com/allgood/OpenNoteScanner
- StavrosK 6y agoCan you not just block its internet connection?
- 6y ago
- vanderZwan 6y agoOpen Note Scanner does this quite well on Android, in my experience. https://github.com/allgood/OpenNoteScanner https://github.com/allgood/OpenNoteScanner https://f-droid.org/en/packages/com.todobom.opennotescanner/ https://f-droid.org/en/packages/com.todobom.opennotescanner/ https://play.google.com/store/apps/details?id=com.todobom.opennotescanner&hl=en_US&gl=US https://play.google.com/store/apps/details?id=com.todobom.op...
- abdullahkhalids 6y agoYes, phone apps work, but they still require several clicks to get things right, and upload. But if your camera is fixed relative to the paper, then there is a single known transform that will correct perspective. If you write software to integrate directly with the LMS, then it will only require one hardware button press per page, to upload the assignment.
- jjeaff 6y agoSeems like to get it to work at such a sharp angle, you would need a very large depth of field with your lense in order to keep both the nearest and farthest portions of the page in focus.
- abdullahkhalids 6y agoI do have a phd in a theoretical quantum optics, so no, I have no idea if such a weird angle will actually work in practice given the physical and budgetary constraints. :-D Seriously, though, I have idea. We can take two pictures focusing once the near part, and once on the far part. If cameras are cheap (I haven't researched), maybe two on either end of the device would mitigate the complexity of the lenses required.
- commonvision 6y agoDepth of field isn't really an issue with wide angle lenses for smaller format sensors. The EFL is shorter which boosts the depth of field. The bigger problem is field curvature if the page is closer than ~6" - most of these lenses weren't designed for short object distances. For example, this 1.8mm F/2.8 low distortion lens has a hyperfocal distance of 0.2m (~8") on the Pi HQ: https://commonlands.com/products/low-distortion-m12-lens https://commonlands.com/products/low-distortion-m12-lens and easily covers 6"-25" depth of field.
- brudgers 6y agoA module on making pictures with the phone would have fewer dependencies. Most of the problem is simply not understanding the problem space. Humans have had less than two hundred years dealing with it and only a decade or so since everyone had a camera in their pocket all the time and about a year of scanning photographs for academia.
- tootie 6y agoI do scanning to PDF just with Google Drive on my phone. You can also buy (or DIY) a scanning box like this guy: https://smile.amazon.com/Scanner-Bin-Document-Scanning-Solution/dp/B00XM7LKZM?sa-no-redirect=1 https://smile.amazon.com/Scanner-Bin-Document-Scanning-Solut... I've seen models that also have LED strips for even lighting. What I haven't seen is a gadget that can feed multiple sheets easily.
- LegitShady 6y agoI have thousands of photos of homework from when I was in school stored in Google photos. I always took pictures as a backup but the stuff I submitted I always scanned using a real scanner because it was hard to get a perfectly parallel photo with good lighting.
- enchiridion 6y agoI believe it would a homography transform, which is less constrained than an affine transform, as it does not preserve parallel lines/angles. Instead it maps lines to lines as a way to adjust perspective. https://en.wikipedia.org/wiki/Homography https://en.wikipedia.org/wiki/Homography
- hasmanean 6y agoCan you just tilt the camera sensor to get a transformed image? I remember reading that box cameras allowed you to tilt the film image plane to match a skewed object plane in closeups.
- enchiridion 6y agoYou probably could, but seems a bit excessive to use hardware to solve this problem.
- hasmanean 6y agoWell it removes the problem entirely from the software domain. If it’s a single purpose imaging device with a fixed geometry like OP suggested, it’s the natural solution.
- enchiridion 6y agoTo calculate the angle of the camera you'd still have to find the corners of the paper using some simple computer vision. You could also just use the corners to compute the homograph transform. Really depends on the constraints too. If you're going for archival quality scans then maybe it would be better to do it with hardware. At that point I'd just get a way higher res camera than needed, transform and down sample as needed. Would still probably be cheaper than a gimbal.
- akeck 6y agoTowards the end of my math degree, I started doing written homework assignemnts in Inkscape using the pen tool and a Wacom tablet. It worked surprisingly well.
- hrktb 6y agoPhone scanners are already there. Auto scanning with border and angle detection works decently well [0], mini tripods with phone brackets abound. It’s very easy to set a phone above the table at a slight angle (that makes it easier to move the docs in and out and get rid of shadows) with the app auto scanning every sheet that’s laid below. [0] I used Scanner Pro by Readle, on iOS for reference
- ska 6y agoThey work ok, but are fiddly. I think OP is looking for something more bulletproof with a better workflow. Come to think of it a frame with a black base and an overhead light incorporating a phone holder would likely do the trick well.
- abdullahkhalids 6y agoIt will technically work. But do you think a student who still wants to appear "cool" is going to whip out the contraption you mention in front of their peers? There is more to solutions to problems than the technological possibilities.
- ska 6y agoSure, but that applies at least as much to the original solution. And this seems more of a 'on my desk at home' sort of problem space than a 'whip it out of my bag' sort.
- porknubbins 6y agoHaving built a lot of rpi projects bulletproof is the last word that comes to mind though. I mean the software end is usually fine if the sd card doesn’t get corrupted but building physically robust devices is a serious challenge.
- ska 6y agoAgreed; to me the problem isn't the phone and imaging part (which replacing with rpi will probably just make worse) but the lighting and geometry. On top of that a purpose-built workflow might be nice, compared to something like scanner-pro. tailored to emailing assignments to your profs or whatever.
- spoonjim 6y agoMight be useful in a place where no one has smartphones but otherwise why not use the smartphone camera that people already have?
- JKCalhoun 6y agoNotes that ships with iOS actually has a nice document scanner built in that uses the phone camera ... I mean it does the transform you describe to get better-than-normal document photos. Too bad it then simply adds as an attachment to the note and doesn't allow you to go straight to Share.
- brundolf 6y agoThere are other apps that do similar things. When I was in college a decade ago I was using "CamScanner", which seems to still be around (though I feel like I read recently that it got bought and the new owners started doing something sketchy) These days I just use the regular camera app. Documents are plenty readable as-is, and you can straighten/adjust 3D perspective/raise contrast using the regular photo editing features (at least in iOS)
- coopreme 6y agoJust tested this. It takes four click to get the the share screen after a capture. It does not requiring switching apps so it is fairly quick: 1. Click Save in bottom right (segues to note) 2. Click scan in note (segues to edit context) 3. Click share in top right (open share menu) 4. Click method of share for pdf (sms, email, copy) But wait! You can use the press and hold (3D touch / force touch?) to skip no steps! 1. Click Save in bottom right (segues to note) 2. Click and hold the scan in note (3d touch pop up) 3. Click share in the pop up (open share menu) 4. Click method of share for pdf (sms, email, copy)
- grahamburger 6y agoGoogle Docs app has this built in as well, at least on Android. If you hit + to add a new doc one of the options is Scan.
- NicoJuicy 6y agoMicrosoft Lens, best app i encountered for scanning documents/images. In combination with tasker that checks the office lens folder and automatically uploads it ( Android) https://old.reddit.com/r/tasker/comments/aqyzbu/help_task_that_automatically_uploads_newly_added/ https://old.reddit.com/r/tasker/comments/aqyzbu/help_task_th... You could use foldersync for that too. Actions: - start app - take picture for every page and confirm - save to gallery in the end. It will store to Pictures/Office lens The task will automatically upload the files.
- grahamburger 6y agoI use a ReMarkable for essentially this. It works really well for me. I'm not a teacher or a student, I just like keeping my notes by hand. Also any time I need to fill out and sign a doc I put the PDF on the ReMarkable, mark it up, and send it back.
- canada_dry 6y agoI agree... the problem is that scanning can be such a pain!! I've got a growing backlog of documents to scan. So... I've decided to make it a project and am building my own scanner control app [i] (using python) to help get them scanned (via ADF-doc feeder) and into my paperless-ng repository more easily (e.g. use QR codes to separate documents automatically and OCR to help pre-tag them before uploading). [i] https://i.imgur.com/sG1Bldx.jpg https://i.imgur.com/sG1Bldx.jpg
- rektide 6y agowe call it a bookmark 2.0. ;)
- whalesalad 6y agoDropbox app does it free.
- jstrieb 6y agoI'm currently an undergraduate math student, and had similar frustration, but I reached a different solution. I built a cheap chalkboard in my room (hardboard panel that I painted with chalkboard paint – $15 total since I used a trash-picked board). For scanning, I mounted a Raspberry Pi with a camera, and did some basic OpenCV image processing to extract the image. All told, it took a weekend to build and set up, and I have used it every day since. This same setup could easily be mounted at a different angle for scanning papers laid flat on a desk, and would work with nearly no modification. The image processing pipeline for me was: - Gaussian blur - Brightness/color thresholding - Finding and simplifying the contours - Computing the convex hull for each contour (in case the board is partially occluded) - Using a heuristic to pick the contour most likely to be the chalkboard - Extracting corners from the contour and doing a "getPerspectiveTransform" followed by "warpPerspective" - Sharpen the image (subtract Gaussian blurred version) - Return the image via Flask server so I can pull scans onto my phone or computer over LAN The same pipeline is reused for a live feed (MJPEG) that I can split-screen with my webcam (via OBS) for collaboratively working on homework problems via video call. The live stream is accessed via a different Flask route that calls many of the same helper functions. The code is not yet publicly released, but was very straightforward to write; each of the steps mentioned above is pretty much one OpenCV function call. Here is a sample scan and a demo video: https://www.dropbox.com/s/h21ke7cnlwjs9wi/2021-03-24_01-37-16.jpg?dl=0 https://www.dropbox.com/s/h21ke7cnlwjs9wi/2021-03-24_01-37-1... https://youtu.be/l66G8d-CrnU https://youtu.be/l66G8d-CrnU My email can be found on my website (linked via my HN profile) if you want to discuss!
- mro_name 6y agowonderful
- abdullahkhalids 6y agoThanks. This is very nice. I will do some experiments with my phone camera at the angle I indicate and might take help from you for OpenCV (been 10 years since I used it in undergrad).