Overlaying edges onto original image in Python

asked 2014-04-26 09:41:19 -0600

mikey gravatar image

updated 2014-04-27 15:47:23 -0600


I would like to overlay an image with the edges detected by the Canny function (or from any other function) using the Python API. Any suggestions would be appreciated.


edit 1: In figuring out a different question I think I've figured out some relevant information. When using the the image's shape field, it returns imgcv shape = (1080, 1920, 3) edges shape = (1080, 1920)

The image used to find edges from has three dimensions, I'm thinking they are for RGB (or BGR). So I'm thinking, to combine the two images, only one of the dimensions in the original image needs to be accessed, although I'm still not clear as to how this is done.

edit retag flag offensive close merge delete


I am using the Region of Interest to copy one smaller image on to another.

cv::Rect roi( cv::Point( 0, 0 ), cv::Size( bla.cols, bla.rows ));

cv::Mat destinationROI = MyImageBuffer( roi ); // make a pointer to this area.

bla.copyTo( destinationROI ); // draw to that pointer

GrumbleLion gravatar imageGrumbleLion ( 2014-04-28 15:02:23 -0600 )edit