"ExampleSimulateBaProblem/inputData/baconfig_eo_large_noise.yaml" ) #Reading settings for our problem outputXtrelDirectoryName = "ExampleSimulateBaProblem/baProblem" # eozFile = "ExampleSimulateBaProblem/inputData/CaliforniaEO.txt" eozFile = "ExampleSimulateBaProblem/inputData/EOZ_zielonki_50.txt" sfmio.importFromExternalOrientationTextfile( eozFile, ' ', #importing external orientation for our images flightMissionImages, "xyz", observedPosition=False, observedOrientation=False, camera=missionCamera) sfmio.writeImageCollectionToObj( flightMissionImages, "ExampleSimulateBaProblem/outputAndVisualisation/zielonki", imageWidthInMeters=12, axesLenghtInMeters=7.0) #generating structure #dsm = rasterio.open("ExampleSimulateBaProblem/inputData/CaliforniaDSM.tif", driver="GTiff") dsm = rasterio.open("ExampleSimulateBaProblem/inputData/DEM_zielonki.tif", driver="GTiff") listOfImageCollections = [] listOfImageCollections.append(flightMissionImages) stdDevControllPoints = np.array([ baSettings.noiseForControllPoints[1][0], baSettings.noiseForControllPoints[1][1], baSettings.noiseForControllPoints[1][2]
import xtrelio as xtrelio import sfmio as sfmio xtrelReportFile = "California/report.txt" imagesWithEstimatedEO = xtrelio.createImageCollectionFromXtrelReport( xtrelReportFile, 0) objectPointCollection = xtrelio.createObjectPointCollectionFromXtrelReport( xtrelReportFile, 0, 0) sfmio.writeImageCollectionToObj(imagesWithEstimatedEO, "california_estimated", imageWidthInMeters=12.0, axesLenghtInMeters=9.0) sfmio.writeObjectPointsToFile("object_points_estimated.txt", objectPointCollection) listOfImageCollections = [] listOfObjectPointCollections = [] listOfImageCollections.append(imagesWithEstimatedEO) listOfObjectPointCollections.append(objectPointCollection) sfmio.writeRaysToDxf("rays_estimated_tie.dxf", listOfObjectPointCollections, listOfImageCollections, "tie", 9) sfmio.writeRaysToDxf("rays_estimated_controll.dxf", listOfObjectPointCollections, listOfImageCollections, "controll", 1)
numberOfColumns=6000, principalDistanceMilimeters=12.0) pose1.setRotationEuler(conv.degrees2Radians(np.array([25.0, -3.0, -0.75])), 'xyz') pose1.setTranslation(projectionCenter1) pose2.setRotationEuler(conv.degrees2Radians(np.array([0.0, -1.0, -0.55])), 'xyz') pose2.setTranslation(projectionCenter2) print("getting transformation matrix for pose 1") print(pose1.T) print("getting transformation matrix for pose 2") print(pose2.T) image1 = geometry.Image() image1.setCamera(camera1) image1.setPose(pose1) image2 = geometry.Image() image2.setCamera(camera1) image2.setPose(pose2) collectionOfImages = geometry.ImageCollection() collectionOfImages.addImage(image1, "im1") collectionOfImages.addImage(image2, "im2") sfmio.writeImageCollectionToObj(collectionOfImages, "test.obj")
missionCamera = geometry.PinholeCamera(name="myCamera", pixelSizeMilimeters=0.004, numberOfRows=4000, numberOfColumns=6000, principalDistanceMilimeters=20.0) baSettings = xtrelio.readBaSettings("baconfig.yaml") outputXtrelDirectoryName = "CaliforniaSmall" sfmio.importFromExternalOrientationTextfile("CaliforniaSmallEO.txt", ' ', flightMissionImages, "xyz", observedPosition=False, observedOrientation=False, camera=missionCamera) sfmio.writeImageCollectionToObj(flightMissionImages, "test", imageWidthInMeters=12, axesLenghtInMeters=7.0) #generating structure dsm = rasterio.open("D:/DANE/tutorials/rasterio/opentopography/output_be.tif", driver="GTiff") listOfImageCollections = [] listOfImageCollections.append(flightMissionImages) stdDevControllPoints = np.array([ baSettings.noiseForControllPoints[1][0], baSettings.noiseForControllPoints[1][1], baSettings.noiseForControllPoints[1][2] ])