自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 棋盘覆盖

在一个2k×2k 个方格组成的棋盘中,恰有一个方格与其它方格不同,称该方格为一特殊方格,且称该棋盘为一特殊棋盘。问题:用4种不同形态的L型骨牌, 覆盖给定特殊棋盘上除特殊方格以外的所有方格,且任何2个不得重叠。  特殊方格在棋盘上出现的位置有4k种情形。因而对任何k>=0,有4k种不同的特殊棋盘。易知,在任何一个2k * 2k的棋盘...

2018-04-07 21:24:00 297

原创 快速排序

#include<iostream>usingnamespace std;void quickSort(inta[], int, int);int main(){    int array[] = {34,65,12,43,67,5,78,10,3,70 }, k;    int len = sizeof(array) / sizeof(int);    cout<<"Th...

2018-04-07 21:22:55 96

原创 合并排序

#include<iostream>usingnamespace std; void Merge(int *array, intlow, intmiddle, inthigh)  //合并{    int *A = newint[high - low + 1];  //临时数组,存储个数为high - low + 1个数据    int i = low;    int j = midd...

2018-04-07 21:22:27 174

原创 汉诺塔问题

#include<iostream>usingnamespace std; void TowersofHanoi(intn, charx, chary, charz){    if (n)    {        TowersofHanoi(n - 1, x, z, y);        cout<<"From"<<x<<"To"<&l

2018-04-07 21:21:56 89

原创 输出全排列。

#include<stdio.h>#include<stdlib.h>void Swap(int &a, int &b) {    int temp = a;    a = b;    b = temp;}void Perm(int *list, intk, intm) {    if (k == m) {        for (int i = 0; i ...

2018-04-07 21:20:29 382

原创 opencv 读取图像和输出

        Mat src, dst; src = imread("E:\\ͼƬ\\Zoro3.jpg"); if (!src.data) { printf("not found"); return -1; } namedWindow("input",CV_WINDOW_AUTOSIZE); imshow("input", src); 

2018-03-29 15:39:00 7913 1

原创 opencv Mat操作

////MAT操作 /*Mat B = M.clone(); namedWindow("output", CV_WINDOW_AUTOSIZE); imshow("output", B);*/ /*Mat C; C.create(src.size(),src.type()); C = Scalar(100, 100, 255); namedWindow("output", CV_WINDOW_A...

2018-03-29 15:37:55 168

原创 输出图像通道数和像素值

namedWindow("output", CV_WINDOW_AUTOSIZE);cvtColor(src,dst,CV_BGR2GRAY);printf("output channels: %d\n",src.channels());//输出图像通道数//输出像素值int cols = src.cols;int rows = src.rows;const uchar* firstrow = d...

2018-03-29 15:36:48 2610

原创 opencv 利用API函数实现掩膜操作

 //////////////利用API函数实现掩膜操作Mat kernel = (Mat_<char>(3, 3) << 0, -1, 0, -1, 5, -1, 0, -1, 0);   filter2D(src, dst, src.depth(), kernel);namedWindow("output", CV_WINDOW_AUTOSIZE);...

2018-03-29 15:33:05 180

原创 opencv掩膜操作

//////////////////////////////////////////实现掩膜操作的算法 int cols = src.cols*src.channels(); int offsetx = src.channels(); int rows = src.rows; dst = Mat::zeros(src.size(), src.type()); for (int row = 1; ...

2018-03-29 15:31:59 245

空空如也

空空如也

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

TA关注的人

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