Ask Your Question
0

Array filled with images

asked 2014-03-16 22:12:40 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I'm trying to append some images on an array and dynamically adding the crop length, but I seems to keep getting a weird error. this is what I did

 from SimpleCV import *

imgOri = Image("allCars.jpg")

imgOri = imgOri.scale(400, 400)

pxLength = 0 #ancho del parking

imgList = []

for i in range(3):
    imgList.append(imgOri.crop(0, 70, pxLength,120))

    print imgList[i].show()

    pxLength+= 133

this is the error I get :

WARNING: Can't do a negative crop!

Traceback (most recent call last):
  File "C:\Users\chelo\Documents\college\Concentracion\PY scripts\imgProcessing3Cars2.py", line 14, in <module>
    print imgList[i].show()
AttributeError: 'NoneType' object has no attribute 'show'

is this ok? if not, which is the right way?</module>

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-03-16 23:21:41 -0600

chelo666 gravatar image

Nevermind, I got it. I changed pxLength to corX and placed it like this crop(corX, 70, 133, 120) and worked.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-03-16 22:12:40 -0600

Seen: 70 times

Last updated: Mar 16 '14