Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

python cvLoadImage problem

Hi, I am trying to get the width attribute of an Image that I have loaded wtih cvLoadImage in python using the following code:

frame = cvLoadImage(name, CV_LOAD_IMAGE_GRAYSCALE)
xres = frame.width
yres = frame.height

when the program arrives to these ligne of programm it get stack and gives the following error:

 Traceback (most recent call last):
      File "track.py", line 686, in <module>
      xres_max = frame.width
 AttributeError: 'NoneType' object has no attribute 'width'

Can you please help me solve this problem.

P.S: sorry for my english.

python cvLoadImage problem

Hi, I am trying to get the width attribute of an Image that I have loaded wtih cvLoadImage in python using the following code:

frame = cvLoadImage(name, CV_LOAD_IMAGE_GRAYSCALE)
xres = frame.width
yres = frame.height

when the program arrives to these ligne of programm it get stack and gives the following error:

 Traceback (most recent call last):
      File "track.py", line 686, in <module>
      xres_max = frame.width
 AttributeError: 'NoneType' object has no attribute 'width'

Can you please help me solve this problem.

P.S: sorry for my english.

click to hide/show revision 3
retagged

updated 2014-05-22 13:06:45 -0600

berak gravatar image

python cvLoadImage problem

Hi, I am trying to get the width attribute of an Image that I have loaded wtih cvLoadImage in python using the following code:

frame = cvLoadImage(name, CV_LOAD_IMAGE_GRAYSCALE)
xres = frame.width
yres = frame.height

when the program arrives to these ligne it get stack and gives the following error:

 Traceback (most recent call last):
      File "track.py", line 686, in <module>
      xres_max = frame.width
 AttributeError: 'NoneType' object has no attribute 'width'

Can you please help me solve this problem.

P.S: sorry for my english.

python cvLoadImage problem

Hi, I am trying to get the width attribute of an Image that I have loaded wtih cvLoadImage in python using the following code:

frame = cvLoadImage(name, CV_LOAD_IMAGE_GRAYSCALE)
xres = frame.width
yres = frame.height

when the program arrives to these ligne it get stack and gives the following error:

 Traceback (most recent call last):
      File "track.py", line 686, in <module>
      xres_max = frame.width
 AttributeError: 'NoneType' object has no attribute 'width'

Can you please help me solve this problem.

P.S: sorry for my english.