akorentlab / leptonica

Automatically exported from code.google.com/p/leptonica
0 stars 0 forks source link

split gigapixel image on 300Mb box (raspberry pi) #97

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. there is a big image (30000x30000)
2. need to process it one way (split into tiles)
3. have only raspberry pi

Does leptonica allow that on 300mb of memory?
What is the source and target image requirements?

Thanks.

Original issue reported on code.google.com by techtonik@gmail.com on 11 Jun 2014 at 11:54

GoogleCodeExporter commented 9 years ago
Leptonica has to read the entire image as a raster into memory before it can do 
any work.

Let's see: 900 million pixels.  What's the bit depth?  If 1 bpp, this is 
112.5MB.  If more than 2 bpp, can't do it in 300 MB.

Original comment by dan.bloo...@gmail.com on 12 Jun 2014 at 1:25

GoogleCodeExporter commented 9 years ago
This specific work requires sequential access, and can be made in one pass. Why 
leptonica can't be a `sed for images`?

It is 8 bpp.

Original comment by techtonik@gmail.com on 12 Jun 2014 at 6:28

GoogleCodeExporter commented 9 years ago
It would be nice to see this fact documented - that leptonica does all 
operations entirely in memory (and probably can't assign several scratch disks 
for big images).

Original comment by techtonik@gmail.com on 12 Jun 2014 at 6:35

GoogleCodeExporter commented 9 years ago
Some image formats, like jpeg2000 allow small regions of an image to be 
decompressed without the entire image being read into memory.  Others, like 
jpeg, png and tiff, do not.

Original comment by dan.bloo...@gmail.com on 12 Jun 2014 at 3:13

GoogleCodeExporter commented 9 years ago
Forget about leptonica, use VIPS :)

http://en.wikipedia.org/wiki/VIPS_%28software%29

Original comment by techtonik@gmail.com on 13 Jun 2014 at 8:38

GoogleCodeExporter commented 9 years ago
Good choice.

Original comment by dan.bloo...@gmail.com on 13 Jun 2014 at 3:41

GoogleCodeExporter commented 9 years ago
It may worth to add a comparison to other libraries. I am sure leptonica has 
its uses in applications that are not memory constrained. It would be nice to 
have some comparisons or prooflinks for all leptonica features from the main 
page.

Efficient: <link to performance comparison>
Simple: <link to usage example vs ImageMagick, for example>
Consistent: <need bad examples of inconsistent APIs>
Robust: <..not sure about this..>
Tested: <need link to code coverage and public build bot (drone.io?)>
Ansi C: <C11?>
Portable: endian-independent; builds in linux, osx, mingw, cygwin, windows
Nearly thread-safe: <i don't understand "nearly" and "some" as feature - either 
a link to how to make thread-safe or not thread safe>
Documentation: large number of in-line comments; web pages for further 
background <not sure it is a feature, why not online doxygen or autogenerated 
Sphinx. well overviews are actually good>
Examples: many programs provided to test and show usage of approx. 2200 
functions in the library <for a scripting language I'd expect online version 
with examples as well, but this is in my idealistic world>

Original comment by techtonik@gmail.com on 13 Jun 2014 at 9:19