Comments (6)
https://github.com/libjpeg-turbo/libjpeg-turbo uses NEON on ARM, so that part seems to be feasible.
I’ll need to profile the g3 compression to see how to make it faster.
from scan2drive.
Commit 2f7d475 brings down the rotation + g3 compression to 5s on the Raspberry Pi 3. The longest step now definitely is the JPEG encoding.
from scan2drive.
I got a proof-of-concept which uses a port of libjpeg-turbo’s NEON assembler functions. It completes JPEG encoding within 2.5s of wall-clock time.
I’ll look into whether we can run the processing in parallel to reading data from the scanner. That way, we might be able to pull off scanning in almost real-time, i.e. with minimal wait after each page :).
from scan2drive.
Next steps for cleaning up the optimized JPEG encoder (scan2drive/internal/neonjpeg
):
- create separate git repository (for the cleanup only)
- remove magic numbers
- add assertions about image/buffer size
- remove comments
- clean up assembler files (indentation, attribution)
from scan2drive.
This is the current processing time for each piece of paper after scanning finished:
- 1s JPEG encoding (most of the processing happens in parallel with scanning)
- 3s G3 encoding
- 12s thumbnail PNG encoding
I looked into encoding the G3-encoded image data into a TIFF file (which works), but it turns out that neither Chrome nor Firefox support TIFF. All javascript-based TIFF/PDF viewers and extensions are super slow.
from scan2drive.
Created issue #15 for speeding up the thumbnail creation. Closing this issue as we’re now using NEON code for jpeg compression.
from scan2drive.
Related Issues (20)
- race condition: setup mode redirect might run into transient HTTP 404
- main.go:846: undefined: s HOT 2
- add zoom function to scan thumbnails
- fix UI-driven scanning/renaming HOT 5
- Add upspin server availing scans HOT 1
- create thumbnails asynchronously for button-triggered scans HOT 1
- Which scanners does it support? HOT 2
- eSCL (“AirScan”) support HOT 1
- neonjpeg-created images cannot be loaded by Go HOT 4
- Consider supporting other authentication providers and sinks
- scan2drive.zekjur.net https listener is currently hardcoded in the source HOT 1
- scan2drive doesn't append DNSSD Domain to scanner service for Avahi-style name resolution HOT 1
- Update Google Drive Libraries HOT 5
- Listen address/oauth redirect trouble HOT 3
- Support airscan-only operation on MacOS? HOT 3
- investigate using machine learning for OCR
- gokr-packer exiting with status 2 after `*grpc.ClientConn has no field or method State` HOT 1
- Unify internal/g3 with image/jpeg/writer.go
- Unable to read client secret file: open /perm/client_secret_... HOT 21
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scan2drive.