Skip to content

Commit d6cb636

Browse files
committed
Now with example of jirafe
1 parent f12e773 commit d6cb636

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

example/j1.jpg

119 KB
Loading

example/j2.jpg

116 KB
Loading

example/j3.jpg

102 KB
Loading

example/j4.jpg

104 KB
Loading

example/j5.jpg

109 KB
Loading

main.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,30 @@ def updateMerged(gA,gB,imsize):
2828
return gt
2929

3030
if __name__ == "__main__":
31+
32+
#---------------------------SET PARAMETERS
3133
maxSize = 640 #maxima resolucion de imagen
32-
carpetaImagenes = 'C:/Users/andres/Desktop/SFMedu2/images/cr/'
33-
# carpetaImagenes = "C:/Users/andres/Desktop/datasetImagenes/Reduced/jirafa/"
34-
# carpetaImagenes = "C:/Users/andres/Desktop/datasetImagenes/Reduced/apple/"
34+
carpetaImagenes = 'example/'
3535
debug = True
36-
outName = "apple"
36+
outName = "jirafa" #out name for ply file (open with mesh lab to see poitn cloud)
37+
validFile = ['jpg','png','JPG'] #tipos validos de imagenes
38+
# Intentar conseguir la distancia focal
39+
# TODO agregar calculo este valor deberia funcionar con imagenes 480x640 focalLen 4mm
40+
f = 719.5459
3741

38-
algoMatrizFundamental = implementacionRansac
42+
# ---------------------------SET PARAMETERS
3943

40-
#declaraciones
44+
45+
algoMatrizFundamental = implementacionRansac
4146

4247
graphList = []
4348

4449
#Cargar imagenes
4550
listaArchivos = os.listdir(carpetaImagenes)
46-
tiposValidos = ['jpg','png','JPG'] #tipos validos de imagenes
47-
listaImages = filter(lambda x : x.split('.')[-1] in tiposValidos,listaArchivos )
51+
listaImages = filter(lambda x : x.split('.')[-1] in validFile,listaArchivos )
4852

4953

5054

51-
#Intentar conseguir la distancia focal
52-
# TODO agregar calculo este valor deberia funcionar con imagenes 480x640 focalLen 4mm
53-
f=719.5459
5455

5556
#Carga las imagenes
5657
listaImages = map(lambda x : cv2.imread(carpetaImagenes+x),listaImages)

utils/getPose.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def getPose(E,K,matches,ims):
3535
Rt[:, :, 3] = sols[3]
3636

3737

38-
3938
#Por cada solucion
4039
P0 = np.dot(K,np.hstack([np.eye(3),np.zeros((3,1))]))
4140
goodV = np.zeros((1,4))

utils/paresDescript.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from utils.matchSift import matchSIFTdescr
66
from utils.loadDatacsv import load
7-
sift = cv2.SIFT(contrastThreshold=0.04)
7+
sift = cv2.SIFT(contrastThreshold=0.08)
88
import numpy as np
99

1010
def drawMatches(img1, kp1, img2, kp2, indicesI,indicesJ):

0 commit comments

Comments
 (0)