没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
#include "opencv/cv.h"
#include "opencv/highgui.h"
int main(int argc,char** argv)
{
IplImage* src = cvLoadImage("C:\\testphoto\\tree.jpg");//ÔØÈëͼÏñ
//Allocate individual image planes
IplImage* channel_r = cvCreateImage(cvGetSize(src),IPL_DEPTH_8U,1);
IplImage* channel_g = cvCreateImage(cvGetSize(src),IPL_DEPTH_8U,1);
IplImage* channel_b = cvCreateImage(cvGetSize(src),IPL_DEPTH_8U,1);
IplImage* img_r = cvCreateImage(cvGetSize(src),IPL_DEPTH_8U,3);
IplImage* img_g = cvCreateImage(cvGetSize(src),IPL_DEPTH_8U,3);
IplImage* img_b = cvCreateImage(cvGetSize(src),IPL_DEPTH_8U,3);
cvSplit(src, channel_b, channel_g, channel_r,NULL);
cvMerge(channel_b,0,0,0,img_b);
cvMerge(0,channel_g,0,0,img_g);
cvMerge(0,0,channel_r,0,img_r);
cvNamedWindow("src",0);
cvNamedWindow("Image_B",0);
cvNamedWindow("Image_G",0);
cvNamedWindow("Image_R",0);
cvShowImage( "src", src);
cvShowImage( "Image_B", img_b);
cvShowImage( "Image_G", img_g);
cvShowImage( "Image_R", img_r);
#include "opencv/highgui.h"
int main(int argc,char** argv)
{
IplImage* src = cvLoadImage("C:\\testphoto\\tree.jpg");//ÔØÈëͼÏñ
//Allocate individual image planes
IplImage* channel_r = cvCreateImage(cvGetSize(src),IPL_DEPTH_8U,1);
IplImage* channel_g = cvCreateImage(cvGetSize(src),IPL_DEPTH_8U,1);
IplImage* channel_b = cvCreateImage(cvGetSize(src),IPL_DEPTH_8U,1);
IplImage* img_r = cvCreateImage(cvGetSize(src),IPL_DEPTH_8U,3);
IplImage* img_g = cvCreateImage(cvGetSize(src),IPL_DEPTH_8U,3);
IplImage* img_b = cvCreateImage(cvGetSize(src),IPL_DEPTH_8U,3);
cvSplit(src, channel_b, channel_g, channel_r,NULL);
cvMerge(channel_b,0,0,0,img_b);
cvMerge(0,channel_g,0,0,img_g);
cvMerge(0,0,channel_r,0,img_r);
cvNamedWindow("src",0);
cvNamedWindow("Image_B",0);
cvNamedWindow("Image_G",0);
cvNamedWindow("Image_R",0);
cvShowImage( "src", src);
cvShowImage( "Image_B", img_b);
cvShowImage( "Image_G", img_g);
cvShowImage( "Image_R", img_r);
资源评论
- wt78934342019-03-14感觉很不错,有价值的资源
zhutouzhg
- 粉丝: 2
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功