'Programming > php' 카테고리의 다른 글
| xcache apc (0) | 2014.09.23 |
|---|---|
| lighthttpd / php / FastCGI (0) | 2014.08.28 |
| 웹소켓 (websocket) (0) | 2014.07.03 |
| php 로그인 예제 (0) | 2014.05.19 |
| php framework / 읽을꺼리 (0) | 2014.04.09 |
| xcache apc (0) | 2014.09.23 |
|---|---|
| lighthttpd / php / FastCGI (0) | 2014.08.28 |
| 웹소켓 (websocket) (0) | 2014.07.03 |
| php 로그인 예제 (0) | 2014.05.19 |
| php framework / 읽을꺼리 (0) | 2014.04.09 |
| node.js (0) | 2014.07.07 |
|---|---|
| 부트스트랩 - 웹개발 프레임워크 (0) | 2014.07.07 |
| post 방식과 get 방식의 차이점(cache) (0) | 2014.05.15 |
| sql designer(web) (0) | 2014.05.11 |
| 호스팅어 / 무료 웹 호스팅 (4) | 2014.04.27 |
|
|||||||||||
class CV_EXPORTS Mat
{
public:
//! returns a new matrix header for the specified row
Mat row(int y) const;
//! returns a new matrix header for the specified column
Mat col(int x) const;
/*! includes several bit-fields:
- the magic signature
- continuity flag
- depth
- number of channels
*/
int flags;
//! the matrix dimensionality, >= 2
int dims;
//! the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions
int rows, cols;
//! pointer to the data
uchar* data;
//! returns element type, similar to CV_MAT_TYPE(cvmat->type)
int type() const;
//! returns element type, similar to CV_MAT_DEPTH(cvmat->type)
int depth() const;
//! returns element type, similar to CV_MAT_CN(cvmat->type)
int channels() const;
//! returns pointer to (i0,i1) submatrix along the dimensions #0 and #1
uchar* ptr(int i0, int i1);
const uchar* ptr(int i0, int i1) const;
//! template version of the above method
template<typename _Tp> _Tp* ptr(int i0=0);
//! the same as above, with the pointer dereferencing
template<typename _Tp> _Tp& at(int i0=0);
MSize size;
MStep step;
|
| opencv2 마우스 이벤트 / 클릭 위치 (0) | 2015.09.25 |
|---|---|
| opencv2.. VideoCapture 클래스.. (0) | 2015.09.25 |
| openCV2 관련 꿍시렁 꿍시렁 (0) | 2014.07.04 |
| opencv2 highgui (0) | 2014.07.03 |
| opencv2 VideoCapture::get() / set() - 웹캠 설정 읽어오기 (2) | 2014.07.03 |
| opencv2.. VideoCapture 클래스.. (0) | 2015.09.25 |
|---|---|
| openCV Mat Class (0) | 2014.07.04 |
| opencv2 highgui (0) | 2014.07.03 |
| opencv2 VideoCapture::get() / set() - 웹캠 설정 읽어오기 (2) | 2014.07.03 |
| opencv2 채널분리하기(split) (0) | 2014.07.03 |
| lighthttpd / php / FastCGI (0) | 2014.08.28 |
|---|---|
| php5 class / object oriented programming (4) | 2014.07.07 |
| php 로그인 예제 (0) | 2014.05.19 |
| php framework / 읽을꺼리 (0) | 2014.04.09 |
| php 메뉴얼 (0) | 2014.03.28 |
| CV_EXPORTS_W void namedWindow(const string& winname, int flags = WINDOW_AUTOSIZE);
CV_EXPORTS_W void destroyWindow(const string& winname);
CV_EXPORTS_W void destroyAllWindows();
CV_EXPORTS_W void resizeWindow(const string& winname, int width, int height);
CV_EXPORTS_W void moveWindow(const string& winname, int x, int y);
CV_EXPORTS_W int waitKey(int delay = 0);
|
| CV_EXPORTS_W void imshow(const string& winname, InputArray mat);
CV_EXPORTS_W Mat imread( const string& filename, int flags=1 );
CV_EXPORTS_W bool imwrite( const string& filename, InputArray img, const vector<int>& params=vector<int>());
CV_EXPORTS_W Mat imdecode( InputArray buf, int flags );
CV_EXPORTS Mat imdecode( InputArray buf, int flags, Mat* dst );
CV_EXPORTS_W bool imencode( const string& ext, InputArray img,
CV_OUT vector<uchar>& buf,
const vector<int>& params=vector<int>()); |
| class CV_EXPORTS_W VideoCapture
{
public:
CV_WRAP VideoCapture();
CV_WRAP VideoCapture(const string& filename);
CV_WRAP VideoCapture(int device);
virtual ~VideoCapture();
CV_WRAP virtual bool open(const string& filename);
CV_WRAP virtual bool open(int device);
CV_WRAP virtual bool isOpened() const;
CV_WRAP virtual void release();
CV_WRAP virtual bool grab();
CV_WRAP virtual bool retrieve(CV_OUT Mat& image, int channel=0);
virtual VideoCapture& operator >> (CV_OUT Mat& image);
CV_WRAP virtual bool read(CV_OUT Mat& image);
CV_WRAP virtual bool set(int propId, double value);
CV_WRAP virtual double get(int propId);
protected:
Ptr<CvCapture> cap;
};
class CV_EXPORTS_W VideoWriter
{
public:
CV_WRAP VideoWriter();
CV_WRAP VideoWriter(const string& filename, int fourcc, double fps,
Size frameSize, bool isColor=true);
virtual ~VideoWriter();
CV_WRAP virtual bool open(const string& filename, int fourcc, double fps,
Size frameSize, bool isColor=true);
CV_WRAP virtual bool isOpened() const;
CV_WRAP virtual void release();
virtual VideoWriter& operator << (const Mat& image);
CV_WRAP virtual void write(const Mat& image);
protected:
Ptr<CvVideoWriter> writer;
}; |
| openCV Mat Class (0) | 2014.07.04 |
|---|---|
| openCV2 관련 꿍시렁 꿍시렁 (0) | 2014.07.04 |
| opencv2 VideoCapture::get() / set() - 웹캠 설정 읽어오기 (2) | 2014.07.03 |
| opencv2 채널분리하기(split) (0) | 2014.07.03 |
| opencv2 rgb2hsv color space 변환하기 (0) | 2014.07.02 |
v4l2의 문제인지 설정은 잘안되고
못 불러 오는 설정사항도 많다 -_-a
| VideoCapture::get C++: double VideoCapture::get(int propId) C: double cvGetCaptureProperty(CvCapture* capture, int property_id) – CV_CAP_PROP_RECTIFICATION Rectification flag for stereo cameras (note: only supported by DC1394 v 2.x backend currently)
propId – Property identifier. It can be one of the following:
– CV_CAP_PROP_POS_MSEC Current position of the video file in milliseconds or video capture timestamp.
– CV_CAP_PROP_POS_FRAMES 0-based index of the frame to be decoded/captured next.
– CV_CAP_PROP_POS_AVI_RATIO Relative position of the video file: 0 - start of the film, 1 - end of the film.
– CV_CAP_PROP_FRAME_WIDTH Width of the frames in the video stream.
– CV_CAP_PROP_FRAME_HEIGHT Height of the frames in the video stream.
– CV_CAP_PROP_FPS Frame rate.
– CV_CAP_PROP_FOURCC 4-character code of codec.
– CV_CAP_PROP_FRAME_COUNT Number of frames in the video file.
– CV_CAP_PROP_FORMAT Format of the Mat objects returned by retrieve() .
– CV_CAP_PROP_MODE Backend-specific value indicating the current capture mode.
– CV_CAP_PROP_BRIGHTNESS Brightness of the image (only for cameras).
– CV_CAP_PROP_CONTRAST Contrast of the image (only for cameras).
– CV_CAP_PROP_SATURATION Saturation of the image (only for cameras).
– CV_CAP_PROP_HUE Hue of the image (only for cameras).
– CV_CAP_PROP_GAIN Gain of the image (only for cameras).
– CV_CAP_PROP_EXPOSURE Exposure (only for cameras).
– CV_CAP_PROP_CONVERT_RGB Boolean flags indicating whether images should be converted to RGB.
– CV_CAP_PROP_WHITE_BALANCE Currently not supported
|
VideoCapture cap(0);
cout << "POS_MSEC : " << cap.get(CV_CAP_PROP_POS_MSEC) << endl; cout << "POS_FRAMES : " << cap.get(CV_CAP_PROP_POS_FRAMES) << endl;
cout << "POS_AVI_RATIO : " << cap.get(CV_CAP_PROP_POS_AVI_RATIO) << endl;
cout << "POS_FRAME_WIDTH : " << cap.get(CV_CAP_PROP_FRAME_WIDTH) << endl;
cout << "POS_FRAME_HEIGHT : " << cap.get(CV_CAP_PROP_FRAME_HEIGHT) << endl;
cout << "FPS : " << cap.get(CV_CAP_PROP_FPS) << endl;
cout << "FOURCC : " << cap.get(CV_CAP_PROP_FOURCC) << endl;
// cout << "FRAME_OUT : " << cap.get(CV_CAP_PROP_FRAME_OUT) << endl;
cout << "FORMAT : " << cap.get(CV_CAP_PROP_FORMAT) << endl;
cout << "MODE : " << cap.get(CV_CAP_PROP_MODE) << endl;
cout << "BRIHTNESS : " << cap.get(CV_CAP_PROP_BRIGHTNESS) << endl;
cout << "CONTRAST : " << cap.get(CV_CAP_PROP_CONTRAST) << endl;
cout << "SATURATION : " << cap.get(CV_CAP_PROP_SATURATION) << endl;
cout << "HUE : " << cap.get(CV_CAP_PROP_HUE) << endl;
cout << "GAIN : " << cap.get(CV_CAP_PROP_GAIN) << endl;
cout << "EXPOSURE : " << cap.get(CV_CAP_PROP_EXPOSURE) << endl;
cout << "CONVERT_RGB : " << cap.get(CV_CAP_PROP_CONVERT_RGB) << endl;
// cout << "WHITE_BALANCE : " << cap.get(CV_CAP_PROP_WHITE_BALANCE) << endl;
cout << "RECTIFICATION : " << cap.get(CV_CAP_PROP_RECTIFICATION) << endl; |
| openCV2 관련 꿍시렁 꿍시렁 (0) | 2014.07.04 |
|---|---|
| opencv2 highgui (0) | 2014.07.03 |
| opencv2 채널분리하기(split) (0) | 2014.07.03 |
| opencv2 rgb2hsv color space 변환하기 (0) | 2014.07.02 |
| openCV2 2.3.1 ubuntu 컴파일하기 (0) | 2014.07.01 |
| //! makes multi-channel array out of several single-channel arrays
CV_EXPORTS void merge(const Mat* mv, size_t count, OutputArray dst);
//! makes multi-channel array out of several single-channel arrays
CV_EXPORTS_W void merge(const vector<Mat>& mv, OutputArray dst);
//! copies each plane of a multi-channel array to a dedicated array
CV_EXPORTS void split(const Mat& src, Mat* mvbegin);
//! copies each plane of a multi-channel array to a dedicated array
CV_EXPORTS_W void split(const Mat& m, CV_OUT vector<Mat>& mv); |
| opencv2 highgui (0) | 2014.07.03 |
|---|---|
| opencv2 VideoCapture::get() / set() - 웹캠 설정 읽어오기 (2) | 2014.07.03 |
| opencv2 rgb2hsv color space 변환하기 (0) | 2014.07.02 |
| openCV2 2.3.1 ubuntu 컴파일하기 (0) | 2014.07.01 |
| openCV2 2.4.9 + VS2008 좌충우돌 프로젝트 생성하기 (0) | 2014.07.01 |
| // TEMPLATE CLASS vector
template<class _Ty, class _Ax> class vector : public _Vector_val<_Ty, _Ax>
{} |
| template <typename _Tp> class Vector
{
} |
| printf POSIX 확장 %1$d (0) | 2014.12.09 |
|---|---|
| include guard (0) | 2014.11.05 |
| 순열생성관련 (0) | 2014.06.27 |
| 2중 포인터 사용이유 (0) | 2014.03.19 |
| typeof (0) | 2014.03.11 |
BGR 이니까.. 블루값에 Hue 성분이 들어갔으려나?
나중에 색상 조절해서 채널별로 출력을 해봐야겠다
| #include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, char* argv[])
{
VideoCapture cap(0);
if(!cap.isOpened())
{
cout << "No camera detected" << endl;
return -1;
}
else
{
cout << "In capture ..." << endl;
}
namedWindow( "Display window", WINDOW_AUTOSIZE );
for(;;)
{
Mat frame;
Mat hsv;
if(!cap.read(frame)) break;
cvtColor(frame,hsv, CV_BGR2HSV);
imshow("Display window", frame);
imshow("HSV window", hsv);
if(waitKey(30) >= 0) break;
}
return 0;
}
|
| enum
{
COLOR_BGR2HSV =40, COLOR_RGB2HSV =41,
COLOR_COLORCVT_MAX = 135
};
//! converts image from one color space to another
CV_EXPORTS_W void cvtColor( InputArray src, OutputArray dst, int code, int dstCn=0 ); |
| opencv2 VideoCapture::get() / set() - 웹캠 설정 읽어오기 (2) | 2014.07.03 |
|---|---|
| opencv2 채널분리하기(split) (0) | 2014.07.03 |
| openCV2 2.3.1 ubuntu 컴파일하기 (0) | 2014.07.01 |
| openCV2 2.4.9 + VS2008 좌충우돌 프로젝트 생성하기 (0) | 2014.07.01 |
| openCV visual studio 프로젝트 생성하기 (0) | 2014.06.30 |