camera+images file list export

Answered

Comments

14 comments

  • Avatar
    tomasb
    Hi Oscar,

    Thanks for posting, we are happy you like our software.
    To export cameras, image lists, etc, click WORKFLOW\3.Export\Registration. You can select from various types of exports.

    Sounds like you are skilled enough to do some scripting and so on. In RC you can actually define you own export format. This holds for cameras and sparse point-clouds. For models we support only ply/obj/xyz formats. It's based on a rule expansion and default rules are defined in "calibration.xml" file, which is located in the installation folder. It should not be a problem to make an own export by observing default rules.

    In general you can create a new rule and define how would you like the system to prepare outputs, e.g.:

    this defines a "Boujou" export scheme and says the system that it to produce undistorted images with equal resolution and with compensated principal points.

    Code:
        <format mask="*.txt" desc="Boujou" writer="cvs" requiresEqualResolution="1" undistortImages="1" undistortPrincipal="1">
            <body># boujou export: text ... </body>
        </format>

    Body says how to produce boujou format file.

    You simply write what you want to have in your output file e.g.

    Code:
    # Creation date : $(dateTime)

    and the expansion system automatically substitutes variables/terms which starts with $.
    Expansion system supports functions - $ExportCameras(...) and $ExportPoints(...) and $ExportTrack(...).

    $ExportCameras( $(R00:g) $(R01:g) ... ) duplicates what is inside the brackets N times - where N is a number of cameras. Each time it sets variables like R00, R01 ...

    For example, if the scene has 3 cameras then the "$ExportCameras( $(f*2.0+10) )" will plot focal lengths of the 3 cameras. Each focal length till be multiplied by 2 and added by 10. So yes! you can do a simple arithmetic there too.

    The other expansion functions works the same way, but they prepare points, tracks, etc.
    Check the xml file, I thing you will find there export variables for all you are looking for.

    Importing UVs back will be in the next release.
    1
    Comment actions Permalink
  • Avatar
    Oscar Vergara
    awesome! thanks I totally missed that feature.
    Really nice... I'm totally excited to see where you guys are going.
    0
    Comment actions Permalink
  • Avatar
    admin
    Here is a list of export tokens >

    Camera export and file formats
    0
    Comment actions Permalink
  • Avatar
    bananajunky
    Hi tomasb,

    Sorry to tag team on this post from Oscar, but I too would like to know if you can help me export cameras alongside mesh data for import into Maya. I need to be able to bring in correct camera names into Maya as if a .fbx like agi can.

    Is this something that RC can do at present? If so please can you or another advise me on how to achieve this. I would be truly grateful.
    0
    Comment actions Permalink
  • Avatar
    Oscar Vergara
    Hi,
    I'm trying to figure out how to create a 5 digit numeral, such as 00001 using an (index+1:d) expression, even thou "d" does not do the trick.
    Any help?
    thanks
    0
    Comment actions Permalink
  • Avatar
    Paul Ferragut

    Following your instructions tomasb in Program Files\Capturing Reality\RealityCapture\calibration.xml

    I have added 

    <format mask="*.csv" desc="custom export" writer="cvs" requiresGeoref="1" >
    <body EulerFormat="xyz">
    #cameras $(cameraCount)
    #name,width,height,x,y,z,tx,ty,tz,R00,R01,R02,R10,R11,R12,R20,R21,R22,f,px,py,k1,k2,k3,k4,t1,t2
    $ExportCameras($(imageName)$(imageExt),$(width),$(height),$(x),$(y),$(z),$(tx),$(ty),$(tz),$(R00),$(R01),$(R02),$(R10),$(R11),$(R12),$(R20),$(R21),$(R22),$(f),$(px),$(py),$(k1),$(k2),$(k3),$(k4),$(t1),$(t2)
    )
    </body>
    </format>

     

    Nonetheless this "custom export" settings is not appearing when in Reality Capture I try export with alignement>export registration>save type as...

    Am I missing something?

    0
    Comment actions Permalink
  • Avatar
    Wallace Wainhouse CR

    Hi Paul,

              requiresGeoref="1"   - means that unless your scene is geo-referenced you will not get this export option. So you can either change this to requiresGeoref="0" . Or to supportsGeoref="1" to make it an option any time.

    0
    Comment actions Permalink
  • Avatar
    Paul Ferragut

    Thank you for your reply, it worked :) 

    my custom export is available now

    0
    Comment actions Permalink
  • Avatar
    Paul Ferragut

    There is something else I am confused about:

    Out of RC I am trying to bring together the exported 3D model and the exported camera positions, there an issue with the scale. The 3D model needs to be scaled down around 0.02 . Why is it not matching and what scale should be applied?

     

    0
    Comment actions Permalink
  • Avatar
    Wallace Wainhouse CR

    Hi Paul,

    what software are you importing the model into?

    0
    Comment actions Permalink
  • Avatar
    plesk8ter 1

    It is a custom c++/openGL application using Assimp library to import the 3D model, GLM libraries and openFrameworks for the camera. I tried .dae, .obj, .ply with the same scale issue.

    Do you think the issue is with my app?

    I will be trying the same process in C4D or Unreal soon.

     

     

     

    0
    Comment actions Permalink
  • Avatar
    Wallace Wainhouse CR

    Hi,

    I couldn't say for sure, but it is a strange scaling factor that hasn't been reported before, let us know how it goes in the other software.

    0
    Comment actions Permalink
  • Avatar
    plesk8ter 1

    Hi Wallace, 

    Thank you for your reply. I don't have this scaling issue with unreal engine. So it is something with my app, I will investigate further.

    0
    Comment actions Permalink
  • Avatar
    plesk8ter 1

    In Unreal Engine I don't manage to have matching Yaw Pitch Roll from RC exported camera.

    First I am not sure which Euler format to use "xyz"? "zyx"? "zxy"? 

    Unreal Engine "Make Rotator" is defined as "X(Roll),Y(Pitch),Z(Yaw)"

    I think I tried every combinations without success.

    What would be the format to export for Unreal Engine and is it possible to find more information about the euler formats and xyz conventions used in RC?

    Same question on this post:

    https://support.capturingreality.com/hc/en-us/community/posts/360000201552-How-does-RC-define-Yaw-Pitch-Roll-

    0
    Comment actions Permalink

Please sign in to leave a comment.