Re: need a simple image builder



JMR wrote:
I have 3d scanner ascci files with this structure:
The first two lines correspond to Width and Height of the needed image
the following records are the pixels in this format
i j X Y Z G
where i, j are the pixel indexes (from 1 to W and H respectively)
X,Y,Z are 3D coordinates
G is a gray value from 0 to 255

1278
938
1 1 -1.288 8.604 -2.640 89
1 2 -1.281 8.586 -2.634 89
1 3 -1.286 8.634 -2.649 89
...
What I would love is a very simple parser that converted this to a
grayscale image file (bmp, png, tif, ...)

Could anyone here help me? (I'm not a programmer :-( )


You say that you are not a programmer.
Maybe you should abandon this project and
do something else. Alternatively,
investigate software to process LIDAR data.
Your problem occurs in that field as well.

Very kind invitation. But no, I just can't abandon
As I said tha data are output of a 3d scanner.
In fact I was asking for the simplest thing.
I just wanted the image with grays as pixel values.

I can easily clean the text file and have just
W
H
g
g
g
g
g
g
...
and just write the file raw by raw. Thanks.

There is a plain ascii format of pgm, see the example in
http://netpbm.sourceforge.net/doc/pgm.html

The gray values can be given also one in a line, so the above is almost
in the plain pgm format. Only problem is that your values are in
column-major order instead of row-major but that can be handled by
rotate and mirror in an image viewing software. At least XnView on linux
had no problems with a one column plain pgm, so probably the Windows
version will work as well.
.



Relevant Pages

  • Re: need a simple image builder
    ... I just wanted the image with grays as pixel values. ... There is a plain ascii format of pgm, ... The gray values can be given also one in a line, ... had no problems with a one column plain pgm, ...
    (sci.image.processing)
  • Re: Customize Outline Numbered List box question
    ... > Chapter numbering based on Heading One SEEMS to be working fine. ... > the word Chapter before the number in the Number Format box. ... > Restart Numbering after Level box to be after Level 1. ... > Now, I have the number 1, highlighted in gray, in the Number Format box, ...
    (microsoft.public.word.newusers)
  • Re: Converting images
    ... it is like if I load a bmp image 24bit and then I can select "save as..." ... I don't know how Microsoft Paint does the color conversion. ... A 24-bit format is RGB color. ... This means that each pixel is 3 bytes, each of which represents a value from ...
    (microsoft.public.dotnet.general)
  • Re: Drawing floating-point lines with Bresenham
    ... between 2 screens, you can achieve 4 colors (black, white, light gray, ... it goes by saying that if the pixel is lit ... with floating-point endpoints. ... "Zuse, Zuse" sprach die Tante, als das Rechenzimmer brannte. ...
    (comp.graphics.algorithms)
  • Re: Shooting RAW vs RAW and JPG
    ... any digital camera will ever have. ... The problem is that it is fixed, and without the raw ... or pad it out with null bits to fit into the 16-bit format. ... is 12 bits per pixel from the sensor. ...
    (rec.photo.digital)