PyrMeanShiftFiltering does not work (Bug #306)
Description
calling PyrMeanShiftFiltering on cvmat arrays messes up both src and dest images. Ie, printing them after the call shows:
<cvmat(type=00000000 rows=0 cols=0 step=0 )>
and next time the images are references, cv.Exception is thrown causing python to shutdown.
On a second note, it would be really great if all the opencv exceptions were registered with python, so they could be caught within python try/except blocks.
Associated revisions
fixed source image corruption (ticket #306)
Merge pull request #306 from AnnaKogan8:perf_tests_timing.py-improvement
History
Updated by James Bowman almost 15 years ago
Running a small test in C, it seems that PyrMeanShiftFiltering is setting image data for both src and dst to NULL:
(gdb) p *src $5 = {type = 1111638032, step = 1536, refcount = 0xb654b010, hdr_refcount = 1, data = {ptr = 0xb654b020 "", s = 0xb654b020, i = 0xb654b020, fl = 0xb654b020, db = 0xb654b020}, {rows = 512, height = 512}, {cols = 512, width = 512}} (gdb) p *dst $6 = {type = 1111638032, step = 1536, refcount = 0xb648a010, hdr_refcount = 1, data = {ptr = 0xb648a020 "", s = 0xb648a020, i = 0xb648a020, fl = 0xb648a020, db = 0xb648a020}, {rows = 512, height = 512}, {cols = 512, width = 512}} (gdb) n <<< cvPyrMeanShiftFiltering(src, dst, 5, 5); >>> (gdb) p *src $7 = {type = 1111638032, step = 1536, refcount = 0x0, hdr_refcount = 1, data = {ptr = 0x0, s = 0x0, i = 0x0, fl = 0x0, db = 0x0}, {rows = 512, height = 512}, {cols = 512, width = 512}} (gdb) p *dst $8 = {type = 1111638032, step = 1536, refcount = 0x0, hdr_refcount = 1, data = {ptr = 0x0, s = 0x0, i = 0x0, fl = 0x0, db = 0x0}, {rows = 512, height = 512}, {cols = 512, width = 512}}
Looks like a problem in CV; reassign to Vadim to investigate further.
Updated by Vadim Pisarevsky almost 15 years ago
thanks! fixed in r3082
- Status set to Done
- (deleted custom field) set to fixed