|
From: Nick I. <nfi...@nf...> - 2010-08-09 17:06:59
|
> What is your motivation to perform "more advanced scaling algorithm"? > Do you experience noticeable failures with simple subsampling? I'm running dmtx against a batch of images of varying sizes. Using the shrink option is not ideal in this situation because it shrinks by a factor, not to a specific size. So if I have very large images mixed with smaller images, using the same factor on them might yield a 1024px image and a 128px image. Depending on how the DM is shot, 128px is probably too small because at that size and using the "stride-subsampling" (my own term :), you might step past a module entirely. I think by using a more advanced algorithm, this is less likely. I don't have any data or experience to back this up, only intuition, so it's possible I'm wrong. > The reason I am asking is, I think that with clever scaling you will > not have better preformance. Converting to grayscale is certainly > worth it. I've divided my process into several phases. Two of these are preprocessing and scanning with libdmtx. I run the phases in separate processes, so while one image is being scanned, the next is being preprocessed. Since the scanning is the time bottleneck, I have plenty of time to preprocess while waiting for scanning to complete on the previous image. If I can spend 2 seconds extra in preprocessing to gain 8 seconds in scanning, it's worth it. The optimum situation would be where the time taken for preprocessing and scanning would be equal, I suppose. Regarding greyscale: the Python wrapper only allows for RGB/24bpp formatted pixel data (see my other email from yesterday). So my current greyscaling technique involves converting from full colour photograph to greyscale to RGB to work around this. Would it be worth it for me to add the ability to work in different pixel formats in the wrapper? In other words, would there be much of a performance gain for libdmtx to process a 1-channel greyscale image versus a 3-channel one? (I may do some tests of my own to see, but if anyone has insider knowledge, that'd be helpful.) It's highly possible that I'm falling victim to the old "optimising too early" problem. :) Thanks for your help, Nick Irvine |