Skip to content

Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded #3

Description

@nosqldb

get_exif_value 貌似有问题,去掉了
有些小问题

[root@node1 python3]# python3 alignStar.py -f 40  -o /root/align.tiff  /root/f3tiff/*
Final star points = 329
Final star points = 377
Final star points = 305
Final star points = 543
Final star points = 584
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 590
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 579
Final star points = 346
Final star points = 609
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 536
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Done. Output image in  /root/align.tiff
[root@node1 python3]# python3 alignStar.py -f 40  -o /root/f3align.tiff  /root/f3tiff/*
Final star points = 621
Final star points = 377
Final star points = 305
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 543
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 584
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 590
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 329
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 579
Final star points = 346
Final star points = 609
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 536
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 567
Final star points = 307
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 564
Final star points = 563
Final star points = 571
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 540
Final star points = 318
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 582
Final star points = 587
Final star points = 604
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 1022
Traceback (most recent call last):
  File "alignStar.py", line 104, in <module>
    img_tf = cv2.warpPerspective(img.original_image, tf[0], tuple(img_size))
cv2.error: OpenCV(4.4.0) /tmp/pip-req-build-qacpj5ci/opencv/modules/imgproc/src/imgwarp.cpp:3167: error: (-215:Assertion failed) (M0.type() == CV_32F || M0.type() == CV_64F) && M0.rows == 3 && M0.cols == 3 in function 'warpPerspective'

[root@node1 python3]# python3 alignStar.py -f 40  -o /root/f3align.tiff  /root/f3tiff/*
Final star points = 621
Final star points = 377
Final star points = 305
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 543
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 584
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 590
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 329
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 579
Final star points = 346
Final star points = 609
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 536
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 567
Final star points = 307
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 564
Final star points = 563
Final star points = 571
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 540
Final star points = 318
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 582
Final star points = 587
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 604
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 1022
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 1022
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 730
Final star points = 542
Traceback (most recent call last):
  File "alignStar.py", line 103, in <module>
    tf, pair_idx = DataModel.ImageProcessing.fine_tune_transform(img.features, ref_img.features, pair_idx)
  File "/root/star_alignment/python3/DataModel.py", line 509, in fine_tune_transform
    pts12 = cv2.perspectiveTransform(np.array([[p] for p in feature1["pts"]], dtype="float32"), tf[0])[:, 0, :]
cv2.error: OpenCV(4.4.0) /tmp/pip-req-build-qacpj5ci/opencv/modules/core/src/matmul.dispatch.cpp:531: error: (-215:Assertion failed) scn + 1 == m.cols in function 'perspectiveTransform'

[root@node1 python3]# python3 alignStar.py -f 40  -o /root/f3align.tiff  /root/f3tiff/*
Final star points = 621
Final star points = 377
Final star points = 305
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 543
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 584
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 590
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 329
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 579
Final star points = 346
Final star points = 609
Final star points = 536
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 567
Final star points = 307
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 564
Final star points = 563
Final star points = 571
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 540
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 318
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 582
Final star points = 587
Final star points = 604
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 1022
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 1022
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 730
Final star points = 542
Traceback (most recent call last):
  File "alignStar.py", line 103, in <module>
    tf, pair_idx = DataModel.ImageProcessing.fine_tune_transform(img.features, ref_img.features, pair_idx)
  File "/root/star_alignment/python3/DataModel.py", line 509, in fine_tune_transform
    pts12 = cv2.perspectiveTransform(np.array([[p] for p in feature1["pts"]], dtype="float32"), tf[0])[:, 0, :]
cv2.error: OpenCV(4.4.0) /tmp/pip-req-build-qacpj5ci/opencv/modules/core/src/matmul.dispatch.cpp:531: error: (-215:Assertion failed) scn + 1 == m.cols in function 'perspectiveTransform'

[root@node1 python3]# 


去掉几张图片后:
[root@node1 python3]# python3 alignStar.py -f 40  -o /root/f3align.tiff  /root/f3tiff/*
Final star points = 600
Final star points = 377
Final star points = 305
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 543
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 584
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 590
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 329
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 579
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 346
Final star points = 609
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 536
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 567
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 307
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 564
Final star points = 563
Final star points = 571
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 540
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 318
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 582
Final star points = 587
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 604
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 1022
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 1022
Alignment failed for this picture: Optimal alignment cannot be achieved. . Discarded
Final star points = 730
Final star points = 529
Final star points = 582
Final star points = 590
/root/star_alignment/python3/DataModel.py:481: RuntimeWarning: invalid value encountered in arccos
  theta = np.arccos(np.sum(xyz1[pair_idx[:, 0]] * xyz2[pair_idx[:, 1]], axis=1))
Alignment failed for this picture: attempt to get argmin of an empty sequence . Discarded
Final star points = 621
Alignment failed for this picture: attempt to get argmin of an empty sequence . Discarded
Final star points = 614
Final star points = 624
Alignment failed for this picture: attempt to get argmin of an empty sequence . Discarded
Final star points = 631
Alignment failed for this picture: attempt to get argmin of an empty sequence . Discarded
Final star points = 624
Alignment failed for this picture: attempt to get argmin of an empty sequence . Discarded
Final star points = 605
Final star points = 604
Final star points = 596
Final star points = 607
Alignment failed for this picture: attempt to get argmin of an empty sequence . Discarded
Final star points = 559
Final star points = 592
Alignment failed for this picture: attempt to get argmin of an empty sequence . Discarded
Final star points = 615
Final star points = 602
Final star points = 611
Final star points = 601
Final star points = 588
Final star points = 607
Final star points = 601
Final star points = 605
Final star points = 599
Final star points = 607
Final star points = 615
Final star points = 615
Final star points = 621
Final star points = 637
Final star points = 645
Final star points = 627
Done. Output image in  /root/f3align.tiff


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions