dewarp icon indicating copy to clipboard operation
dewarp copied to clipboard

img.save(disp) can't save

Open NoiZeR355 opened this issue 10 years ago • 5 comments

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?

NoiZeR355 avatar Nov 03 '15 11:11 NoiZeR355

Unfortunately the original code isn't my own. I ran into the same problem, I just forked it on Git as a means of reference. I would suggest hitting up a professor/teacher

On Tue, Nov 3, 2015 at 6:25 AM, NoiZeR355 [email protected] wrote:

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

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?

— Reply to this email directly or view it on GitHub https://github.com/kscottz/dewarp/issues/2.

MattTucker22689 avatar Nov 03 '15 19:11 MattTucker22689

Is there maybe a way to reach kscottz. Maybe she will know the answer.

NoiZeR355 avatar Nov 04 '15 09:11 NoiZeR355

I've tried once before and never got a response, but by all means....

On Wed, Nov 4, 2015 at 4:04 AM, NoiZeR355 [email protected] wrote:

Is there maybe a way to reach kscottz. Maybe she will know the answer.

— Reply to this email directly or view it on GitHub https://github.com/kscottz/dewarp/issues/2#issuecomment-153646353.

MattTucker22689 avatar Nov 04 '15 19:11 MattTucker22689

On Wed, Nov 4, 2015 at 2:26 PM, Matt Tucker [email protected] wrote:

I've tried once before and never got a response, but by all means....

On Wed, Nov 4, 2015 at 4:04 AM, NoiZeR355 [email protected] wrote:

Is there maybe a way to reach kscottz. Maybe she will know the answer.

— Reply to this email directly or view it on GitHub https://github.com/kscottz/dewarp/issues/2#issuecomment-153646353.

MattTucker22689 avatar Nov 04 '15 19:11 MattTucker22689

You need to install uv4l. That is a driver for the camera module. Here you can find the link where I found how to install it. http://www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=14

NoiZeR355 avatar Nov 06 '15 23:11 NoiZeR355