[Gdal-dev] code to guess the pixels and lines of a raw image
Andrey Kiselev
dron at ak4719.spb.edu
Tue Nov 25 11:28:48 EST 2003
On Tue, Nov 25, 2003 at 04:19:30PM +0000, Joaquim Luis wrote:
> I translated your code to matlab and than realized that it only works
> for gray scale images. Well, at least with the example file I used (an
> RGBA raw file). Andrey, does your code work with color raw images?
Works for any data type (including floating point) and any number of
bands. But testing required, though, because I can't check any possible
cases. Also you should realize, that without information about number of
bands and header size it will give wrong results. For example, the width
of image will be reported as real_width*number_of_bands (in case of
pixel interlaced image). But if you even don't know exactly an image
geometry it still helps you to determine the one.
And, finally, the image should be a "good one" in sense of contents. For
example, if you have the white filled image with the one small black
letter in the corner --- it is not the case when the algorithm works :-)
--
Andrey V. Kiselev
Home phone: +7 812 5274898 ICQ# 26871517
More information about the Gdal-dev
mailing list