PyrMeanShiftFiltering does not work (Bug #306)


Added by Rosen Diankov almost 15 years ago. Updated almost 15 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:imgproc, video
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

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

Revision edc08960
Added by Vadim Pisarevsky almost 15 years ago

fixed source image corruption (ticket #306)

Revision a45eb275
Added by Andrey Kamaev about 12 years ago

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

Also available in: Atom PDF