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 - someDude

Pages: [1]
Naaa, I'm taking that back. watched the linked yt-webcast to the end now. So ground control points CAN help to reveal possible z-value errors in the rtk-data, if you messed up something I did not fully understand yet.
Takeaway: doublecheck your data...  :-\

Ok, so I might have found the answer here:
So the rtk drone image positions are essentially ACPs (air control points), and the possible error without GCPs is a vertical bias, that occurs (logically) due to the way the point cloud point positions are calculated. So for my case, no problem, the GCPs are only needed for model reconstruction.
thank you myself  ;D ;)


For my use case, I will not do any 3D reconstruction, but I COULD do it with the images that I acquire. But I need an accuracy of the camera locations of better than 3-4cm in all directions. Now I'm reading all sorts of stuff how people are improving their "precision", by putting just a few ground control points into their scan.

So here's my question for you pros:
Does this use of GCPs improve only the precision of the SCAN DATA, or also the precision of the CAMERA POSITIONS (my area of interest)?

I'll be using a rtk/ppk drone (probably DJI, so the proclaimed camera location precision is a few cm. I'm just wondering if that is marketing speech and I really should use the scan data, to ensure that the camera positions are ALWAYS at this level of accuracy.

Thanks for your wisdom.

General / Re: Basic Issue
« on: October 14, 2017, 03:20:28 PM »
probably the surface of the scull isn't distinct enough. make it wet, and throw some coffe-powder on there. if the results get better, then you have a clue.
or your lighting isn't good enough or varies.

General / Re: set region & co.sys from markers
« on: October 13, 2017, 10:20:06 PM »
okay, so I added the line
Code: [Select] = PhotoScan.CoordinateSystem('LOCAL_CS["Local CS",LOCAL_DATUM["Local Datum",0],UNIT["millimetre",1]]')to the script.
It's based on the assumption that so far the coordinate system was randomly assigned. To solve this I used the snippet that I found here:

By doing so, the Coordinate System is set to the unit "mm".
I checked with some scans that didn't work before and now they work.
This makes much more sense than image quality...
So the proper script for the mm-based target-pdf is this:

Code: [Select]
# Project to automate Agisoft Process
# Automation of the floor alignment and setting the correct bounding box.
# Initially created by: Richard Garsthagen -
# Changed by Vincent

import PhotoScan
import math

doc =
chunk = doc.chunk      #  supposed to point to the active chunk = PhotoScan.CoordinateSystem("EPSG::1025") # set our coordinate-sys to "mm" = PhotoScan.CoordinateSystem('LOCAL_CS["Local CS",LOCAL_DATUM["Local Datum",0],UNIT["millimetre",1]]')

#   py
#   |
#   |
#   |
#   p0 ------------ px

p0 = "target 2"   
px = "target 3"
py = "target 1"

distancepx = 0.15
distancepy = 0.2

regionSizeX = 0.15
regionSizeY = 0.35
regionSizeZ = 0.1

mp0 = 0
mpy = 0
mpx = 0

fp0 = 0
fpy = 0
fpx = 0

#setting for Z up, Y forward
vector0 = PhotoScan.Vector((0,0,0))
vectorY = PhotoScan.Vector((0,distancepy,0))   # Specify Y Distance
vectorX = PhotoScan.Vector((distancepx,0,0))   # Specify X Distance

#doing some marker magic, finding/assigning them, I guess...
c = 0
for m in chunk.markers:
  if m.label == p0:
    mp0 = c
    fp0 = 1
    m.reference.location = vector0
    m.reference.enabled = 1
    print ("Found center point: ", vector0)
    #print("chunk.markers[0].position", chunk.markers[0].position)
  if m.label == py:
    mpy = c
    fpy = 1
    m.reference.location = vectorY
    m.reference.enabled = 1
    print ("found Y point: ", vectorY)
    #print("chunk.markers[y].position", chunk.markers[1].position)
  if m.label == px:
    mpx = c
    fpx = 1
    m.reference.location = vectorX
    m.reference.enabled = 1
    print ("found X point: ", vectorX)
    #print("chunk.markers[x].position", chunk.markers[2].position)
  c = c + 1

if fp0 and fpx and fpy:
  print ("Found all markers")
  print ("Error: not all markers found")

# creating a new region from the existing one and rotating it
newregion = chunk.region
T = chunk.transform.matrix
v_t = T * PhotoScan.Vector( [0,0,0,1] )
m = PhotoScan.Matrix().diag([1,1,1,1])

m = m * T
s = math.sqrt(m[0,0] ** 2 + m[0,1] ** 2 + m[0,2] ** 2) #scale factor
R = PhotoScan.Matrix( [[m[0,0],m[0,1],m[0,2]], [m[1,0],m[1,1],m[1,2]], [m[2,0],m[2,1],m[2,2]]])
R = R * (1. / s)
newregion.rot = R.t()

#scaling the new region
dist = chunk.markers[mp0].position - chunk.markers[mpy].position
dist = dist.norm()
ratio = dist / distancepy
newregion.size = PhotoScan.Vector( [regionSizeX*ratio, regionSizeY*ratio, regionSizeZ*ratio] )

# moving the new region to a different location
posReg_world = PhotoScan.Vector( [0.1 , (0.5*regionSizeY) , (0.5*regionSizeZ+0.002) ] )
posReg_int = chunk.transform.matrix.inv().mulp(posReg_world) = posReg_int
chunk.region = newregion

print ("Bounding box should be aligned now")

Until further notice, this is SOLVED  8)  :)

General / Re: set region & co.sys from markers
« on: October 13, 2017, 07:56:06 PM »
Hello Alexey,
as it seems at the moment, it all comes down to my favourite flaw: not enough pictures / not enough good pictures. I took more images with minimally better lighting and now it works again.

the thing that's so hard to judge is this: when the images are aligned, PS shows quite well what i'm trying to reconstruct. Also all three targets are found and are shown in the right spot. Still, in some cases that does not seem to be enough to create the new coordinate system.
Does that make sense to you?

General / Re: set region & co.sys from markers
« on: October 09, 2017, 01:27:03 AM »
ah, of course you need to detect the markers, before the script works at all. i know, right? ;)

General / set region & co.sys from markers
« on: October 08, 2017, 11:36:01 PM »
Hello everybody,

I found this supergreat script for scaling and rotating a scanned model into a usable coordinate system, written by Richard on his site:
The script looks for some markers, builds a coordinate system from them and rotates the scan-model to lay flat & scaled properly in the origin of the Photoscan coordinate system. Or maybe it scales & rotates, the PS-co.sys - either way, you can export your model to a next CAD system afterwards and have your model sit perfectly on the ground, with the right scale. Super useful and great, as I said :)

Now, I have changed his script it a little, to fit my purpose of scanning small objects on a sheet of paper with some targets on it. Unfortunately I don't really speak python, so a lot of the code is based on guessing and copy+paste from the forum.

So my script worked fine until a while ago, but now not anymore. I'm not even sure if it has to do with a current update. Maybe the syntax has changed, so now the rotating/scaling of my model does not work anymore? From all I found on the forum, it looks like some crucial things changed regarding the rotation of the Photoscan Region, but I cannot figure out what's the current way to solve this. 

I have attached the marker-template and my script. Could anyone with some python/agisoft-superpowers take a look at the script and look for some obvious mistakes or changes in the syntax?

Thanks a lot!

General / Re: Mesh to solid
« on: February 22, 2014, 06:56:52 PM »
Never mind. I managed to do it :) Thank you for the fast reply!

could you share how you did it?

Feature Requests / Re: align photos - sequential matching
« on: February 20, 2014, 08:46:04 PM »
You are right, my alignment errors came from somewhere else:

improper lighting and no decent background. since i don't have endless space inside my flat to walk around my object with a camera, i tried to bring diffuse softbox-lighting on the object and turn it in front of a white canvas. But PS would keep misplacing similar parts of the objects, leaving nothing but a huge explosion of features.


everything worked perfectly when i took the pictures outside, on a cloudy day and let the object stay in one place, walking around it.

I guess I should practise some more, before asking for stuff ;)

Feature Requests / align photos - sequential matching
« on: February 18, 2014, 03:15:31 AM »
I'm having a few struggles with chunks aligning perfectly at first attempt, but when i add some more photos to fill the missing gaps, suddenly many others won't align anymore and new holes pop up. weird.

As far as I learned about the photo alignment, it is looking at all possible pairs of a chunk. Is this correct?

Well, at least for my case, when scanning small objects, I have the option to deliberately create a large overlap from one photo to the next (which I'm already doing, still not good enough it seems  :'( ).

In case I understood this right, it might reduce the computational time significantly, if one could select some sort of "sequential alignment", where PS only looks at the overlap of two successive images in the list of the chunk.
Also, this might reduce alignment errors, where PS might (not sure if this is the case) be unsure where a certain image belongs.

Thank you for your consideration

Feature Requests / Re: Decimate mesh by tolerance
« on: February 18, 2014, 02:47:19 AM »
I have a similar concern and would like to suggest "local mesh decimation". For example, one could simply decimate the mesh based on a selection, the same way one is deleting unwanted artefacts (free-form selection etc.)

When scanning small objects, I have found that sometimes I need a fine mesh to keep some details, while on other parts of the same model I'm getting a blisterish, bubbly surface with this fine mesh, so a smoother one would be better. So far I found a compromise, but it involves changing the model. This won't always work.

Thank you for your consideration.

General / Re: Opinions on a choice: Mac Pro or iMac?
« on: February 18, 2014, 12:38:23 AM »
Just on a sidenote: People always forget, that with the 27" iMac you're getting a 950€/$ Screen. So If you ask how much a workstation you can expect for 2500-950=1550 €/$ it should be pretty clear in which ballpark the imac is settled.
It is still a fair deal in my eyes, it just depends on what you want.

If the i7 is enough for ones budget and you rather take a little performance bump than working with windows (I understand, I'm a mac guy myself, but now am considering a PC for Photoscan work) you could also attach a VIdock + a Sonnet adapter with a nice ATI-card to increase OpenCL performance:

Of course, this is NOT a PRO setup. But considering the exponential increase of cost per performance when moving from i7 to Xeon, this seems like a legit move for a part time Photoscanner ;)

General / Re: New Mac pro and PS
« on: February 18, 2014, 12:16:07 AM »
But as for FirePro cards they should not be very fast in terms of PhotoScan performance.

Hello Alexey,
Could you give a hint why this is the case? I was expecting a pretty decent speed, since I believed that apple put these in to increase OpenCL performance.

I'm waiting for a project to come up and have to get new hardware. If I would actually take the punch in my wallet and go for a Xeon setup, a mac pro could be one of the options.


Pages: [1]