Ask Your Question
0

canny on RGB color

asked 2016-01-15 10:22:53 -0600

baro gravatar image

updated 2020-12-09 07:45:26 -0600

hello! I've a simple question. Can I use Canny function directly on RGB image and not on RGB image converted in gray? If it is possible, could you show me one exapmple? thanks you so much for help

edit retag flag offensive close merge delete

Comments

2

baro, this is probably a bad question. what do you expect to happen ?

berak gravatar imageberak ( 2016-01-15 11:13:42 -0600 )edit

@berak I don't know I hope to find a function more robust that canny on grey. OpenCV provides something? thanks you so much

baro gravatar imagebaro ( 2016-01-18 05:38:23 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-01-15 11:29:08 -0600

LBerger gravatar image

Canny is used to find contour. Contours are detected using gradient operators which operate on real value. Hence you cannot use on RGB images. If you want to use on RGB image you have to split yor RGB image or convert in grayscale or create gradient operator which operate on RGB ilmages...

edit flag offensive delete link more

Comments

wrong... opencv can handle rgb images directly, I don't know what it does though under the hood

Mehdi gravatar imageMehdi ( 2018-11-06 09:08:23 -0600 )edit

Wrong?First have a look at post date. Then browse commit history and find when canny accepts RGB image. Now with rgb image canny function splits channels and gives three outputs and you have to merge result. it is not color gradient : paper reference is Andreas Koschan and Mongi Abidi Detection and Classification of Edges in Color Images

LBerger gravatar imageLBerger ( 2018-11-06 11:07:56 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-01-15 10:22:53 -0600

Seen: 1,274 times

Last updated: Jan 15 '16