Compare commits
No commits in common. "0545a5a90e3104926ab4abe66ba48f96e01998a3" and "abffcb247f0a68a65bd7de3bfa6feb140cc5de29" have entirely different histories.
0545a5a90e
...
abffcb247f
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -103,29 +103,6 @@ void opencv_t::bar_demo(Mat& temp)
|
||||
ontrack(50, &temp);
|
||||
}
|
||||
|
||||
void opencv_t::color_sectect(Mat& temp)
|
||||
{
|
||||
namedWindow("·ç¸ñ±ä»»", WINDOW_AUTOSIZE);
|
||||
int c = -1;//signal
|
||||
Mat dst;
|
||||
while (true)
|
||||
{
|
||||
cin >> c;
|
||||
if (c == -1)
|
||||
{
|
||||
imshow("·ç¸ñ±ä»»", temp);
|
||||
waitKey(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
c = c % 22;
|
||||
applyColorMap(temp, dst, colormaps[c]);
|
||||
imshow("·ç¸ñ±ä»»",dst);
|
||||
waitKey(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Mat opencv_t::operter_chen(Mat& temp)
|
||||
|
@ -1,11 +1,7 @@
|
||||
#pragma once
|
||||
#ifndef OPENCV_test
|
||||
#define OPENCV_test
|
||||
#include<opencv2/opencv.hpp>
|
||||
#include<iostream>
|
||||
#include<windows.h>
|
||||
using namespace cv;
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
class opencv_t
|
||||
@ -19,35 +15,10 @@ public:
|
||||
Mat operter_zuo(Mat& temp);
|
||||
void tar_bar(Mat& temp);
|
||||
void bar_demo(Mat& temp);
|
||||
void color_sectect(Mat& temp);
|
||||
|
||||
Mat operter_chen(Mat& temp);
|
||||
private:
|
||||
std::vector<int> colormaps = {
|
||||
cv::COLORMAP_AUTUMN,
|
||||
cv::COLORMAP_BONE,
|
||||
cv::COLORMAP_JET,
|
||||
cv::COLORMAP_WINTER,
|
||||
cv::COLORMAP_RAINBOW,
|
||||
cv::COLORMAP_OCEAN,
|
||||
cv::COLORMAP_SUMMER,
|
||||
cv::COLORMAP_SPRING,
|
||||
cv::COLORMAP_COOL,
|
||||
cv::COLORMAP_HSV,
|
||||
cv::COLORMAP_PINK,
|
||||
cv::COLORMAP_HOT,
|
||||
cv::COLORMAP_PARULA,
|
||||
cv::COLORMAP_MAGMA,
|
||||
cv::COLORMAP_INFERNO,
|
||||
cv::COLORMAP_PLASMA,
|
||||
cv::COLORMAP_VIRIDIS,
|
||||
cv::COLORMAP_CIVIDIS,
|
||||
cv::COLORMAP_TWILIGHT,
|
||||
cv::COLORMAP_TWILIGHT_SHIFTED,
|
||||
cv::COLORMAP_TURBO,
|
||||
cv::COLORMAP_DEEPGREEN
|
||||
};
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
11
test.cpp
11
test.cpp
@ -3,17 +3,8 @@
|
||||
#include"opencv_test.h"
|
||||
using namespace cv;
|
||||
using namespace std;
|
||||
|
||||
|
||||
void test12(int& c)
|
||||
{
|
||||
int cc = c;
|
||||
cc = 1;
|
||||
}
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int test = 12;
|
||||
test12(test);
|
||||
Mat src = imread("./images/hist_01.jpg");
|
||||
namedWindow("ÊäÈëͼÏñ", WINDOW_FREERATIO);
|
||||
//namedWindow("bai", WINDOW_FREERATIO);
|
||||
@ -27,7 +18,7 @@ int main(int argc, char** argv)
|
||||
//csss->visit_xiangsu(src,1);
|
||||
//cvtColor(src, hsv, COLOR_BGR2HSV);
|
||||
imshow("ÊäÈëͼÏñ", src);
|
||||
csss->color_sectect(src);
|
||||
csss->bar_demo(src);
|
||||
//imshow("bai", bai);
|
||||
waitKey(0);
|
||||
destroyAllWindows();
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
test.cpp
|
||||
opencv_test.cpp
|
||||
opencvlearn.vcxproj -> C:\Users\leave1031\Desktop\learn\opencvlearn\x64\Debug\opencvlearn.exe
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user