环视运行

This commit is contained in:
2025-12-19 17:08:28 +08:00
parent 5283a6f54a
commit 86df465b15
47 changed files with 485 additions and 102 deletions

View File

@@ -23,13 +23,30 @@ def main():
birdview = BirdView()
Gmat, Mmat = birdview.get_weights_and_masks(projected)
birdview.update_frames(projected)
birdview.make_luminance_balance().stitch_all_parts()
# birdview.make_luminance_balance().stitch_all_parts()
birdview.stitch_all_parts()
birdview.make_white_balance()
birdview.copy_car_image()
ret = display_image("BirdView Result", birdview.image)
if ret > 0:
Image.fromarray((Gmat * 255).astype(np.uint8)).save("weights.png")
Image.fromarray(Mmat.astype(np.uint8)).save("masks.png")
img_samll = cv2.resize(birdview.image,(320,600))
cv2.imshow("BirdView Result", img_samll)
while True:
key = cv2.waitKey(1) & 0xFF
if key == ord("q"):
return -1
# cv2.waitKey(1)
# cmd = input().strip().lower()
# if cmd == 'q':
# cv2.destroyAllWindows()
# return -1
# birdview.copy_car_image()
# ret = display_image("BirdView Result", birdview.image)
# if ret > 0:
# Image.fromarray((Gmat * 255).astype(np.uint8)).save("weights.png")
# Image.fromarray(Mmat.astype(np.uint8)).save("masks.png")
if __name__ == "__main__":