-
Notifications
You must be signed in to change notification settings - Fork 0
/
image_stiching
114 lines (114 loc) · 2.98 KB
/
image_stiching
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "Untitled2.ipynb",
"version": "0.3.2",
"provenance": [],
"collapsed_sections": [],
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/majid3399769/ProjectsScience/blob/master/image_stiching\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"metadata": {
"id": "6EQWRzHq41QR",
"colab_type": "code",
"outputId": "72057343-3d57-4159-dacd-e97d1a81238e",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 87
}
},
"cell_type": "code",
"source": [
"!pip install opencv-python\n",
"!pip install opencv-contrib-python==3.4.2.16"
],
"execution_count": 0,
"outputs": [
{
"output_type": "stream",
"text": [
"Requirement already satisfied: opencv-python in /usr/local/lib/python3.6/dist-packages (3.4.5.20)\n",
"Requirement already satisfied: numpy>=1.11.3 in /usr/local/lib/python3.6/dist-packages (from opencv-python) (1.14.6)\n",
"Requirement already satisfied: opencv-contrib-python==3.4.2.16 in /usr/local/lib/python3.6/dist-packages (3.4.2.16)\n",
"Requirement already satisfied: numpy>=1.11.3 in /usr/local/lib/python3.6/dist-packages (from opencv-contrib-python==3.4.2.16) (1.14.6)\n"
],
"name": "stdout"
}
]
},
{
"metadata": {
"id": "SyW5gQAu5WO_",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"from imutils import paths\n",
"import numpy as np\n",
"import argparse\n",
"import imutils\n",
"import cv2"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "gHJEeHN_5fNX",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"stitcher = cv2.createStitcher() if imutils.is_cv3() else cv2.Stitcher_create()"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "iwWGnQHw7w_z",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"images=[]"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "Qi2dmW9s7p8N",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"(status, stitched) = stitcher.stitch(images)"
],
"execution_count": 0,
"outputs": []
}
]
}