Square Detector

the first demo for OpenCV

#inlucde<opencv2\opencv.hpp>
using namespace cv;
int main()
{
    Mat picture=imread("wallpaper")
    imshow("测试程序",picture);
    waitKey(20180717);
}

Script diagnosis requires some permissions to be installed on their folders.Do you want to fix this question?

First Column Second Column
wallpaper 墙纸
static 静止的['staetik]
absolute ['aebse lut]绝对的,完全的
omitted [ou'mitid]遗漏的
omit [e'mit]省略,遗漏
pyramid ['piremid]金字塔
image pyramid 图像金字塔
scale [skel]规模
scaling ['skeling]缩放比例,尺度
pyramid scaling
contour ['ka:ntur]外形,轮廓
guassian pyramid 高斯金字塔
diagnosis [daieg'nousis]诊断
fix the question 修复问题
diagnostic 诊断的
diagnostics 诊断学
counter simplification 轮廓简化[simplefe'keition]
memory storage 存储装置
folks 人们
sequence [si:kwens]顺序
specified 指定的
dG vim(delete all the lines behind the current line)
d$ vim(delete the cursor position to the end of the line)
cursor ['ke:rse(r)]光标

OpenCV read the picture path(The "Square Detector" program)

  • Absolute Path:It's the path starting from the disk,like——D:\OpenCV 3.1\opencv\sources\samples\data\pic1.png

  • Relative Path:It's the path starting from the current path,if the current path is "E:\VS2015\ConsoleApplication1\ConsoleApplication1"
  • If you want to describe the path(E:\VS2015\ConsoleApplication1\ConsoleApplication1\pic1.png),just input the relative path"pic1.png".In fact,the strict relative path writing should be ".\pic1.png".
  • "./"(It means that the current path can be omitted under normal)

    • //The "Square Detector" program
    • //It loads several images sequentially and tries to find squares in
    • //each image
static const char* names[] = { 
        "D:/OpenCV 3.1/opencv/sources/samples/data/pic1.png",
        "D:/OpenCV 3.1/opencv/sources/samples/data/pic2.png",
        "D:/OpenCV 3.1/opencv/sources/samples/data/pic3.png",
        "D:/OpenCV 3.1/opencv/sources/samples/data/pic4.png", 
        "D:/OpenCV 3.1/opencv/sources/samples/data/pic5.png", 
        "D:/OpenCV 3.1/opencv/sources/samples/data/pic6.png", 0 };
    

Warning:"ConsoleApplication1.exe"(Win32):loaded,"C:\Windows\System32\ntdll.dll".Unable to find or open the pdb file.

pdb file(be used to help the debugging of the software)

猜你喜欢

转载自www.cnblogs.com/hugeng007/p/9326058.html