Giter VIP home page Giter VIP logo

image-stitching's Issues

NameError: free variable 'sigma_k' referenced before assignment in enclosing scope

Hi, I am getting the following error when I try to run it with the "-mbb" argument:

Traceback (most recent call last): File "main.py", line 124, in <module> connected_component, num_bands=args["num_bands"], sigma=args["mbb_sigma"] File "C:\Users\Khizar\Desktop\Projects\Proposals\Image Stitching\image-stitching main\src\rendering\multiband_blending.py", line 218, in multi_band_blending weights.append([cv2.GaussianBlur(weights[-1][i], (0, 0), sigma_k) for i in range(len(images))]) File "C:\Users\Khizar\Desktop\Projects\Proposals\Image Stitching\image-stitching main\src\rendering\multiband_blending.py", line 218, in <listcomp> weights.append([cv2.GaussianBlur(weights[-1][i], (0, 0), sigma_k) for i in range(len(images))]) NameError: free variable 'sigma_k' referenced before assignment in enclosing scope

invalid value encountered in true_divide

hi

thanks for the repo, looks real cool and easy to use.

I gave a try at the code, to stitch 11 images. It toolk quite along time before I got the following message:

../image-stitching/src/rendering/simple_blending.py:68: RuntimeWarning: invalid value encountered in true_divide
  new_weights = (weights + image_weights) / (weights + image_weights).max()

I cannot share the images unfortunately, but they are 3kx4k (11Mpix) each, for a total size of about 45Mo.

Any idea? Could it be that an image could not get connected to the others?

Crashes when run with a panorama

Traceback (most recent call last):
File "C:\Users\felix\Downloads\image-stitching-main\image-stitching-main\main.py", line 68, in
pair_matches: List[PairMatch] = matcher.get_pair_matches()
File "C:\Users\felix\Downloads\image-stitching-main\image-stitching-main\src\matching\multi_images_matches.py", line 72, in get_pair_matches
if pair_match.is_valid():
File "C:\Users\felix\Downloads\image-stitching-main\image-stitching-main\src\matching\pair_match.py", line 95, in is_valid
self.set_overlap()
File "C:\Users\felix\Downloads\image-stitching-main\image-stitching-main\src\matching\pair_match.py", line 71, in set_overlap
mask_b = cv2.warpPerspective(
cv2.error: OpenCV(4.8.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\imgwarp.cpp:3304: error: (-215:Assertion failed) (M0.type() == CV_32F || M0.type() == CV_64F) && M0.rows == 3 && M0.cols == 3 in function 'cv::warpPerspective'

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.