Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Missing depth attribute on images

New to OpenCV. Working in Python. I am storing images to a SQLite3 database as a blob. I can get the height, width, and num of channels to store with blob to help reconstruct on the database select...but no depth found!

Here is code specifics... im = cv.LoadImageM(imageFile) imSize = cv.GetSize(im) imWidth = im.width imHeight = im.height imChannels = im.channels

imDepth = im.depth() #Not found

imStr = im.tostring() blob = sqlite3.Binary(imStr)

When I retrieve the blob, I can reconstruct image with all but I must guess depth. Right now using cv.IPL_DEPTH_8U as best guess. Noticed c++ has hooks to get depth, but not in Python. Use cv.CreateImageHeader to reconstruct. Thanks, --Mark

click to hide/show revision 2
No.2 Revision

Missing depth attribute on images

New to OpenCV. Working in Python. I am storing images to a SQLite3 database as a blob. I can get the height, width, and num of channels to store with blob to help reconstruct on the database select...but no depth found!

Here is code specifics... specifics...

im = cv.LoadImageM(imageFile)
imSize = cv.GetSize(im)
imWidth = im.width
imHeight = im.height
imChannels = im.channels

imDepth im.channels #imDepth = im.depth() #Not found

found imStr = im.tostring() blob = sqlite3.Binary(imStr)

sqlite3.Binary(imStr)

When I retrieve the blob, I can reconstruct image with all but I must guess depth. Right now using cv.IPL_DEPTH_8U cv.IPL_DEPTH_8U as best guess. Noticed c++ has hooks to get depth, but not in Python. Use cv.CreateImageHeader cv.CreateImageHeader to reconstruct. Thanks, --Markreconstruct.

click to hide/show revision 3
retagged

Missing depth attribute on images

New to OpenCV. Working in Python. I am storing images to a SQLite3 database as a blob. I can get the height, width, and num of channels to store with blob to help reconstruct on the database select...but no depth found!

Here is code specifics...

im = cv.LoadImageM(imageFile)
imSize = cv.GetSize(im)
imWidth = im.width
imHeight = im.height
imChannels = im.channels
#imDepth = im.depth()  #Not found
imStr = im.tostring()
blob = sqlite3.Binary(imStr)

When I retrieve the blob, I can reconstruct image with all but I must guess depth. Right now using cv.IPL_DEPTH_8U as best guess. Noticed c++ has hooks to get depth, but not in Python. Use cv.CreateImageHeader to reconstruct.

click to hide/show revision 4
retagged

Missing depth attribute on images

New to OpenCV. Working in Python. I am storing images to a SQLite3 database as a blob. I can get the height, width, and num of channels to store with blob to help reconstruct on the database select...but no depth found!

Here is code specifics...

im = cv.LoadImageM(imageFile)
imSize = cv.GetSize(im)
imWidth = im.width
imHeight = im.height
imChannels = im.channels
#imDepth = im.depth()  #Not found
imStr = im.tostring()
blob = sqlite3.Binary(imStr)

When I retrieve the blob, I can reconstruct image with all but I must guess depth. Right now using cv.IPL_DEPTH_8U as best guess. Noticed c++ has hooks to get depth, but not in Python. Use cv.CreateImageHeader to reconstruct.