Skip to content

Instantly share code, notes, and snippets.

View MareArts's full-sized avatar

MareArts MareArts

View GitHub Profile
@MareArts
MareArts / OpenCVSimpleTrackbar.cpp
Last active January 5, 2017 12:53
OpenCV Simple Trackbar
http://study.marearts.com/2016/07/opencv-30-trackbar-usage-simple-example.html
#include "opencv2/opencv.hpp"
#include < iostream>
using namespace cv;
using namespace std;
int g_slider; //slider pos value
int g_slider_max; //slider max value
void on_trackbar(int, void*)
@MareArts
MareArts / OpneCVTrackBarInWebcam.cpp
Created January 5, 2017 12:05
OpenCV Trackbar example code in webcam video
http://study.marearts.com/2016/07/opencv-30-trackbar-simple-example-in.html
#include "opencv2/opencv.hpp"
#include < iostream>
using namespace cv;
using namespace std;
int g_slider; //slider pos value
int g_slider_max; //slider max value
void on_trackbar(int, void*)
@MareArts
MareArts / OpenCVSimpleTrackbar2.cpp
Last active January 5, 2017 12:22
OpenCV Simple Trackbar example
http://study.marearts.com/2017/01/opencv-trackbar-exmaple-source-code.html
#include "opencv2/opencv.hpp"
#include < iostream>
using namespace cv;
using namespace std;
int g_slider; //slider pos value
int g_slider_max; //slider max value
@MareArts
MareArts / CIPAddressCtrl_setgetAddress.cpp
Last active January 12, 2017 00:57
Mfc CIPAddressCtrl, set address
http://study.marearts.com/2017/01/mfc-cipaddressctrl-ctrol-ip-address-set.html
.....................................................................
//set, get code
//get address to Cstring
CString ipaddress;
BYTE ip[4];
m_ServeripAddress.GetAddress(ip[0], ip[1], ip[2], ip[3]);
ipaddress.Format(_T("%d.%d.%d.%d"), ip[0], ip[1], ip[2], ip[3]);
@MareArts
MareArts / pointProcessing_1.cpp
Last active April 5, 2017 04:17
pointProcessing add, subtract, divide, multiply
http://study.marearts.com/2017/01/opencv-add-subtract-multiply-divide.html
http://cvlecture.marearts.com/2017/01/opencv-4-3.html
#include "opencv2/opencv.hpp"
#include "opencv2/cuda.hpp"
#include "opencv2\cudaarithm.hpp"
#include <iostream>
using namespace std;
@MareArts
MareArts / OpenCV_copyto.cpp
Last active January 31, 2017 00:20
copyto example
#include "opencv2/opencv.hpp"
#include <iostream>
using namespace std;
using namespace cv;
int main(int, char)
{
Mat originImg = imread("scret.jpg");
namedWindow("originImg", 0);
@MareArts
MareArts / operation_between_images.cpp
Last active March 10, 2017 07:46
operation_between_images.cpp
http://study.marearts.com/2017/02/cvlecture-example-code-operation.html
http://cvlecture.marearts.com/2017/02/opencv-lecture-4-4.html
#include "opencv2/opencv.hpp"
#include "opencv2/cuda.hpp"
#include "opencv2\cudaarithm.hpp"
#include <iostream>
using namespace std;
using namespace cv;
@MareArts
MareArts / video_subtraction_example_code.cpp
Last active March 9, 2017 08:54
video subtraction example code
http://study.marearts.com/2017/02/cvlecture-example-code-video-subtraction.html
http://cvlecture.marearts.com/2017/02/opencv-4-5.html
#include "opencv2/opencv.hpp"
#include "opencv2/cuda.hpp"
#include "opencv2\cudaarithm.hpp"
#include <iostream>
using namespace std;
using namespace cv;
@MareArts
MareArts / OpenCV_bitwise_example.cpp
Last active March 7, 2017 04:28
Opencv bitwise and or not xor function example
http://study.marearts.com/2017/02/opencv-lecture-and-or-xor-not-example.html
http://cvlecture.marearts.com/2017/02/opencv-lecture-4-6.html
Mat leftCircle = Mat(500, 1000, CV_8UC1);
Mat rightCircle = Mat(500, 1000, CV_8UC1);
leftCircle.setTo(0);
rightCircle.setTo(0);
circle(leftCircle, Point(1000/5*2, 500/2), 250, CV_RGB(255, 255, 255), CV_FILLED);
@MareArts
MareArts / bitwise_example_to_image.cpp
Last active March 7, 2017 04:31
OpenCV Lecture, and, or, xor, not example using bitwise_and, bitwise_or, bitwise_xor, bitwise_not
http://study.marearts.com/2017/02/opencv-lecture-and-or-xor-not-example_14.html
http://cvlecture.marearts.com/2017/02/opencv-lecture-4-6.html
//실제 영상에서
Mat img = imread("empireofthesun.jpg");
Mat img_mask = img.clone(); // imread("empireofthesun_mask.jpg");
img_mask.setTo(0);
circle(img_mask, Point(1000 / 5 * 2, 500 / 2), 250, CV_RGB(255, 255, 255), CV_FILLED);
Mat res;