Coder Social home page Coder Social logo

aartighatkesar / image-mosaicing Goto Github PK

View Code? Open in Web Editor NEW
60.0 3.0 12.0 344.77 MB

Image Mosaicing or Panorama Creation

License: Apache License 2.0

Python 100.00%
panorama image-stitching mosaic ransac levenberg-marquardt homography image-mosaic inliers outliers optimization

image-mosaicing's People

Contributors

aartighatkesar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

image-mosaicing's Issues

ValueError: Cannot take a larger sample than population when 'replace=False'

img
2750*160000

python image_mosaic.py

 #### Processing 1.jpg & 2.jpg ######
N: 1122.0, n: 6, M:2.0, p: 0.99, eps: 0.6, delta: 3
Traceback (most recent call last):
  File "image_mosaic.py", line 222, in <module>
    obj.mosaic()
  File "image_mosaic.py", line 40, in mosaic
    inliers_cnt, inliers, outliers, sample_pts, final_H = ransac_obj.run_ransac(correspondence)
  File "D:\Image-Mosaicing\ransac.py", line 115, in run_ransac
    idx, n_idx = self.sample_n_datapts(n_total, self.n)
  File "D:\Image-Mosaicing\ransac.py", line 47, in sample_n_datapts
    idx = np.random.choice(n_total, n, replace=False)
  File "mtrand.pyx", line 954, in numpy.random.mtrand.RandomState.choice
ValueError: Cannot take a larger sample than population when 'replace=False'

'replace=True'

python image_mosaic.py

 #### Processing 1.jpg & 2.jpg ######
N: 1122.0, n: 6, M:2.0, p: 0.99, eps: 0.6, delta: 3
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 0/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 2/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 3/1122.0
....

prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1077/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1078/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1079/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1080/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1081/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1082/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1083/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1084/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1085/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1086/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1087/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1088/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1089/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1090/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1091/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1092/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1093/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1094/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1095/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1096/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1097/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1098/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1099/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1100/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1101/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1102/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1103/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1104/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1105/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1106/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1107/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1108/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1109/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1110/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1111/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1112/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1113/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1114/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1115/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1116/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1117/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1118/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1119/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1120/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1121/1122.0
prev_inlier_cnt: 0, new_inlier_cnt: 0
 Done 1122/1122.0
Traceback (most recent call last):
  File "image_mosaic.py", line 222, in <module>
    obj.mosaic()
  File "image_mosaic.py", line 40, in mosaic
    inliers_cnt, inliers, outliers, sample_pts, final_H = ransac_obj.run_ransac(correspondence)
  File "D:\Image-Mosaicing\ransac.py", line 142, in run_ransac
    final_H = calculate_homography(in_pts=final_corr_points[:, 2:],
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

ValueError: a must be greater than 0 unless no samples are taken

python image_mosaic.py
 #### Processing 1.jpg & 2.jpg ######
N: 1122.0, n: 6, M:0.0, p: 0.99, eps: 0.6, delta: 3
Traceback (most recent call last):
  File "image_mosaic.py", line 222, in <module>
    obj.mosaic()
  File "image_mosaic.py", line 40, in mosaic
    inliers_cnt, inliers, outliers, sample_pts, final_H = ransac_obj.run_ransac(correspondence)
  File "D:\Image-Mosaicing\ransac.py", line 115, in run_ransac
    idx, n_idx = self.sample_n_datapts(n_total, self.n)
  File "D:\Image-Mosaicing\ransac.py", line 47, in sample_n_datapts
    idx = np.random.choice(n_total, n, replace=True)
  File "mtrand.pyx", line 909, in numpy.random.mtrand.RandomState.choice
ValueError: a must be greater than 0 unless no samples are taken

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.