![]() | ||
|
|
Random Nonsense / Geek Stuff All those random tech ramblings you can't fit anywhere else! |
![]() |
Thread Tools |
![]() |
#1 |
Cooling Savant
Join Date: Sep 2003
Location: Vallentuna, Sweden
Posts: 410
|
![]()
I want to convert a (large) table of data e.g a 100x1000 matrix into a 100x1000pix grayscale image. I can then analyse the data as an image and perform various image processing tricks on it.
Does anyone have any ideas/converters/links?? |
![]() |
![]() |
![]() |
#2 |
Pro/Staff
Join Date: Oct 2001
Location: Klamath Falls, OR
Posts: 1,439
|
![]()
Why go into an image format? Image processing is REALLY simple. Why not use something simple like this and just code it up? That way, you can do any sort of processing you want instead of relying on some 3rd party app to have the flexibility you need (but it probably doesn't have).
#include <stdio.h> void ReadMyData(double *pData, int *pWidth, int *pHeight) { // insert code to read data here *pWidth = 1000; *pHeight = 100; pData = malloc(sizeof(double) * (*pWidth) * (*pHeight)); } // Example image proc code here void PerformBlur(double *pData, int width, int height) { // insert blur code here } int main() { double *data; int width, height; ReadMyData(data, &width, &height); PerformBlur(); // or whatever code you want // insert code to write out data } |
![]() |
![]() |
![]() |
#3 |
Thermophile
Join Date: Jun 2001
Location: The deserts of Tucson, Az
Posts: 1,264
|
![]()
The GD libraries can create pngs from data. I've used it in perl to make graphs of data. Theres probably some way to just start setting pixel values.
|
![]() |
![]() |
![]() |
#4 | |
Cooling Savant
Join Date: Sep 2003
Location: Vallentuna, Sweden
Posts: 410
|
![]() Quote:
Thanks for the replies. Unfortunately the code is double dutch to me. I am programmatically challenged. Any tips in English? ![]() |
|
![]() |
![]() |
![]() |
#5 |
Cooling Savant
Join Date: Jan 2003
Location: Sydney, Oz
Posts: 336
|
![]()
I'll hack up some java on the train on the way in - there's a canvas demo that should be easy to convert.
What's the data - comma seperated values or fixed length fields?
__________________
Long Haired Git "Securing an environment of Windows platforms from abuse - external or internal - is akin to trying to install sprinklers in a fireworks factory where smoking on the job is permitted." (Prof. Gene Spafford) My Rig, in all its glory, can be seen best here AMD XP1600 @ 1530 Mhz | Soyo Dragon + | 256 Mb PC2700 DDRAM | 2 x 40 Gb 7200rpm in Raid-0 | Maze 2, eheim 1250, dual heater cores! | Full specifications (PCDB) |
![]() |
![]() |
![]() |
#6 | |
Cooling Savant
Join Date: Sep 2003
Location: Vallentuna, Sweden
Posts: 410
|
![]() Quote:
Cheers |
|
![]() |
![]() |
![]() |
#7 |
Cooling Savant
Join Date: Jan 2003
Location: Sydney, Oz
Posts: 336
|
![]()
Just going to draw it onscreen - you can capture it using Alt-Prtscn or your OS equiv.
No error handling, so if you have 999 rows on one row, I neatly Seg-V. ![]() PM me an email addy for java class and src files.
__________________
Long Haired Git "Securing an environment of Windows platforms from abuse - external or internal - is akin to trying to install sprinklers in a fireworks factory where smoking on the job is permitted." (Prof. Gene Spafford) My Rig, in all its glory, can be seen best here AMD XP1600 @ 1530 Mhz | Soyo Dragon + | 256 Mb PC2700 DDRAM | 2 x 40 Gb 7200rpm in Raid-0 | Maze 2, eheim 1250, dual heater cores! | Full specifications (PCDB) |
![]() |
![]() |
![]() |
#8 |
Pro/Staff
Join Date: Oct 2001
Location: Klamath Falls, OR
Posts: 1,439
|
![]()
Well, who knows if this will work. But at least it compiles and you have src.
It parses tab delimited files of numbers and spits out a PNG file. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|