Playing with the RasberryPi, odd lenses, and dewarping.
kscottz / dewarp Goto Github PK
View Code? Open in Web Editor NEWPlaying with the RasberryPi, odd lenses, and dewarping.
Playing with the RasberryPi, odd lenses, and dewarping.
Playing with the RasberryPi, odd lenses, and dewarping.
Sorry if I'm missing something obvious but I've tried this code with several different fisheye images and get the same error each time:
Traceback (most recent call last):
File "fisheye-dewarp.py", line 207, in
main(sys.argv[1:])
File "fisheye-dewarp.py", line 199, in main
final = buildPano(defished)
File "fisheye-dewarp.py", line 133, in buildPano
H, M, offset = findHomography(defished[i],defished[i+1])
File "fisheye-dewarp.py", line 105, in findHomography
xm = np.median(rhs_pt[:,1]-lhs_pt[:,1])
IndexError: invalid index
I've attached one of the images I've been using for reference,
any idea what causes this error?
I have an error.
ImportError: Cannot load OpenCV library which is required by SimpleCV
But I have cv2.
How can I fix this error?
Python 2.7
Windows 10
python2.7 dewarp.py
BUILDING MAP!
ERROR:
Traceback (most recent call last):
File "dewarp.py", line 78, in
xmap,ymap = buildMap(Ws,Hs,Wd,Hd,R1,R2,Cx,Cy)
File "dewarp.py", line 20, in buildMap
map_x = int(np.zeros((Hd,Wd),np.float32))
TypeError: 'float' object cannot be interpreted as an index
using rpi camera v2 - should be the only difference
ERROR:
Traceback (most recent call last):
File "dewarp.py", line 68, in
R2x = vals[2][0]
IndexError: list index out of range
Hello,
Im trying to test your code but when im running it with python dewrap.py. I gets the following error:
pi@raspberrypi ~/Downloads/dewarp-master $ python dewarp.py
<SimpleCV.Image Object size:(0, 0), filename: (None), at memory location: (0x70e00be8)>
ERROR:
Traceback (most recent call last):
File "dewarp.py", line 48, in
img.show()
File "/usr/local/lib/python2.7/dist-packages/SimpleCV/ImageClass.py", line 5448, in show
self.save(d)
File "/usr/local/lib/python2.7/dist-packages/SimpleCV/ImageClass.py", line 1984, in save
saveimg = saveimg.toBGR()
File "/usr/local/lib/python2.7/dist-packages/SimpleCV/ImageClass.py", line 1196, in toBGR
cv.CvtColor(self.getBitmap(), retVal, cv.CV_RGB2BGR)
TypeError: CvArr argument 'src' must be IplImage, CvMat or CvMatND. Use fromarray() to convert numpy arrays to CvMat or cvMatND
Is it my issue or some mistake in the code?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.