You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import sys
sys.path.insert(0,'..')
import math
from opensfm import dataset,geo
base_path = "data_path"
# load
data = dataset.DataSet(base_path)
rec = data.load_reconstruction()[0]
# run the projections
imgName = "image_name"
shot = rec.shots[imgName]
# project
im = data.load_image(imgName)
h, w, _ = im.shape
cam = shot.camera
# reference lla
refLLA = [lat,lon,0]
poi = [gcp_lat,gcp_lon, gcp_alt]
reference = geo.TopocentricConverter(refLLA[0], refLLA[1], refLLA[2])
pt3D= reference.to_topocentric(float(poi[0]), float(poi[1]),float(poi[2]))
pt2D = shot.project(pt3D)
pt2D_px = cam.normalized_to_pixel_coordinates(pt2D)
x = pt2D_px[0]
y = pt2D_px[1]
print("x:",x, "y:",y)
I am using the reconstruction.json file in opensfm folder. But there is also another reconstruction files. reconstruction.topocentric.json and undistorted/reconstruction.json but, I am using in the main folder in opensfm.
Some images projects are really good but some of them are really bad. I need a stable solution. What should i do ?
Could we move this conversation over to the forum at https://community.opendronemap.org? 🙏 The forum is the right place to ask questions (we try to keep the GitHub issue tracker for feature requests and bugs only). Thank you! 👍
Hello, actually it is similar to https://community.opendronemap.org/t/project-ground-control-point-to-image/12088
I am trying to project gcp to image. Here is my code:
I am using the reconstruction.json file in opensfm folder. But there is also another reconstruction files. reconstruction.topocentric.json and undistorted/reconstruction.json but, I am using in the main folder in opensfm.
Some images projects are really good but some of them are really bad. I need a stable solution. What should i do ?
Here is the process options:
The text was updated successfully, but these errors were encountered: