Linux3DCS icon indicating copy to clipboard operation
Linux3DCS copied to clipboard

Photogrammetry problem

Open AndreaMonzini opened this issue 6 years ago • 8 comments

Hello, i'm blocked with errors when i try to solve photogrammetry from my photos: i did 360 degree photos of an object on a turntable. My system: Ryzen 7, 32 GB Ram, RX580 8 GB Camera: Panasonic GX80

When i use photos from example it works.

Can i upgrade the last OrtogOnBlender on Linux3DCS? I saw the useful english guide to use OrtogOnBlender, it would be useful an installation guide for Linux if possible ( i use Fedora or Debian).

Thank you

captura de tela_2018-04-01_11-48-41 captura de tela_2018-04-01_11-50-43

Terminal:

location: :-1 Traceback (most recent call last): File "/home/cogitas3d/.config/blender/2.78/scripts/addons/OrtogOnBlender-master/init.py", line 1105, in draw row.operator("anim.keyframe_insert", text="", icon="CLIP").type='BUILTIN_KSI_LocRot' TypeError: bpy_struct: item.attr = val: enum "BUILTIN_KSI_LocRot" not found in ('DEFAULT')

location: :-1

location: :-1 Traceback (most recent call last): File "/home/cogitas3d/.config/blender/2.78/scripts/addons/OrtogOnBlender-master/init.py", line 1105, in draw row.operator("anim.keyframe_insert", text="", icon="CLIP").type='BUILTIN_KSI_LocRot' TypeError: bpy_struct: item.attr = val: enum "BUILTIN_KSI_LocRot" not found in ('DEFAULT')

('Using input dir : ', '/home/cogitas3d/Documentos/mappa/') (' output_dir : ', '/tmp/OpenMVG')

  1. Intrinsics analysis You called : /home/cogitas3d/Programs/openMVG/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_SfMInit_ImageListing --imageDirectory /home/cogitas3d/Documentos/mappa/ --sensorWidthDatabase /home/cogitas3d/Programs/openMVG/src/software/SfM/../../openMVG/exif/sensor_width_database/sensor_width_camera_database.txt --outputDirectory /tmp/OpenMVG/matches --focal -1 --intrinsics --camera_model 3 --group_camera_model 1
  • Image listing - 0% 10 20 30 40 50 60 70 80 90 100% |----|----|----|----|----|----|----|----|----|----|

Warning & Error messages: P1020693" model "DMC-GX80" doesn't exist in the database Please consider add your camera model and sensor width in the database. P1020694" model "DMC-GX80" doesn't exist in the database Please consider add your camera model and sensor width in the database. P1020696" model "DMC-GX80" doesn't exist in the database Please consider add your camera model and sensor width in the database. P1020699" model "DMC-GX80" doesn't exist in the database Please consider add your camera model and sensor width in the database. P1020700" model "DMC-GX80" doesn't exist in the database Please consider add your camera model and sensor width in the database. P1020701" model "DMC-GX80" doesn't exist in the database Please consider add your camera model and sensor width in the database. P1020708" model "DMC-GX80" doesn't exist in the database Please consider add your camera model and sensor width in the database. P1020709" model "DMC-GX80" doesn't exist in the database Please consider add your camera model and sensor width in the database. P1020710" model "DMC-GX80" doesn't exist in the database Please consider add your camera model and sensor width in the database. P1020716" model "DMC-GX80" doesn't exist in the database Please consider add your camera model and sensor width in the database. P1020717" model "DMC-GX80" doesn't exist in the database Please consider add your camera model and sensor width in the database. P1020725" model "DMC-GX80" doesn't exist in the database Please consider add your camera model and sensor width in the database.

SfMInit_ImageListing report: listed #File(s): 12 usable #File(s) listed in sfm_data: 12 usable #Intrinsic(s) listed in sfm_data: 0 2. Compute features You called : /home/cogitas3d/Programs/openMVG/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_ComputeFeatures --input_file /tmp/OpenMVG/matches/sfm_data.json --outdir /tmp/OpenMVG/matches --describerMethod SIFT --upright 0 --describerPreset NORMAL --force 0 --numThreads 0

  • EXTRACT FEATURES - 0% 10 20 30 40 50 60 70 80 90 100% |----|----|----|----|----|----|----|----|----|----|

Task done in (s): 0 3. Compute matches You called : /home/cogitas3d/Programs/openMVG/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_ComputeMatches --input_file /tmp/OpenMVG/matches/sfm_data.json --out_dir /tmp/OpenMVG/matches Optional parameters: --force 0 --ratio 0.8 --geometric_model f --video_mode_matching -1 --pair_list --nearest_matching_method AUTO --guided_matching 0 --cache_size unlimited

  • Regions Loading - 0% 10 20 30 40 50 60 70 80 90 100% |----|----|----|----|----|----|----|----|----|----|

  • PUTATIVE MATCHES - PREVIOUS RESULTS LOADED; #pair: 66 sh: 1: neato: not found

  • Geometric filtering - 0% 10 20 30 40 50 60 70 80 90 100% |----|----|----|----|----|----|----|----|----|----|


Task done in (s): 0

Export Adjacency Matrix of the pairwise's geometric matches sh: 1: neato: not found 4. Do Sequential/Incremental reconstruction Sequential/Incremental reconstruction Perform incremental SfM (Initial Pair Essential + Resection).

  • Features Loading - 0% 10 20 30 40 50 60 70 80 90 100% |----|----|----|----|----|----|----|----|----|----|

Track building

Track filtering

Track export to internal struct

Track stats

-- Tracks Stats -- Tracks number: 5407 Images Id: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,

TrackLength, Occurrence 2 2747 3 1294 4 525 5 522 6 112 7 56 8 51 9 6 10 7 11 13 12 74

There is no defined intrinsic data in order to compute an essential matrix for the initial pair. 5. Colorize Structure

The input SfM_Data file "/tmp/OpenMVG/reconstruction_sequential/sfm_data.bin" cannot be read. 6. Structure from Known Poses (robust triangulation) Compute Structure from the provided poses

The input SfM_Data file "/tmp/OpenMVG/reconstruction_sequential/sfm_data.bin" cannot be read.

The input SfM_Data file "/tmp/OpenMVG/reconstruction_sequential/robust.bin" cannot be read. mkdir: é impossível criar o diretório “/tmp/MVS”: Arquivo existe

The input SfM_Data file "/tmp/OpenMVG/reconstruction_sequential/sfm_data.bin" cannot be read. 11:48:21 [App ] Build date: Jun 23 2017, 18:56:25 11:48:21 [App ] CPU: AMD Ryzen 7 1700 Eight-Core Processor
11:48:21 [App ] RAM: 31.41GB Physical Memory 1000.00MB Virtual Memory 11:48:21 [App ] OS: Linux 4.10.0-42-generic (x86_64) 11:48:21 [App ] SSE & AVX compatible CPU & OS detected 11:48:21 [App ] Command line: --estimate-normals 1 /tmp/MVS/scene.mvs 11:48:21 [App ] Build date: Jun 23 2017, 18:56:25 11:48:21 [App ] CPU: AMD Ryzen 7 1700 Eight-Core Processor
11:48:21 [App ] RAM: 31.41GB Physical Memory 1000.00MB Virtual Memory 11:48:21 [App ] OS: Linux 4.10.0-42-generic (x86_64) 11:48:21 [App ] SSE & AVX compatible CPU & OS detected 11:48:21 [App ] Command line: -d 6 /tmp/MVS/scene_dense.mvs 11:48:21 [App ] Build date: Jun 23 2017, 18:56:25 11:48:21 [App ] CPU: AMD Ryzen 7 1700 Eight-Core Processor
11:48:21 [App ] RAM: 31.41GB Physical Memory 1000.00MB Virtual Memory 11:48:21 [App ] OS: Linux 4.10.0-42-generic (x86_64) 11:48:21 [App ] SSE & AVX compatible CPU & OS detected 11:48:21 [App ] Command line: /tmp/MVS/scene_dense_mesh.mvs Input mesh /tmp/MVS/scene_dense_mesh_texture.ply output mesh /tmp/MVS/scene_dense_mesh_texture2.obj Output mask: vertex normals, wedge tex coords, Loading Plugins: Current Plugins Dir is: /usr/lib/meshlab/plugins Error in XMLFile: filter_measure.xml - line: -1, column: -1 - Error in XMLFile: filter_mutualinfo.xml - line: -1, column: -1 - Total 227 filtering actions Total 13 io plugins Opening a file with extention ply MeshLabServer: Failed loading of /tmp/MVS/scene_dense_mesh_texture.ply from dir /home/cogitas3d Mesh scene_dense_mesh_texture.ply loaded has 0 vn 0 fn No Script to apply. Failed saving Mesh /tmp/MVS/scene_dense_mesh_texture.ply saved as /tmp/MVS/scene_dense_mesh_texture2.obj (0 vn 0 fn) ( 0.0001 sec | 0.0001 sec) Importing OBJ '/tmp/MVS/scene_dense_mesh_texture2.obj'... Progress: 0.00%

Traceback (most recent call last): File "/home/cogitas3d/Programs/blender-2.78c-linux-glibc219-x86_64/2.78/scripts/addons/io_scene_obj/init.py", line 147, in execute return import_obj.load(context, **keywords) File "/home/cogitas3d/Programs/blender-2.78c-linux-glibc219-x86_64/2.78/scripts/addons/io_scene_obj/import_obj.py", line 945, in load float_func = get_float_func(filepath) File "/home/cogitas3d/Programs/blender-2.78c-linux-glibc219-x86_64/2.78/scripts/addons/io_scene_obj/import_obj.py", line 866, in get_float_func file = open(filepath, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/tmp/MVS/scene_dense_mesh_texture2.obj'

location: /home/cogitas3d/Programs/blender-2.78c-linux-glibc219-x86_64/2.78/scripts/modules/bpy/ops.py:189

location: /home/cogitas3d/Programs/blender-2.78c-linux-glibc219-x86_64/2.78/scripts/modules/bpy/ops.py:189 Error: Traceback (most recent call last): File "/home/cogitas3d/Programs/blender-2.78c-linux-glibc219-x86_64/2.78/scripts/addons/io_scene_obj/init.py", line 147, in execute return import_obj.load(context, **keywords) File "/home/cogitas3d/Programs/blender-2.78c-linux-glibc219-x86_64/2.78/scripts/addons/io_scene_obj/import_obj.py", line 945, in load float_func = get_float_func(filepath) File "/home/cogitas3d/Programs/blender-2.78c-linux-glibc219-x86_64/2.78/scripts/addons/io_scene_obj/import_obj.py", line 866, in get_float_func file = open(filepath, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/tmp/MVS/scene_dense_mesh_texture2.obj'

location: /home/cogitas3d/Programs/blender-2.78c-linux-glibc219-x86_64/2.78/scripts/modules/bpy/ops.py:189

Traceback (most recent call last): File "/home/cogitas3d/.config/blender/2.78/scripts/addons/OrtogOnBlender-master/init.py", line 762, in execute GeraModeloFotoDef(self, context) File "/home/cogitas3d/.config/blender/2.78/scripts/addons/OrtogOnBlender-master/init.py", line 529, in GeraModeloFotoDef bpy.ops.import_scene.obj(filepath=tmpOBJface, filter_glob=".obj;.mtl") File "/home/cogitas3d/Programs/blender-2.78c-linux-glibc219-x86_64/2.78/scripts/modules/bpy/ops.py", line 189, in call ret = op_call(self.idname_py(), None, kw) RuntimeError: Error: Traceback (most recent call last): File "/home/cogitas3d/Programs/blender-2.78c-linux-glibc219-x86_64/2.78/scripts/addons/io_scene_obj/init.py", line 147, in execute return import_obj.load(context, **keywords) File "/home/cogitas3d/Programs/blender-2.78c-linux-glibc219-x86_64/2.78/scripts/addons/io_scene_obj/import_obj.py", line 945, in load float_func = get_float_func(filepath) File "/home/cogitas3d/Programs/blender-2.78c-linux-glibc219-x86_64/2.78/scripts/addons/io_scene_obj/import_obj.py", line 866, in get_float_func file = open(filepath, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/tmp/MVS/scene_dense_mesh_texture2.obj'

location: /home/cogitas3d/Programs/blender-2.78c-linux-glibc219-x86_64/2.78/scripts/modules/bpy/ops.py:189

location: :-1

location: :-1 Traceback (most recent call last): File "/home/cogitas3d/.config/blender/2.78/scripts/addons/OrtogOnBlender-master/init.py", line 1105, in draw row.operator("anim.keyframe_insert", text="", icon="CLIP").type='BUILTIN_KSI_LocRot' TypeError: bpy_struct: item.attr = val: enum "BUILTIN_KSI_LocRot" not found in ('DEFAULT')

location: :-1

location: :-1

AndreaMonzini avatar Apr 02 '18 11:04 AndreaMonzini

Hi @AndreaMonzini !

It simple to be solved.

You will need open the file: /OrtogOnBlender/OpenMVG/sensor_width_camera_database.txt

Edit it and create a las line with this text:

DMC-GX80; 3.8

Save, and run the photogrammetry again.

cogitas3d avatar Apr 03 '18 17:04 cogitas3d

Thanks for the mail I had issues with converting the DICOM to 3d. Screen shot I posted to you on Facebook messanger

On Tue 3 Apr, 2018, 11:27 PM Cicero Moraes, [email protected] wrote:

Hi @AndreaMonzini https://github.com/AndreaMonzini !

It simple to be solved.

You will need open the file: /OrtogOnBlender/OpenMVG/sensor_width_camera_database.txt

Edit it and create a las line with this text:

DMC-GX80; 3.8

Save, and run the photogrammetry again.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cogitas3d/Linux3DCS/issues/9#issuecomment-378340525, or mute the thread https://github.com/notifications/unsubscribe-auth/AhGQH549T9Y3AM_ukjFViMkOAMgL2x5mks5tk7gFgaJpZM4TDbTb .

RaghavendraByakodi avatar Apr 03 '18 18:04 RaghavendraByakodi

@cogitas3d thank you! i will try the solution as soon as possible :)

AndreaMonzini avatar Apr 03 '18 18:04 AndreaMonzini

Hello @cogitas3d, in 3DCS i cannot find /OrtogOnBlender/OpenMVG/sensor_width_camera_database.txt but i found /home/cogitas3d/Programs/openMVG/src/openMV/exif/sensor_width_camera_database.txt and i was able to update the file with DMC-GX80; 3.8

But unfortunately it doesn't work, Blender and the terminal continue to crash so i have no terminal report.

I would like to resize and crop my photos in Blender, but i think i will lose the exif data...it will work with images without exif data?

Thank you.

AndreaMonzini avatar Apr 03 '18 21:04 AndreaMonzini

@AndreaMonzini You can update:

  1. OrtogOnBlender add-on: https://github.com/cogitas3d/OrtogOnBlender
  2. OrtogOnBlender executables: https://goo.gl/Rqf1T4

After, put the code I sent you in the correct link.

cogitas3d avatar Apr 03 '18 21:04 cogitas3d

Hello @cogitas3d i'm trying also with fedora distro. i added the executables like in the image but after i click "cria fotogrametria" it say there is no photo in the folder i guess. Where i can add the other executables?

AndreaMonzini avatar Apr 03 '18 22:04 AndreaMonzini

Than executables only runs on Linux Ubuntu 17.04

cogitas3d avatar Apr 03 '18 22:04 cogitas3d

hello @cogitas3d ,

i restarted 3DCS distro and i was able to install last OrtogOnBlender add-on but i still cannot use my photos.

In 3DCS i cannot find /OrtogOnBlender/OpenMVG/ so i wrote your code into /home/cogitas3d/Programs/openMVG/src/openMV/exif/sensor_width_camera_database.txt

With last OrtogOnBlender 1.1.5 only SMVS worked and i was able to use the example photo but not my photos.

Anyway thank you for the support, i will try again in next days.

AndreaMonzini avatar Apr 03 '18 23:04 AndreaMonzini