IPB
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

Numbers to Pixels
djellison
post Jan 7 2009, 01:10 PM
Post #1


Founder
****

Group: Chairman
Posts: 14457
Joined: 8-February 04
Member No.: 1



I've got a few .tab's from the PHX Lidar

Basically - after playing with it for a while, I'll end up with a spreadsheet of values. Each column being one sample 30s apart - each row being a different altitude.

Does anyone know a means of taking a CSV or similar, and turning it into a small image with pixel brightness representing the values from the CSV?

I've thought of one technique using conditional formatting in Excel - but it probably wont work very well
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
RoverDriver
post Jan 7 2009, 05:39 PM
Post #2


Member
***

Group: Admin
Posts: 978
Joined: 29-September 06
From: Pasadena, CA - USA
Member No.: 1200



QUOTE (djellison @ Jan 7 2009, 05:10 AM) *
I've got a few .tab's from the PHX Lidar

Basically - after playing with it for a while, I'll end up with a spreadsheet of values. Each column being one sample 30s apart - each row being a different altitude.

Does anyone know a means of taking a CSV or similar, and turning it into a small image with pixel brightness representing the values from the CSV?

I've thought of one technique using conditional formatting in Excel - but it probably wont work very well


I'm lazy and cheap. I use the PGM format and then convert it to whatever format I need to distribute. Here's a crude way of generating an image from your data:

1) save the data table as text, no commas, just spaces between the data values.

2) using your favourite editor, edit the file and add at the top of the page:

P2
<sizex> <sizey>
<maxval>

where the <sizex> and <sizey> indicate the number of columns and rows in your table and <maxval> should be the maximum value in your table (needs to be less than 65535).

3) use your favourite image conversion tool to convert the image to whatever format you prefer. I use the netpbm set of tools or xv (hey I know, I'm old!).

Note that all the numbers need to be integers. Here's an example of a PGM image:

P2
3 4
11
0 1 2 3 4 5 6 7 8 9 10 11

Hope this helps


--------------------
Disclaimer: all opinions, ideas and information included here are my own,and should not be intended to represent opinion or policy of my employer.
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 13th December 2024 - 08:31 PM
RULES AND GUIDELINES
Please read the Forum Rules and Guidelines before posting.

IMAGE COPYRIGHT
Images posted on UnmannedSpaceflight.com may be copyrighted. Do not reproduce without permission. Read here for further information on space images and copyright.

OPINIONS AND MODERATION
Opinions expressed on UnmannedSpaceflight.com are those of the individual posters and do not necessarily reflect the opinions of UnmannedSpaceflight.com or The Planetary Society. The all-volunteer UnmannedSpaceflight.com moderation team is wholly independent of The Planetary Society. The Planetary Society has no influence over decisions made by the UnmannedSpaceflight.com moderators.
SUPPORT THE FORUM
Unmannedspaceflight.com is funded by the Planetary Society. Please consider supporting our work and many other projects by donating to the Society or becoming a member.