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 - Alexey Pasumansky

Pages: 1 ... 874 875 [876] 877 878 ... 990
13126
Feature Requests / Re: Photoscan Professional "Artist" Edition
« on: April 16, 2014, 10:46:45 PM »
Hello marcel,

We've seen the suggestion in that topic. Is Optimization feature the only needed from Pro edition?

13127
Python and Java API / Re: Python Scripting
« on: April 16, 2014, 06:29:55 PM »
You can try this one meanwhile to check if it's working fine:

Code: [Select]
import os
import PhotoScan

def main():

print("Script started")

doc = PhotoScan.app.document
chunk = PhotoScan.Chunk()
chunk.label = "New Chunk"
doc.chunks.add(chunk)


path_photos = PhotoScan.app.getExistingDirectory("Specify folder with input photos:")
path_photos += "/"

#checking save filename
project_path = PhotoScan.app.getSaveFileName("Specify project filename for saving:")
if not project_path:
print("Script aborted")
return 0

if proejct_path[-4:].lower() != ".psz":
project_path += ".psz"

#adding photos
image_list = os.listdir(path_photos)
for photo in image_list:
if ("jpg" or "jpeg" or "tif" or "png") in photo.lower():
chunk.photos.add(path_photos + photo)
PhotoScan.app.update()

#align photos
chunk.matchPhotos(accuracy = "high", preselection = "generic", filter_mask = False, point_limit = 50000)
chunk.alignPhotos()

#build dense cloud
chunk.buildDenseCloud(quality = "high", filter = "aggressive")

#build mesh
chunk.buildModel(surface = "arbitrary", source = "dense", interpolation = "enabled", faces = "high")

#build texture
chunk.buildTexture(mapping = "adaptive", blending = "mosaic", color_correction = False, size = 4096, count = 1

#save
doc.save(project_path)

PhotoScan.app.update()
print("Script finished")
return 1


PhotoScan.app.addMenuItem("Custom menu/Process photos", main)

13128
Python and Java API / Re: Python Scripting
« on: April 16, 2014, 06:15:06 PM »
Hello chillema,

Few questions: do you want to specify the paths to input images and output project file manually (using common OS dialogs)? And is there any OpenCL device to be activated during depth maps estimation step?

13129
Bug Reports / Re: Crash Photoscan when opening OpenCL PReferences
« on: April 16, 2014, 03:16:23 PM »
Hello Patribu,

Please submit the crash report with any comment indicating that it is sent by you. However, the idea with driver update is good.
Also please check that you are using latest PhotoScan version (1.0.4).

13130
General / Re: Photo Alignment Issues
« on: April 16, 2014, 11:11:31 AM »
Hello skybrick,

I recommend to check Camera Calibration window (accessible from Tools menu) and input at least approximate values for focal length and sensor pixel size (both in mm), then choose Auto in for the Type field in Initial tab.

Also please note that for linear flights at least triple overlap is required.

13131
General / Re: Oriantation after processing
« on: April 16, 2014, 11:06:24 AM »
Hello anvi,

The accuracy of the final result will depend on the measurement accuracy for control points coordinates.

Usually we recommend to have 10-15 GCPs regularly spread on the area of interest.

13132
Python and Java API / Re: Chunk.smoothModel()
« on: April 15, 2014, 01:20:34 PM »
Hello ristag,

It should be something like the following:

Code: [Select]
import PhotoScan

def main():

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

if chunk.model:
x = PhotoScan.app.getInt("Input number of smoothing steps:", 3)
chunk.smoothModel(x)
print("Smoothing by script finished.")
return 1
else:
print("No model. Script aborted.")
return 0

PhotoScan.app.addMenuItem("Custom menu/Smooth model", main)

You need to run it one via Run Script menu and the menu item will remain there until PhotoScan window is closed. Alternatively you can put this script to autostart folder and it will appear in any PhotoScan window opened.

Note that the script will work only for active chunk, so it you work with multiple chunks let me know and I'll include modifications to script.

13133
Python and Java API / Re: file python text encoding
« on: April 14, 2014, 04:22:56 PM »
Hello lmg,

In the file provided there are BOM symbols that are not supported by Python interpreter, So I recommend to use UTF-8 without BOM encoding. Usually this marks appear in the very beginning of the file, but here it might be copied from another file.

Also please note that in path strings you need to use "/" (slash) symbol or double back slashes "\\".

13134
General / Re: Oriantation after processing
« on: April 14, 2014, 02:45:57 PM »
Hello anvi,

If you need to perform measurements on the model or scale/orient the model according to its' real world orientation and dimensions, you need to input coordinates of reference points to the Ground Control pane. It could be coordinates of camera locations or any control points located on the models' surface. Otherwise PhotoScan would not be able to guess how the object or scene is oriented in the real world.

13135
General / Re: Accuracy of masking from low/med quality model
« on: April 14, 2014, 02:39:33 PM »
Hello Andrew,

During mask from model generation all distortions are taken into account, so the imprecision you are speaking about is likely to be caused by two factors:
- inaccurate/low quality model,
- inaccurate camera alignment results.
There could be several ways of model based masks improvement, starting from manual mask refinement up to several cycles of alignment, model generation and mask creation.

Masks in PhotoScan are pixel accurate and all the pixels that are covered with masks will not be used in processing, except Align Photos stage with unchecked "Constrain features by masks" option.

13136
General / Re: baseline filters (overlap optimisation)
« on: April 14, 2014, 11:49:57 AM »
Hello Frank,

Could you please try the following script on your data.

You can use argument field for better results. It is some kind of tolerance and is 50 by default, lower values mean more strict criterion, but I do not recommend to go under 5-10 units:

Code: [Select]
import sys
import PhotoScan

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

arg = 50 #tolerance by default

if len(sys.argv) > 1:   
arg = int(sys.argv[1])

print("Script started.")

camera_list = list(chunk.cameras)

for camera in list(camera_list): #removing from list NA and disabled cameras
if not (camera.transform and camera.enabled):
camera_list.remove(camera)

dist = list()
for i in range(0, len(camera_list)):
icamera = camera_list[i]
for j in range(i + 1, len(camera_list)):

jcamera = camera_list[j]

stereobase = (icamera.center - jcamera.center).norm()
dist.append(stereobase)

dist.sort()
mediana = dist[len(dist) // 2]

for i in range(0, len(camera_list)):
icamera = camera_list[i]
if not icamera.enabled:
continue

for j in range(i + 1, len(camera_list)):

jcamera = camera_list[j]
stereobase = (icamera.center - jcamera.center).norm()

if stereobase < mediana / arg:
jcamera.enabled = False
continue

print("Script finished.")

13137
General / Re: Single camera scanning thread?
« on: April 14, 2014, 11:27:13 AM »
It could be removed by topic starter.

13138
General / Re: baseline filters (overlap optimisation)
« on: April 13, 2014, 10:54:44 PM »
Hello Frank,

I think that we have the script that disables/removes cameras that are too close, taking into account their coordinates estimated during Align Photos stage. I'll check it and let you know tomorrow.

13139
Python and Java API / Re: Python scripts collection?
« on: April 13, 2014, 10:52:29 PM »
Hello Andrew,

Currently there's no script repository or collection available.

Most of scripts that we have were created for special tasks (by user requests or for our internal needs), so they require description that could be even longer than the script itself. Another reason why we do not put all the scripts online, the need to keep them up-to-date. Sometimes PhotoScan Python API changes and older scripts need to be modified according to such changes, but keeping the entire collection updates is not reasonable, since most of scripts will not be used due to their specifics.

But still we have Python scripting sub-forum here and will surely help any PhotoScan user that require some assistance in script creation.

13140
Маски созданы и добавлены правильно.

Проблема в том, что на этапе выравнивания PhotoScan находит слишком мало общих точек для расчёта положений камер. Это может быть связано с несколькими факторами:
- недостаточное перекрытие между кадрами, слишком резко меняется кадр (у Вас на полный оборот вокруг объекта всего 7 кадров, попробуйте уменьшить шаг между соседними кадрами, чтобы было минимум 15-20 кадров на один круг вокруг объекта),
- шумные фотографии. Попробуйте уменьшить ISO фотоаппарата на минимум (если это позволяет освещение, либо используется съёмка со штатива), также, если снимаете со штатива, могу порекомендовать уменьшить диафрагму (увеличить f-stop до f/8 или даже f-11) - это позволить лучше захватить детали на поверхности,
- постарайтесь более эффективно использовать кадр. Сейчас изображение объекта занимает всего около четверти кадра, возможно, использование портретной ориентации камеры будет более удачным для данного объекта. Не обязательно, чтобы объект целиком влезал в кадр, если не попавшие в него детали будут видны на других фотографиях,
- сам объект может также влиять на качество результата. Проблематичные объекты - не имеющие хорошего текстурного рисунка, например, та же бликующая кружка, большая часть поверхности которой белая, скорее всего не восстановится, так как на гладкой белой поверхности особых точек PhotoScan не найдёт.

Pages: 1 ... 874 875 [876] 877 878 ... 990