Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jeremyeastwood

Pages: 1 2 3 [4]
46
General / How do you manually upload a 3D model to web viewers?
« on: August 11, 2014, 10:28:38 AM »
I've successfully used the auto-upload feature in Photoscan (File -> Upload Model...) to upload 3D models to Verold and Sketchfab, however when I save the model as a .obj (or .ply, .dae, .3ds, etc.) then try to upload the model, the upload fails (or if it succeeds, I end up with a broken model - see attachment).

Any advice on what model formats I should be saving in / what settings I should be using when saving the models, or alternative web-based model viewers I could try would be greatly appreciated.

Thanks


47
Thanks Alexey, that worked perfectly!

48
I'd like to automatically save the (.psz) project files at the end of my scripted process so that I can return to them later on and manually edit the project if necessary.  I am currently doing this with "    doc.save(project_path)" at the end of my workflow, however the saved .psz file is very small and can't be opened.  My full current workflow is this:

complete_file = os.path.join('/tmp', 'photoscan.txt')
blockw = 4096
blockh = 4096

app = PhotoScan.Application()
doc = PhotoScan.Document()

chunk = PhotoScan.Chunk()

for image in image_list:
    print('Loading camera = {}'.format(image))
    camera = PhotoScan.Camera()
    camera.open(image)
    chunk.cameras.add(camera)
    count -= 1
    if count == 0:
        break

gc = PhotoScan.GroundControl(chunk)
gc.loadExif()
gc.apply()

crs = PhotoScan.CoordinateSystem()
crs.init('EPSG::4326')  # WSG84
chunk.crs = crs
chunk.projection = crs

try:
    open(complete_file, mode='w').write('matching')
    chunk.matchPhotos(accuracy='high', preselection='ground control')

    open(complete_file, mode='w').write('aligning')
    chunk.alignPhotos()

    # optimise alignment by limiting poor quality matches
    open(complete_file, mode='w').write('restricting point reprojection error')
    chunk.buildPoints(error=1)

    # optimise camera params
    open(complete_file, mode='w').write('optimising point cloud and camera parameters')
    chunk.optimizePhotos()

    open(complete_file, mode='w').write('building dense cloud')
    chunk.buildDenseCloud(quality='high')
    # chunk.decimateModel(100000)

    open(complete_file, mode='w').write('building model')
    chunk.buildModel(surface='height field', faces='high')

    # chunk.model.closeHoles()
    open(complete_file, mode='w').write('fixing topology')
    try:
        chunk.model.fixTopology()
    except:
        pass

    open(complete_file, mode='w').write('building points')
    chunk.buildPoints(error=1)

    open(complete_file, mode='w').write('building texture')
    chunk.buildTexture(blending='mosaic')

    open(complete_file, mode='w').write('exporting report')
    chunk.exportReport(report_path)

    open(complete_file, mode='w').write('exporting model')
    chunk.exportModel(model_path, format='3ds')

    open(complete_file, mode='w').write('exporting points')
    chunk.exportPoints(points_path, format='obj')

    open(complete_file, mode='w').write('exporting ortho')
    chunk.exportOrthophoto(orthophoto_path, blockw=blockw, blockh=blockh, color_correction=False, blending='mosaic', write_kml=True, write_world=True, projection=chunk.projection)

    open(complete_file, mode='w').write('saving project')
    doc.save(project_path)

    open(complete_file, mode='w').write('done' + '\n' + 'success')
    app = PhotoScan.Application()
    app.quit()

except Exception as e:

    open(complete_file, mode='w').write('error' + '\n' + str(e))
    app = PhotoScan.Application()
    app.quit()

The saved .psz file is only 189B and can't be opened after.  Any ideas about how to save the full .psz file so I can open it manually in Photoscan later on would be greatly appreciated.

Thanks

49
Hi Alexey,

I've found that reconstruction uncertainty is the only way to really improve my stitch, so would really like to implement this in my workflow.  Ideally I just need the commands equivalent to clicking edit>gradual selection>reconstruction uncertainty, and setting the limit to be X(=20), then removing those selected points.  If this can't be done directly in the same way as for reprojection error, then could you give some details on how to implement this myself in python?  Doesn't matter if it's slow / complicated due to the eigenvalue calculations, I'm happy to implement it myself then post details on the outcome.

Thanks

50
hi alexey, thanks for your reply.  my current workflow now contains:

    chunk.alignPhotos()
    chunk.buildPoints(error=1)
    chunk.buildDenseCloud(quality='high')
    chunk.buildModel(surface='height field', faces='high')
    chunk.model.fixTopology()
    chunk.buildPoints(error=1)
    chunk.buildTexture(blending='mosaic')

then export - wasn't sure where to put the chunk.buildPoints(error=1) so I put it in twice.  does the workflow look reasonable to you / what would you change to improve the stitch quality? also is error=1 reasonable?

thanks

51
I want to improve the quality of my orthomosaic stitch results and think this can be done by limiting reprojection error and reconstruction uncertainty.

I think using chunk.buildPoints(error=X) after my chunk.buildDenseCloud() stage limits the reprojection error (although what would be a sensible value for X?), however I can't find a way to set the reconstruction uncertainty - any suggestions?

Thanks

52
General / Re: large vertical spikes in orthomosaic stitch
« on: July 24, 2014, 01:14:27 AM »
Yeah that's what it looked like for me - the images actually start out pretty well separated (see attachment), but during the align phase it moves some of the images at the turns on top of each other (hence several images appear to be placed on top of each other at different z-rotations).  These are definitely the areas causing problems for this stitch, however I have done similar projects with different cameras where I don't get problems at the turn areas.  Could this be an issue with the RPi camera (fairly low quality)?

The map is of a vineyard, so the stripes are rows of vines; images taken with a NOIR RPi camera on a quadcopter.

53
General / large vertical spikes in orthomosaic stitch
« on: July 23, 2014, 11:11:19 PM »
I'm having difficulties stitching an orthomosaic map - it's generating large vertical spikes / severely warping the edges of the map (see attached images) leading to very blurred regions of the orthomosaic map.  The map was made using a Raspberry Pi NOIR camera with infrablue filter (to generate an NDVI map); all images have ground control info.

I've tried calibrating the camera with lens and removing poor quality images (almost all images had a calculated quality > 0.78), but these seem to have little effect.  Any suggestions on how to fix this would be greatly appreciated.

Thanks.

p.s. is there a way to automatically detect blurry / poor quality regions of a mosaic after the build mesh / texture stages and then exclude these from the final orthomosaic export?

54
great, thanks - will try it out

55
I'd like to set the bounding box to automate my 3D model reconstruction workflow - can limits be set on the bounding box to fix its extent in 3D space?

Thanks

Pages: 1 2 3 [4]