Forum

Author Topic: import csv image in photoscan  (Read 7139 times)

dpoursanidis

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • the Remote Sensing Lab
Re: import csv image in photoscan
« Reply #15 on: May 13, 2022, 04:51:42 PM »
Even if it is an old post, the information included here is invaluable.

We have a Pi 640 and need to go for photogrammetry analysis.
If shot in Tiff, then chaos appear since data have no metadata and camera calibration parameters are hard to be found since OPTRIS refuse to provide us up to now.
I have a 60 degrees lense on the camera which has a resolution image of 640x480.

Should i go for csv files and follow the above workflow?
In parallel i collect optical data with a Sony RX 100 and use Ardupilot Mission Planner for geotagging.

Any idea is much appreciate since we have stuck in the corner with that system

Paulo

  • Hero Member
  • *****
  • Posts: 970
    • View Profile
Re: import csv image in photoscan
« Reply #16 on: May 14, 2022, 05:13:48 AM »
Hi,

i would try to set camera  focal to 60° x 45° FOV / f = 10,5 mm  in camera calibration window as well as pixel sixe to 0.017 mm

and see how alignment goes. using tif images...

If you have a small set to share we can look at best practice for alignment.

Hope this can get yu going,
Best Regards,

Paul Pelletier,
Surveyor

Paulo

  • Hero Member
  • *****
  • Posts: 970
    • View Profile
Re: import csv image in photoscan
« Reply #17 on: May 16, 2022, 06:14:54 AM »
Hello dpoursanidis,

regarding your parallel collection with RX100, does that mean that u are capturing both RGB Sony RX100 and Infrared Optris PI640 images on same platform?

If so what is the focal length of your RX100? If it is set at 10.4 mm then the following parameters would result from a capture at 65 m AGL with 80% front and 65% sise overlap for Infraredimagery see attachment...

As you can see the resulting GSD for the 2 sensors is very different (10.5 cm for Infrared Thermal vs 1.5 cm for Sony RGB sensor).  So it would make sense to process the 2 image sets in 2 different chunks and use the georeferenced RGB set to extract CPs to georeference the Thermal set...

Again if you can share a small sample with 2 sets of images (RGB and thermal) then we could have a look at it...
Best Regards,

Paul Pelletier,
Surveyor

dpoursanidis

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • the Remote Sensing Lab
Re: import csv image in photoscan
« Reply #18 on: May 16, 2022, 03:54:25 PM »
Hi,

i would try to set camera  focal to 60° x 45° FOV / f = 10,5 mm  in camera calibration window as well as pixel sixe to 0.017 mm

and see how alignment goes. using tif images...

If you have a small set to share we can look at best practice for alignment.

Hope this can get yu going,

Are these the only parameters we need for the reconstruction of the ortho? The rest of the calibration data how can influence the results?
« Last Edit: May 16, 2022, 03:59:49 PM by dpoursanidis »

dpoursanidis

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • the Remote Sensing Lab
Re: import csv image in photoscan
« Reply #19 on: May 16, 2022, 03:57:21 PM »
Hello dpoursanidis,

regarding your parallel collection with RX100, does that mean that u are capturing both RGB Sony RX100 and Infrared Optris PI640 images on same platform?

If so what is the focal length of your RX100? If it is set at 10.4 mm then the following parameters would result from a capture at 65 m AGL with 80% front and 65% sise overlap for Infraredimagery see attachment...

As you can see the resulting GSD for the 2 sensors is very different (10.5 cm for Infrared Thermal vs 1.5 cm for Sony RGB sensor).  So it would make sense to process the 2 image sets in 2 different chunks and use the georeferenced RGB set to extract CPs to georeference the Thermal set...

Again if you can share a small sample with 2 sets of images (RGB and thermal) then we could have a look at it...


Thanks for that detailed insights and the calculations.

Here (ftp://ftp.iacm.forth.gr/incoming/DP/OPTRIS_SONY_TESTdata/) you can have access to geotagged imagery from both cameras.

The mission planning will be based on the parameters of the Thermal Camera, since we intend to collect data in cities (if and when we will have the permissions to operate) and create a complete 3D thermal cube for the selected areas.

Meanwhile, is the excel file available for reuse?

Paulo

  • Hero Member
  • *****
  • Posts: 970
    • View Profile
Re: import csv image in photoscan
« Reply #20 on: May 16, 2022, 07:47:06 PM »
Hello,

Ive looked at your georeferenced thermal images and the problem is that they are jpg RGB representations of thermal imagery colored with thermal palette and do not represent the absolute temperature. You would need the tif images with absolute temperature (16 bit) or CSV to realy try to align....

Also, I aligned the RGB data set and I find that the height above ground level AGL is a mere 3.76 m. Why so low? and the Sony overlaps of about 50% front and 60% side is too low as it would correspond to 40% front and 45% side lap for thermal Optris imagery. Way too low for good alignment of these low resolution images. You would need about 80% front/65 to 70% side for good reconstruction...

I would try a flight at 65 m Height with photos taken every 10 m (or every 2 s if drone flies at 5m/s) and lines spaced every 20 m. This would result in thermal images with 80% front/70% side lap. Then save themal imagery as Tiff absolute temperature (16 bit) and alignment should be viable....with Mission Planner, you can use Survey grid to plan a mission defining your PI640 camera parameters. I example, I used a flight at 65 m Height over a polygon of 21 000 m2, with flight lines spaced at 21 m and a photo taken every 10 m (80% forward and 68% side). see 3rd attachment...
« Last Edit: May 17, 2022, 04:41:59 AM by Paulo »
Best Regards,

Paul Pelletier,
Surveyor

dpoursanidis

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • the Remote Sensing Lab
Re: import csv image in photoscan
« Reply #21 on: May 17, 2022, 10:49:30 AM »
Thanks for the advices. I am aware of that requirements. This set of data come from the suppier of the system.

We are on the process to learn all needed software and safety procedures since Mission Planner is complete a new world for me.

I will be back with a proper set of material for further analysis.

If you want to have a look at the "raw" therma data here they are > ftp://ftp.iacm.forth.gr/incoming/DP/OPTRIS_SONY_TESTdata/pi640-original-dataset_2022-05-05_1732/

Thank you for your kind support.

Paulo

  • Hero Member
  • *****
  • Posts: 970
    • View Profile
Re: import csv image in photoscan
« Reply #22 on: May 17, 2022, 12:11:17 PM »
Ok dpoursanidis,

I will look at the original themal images to see If I can get some alignment. By the way do you fly your drone with both cameras (RGB and LWIR) installed and controlled by the AutoPilot or do 2 flights (one with RGB then another with LWIR)?

Update. no luck no alignment also the tiff images are formed by 2 planes of data but each with  3 band RGB 8bit. 2nd plane is in greensih tones see attachment. Normally with RJPEG you have 1st plane with RGB grey level image and 2nd plane has absolute temperature (K) in 1 band 16 bit.

Also note that your location file shows a trajectory in a very unstable zig zag form. It seems that your on borne GPS is not performing well...see 2nd attachement
Best Regards,

Paul Pelletier,
Surveyor

dpoursanidis

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • the Remote Sensing Lab
Re: import csv image in photoscan
« Reply #23 on: May 17, 2022, 12:53:38 PM »
Dear Paulo

The data i provide as tiff files are radiometric files.

The same file as you use in Agisoft is attached as printscrenn from the OPTRIS PIX application as it reads only such files.

The camera is configured through that application and i can have either .tiff or .csv either image data .csv or temperature profile data .csv

I don't have option for RJPEG format and OPTRIS is very unsupportive in any request for such issues.

Thanks for the support

Dimitris Poursanidis

Paulo

  • Hero Member
  • *****
  • Posts: 970
    • View Profile
Re: import csv image in photoscan
« Reply #24 on: May 17, 2022, 09:35:49 PM »
Hello Dimitris,

I think I found how OPtris stores the temperature in second plane of tiff files. They are stored as RGB 3 band 8bit bit, the red band contains all 0 values, green all 247 or 248 value and blue band contains temp deg Celsius * 10...see attachement where I transform the 2nd plane image into a list of bytes that is like [0, 247, 190, 0, 247, 191,....] see attachment

PS. actually this is true for blue values less than  255 so it is more cpmplicates to extract temperature....
« Last Edit: May 17, 2022, 10:00:52 PM by Paulo »
Best Regards,

Paul Pelletier,
Surveyor

Paulo

  • Hero Member
  • *****
  • Posts: 970
    • View Profile
Re: import csv image in photoscan
« Reply #25 on: May 18, 2022, 03:30:14 AM »
Dear Dimitris,

I think I have found how to transform the tiff 2nd plane image from Optris into absolute temperature in cK. But I think, it would be better to test on a real thermal capture over some significant area maybe flying at 65 m AGL. Because right now with this sample over a limited area (flying at 3.76 m AGL), the temperatures are varying wildly from 0 deg C to more than 80 deg C...

So, once you have more data  please feel free to PM me for further discussions...

By the way, I was able, after a lot of trials to align the last 3 16 bit thermal  images. The result is not great due to flying Height and poor overlap. So with better overlap and  higher altitude, we should get better alignment. The thermal orto shows a variation of 18 deg C to 46 deg C... see attachment
« Last Edit: May 18, 2022, 10:30:21 AM by Paulo »
Best Regards,

Paul Pelletier,
Surveyor

dpoursanidis

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • the Remote Sensing Lab
Re: import csv image in photoscan
« Reply #26 on: May 19, 2022, 12:46:50 PM »
Dear Paul

You make my day!

Tomorrow or on Monday i will do a proper data collection flight since the weather now is not good to fligh.
You create a script for the workflow?

Thanks a lot

Dimitris

Paulo

  • Hero Member
  • *****
  • Posts: 970
    • View Profile
Re: import csv image in photoscan
« Reply #27 on: May 19, 2022, 10:56:27 PM »
Dear Dimitris,

once you have your test flight feel free to share it with me. As for the script, it can be developped so as to automatically create the thermal 16 bit camera chunk from the pi640 original images.

Right now I am doing this with many GUI manual steps that need to be streamlined into a script...

From there you would need to align, georeference and generate requred products. I think the best would be to get GCPS from the RGB geotagged set and import into thermal set for referencing...

this way the 2 sets of image would have a common reference frame.

Keep in contact,
« Last Edit: May 19, 2022, 11:20:14 PM by Paulo »
Best Regards,

Paul Pelletier,
Surveyor