matrix buffer aliasing problem in Python wrappers (Bug #25)


Added by Vadim Pisarevsky over 15 years ago. Updated about 15 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:James Bowman % Done:

0%

Category:python bindings
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

While debugging test_MixChannels I added some sanity checks, and it looks like content of a matrix (source_mr0) is somehow changed after another matrix (dest_m[i]) is modified.

To reproduce the problem, run "python test.py test_MixChannels"


Associated revisions

Revision 429e5367
Added by Andrey Kamaev over 12 years ago

Merge pull request #25 from sergiud/master

History

Updated by James Bowman about 15 years ago

r2411 is partial fix: instead of using Python strings for image storage, now use Buffer objects. This has the nice property of allowing the bindings to use the OpenCV-allocated image memory, so there is now no copy on image creation.

Need to do same for IplImage and CvMatND.

Updated by James Bowman about 15 years ago

OK fixes done.
Tests now pass.

  • Status changed from Open to Done
  • (deleted custom field) set to fixed

Also available in: Atom PDF