Skip to content

Commit

Permalink
Added --single option, which causes only a single camera to be moved …
Browse files Browse the repository at this point in the history
…(in stead of 2). Should make it easier to debug registration fixing algorithms.
  • Loading branch information
jackjansen committed Dec 4, 2023
1 parent 7d64bdc commit d1f5ab7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sandbox/genregtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ def main():
parser.add_argument("--distance", action="store", type=float, default="0.01", metavar="DIST", help="Camera 2 and 4 point clouds will be move DIST meters out from where they should be")
parser.add_argument("--npoint", action="store", type=int, default=200000, metavar="COUNT", help="Create original point cloud of approximately this many points")
parser.add_argument("--two", action="store_true", help="Output only camera 1 and 2 points (in stead of all 4)")
parser.add_argument("--single", action="store_true", help="Modify only camera 2 (in stead of 2 and 4)")
parser.add_argument("output", action="store", help="Output ply file")
args = parser.parse_args()
distance = args.distance
npoint = args.npoint
output = args.output

pc = create_regtest_pointcloud(npoint, [(0,0,0), (0,0,-distance), (0,0,0), (0,0,distance)], args.two)
offsets = [(0,0,0), (0,0,-distance), (0,0,0), (0,0,distance)]
if args.single:
offsets[3] = (0, 0, 0)
pc = create_regtest_pointcloud(npoint, offsets, args.two)
cwipc.cwipc_write(output, pc)

def create_regtest_pointcloud(npoint : int, offsets : List[MyPoint], twocam : bool=False) -> cwipc.cwipc_wrapper:
Expand Down

0 comments on commit d1f5ab7

Please sign in to comment.