romulogcerqueira / sonar_simulation-buildconf

Build system of Imaging Sonar Simulator
Apache License 2.0
33 stars 15 forks source link

Surface irregularities #27

Closed AronNoren closed 3 years ago

AronNoren commented 3 years ago

Hello Romulo, I am doing my M.Sc thesis in Deep learning for AUVs and I am using your simulator to export sonar images in bins/beams-form and use them for training neural networks. Firstly, thank you for creating the tool, everything has gone smoothly and I am very impressed by the simulation. Anyways, I have read your papers to understand how to use the tool correctly, I am however having some trouble understanding how to apply the surface irregularities. Is the idea to apply a texture in e.g. blender before exporting the object as .stl & .osgb? Or is the texture somehow inserted into the simulator as a standalone file? Furthermore, I am currently trying to create textures for different materials by simply randomising RGB values where e.g. R & G takes values in [0, 0.2] and B in [0.8,1]. Is this a too simplistic approach?

Thanks again, Aron

romulogcerqueira commented 3 years ago

Hi Aron,

it is good to hear your interest in the sonar simulator.

I used normal maps to represent the surface irregularities on sonar images. Here I have a sample of this application. Please take a look!

AronNoren commented 3 years ago

Thank you for the quick reply Romulo. I am just getting in to C++ so I am still having some problems understanding how everything communicates, especially with osg. I read through the code but I am still not sure how to load my own objects into osg in c++ to edit them. When setting the "reflectance" of a material I simply edit the osgb-file to include the desired reflectance. I found that by doing the same for "textures" i was able to successfully apply textures to my objects. I will probably be able to create a shell-script to do this for all my objects (1000+). Although this solves my issue I understand that this is not how the simulator was intended to be used, sorry for butchering it. I will return to this later on in the project when I have time to try and use the intended method.

Thanks again for taking the time! Aron