简体   繁体   中英

Can I smooth just 1 channel in a 3 channel image?

Is there a OpenCV way to (gaussian) smooth just 1 channel in a 3 channel (RGB) image?

Any of Python or C or C++ OpenCV is fine.

You can use Split to split the image into its channels and then use Filter2D on one of the components.

Split(src, src_r, src_g, src_b)
Smooth(src_r, dst_r)
Merge(dst_r, src_g, src_b, dst)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM