Giter VIP home page Giter VIP logo

imregpoc's People

Contributors

yoshiri 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

imregpoc's Issues

Path and name of test images

Hello Yoshi,

I believe that lines (456-457) in imregpoc.py:

ref = cv2.imread('../testref1.png',0)
cmp = cv2.imread('../testcmp1.png',0)

should be:

ref = cv2.imread('ref.png',0)
cmp = cv2.imread('cmp.png',0)

In other words, the names of the image files need to be changed, as the ones provided in the code directory have different names than the ones mentioned in the code, and are in the current directory of the code.

Thanks.
Abder

ValueError: too many values to unpack (expected 2)

When I execute your readme example

import cv2
import numpy as np
import imregpoc

# read monocular image
ref = cv2.imread('video//frames//0.png')
cmp = cv2.imread('video//frames//1.png')

result = imregpoc.imregpoc(ref,cmp)
result.stitching()

ValueError                                Traceback (most recent call last)
<ipython-input-11-31c6d193ac86> in <module>
      7 cmp = cv2.imread('video//frames//1.png')
      8 
----> 9 result = imregpoc.imregpoc(ref,cmp)
     10 result.stitching()

C:\Anaconda3\envs\LSTM_2\lib\site-packages\imregpoc-1.0-py3.6.egg\imregpoc.py in __init__(self, iref, icmp, threshold, alpha, beta)
     32         self.perspective = np.float32([1,0,0,0,1,0,0,0,0]).reshape(3,3)
     33 
---> 34         self.match()
     35 
     36 

C:\Anaconda3\envs\LSTM_2\lib\site-packages\imregpoc-1.0-py3.6.egg\imregpoc.py in match(self)
     36 
     37     def match(self):
---> 38         height,width = self.ref.shape
     39         self.hanw = cv2.createHanningWindow((height, width),cv2.CV_64F)
     40 

ValueError: too many values to unpack (expected 2)

Hanning Window Size

The algorithm assumes that the width and height are equals.
you need to modify as follows:
self.hanw = cv2.createHanningWindow((width, height),cv2.CV_64F) --> line 40

This algorithm is patented and is excluded in this configuration

When I execute your example that you have on read me I get

# read monocular image
ref = cv2.imread('video//frames//0.png')
cmp = cv2.imread('video//frames//1.png')

# initialization (SIFT can be changed to other descriptor)
matcher = imregpoc.TempMatcher(ref,'SIFT')

I get

error: OpenCV(4.2.0) ..\opencv_contrib\modules\xfeatures2d\src\sift.cpp:1210: error: (-213:The function/feature is not implemented) This algorithm is patented and is excluded in this configuration; Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in function 'cv::xfeatures2d::SIFT::create'

Square images

Hello Yoshi,

Maybe adding a method that ensures that the images are square images would be nice, since the code seems to accept only square images at the moment?

Thanks.
Abder

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.