일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- 빅 데이타
- 인공지능
- data science
- 우리들교회
- 빅 데이터
- 빅데이타
- Artificial Intelligence
- R
- c++
- openCV
- 확률
- 딥러닝
- 김양재 목사님
- 빅데이터
- WebGL
- 통계
- nodeJS
- 김양재 목사
- 김양재
- No SQL
- Deep learning
- 데이터 과학
- 주일설교
- node.js
- Machine Learning
- 몽고디비
- probability
- MongoDB
- Statistics
- Big Data
- Today
- Total
목록Programming/OpenCV (41)
Scientific Computing & Data Science
이미지의 row(행) 번호 j에 대한 첫번째 열의 픽셀 데이터 포인터는 다음과 같습니다: uchar* data= image.ptr(j); 이를 이용한 픽셀 처리에 대한 예제 코드는 다음과 같습니다: 12345678910111213141516171819// open the imagecv::Mat image = cv::imread( IMAGE_FILE_PATH ); // number of linesint nl = image.rows; // total number of elements per lineint nc = image.cols * image.channels(); for ( int j = 0; j
landscape.jpgcolorReduce.cpp1234567891011121314151617181920212223242526272829303132333435363738394041#include "stdafx.h"#include "opencv2\opencv.hpp" /////////////////////////////////////////////////////////////////////////// colorReducevoid colorReduce( cv::Mat &image, int div = 64 ) { int nl = image.rows; // number of lines // total number of elements per line int nc = image.cols * image.chann..
개발 환경Microsoft Windows 7Visual Studio V11 (2012)OpenCV 3.0.0Example Code12345678910111213141516171819#include #include #include int _tmain(int argc, _TCHAR* argv[]){ // Read an image cv::Mat image = cv::imread("[YOUR_IMAGE_PATH]"); // Set name of the window cv::namedWindow("My Image"); // Show the window cv::imshow("My Image", image); cv::waitKey(5000); return 0;}Colored by Color Scriptercs
본 포스팅에서는 OpenCV에서 randu() 함수를 이용하여 Random Number를 발생하여 이를 이미지화하는 예제를 소개하겠습니다. randu() 함수를 이용한 300-by-200 사이즈의 행렬을 생성하는 예는 다음과 같습니다:12Mat R = Mat(300, 200, CV_8UC3);randu(R, Scalar::all(0), Scalar::all(255));cs 이를 이미지로 출력하는 예제는 다음과 같습니다:12345678910111213141516171819202122232425262728#include "stdafx.h"#include #include using namespace std;using namespace cv; int _tmain(int argc, char** argv){ Mat..
main.cpp123456789101112131415161718192021222324252627282930// Mat.cpp : Defines the entry point for the console application.// #include "stdafx.h"#include #include using namespace std;using namespace cv; int _tmain(int argc, char** argv){ IplImage *pImage = cvLoadImage("[IMAGE_PATH]/[IMAGE_NAME]", CV_LOAD_IMAGE_COLOR); Mat img(pImage); // Check for invalid input if(! img.data ) { cout
개발환경Visual Studio V11 (2012)OpenCV V2.4.8Step-by-Step 튜토리얼[1. 프로젝트 생성하기] 다음과 같이 MFC 프로젝트를 생성합니다. Template Templates > MFC Application Name CapCaptureDemo Application Type Single Document Project Style MFC Standard [2. 리소스 편집하기] Resource View의 Menu > IDR_MAINFRAME을 더블클릭하여 메인 프레임 메뉴를 열고, 다음과 같이 메뉴를 추가합니다. 영상처리 > 카메라 뷰 카메라 뷰 메뉴의 ID는 ID_CAM_VIEW입니다. [3. Dialog 생성하기] Resource View > Dialog를 오른쪽 마우스 클..
Written by Geol Choi | Apr. 02, 2014 지난 글에서는 Mac OS의 IDE인 Xcode에서의 OpenCV 개발 환경 구축에 대하여 알아보았습니다. 이번 포스팅에서는 Windows의 IDE인 Xcode에서의 OpenCV 개발 환경 구축에 대하여 알아보도록 하겠습니다. 테스트 환경은 다음과 같습니다:Windows 7 64 bitVisual Studio 2013 (version 12): Visual Studio 2013은 Express 버전도 관계없습니다. Visual Studio 2013 Express 다운로드OpenCV2.4.8: OpenCV2.4.8 다운로드1. cmake 다운 및 설치http://www.cmake.org/cmake/resources/software.html로부..
Written by Geol Choi | Apr. 02, 2014 이번 포스팅에서는 Mac OS의 IDE인 Xcode에서의 OpenCV 개발환경 구축에 대하여 알아보기로 하겠습니다. 이번 포스팅과 관련하여 대부분의 정보는https://sites.google.com/site/learningopencv1/installing-opencv을 통해 얻었습니다. 테스트 환경은 다음과 같습니다(이 글을 쓸 당시 최신 버전이었습니다): Mac OS X 10.9 (Mavericks)Xcode 5.1 (5A2053)OpenCV 2.4.81. Xcode 설치하기Xcode 5.1은 일반적으로 Mac OS X 10.9에 설치됩니다. Mac App 스토어로부터 Xcode의 최신버전을 다운받을 수 있습니다.2. MacPorts 다..
Written by CINEMA4DIn this article I'm going to explain how to set up OpenCV development environment in Xcode. I got most of the information from https://sites.google.com/site/learningopencv1/installing-opencv.My test environment is as follows (latest versions at this writing):- Mac OS X 10.9 (Mavericks)- Xcode 5.0.1 (5A2053)- OpenCV 2.4.6 1. Install XcodeXcode 5.0.1 usually comes with Mac OS X ..
#include #include #include #include const int MAX_CORNERS = 500; int main(int argc, char** argv) { // Load images IplImage* imgA = cvLoadImage( "test_img_1.png", CV_LOAD_IMAGE_GRAYSCALE ); IplImage* imgB = cvLoadImage( "test_img_2.png", CV_LOAD_IMAGE_GRAYSCALE ); IplImage* imgC = cvLoadImage( "test_img_3.png", CV_LOAD_IMAGE_UNCHANGED ); CvSize img_sz = cvGetSize( imgA ); int win_size = 10; // Ge..