Forum

Author Topic: Arbitrary or Height-field  (Read 21417 times)

igor73

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Arbitrary or Height-field
« on: September 29, 2014, 06:10:31 PM »
I have never tried height field setting before.  I have scanned a 12m by 7m area with  320 images.  Have processed on High/Arbitrary. The images was taken at a 30-45degres angle. The whole area was covered in this way West to East and then again  North to South.  All images alligned.  Results with arbitrary are good. 

I know i can try it instead of asking but faster to ask here.  Is height field only for image set shooting straight down or almost straight down?  Would it be worth trying height field on the above image set?  I have 64gb and in arbitrary i have to divide up in 5 chunks to process. With height field i think i could run it all on Ultra in one chunk. 

eddiethemartian

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Arbitrary or Height-field
« Reply #1 on: September 29, 2014, 06:46:32 PM »
Height Field is 2.5D - there's only one Z coordinate for any given X,Y point.  If the desired result is a 2D plan, looking vertically down on the site then this is the quickest and easiest way of processing it.  If you want a full 3D model, to be viewed from any angle, then you have to use Arbitrary.  In Arbitrary mode an X,Y point can have any number of Z points above it, hence the much more complex and time-consuming processing.


Patribus

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Height-field 'direction' not parallel to z-axis
« Reply #2 on: April 18, 2015, 12:29:24 PM »
Hello,

I have been using heigh field for ever in the context of mapping jobs.

However, there is a point which is not completely clear for me and which I asked here: http://www.agisoft.com/forum/index.php?topic=3714.0

Unfortunately the projection direction for the height field mesh is not always parallel to the z-axis, which is quite a problem for the posterior ortho projection. I always though that the projection is exactly along the z axis, but when I have a non planar distribution of my photos (which is the case for landscpaes which are not flat but show some or a lot of relief) it seams, that PS uses the photo distribution as plane reference along which the height fild projection is done and NOT the z-axis. This would be some waht stupid, to be honest... But maybe I'm just missing something.

Should someone know what's happing, can you please comment on this in the post I share above.

Thanks
& Cheers

JMR

  • Hero Member
  • *****
  • Posts: 528
    • View Profile
Re: Arbitrary or Height-field
« Reply #3 on: April 19, 2015, 02:36:23 PM »
The z-axis considered for the 3.5D projection is that of the bounding box, and it might not be coherent with your coordinate system.
Unfortunately there is no button to make bounding box to have z axis parallel to Z of the ground control. As far as I know, the only way to force it is to run a python scritp. (http://www.agisoft.com/forum/index.php?topic=2552.0)

You can chek if your box is well oriented by hiting num 5 key to set non perspective view and then num 3 to watch your model from one side with z up... if you see the box is rotated then you know why your heightfield is wrong.

Regards!
GEOBIT

Patribus

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Arbitrary or Height-field
« Reply #4 on: April 20, 2015, 01:54:04 PM »
Hey JMR, thanks a lot for your reply, you saved my day.

I completely forgot that Agisoft started the Wiki, maybe I should consult it more often before posting here ;-)

Best regards

toxicmag

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Arbitrary or Height-field
« Reply #5 on: May 12, 2017, 04:43:39 PM »
Dear users,

i was reading this older post while searching for a solution of a current issue in meshing.

I would like to use the "height field option" for meshing to get better mesh results for orthophotos of walls.
So i need to change projection angle to get perpendicular projections on the wall.

There's a python script available to change "direction" of the height field method in buidling the mesh.
I am not familiar with using Python in Photoscan. Do i need it, or can i just manually rotate the boundary box towards the wall?

What is the difference and advantage of the python script?

Thanks a lot.

Alex
#multirotor #VTOL #Trinity #Quantum-Systems #a6000 #a7R #RedEdge #ALTUM #RX1II

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15240
    • View Profile
Re: Arbitrary or Height-field
« Reply #6 on: May 12, 2017, 04:56:39 PM »
Hello Alex,

The colored side of the bounding box defines XY plane for the Height Field reconstruction, as Z = f(X,Y). So you can rotate the bounding box manually.
Best regards,
Alexey Pasumansky,
Agisoft LLC

toxicmag

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Arbitrary or Height-field
« Reply #7 on: May 12, 2017, 05:06:12 PM »
Hey Alexey,   ;D

you are pretty much everywhere in this photoscan-question-world, right??   :D

I found out about that possibility with the bounding box. The red cross determines the pane that will be projected "against".

But if i rotate manually my box will never be perfectly perpendicular to the wall or facade. I tried already and it's hard. Especially in bigger pointclouds. It would be great to define the projection pane just like you can do with the orthophoto projection at the later step. Either by three-point-method, or coordinate system used.

Thanks

Alex
#multirotor #VTOL #Trinity #Quantum-Systems #a6000 #a7R #RedEdge #ALTUM #RX1II

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15240
    • View Profile
Re: Arbitrary or Height-field
« Reply #8 on: May 12, 2017, 05:39:54 PM »
Hello Alex,

The following script should orient the bounding box parallel to the coordinate system axis and have it's colored side (the one with the cross mark in the middle) parallel to YZ plane of the coordinate system. So you can switch to the orthographic view and using the trackball lines rotate around Z axis:

Code: [Select]
import math, PhotoScan

doc = PhotoScan.app.document
chunk = doc.chunk

T = chunk.transform.matrix
ym = PhotoScan.Matrix([[0,0,-1],[0,1,0],[1,0,0]])
v_t = T * PhotoScan.Vector( [0,0,0,1] )
v_t.size = 3

if chunk.crs:
m = chunk.crs.localframe(v_t)
else:
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 = ym* R * (1. / s)

reg = chunk.region
reg.rot = R.t()
chunk.region = reg

I think it would be also possible to create the script that will orient the bounding box according to the markers (two vectors), similar to the planar projection selection.
Best regards,
Alexey Pasumansky,
Agisoft LLC