> IplImage* dispImg = > bridge[2].imgMsgToCv(&(disparity_msg->image), "passthrough");
>
> and let boost::shared_ptr do its magic.
>
> Or, is there something more subtle I just missed?
>
> shared_ptr will not (and cannot) autoconvert from a pointer. Explicitly
creating a shared_ptr naively from image in this case will cause shared_ptr
to try and delete that pointer, which will crash since that pointer is not
valid for deletion.
I believe you can do something like the following (untested):