資源簡介
可用!!!!!!基于opencv(python)的全景拼接基于opencv(python)的全景拼接基于opencv(python)的全景拼接
代碼片段和文件信息
#?USAGE
#?python?stitch.py?--first?images/bryce_left_01.png?--second?images/bryce_right_01.png?
#?import?the?necessary?packages
from?pyimagesearch.panorama?import?Stitcher
import?argparse
import?imutils
import?cv2
#?construct?the?argument?parse?and?parse?the?arguments
ap?=?argparse.ArgumentParser()
ap.add_argument(“-f“?“--first“?required=True
help=“path?to?the?first?image“)
ap.add_argument(“-s“?“--second“?required=True
help=“path?to?the?second?image“)
args?=?vars(ap.parse_args())
#?load?the?two?images?and?resize?them?to?have?a?width?of?400?pixels
#?(for?faster?processing)
imageA?=?cv2.imread(args[“first“])
imageB?=?cv2.imread(args[“second“])
imageA?=?imutils.resize(imageA?width=400)
imageB?=?imutils.resize(imageB?width=400)
#?stitch?the?images?together?to?create?a?panorama
stitcher?=?Stitcher()
(result?vis)?=?stitcher.stitch([imageA?imageB]?showMatches=True)
#?show?the?images
cv2.imshow(“Image?A“?imageA)
cv2.imshow(“Image?B“?imageB)
cv2.imshow(“Keypoint?Matches“?vis)
cv2.imshow(“Result“?result)
cv2.waitKey(0)
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????1367778??2016-01-08?09:05??panorama-stitching\images\bryce_left_01.png
?????文件????1256826??2016-01-08?09:05??panorama-stitching\images\bryce_left_02.png
?????文件????1312392??2016-01-08?09:05??panorama-stitching\images\bryce_left_03.png
?????文件????1366768??2016-01-08?09:05??panorama-stitching\images\bryce_right_01.png
?????文件????1246431??2016-01-08?09:05??panorama-stitching\images\bryce_right_02.png
?????文件????1258004??2016-01-08?09:05??panorama-stitching\images\bryce_right_03.png
?????文件????1398192??2016-01-08?09:05??panorama-stitching\images\grand_canyon_left_01.png
?????文件????1356023??2016-01-08?09:05??panorama-stitching\images\grand_canyon_left_02.png
?????文件????1376531??2016-01-08?09:05??panorama-stitching\images\grand_canyon_right_01.png
?????文件????1290290??2016-01-08?09:05??panorama-stitching\images\grand_canyon_right_02.png
?????文件????1166945??2016-01-08?09:05??panorama-stitching\images\scottsdale_left_01.png
?????文件????1188326??2016-01-08?09:05??panorama-stitching\images\scottsdale_right_01.png
?????文件????1184463??2016-01-08?09:05??panorama-stitching\images\sedona_left_01.png
?????文件????1096824??2016-01-08?09:05??panorama-stitching\images\sedona_right_01.png
?????文件???????3922??2016-01-07?13:22??panorama-stitching\pyimagesearch\panorama.py
?????文件???????3717??2017-09-18?17:55??panorama-stitching\pyimagesearch\panorama.pyc
?????文件??????????0??2016-01-07?13:29??panorama-stitching\pyimagesearch\__init__.py
?????文件????????174??2017-09-18?17:55??panorama-stitching\pyimagesearch\__init__.pyc
?????文件???????1046??2016-01-08?09:06??panorama-stitching\stitch.py
?????目錄??????????0??2017-09-19?17:54??panorama-stitching\images
?????目錄??????????0??2017-09-19?17:54??panorama-stitching\pyimagesearch
?????目錄??????????0??2017-09-19?17:54??panorama-stitching
-----------?---------??----------?-----??----
?????????????17874652????????????????????22
評(píng)論
共有 條評(píng)論