This CSV is temperature data extracted from a radiometric thermal camera. Each cell is a temperature reading. The resolution is 640x512.
I want to turn this into an image (tif) where each temperature is converted into pixel value. How do I do this?
This CSV is temperature data extracted from a radiometric thermal camera. Each cell is a temperature reading. The resolution is 640x512.
I want to turn this into an image (tif) where each temperature is converted into pixel value. How do I do this?
Other urls found in this thread:
netpbm.sourceforge.net
en.m.wikibooks.org
stackoverflow.com
matplotlib.org
twitter.com
gradient from low to high, label each cell with its corresponding gradient
then zoom out
Give me the CSV file
Find out the maximum value your data can take, then make that #FFFFFF and get interpolating. You might also want to pick a base color and set brightness its to whatever you got from the interpolation.
>tfw can see a pattern just by looking at data
so this is what matrix looks like huh
This sounds like fun, post file please.
Thanks for the replies guys. Should have added that this is concerning a mapping project. The thermal images have RGB values from 0-255 but the temperature values are saved inside the proprietary R-JPEG format. The RGB values are always adjusted to the min-max and are therefore not suitable for making orthomosaics without some adjustments. The temperature data can be extracted though. I want to bypass this by making new images from the temperature data.
I've been trying to find how to turn this matrix into a "x,y,temp" order but I don't know how to do it yet.
Step 1, do your own homework
Step 2, fuck it, I'm bored. Read this page:
netpbm.sourceforge.net
That is the simplest image format you can can get, and you can convert your csv into an image using bash or python or just about anything you can think of. Then use imagemagic to convert the file into a better format.
Basically you write
P3
#some comment
Xres YRes
HigestVal
Rval Gval Bval
Do that for each pixel and voila, you'll have an image.
What autism level do you have, I'm really having difficulty visualizing stuff rightnow. Maybe I should've kept my nofap streak.
Also, by having the temperatures themselves as pixel values, I could read the temperatures directly from QGIS.
Thanks - I'll have a look at this.
The file: uploadfiles[ ]io/mmuic
the most strainghtforward way is to use imagemagick
>import numpy as np
>import matplotlib.pyplot as plt
>data = np.loadtxt(open("thermo4.csv", "rb"), delimiter=",")
>plt.matshow(data, cmap=plt.get_cmap("Greys"))
>plt.show()
cool didn't see the file upload
guess it's
>delimiter=";" then
I know how up use imagemagic libraries in r/python/ruby/octave to do this, but not how to do it with imagemagic directly. Can you actually?
If anyone is interested, you can import text dat and Ong files directly into OpenSCAD using the surface command. Easy way to make height maps of data.
en.m.wikibooks.org
aliens?
Hey this is awesome! Do you think this could be applied to thermal data from 400+ images? so that every resulting temperature picture had the same color range? and thus be able to both stitch them together and read the temperature value by examining the pixels?
pic related
Well, let's just say this didn't contain any humans... ;)
nofap makes it harder for me to focus
(sorry was thinking)
yeah sure !
If you have ram to spare I'll even suggest you just litterally load all of them inside an np.array, I just tested it for 400 copies of the csv file you sent me, it took a little while to load but it just ate up around 1gb of ram.
I'm trying to wrap my head around how to turn the resulting (400, 512, 640) to something like (200*512, 200*640) so you can plot all of them in a single image
do
your
own
homework
faggot
>be brainlet
>refuse to acknowledge own insufficiency
>blame it on something else instead
>"i-it is only because I masturbated rather than following the reddit meme"
>le smart but lazy
Any other Jow Forumseografag here? Nice to see more people involved
You're a genius! Since these are drone images, I reckon I would use exiftool to apply all the original headers and metadata to the new temperature images, and then use image stitching software like OpenDroneMap or MapsMadeEasy to produce orthorectified, georeferenced maps.
I had managed this where temperature ranges were consistent (see ) but the actual temperature values didn't translate over to the maps.
What sort of camera was used to capture this data?
Zenmuse XT-R 640x512
ok just figured it out, I "stitched" them just with numpy actually
I had some trouble with swaping though not sure if I recommend this method
stackoverflow.com
>(arr.reshape(h//nrows, -1, nrows, ncols).swapaxes(1,2).reshape(h, w))
this is what I was looking for
Oh, I see, it's a FLIR tau 2 rebranded by zenmuse, right?
Can geolocation data be included in each shot with this sensor?
yeah so I'll definitly recommand using your image stitching software and just use my previous script for each thermoX.csv you have
matplotlib.org
here you see that imshow takes two interresting parameters : vmin and vmax
>vmin, vmax : scalar, optional, default: None
vmin and vmax are used in conjunction with norm to normalize luminance data. Note if you pass a norm instance, your settings for vmin and vmax will be ignored.
loop over all your files to get the min value and max value over all of them then generate all the images with vmin=min and vmax=max
What kind of ass-backward software produces image in csv format
the kind an
>html coder
never uses
you'll wanna do this to get nice images to stitch afterwards (no axes and no padding)
>img = plt.imshow(data, cmap=plt.get_cmap("Greys"), vmin=min, vmax=max)
>img.axes_get_xaxis().set_visible(False)
>img.axes_get_yaxis().set_visible(False)
>plt.axis('off')
>plt.savefig("givemeaname.png", bbox_inches='tight', pad_inches=0)
>plt.axis('off')
gotta go sleep, I think you can easily figure out the rest
頑張ってください!
Yes and yes
FLIR has a proprietary JPG format which stores temperature values, but the temperature values cannot easily be read unless you use their proprietary software. They offer you to save temperatures manually as a csv inside that software. Thankfully there are ways to bypass this and extract the temperatures automatically.
You're a rock star, you know that? It's almost 4 in the morning where I am, so I'll have to try this out tomorrow. Thank you so much for your help - I'm very grateful.
You mean even an
>html coder
wouldn't use
>Fnord
Now that's a word I haven't seen in a while.
im guessing the csv file got deleted or sumthin?
or op is just samefagging really hard
What an interesting thread!
>uploadfiles[ ]io/mmuic
It should still work? Just replace the brackets with a dot.
pay me in 14 yo virgins and Ill do it for you
will the pixels represent an absolute value from their corresponding temperatures? Or are they going to be relative to a certain colormap?