Update on openCV

Hey folks, I’m analyzing thermal images from a Flir Duo Pro R. This device conveniently captures RGB and thermal images in parallel. However, generating an orthomosaic using only the grayscale thermal data from forested areas has proven to be challenging because canopies are not so different regarding thermal response.

In order to address this issue, I’ve created a unique solution that involves adjusting the RGB image to correspond with the thermal image. This process involves resizing the RGB image, and substituting one of its channels with the thermal band. This results in a Red, Green, Thermal (RGT) composition, all maintained at 16 bits. Maintaining the 16-bit format is crucial to preserve the pixel values accurately because I want the accurate thermal response. Within this RGT framework, I’ve used the Red channel from the RGB camera to guide the mosaic matching, which has proven to be quite effective. With this tailored approach, I’ve been successful in producing high-quality orthomosaics, specifically when using the Lightning Node.

However, I’ve recently encountered a setback. With recent OpenCV updates in the webODM Lightning Node, I am unable to process the same images as before. I am wondering if it’s possible to utilize an older version of the Lightning Node or even downgrade OpenCV to resume my previous workflow? I’m very frustrated because I thought I had the solution. Any advice or assistance would be greatly appreciated.

“OpenCV(4.5.0) /code/SuperBuild/src/opencv/modules/photo/src/inpaint.cpp:755: error: (-210:Unsupported format or combination of formats) 8-bit, 16-bit unsigned or 32-bit float 1-channel and 8-bit 3-channel input/output images are supported in function ‘icvInpaint’”

here is the last part o the task outoput:
2023-05-25 01:27:10,172 DEBUG: Undistorting image 20230117_140449_439_8b_multithermalRGB.tif
2023-05-25 01:27:10,275 DEBUG: Undistorting image 20230117_140457_411_8b_multithermalRGB.tif
2023-05-25 01:27:10,276 DEBUG: Undistorting image 20230117_140358_419_8b_multithermalRGB.tif
2023-05-25 01:27:10,276 DEBUG: Undistorting image 20230117_140353_419_8b_multithermalRGB.tif
2023-05-25 01:27:10,353 DEBUG: Undistorting image 20230117_140451_439_8b_multithermalRGB.tif
2023-05-25 01:27:10,355 DEBUG: Undistorting image 20230117_140439_429_8b_multithermalRGB.tif
2023-05-25 01:27:10,401 DEBUG: Undistorting image 20230117_140442_429_8b_multithermalRGB.tif
2023-05-25 01:27:10,437 DEBUG: Undistorting image 20230117_140403_429_8b_multithermalRGB.tif
2023-05-25 01:27:10,565 DEBUG: Undistorting image 20230117_140341_439_8b_multithermalRGB.tif
2023-05-25 01:27:10,568 DEBUG: Undistorting image 20230117_140421_409_8b_multithermalRGB.tif
2023-05-25 01:27:10,647 DEBUG: Undistorting image 20230117_140408_429_8b_multithermalRGB.tif
2023-05-25 01:27:10,751 DEBUG: Undistorting image 20230117_140504_419_8b_multithermalRGB.tif
2023-05-25 01:27:10,565 DEBUG: Undistorting image 20230117_140443_430_8b_multithermalRGB.tif
2023-05-25 01:27:10,752 DEBUG: Undistorting image 20230117_140503_419_8b_multithermalRGB.tif
2023-05-25 01:27:10,565 DEBUG: Undistorting image 20230117_140459_419_8b_multithermalRGB.tif
2023-05-25 01:27:10,608 DEBUG: Undistorting image 20230117_140448_439_8b_multithermalRGB.tif
[INFO] running “/code/SuperBuild/install/bin/opensfm/bin/opensfm” export_visualsfm --points “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/opensfm”
[INFO] running “/code/SuperBuild/install/bin/opensfm/bin/opensfm” export_ply --no-cameras --point-num-views “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/opensfm”
[INFO] Finished opensfm stage
[INFO] Running odm_filterpoints stage
2023-05-25 01:27:15,365 DEBUG: Entering env context: <fiona.env.Env object at 0x7f3d2dd6c250>
2023-05-25 01:27:15,365 DEBUG: Starting outermost env
2023-05-25 01:27:15,365 DEBUG: No GDAL environment exists
2023-05-25 01:27:15,365 DEBUG: New GDAL environment <fiona._env.GDALEnv object at 0x7f3d2dd6c190> created
2023-05-25 01:27:15,366 DEBUG: Logging error handler pushed.
2023-05-25 01:27:15,366 DEBUG: All drivers registered.
2023-05-25 01:27:15,366 DEBUG: GDAL data files are available at built-in paths
2023-05-25 01:27:15,366 DEBUG: PROJ data files are available at built-in paths
2023-05-25 01:27:15,366 DEBUG: Started GDALEnv <fiona._env.GDALEnv object at 0x7f3d2dd6c190>.
2023-05-25 01:27:15,366 DEBUG: Updated existing <fiona._env.GDALEnv object at 0x7f3d2dd6c190> with options {}
2023-05-25 01:27:15,366 DEBUG: Entered env context: <fiona.env.Env object at 0x7f3d2dd6c250>
2023-05-25 01:27:15,366 DEBUG: Got a copy of environment <fiona._env.GDALEnv object at 0x7f3d2dd6c190> options
2023-05-25 01:27:15,366 DEBUG: Credentialized: {‘CHECK_WITH_INVERT_PROJ’: True, ‘GTIFF_IMPLICIT_JPEG_OVR’: False, ‘FIONA_ENV’: True}
2023-05-25 01:27:15,366 DEBUG: Exiting env context: <fiona.env.Env object at 0x7f3d2dd6c250>
2023-05-25 01:27:15,366 DEBUG: Cleared existing <fiona._env.GDALEnv object at 0x7f3d2dd6c190> options
2023-05-25 01:27:15,367 DEBUG: Stopping GDALEnv <fiona._env.GDALEnv object at 0x7f3d2dd6c190>.
2023-05-25 01:27:15,367 DEBUG: Error handler popped.
2023-05-25 01:27:15,367 DEBUG: Stopped GDALEnv <fiona._env.GDALEnv object at 0x7f3d2dd6c190>.
2023-05-25 01:27:15,367 DEBUG: Exiting outermost env
2023-05-25 01:27:15,367 DEBUG: Exited env context: <fiona.env.Env object at 0x7f3d2dd6c250>
2023-05-25 01:27:15,368 DEBUG: Flushed buffer
2023-05-25 01:27:15,368 DEBUG: Stopped session
[INFO] Sampling points around a 0.01m radius
[INFO] Filtering /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/opensfm/reconstruction.ply (statistical, meanK 16, standard deviation 2.5)
[INFO] Boundary [(-148.9978709408315, 486.0792117435485), (-134.0560281307844, 481.62662406265736), (-119.3701351963391, 476.39128717407584), (-104.98116588336416, 470.3878077045083), (-90.92926551873097, 463.6329354066402), (-77.2536390046007, 456.1455164216459), (-63.99244143636315, 447.9464407004416), (-51.182671649730764, 439.05858372338116), (-38.860068993701134, 429.50674267672), (-27.059013617428718, 419.3175672609359), (-15.812430549529381, 408.5194853525609), (-5.151697836903622, 397.1426236741245), (4.893441000254825, 385.21872375160456), (14.294959952996578, 372.78105335123837), (23.026628716499545, 359.8643136601895), (31.064085872640135, 346.5045424774289), (38.384906858729664, 332.73901365697384), (44.96866653204779, 318.6061331219971), (50.79699615619029, 304.14533171243966), (55.85363464997499, 289.39695516601205), (60.12447395597701, 274.4021515585482), (63.59759840214974, 259.20275649800897), (66.26331794646103, 243.84117640554905), (68.11419521245989, 228.3602701984346), (69.14506623934722, 212.80322971753776), (69.35305488962331, 197.2134592141956), (68.7375808735087, 181.63445425964892), (67.30036136781564, 166.10968038998544), (65.04540622528293, 150.68245183303952), (61.979006786772516, 135.39581066928804), (58.10971832857467, 120.29240673407912), (53.4483361930761, 105.41437863186002), (48.00786566961324, 90.80323616787791), (41.80348570976639, 76.49974453262985), (34.85250657776487, 62.543810572475195), (27.17432155495044, 48.97437143884599), (18.79035283223493, 35.82928596623242), (9.723991742095677, 23.14522903598845), (0.0005334965535439551, 10.957589257508516), (-10.35289338658913, -0.6996297668665648), (-21.307402772567002, -11.79390431381762), (-32.832431502174586, -22.294281279668212), (-44.895824663108215, -32.1714645344764), (-57.46392530249432, -41.39789666980505), (-70.50166833002004, -49.94783587194979), (-83.97267834973172, -57.797427751123905), (-97.83937114771106, -64.92477189004421), (-112.06305855224491, -71.30998294614255), (-126.60405637414078, -76.9352461360395), (-141.42179512584698, -81.78486693650484), (-156.47493321070215, -85.84531486965716), (-171.72147226618836, -89.10526125878096), (-187.11887433970696, -91.55561082623899), (-202.62418056975002, -93.1895270831883), (-218.19413104149862, -94.00245138816535), (-233.7852854821831, -93.99211568012834), (-249.35414445979404, -93.15854879282415), (-604.057886598428, -64.75621658191085), (-611.1646538330242, -64.10059569776058), (-636.911160800868, -61.41111847385764), (-641.1180798471905, -60.941145503893495), (-922.6747936551401, -27.44143694266677), (-938.3530669452739, -25.147738536819816), (-953.8856667307846, -22.016021814197302), (-969.2278333959985, -18.055311303585768), (-984.3353560881224, -13.2770204115659), (-999.1647001176316, -7.694918531924486), (-1013.6731324103894, -1.325091365724802), (-1027.8188446495624, 5.814105436205864), (-1041.5610737530806, 13.702099161222577), (-1068.3758036789368, 30.065842619165778), (-1086.0681815435237, 41.754962682724), (-1089.3494883589156, 44.096421647816896), (-1101.6507604360231, 53.368087101727724), (-1113.4515890795155, 63.26887082494795), (-1124.7198353524727, 73.77180855534971), (-1135.4248107785534, 84.8482960909605), (-1145.5373609199305, 96.46816720254719), (-1155.029944777867, 108.59977578185499), (-1163.8767097993114, 121.2100820299238), (-1172.0535622847092, 134.2647424414754), (-1179.5382330062275, 147.72820333391428), (-1186.3103378565866, 161.56379767879844), (-1192.3514333642088, 175.73384496569633), (-1197.6450669231126, 190.19975381158292), (-1202.1768216005294, 204.92212707735598), (-1205.9343554008228, 219.86086915060878), (-1208.9074348782306, 234.97529515437782), (-1211.0879630070995, 250.2242417447269), (-1212.4700012337125, 265.56617921590805), (-1213.0497856495494, 280.95932460576296), (-1212.8257372422959, 296.361755495891), (-1211.7984661959636, 311.731524175033), (-1209.9707702292653, 327.0267718825489), (-1207.3476269761159, 342.20584281906486), (-1203.936180429213, 357.2273975815624), (-1199.7457214839233, 372.05052575469017), (-1194.787662634917, 386.63485732860863), (-1189.075506894762, 400.9406726434827), (-1182.6248110194283, 414.9290105625987), (-1175.4531431399519, 428.5617745835334), (-1167.580034916813, 441.8018365893513), (-1159.0269283464004, 454.61313796788454), (-1149.8171173648152, 466.9607878122479), (-1139.9756844081276, 478.8111579492688), (-1129.5294321016409, 490.13197451643646), (-1118.5068102643418, 500.8924058675766), (-1106.9378384274023, 511.06314652971923), (-1094.8540240774164, 520.6164970304817), (-1082.2882768475392, 529.5264393184334), (-1069.2748188894184, 537.7687076330185), (-1008.7503616673348, 573.9252081234008), (-995.5387831825938, 581.3640331421047), (-981.9626564433856, 588.114641001448), (-968.0578017551452, 594.1592203769833), (-953.860906764312, 599.4818227794021), (-939.4094296591065, 604.0684046428651), (-924.7415003368806, 607.906864374876), (-909.8958197992761, 610.9870742857456), (-894.9115580406215, 613.3009073100984), (-879.8282506985706, 614.8422584515065), (-864.6856947404158, 615.6070608906448), (-849.523843459494, 615.5932967141271), (-834.3827010594832, 614.8010022360831), (-819.3022171041521, 613.232267908752), (-804.3221811112599, 610.8912328016013), (-219.5728183746396, 504.05630770511925), (-207.6446683278482, 501.6218015998602), (-195.82705063780304, 498.69750755652785), (-148.9978709408315, 486.0792117435485)]
[INFO] running “/code/SuperBuild/install/bin/FPCFilter” --input “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/opensfm/reconstruction.ply” --output “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_filterpoints/point_cloud.ply” --concurrency 16 --radius 0.01 --meank 16 --std 2.5 --stats “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_filterpoints/point_cloud_stats.json” --boundary “/tmp/tmpt57jh8nr.boundary.json”
*** FPCFilter - v0.2 ***

?> Parameters:
input = /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/opensfm/reconstruction.ply
output = /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_filterpoints/point_cloud.ply
stats = /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_filterpoints/point_cloud_stats.json
std = 2.5
radius = 0.01
meanK = 16
boundary = 130 polygon vertexes
concurrency = 16
verbose = no

→ Setting num_threads to 16

→ Cropping

→ Done cropping in 0.03902s

→ Sampling

?> Done in 0.02363s

→ Statistical filtering

→ Spacing estimation completed (0.77 meters)

?> Done in 0.0246s

→ Writing output

?> Done in 0.001999s

?> Pipeline done in 0.08937s

[INFO] Finished odm_filterpoints stage
[INFO] Running odm_meshing stage
[INFO] Writing ODM 2.5D Mesh file in: /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/odm_25dmesh.ply
[INFO] ODM 2.5D DSM resolution: 0.77
[INFO] Created temporary directory: /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp
[INFO] Creating DSM for 2.5D mesh
[INFO] running pdal info “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_filterpoints/point_cloud.ply” > “/tmp/tmpojjejcdh.json”
[INFO] Point cloud bounds are [minx: -978.0499878, maxx: -226.0273895] [miny: 166.1669769, maxy: 380.1409302]
[INFO] DEM resolution is (35, 123), max tile size is 4096, will split DEM generation into 1 tiles
[INFO] Generating /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/mesh_dsm_r2.4190263432641412_x0_y0.tif (max, radius: 2.4190263432641412, resolution: 6.16)
[INFO] Generating /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/mesh_dsm_r1.710509931190971_x0_y0.tif (max, radius: 1.710509931190971, resolution: 6.16)
[INFO] Generating /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/mesh_dsm_r1.2095131716320704_x0_y0.tif (max, radius: 1.2095131716320704, resolution: 6.16)
[INFO] running pdal pipeline -i /tmp/tmprl6c9ikn.json
[INFO] running pdal pipeline -i /tmp/tmp9tnr3a7j.json
[INFO] running pdal pipeline -i /tmp/tmpzzv7x3in.json
[INFO] running gdalbuildvrt -input_file_list “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/tiles_list.txt” “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/tiles.vrt”
0…10…20…30…40…50…60…70…80…90…100 - done.
[INFO] running gdal_translate -co NUM_THREADS=16 -co BIGTIFF=IF_SAFER --config GDAL_CACHEMAX 48.0% “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/tiles.vrt” “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/tiles.tmp.tif”
Input file size is 123, 35
0…10…20…30…40…50…60…70…80…90…100 - done.
[INFO] running gdal_translate -co NUM_THREADS=16 -co BIGTIFF=IF_SAFER --config GDAL_CACHEMAX 48.0% -outsize 10% 0 “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/tiles.tmp.tif” “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/tiles.small.tif”
0
…10…20…30…40…50
…60…70…80.
Input file size is 123, 35
0…10…20…30…40…50…60…70…80…90…100 - done.
[INFO] running gdalbuildvrt -resolution highest -r bilinear “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/merged.vrt” “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/tiles.small_filled.tif” “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/tiles.tmp.tif”
0…10…20…30…40…50…60…70…80…90…100 - done.
[INFO] running gdal_translate -co NUM_THREADS=16 -co TILED=YES -co BIGTIFF=IF_SAFER -co COMPRESS=DEFLATE --config GDAL_CACHEMAX 48.0% “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/merged.vrt” “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/tiles.tif”
Input file size is 123, 35
0…10…20…30…40…50…60…70…80…90…100 - done.
[INFO] Starting smoothing…
[INFO] Smoothing iteration 1
[INFO] Smoothing completed in 0:00:00.016072
[INFO] Completed smoothing to create /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/mesh_dsm.tif in 0:00:00.021306
[INFO] Completed mesh_dsm.tif in 0:00:00.889593
[INFO] Sampling points from DSM: /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/mesh_dsm.tif
[INFO] running “/code/SuperBuild/install/bin/dem2points” -inputFile “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/mesh_dsm.tif” -outputFile “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/dsm_points.ply” -skirtHeightThreshold 1.5 -skirtIncrements 0.2 -skirtHeightCap 100 -verbose
Running with parameters:
–inputFile /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/mesh_dsm.tif
–outputFile /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/dsm_points.ply
–skirtHeightThreshold 1.500000
–skirtIncrements 0.200000
–skirtHeightCap 100.000000
–verbose
Raster Size is 123x35
Extent is (-978.049988, -220.369988), (166.166977, 381.766977)
Read nodata value: -9999
Calculating skirts and vertex count… 355 skirt points will be added
Total vertices: 4044
Sampling and writing to file… done!
[INFO] running “/code/SuperBuild/install/bin/PoissonRecon” --in “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/tmp/dsm_points.ply” --out “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/odm_25dmesh.dirty.ply” --depth 11 --pointWeight 4 --samplesPerNode 1.0 --threads 15 --bType 2 --linearFit
[INFO] running “/code/SuperBuild/install/bin/OpenMVS/ReconstructMesh” -i “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/odm_25dmesh.dirty.ply” -o “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/odm_25dmesh.ply” --remove-spikes 0 --remove-spurious 20 --smooth 0 --target-face-num 400000 -v 0
01:27:19 [App ] Build date: May 2 2023, 07:22:54
01:27:19 [App ] CPU: AMD EPYC Processor (16 cores)
01:27:19 [App ] RAM: 30.67GB Physical Memory 61.35GB Virtual Memory
01:27:19 [App ] OS: Linux 4.15.0-210-generic (x86_64)
01:27:19 [App ] Disk:
01:27:19 [App ] SSE & AVX compatible CPU & OS detected
01:27:19 [App ] Command line: ReconstructMesh -i /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/odm_25dmesh.dirty.ply -o /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/odm_25dmesh.ply --remove-spikes 0 --remove-spurious 20 --smooth 0 --target-face-num 400000 -v 0
01:27:20 [App ] MEMORYINFO: {
01:27:20 [App ] VmPeak: 80244 kB
01:27:20 [App ] VmSize: 68216 kB
01:27:20 [App ] } ENDINFO
[INFO] Finished odm_meshing stage
[INFO] Running mvs_texturing stage
[INFO] Writing MVS Textured file in: /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_texturing_25d/odm_textured_model_geo.obj
[INFO] running “/code/SuperBuild/install/bin/texrecon” “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/opensfm/undistorted/reconstruction.nvm” “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_meshing/odm_25dmesh.ply” “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_texturing_25d/odm_textured_model_geo” -d gmi -o gauss_clamping -t none --no_intermediate_results --nadir_mode --max_texture_size=8192
/code/SuperBuild/install/bin/texrecon (built on May 2 2023, 07:06:51)
Load and prepare mesh:
Reading PLY: 20009 verts… 40026 faces… done.
Generating texture views:
NVM: Loading file…
NVM: Number of views: 89
NVM: Number of features: 18318

Loading 100%… done. (Took 0.119s)
Building adjacency graph:

Adding edges 100%… done. (Took 0.05s)
60039 total edges.
View selection:
Building BVH from 40026 faces… done. (Took: 34 ms)

Calculating face qualities 100%… done. (Took 0.142s)

Postprocessing face infos 100%… done. (Took 0.011s)
Maximum quality of a face within an image: 9905.35
Clamping qualities to 9236.67 within normalization.
Optimizing:
Time[s] Energy
0 36226
0 36024
0 35625
0 35430
0 35349
0 35284
0 35262
0 35261
0 35245
0 35229
0 35222
0 35216
0 35215
0 35212
18770 faces have not been seen
Took: 0.818s
Generating texture patches:
Running… done. (Took 0.105s)
206 texture patches.
Running global seam leveling:
Create matrices for optimization… done.
Lhs dimensionality: 12903 x 12903
Calculating adjustments:
Color channel 0: CG took 82 iterations. Residual is 9.54101e-05
Color channel 1: CG took 83 iterations. Residual is 9.65223e-05
Color channel 2: CG took 123 iterations. Residual is 9.36616e-05
Took 0.027 seconds

Adjusting texture patches 100%… done. (Took 0.128s)
Running local seam leveling:

Blending texture patches 100%… done. (Took 6.492s)
Generating texture atlases:
Sorting texture patches… done.

Working on atlas 1 100%… done.
Finalizing texture atlases… done. (Took: 0s)
Building objmodel:
Saving model… done.
Whole texturing procedure took: 11.181s
[INFO] Generating glTF Binary
[INFO] Converting /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_texturing_25d/odm_textured_model_geo.obj → /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_texturing_25d/odm_textured_model_geo.glb
[INFO] Loading /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_texturing_25d/odm_textured_model_geo.obj
[INFO] Loading odm_textured_model_geo_material0000_map_Kd.tif
2023-05-25 01:27:31,239 WARNING: CPLE_AppDefined in /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_texturing_25d/odm_textured_model_geo_material0000_map_Kd.tif: RowsPerStrip not defined … assuming all one strip.
2023-05-25 01:27:32,023 WARNING: CPLE_NotSupported in driver JPEG does not support creation option JPEG_QUALITY
[INFO] Writing…
[INFO] Wrote /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_texturing_25d/odm_textured_model_geo.glb
[INFO] Compressing with draco
[INFO] running draco_transcoder -i “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_texturing_25d/odm_textured_model_geo.glb” -o “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_texturing_25d/odm_textured_model_geo_compressed.glb” -qt 16 -qp 16
Transcode /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_texturing_25d/odm_textured_model_geo.glb 140
[INFO] Finished mvs_texturing stage
[INFO] Running odm_georeferencing stage
[INFO] Georeferencing point cloud
[INFO] running pdal translate -i “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_filterpoints/point_cloud.ply” -o “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_georeferencing/odm_georeferenced_model.laz” ferry transformation --filters.ferry.dimensions=“views => UserData” --writers.las.compression=“lazip” --filters.transformation.matrix=“1 0 0 170151.0 0 1 0 9675477.0 0 0 1 0 0 0 0 1” --writers.las.offset_x=170151.0 --writers.las.offset_y=9675477.0 --writers.las.scale_x=0.001 --writers.las.scale_y=0.001 --writers.las.scale_z=0.001 --writers.las.offset_z=0 --writers.las.a_srs=“+proj=utm +zone=21 +south +datum=WGS84 +units=m +no_defs +type=crs”
[INFO] Calculating cropping area and generating bounds shapefile from point cloud
[INFO] running pdal translate -i “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_georeferencing/odm_georeferenced_model.laz” -o “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_georeferencing/odm_georeferenced_model.decimated.las” decimation --filters.decimation.step=4
[INFO] running pdal info --boundary --filters.hexbin.edge_size=1 --filters.hexbin.threshold=0 “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_georeferencing/odm_georeferenced_model.decimated.las” > “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_georeferencing/odm_georeferenced_model.boundary.json”
[INFO] running pdal info --summary “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_georeferencing/odm_georeferenced_model.laz” > “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_georeferencing/odm_georeferenced_model.summary.json”
[INFO] running ogr2ogr -overwrite -f GPKG -a_srs “+proj=utm +zone=21 +south +datum=WGS84 +units=m +no_defs” /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_georeferencing/odm_georeferenced_model.bounds.gpkg /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_georeferencing/odm_georeferenced_model.bounds.geojson
[INFO] Creating Entwine Point Tile output
[INFO] running entwine build --threads 16 --tmp “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/entwine_pointcloud-tmp” -i /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_georeferencing/odm_georeferenced_model.laz -o “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/entwine_pointcloud”
1/1: /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_georeferencing/odm_georeferenced_model.laz
Dimensions: [
X:int32, Y:int32, Z:int32, Intensity:uint16, ReturnNumber:uint8,
NumberOfReturns:uint8, ScanDirectionFlag:uint8, EdgeOfFlightLine:uint8,
Classification:uint8, ScanAngleRank:float32, UserData:uint8,
PointSourceId:uint16, GpsTime:float64, Red:uint16, Green:uint16, Blue:uint16
]
Points: 17,916
Bounds: [(169172, 9675643, 130), (169925, 9675858, 179)]
Scale: 0.001
SRS: EPSG:32721

Adding 0 - /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_georeferencing/odm_georeferenced_model.laz
Joining
Done 0
Saving
Wrote 17,916 points.
[INFO] Finished odm_georeferencing stage
[INFO] Running odm_dem stage
[WARNING] Maximum resolution set to 1.0 * (GSD - 10.0%) (13.28 cm / pixel, requested resolution was 2.00 cm / pixel)
[INFO] Classify: False
[INFO] Create DSM: False
[INFO] Create DTM: False
[INFO] DEM input file /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_georeferencing/odm_georeferenced_model.laz found: True
[WARNING] DEM will not be generated
[INFO] Finished odm_dem stage
[INFO] Running odm_orthophoto stage
[WARNING] Maximum resolution set to 1.0 * (GSD - 10.0%) (13.28 cm / pixel, requested resolution was 2.00 cm / pixel)
[INFO] running “/code/SuperBuild/install/bin/odm_orthophoto” -inputFiles /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_texturing_25d/odm_textured_model_geo.obj -logFile “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_orthophoto/odm_orthophoto_log.txt” -outputFile “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_orthophoto/odm_orthophoto_render.tif” -resolution 7.528557529748751 -verbose -outputCornerFile “/var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_orthophoto/odm_orthophoto_corners.txt” -inpaintThreshold 1.0
Inpaint threshold was set to: 1

Reading mesh file… /var/www/data/d9791ab0-da68-4b84-9e9e-c57c326e5404/odm_texturing_25d/odm_textured_model_geo.obj
Found material0000
Loading odm_textured_model_geo_material0000_map_Kd.tif
Mesh file read.

Boundary points:
Point 1: -971.863 167.97
Point 2: -971.863 385.959
Point 3: -233.642 385.959
Point 4: -233.642 167.97

Model bounds x : -971.863 → -233.642
Model bounds y : 167.97 → 385.959
Model area : 160924m2
Model resolution, width x height : 5558x1642
Translating and scaling mesh…
Rendering the ortho photo…
Texture channels: 3
Texture depth: 16bit
Rendering material0000 … done
… model rendered

Edge inpainting
Block [(0, 1024), (0, 1642)]
Block [(3072, 4096), (0, 1642)]
Block [(2048, 3072), (0, 1642)]
Block [(4096, 5558), (0, 1642)]
Block [(1024, 2048), (0, 1642)]
terminate called after throwing an instance of ‘cv::Exception’
what(): OpenCV(4.5.0) /code/SuperBuild/src/opencv/modules/photo/src/inpaint.cpp:755: error: (-210:Unsupported format or combination of formats) 8-bit, 16-bit unsigned or 32-bit float 1-channel and 8-bit 3-channel input/output images are supported in function ‘icvInpaint’

Aborted (core dumped)

===== Dumping Info for Geeks (developers need this to fix bugs) =====
Child returned 134
Traceback (most recent call last):
File “/code/stages/odm_app.py”, line 81, in execute
self.first_stage.run()
File “/code/opendm/types.py”, line 398, in run
self.next_stage.run(outputs)
File “/code/opendm/types.py”, line 398, in run
self.next_stage.run(outputs)
File “/code/opendm/types.py”, line 398, in run
self.next_stage.run(outputs)
[Previous line repeated 6 more times]
File “/code/opendm/types.py”, line 377, in run
self.process(self.args, outputs)
File “/code/stages/odm_orthophoto.py”, line 90, in process
system.run('“{odm_ortho_bin}” -inputFiles {models} ’
File “/code/opendm/system.py”, line 110, in run
raise SubprocessException(“Child returned {}”.format(retcode), retcode)
opendm.system.SubprocessException: Child returned 134

===== Done, human-readable information to follow… =====

[ERROR] Uh oh! Processing stopped because of strange values in the reconstruction. This is often a sign that the input data has some issues or the software cannot deal with it. Have you followed best practices for data acquisition? See Flying Tips — OpenDroneMap 3.1.7 documentation
…90…100 - done.

2 Likes

We could fix it, can you share a small dataset (15-20 images) that exhibits this issue?

3 Likes

Hmm… I like your approach! I think adding a band so we keep the RGB and then have the Thermal, would be a great solution as well.

1 Like

Hey dear piero and Sajin see the link bellow with about 200 16 bits images (R,G,T) geotagged.
Let me know if you’re able to download or not.
Best,
Nathan

1 Like

Got it :+1: can you share the processing options you’re using to process these as well?

2 Likes

I was just doing simple: Options: auto-boundary: true, fast-orthophoto: true.
And it was working.

3 Likes

This is fixed in Fix uint16 3-channel image inputs by pierotofy · Pull Request #1661 · OpenDroneMap/ODM · GitHub so as soon as it’s merged you’ll be able to process the datasets again. I’ve added support for uint16 3-channel images in OpenMVS so you’ll be able to process them even without fast-orthophoto.

The nodes on Lightning will be updated sometimes next week so this fix won’t be online right away.

Thanks for your help!

3 Likes

That is awesome!
Thank you so much.

1 Like

Lightning has now been updated to the latest version.

3 Likes

It worked here. Actually its converging better than before
Thank’s

3 Likes