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.


Topics - ach1lles

Pages: [1]
1
Hi I have been writing scripts for AGI for a couple of weeks now and I am struggling with one thing.

How can I create a region which has corners located on 4 of my camera center points.

I want to use 3 cameras on the base plane to give centerpoint and width and rotation

then one last camera in the top plane to give height

I am able to iterate through the cameras and find the four center points like this:

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

for camera in chunk.cameras:
   if camera.label == 'bottom_03.jpg':
      bot1 = camera
   if camera.label == 'bottom_16.jpg':
      bot16 = camera
   if camera.label == 'bottom_2.jpg':
      bot2 = camera
   if camera.label == 'top_1.jpg':
      top1 = camera


so I can get the center points of each of these.

Then I get stuck since the region wants a size, center and rotation

Any help would be appreciated.

UPDATE

So you can understand, I have a rig with three cameras top, center and bottom looking at an object in the center. The rig rotates around the object taking pictures at exact positions. Once the cameras are aligned I have 17 pictures around the object from each angle. What I need to do during the processing is after point cloud generate automatically adjust the region to be within the circles of camera positions.

camera image attached

Pages: [1]