Hello guys, i have a little situation here.
I have a script that starts, identify markers, create scale bars, merge chunks, align and build a dense cloud.
But i want to clean an area that is not interesting for me, and resize the bounding box.
In first i wonder that is possible to make this automatically, but i saw that the program use marker or scale bar to resize the bounding box. If there is a way to resize bounding box and clean the area, please HELP ME haha
The other way that i thought is to stop the scrit, and the user will resize the bounding box, clean the not interesting areas and click "enter" (for example), and then the program will continue, but i tried many ways and it not work.
Some one can help me??
This is the code.
import os, PhotoScan
doc = PhotoScan.app.document
path_photos = PhotoScan.app.getExistingDirectory("C:\\Users\lma\Documents\Fotos.jpg")
image_list = os.listdir(path_photos)
photo_list = list()
for photo in image_list:
if photo.rsplit(".",1)[1].lower() in ["jpg", "jpeg", "tif", "tiff"]:
photo_list.append("/".join([path_photos, photo]))
DISTANCE = 0.09193781
start = 0
while (start +1 < len(photo_list)):
chunk = doc.addChunk()
chunk.addPhotos(photo_list[start:start+2])
scalebar = chunk.addScalebar(chunk.cameras[0],chunk.cameras[1])
scalebar.label = chunk.cameras[0].label + " - " + chunk.cameras[1].label
scalebar.reference.distance = DISTANCE
start += 2
PhotoScan.app.document.mergeChunks()
merged_chunk = PhotoScan.app.document.chunks[-1]
merged_chunk.matchPhotos(accuracy=PhotoScan.HighAccuracy)
merged_chunk.alignCameras(adaptive_fitting=True)
merged_chunk.buildDepthMaps(quality=PhotoScan.UltraQuality, filter=PhotoScan.AggressiveFiltering)
merged_chunk.buildDenseCloud(point_colors=True)