自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 1.5增加图像的对比度

#include <opencv2/opencv.hpp>#include <iostream>#include <math.h>using namespace cv;IplImage * doPyrDown(IplImage* in){ assert(in->width%2 == 0 && in->height%2 == 0); I...

2018-03-08 10:58:43 335

原创 1.4openCV中图像的缩放和平滑处理

#include "cv.h"#include "stdafx.h"#include "highgui.h"IplImage* doPyrDown( IplImage* in ,int filter = CV_GAUSSIAN_5x5 )//该函数将返回一个大小为输入图像1/2的IplImage数据结构 { assert ( in->width%2 == 0 && in-&...

2018-03-03 13:35:44 749

原创 1.3图像的平滑处理

采用卷积对图像进行平滑处理,OpenCV对卷积操作格外简洁。#include "cv.h"#include "highgui.h"int main (){ IplImage* image = cvLoadImage ("2.jpg");//导入待处理的图像 cvNamedWindow ( "Example4-in" );//创建一个窗口 cvNamedWindow ( "Example4-out"...

2018-03-02 17:12:20 421

原创 1.2.1播放视频过程中使用滚动条

上一节内容只是把视频进行了顺序播放,现在再加一个滚动条,代码如下:#include "cv.h"#include "stdafx.h"#include "highgui.h"int g_slider_position = 0 ;//全局变量CvCapture* g_capture = NULL ;//全局变量void onTrackbarSlide( int pos )//回调函数{ cvSetC...

2018-03-02 16:00:16 371

原创 1.2学习OpenCV(播放视频)

显示了图片之后,然后播放个视频看看!#include "stdafx.h"#include "highgui.h"int main ( ){ cvNamedWindow("Example2",CV_WINDOW_AUTOSIZE);        //命名底层窗口为example2,大小为自适应 CvCapture* capture = cvCreateFileCapture("hh.mp4");...

2018-03-01 21:16:38 212

原创 1.1学习OpenCV(显示图像)

像最初我们学习c语言一样,第一节上机必然是输出helloWorld!这里OpenCV中显示图像就是最基本的操作,就是显示一幅我们已经在磁盘中加载的图像。以下是程序代码:#include "stdafx.h"#include "highgui.h"int main ( ){ IplImage* img =cvLoadImage("pic.jpg"); //利用cvLoadImage函数加载名为pic...

2018-03-01 17:23:26 247

原创 3.2编写程序,显示“菜单”,由用户输入代号后,输出对所选项目的简短评论。运行结果参考下图:

#include using namespace std;int main(){    cout    cout    cout    cout    cout    cout    int choice;    cout    cin>>choice;    switch(choice)    {        case 1:

2018-01-16 20:10:17 1148

原创 3.1从键盘输入x的值(整型),根据公式1计算并输出x和y的值

#include #include using namespace std;int t;int main(){    int x;    cout    cin>>x;    if(x    {        t=0;    }    else if(x>=2&&x    {        t=1;    }    els

2018-01-14 22:11:05 14403

原创 2.4要不要加油?设计程序,用于赛车上的计算机监视系统。该程序在赛车油量偏低时(少于1/4),警示车手应该注意;在油箱接近满载(不低于3/4)时要告诉车手绕过维修站。在其他情况下,不提示任何信息,以免

#include using namespace std;int main(){    float x;    cout    cin>>x;    if(x    {        cout    }    else if(x>0.75)    {        cout    }    return 0;}运行图仅仅列

2018-01-13 20:01:37 367

原创 2.3加班费,要不要?

#include #include using namespace std;int main(){    int rate=100;    int hour;    cout    cin>>hour;    if(hour    {        cout    }    else    {        cout    }

2018-01-13 11:30:12 285

原创 2.2分段函数计算

#include #include using namespace std;int main(){    float x;    int value=1;    while(value)    {    cout    cin>>x;    if(x    {        cout    }    else if(x>=2&&x

2018-01-13 11:10:18 1134

原创 2.1输出下面函数值

#include using namespace std;int value=1;//定义value为全局变量int main(){    while(value)    {    int x,y;    cout    cin>>x;    if(x>=1)    {        cout    }    else    { 

2018-01-12 21:56:40 456

原创 1.3-1 输出星号图

//输出星号图#include using namespace std;int main(){    int i,j,k;    for(i=1;i    {        for(j=6-i;j>0;j--)        {            cout        }        for(k=1;k        {       

2018-01-11 22:09:50 184

原创 1.3输出星号图

//输出星号图#include using namespace std;int main(){    int i,j;    for(i=6;i>0;i--)    {        for(j=2*i-1;j>0;j--)        {            cout        }        cout    }    retur

2018-01-11 21:57:43 344

原创 1.2输出四个整数中的最大值

#include using namespace std;int main(){    int a=0;    int b,c,d,max;    cout    cin>>a;    max=a;    cout    cin>>b;    if(max    {        max=b;    }    cout    ci

2018-01-11 21:12:19 375

原创 1.1求两个正整数的正差值

//求两个正整数的正差值#include using namespace std;int main(){    int a,b;    cout    cin>>a;    cout    cin>>b;    if(a>b)    cout    else    cout    return 0;}输出结果:

2018-01-10 21:59:24 659

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除